mwl8k: add AP firmware handling to ->start()
authorLennert Buytenhek <buytenh@wantstofly.org>
Thu, 22 Oct 2009 18:21:38 +0000 (20:21 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 6 Nov 2009 21:54:40 +0000 (16:54 -0500)
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c

index 19c6bea1bc481558e5fa0d0707321fa483e086a6..1c4114f8d317066ea56f26038cdd569e235defaf 100644 (file)
@@ -2713,12 +2713,17 @@ static int mwl8k_start(struct ieee80211_hw *hw)
        if (!rc) {
                rc = mwl8k_cmd_802_11_radio_enable(hw);
 
-               if (!rc)
-                       rc = mwl8k_cmd_set_pre_scan(hw);
+               if (!priv->ap_fw) {
+                       if (!rc)
+                               rc = mwl8k_enable_sniffer(hw, 0);
 
-               if (!rc)
-                       rc = mwl8k_cmd_set_post_scan(hw,
-                                       "\x00\x00\x00\x00\x00\x00");
+                       if (!rc)
+                               rc = mwl8k_cmd_set_pre_scan(hw);
+
+                       if (!rc)
+                               rc = mwl8k_cmd_set_post_scan(hw,
+                                               "\x00\x00\x00\x00\x00\x00");
+               }
 
                if (!rc)
                        rc = mwl8k_cmd_setrateadaptmode(hw, 0);
@@ -2726,9 +2731,6 @@ static int mwl8k_start(struct ieee80211_hw *hw)
                if (!rc)
                        rc = mwl8k_set_wmm(hw, 0);
 
-               if (!rc)
-                       rc = mwl8k_enable_sniffer(hw, 0);
-
                mwl8k_fw_unlock(hw);
        }