Commit 003eae5a authored by Benjamin Berg's avatar Benjamin Berg Committed by Johannes Berg

wifi: iwlwifi: correctly reference TSO page information

The code got copied from get_workaround_page, but here p->page is the
correct way to reference the page.
Signed-off-by: default avatarBenjamin Berg <benjamin.berg@intel.com>
Fixes: adc902ce ("wifi: iwlwifi: keep the TSO and workaround pages mapped")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan 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.netSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 0321e457
...@@ -1770,7 +1770,7 @@ static void *iwl_pcie_get_page_hdr(struct iwl_trans *trans, ...@@ -1770,7 +1770,7 @@ static void *iwl_pcie_get_page_hdr(struct iwl_trans *trans,
* (see also get_workaround_page() in tx-gen2.c) * (see also get_workaround_page() in tx-gen2.c)
*/ */
if (((unsigned long)p->pos & ~PAGE_MASK) + len < IWL_TSO_PAGE_DATA_SIZE) { 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; goto out;
} }
...@@ -1783,7 +1783,7 @@ static void *iwl_pcie_get_page_hdr(struct iwl_trans *trans, ...@@ -1783,7 +1783,7 @@ static void *iwl_pcie_get_page_hdr(struct iwl_trans *trans,
return NULL; return NULL;
p->pos = page_address(p->page); 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 */ /* set the chaining pointer to NULL */
info->next = NULL; info->next = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment