ath9k_htc: add ATH_OP_PRIM_STA_VIF
authorOleksij Rempel <linux@rempel-privat.de>
Sat, 1 Mar 2014 20:15:50 +0000 (21:15 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 17 Mar 2014 17:13:06 +0000 (13:13 -0400)
we will need it to make common-beacon code work.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/htc_drv_main.c

index 6e17c08..b82a7c4 100644 (file)
@@ -1478,6 +1478,7 @@ static void ath9k_htc_bss_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
                common->curaid = bss_conf->aid;
                common->last_rssi = ATH_RSSI_DUMMY_MARKER;
                memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
+               set_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags);
        }
 }
 
@@ -1510,6 +1511,9 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
                bss_conf->assoc ?
                        priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--;
 
+               if (!bss_conf->assoc)
+                       clear_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags);
+
                if (priv->ah->opmode == NL80211_IFTYPE_STATION) {
                        ath9k_htc_choose_set_bssid(priv);
                        if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1))