aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2008-09-21 22:22:28 +0000
committerSam Leffler <sam@FreeBSD.org>2008-09-21 22:22:28 +0000
commitc5f9511e911d7cc25a8733700d7ba70dda98c2b4 (patch)
tree89f86a5736c6626913aa13c49cc21830e10db021
parent40808af3aa5362edbd533a0d3d3d839d29187b09 (diff)
downloadsrc-c5f9511e911d7cc25a8733700d7ba70dda98c2b4.tar.gz
src-c5f9511e911d7cc25a8733700d7ba70dda98c2b4.zip
Cleanup starting seq# for tx ampdu:
o use txa_start to form the addba request and purge txa_seqstart o fill txa_start before calling ic_addba_request to permit drivers to override when they handle seq# generation (e.g. mwl)
Notes
Notes: svn path=/head/; revision=183245
-rw-r--r--sys/net80211/ieee80211_ddb.c4
-rw-r--r--sys/net80211/ieee80211_ht.c8
-rw-r--r--sys/net80211/ieee80211_ht.h4
3 files changed, 9 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c
index 87a673791856..7f5aea6575a2 100644
--- a/sys/net80211/ieee80211_ddb.c
+++ b/sys/net80211/ieee80211_ddb.c
@@ -215,9 +215,9 @@ _db_show_txampdu(const char *sep, int ix, const struct ieee80211_tx_ampdu *tap)
{
db_printf("%stxampdu[%d]: %p flags %b ac %u\n",
sep, ix, tap, tap->txa_flags, IEEE80211_AGGR_BITS, tap->txa_ac);
- db_printf("%s token %u qbytes %d qframes %d seqstart %u start %u wnd %u\n",
+ db_printf("%s token %u qbytes %d qframes %d start %u wnd %u\n",
sep, tap->txa_token, tap->txa_qbytes, tap->txa_qframes,
- tap->txa_seqstart, tap->txa_start, tap->txa_wnd);
+ tap->txa_start, tap->txa_wnd);
db_printf("%s attempts %d nextrequest %d\n",
sep, tap->txa_attempts, tap->txa_nextrequest);
/* XXX packet q + timer */
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index ad64de3b27dc..2304bc47cada 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -1337,7 +1337,7 @@ ieee80211_addba_request(struct ieee80211_node *ni,
/* XXX locking */
tap->txa_token = dialogtoken;
tap->txa_flags |= IEEE80211_AGGR_IMMEDIATE;
- tap->txa_start = tap->txa_seqstart = 0;
+ tap->txa_start = 0;
bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ);
tap->txa_wnd = (bufsiz == 0) ?
IEEE80211_AGGR_BAWMAX : min(bufsiz, IEEE80211_AGGR_BAWMAX);
@@ -1679,6 +1679,8 @@ ieee80211_ampdu_request(struct ieee80211_node *ni,
tap->txa_flags &= ~IEEE80211_AGGR_NAK;
dialogtoken = (tokens+1) % 63; /* XXX */
+ tid = WME_AC_TO_TID(tap->txa_ac);
+ tap->txa_start = ni->ni_txseqs[tid];
tid = WME_AC_TO_TID(tap->txa_ac);
args[0] = dialogtoken;
@@ -1701,8 +1703,8 @@ ieee80211_ampdu_request(struct ieee80211_node *ni,
return 0;
}
tokens = dialogtoken; /* allocate token */
- /* NB: after calling ic_addba_request so driver can set seqstart */
- args[3] = SM(tap->txa_seqstart, IEEE80211_BASEQ_START)
+ /* NB: after calling ic_addba_request so driver can set txa_start */
+ args[3] = SM(tap->txa_start, IEEE80211_BASEQ_START)
| SM(0, IEEE80211_BASEQ_FRAG)
;
return ic->ic_send_action(ni, IEEE80211_ACTION_CAT_BA,
diff --git a/sys/net80211/ieee80211_ht.h b/sys/net80211/ieee80211_ht.h
index fe1c15d4ce02..beaab183b3de 100644
--- a/sys/net80211/ieee80211_ht.h
+++ b/sys/net80211/ieee80211_ht.h
@@ -51,8 +51,8 @@ struct ieee80211_tx_ampdu {
int txa_avgpps; /* filtered traffic over window */
int txa_qbytes; /* data queued (bytes) */
short txa_qframes; /* data queued (frames) */
- ieee80211_seq txa_seqstart;
- ieee80211_seq txa_start;
+ ieee80211_seq txa_start; /* BA window left edge */
+ ieee80211_seq txa_seqpending; /* new txa_start pending BAR response */
uint16_t txa_wnd; /* BA window size */
uint8_t txa_attempts; /* # ADDBA requests w/o a response */
int txa_nextrequest;/* soonest to make next ADDBA request */