MFp4:
change ath_rate_ctl_reset to handle transition from station mode to adhoc mode; was not resetting the initial xmit rate causing outbound frames to be dicarded
This commit is contained in:
parent
50ac3f9939
commit
310e4a4ae6
@ -2565,20 +2565,13 @@ ath_rate_ctl_reset(struct ath_softc *sc, enum ieee80211_state state)
|
||||
struct ieee80211_node *ni;
|
||||
struct ath_node *an;
|
||||
|
||||
an = (struct ath_node *) ic->ic_bss;
|
||||
an->an_tx_ok = an->an_tx_err = an->an_tx_retr = an->an_tx_upper = 0;
|
||||
if (ic->ic_opmode == IEEE80211_M_STA) {
|
||||
ni = ic->ic_bss;
|
||||
if (state == IEEE80211_S_RUN) {
|
||||
/* start with highest negotiated rate */
|
||||
KASSERT(ni->ni_rates.rs_nrates > 0,
|
||||
("transition to RUN state w/ no rates!"));
|
||||
ni->ni_txrate = ni->ni_rates.rs_nrates - 1;
|
||||
} else {
|
||||
/* use lowest rate */
|
||||
ni->ni_txrate = 0;
|
||||
}
|
||||
} else {
|
||||
if (ic->ic_opmode != IEEE80211_M_STA) {
|
||||
/*
|
||||
* When operating as a station the node table holds
|
||||
* the AP's that were discovered during scanning.
|
||||
* For any other operating mode we want to reset the
|
||||
* tx rate state of each node.
|
||||
*/
|
||||
TAILQ_FOREACH(ni, &ic->ic_node, ni_list) {
|
||||
ni->ni_txrate = 0; /* use lowest rate */
|
||||
an = (struct ath_node *) ni;
|
||||
@ -2586,6 +2579,22 @@ ath_rate_ctl_reset(struct ath_softc *sc, enum ieee80211_state state)
|
||||
an->an_tx_upper = 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Reset local xmit state; this is really only meaningful
|
||||
* when operating in station or adhoc mode.
|
||||
*/
|
||||
ni = ic->ic_bss;
|
||||
an = (struct ath_node *) ni;
|
||||
an->an_tx_ok = an->an_tx_err = an->an_tx_retr = an->an_tx_upper = 0;
|
||||
if (state == IEEE80211_S_RUN) {
|
||||
/* start with highest negotiated rate */
|
||||
KASSERT(ni->ni_rates.rs_nrates > 0,
|
||||
("transition to RUN state w/ no rates!"));
|
||||
ni->ni_txrate = ni->ni_rates.rs_nrates - 1;
|
||||
} else {
|
||||
/* use lowest rate */
|
||||
ni->ni_txrate = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user