diff options
author | sam <sam@FreeBSD.org> | 2007-03-11 07:06:08 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2007-03-11 07:06:08 +0000 |
commit | 72f9ecd769c7c8004a548a7783d3c451b65530bf (patch) | |
tree | edcb16028d696cab719964ffa387541c0c8fc3e5 /sys/net80211 | |
parent | f159bf3ace0da75328bc22d218c119bf4798493f (diff) | |
download | FreeBSD-src-72f9ecd769c7c8004a548a7783d3c451b65530bf.zip FreeBSD-src-72f9ecd769c7c8004a548a7783d3c451b65530bf.tar.gz |
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
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.c | 6 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.h | 1 | ||||
-rw-r--r-- | sys/net80211/ieee80211_output.c | 8 |
5 files changed, 11 insertions, 10 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 19a9b8b..8fad700 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 bba8c16..1f19ff5 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 074c32f..0408c33 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 a86f582..4af0185 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 5dd4aec..dc1984c 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) { /* |