[PATCH 1/2] Allow scanning while in authenticated only state
Johannes Berg
johannes
Fri Oct 30 22:43:02 PDT 2009
On Fri, 2009-10-30 at 23:52 +0200, Maxim Levitsky wrote:
> >From 1d13f997f652c7e632d4ddb053df3f3fad78da23 Mon Sep 17 00:00:00 2001
> From: Maxim Levitsky <maximlevitsky at gmail.com>
> Date: Fri, 30 Oct 2009 23:36:20 +0200
> Subject: [PATCH 1/2] Allow scanning while in authenticated only state
>
> Since ifmgd->work_list is {ab}used as a storage for authenticated,
> but not associated access points (this is done using idle work items),
> allow scanning if all work items are in this state.
>
> Signed-off-by: Maxim Levitsky <maximlevitsky at gmail.com>
I don't think this is needed. While not _strictly_ wrong, I still
dislike the additional complexity.
I think you just need this wpa_supplicant patch:
http://johannes.sipsolutions.net/patches/hostap/all/2009-10-26-12%3a59/deauth-on-disassoc.patch
johannes
> ---
> net/mac80211/scan.c | 12 +++++++++---
> 1 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
> index c46ac01..c932765 100644
> --- a/net/mac80211/scan.c
> +++ b/net/mac80211/scan.c
> @@ -418,6 +418,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
> {
> struct ieee80211_local *local = sdata->local;
> struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
> + struct ieee80211_mgd_work *wk, *tmp;
> int rc;
>
> if (local->scan_req)
> @@ -450,9 +451,14 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
> if (req != local->int_scan_req &&
> sdata->vif.type == NL80211_IFTYPE_STATION &&
> !list_empty(&ifmgd->work_list)) {
> - /* actually wait for the work it's doing to finish/time out */
> - set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request);
> - return 0;
> +
> + /* actually wait for the work it's doing to finish/time out*/
> + list_for_each_entry_safe(wk, tmp, &ifmgd->work_list, list) {
> + if (wk->state != IEEE80211_MGD_STATE_IDLE) {
> + set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request);
> + return 0;
> + }
> + }
> }
>
> if (local->ops->hw_scan)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20091031/2e21e25c/attachment-0001.pgp
More information about the Hostap
mailing list