ath9k: Make sure we configure a non-zero beacon interval
This patch moves the sanity check on beacon interval which was done only for mesh mode to all operating modes just to be safe. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
e0d6133cba
commit
c4f9f16b30
1 changed files with 8 additions and 7 deletions
|
@ -674,13 +674,6 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
|
||||||
|
|
||||||
intval = conf->beacon_interval & ATH9K_BEACON_PERIOD;
|
intval = conf->beacon_interval & ATH9K_BEACON_PERIOD;
|
||||||
|
|
||||||
/*
|
|
||||||
* It looks like mac80211 may end up using beacon interval of zero in
|
|
||||||
* some cases (at least for mesh point). Avoid getting into an
|
|
||||||
* infinite loop by using a bit safer value instead..
|
|
||||||
*/
|
|
||||||
if (intval == 0)
|
|
||||||
intval = 100;
|
|
||||||
|
|
||||||
/* Pull nexttbtt forward to reflect the current TSF */
|
/* Pull nexttbtt forward to reflect the current TSF */
|
||||||
|
|
||||||
|
@ -745,6 +738,14 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif)
|
||||||
iftype = sc->sc_ah->opmode;
|
iftype = sc->sc_ah->opmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* It looks like mac80211 may end up using beacon interval of zero in
|
||||||
|
* some cases (at least for mesh point). Avoid getting into an
|
||||||
|
* infinite loop by using a bit safer value instead. To be safe,
|
||||||
|
* do sanity check on beacon interval for all operating modes.
|
||||||
|
*/
|
||||||
|
if (cur_conf->beacon_interval == 0)
|
||||||
|
cur_conf->beacon_interval = 100;
|
||||||
|
|
||||||
switch (iftype) {
|
switch (iftype) {
|
||||||
case NL80211_IFTYPE_AP:
|
case NL80211_IFTYPE_AP:
|
||||||
|
|
Loading…
Reference in a new issue