From owner-p4-projects@FreeBSD.ORG Fri Sep 12 04:34:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E27511065674; Fri, 12 Sep 2008 04:34:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5D5E106564A for ; Fri, 12 Sep 2008 04:34:25 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 93DC98FC1D for ; Fri, 12 Sep 2008 04:34:25 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m8C4YPDw067040 for ; Fri, 12 Sep 2008 04:34:25 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8C4YP47067037 for perforce@freebsd.org; Fri, 12 Sep 2008 04:34:25 GMT (envelope-from sam@freebsd.org) Date: Fri, 12 Sep 2008 04:34:25 GMT Message-Id: <200809120434.m8C4YP47067037@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 149638 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 04:34:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=149638 Change 149638 by sam@sam_ebb on 2008/09/12 04:34:14 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) Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ddb.c#27 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.c#52 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.h#22 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ddb.c#27 (text+ko) ==== @@ -215,9 +215,9 @@ { 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 */ ==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#52 (text+ko) ==== @@ -1496,7 +1496,6 @@ /* XXX locking */ tap->txa_token = dialogtoken; tap->txa_flags |= IEEE80211_AGGR_IMMEDIATE; - tap->txa_start = tap->txa_seqstart = 0; bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); tap->txa_wnd = (bufsiz == 0) ? IEEE80211_AGGR_BAWMAX : min(bufsiz, IEEE80211_AGGR_BAWMAX); @@ -1525,7 +1524,6 @@ IEEE80211_AGGR_BAWMAX : min(bufsiz, IEEE80211_AGGR_BAWMAX); /* XXX AC/TID */ tid = MS(baparamset, IEEE80211_BAPS_TID); - tap->txa_seqstart = tap->txa_start = ni->ni_txseqs[tid]; tap->txa_flags |= IEEE80211_AGGR_RUNNING; tap->txa_attempts = 0; } else { @@ -1857,8 +1855,9 @@ 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; args[1] = IEEE80211_BAPS_POLICY_IMMEDIATE | SM(tid, IEEE80211_BAPS_TID) @@ -1879,8 +1878,8 @@ 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, ==== //depot/projects/vap/sys/net80211/ieee80211_ht.h#22 (text+ko) ==== @@ -53,9 +53,8 @@ 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_seqpending; /* new start pending BAR response */ + 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/BAR requests w/o a response*/ int txa_nextrequest;/* soonest to make next request */