diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-08-07 08:51:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:13:43 -0400 |
commit | f401a6f7ede753e56b84025e7d2db0d5ef560ce6 (patch) | |
tree | 12b077096234ba0f990c637665d11e0afa608b17 /net/wireless/mlme.c | |
parent | 59bbb6f7574bc693ed8313b98eac641116c95b94 (diff) |
cfg80211: use reassociation when possible
With the move of everything related to the SME from
mac80211 to cfg80211, we lost the ability to send
reassociation frames. This adds them back, but only
for wireless extensions. With the userspace SME, it
shall control assoc vs. reassoc (it already can do
so with the nl80211 interface).
I haven't touched the connect() implementation, so
it is not possible to reassociate with the nl80211
connect primitive. I think that should be done with
the NL80211_CMD_ROAM command, but we'll have to see
how that can be handled in the future, especially
with fullmac chips.
This patch addresses only the immediate regression
we had in mac80211, which previously sent reassoc.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 51d5df67c632..da64071ceb84 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -67,6 +67,16 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len) | |||
67 | 67 | ||
68 | status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); | 68 | status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); |
69 | 69 | ||
70 | /* | ||
71 | * This is a bit of a hack, we don't notify userspace of | ||
72 | * a (re-)association reply if we tried to send a reassoc | ||
73 | * and got a reject -- we only try again with an assoc | ||
74 | * frame instead of reassoc. | ||
75 | */ | ||
76 | if (status_code != WLAN_STATUS_SUCCESS && wdev->conn && | ||
77 | cfg80211_sme_failed_reassoc(wdev)) | ||
78 | goto out; | ||
79 | |||
70 | nl80211_send_rx_assoc(rdev, dev, buf, len, GFP_KERNEL); | 80 | nl80211_send_rx_assoc(rdev, dev, buf, len, GFP_KERNEL); |
71 | 81 | ||
72 | if (status_code == WLAN_STATUS_SUCCESS) { | 82 | if (status_code == WLAN_STATUS_SUCCESS) { |
@@ -97,6 +107,7 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len) | |||
97 | cfg80211_put_bss(&bss->pub); | 107 | cfg80211_put_bss(&bss->pub); |
98 | } | 108 | } |
99 | 109 | ||
110 | out: | ||
100 | wdev_unlock(wdev); | 111 | wdev_unlock(wdev); |
101 | } | 112 | } |
102 | EXPORT_SYMBOL(cfg80211_send_rx_assoc); | 113 | EXPORT_SYMBOL(cfg80211_send_rx_assoc); |