diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-07-09 16:34:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-09 16:34:39 -0400 |
commit | 0af5491c2f6069bb6cff4260619749a90a208c98 (patch) | |
tree | a26ad1348cacd93b9e1e62be1966adaa300e4e52 /net/mac80211/mlme.c | |
parent | 635d999fd3b9f0ddc899eaf45fc49bec65c0b8e2 (diff) | |
parent | 4d6d0ae2a088e1e054ef6d96ceb1b41523291e71 (diff) |
Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-next
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index aa69a331f374..f49f14f8ba82 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -541,6 +541,8 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
541 | memcpy(pos, assoc_data->ie + offset, noffset - offset); | 541 | memcpy(pos, assoc_data->ie + offset, noffset - offset); |
542 | } | 542 | } |
543 | 543 | ||
544 | drv_mgd_prepare_tx(local, sdata); | ||
545 | |||
544 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; | 546 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; |
545 | ieee80211_tx_skb(sdata, skb); | 547 | ieee80211_tx_skb(sdata, skb); |
546 | } | 548 | } |
@@ -580,6 +582,9 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | |||
580 | if (!(ifmgd->flags & IEEE80211_STA_MFP_ENABLED)) | 582 | if (!(ifmgd->flags & IEEE80211_STA_MFP_ENABLED)) |
581 | IEEE80211_SKB_CB(skb)->flags |= | 583 | IEEE80211_SKB_CB(skb)->flags |= |
582 | IEEE80211_TX_INTFL_DONT_ENCRYPT; | 584 | IEEE80211_TX_INTFL_DONT_ENCRYPT; |
585 | |||
586 | drv_mgd_prepare_tx(local, sdata); | ||
587 | |||
583 | ieee80211_tx_skb(sdata, skb); | 588 | ieee80211_tx_skb(sdata, skb); |
584 | } | 589 | } |
585 | } | 590 | } |
@@ -902,9 +907,6 @@ static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata) | |||
902 | if (!mgd->associated) | 907 | if (!mgd->associated) |
903 | return false; | 908 | return false; |
904 | 909 | ||
905 | if (!mgd->associated->beacon_ies) | ||
906 | return false; | ||
907 | |||
908 | if (mgd->flags & (IEEE80211_STA_BEACON_POLL | | 910 | if (mgd->flags & (IEEE80211_STA_BEACON_POLL | |
909 | IEEE80211_STA_CONNECTION_POLL)) | 911 | IEEE80211_STA_CONNECTION_POLL)) |
910 | return false; | 912 | return false; |
@@ -1362,6 +1364,10 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1362 | } | 1364 | } |
1363 | mutex_unlock(&local->sta_mtx); | 1365 | mutex_unlock(&local->sta_mtx); |
1364 | 1366 | ||
1367 | /* flush out any pending frame (e.g. DELBA) before deauth/disassoc */ | ||
1368 | if (tx) | ||
1369 | drv_flush(local, false); | ||
1370 | |||
1365 | /* deauthenticate/disassociate now */ | 1371 | /* deauthenticate/disassociate now */ |
1366 | if (tx || frame_buf) | 1372 | if (tx || frame_buf) |
1367 | ieee80211_send_deauth_disassoc(sdata, ifmgd->bssid, stype, | 1373 | ieee80211_send_deauth_disassoc(sdata, ifmgd->bssid, stype, |
@@ -1610,6 +1616,7 @@ struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw, | |||
1610 | { | 1616 | { |
1611 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | 1617 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); |
1612 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 1618 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
1619 | struct cfg80211_bss *cbss; | ||
1613 | struct sk_buff *skb; | 1620 | struct sk_buff *skb; |
1614 | const u8 *ssid; | 1621 | const u8 *ssid; |
1615 | int ssid_len; | 1622 | int ssid_len; |
@@ -1619,16 +1626,22 @@ struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw, | |||
1619 | 1626 | ||
1620 | ASSERT_MGD_MTX(ifmgd); | 1627 | ASSERT_MGD_MTX(ifmgd); |
1621 | 1628 | ||
1622 | if (!ifmgd->associated) | 1629 | if (ifmgd->associated) |
1630 | cbss = ifmgd->associated; | ||
1631 | else if (ifmgd->auth_data) | ||
1632 | cbss = ifmgd->auth_data->bss; | ||
1633 | else if (ifmgd->assoc_data) | ||
1634 | cbss = ifmgd->assoc_data->bss; | ||
1635 | else | ||
1623 | return NULL; | 1636 | return NULL; |
1624 | 1637 | ||
1625 | ssid = ieee80211_bss_get_ie(ifmgd->associated, WLAN_EID_SSID); | 1638 | ssid = ieee80211_bss_get_ie(cbss, WLAN_EID_SSID); |
1626 | if (WARN_ON_ONCE(ssid == NULL)) | 1639 | if (WARN_ON_ONCE(ssid == NULL)) |
1627 | ssid_len = 0; | 1640 | ssid_len = 0; |
1628 | else | 1641 | else |
1629 | ssid_len = ssid[1]; | 1642 | ssid_len = ssid[1]; |
1630 | 1643 | ||
1631 | skb = ieee80211_build_probe_req(sdata, ifmgd->associated->bssid, | 1644 | skb = ieee80211_build_probe_req(sdata, cbss->bssid, |
1632 | (u32) -1, ssid + 2, ssid_len, | 1645 | (u32) -1, ssid + 2, ssid_len, |
1633 | NULL, 0, true); | 1646 | NULL, 0, true); |
1634 | 1647 | ||
@@ -1747,6 +1760,7 @@ static void ieee80211_auth_challenge(struct ieee80211_sub_if_data *sdata, | |||
1747 | if (!elems.challenge) | 1760 | if (!elems.challenge) |
1748 | return; | 1761 | return; |
1749 | auth_data->expected_transaction = 4; | 1762 | auth_data->expected_transaction = 4; |
1763 | drv_mgd_prepare_tx(sdata->local, sdata); | ||
1750 | ieee80211_send_auth(sdata, 3, auth_data->algorithm, | 1764 | ieee80211_send_auth(sdata, 3, auth_data->algorithm, |
1751 | elems.challenge - 2, elems.challenge_len + 2, | 1765 | elems.challenge - 2, elems.challenge_len + 2, |
1752 | auth_data->bss->bssid, auth_data->bss->bssid, | 1766 | auth_data->bss->bssid, auth_data->bss->bssid, |
@@ -2630,6 +2644,8 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) | |||
2630 | return -ETIMEDOUT; | 2644 | return -ETIMEDOUT; |
2631 | } | 2645 | } |
2632 | 2646 | ||
2647 | drv_mgd_prepare_tx(local, sdata); | ||
2648 | |||
2633 | if (auth_data->bss->proberesp_ies) { | 2649 | if (auth_data->bss->proberesp_ies) { |
2634 | sdata_info(sdata, "send auth to %pM (try %d/%d)\n", | 2650 | sdata_info(sdata, "send auth to %pM (try %d/%d)\n", |
2635 | auth_data->bss->bssid, auth_data->tries, | 2651 | auth_data->bss->bssid, auth_data->tries, |