2009-04-01 14:24:13

by Jouni Malinen

[permalink] [raw]
Subject: [PATCH] mac80211: Report rejected association to user space SME

When using nl80211 association, we need to send association response
with a failure code to user space SME instead of just internally
trying to send out the same (re)association request again couple of
times. This fixes problems in association process getting stuck on a
failure when user space is not notified in any way that something
actually failed.

Signed-off-by: Jouni Malinen <[email protected]>

---
net/mac80211/mlme.c | 5 +++++
1 file changed, 5 insertions(+)

--- uml.orig/net/mac80211/mlme.c 2009-04-01 17:20:11.000000000 +0300
+++ uml/net/mac80211/mlme.c 2009-04-01 17:21:15.000000000 +0300
@@ -1363,6 +1363,11 @@ static void ieee80211_rx_mgmt_assoc_resp
* association next time. This works around some broken APs
* which do not correctly reject reassociation requests. */
ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
+ cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, len);
+ if (ifmgd->flags & IEEE80211_STA_EXT_SME) {
+ /* Wait for SME to decide what to do next */
+ ifmgd->state = IEEE80211_STA_MLME_DISABLED;
+ }
return;
}


--
Jouni Malinen PGP id EFC895FA


2009-04-01 14:35:26

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Report rejected association to user space SME

On Wed, 2009-04-01 at 17:23 +0300, Jouni Malinen wrote:
> When using nl80211 association, we need to send association response
> with a failure code to user space SME instead of just internally
> trying to send out the same (re)association request again couple of
> times. This fixes problems in association process getting stuck on a
> failure when user space is not notified in any way that something
> actually failed.

Indeed.

> Signed-off-by: Jouni Malinen <[email protected]>

Acked-by: Johannes Berg <[email protected]>

> ---
> net/mac80211/mlme.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> --- uml.orig/net/mac80211/mlme.c 2009-04-01 17:20:11.000000000 +0300
> +++ uml/net/mac80211/mlme.c 2009-04-01 17:21:15.000000000 +0300
> @@ -1363,6 +1363,11 @@ static void ieee80211_rx_mgmt_assoc_resp
> * association next time. This works around some broken APs
> * which do not correctly reject reassociation requests. */
> ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
> + cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, len);
> + if (ifmgd->flags & IEEE80211_STA_EXT_SME) {
> + /* Wait for SME to decide what to do next */
> + ifmgd->state = IEEE80211_STA_MLME_DISABLED;
> + }
> return;
> }
>
>


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part