linux/drivers/net/wireless
Chin-Ran Lo bca463e808 mwifiex: fix tx_info/rx_info overlap with PCIe dma_mapping
On PCIe Tx data path, network interface specific tx_info
parameters such as bss_num and bss_type are saved at
"skb->cb + sizeof(dma_addr_t)" (returned by MWIFIEX_SKB_TXCB).
Later mwifiex_map_pci_memory() called from
mwifiex_pcie_send_data() will memcpy
sizeof(struct mwifiex_dma_mapping) bytes to save PCIe DMA
address and length information at beginning of skb->cb.
This accidently overwrites bss_num and bss_type saved in skb->cb
previously because bss_num/bss_type and mwifiex_dma_mapping data
overlap.
Similarly, on PCIe Rx data path, rx_info parameters overlaps
with PCIe DMA address and length information too.

Fix it by defining mwifiex_cb structure and having
MWIFIEX_SKB_TXCB and MWIFIEX_SKB_RXCB return the correct address
of tx_info/rx_info using the structure members.

Also add a BUILD_BUG_ON to maks sure that mwifiex_cb structure
doesn't exceed the size of skb->cb.

Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Chin-Ran Lo <crlo@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-16 11:23:33 -04:00
..
ath Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
b43 b43: disable 5 GHz on G-PHY 2014-06-16 11:23:33 -04:00
b43legacy net: Replace min macro with min_t 2014-03-03 15:35:54 -05:00
brcm80211 brcmfmac: remove firmware list from USB driver 2014-05-29 13:10:27 -04:00
cw1200 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next 2014-04-30 12:04:27 -04:00
hostap net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
ipw2x00 net: Replace min macro with min_t 2014-03-03 15:35:54 -05:00
iwlegacy iwlegacy: Convert /n to \n 2014-04-30 12:08:17 -04:00
iwlwifi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
libertas libertas: fix return value when processing invalid packet 2014-05-22 14:04:36 -04:00
libertas_tf
mwifiex mwifiex: fix tx_info/rx_info overlap with PCIe dma_mapping 2014-06-16 11:23:33 -04:00
orinoco Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
p54 mac80211: add vif to flush call 2014-04-09 10:55:29 +02:00
prism54 net: Replace min macro with min_t 2014-03-03 15:35:54 -05:00
rsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
rt2x00 rt2x00: Endless loop on hub port power down 2014-05-22 14:04:36 -04:00
rtl818x rtl8187: make CTS-to-self protection work 2014-05-07 16:08:09 -04:00
rtlwifi rtlwifi: rtl8192cu: remove check for CONFIG_AUTOSUSPEND 2014-05-29 13:10:39 -04:00
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
zd1211rw zd1211rw: slight optimization of addr compare 2013-12-26 13:31:33 -05:00
adm8211.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2014-01-17 14:43:17 -05:00
adm8211.h
airo_cs.c wireless: delete non-required instances of include <linux/init.h> 2014-01-03 15:37:01 -05:00
airo.c airo: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} 2014-02-28 14:11:13 -05:00
airo.h
at76c50x-usb.c at76c50x: fix scan does not work with latest mac80211 2014-06-05 14:15:08 -04:00
at76c50x-usb.h at76c50x: fix scan does not work with latest mac80211 2014-06-05 14:15:08 -04:00
atmel_cs.c wireless: delete non-required instances of include <linux/init.h> 2014-01-03 15:37:01 -05:00
atmel_pci.c wireless: delete non-required instances of include <linux/init.h> 2014-01-03 15:37:01 -05:00
atmel.c atmel: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} 2014-02-28 14:11:13 -05:00
atmel.h
Kconfig rsi: Add RS9113 wireless driver 2014-03-17 13:51:52 -04:00
mac80211_hwsim.c mac80211_hwsim: Advertise support for AP mode channel width changes 2014-04-28 18:11:59 +02:00
mac80211_hwsim.h mac80211_hwsim: allow creation of single-channel radios with chanctx 2014-02-11 13:10:02 +01:00
Makefile rsi: Add RS9113 wireless driver 2014-03-17 13:51:52 -04:00
mwl8k.c mwl8k: mwl8k_update_survey can be static 2014-03-06 14:29:58 -05:00
ray_cs.c ray_cs: replace del_timer by del_timer_sync 2014-04-22 15:06:28 -04:00
ray_cs.h
rayctl.h
rndis_wlan.c cfg80211: constify MAC addresses in cfg80211 ops 2014-05-19 17:34:42 +02:00
wl3501_cs.c wl3501_cs: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} 2014-02-28 14:12:36 -05:00
wl3501.h
zd1201.c zd1201: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} 2014-02-28 14:12:36 -05:00
zd1201.h