wl12xx: configure channel/band while FW is off
authorArik Nemtsov <arik@wizery.com>
Tue, 22 Mar 2011 08:07:47 +0000 (10:07 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 19 Apr 2011 13:49:13 +0000 (16:49 +0300)
Initialize the channel and band from mac80211 conf even when the FW is
not yet loaded. This mitigates a bug in AP-mode where the channel was
never changed from its initial setting after FW boot and was therefore
never configured to FW.

Reported-by: Alexander Boukaty <alexanderb@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/main.c

index 9663326..5545c3b 100644 (file)
@@ -1706,7 +1706,12 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
        mutex_lock(&wl->mutex);
 
        if (unlikely(wl->state == WL1271_STATE_OFF)) {
-               ret = -EAGAIN;
+               /* we support configuring the channel and band while off */
+               if ((changed & IEEE80211_CONF_CHANGE_CHANNEL)) {
+                       wl->band = conf->channel->band;
+                       wl->channel = channel;
+               }
+
                goto out;
        }