diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-12-19 14:00:59 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-21 15:06:10 -0500 |
commit | 106671369e6d046c0b3e1e72b18ad6dd9cb298b0 (patch) | |
tree | 0f1f4be9f1f7b39e014443f96cc1d08efff1ea35 /drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | |
parent | 3ac44670ad0fca8b6c43b3e4d8494c67c419f494 (diff) | |
download | blackbird-op-linux-106671369e6d046c0b3e1e72b18ad6dd9cb298b0.tar.gz blackbird-op-linux-106671369e6d046c0b3e1e72b18ad6dd9cb298b0.zip |
iwlagn: fix (remove) use of PAGE_SIZE
The ICT code erroneously uses PAGE_SIZE. The bug
is that PAGE_SIZE isn't necessarily 4096, so on
such platforms this code will not work correctly
as we'll try to attempt to read an index in the
table that the device never wrote, it always has
4096-byte pages.
Additionally, the manual alignment code here is
unnecessary -- Documentation/DMA-API-HOWTO.txt
states:
The cpu return address and the DMA bus master address are both
guaranteed to be aligned to the smallest PAGE_SIZE order which
is greater than or equal to the requested size. This invariant
exists (for example) to guarantee that if you allocate a chunk
which is smaller than or equal to 64 kilobytes, the extent of the
buffer you receive will not cross a 64K boundary.
Just use appropriate new constants and get rid of
the alignment code.
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h index 63a2eb1a71f3..f6debf91d7b5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h @@ -219,9 +219,7 @@ struct iwl_trans_pcie { /* INT ICT Table */ __le32 *ict_tbl; - void *ict_tbl_vir; dma_addr_t ict_tbl_dma; - dma_addr_t aligned_ict_tbl_dma; int ict_index; u32 inta; bool use_ict; |