aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-07 08:37:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:02:30 -0400
commit3e5d7649a64e558e4146ddfad4dfcf13fc65dd47 (patch)
treefa51725ca07cf682e6694ba5f107d8614d9f0972 /net/mac80211
parent2ffa5fede379091bf62a732462b829e4b51af054 (diff)
cfg80211: let SME control reassociation vs. association
Since we don't really know that well in the kernel, let's let the SME control whether it wants to use reassociation or not, by allowing it to give the previous BSSID in the associate() parameters. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c6
-rw-r--r--net/mac80211/mlme.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 0f29cd0580c9..e6d8860f26f2 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1256,6 +1256,12 @@ static int ieee80211_assoc(struct wiphy *wiphy, struct net_device *dev,
1256 sdata->u.mgd.flags &= ~IEEE80211_STA_MFP_ENABLED; 1256 sdata->u.mgd.flags &= ~IEEE80211_STA_MFP_ENABLED;
1257 } 1257 }
1258 1258
1259 if (req->prev_bssid) {
1260 sdata->u.mgd.flags |= IEEE80211_STA_PREV_BSSID_SET;
1261 memcpy(sdata->u.mgd.prev_bssid, req->prev_bssid, ETH_ALEN);
1262 } else
1263 sdata->u.mgd.flags &= ~IEEE80211_STA_PREV_BSSID_SET;
1264
1259 if (req->crypto.control_port) 1265 if (req->crypto.control_port)
1260 sdata->u.mgd.flags |= IEEE80211_STA_CONTROL_PORT; 1266 sdata->u.mgd.flags |= IEEE80211_STA_CONTROL_PORT;
1261 else 1267 else
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index aa1829ae431d..24486455e505 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -879,9 +879,6 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
879 ieee80211_rx_bss_put(local, bss); 879 ieee80211_rx_bss_put(local, bss);
880 } 880 }
881 881
882 ifmgd->flags |= IEEE80211_STA_PREV_BSSID_SET;
883 memcpy(ifmgd->prev_bssid, sdata->u.mgd.bssid, ETH_ALEN);
884
885 ifmgd->last_probe = jiffies; 882 ifmgd->last_probe = jiffies;
886 ieee80211_led_assoc(local, 1); 883 ieee80211_led_assoc(local, 1);
887 884
@@ -1470,10 +1467,6 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1470 if (status_code != WLAN_STATUS_SUCCESS) { 1467 if (status_code != WLAN_STATUS_SUCCESS) {
1471 printk(KERN_DEBUG "%s: AP denied association (code=%d)\n", 1468 printk(KERN_DEBUG "%s: AP denied association (code=%d)\n",
1472 sdata->dev->name, status_code); 1469 sdata->dev->name, status_code);
1473 /* if this was a reassociation, ensure we try a "full"
1474 * association next time. This works around some broken APs
1475 * which do not correctly reject reassociation requests. */
1476 ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
1477 cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, len, 1470 cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, len,
1478 GFP_KERNEL); 1471 GFP_KERNEL);
1479 /* Wait for SME to decide what to do next */ 1472 /* Wait for SME to decide what to do next */