mirror of https://github.com/proski/madwifi
Correctly name Data type Null subtype frame.
Do not try to process Null and QoS Null frames as data. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3749 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
3f948507e7
commit
9a2f6efd63
|
@ -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 &&
|
if (ATH_NODE(ni)->an_decomp_index != INVALID_DECOMP_INDEX &&
|
||||||
!ismcast &&
|
!ismcast &&
|
||||||
((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_DATA) &&
|
((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)
|
if (pktlen > ATH_COMP_THRESHOLD)
|
||||||
comp = ATH_COMP_PROC_COMP_OPTIMAL;
|
comp = ATH_COMP_PROC_COMP_OPTIMAL;
|
||||||
else
|
else
|
||||||
|
|
|
@ -149,7 +149,7 @@ struct ieee80211_ctlframe_addr2 {
|
||||||
#define IEEE80211_FC0_SUBTYPE_CF_ACK 0x10
|
#define IEEE80211_FC0_SUBTYPE_CF_ACK 0x10
|
||||||
#define IEEE80211_FC0_SUBTYPE_CF_POLL 0x20
|
#define IEEE80211_FC0_SUBTYPE_CF_POLL 0x20
|
||||||
#define IEEE80211_FC0_SUBTYPE_CF_ACPL 0x30
|
#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_CFACK 0x50
|
||||||
#define IEEE80211_FC0_SUBTYPE_CFPOLL 0x60
|
#define IEEE80211_FC0_SUBTYPE_CFPOLL 0x60
|
||||||
#define IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK 0x70
|
#define IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK 0x70
|
||||||
|
|
|
@ -605,6 +605,11 @@ ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null,
|
||||||
goto out;
|
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
|
* Handle privacy requirements. Note that we
|
||||||
* must not be preempted from here until after
|
* must not be preempted from here until after
|
||||||
|
@ -635,9 +640,7 @@ ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null,
|
||||||
} else
|
} else
|
||||||
key = NULL;
|
key = NULL;
|
||||||
|
|
||||||
/*
|
/* Next up, any fragmentation. */
|
||||||
* Next up, any fragmentation.
|
|
||||||
*/
|
|
||||||
if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) {
|
if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) {
|
||||||
skb = ieee80211_defrag(ni, skb, hdrlen);
|
skb = ieee80211_defrag(ni, skb, hdrlen);
|
||||||
if (skb == NULL) {
|
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 */
|
wh = NULL; /* no longer valid, catch any uses */
|
||||||
|
|
||||||
/*
|
/* Next strip any MSDU crypto. bits. */
|
||||||
* Next strip any MSDU crypto bits.
|
|
||||||
*/
|
|
||||||
if (key != NULL &&
|
if (key != NULL &&
|
||||||
!ieee80211_crypto_demic(vap, key, skb, hdrlen, 0)) {
|
!ieee80211_crypto_demic(vap, key, skb, hdrlen, 0)) {
|
||||||
IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
|
IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
|
||||||
|
@ -658,14 +659,9 @@ ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Finally, strip the 802.11 header. */
|
||||||
* Finally, strip the 802.11 header.
|
|
||||||
*/
|
|
||||||
skb = ieee80211_decap(vap, skb, hdrlen);
|
skb = ieee80211_decap(vap, skb, hdrlen);
|
||||||
if (skb == NULL) {
|
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,
|
IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
|
||||||
ni->ni_macaddr, "data", "%s", "decap error");
|
ni->ni_macaddr, "data", "%s", "decap error");
|
||||||
vap->iv_stats.is_rx_decap++;
|
vap->iv_stats.is_rx_decap++;
|
||||||
|
|
|
@ -463,7 +463,7 @@ ieee80211_send_nulldata(struct ieee80211_node *ni)
|
||||||
wh = (struct ieee80211_frame *)
|
wh = (struct ieee80211_frame *)
|
||||||
skb_push(skb, sizeof(struct ieee80211_frame));
|
skb_push(skb, sizeof(struct ieee80211_frame));
|
||||||
ieee80211_send_setup(vap, ni, wh,
|
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);
|
vap->iv_myaddr, ni->ni_macaddr, vap->iv_bssid);
|
||||||
/* NB: power management bit is never sent by an AP */
|
/* NB: power management bit is never sent by an AP */
|
||||||
if ((IEEE80211_VAP_IS_SLEEPING(ni->ni_vap)) &&
|
if ((IEEE80211_VAP_IS_SLEEPING(ni->ni_vap)) &&
|
||||||
|
|
Loading…
Reference in New Issue