]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 23:01:57 +0000 (16:01 -0700)
commit 1a20034a73a40b8056731f9db0c535cec2961eb7 upstream.

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>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/beacon.c

index 06eaaa9ece6b37d7a876687cd5e45109f42e3830..20b1fd39451d1cdfbb3913d572b1ac28a0fb49ce 100644 (file)
@@ -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;