mwl8k: always apply configuration even when device is idle
authorJonas Gorski <jogo@openwrt.org>
Mon, 25 Mar 2013 15:39:54 +0000 (16:39 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 27 Mar 2013 17:37:37 +0000 (13:37 -0400)
Fix settings not being applied when the device is idle and the firmware
gets reloaded (because of changing from STA to AP mode). This caused
the device using the wrong channel (and likely band), e.g. a 5 GHz only
card still defaulted to channel 6 in the 2.4 GHz band when left
unconfigured.

This issue was always present, but only made visible with "mwl8k: Do not
call mwl8k_cmd_set_rf_channel unconditionally" (0f4316b9), since before
that the channel was (re-)configured at the next _config call even when
it did not change from the mac80211 perspective.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c

index 0640e7d7f0c2c06c0bee29b7009ebe472dd62095..956c1084ebf13ade0959fff0ad894a4910b60108 100644 (file)
@@ -4807,16 +4807,14 @@ static int mwl8k_config(struct ieee80211_hw *hw, u32 changed)
        struct mwl8k_priv *priv = hw->priv;
        int rc;
 
-       if (conf->flags & IEEE80211_CONF_IDLE) {
-               mwl8k_cmd_radio_disable(hw);
-               return 0;
-       }
-
        rc = mwl8k_fw_lock(hw);
        if (rc)
                return rc;
 
-       rc = mwl8k_cmd_radio_enable(hw);
+       if (conf->flags & IEEE80211_CONF_IDLE)
+               rc = mwl8k_cmd_radio_disable(hw);
+       else
+               rc = mwl8k_cmd_radio_enable(hw);
        if (rc)
                goto out;
 
This page took 0.049097 seconds and 5 git commands to generate.