wl12xx: make WL1271_FLAG_PSPOLL_FAILURE flag per-vif
authorEliad Peller <eliad@wizery.com>
Mon, 10 Oct 2011 08:13:07 +0000 (10:13 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 11 Oct 2011 12:12:12 +0000 (15:12 +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/event.c
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/wl12xx.h

index d8b183bba52ba82304dafef1ea4429e5efea0a29..1f60a1f6335ef3c331708c721c5c7b7b43e6a7d6 100644 (file)
@@ -49,7 +49,7 @@ void wl1271_pspoll_work(struct work_struct *work)
        if (unlikely(wl->state == WL1271_STATE_OFF))
                goto out;
 
-       if (!test_and_clear_bit(WL1271_FLAG_PSPOLL_FAILURE, &wl->flags))
+       if (!test_and_clear_bit(WLVIF_FLAG_PSPOLL_FAILURE, &wlvif->flags))
                goto out;
 
        if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
@@ -89,7 +89,7 @@ static void wl1271_event_pspoll_delivery_fail(struct wl1271 *wl,
                                         wlvif->basic_rate, true);
                if (ret < 0)
                        return;
-               set_bit(WL1271_FLAG_PSPOLL_FAILURE, &wl->flags);
+               set_bit(WLVIF_FLAG_PSPOLL_FAILURE, &wlvif->flags);
                ieee80211_queue_delayed_work(wl->hw, &wlvif->pspoll_work,
                                             msecs_to_jiffies(delay));
        }
index fb5951cb69e14b4f0ffa898b6f1a6c4c59bc9ba3..73973b4fc57fa89f5243f22d489be43b2bb565ad 100644 (file)
@@ -2524,7 +2524,7 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
         * incorrectly changed after the pspoll failure active window.
         */
        if (changed & IEEE80211_CONF_CHANGE_PS)
-               clear_bit(WL1271_FLAG_PSPOLL_FAILURE, &wl->flags);
+               clear_bit(WLVIF_FLAG_PSPOLL_FAILURE, &wlvif->flags);
 
        if (conf->flags & IEEE80211_CONF_PS &&
            !test_bit(WLVIF_FLAG_PSM_REQUESTED, &wlvif->flags)) {
index 740a9b19cea1114c53c81bc51eda78232dfc209d..bf410f8d01cb0ccc37bd235f73d218acda60dcf4 100644 (file)
@@ -320,7 +320,6 @@ enum wl12xx_flags {
        WL1271_FLAG_ELP_REQUESTED,
        WL1271_FLAG_IRQ_RUNNING,
        WL1271_FLAG_IDLE,
-       WL1271_FLAG_PSPOLL_FAILURE,
        WL1271_FLAG_FW_TX_BUSY,
        WL1271_FLAG_DUMMY_PACKET_PENDING,
        WL1271_FLAG_SUSPENDED,
@@ -339,6 +338,7 @@ enum wl12xx_vif_flags {
        WLVIF_FLAG_PSM_REQUESTED,
        WLVIF_FLAG_STA_STATE_SENT,
        WLVIF_FLAG_RX_STREAMING_STARTED,
+       WLVIF_FLAG_PSPOLL_FAILURE,
 };
 
 struct wl1271_link {