wl1251: Prepare for idle mode support
[pandora-wifi.git] / drivers / net / wireless / wl12xx / wl1251_main.c
index fcc6829..8ca7901 100644 (file)
 #include "wl1251_debugfs.h"
 #include "wl1251_boot.h"
 
+/* HACK */
+#ifndef FIF_PROBE_REQ
+#define FIF_PROBE_REQ 0
+#endif
+
 void wl1251_enable_interrupts(struct wl1251 *wl)
 {
        wl->if_ops->enable_irq(wl);
@@ -535,7 +540,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)
        wl->rx_last_id = 0;
        wl->next_tx_complete = 0;
        wl->elp = false;
-       wl->psm = 0;
+       wl->station_mode = STATION_ACTIVE_MODE;
        wl->tx_queue_stopped = false;
        wl->power_level = WL1251_DEFAULT_POWER_LEVEL;
        wl->channel = WL1251_DEFAULT_CHANNEL;
@@ -680,7 +685,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
 
                wl->psm_requested = false;
 
-               if (wl->psm) {
+               if (wl->station_mode != STATION_ACTIVE_MODE) {
                        ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE);
                        if (ret < 0)
                                goto out_sleep;
@@ -1393,7 +1398,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void)
        wl->rx_config = WL1251_DEFAULT_RX_CONFIG;
        wl->rx_filter = WL1251_DEFAULT_RX_FILTER;
        wl->elp = false;
-       wl->psm = 0;
+       wl->station_mode = STATION_ACTIVE_MODE;
        wl->psm_requested = false;
        wl->tx_queue_stopped = false;
        wl->power_level = WL1251_DEFAULT_POWER_LEVEL;