提交 7521ce6e 编写于 作者: A Avinash Patil 提交者: Kalle Valo

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: NAvinash Patil <patila@marvell.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 04c7b363
......@@ -367,6 +367,13 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv,
if (!skb)
return -1;
if (!priv->mgmt_frame_mask ||
priv->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) {
dev_dbg(priv->adapter->dev,
"do not receive mgmt frames on uninitialized intf");
return -1;
}
rx_pd = (struct rxpd *)skb->data;
skb_pull(skb, le16_to_cpu(rx_pd->rx_pkt_offset));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册