From: Senthil Balasubramanian Date: Wed, 3 Feb 2010 17:20:18 +0000 (+0530) Subject: ath9k: configure the beacon only if the STA is associated X-Git-Tag: v2.6.33.2~49 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=7c74e3f2e97f7bdcb56b72919201af941ea0b4e6;p=unionfs-2.6.39.y.git ath9k: configure the beacon only if the STA is associated commit 1a20034a73a40b8056731f9db0c535cec2961eb7 upstream. beacons configuration SHOULD be done only if the STA is associated. Signed-off-by: Senthil Balasubramanian Signed-off-by: John W. Linville Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 06eaaa9ece6..20b1fd39451 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c @@ -573,6 +573,13 @@ static void ath_beacon_config_sta(struct ath_softc *sc, u64 tsf; int num_beacons, offset, dtim_dec_count, cfp_dec_count; + /* No need to configure beacon if we are not associated */ + if (!common->curaid) { + ath_print(common, ATH_DBG_BEACON, + "STA is not yet associated..skipping beacon config\n"); + return; + } + memset(&bs, 0, sizeof(bs)); intval = conf->beacon_interval & ATH9K_BEACON_PERIOD;