summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2013-07-19 23:31:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-07-22 16:04:08 -0400
commit16ec75b5de6479637993ad0f7c11a49aae069f68 (patch)
tree7d31d5f55fd34ddd66c63565257b648b7065e38c /drivers/net/wireless
parent4928bd2ef8ece262f4f314630219999a91eaa440 (diff)
downloadblackbird-obmc-linux-16ec75b5de6479637993ad0f7c11a49aae069f68.tar.gz
blackbird-obmc-linux-16ec75b5de6479637993ad0f7c11a49aae069f68.zip
cw1200: Fix OOPS in monitor mode
In monitor mode, priv->vif is NULL, but at one point in the receive path we blindly attempt to dereference it. Add a test to prevent this. Signed-off-by: Solomon Peachy <pizza@shaftnet.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/cw1200/txrx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/cw1200/txrx.c b/drivers/net/wireless/cw1200/txrx.c
index 5862c373d714..e824d4d4a18d 100644
--- a/drivers/net/wireless/cw1200/txrx.c
+++ b/drivers/net/wireless/cw1200/txrx.c
@@ -1165,7 +1165,7 @@ void cw1200_rx_cb(struct cw1200_common *priv,
if (cw1200_handle_action_rx(priv, skb))
return;
} else if (ieee80211_is_beacon(frame->frame_control) &&
- !arg->status &&
+ !arg->status && priv->vif &&
!memcmp(ieee80211_get_SA(frame), priv->vif->bss_conf.bssid,
ETH_ALEN)) {
const u8 *tim_ie;
OpenPOWER on IntegriCloud