Search Linux Wireless

Re: [RFC] mac80211: correctly close cancelled scans

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

 



On Tue, Sep 17, 2013 at 8:48 AM, Emmanuel Grumbach
<emmanuel.grumbach@xxxxxxxxx> wrote:
> __ieee80211_scan_completed is called from a worker. This
> means that the following flow is possible.
>
>  * driver calls ieee80211_scan_completed
>  * mac80211 cancels the scan (that is already complete)
>  * __ieee80211_scan_complete runs
>
> When scan_work will finally run, it will see that the scan
> hasn't been aborted and might even trigger another scan on
> another band. This leads to a situation where cfg80211's
> scan is not done and no further scan can be issued.
>
> Fix this by setting a new flag when a HW scan is being
> cancelled so that no other scan will be triggered.
>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx>
> ---
[...]

>         if (test_bit(SCAN_HW_SCANNING, &local->scanning)) {
> -               if (local->ops->cancel_hw_scan)
> +               /*
> +                * Make sure that __ieee80211_scan_completed doesn't trigger a
> +                * scan on another band.
> +                */
> +               set_bit(SCAN_HW_CANCELLED, &local->scanning);
> +               if (local->ops->cancel_hw_scan) {
>                         drv_cancel_hw_scan(local,
>                                 rcu_dereference_protected(local->scan_sdata,
>                                                 lockdep_is_held(&local->mtx)));
> +               }
>                 goto out;
>         }

you don't seem to clear this flag anywhere...

Eliad.
--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux