Skip to content

Commit

Permalink
cw1200: Fix OOPS in monitor mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Solomon Peachy authored and John W. Linville committed Jul 22, 2013
1 parent 4928bd2 commit 16ec75b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/cw1200/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 16ec75b

Please sign in to comment.