aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorDmitry TARNYAGIN <dmitry.tarnyagin@stericsson.com>2011-12-12 06:58:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-12-13 15:34:08 -0500
commitcd6c524e9e0b5ad8ce52bc3b4a3a1e272e3a8410 (patch)
treecae48d775941457913adf1547b729ffad8868f43 /net/mac80211/main.c
parent6539306b2c3ceafbc4094cf68c58094c282da053 (diff)
mac80211: Do not request FIF_BCN_PRBRESP_PROMISC for HW scan.
ieee80211_configure_filter code used local->scanning as a boolean value when it was a bit mask. Bits SCAN_COMPLETED, SCAN_ABORTED should not set FIF_BCN_PRBRESP_PROMISC filter. SCAN_HW_SCANNING should not set FIF_BCN_PRBRESP_PROMISC either, as there is no explicit filter configuration request from scan code. If a driver requires FIF_BCN_PRBRESP_PROMISC mode during HW scanning, it's up to the driver to temporary enable it. Similar mistake was fixed also in ieee80211_hw_config (power configuration code). Verified-by: Vitaly Wool <vitaly.wool@sonyericsson.com> Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 60198ac664a0..145583625718 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -47,7 +47,7 @@ void ieee80211_configure_filter(struct ieee80211_local *local)
47 if (atomic_read(&local->iff_allmultis)) 47 if (atomic_read(&local->iff_allmultis))
48 new_flags |= FIF_ALLMULTI; 48 new_flags |= FIF_ALLMULTI;
49 49
50 if (local->monitors || local->scanning) 50 if (local->monitors || test_bit(SCAN_SW_SCANNING, &local->scanning))
51 new_flags |= FIF_BCN_PRBRESP_PROMISC; 51 new_flags |= FIF_BCN_PRBRESP_PROMISC;
52 52
53 if (local->fif_probe_req || local->probe_req_reg) 53 if (local->fif_probe_req || local->probe_req_reg)
@@ -150,8 +150,8 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
150 changed |= IEEE80211_CONF_CHANGE_SMPS; 150 changed |= IEEE80211_CONF_CHANGE_SMPS;
151 } 151 }
152 152
153 if ((local->scanning & SCAN_SW_SCANNING) || 153 if (test_bit(SCAN_SW_SCANNING, &local->scanning) ||
154 (local->scanning & SCAN_HW_SCANNING)) 154 test_bit(SCAN_HW_SCANNING, &local->scanning))
155 power = chan->max_power; 155 power = chan->max_power;
156 else 156 else
157 power = local->power_constr_level ? 157 power = local->power_constr_level ?