aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2011-07-13 08:12:06 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-15 13:38:30 -0400
commit16c929df0895e6f52f4a0f17683d709f5fef95d8 (patch)
treeb0dfdbf0e252ddef7ab480233ce8842c0e7867a1
parent5a865bad44984de245d20bfb7cff99993e8e8294 (diff)
mwl8k: Fixing sta dereference when ieee80211_tx_info->control.sta is NULL
Following oops was seen on SMP machine >BUG: unable to handle kernel NULL pointer dereference at 00000012 >IP: [<f8c56691>] mwl8k_tx+0x20e/0x561 [mwl8k] >*pde = 00000000 >Oops: 0000 [#1] SMP >Modules linked in: mwl8k mac80211 cfg80211 [last unloaded: cfg80211] As ieee80211_tx_info->control.sta may be NULL during ->tx call, avoiding sta dereference in such scenario with the following patch. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/mwl8k.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index aeac3cc4dbe4..a09b94509f04 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1891,9 +1891,9 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
1891 1891
1892 txpriority = index; 1892 txpriority = index;
1893 1893
1894 if (ieee80211_is_data_qos(wh->frame_control) && 1894 if (priv->ap_fw && sta && sta->ht_cap.ht_supported
1895 skb->protocol != cpu_to_be16(ETH_P_PAE) && 1895 && skb->protocol != cpu_to_be16(ETH_P_PAE)
1896 sta->ht_cap.ht_supported && priv->ap_fw) { 1896 && ieee80211_is_data_qos(wh->frame_control)) {
1897 tid = qos & 0xf; 1897 tid = qos & 0xf;
1898 mwl8k_tx_count_packet(sta, tid); 1898 mwl8k_tx_count_packet(sta, tid);
1899 spin_lock(&priv->stream_lock); 1899 spin_lock(&priv->stream_lock);