ath9k: Fix improper beacon slot selection in IBSS

Request a re-configuration of Beacon related timers
on the receipt of the first Beacon frame has to be set only
for station mode. Setting beacon sync for IBSS is causing
wrong beacon slot selection on beacon generation.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Rajkumar Manoharan 2011-04-12 17:29:29 +05:30 committed by John W. Linville
parent dfa8fc69d9
commit 10add41f2b
1 changed files with 6 additions and 1 deletions

View File

@ -744,7 +744,6 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif)
cur_conf->dtim_period = 1; cur_conf->dtim_period = 1;
ath_set_beacon(sc); ath_set_beacon(sc);
sc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON;
} }
void ath_set_beacon(struct ath_softc *sc) void ath_set_beacon(struct ath_softc *sc)
@ -762,6 +761,12 @@ void ath_set_beacon(struct ath_softc *sc)
break; break;
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
ath_beacon_config_sta(sc, cur_conf); ath_beacon_config_sta(sc, cur_conf);
/*
* Request a re-configuration of Beacon related timers
* on the receipt of the first Beacon frame (i.e.,
* after time sync with the AP).
*/
sc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON;
break; break;
default: default:
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, ATH_DBG_CONFIG,