keep tx/rx seq #'s for non-QoS traffic separate from QoS; stations

aren't supposed mix traffic but if they did frames might be mis-handled

Obtained from:	Atheros
MFC after:	2 weeks
This commit is contained in:
Sam Leffler 2007-03-11 07:06:08 +00:00
parent 0adf0a3b3e
commit 801df4a58c
5 changed files with 11 additions and 10 deletions

View File

@ -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])) {

View File

@ -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))

View File

@ -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);

View File

@ -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 */

View File

@ -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) {
/*