Date: Sat, 16 Feb 2008 08:37:23 GMT From: Sepherosa Ziehau <sephe@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 135481 for review Message-ID: <200802160837.m1G8bNwJ003106@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135481 Change 135481 by sephe@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802160837.m1G8bNwJ003106>