aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2009-10-22 14:19:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-11-04 18:44:44 -0500
commit77165d8809cda1a77bc8752148a6252d7735c12e (patch)
treed5aa420b1e545487763c244aa91c21120da0397c
parent447ced07d04525218ae586cd70b759b48bcb1fc8 (diff)
mwl8k: enforce FIF_BCN_PRBRESP_PROMISC when no STA interfaces are active
When FIF_BCN_PRBRESP_PROMISC is not set, we enable the hardware's BSS filter so that we'll only see packets destined for our BSS. But if no STA interfaces have been configured, we would end up passing the BSSID 00:00:00:00:00:00 into the POST_SCAN command, which actually disables the hardware's BSS filter, as it's not a valid BSSID. Fix this by passing in 01:00:00:00:00:00 instead (the criterion is that the OUI part of the BSSID must be nonzero), and add comments to explain what PRE_SCAN and POST_SCAN do. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/mwl8k.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index cc58ecba211a..53447f6a0e54 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,
2705 return; 2705 return;
2706 2706
2707 if (changed_flags & FIF_BCN_PRBRESP_PROMISC) { 2707 if (changed_flags & FIF_BCN_PRBRESP_PROMISC) {
2708 if (*total_flags & FIF_BCN_PRBRESP_PROMISC) 2708 if (*total_flags & FIF_BCN_PRBRESP_PROMISC) {
2709 /*
2710 * Disable the BSS filter.
2711 */
2709 mwl8k_cmd_set_pre_scan(hw); 2712 mwl8k_cmd_set_pre_scan(hw);
2710 else { 2713 } else {
2711 u8 *bssid; 2714 u8 *bssid;
2712 2715
2713 bssid = "\x00\x00\x00\x00\x00\x00"; 2716 /*
2717 * Enable the BSS filter.
2718 *
2719 * If there is an active STA interface, use that
2720 * interface's BSSID, otherwise use a dummy one
2721 * (where the OUI part needs to be nonzero for
2722 * the BSSID to be accepted by POST_SCAN).
2723 */
2724 bssid = "\x01\x00\x00\x00\x00\x00";
2714 if (priv->vif != NULL) 2725 if (priv->vif != NULL)
2715 bssid = MWL8K_VIF(priv->vif)->bssid; 2726 bssid = MWL8K_VIF(priv->vif)->bssid;
2716 2727