diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 19a9b8b83072..8fad70058bf2 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -261,7 +261,7 @@ ieee80211_input(struct ieee80211com *ic, struct mbuf *m, ic->ic_wme.wme_hipri_traffic++; tid++; } else - tid = 0; + tid = IEEE80211_NONQOS_TID; rxseq = le16toh(*(u_int16_t *)wh->i_seq); if ((wh->i_fc[1] & IEEE80211_FC1_RETRY) && SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) { diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index bba8c16e65f1..1f19ff5396b4 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1273,8 +1273,8 @@ get_sta_info(void *arg, struct ieee80211_node *ni) memcpy(si->isi_txseqs, ni->ni_txseqs, sizeof(ni->ni_txseqs)); memcpy(si->isi_rxseqs, ni->ni_rxseqs, sizeof(ni->ni_rxseqs)); } else { - si->isi_txseqs[0] = ni->ni_txseqs[0]; - si->isi_rxseqs[0] = ni->ni_rxseqs[0]; + si->isi_txseqs[0] = ni->ni_txseqs[IEEE80211_NONQOS_TID]; + si->isi_rxseqs[0] = ni->ni_rxseqs[IEEE80211_NONQOS_TID]; } /* NB: leave all cases in case we relax ni_associd == 0 check */ if (ieee80211_node_is_authorized(ni)) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 074c32f23b2a..0408c33f1d7f 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1988,9 +1988,9 @@ ieee80211_dump_node(struct ieee80211_node_table *nt, struct ieee80211_node *ni) printf("\tassocid 0x%x txpower %u vlan %u\n", ni->ni_associd, ni->ni_txpower, ni->ni_vlan); printf("\ttxseq %u rxseq %u fragno %u rxfragstamp %u\n", - ni->ni_txseqs[0], - ni->ni_rxseqs[0] >> IEEE80211_SEQ_SEQ_SHIFT, - ni->ni_rxseqs[0] & IEEE80211_SEQ_FRAG_MASK, + ni->ni_txseqs[IEEE80211_NONQOS_TID], + ni->ni_rxseqs[IEEE80211_NONQOS_TID] >> IEEE80211_SEQ_SEQ_SHIFT, + ni->ni_rxseqs[IEEE80211_NONQOS_TID] & IEEE80211_SEQ_FRAG_MASK, ni->ni_rxfragstamp); printf("\trstamp %u rssi %u intval %u capinfo 0x%x\n", ni->ni_rstamp, ni->ni_rssi, ni->ni_intval, ni->ni_capinfo); diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index a86f582c6681..4af01858b7ea 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -107,6 +107,7 @@ struct ieee80211_node { u_int32_t *ni_challenge; /* shared-key challenge */ u_int8_t *ni_wpa_ie; /* captured WPA/RSN ie */ u_int8_t *ni_wme_ie; /* captured WME ie */ +#define IEEE80211_NONQOS_TID 16 /* index for non-QoS sta */ u_int16_t ni_txseqs[17]; /* tx seq per-tid */ u_int16_t ni_rxseqs[17]; /* rx seq previous per-tid*/ u_int32_t ni_rxfragstamp; /* time stamp of last rx frag */ diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 5dd4aec16e8d..dc1984cb0025 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -128,8 +128,8 @@ ieee80211_send_setup(struct ieee80211com *ic, *(u_int16_t *)&wh->i_dur[0] = 0; /* NB: use non-QoS tid */ *(u_int16_t *)&wh->i_seq[0] = - htole16(ni->ni_txseqs[0] << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseqs[0]++; + htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT); + ni->ni_txseqs[IEEE80211_NONQOS_TID]++; #undef WH4 } @@ -740,8 +740,8 @@ ieee80211_encap(struct ieee80211com *ic, struct mbuf *m, ni->ni_txseqs[tid]++; } else { *(u_int16_t *)wh->i_seq = - htole16(ni->ni_txseqs[0] << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseqs[0]++; + htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT); + ni->ni_txseqs[IEEE80211_NONQOS_TID]++; } if (key != NULL) { /*