Search Linux Wireless

Re: [PATCH] mac80211: Do not request FIF_BCN_PRBRESP_PROMISC for HW scan.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2011-12-11 at 22:47 +0100, Dmitry Tarnyagin wrote:
> ieee80211_configure_filter code used local->scanning as a boolean value
> when it was a bit mask. Bits SCAN_HW_SCANNING, SCAN_COMPLETED, SCAN_ABORTED
> should not set FIF_BCN_PRBRESP_PROMISC filter.
> 
> Similar mistake was fixed also in ieee80211_hw_config (power
> configuration code).

Seems right -- although the probresp-promisc filter thing is debatable
and I think the changelog should be more explicit about it, maybe saying
that the driver can always change that by itself in the hw scan callback
if it requires it... That part isn't really only bugfix, it's a semantic
change.

The second part, yeah, obviously.

johannes

> Verified-by: Vitaly Wool <vitaly.wool@sonyeric­sson.com>
> Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@xxxxxxxxxxxxxx>
> ---
>  net/mac80211/main.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
> index cae4435..54f78ab 100644
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -47,7 +47,7 @@ void ieee80211_configure_filter(struct ieee80211_local *local)
>  	if (atomic_read(&local->iff_allmultis))
>  		new_flags |= FIF_ALLMULTI;
> 
> -	if (local->monitors || local->scanning)
> +	if (local->monitors || test_bit(SCAN_SW_SCANNING, &local->scanning))
>  		new_flags |= FIF_BCN_PRBRESP_PROMISC;
> 
>  	if (local->fif_probe_req || local->probe_req_reg)
> @@ -193,8 +193,8 @@ int ieee80211_hw_config(struct ieee80211_local
> *local, u32 changed)
>  		changed |= IEEE80211_CONF_CHANGE_SMPS;
>  	}
> 
> -	if ((local->scanning & SCAN_SW_SCANNING) ||
> -	    (local->scanning & SCAN_HW_SCANNING))
> +	if (test_bit(SCAN_SW_SCANNING, &local->scanning) ||
> +	    test_bit(SCAN_HW_SCANNING, &local->scanning))
>  		power = chan->max_power;
>  	else
>  		power = local->power_constr_level ?


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux