Search Linux Wireless

Re: [PATCH] mac80211: prevent tuning during scanning

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

 



On Thu, 2008-03-20 at 08:14 -0700, Reinette Chatre wrote:
> From: Mohamed Abbas <mohamed.abbas@xxxxxxxxx>
> 
> Postpone calling ieee80211_hw_config if hardware scanning is active.
> This is similar to solution for software scanning where channel setting
> is delayed until scan complete.
> 
> Signed-off-by: Mohamed Abbas <mohamed.abbas@xxxxxxxxx>
> Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>

Fine with me.

Acked-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

> ---
> Resend of patch "iwlwifi: prevent tuning during scanning" with
> corrected title.
> 
>  net/mac80211/ieee80211_ioctl.c |    2 +-
>  net/mac80211/ieee80211_sta.c   |    3 +++
>  2 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
> index 1d91575..83b79c9 100644
> --- a/net/mac80211/ieee80211_ioctl.c
> +++ b/net/mac80211/ieee80211_ioctl.c
> @@ -308,7 +308,7 @@ int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz)
>  	}
>  
>  	if (set) {
> -		if (local->sta_sw_scanning)
> +		if (local->sta_sw_scanning || local->sta_hw_scanning)
>  			ret = 0;
>  		else
>  			ret = ieee80211_hw_config(local);
> diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
> index 4255ec4..1e9650e 100644
> --- a/net/mac80211/ieee80211_sta.c
> +++ b/net/mac80211/ieee80211_sta.c
> @@ -3609,6 +3609,9 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
>  
>  	if (local->sta_hw_scanning) {
>  		local->sta_hw_scanning = 0;
> +		if (ieee80211_hw_config(local))
> +			printk(KERN_DEBUG "%s: failed to restore operational "
> +			       "channel after scan\n", dev->name);
>  		/* Restart STA timer for HW scan case */
>  		rcu_read_lock();
>  		list_for_each_entry_rcu(sdata, &local->interfaces, list)

Attachment: signature.asc
Description: This is a digitally signed message part


[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