Search Linux Wireless

Re: [PATCH] mac80211: handle failed scan requests in STA mode

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

 



On Mon, 2009-03-09 at 15:47 +0100, Helmut Schaa wrote:
> If cfg80211 requests a scan it awaits either a return code != 0 from
> the scan function or the cfg80211_scan_done to be called. In case of
> a STA mac80211's scan function ever returns 0 and queues the scan request.
> If ieee80211_sta_work is executed and ieee80211_start_scan fails for
> some reason cfg80211_scan_done will never be called but cfg80211 still
> thinks the scan was triggered successfully and will refuse any future
> scan requests due to drv->scan_req not being cleaned up.
> 
> If a scan is triggered from within the MLME a similar problem appears. If
> ieee80211_start_scan returns an error, local->scan_req will not be reset
> and mac80211 will refuse any future scan requests.
> 
> Hence, in both cases call ieee80211_scan_failed (which notifies cfg80211
> and resets local->scan_req) if ieee80211_start_scan returns an error.

This patch looks good.

> Signed-off-by: Helmut Schaa <helmut.schaa@xxxxxxxxxxxxxx>
> ---
> 
> It just happend to me that after rf-killing iwlwifi wpa_supplicant triggered
> a scan (which was accepted by mac80211 as it is not rfkill aware yet) which
> failed in iwlwifi and left cfg80211 in a state where it won't accept a new
> scan request even after unkilling the radio again.
> 
> Johannes, do you think it is worth to add something like a scan watchdog that
> triggers after 30 seconds to cfg80211 and prints "scan request failed", cancels
> the scan request and notifies user space?

But I don't really think it's worth doing that.

johannes

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