aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/beacon.c
diff options
context:
space:
mode:
authorSenthil Balasubramanian <senthilkumar@atheros.com>2010-02-03 12:20:18 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-08 16:50:53 -0500
commit1a20034a73a40b8056731f9db0c535cec2961eb7 (patch)
treee64211e015baf1d53e4d26d12385ce0da8767364 /drivers/net/wireless/ath/ath9k/beacon.c
parent34e895075e21be3e21e71d6317440d1ee7969ad0 (diff)
ath9k: configure the beacon only if the STA is associated
beacons configuration SHOULD be done only if the STA is associated. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/beacon.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 422454fe4ff..d088ebfe63a 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -577,6 +577,13 @@ static void ath_beacon_config_sta(struct ath_softc *sc,
577 u64 tsf; 577 u64 tsf;
578 int num_beacons, offset, dtim_dec_count, cfp_dec_count; 578 int num_beacons, offset, dtim_dec_count, cfp_dec_count;
579 579
580 /* No need to configure beacon if we are not associated */
581 if (!common->curaid) {
582 ath_print(common, ATH_DBG_BEACON,
583 "STA is not yet associated..skipping beacon config\n");
584 return;
585 }
586
580 memset(&bs, 0, sizeof(bs)); 587 memset(&bs, 0, sizeof(bs));
581 intval = conf->beacon_interval & ATH9K_BEACON_PERIOD; 588 intval = conf->beacon_interval & ATH9K_BEACON_PERIOD;
582 589
@@ -739,7 +746,6 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif)
739 enum nl80211_iftype iftype; 746 enum nl80211_iftype iftype;
740 747
741 /* Setup the beacon configuration parameters */ 748 /* Setup the beacon configuration parameters */
742
743 if (vif) { 749 if (vif) {
744 struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; 750 struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
745 751