diff options
author | Avinash Patil <patila@marvell.com> | 2015-02-11 12:42:25 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-02-27 03:08:44 -0500 |
commit | 7521ce6eb2d3650a04ac7a1d176607ae9441826a (patch) | |
tree | 6b1269ee6050ad8e090fed40c1c7369212f9898f /drivers/net/wireless/mwifiex | |
parent | 04c7b363c9f7b05cb1bb94e14afbdd3661f9dd61 (diff) |
mwifiex: do not process mgmt rx on uninitialized interface
This patch fixes a crash which was happening because of RX of
management frames on uninitialzed interface. Now we drop management
frames for interfaces where cfg80211 has not registered any management
subtype reception or interface has no NL80211 iftype set.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r-- | drivers/net/wireless/mwifiex/util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c index 308550611f22..47e215b6d5f5 100644 --- a/drivers/net/wireless/mwifiex/util.c +++ b/drivers/net/wireless/mwifiex/util.c | |||
@@ -367,6 +367,13 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv, | |||
367 | if (!skb) | 367 | if (!skb) |
368 | return -1; | 368 | return -1; |
369 | 369 | ||
370 | if (!priv->mgmt_frame_mask || | ||
371 | priv->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) { | ||
372 | dev_dbg(priv->adapter->dev, | ||
373 | "do not receive mgmt frames on uninitialized intf"); | ||
374 | return -1; | ||
375 | } | ||
376 | |||
370 | rx_pd = (struct rxpd *)skb->data; | 377 | rx_pd = (struct rxpd *)skb->data; |
371 | 378 | ||
372 | skb_pull(skb, le16_to_cpu(rx_pd->rx_pkt_offset)); | 379 | skb_pull(skb, le16_to_cpu(rx_pd->rx_pkt_offset)); |