fix setting of ni_txrate

Submitted by:	"Paul B. Mahol" <onemda@gmail.com>
This commit is contained in:
sam 2009-06-02 20:32:13 +00:00
parent 6e92f3bfaa
commit ab3c199d02

View File

@ -2727,31 +2727,7 @@ ndis_getstate_80211(sc)
if (rval)
device_printf (sc->ndis_dev, "get link speed failed: %d\n",
rval);
if (isset(ic->ic_modecaps, IEEE80211_MODE_11B)) {
ni->ni_rates = ic->ic_sup_rates[IEEE80211_MODE_11B];
for (i = 0; i < ni->ni_rates.rs_nrates; i++) {
if ((ni->ni_rates.rs_rates[i] &
IEEE80211_RATE_VAL) == arg / 5000)
break;
}
}
if (i == ni->ni_rates.rs_nrates &&
isset(ic->ic_modecaps, IEEE80211_MODE_11G)) {
ni->ni_rates = ic->ic_sup_rates[IEEE80211_MODE_11G];
for (i = 0; i < ni->ni_rates.rs_nrates; i++) {
if ((ni->ni_rates.rs_rates[i] &
IEEE80211_RATE_VAL) == arg / 5000)
break;
}
}
if (i == ni->ni_rates.rs_nrates)
device_printf(sc->ndis_dev, "no matching rate for: %d\n",
arg / 5000);
else
ni->ni_txrate = i;
ni->ni_txrate = arg / 5000;
if (ic->ic_caps & IEEE80211_C_PMGT) {
len = sizeof(arg);