]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: correctly reference TSO page information
authorBenjamin Berg <benjamin.berg@intel.com>
Tue, 9 Jul 2024 12:31:49 +0000 (14:31 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 10 Jul 2024 10:35:32 +0000 (12:35 +0200)
The code got copied from get_workaround_page, but here p->page is the
correct way to reference the page.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Fixes: adc902ceada2 ("wifi: iwlwifi: keep the TSO and workaround pages mapped")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202407062135.NNjnmMdR-lkp@intel.com/
Link: https://patch.msgid.link/20240709123149.1848315-1-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/tx.c

index 748772fa6b3ec50141528fcab6db21472d2658a4..22d482ae53d97af8bb70238dbe6fb44382a733e4 100644 (file)
@@ -1770,7 +1770,7 @@ static void *iwl_pcie_get_page_hdr(struct iwl_trans *trans,
         * (see also get_workaround_page() in tx-gen2.c)
         */
        if (((unsigned long)p->pos & ~PAGE_MASK) + len < IWL_TSO_PAGE_DATA_SIZE) {
-               info = IWL_TSO_PAGE_INFO(page_address(ret));
+               info = IWL_TSO_PAGE_INFO(page_address(p->page));
                goto out;
        }
 
@@ -1783,7 +1783,7 @@ alloc:
                return NULL;
        p->pos = page_address(p->page);
 
-       info = IWL_TSO_PAGE_INFO(page_address(ret));
+       info = IWL_TSO_PAGE_INFO(page_address(p->page));
 
        /* set the chaining pointer to NULL */
        info->next = NULL;