]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ath9k: configure the beacon only if the STA is associated
authorSenthil Balasubramanian <senthilkumar@atheros.com>
Wed, 3 Feb 2010 17:20:18 +0000 (22:50 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Feb 2010 21:50:53 +0000 (16:50 -0500)
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>
drivers/net/wireless/ath/ath9k/beacon.c

index 422454fe4ff0b199b98e7b2e8ae75f653a22f8c6..d088ebfe63a6c843fe6d193210b2bb4f465ca0dd 100644 (file)
@@ -577,6 +577,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;
 
@@ -739,7 +746,6 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif)
        enum nl80211_iftype iftype;
 
        /* Setup the beacon configuration parameters */
-
        if (vif) {
                struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;