From patchwork Thu Oct 22 18:19:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lennert Buytenhek X-Patchwork-Id: 55406 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 n9MIbJ2k005612 for ; Thu, 22 Oct 2009 18:37:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756573AbZJVShM (ORCPT ); Thu, 22 Oct 2009 14:37:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756567AbZJVShL (ORCPT ); Thu, 22 Oct 2009 14:37:11 -0400 Received: from fw.wantstofly.org ([80.101.37.227]:49152 "EHLO mail.wantstofly.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755036AbZJVShI (ORCPT ); Thu, 22 Oct 2009 14:37:08 -0400 Received: by mail.wantstofly.org (Postfix, from userid 500) id 960F718E23E; Thu, 22 Oct 2009 20:19:53 +0200 (CEST) Date: Thu, 22 Oct 2009 20:19:53 +0200 From: Lennert Buytenhek To: linux-wireless@vger.kernel.org Subject: [PATCH 07/28] mwl8k: enforce FIF_BCN_PRBRESP_PROMISC when no STA interfaces are active Message-ID: <20091022181953.GI1583@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 cc58ecb..53447f6 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -2705,12 +2705,23 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw, return; if (changed_flags & FIF_BCN_PRBRESP_PROMISC) { - if (*total_flags & FIF_BCN_PRBRESP_PROMISC) + if (*total_flags & FIF_BCN_PRBRESP_PROMISC) { + /* + * Disable the BSS filter. + */ mwl8k_cmd_set_pre_scan(hw); - else { + } else { u8 *bssid; - bssid = "\x00\x00\x00\x00\x00\x00"; + /* + * Enable the BSS filter. + * + * If there is an active STA interface, use that + * interface's BSSID, otherwise use a dummy one + * (where the OUI part needs to be nonzero for + * the BSSID to be accepted by POST_SCAN). + */ + bssid = "\x01\x00\x00\x00\x00\x00"; if (priv->vif != NULL) bssid = MWL8K_VIF(priv->vif)->bssid;