From patchwork Thu Oct 22 18:21:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lennert Buytenhek X-Patchwork-Id: 55433 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9MIsVsB009125 for ; Thu, 22 Oct 2009 18:54:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756656AbZJVSyR (ORCPT ); Thu, 22 Oct 2009 14:54:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756588AbZJVSxt (ORCPT ); Thu, 22 Oct 2009 14:53:49 -0400 Received: from fw.wantstofly.org ([80.101.37.227]:59617 "EHLO mail.wantstofly.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755323AbZJVSxs (ORCPT ); Thu, 22 Oct 2009 14:53:48 -0400 Received: by mail.wantstofly.org (Postfix, from userid 500) id B1D5D18E251; Thu, 22 Oct 2009 20:21:38 +0200 (CEST) Date: Thu, 22 Oct 2009 20:21:38 +0200 From: Lennert Buytenhek To: linux-wireless@vger.kernel.org Subject: [PATCH 25/28] mwl8k: add AP firmware handling to ->start() Message-ID: <20091022182138.GA1583@mail.wantstofly.org> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 815f73f..b2c68b2 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -2712,12 +2712,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); @@ -2725,9 +2730,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); }