Commit 3e6f8a4b authored by Avinash Patil's avatar Avinash Patil Committed by Kalle Valo

mwifiex: drop block-ack action frames

We often see ADDBA request packets coming to driver because driver
has registered for action frame subtype. We dont process BA action
frames in host; drop such frames.
Signed-off-by: default avatarAvinash Patil <patila@marvell.com>
Signed-off-by: default avatarXinmin Hu <huxm@marvell.com>
Signed-off-by: default avatarCathy Luo <cluo@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent e4f59aca
...@@ -329,7 +329,7 @@ mwifiex_parse_mgmt_packet(struct mwifiex_private *priv, u8 *payload, u16 len, ...@@ -329,7 +329,7 @@ mwifiex_parse_mgmt_packet(struct mwifiex_private *priv, u8 *payload, u16 len,
struct rxpd *rx_pd) struct rxpd *rx_pd)
{ {
u16 stype; u16 stype;
u8 category, action_code; u8 category, action_code, *addr2;
struct ieee80211_hdr *ieee_hdr = (void *)payload; struct ieee80211_hdr *ieee_hdr = (void *)payload;
stype = (le16_to_cpu(ieee_hdr->frame_control) & IEEE80211_FCTL_STYPE); stype = (le16_to_cpu(ieee_hdr->frame_control) & IEEE80211_FCTL_STYPE);
...@@ -337,21 +337,35 @@ mwifiex_parse_mgmt_packet(struct mwifiex_private *priv, u8 *payload, u16 len, ...@@ -337,21 +337,35 @@ mwifiex_parse_mgmt_packet(struct mwifiex_private *priv, u8 *payload, u16 len,
switch (stype) { switch (stype) {
case IEEE80211_STYPE_ACTION: case IEEE80211_STYPE_ACTION:
category = *(payload + sizeof(struct ieee80211_hdr)); category = *(payload + sizeof(struct ieee80211_hdr));
action_code = *(payload + sizeof(struct ieee80211_hdr) + 1); switch (category) {
if (category == WLAN_CATEGORY_PUBLIC && case WLAN_CATEGORY_PUBLIC:
action_code == WLAN_PUB_ACTION_TDLS_DISCOVER_RES) { action_code = *(payload + sizeof(struct ieee80211_hdr)
+ 1);
if (action_code == WLAN_PUB_ACTION_TDLS_DISCOVER_RES) {
addr2 = ieee_hdr->addr2;
mwifiex_dbg(priv->adapter, INFO,
"TDLS discovery response %pM nf=%d, snr=%d\n",
addr2, rx_pd->nf, rx_pd->snr);
mwifiex_auto_tdls_update_peer_signal(priv,
addr2,
rx_pd->snr,
rx_pd->nf);
}
break;
case WLAN_CATEGORY_BACK:
/*we dont indicate BACK action frames to cfg80211*/
mwifiex_dbg(priv->adapter, INFO,
"drop BACK action frames");
return -1;
default:
mwifiex_dbg(priv->adapter, INFO, mwifiex_dbg(priv->adapter, INFO,
"TDLS discovery response %pM nf=%d, snr=%d\n", "unknown public action frame category %d\n",
ieee_hdr->addr2, rx_pd->nf, rx_pd->snr); category);
mwifiex_auto_tdls_update_peer_signal(priv,
ieee_hdr->addr2,
rx_pd->snr,
rx_pd->nf);
} }
break;
default: default:
mwifiex_dbg(priv->adapter, INFO, mwifiex_dbg(priv->adapter, INFO,
"unknown mgmt frame subtype %#x\n", stype); "unknown mgmt frame subtype %#x\n", stype);
return 0;
} }
return 0; return 0;
...@@ -387,8 +401,9 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv, ...@@ -387,8 +401,9 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv,
ieee_hdr = (void *)skb->data; ieee_hdr = (void *)skb->data;
if (ieee80211_is_mgmt(ieee_hdr->frame_control)) { if (ieee80211_is_mgmt(ieee_hdr->frame_control)) {
mwifiex_parse_mgmt_packet(priv, (u8 *)ieee_hdr, if (mwifiex_parse_mgmt_packet(priv, (u8 *)ieee_hdr,
pkt_len, rx_pd); pkt_len, rx_pd))
return -1;
} }
/* Remove address4 */ /* Remove address4 */
memmove(skb->data + sizeof(struct ieee80211_hdr_3addr), memmove(skb->data + sizeof(struct ieee80211_hdr_3addr),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment