PERFORCE change 135481 for review
Sepherosa Ziehau
sephe at FreeBSD.org
Sat Feb 16 00:37:24 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=135481
Change 135481 by sephe at sephe_zealot:sam_wifi on 2008/02/16 08:36:49
Don't claim that we are successful with the current rate picked up by
amrr even if all transmission at the current rate failed.
Affected files ...
.. //depot/projects/wifi/sys/dev/bwi/if_bwi.c#21 edit
Differences ...
==== //depot/projects/wifi/sys/dev/bwi/if_bwi.c#21 (text+ko) ====
@@ -3018,9 +3018,16 @@
else if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) {
rate = ni->ni_rates.rs_rates[ni->ni_txrate] &
IEEE80211_RATE_VAL;
- rate_fb = (ni->ni_txrate > 0) ?
- ni->ni_rates.rs_rates[ni->ni_txrate-1] &
- IEEE80211_RATE_VAL : rate;
+ tb->tb_rate_idx[0] = ni->ni_txrate;
+
+ if (ni->ni_txrate > 0) {
+ rate_fb = ni->ni_rates.rs_rates[ni->ni_txrate - 1] &
+ IEEE80211_RATE_VAL;
+ tb->tb_rate_idx[1] = ni->ni_txrate - 1;
+ } else {
+ rate_fb = rate;
+ tb->tb_rate_idx[1] = tb->tb_rate_idx[0];
+ }
} else
rate = rate_fb = ic->ic_fixed_rate;
@@ -3240,7 +3247,9 @@
/* NB: update rate control only for unicast frames */
if (hdr->txh_mac_ctrl & htole32(BWI_TXH_MAC_C_ACK)) {
/* Feed back 'acked and data_txcnt' */
- if (acked)
+ if (acked &&
+ (data_txcnt <= BWI_SHRETRY_FB ||
+ tb->tb_rate_idx[0] == tb->tb_rate_idx[1]))
bn->amn.amn_success++;
bn->amn.amn_txcnt++;
bn->amn.amn_retrycnt += data_txcnt-1;
More information about the p4-projects
mailing list