When the in-kernel SME gets an association failure from
the AP we don't deauthenticate, and thus get into a very
confused state which will lead to warnings later on. Fix
this by actually deauthenticating when the AP indicates
an association failure.
Signed-off-by: Johannes Berg <[email protected]>
---
net/wireless/core.h | 1 +
net/wireless/mlme.c | 9 +++++++++
net/wireless/sme.c | 21 +++++++++++++++++++--
3 files changed, 29 insertions(+), 2 deletions(-)
--- wireless-testing.orig/net/wireless/core.h 2009-10-20 15:02:15.000000000 +0900
+++ wireless-testing/net/wireless/core.h 2009-10-20 15:03:20.000000000 +0900
@@ -358,6 +358,7 @@ int cfg80211_mgd_wext_connect(struct cfg
struct wireless_dev *wdev);
void cfg80211_conn_work(struct work_struct *work);
+void cfg80211_sme_failed_assoc(struct wireless_dev *wdev);
bool cfg80211_sme_failed_reassoc(struct wireless_dev *wdev);
/* internal helpers */
--- wireless-testing.orig/net/wireless/mlme.c 2009-10-20 15:02:15.000000000 +0900
+++ wireless-testing/net/wireless/mlme.c 2009-10-20 15:03:20.000000000 +0900
@@ -62,6 +62,7 @@ void cfg80211_send_rx_assoc(struct net_d
u8 *ie = mgmt->u.assoc_resp.variable;
int i, ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
struct cfg80211_internal_bss *bss = NULL;
+ bool need_connect_result = true;
wdev_lock(wdev);
@@ -94,6 +95,14 @@ void cfg80211_send_rx_assoc(struct net_d
}
WARN_ON(!bss);
+ } else if (wdev->conn) {
+ cfg80211_sme_failed_assoc(wdev);
+ need_connect_result = false;
+ /*
+ * do not call connect_result() now because the
+ * sme will schedule work that does it later.
+ */
+ goto out;
}
if (!wdev->conn && wdev->sme_state == CFG80211_SME_IDLE) {
--- wireless-testing.orig/net/wireless/sme.c 2009-10-20 15:02:15.000000000 +0900
+++ wireless-testing/net/wireless/sme.c 2009-10-20 15:03:20.000000000 +0900
@@ -26,6 +26,7 @@ struct cfg80211_conn {
CFG80211_CONN_AUTHENTICATING,
CFG80211_CONN_ASSOCIATE_NEXT,
CFG80211_CONN_ASSOCIATING,
+ CFG80211_CONN_DEAUTH_ASSOC_FAIL,
} state;
u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
u8 *ie;
@@ -148,6 +149,12 @@ static int cfg80211_conn_do_work(struct
NULL, 0,
WLAN_REASON_DEAUTH_LEAVING);
return err;
+ case CFG80211_CONN_DEAUTH_ASSOC_FAIL:
+ __cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
+ NULL, 0,
+ WLAN_REASON_DEAUTH_LEAVING);
+ /* return an error so that we call __cfg80211_connect_result() */
+ return -EINVAL;
default:
return 0;
}
@@ -158,6 +165,7 @@ void cfg80211_conn_work(struct work_stru
struct cfg80211_registered_device *rdev =
container_of(work, struct cfg80211_registered_device, conn_work);
struct wireless_dev *wdev;
+ u8 bssid[ETH_ALEN];
rtnl_lock();
cfg80211_lock_rdev(rdev);
@@ -173,10 +181,10 @@ void cfg80211_conn_work(struct work_stru
wdev_unlock(wdev);
continue;
}
+ memcpy(bssid, wdev->conn->params.bssid, ETH_ALEN);
if (cfg80211_conn_do_work(wdev))
__cfg80211_connect_result(
- wdev->netdev,
- wdev->conn->params.bssid,
+ wdev->netdev, bssid,
NULL, 0, NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE,
false, NULL);
@@ -337,6 +345,15 @@ bool cfg80211_sme_failed_reassoc(struct
return true;
}
+void cfg80211_sme_failed_assoc(struct wireless_dev *wdev)
+{
+ struct wiphy *wiphy = wdev->wiphy;
+ struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
+
+ wdev->conn->state = CFG80211_CONN_DEAUTH_ASSOC_FAIL;
+ schedule_work(&rdev->conn_work);
+}
+
void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
const u8 *req_ie, size_t req_ie_len,
const u8 *resp_ie, size_t resp_ie_len,
To clarify on the patchset and order:
[quilt series]:
# patches from linux-wireless ML
linux-wireless/0001-Revert-mac80211-fix-SME-warning-by-removing-stale-BS.patch
linux-wireless/mac80211-keep-auth-state-when-assoc-fails.patch
linux-wireless/cfg80211-sme-deauthenticate-on-assoc-failure.patch
- Sedat -
On Tue, Oct 20, 2009 at 9:33 AM, Sedat Dilek <[email protected]> wrote:
> Is this patch on top of wireless-testing (master-2009-10-16)?
>
> It fails here:
> ...
> Applying patch linux-wireless/mac80211-keep-auth-state-when-assoc-fails.patch
> patching file net/mac80211/mlme.c
> Hunk #1 FAILED at 1457.
> 1 out of 1 hunk FAILED -- rejects in file net/mac80211/mlme.c
> Patch linux-wireless/mac80211-keep-auth-state-when-assoc-fails.patch
> does not apply (enforce with -f)
> ERROR: failed to apply patch series!
>
> Does it need to revert "mac80211: fix SME warning by removing stale
> BSS upon assoc failure"?
>
> - Sedat -
>
> On Tue, Oct 20, 2009 at 8:08 AM, Johannes Berg
> <[email protected]> wrote:
>> When the in-kernel SME gets an association failure from
>> the AP we don't deauthenticate, and thus get into a very
>> confused state which will lead to warnings later on. Fix
>> this by actually deauthenticating when the AP indicates
>> an association failure.
>>
>> Signed-off-by: Johannes Berg <[email protected]>
>> ---
>> net/wireless/core.h | 1 +
>> net/wireless/mlme.c | 9 +++++++++
>> net/wireless/sme.c | 21 +++++++++++++++++++--
>> 3 files changed, 29 insertions(+), 2 deletions(-)
>>
>> --- wireless-testing.orig/net/wireless/core.h 2009-10-20 15:02:15.000000000 +0900
>> +++ wireless-testing/net/wireless/core.h 2009-10-20 15:03:20.000000000 +0900
>> @@ -358,6 +358,7 @@ int cfg80211_mgd_wext_connect(struct cfg
>> struct wireless_dev *wdev);
>>
>> void cfg80211_conn_work(struct work_struct *work);
>> +void cfg80211_sme_failed_assoc(struct wireless_dev *wdev);
>> bool cfg80211_sme_failed_reassoc(struct wireless_dev *wdev);
>>
>> /* internal helpers */
>> --- wireless-testing.orig/net/wireless/mlme.c 2009-10-20 15:02:15.000000000 +0900
>> +++ wireless-testing/net/wireless/mlme.c 2009-10-20 15:03:20.000000000 +0900
>> @@ -62,6 +62,7 @@ void cfg80211_send_rx_assoc(struct net_d
>> u8 *ie = mgmt->u.assoc_resp.variable;
>> int i, ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
>> struct cfg80211_internal_bss *bss = NULL;
>> + bool need_connect_result = true;
>>
>> wdev_lock(wdev);
>>
>> @@ -94,6 +95,14 @@ void cfg80211_send_rx_assoc(struct net_d
>> }
>>
>> WARN_ON(!bss);
>> + } else if (wdev->conn) {
>> + cfg80211_sme_failed_assoc(wdev);
>> + need_connect_result = false;
>> + /*
>> + * do not call connect_result() now because the
>> + * sme will schedule work that does it later.
>> + */
>> + goto out;
>> }
>>
>> if (!wdev->conn && wdev->sme_state == CFG80211_SME_IDLE) {
>> --- wireless-testing.orig/net/wireless/sme.c 2009-10-20 15:02:15.000000000 +0900
>> +++ wireless-testing/net/wireless/sme.c 2009-10-20 15:03:20.000000000 +0900
>> @@ -26,6 +26,7 @@ struct cfg80211_conn {
>> CFG80211_CONN_AUTHENTICATING,
>> CFG80211_CONN_ASSOCIATE_NEXT,
>> CFG80211_CONN_ASSOCIATING,
>> + CFG80211_CONN_DEAUTH_ASSOC_FAIL,
>> } state;
>> u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
>> u8 *ie;
>> @@ -148,6 +149,12 @@ static int cfg80211_conn_do_work(struct
>> NULL, 0,
>> WLAN_REASON_DEAUTH_LEAVING);
>> return err;
>> + case CFG80211_CONN_DEAUTH_ASSOC_FAIL:
>> + __cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
>> + NULL, 0,
>> + WLAN_REASON_DEAUTH_LEAVING);
>> + /* return an error so that we call __cfg80211_connect_result() */
>> + return -EINVAL;
>> default:
>> return 0;
>> }
>> @@ -158,6 +165,7 @@ void cfg80211_conn_work(struct work_stru
>> struct cfg80211_registered_device *rdev =
>> container_of(work, struct cfg80211_registered_device, conn_work);
>> struct wireless_dev *wdev;
>> + u8 bssid[ETH_ALEN];
>>
>> rtnl_lock();
>> cfg80211_lock_rdev(rdev);
>> @@ -173,10 +181,10 @@ void cfg80211_conn_work(struct work_stru
>> wdev_unlock(wdev);
>> continue;
>> }
>> + memcpy(bssid, wdev->conn->params.bssid, ETH_ALEN);
>> if (cfg80211_conn_do_work(wdev))
>> __cfg80211_connect_result(
>> - wdev->netdev,
>> - wdev->conn->params.bssid,
>> + wdev->netdev, bssid,
>> NULL, 0, NULL, 0,
>> WLAN_STATUS_UNSPECIFIED_FAILURE,
>> false, NULL);
>> @@ -337,6 +345,15 @@ bool cfg80211_sme_failed_reassoc(struct
>> return true;
>> }
>>
>> +void cfg80211_sme_failed_assoc(struct wireless_dev *wdev)
>> +{
>> + struct wiphy *wiphy = wdev->wiphy;
>> + struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
>> +
>> + wdev->conn->state = CFG80211_CONN_DEAUTH_ASSOC_FAIL;
>> + schedule_work(&rdev->conn_work);
>> +}
>> +
>> void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
>> const u8 *req_ie, size_t req_ie_len,
>> const u8 *resp_ie, size_t resp_ie_len,
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
On Tue, Oct 20, 2009 at 3:08 PM, Johannes Berg
<[email protected]> wrote:
> When the in-kernel SME gets an association failure from
> the AP we don't deauthenticate, and thus get into a very
> confused state which will lead to warnings later on. Fix
> this by actually deauthenticating when the AP indicates
> an association failure.
>
> Signed-off-by: Johannes Berg <[email protected]>
Thanks Johannes.
Tested-by: Luis R. Rodriguez <[email protected]>
John -- this patch and the previous patch titled "mac80211: keep auth
state when assoc fails" fix the SME warning as well. These are also
2.6.32-rc fixes.
Luis
YUPP.
- Sedat -
On Tue, Oct 20, 2009 at 9:33 AM, Sedat Dilek <[email protected]> wrote:
> Is this patch on top of wireless-testing (master-2009-10-16)?
>
> It fails here:
> ...
> Applying patch linux-wireless/mac80211-keep-auth-state-when-assoc-fails.patch
> patching file net/mac80211/mlme.c
> Hunk #1 FAILED at 1457.
> 1 out of 1 hunk FAILED -- rejects in file net/mac80211/mlme.c
> Patch linux-wireless/mac80211-keep-auth-state-when-assoc-fails.patch
> does not apply (enforce with -f)
> ERROR: failed to apply patch series!
>
> Does it need to revert "mac80211: fix SME warning by removing stale
> BSS upon assoc failure"?
>
> - Sedat -
>
> On Tue, Oct 20, 2009 at 8:08 AM, Johannes Berg
> <[email protected]> wrote:
>> When the in-kernel SME gets an association failure from
>> the AP we don't deauthenticate, and thus get into a very
>> confused state which will lead to warnings later on. Fix
>> this by actually deauthenticating when the AP indicates
>> an association failure.
>>
>> Signed-off-by: Johannes Berg <[email protected]>
>> ---
>> net/wireless/core.h | 1 +
>> net/wireless/mlme.c | 9 +++++++++
>> net/wireless/sme.c | 21 +++++++++++++++++++--
>> 3 files changed, 29 insertions(+), 2 deletions(-)
>>
>> --- wireless-testing.orig/net/wireless/core.h 2009-10-20 15:02:15.000000000 +0900
>> +++ wireless-testing/net/wireless/core.h 2009-10-20 15:03:20.000000000 +0900
>> @@ -358,6 +358,7 @@ int cfg80211_mgd_wext_connect(struct cfg
>> struct wireless_dev *wdev);
>>
>> void cfg80211_conn_work(struct work_struct *work);
>> +void cfg80211_sme_failed_assoc(struct wireless_dev *wdev);
>> bool cfg80211_sme_failed_reassoc(struct wireless_dev *wdev);
>>
>> /* internal helpers */
>> --- wireless-testing.orig/net/wireless/mlme.c 2009-10-20 15:02:15.000000000 +0900
>> +++ wireless-testing/net/wireless/mlme.c 2009-10-20 15:03:20.000000000 +0900
>> @@ -62,6 +62,7 @@ void cfg80211_send_rx_assoc(struct net_d
>> u8 *ie = mgmt->u.assoc_resp.variable;
>> int i, ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
>> struct cfg80211_internal_bss *bss = NULL;
>> + bool need_connect_result = true;
>>
>> wdev_lock(wdev);
>>
>> @@ -94,6 +95,14 @@ void cfg80211_send_rx_assoc(struct net_d
>> }
>>
>> WARN_ON(!bss);
>> + } else if (wdev->conn) {
>> + cfg80211_sme_failed_assoc(wdev);
>> + need_connect_result = false;
>> + /*
>> + * do not call connect_result() now because the
>> + * sme will schedule work that does it later.
>> + */
>> + goto out;
>> }
>>
>> if (!wdev->conn && wdev->sme_state == CFG80211_SME_IDLE) {
>> --- wireless-testing.orig/net/wireless/sme.c 2009-10-20 15:02:15.000000000 +0900
>> +++ wireless-testing/net/wireless/sme.c 2009-10-20 15:03:20.000000000 +0900
>> @@ -26,6 +26,7 @@ struct cfg80211_conn {
>> CFG80211_CONN_AUTHENTICATING,
>> CFG80211_CONN_ASSOCIATE_NEXT,
>> CFG80211_CONN_ASSOCIATING,
>> + CFG80211_CONN_DEAUTH_ASSOC_FAIL,
>> } state;
>> u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
>> u8 *ie;
>> @@ -148,6 +149,12 @@ static int cfg80211_conn_do_work(struct
>> NULL, 0,
>> WLAN_REASON_DEAUTH_LEAVING);
>> return err;
>> + case CFG80211_CONN_DEAUTH_ASSOC_FAIL:
>> + __cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
>> + NULL, 0,
>> + WLAN_REASON_DEAUTH_LEAVING);
>> + /* return an error so that we call __cfg80211_connect_result() */
>> + return -EINVAL;
>> default:
>> return 0;
>> }
>> @@ -158,6 +165,7 @@ void cfg80211_conn_work(struct work_stru
>> struct cfg80211_registered_device *rdev =
>> container_of(work, struct cfg80211_registered_device, conn_work);
>> struct wireless_dev *wdev;
>> + u8 bssid[ETH_ALEN];
>>
>> rtnl_lock();
>> cfg80211_lock_rdev(rdev);
>> @@ -173,10 +181,10 @@ void cfg80211_conn_work(struct work_stru
>> wdev_unlock(wdev);
>> continue;
>> }
>> + memcpy(bssid, wdev->conn->params.bssid, ETH_ALEN);
>> if (cfg80211_conn_do_work(wdev))
>> __cfg80211_connect_result(
>> - wdev->netdev,
>> - wdev->conn->params.bssid,
>> + wdev->netdev, bssid,
>> NULL, 0, NULL, 0,
>> WLAN_STATUS_UNSPECIFIED_FAILURE,
>> false, NULL);
>> @@ -337,6 +345,15 @@ bool cfg80211_sme_failed_reassoc(struct
>> return true;
>> }
>>
>> +void cfg80211_sme_failed_assoc(struct wireless_dev *wdev)
>> +{
>> + struct wiphy *wiphy = wdev->wiphy;
>> + struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
>> +
>> + wdev->conn->state = CFG80211_CONN_DEAUTH_ASSOC_FAIL;
>> + schedule_work(&rdev->conn_work);
>> +}
>> +
>> void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
>> const u8 *req_ie, size_t req_ie_len,
>> const u8 *resp_ie, size_t resp_ie_len,
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
SXMgdGhpcyBwYXRjaCBvbiB0b3Agb2Ygd2lyZWxlc3MtdGVzdGluZyAobWFzdGVyLTIwMDktMTAt
MTYpPwoKSXQgZmFpbHMgaGVyZToKLi4uCkFwcGx5aW5nIHBhdGNoIGxpbnV4LXdpcmVsZXNzL21h
YzgwMjExLWtlZXAtYXV0aC1zdGF0ZS13aGVuLWFzc29jLWZhaWxzLnBhdGNoCnBhdGNoaW5nIGZp
bGUgbmV0L21hYzgwMjExL21sbWUuYwpIdW5rICMxIEZBSUxFRCBhdCAxNDU3LgoxIG91dCBvZiAx
IGh1bmsgRkFJTEVEIC0tIHJlamVjdHMgaW4gZmlsZSBuZXQvbWFjODAyMTEvbWxtZS5jClBhdGNo
IGxpbnV4LXdpcmVsZXNzL21hYzgwMjExLWtlZXAtYXV0aC1zdGF0ZS13aGVuLWFzc29jLWZhaWxz
LnBhdGNoCmRvZXMgbm90IGFwcGx5IChlbmZvcmNlIHdpdGggLWYpCkVSUk9SOiBmYWlsZWQgdG8g
YXBwbHkgcGF0Y2ggc2VyaWVzIQoKRG9lcyBpdCBuZWVkIHRvIHJldmVydCAibWFjODAyMTE6IGZp
eCBTTUUgd2FybmluZyBie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gcmVxX2ll
X2xlbiwKPiDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCBjb25z
dCB1OCAqcmVzcF9pZSwgc2l6ZV90IHJlc3BfaWVfbGVuLAo+Cj4KPiAtLQo+IFRvIHVuc3Vic2Ny
aWJlIGZyb20gdGhpcyBsaXN0OiBzZW5kIHRoZSBsaW5lICJ1bnN1YnNjcmliZSBsaW51eC13aXJl
bGVzcyIgaW4KPiB0aGUgYm9keSBvZiBhIG1lc3NhZ2UgdG8gbWFqb3Jkb21vQHZnZXIua2VybmVs
Lm9yZwo+IE1vcmUgbWFqb3Jkb21vIGluZm8gYXQgwqBodHRwOi8vdmdlci5rZXJuZWwub3JnL21h
am9yZG9tby1pbmZvLmh0bWwKPgo=
On Tue, Oct 20, 2009 at 4:46 PM, Sedat Dilek <[email protected]> wrote:
> To clarify on the patchset and order:
>
> [quilt series]:
> # patches from linux-wireless ML
> linux-wireless/0001-Revert-mac80211-fix-SME-warning-by-removing-stale-BS.patch
> linux-wireless/mac80211-keep-auth-state-when-assoc-fails.patch
> linux-wireless/cfg80211-sme-deauthenticate-on-assoc-failure.patch
Yes, a revert is required first.
Luis
On Tue, Oct 20, 2009 at 03:08:53PM +0900, Johannes Berg wrote:
> When the in-kernel SME gets an association failure from
> the AP we don't deauthenticate, and thus get into a very
> confused state which will lead to warnings later on. Fix
> this by actually deauthenticating when the AP indicates
> an association failure.
While this may be a reasonable change to resolve an issue now, this may
not be the best long term solution. There are some association failure
cases which should really be handled by trying association again instead
of deauthenticating. The main example would be the association comeback
time use in IEEE 802.11w. In general, association failure should not
result in deauthentication in every case.
--
Jouni Malinen PGP id EFC895FA
On Thu, 2009-10-22 at 21:07 -0700, Jouni Malinen wrote:
> On Tue, Oct 20, 2009 at 03:08:53PM +0900, Johannes Berg wrote:
> > When the in-kernel SME gets an association failure from
> > the AP we don't deauthenticate, and thus get into a very
> > confused state which will lead to warnings later on. Fix
> > this by actually deauthenticating when the AP indicates
> > an association failure.
>
> While this may be a reasonable change to resolve an issue now, this may
> not be the best long term solution. There are some association failure
> cases which should really be handled by trying association again instead
> of deauthenticating. The main example would be the association comeback
> time use in IEEE 802.11w. In general, association failure should not
> result in deauthentication in every case.
I'm pretty sure the issue should be fixed with the other two patches
Luis and I cooked up at KS.
johannes
On Tue, 2009-10-20 at 15:24 +0900, Luis R. Rodriguez wrote:
> On Tue, Oct 20, 2009 at 3:08 PM, Johannes Berg
> <[email protected]> wrote:
> > When the in-kernel SME gets an association failure from
> > the AP we don't deauthenticate, and thus get into a very
> > confused state which will lead to warnings later on. Fix
> > this by actually deauthenticating when the AP indicates
> > an association failure.
> >
> > Signed-off-by: Johannes Berg <[email protected]>
>
> Thanks Johannes.
>
> Tested-by: Luis R. Rodriguez <[email protected]>
>
> John -- this patch and the previous patch titled "mac80211: keep auth
> state when assoc fails" fix the SME warning as well. These are also
> 2.6.32-rc fixes.
And also done during the hacking session at KS.
johannes