summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-12-19 14:00:59 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-12 11:29:26 -0800
commit0b58bf9909d4ef70275921fc1535f21390cf5bb5 (patch)
tree6d01c5885353cc2fda51d385c32e35fdc4314f2f /tools
parent01b366aa69f33489d59d7a79702987752070fb3a (diff)
downloadlwn-0b58bf9909d4ef70275921fc1535f21390cf5bb5.tar.gz
lwn-0b58bf9909d4ef70275921fc1535f21390cf5bb5.zip
iwlagn: fix (remove) use of PAGE_SIZE
commit 106671369e6d046c0b3e1e72b18ad6dd9cb298b0 upstream. 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> 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions