diff --git a/ath/if_ath.c b/ath/if_ath.c index b6271e8..52f4095 100644 --- a/ath/if_ath.c +++ b/ath/if_ath.c @@ -7849,7 +7849,7 @@ ath_tx_start(struct net_device *dev, struct ieee80211_node *ni, if (ATH_NODE(ni)->an_decomp_index != INVALID_DECOMP_INDEX && !ismcast && ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_DATA) && - ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) != IEEE80211_FC0_SUBTYPE_NODATA)) { + ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) != IEEE80211_FC0_SUBTYPE_NULL)) { if (pktlen > ATH_COMP_THRESHOLD) comp = ATH_COMP_PROC_COMP_OPTIMAL; else diff --git a/net80211/ieee80211.h b/net80211/ieee80211.h index 79f06fe..e920d27 100644 --- a/net80211/ieee80211.h +++ b/net80211/ieee80211.h @@ -149,7 +149,7 @@ struct ieee80211_ctlframe_addr2 { #define IEEE80211_FC0_SUBTYPE_CF_ACK 0x10 #define IEEE80211_FC0_SUBTYPE_CF_POLL 0x20 #define IEEE80211_FC0_SUBTYPE_CF_ACPL 0x30 -#define IEEE80211_FC0_SUBTYPE_NODATA 0x40 +#define IEEE80211_FC0_SUBTYPE_NULL 0x40 #define IEEE80211_FC0_SUBTYPE_CFACK 0x50 #define IEEE80211_FC0_SUBTYPE_CFPOLL 0x60 #define IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK 0x70 diff --git a/net80211/ieee80211_input.c b/net80211/ieee80211_input.c index 6d91d90..ecc0d4c 100644 --- a/net80211/ieee80211_input.c +++ b/net80211/ieee80211_input.c @@ -605,6 +605,11 @@ ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null, goto out; } + /* These frames have no further meaning. */ + if ((subtype == IEEE80211_FC0_SUBTYPE_NULL) || + (subtype == IEEE80211_FC0_SUBTYPE_QOS_NULL)) + goto out; + /* * Handle privacy requirements. Note that we * must not be preempted from here until after @@ -635,9 +640,7 @@ ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null, } else key = NULL; - /* - * Next up, any fragmentation. - */ + /* Next up, any fragmentation. */ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { skb = ieee80211_defrag(ni, skb, hdrlen); if (skb == NULL) { @@ -647,9 +650,7 @@ ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null, } wh = NULL; /* no longer valid, catch any uses */ - /* - * Next strip any MSDU crypto bits. - */ + /* Next strip any MSDU crypto. bits. */ if (key != NULL && !ieee80211_crypto_demic(vap, key, skb, hdrlen, 0)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, @@ -658,14 +659,9 @@ ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null, goto out; } - /* - * Finally, strip the 802.11 header. - */ + /* Finally, strip the 802.11 header. */ skb = ieee80211_decap(vap, skb, hdrlen); if (skb == NULL) { - /* don't count Null data frames as errors */ - if (subtype == IEEE80211_FC0_SUBTYPE_NODATA) - goto out; IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, ni->ni_macaddr, "data", "%s", "decap error"); vap->iv_stats.is_rx_decap++; diff --git a/net80211/ieee80211_output.c b/net80211/ieee80211_output.c index 80d845a..1416912 100644 --- a/net80211/ieee80211_output.c +++ b/net80211/ieee80211_output.c @@ -463,7 +463,7 @@ ieee80211_send_nulldata(struct ieee80211_node *ni) wh = (struct ieee80211_frame *) skb_push(skb, sizeof(struct ieee80211_frame)); ieee80211_send_setup(vap, ni, wh, - IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_NODATA, + IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_NULL, vap->iv_myaddr, ni->ni_macaddr, vap->iv_bssid); /* NB: power management bit is never sent by an AP */ if ((IEEE80211_VAP_IS_SLEEPING(ni->ni_vap)) &&