提交 6d91e1d8 编写于 作者: B Bruno Randolf 提交者: David S. Miller

ath5k: configure backoff for IBSS beacon queue

in "11.1.2.2 Beacon generation in an IBSS" the IEEE802.11 standard says, each
STA should... "b) Calculate a random delay uniformly distributed in the range
between zero and twice aCWmin × aSlotTime,".

configure cwmin and cwmax of the beacon queue in IBSS mode according to this.
unfortunately beacon backoff does not work reliably yet, so i suspect we have a
problem somewhere else, since the same settings (and similar beacon timer
configuration) work for madwifi.

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD
Signed-off-by: NBruno Randolf <bruno@thinktube.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 036cd1ec
...@@ -1458,8 +1458,7 @@ ath5k_beaconq_config(struct ath5k_softc *sc) ...@@ -1458,8 +1458,7 @@ ath5k_beaconq_config(struct ath5k_softc *sc)
ret = ath5k_hw_get_tx_queueprops(ah, sc->bhalq, &qi); ret = ath5k_hw_get_tx_queueprops(ah, sc->bhalq, &qi);
if (ret) if (ret)
return ret; return ret;
if (sc->opmode == IEEE80211_IF_TYPE_AP || if (sc->opmode == IEEE80211_IF_TYPE_AP) {
sc->opmode == IEEE80211_IF_TYPE_IBSS) {
/* /*
* Always burst out beacon and CAB traffic * Always burst out beacon and CAB traffic
* (aifs = cwmin = cwmax = 0) * (aifs = cwmin = cwmax = 0)
...@@ -1467,8 +1466,19 @@ ath5k_beaconq_config(struct ath5k_softc *sc) ...@@ -1467,8 +1466,19 @@ ath5k_beaconq_config(struct ath5k_softc *sc)
qi.tqi_aifs = 0; qi.tqi_aifs = 0;
qi.tqi_cw_min = 0; qi.tqi_cw_min = 0;
qi.tqi_cw_max = 0; qi.tqi_cw_max = 0;
} else if (sc->opmode == IEEE80211_IF_TYPE_IBSS) {
/*
* Adhoc mode; backoff between 0 and (2 * cw_min).
*/
qi.tqi_aifs = 0;
qi.tqi_cw_min = 0;
qi.tqi_cw_max = 2 * ah->ah_cw_min;
} }
ATH5K_DBG(sc, ATH5K_DEBUG_BEACON,
"beacon queueprops tqi_aifs:%d tqi_cw_min:%d tqi_cw_max:%d\n",
qi.tqi_aifs, qi.tqi_cw_min, qi.tqi_cw_max);
ret = ath5k_hw_setup_tx_queueprops(ah, sc->bhalq, &qi); ret = ath5k_hw_setup_tx_queueprops(ah, sc->bhalq, &qi);
if (ret) { if (ret) {
ATH5K_ERR(sc, "%s: unable to update parameters for beacon " ATH5K_ERR(sc, "%s: unable to update parameters for beacon "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册