wl12xx: make WL1271_FLAG_IBSS_JOINED flag per-vif
authorEliad Peller <eliad@wizery.com>
Mon, 10 Oct 2011 08:13:01 +0000 (10:13 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 11 Oct 2011 12:09:57 +0000 (15:09 +0300)
This flag should be set per-vif, rather than globally.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/scan.c
drivers/net/wireless/wl12xx/tx.c
drivers/net/wireless/wl12xx/wl12xx.h

index d91e8bcccaaa2da657653d19e5070cbeeca32516..ac5be73234052be7ece17cf935ece36965f9b750 100644 (file)
@@ -3494,11 +3494,11 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
 
        if (changed & BSS_CHANGED_IBSS) {
                if (bss_conf->ibss_joined) {
-                       set_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags);
+                       set_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags);
                        ibss_joined = true;
                } else {
-                       if (test_and_clear_bit(WL1271_FLAG_IBSS_JOINED,
-                                              &wl->flags)) {
+                       if (test_and_clear_bit(WLVIF_FLAG_IBSS_JOINED,
+                                              &wlvif->flags)) {
                                wl1271_unjoin(wl, wlvif);
                                wl12xx_cmd_role_start_dev(wl, wlvif);
                                wl12xx_roc(wl, wlvif->dev_role_id);
index 687f59b871ef45cc3bba62b7f1acc6d0ce842ce6..765f08ba29afe63147f3ee8ff0a1b1989d73571c 100644 (file)
@@ -73,7 +73,7 @@ void wl1271_scan_complete_work(struct work_struct *work)
        is_sta = (wlvif->bss_type == BSS_TYPE_STA_BSS);
        is_ibss = (wlvif->bss_type == BSS_TYPE_IBSS);
        if (((is_sta && !test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags)) ||
-            (is_ibss && !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags))) &&
+            (is_ibss && !test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags))) &&
            !test_bit(wlvif->dev_role_id, wl->roc_map)) {
                /* restore remain on channel */
                wl12xx_cmd_role_start_dev(wl, wlvif);
index bbb101b5de0c04bb1e0bdba99947136be84e1280..8965fd1384dd4fa03ed1dd71604e49f0f65b7888 100644 (file)
@@ -193,7 +193,7 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
        wl1271_tx_update_filters(wl, wlvif, skb);
 
        if ((test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) ||
-            test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags)) &&
+            test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags)) &&
            !ieee80211_is_auth(hdr->frame_control) &&
            !ieee80211_is_assoc_req(hdr->frame_control))
                return wlvif->sta.hlid;
index efb35a66fa5e640bf3954c766a77108786fff5db..489c20555dffff762cc4f776827b5530441b6214 100644 (file)
@@ -313,7 +313,6 @@ struct wl1271_ap_key {
 };
 
 enum wl12xx_flags {
-       WL1271_FLAG_IBSS_JOINED,
        WL1271_FLAG_GPIO_POWER,
        WL1271_FLAG_TX_QUEUE_STOPPED,
        WL1271_FLAG_TX_PENDING,
@@ -339,6 +338,7 @@ enum wl12xx_flags {
 
 enum wl12xx_vif_flags {
        WLVIF_FLAG_STA_ASSOCIATED,
+       WLVIF_FLAG_IBSS_JOINED,
 };
 
 struct wl1271_link {