diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-06-26 14:27:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-26 14:27:34 -0400 |
commit | 2c443443e715fc79da9b7c3e4f31a71fcf315b09 (patch) | |
tree | 5b73cea04b13c888d94e29000c0a66ed2c23980f /net/mac80211/mlme.c | |
parent | 5ea276963eacbef742fe4854883c0f69c903fcfd (diff) | |
parent | 371a255e863857f988a91a3850d6feeaa4f3c536 (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 | 203 |
1 files changed, 93 insertions, 110 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 8149a37c93ee..f1a80da4e56a 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1186,19 +1186,16 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local, | |||
1186 | params.txop = get_unaligned_le16(pos + 2); | 1186 | params.txop = get_unaligned_le16(pos + 2); |
1187 | params.uapsd = uapsd; | 1187 | params.uapsd = uapsd; |
1188 | 1188 | ||
1189 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1189 | mlme_dbg(sdata, |
1190 | wiphy_debug(local->hw.wiphy, | 1190 | "WMM queue=%d aci=%d acm=%d aifs=%d cWmin=%d cWmax=%d txop=%d uapsd=%d\n", |
1191 | "WMM queue=%d aci=%d acm=%d aifs=%d " | 1191 | queue, aci, acm, |
1192 | "cWmin=%d cWmax=%d txop=%d uapsd=%d\n", | 1192 | params.aifs, params.cw_min, params.cw_max, |
1193 | queue, aci, acm, | 1193 | params.txop, params.uapsd); |
1194 | params.aifs, params.cw_min, params.cw_max, | ||
1195 | params.txop, params.uapsd); | ||
1196 | #endif | ||
1197 | sdata->tx_conf[queue] = params; | 1194 | sdata->tx_conf[queue] = params; |
1198 | if (drv_conf_tx(local, sdata, queue, ¶ms)) | 1195 | if (drv_conf_tx(local, sdata, queue, ¶ms)) |
1199 | wiphy_debug(local->hw.wiphy, | 1196 | sdata_err(sdata, |
1200 | "failed to set TX queue parameters for queue %d\n", | 1197 | "failed to set TX queue parameters for queue %d\n", |
1201 | queue); | 1198 | queue); |
1202 | } | 1199 | } |
1203 | 1200 | ||
1204 | /* enable WMM or activate new settings */ | 1201 | /* enable WMM or activate new settings */ |
@@ -1567,11 +1564,10 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata, | |||
1567 | goto out; | 1564 | goto out; |
1568 | } | 1565 | } |
1569 | 1566 | ||
1570 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | ||
1571 | if (beacon) | 1567 | if (beacon) |
1572 | net_dbg_ratelimited("%s: detected beacon loss from AP - sending probe request\n", | 1568 | mlme_dbg_ratelimited(sdata, |
1573 | sdata->name); | 1569 | "detected beacon loss from AP - sending probe request\n"); |
1574 | #endif | 1570 | |
1575 | ieee80211_cqm_rssi_notify(&sdata->vif, | 1571 | ieee80211_cqm_rssi_notify(&sdata->vif, |
1576 | NL80211_CQM_RSSI_BEACON_LOSS_EVENT, GFP_KERNEL); | 1572 | NL80211_CQM_RSSI_BEACON_LOSS_EVENT, GFP_KERNEL); |
1577 | 1573 | ||
@@ -1656,7 +1652,7 @@ static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata) | |||
1656 | 1652 | ||
1657 | memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); | 1653 | memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); |
1658 | 1654 | ||
1659 | pr_debug("%s: Connection to AP %pM lost\n", sdata->name, bssid); | 1655 | sdata_info(sdata, "Connection to AP %pM lost\n", bssid); |
1660 | 1656 | ||
1661 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, | 1657 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, |
1662 | WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY, | 1658 | WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY, |
@@ -1790,8 +1786,8 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, | |||
1790 | return RX_MGMT_NONE; | 1786 | return RX_MGMT_NONE; |
1791 | 1787 | ||
1792 | if (status_code != WLAN_STATUS_SUCCESS) { | 1788 | if (status_code != WLAN_STATUS_SUCCESS) { |
1793 | pr_debug("%s: %pM denied authentication (status %d)\n", | 1789 | sdata_info(sdata, "%pM denied authentication (status %d)\n", |
1794 | sdata->name, mgmt->sa, status_code); | 1790 | mgmt->sa, status_code); |
1795 | ieee80211_destroy_auth_data(sdata, false); | 1791 | ieee80211_destroy_auth_data(sdata, false); |
1796 | return RX_MGMT_CFG80211_RX_AUTH; | 1792 | return RX_MGMT_CFG80211_RX_AUTH; |
1797 | } | 1793 | } |
@@ -1814,7 +1810,7 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, | |||
1814 | return RX_MGMT_NONE; | 1810 | return RX_MGMT_NONE; |
1815 | } | 1811 | } |
1816 | 1812 | ||
1817 | pr_debug("%s: authenticated\n", sdata->name); | 1813 | sdata_info(sdata, "authenticated\n"); |
1818 | ifmgd->auth_data->done = true; | 1814 | ifmgd->auth_data->done = true; |
1819 | ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC; | 1815 | ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC; |
1820 | run_again(ifmgd, ifmgd->auth_data->timeout); | 1816 | run_again(ifmgd, ifmgd->auth_data->timeout); |
@@ -1827,7 +1823,7 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, | |||
1827 | goto out_err; | 1823 | goto out_err; |
1828 | } | 1824 | } |
1829 | if (sta_info_move_state(sta, IEEE80211_STA_AUTH)) { | 1825 | if (sta_info_move_state(sta, IEEE80211_STA_AUTH)) { |
1830 | pr_debug("%s: failed moving %pM to auth\n", sdata->name, bssid); | 1826 | sdata_info(sdata, "failed moving %pM to auth\n", bssid); |
1831 | goto out_err; | 1827 | goto out_err; |
1832 | } | 1828 | } |
1833 | mutex_unlock(&sdata->local->sta_mtx); | 1829 | mutex_unlock(&sdata->local->sta_mtx); |
@@ -1861,8 +1857,8 @@ ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, | |||
1861 | 1857 | ||
1862 | reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); | 1858 | reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); |
1863 | 1859 | ||
1864 | pr_debug("%s: deauthenticated from %pM (Reason: %u)\n", | 1860 | sdata_info(sdata, "deauthenticated from %pM (Reason: %u)\n", |
1865 | sdata->name, bssid, reason_code); | 1861 | bssid, reason_code); |
1866 | 1862 | ||
1867 | ieee80211_set_disassoc(sdata, 0, 0, false, NULL); | 1863 | ieee80211_set_disassoc(sdata, 0, 0, false, NULL); |
1868 | 1864 | ||
@@ -1892,8 +1888,8 @@ ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1892 | 1888 | ||
1893 | reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); | 1889 | reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); |
1894 | 1890 | ||
1895 | pr_debug("%s: disassociated from %pM (Reason: %u)\n", | 1891 | sdata_info(sdata, "disassociated from %pM (Reason: %u)\n", |
1896 | sdata->name, mgmt->sa, reason_code); | 1892 | mgmt->sa, reason_code); |
1897 | 1893 | ||
1898 | ieee80211_set_disassoc(sdata, 0, 0, false, NULL); | 1894 | ieee80211_set_disassoc(sdata, 0, 0, false, NULL); |
1899 | 1895 | ||
@@ -1985,15 +1981,15 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata, | |||
1985 | capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info); | 1981 | capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info); |
1986 | 1982 | ||
1987 | if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) | 1983 | if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) |
1988 | pr_debug("%s: invalid AID value 0x%x; bits 15:14 not set\n", | 1984 | sdata_info(sdata, "invalid AID value 0x%x; bits 15:14 not set\n", |
1989 | sdata->name, aid); | 1985 | aid); |
1990 | aid &= ~(BIT(15) | BIT(14)); | 1986 | aid &= ~(BIT(15) | BIT(14)); |
1991 | 1987 | ||
1992 | ifmgd->broken_ap = false; | 1988 | ifmgd->broken_ap = false; |
1993 | 1989 | ||
1994 | if (aid == 0 || aid > IEEE80211_MAX_AID) { | 1990 | if (aid == 0 || aid > IEEE80211_MAX_AID) { |
1995 | pr_debug("%s: invalid AID value %d (out of range), turn off PS\n", | 1991 | sdata_info(sdata, "invalid AID value %d (out of range), turn off PS\n", |
1996 | sdata->name, aid); | 1992 | aid); |
1997 | aid = 0; | 1993 | aid = 0; |
1998 | ifmgd->broken_ap = true; | 1994 | ifmgd->broken_ap = true; |
1999 | } | 1995 | } |
@@ -2002,8 +1998,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata, | |||
2002 | ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); | 1998 | ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); |
2003 | 1999 | ||
2004 | if (!elems.supp_rates) { | 2000 | if (!elems.supp_rates) { |
2005 | pr_debug("%s: no SuppRates element in AssocResp\n", | 2001 | sdata_info(sdata, "no SuppRates element in AssocResp\n"); |
2006 | sdata->name); | ||
2007 | return false; | 2002 | return false; |
2008 | } | 2003 | } |
2009 | 2004 | ||
@@ -2043,8 +2038,9 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata, | |||
2043 | if (!err && !(ifmgd->flags & IEEE80211_STA_CONTROL_PORT)) | 2038 | if (!err && !(ifmgd->flags & IEEE80211_STA_CONTROL_PORT)) |
2044 | err = sta_info_move_state(sta, IEEE80211_STA_AUTHORIZED); | 2039 | err = sta_info_move_state(sta, IEEE80211_STA_AUTHORIZED); |
2045 | if (err) { | 2040 | if (err) { |
2046 | pr_debug("%s: failed to move station %pM to desired state\n", | 2041 | sdata_info(sdata, |
2047 | sdata->name, sta->sta.addr); | 2042 | "failed to move station %pM to desired state\n", |
2043 | sta->sta.addr); | ||
2048 | WARN_ON(__sta_info_destroy(sta)); | 2044 | WARN_ON(__sta_info_destroy(sta)); |
2049 | mutex_unlock(&sdata->local->sta_mtx); | 2045 | mutex_unlock(&sdata->local->sta_mtx); |
2050 | return false; | 2046 | return false; |
@@ -2127,9 +2123,10 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
2127 | status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); | 2123 | status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); |
2128 | aid = le16_to_cpu(mgmt->u.assoc_resp.aid); | 2124 | aid = le16_to_cpu(mgmt->u.assoc_resp.aid); |
2129 | 2125 | ||
2130 | pr_debug("%s: RX %sssocResp from %pM (capab=0x%x status=%d aid=%d)\n", | 2126 | sdata_info(sdata, |
2131 | sdata->name, reassoc ? "Rea" : "A", mgmt->sa, | 2127 | "RX %sssocResp from %pM (capab=0x%x status=%d aid=%d)\n", |
2132 | capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); | 2128 | reassoc ? "Rea" : "A", mgmt->sa, |
2129 | capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); | ||
2133 | 2130 | ||
2134 | pos = mgmt->u.assoc_resp.variable; | 2131 | pos = mgmt->u.assoc_resp.variable; |
2135 | ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); | 2132 | ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); |
@@ -2140,8 +2137,9 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
2140 | u32 tu, ms; | 2137 | u32 tu, ms; |
2141 | tu = get_unaligned_le32(elems.timeout_int + 1); | 2138 | tu = get_unaligned_le32(elems.timeout_int + 1); |
2142 | ms = tu * 1024 / 1000; | 2139 | ms = tu * 1024 / 1000; |
2143 | pr_debug("%s: %pM rejected association temporarily; comeback duration %u TU (%u ms)\n", | 2140 | sdata_info(sdata, |
2144 | sdata->name, mgmt->sa, tu, ms); | 2141 | "%pM rejected association temporarily; comeback duration %u TU (%u ms)\n", |
2142 | mgmt->sa, tu, ms); | ||
2145 | assoc_data->timeout = jiffies + msecs_to_jiffies(ms); | 2143 | assoc_data->timeout = jiffies + msecs_to_jiffies(ms); |
2146 | if (ms > IEEE80211_ASSOC_TIMEOUT) | 2144 | if (ms > IEEE80211_ASSOC_TIMEOUT) |
2147 | run_again(ifmgd, assoc_data->timeout); | 2145 | run_again(ifmgd, assoc_data->timeout); |
@@ -2151,11 +2149,11 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
2151 | *bss = assoc_data->bss; | 2149 | *bss = assoc_data->bss; |
2152 | 2150 | ||
2153 | if (status_code != WLAN_STATUS_SUCCESS) { | 2151 | if (status_code != WLAN_STATUS_SUCCESS) { |
2154 | pr_debug("%s: %pM denied association (code=%d)\n", | 2152 | sdata_info(sdata, "%pM denied association (code=%d)\n", |
2155 | sdata->name, mgmt->sa, status_code); | 2153 | mgmt->sa, status_code); |
2156 | ieee80211_destroy_assoc_data(sdata, false); | 2154 | ieee80211_destroy_assoc_data(sdata, false); |
2157 | } else { | 2155 | } else { |
2158 | pr_debug("%s: associated\n", sdata->name); | 2156 | sdata_info(sdata, "associated\n"); |
2159 | 2157 | ||
2160 | if (!ieee80211_assoc_success(sdata, *bss, mgmt, len)) { | 2158 | if (!ieee80211_assoc_success(sdata, *bss, mgmt, len)) { |
2161 | /* oops -- internal error -- send timeout for now */ | 2159 | /* oops -- internal error -- send timeout for now */ |
@@ -2263,7 +2261,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, | |||
2263 | if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies && | 2261 | if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies && |
2264 | ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss->bssid)) { | 2262 | ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss->bssid)) { |
2265 | /* got probe response, continue with auth */ | 2263 | /* got probe response, continue with auth */ |
2266 | pr_debug("%s: direct probe responded\n", sdata->name); | 2264 | sdata_info(sdata, "direct probe responded\n"); |
2267 | ifmgd->auth_data->tries = 0; | 2265 | ifmgd->auth_data->tries = 0; |
2268 | ifmgd->auth_data->timeout = jiffies; | 2266 | ifmgd->auth_data->timeout = jiffies; |
2269 | run_again(ifmgd, ifmgd->auth_data->timeout); | 2267 | run_again(ifmgd, ifmgd->auth_data->timeout); |
@@ -2399,10 +2397,8 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2399 | } | 2397 | } |
2400 | 2398 | ||
2401 | if (ifmgd->flags & IEEE80211_STA_BEACON_POLL) { | 2399 | if (ifmgd->flags & IEEE80211_STA_BEACON_POLL) { |
2402 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 2400 | mlme_dbg_ratelimited(sdata, |
2403 | net_dbg_ratelimited("%s: cancelling probereq poll due to a received beacon\n", | 2401 | "cancelling probereq poll due to a received beacon\n"); |
2404 | sdata->name); | ||
2405 | #endif | ||
2406 | mutex_lock(&local->mtx); | 2402 | mutex_lock(&local->mtx); |
2407 | ifmgd->flags &= ~IEEE80211_STA_BEACON_POLL; | 2403 | ifmgd->flags &= ~IEEE80211_STA_BEACON_POLL; |
2408 | ieee80211_run_deferred_scan(local); | 2404 | ieee80211_run_deferred_scan(local); |
@@ -2625,8 +2621,8 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) | |||
2625 | auth_data->tries++; | 2621 | auth_data->tries++; |
2626 | 2622 | ||
2627 | if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) { | 2623 | if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) { |
2628 | pr_debug("%s: authentication with %pM timed out\n", | 2624 | sdata_info(sdata, "authentication with %pM timed out\n", |
2629 | sdata->name, auth_data->bss->bssid); | 2625 | auth_data->bss->bssid); |
2630 | 2626 | ||
2631 | /* | 2627 | /* |
2632 | * Most likely AP is not in the range so remove the | 2628 | * Most likely AP is not in the range so remove the |
@@ -2638,9 +2634,9 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) | |||
2638 | } | 2634 | } |
2639 | 2635 | ||
2640 | if (auth_data->bss->proberesp_ies) { | 2636 | if (auth_data->bss->proberesp_ies) { |
2641 | pr_debug("%s: send auth to %pM (try %d/%d)\n", | 2637 | sdata_info(sdata, "send auth to %pM (try %d/%d)\n", |
2642 | sdata->name, auth_data->bss->bssid, auth_data->tries, | 2638 | auth_data->bss->bssid, auth_data->tries, |
2643 | IEEE80211_AUTH_MAX_TRIES); | 2639 | IEEE80211_AUTH_MAX_TRIES); |
2644 | 2640 | ||
2645 | auth_data->expected_transaction = 2; | 2641 | auth_data->expected_transaction = 2; |
2646 | ieee80211_send_auth(sdata, 1, auth_data->algorithm, | 2642 | ieee80211_send_auth(sdata, 1, auth_data->algorithm, |
@@ -2650,9 +2646,9 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) | |||
2650 | } else { | 2646 | } else { |
2651 | const u8 *ssidie; | 2647 | const u8 *ssidie; |
2652 | 2648 | ||
2653 | pr_debug("%s: direct probe to %pM (try %d/%i)\n", | 2649 | sdata_info(sdata, "direct probe to %pM (try %d/%i)\n", |
2654 | sdata->name, auth_data->bss->bssid, auth_data->tries, | 2650 | auth_data->bss->bssid, auth_data->tries, |
2655 | IEEE80211_AUTH_MAX_TRIES); | 2651 | IEEE80211_AUTH_MAX_TRIES); |
2656 | 2652 | ||
2657 | ssidie = ieee80211_bss_get_ie(auth_data->bss, WLAN_EID_SSID); | 2653 | ssidie = ieee80211_bss_get_ie(auth_data->bss, WLAN_EID_SSID); |
2658 | if (!ssidie) | 2654 | if (!ssidie) |
@@ -2680,8 +2676,8 @@ static int ieee80211_do_assoc(struct ieee80211_sub_if_data *sdata) | |||
2680 | 2676 | ||
2681 | assoc_data->tries++; | 2677 | assoc_data->tries++; |
2682 | if (assoc_data->tries > IEEE80211_ASSOC_MAX_TRIES) { | 2678 | if (assoc_data->tries > IEEE80211_ASSOC_MAX_TRIES) { |
2683 | pr_debug("%s: association with %pM timed out\n", | 2679 | sdata_info(sdata, "association with %pM timed out\n", |
2684 | sdata->name, assoc_data->bss->bssid); | 2680 | assoc_data->bss->bssid); |
2685 | 2681 | ||
2686 | /* | 2682 | /* |
2687 | * Most likely AP is not in the range so remove the | 2683 | * Most likely AP is not in the range so remove the |
@@ -2692,9 +2688,9 @@ static int ieee80211_do_assoc(struct ieee80211_sub_if_data *sdata) | |||
2692 | return -ETIMEDOUT; | 2688 | return -ETIMEDOUT; |
2693 | } | 2689 | } |
2694 | 2690 | ||
2695 | pr_debug("%s: associate with %pM (try %d/%d)\n", | 2691 | sdata_info(sdata, "associate with %pM (try %d/%d)\n", |
2696 | sdata->name, assoc_data->bss->bssid, assoc_data->tries, | 2692 | assoc_data->bss->bssid, assoc_data->tries, |
2697 | IEEE80211_ASSOC_MAX_TRIES); | 2693 | IEEE80211_ASSOC_MAX_TRIES); |
2698 | ieee80211_send_assoc(sdata); | 2694 | ieee80211_send_assoc(sdata); |
2699 | 2695 | ||
2700 | assoc_data->timeout = jiffies + IEEE80211_ASSOC_TIMEOUT; | 2696 | assoc_data->timeout = jiffies + IEEE80211_ASSOC_TIMEOUT; |
@@ -2767,45 +2763,31 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata) | |||
2767 | ieee80211_reset_ap_probe(sdata); | 2763 | ieee80211_reset_ap_probe(sdata); |
2768 | else if (ifmgd->nullfunc_failed) { | 2764 | else if (ifmgd->nullfunc_failed) { |
2769 | if (ifmgd->probe_send_count < max_tries) { | 2765 | if (ifmgd->probe_send_count < max_tries) { |
2770 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 2766 | mlme_dbg(sdata, |
2771 | wiphy_debug(local->hw.wiphy, | 2767 | "No ack for nullfunc frame to AP %pM, try %d/%i\n", |
2772 | "%s: No ack for nullfunc frame to" | 2768 | bssid, ifmgd->probe_send_count, |
2773 | " AP %pM, try %d/%i\n", | 2769 | max_tries); |
2774 | sdata->name, bssid, | ||
2775 | ifmgd->probe_send_count, max_tries); | ||
2776 | #endif | ||
2777 | ieee80211_mgd_probe_ap_send(sdata); | 2770 | ieee80211_mgd_probe_ap_send(sdata); |
2778 | } else { | 2771 | } else { |
2779 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 2772 | mlme_dbg(sdata, |
2780 | wiphy_debug(local->hw.wiphy, | 2773 | "No ack for nullfunc frame to AP %pM, disconnecting.\n", |
2781 | "%s: No ack for nullfunc frame to" | 2774 | bssid); |
2782 | " AP %pM, disconnecting.\n", | ||
2783 | sdata->name, bssid); | ||
2784 | #endif | ||
2785 | ieee80211_sta_connection_lost(sdata, bssid, | 2775 | ieee80211_sta_connection_lost(sdata, bssid, |
2786 | WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY); | 2776 | WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY); |
2787 | } | 2777 | } |
2788 | } else if (time_is_after_jiffies(ifmgd->probe_timeout)) | 2778 | } else if (time_is_after_jiffies(ifmgd->probe_timeout)) |
2789 | run_again(ifmgd, ifmgd->probe_timeout); | 2779 | run_again(ifmgd, ifmgd->probe_timeout); |
2790 | else if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) { | 2780 | else if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) { |
2791 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 2781 | mlme_dbg(sdata, |
2792 | wiphy_debug(local->hw.wiphy, | 2782 | "Failed to send nullfunc to AP %pM after %dms, disconnecting\n", |
2793 | "%s: Failed to send nullfunc to AP %pM" | 2783 | bssid, probe_wait_ms); |
2794 | " after %dms, disconnecting.\n", | ||
2795 | sdata->name, | ||
2796 | bssid, probe_wait_ms); | ||
2797 | #endif | ||
2798 | ieee80211_sta_connection_lost(sdata, bssid, | 2784 | ieee80211_sta_connection_lost(sdata, bssid, |
2799 | WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY); | 2785 | WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY); |
2800 | } else if (ifmgd->probe_send_count < max_tries) { | 2786 | } else if (ifmgd->probe_send_count < max_tries) { |
2801 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 2787 | mlme_dbg(sdata, |
2802 | wiphy_debug(local->hw.wiphy, | 2788 | "No probe response from AP %pM after %dms, try %d/%i\n", |
2803 | "%s: No probe response from AP %pM" | 2789 | bssid, probe_wait_ms, |
2804 | " after %dms, try %d/%i\n", | 2790 | ifmgd->probe_send_count, max_tries); |
2805 | sdata->name, | ||
2806 | bssid, probe_wait_ms, | ||
2807 | ifmgd->probe_send_count, max_tries); | ||
2808 | #endif | ||
2809 | ieee80211_mgd_probe_ap_send(sdata); | 2791 | ieee80211_mgd_probe_ap_send(sdata); |
2810 | } else { | 2792 | } else { |
2811 | /* | 2793 | /* |
@@ -2920,11 +2902,8 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata) | |||
2920 | sdata->flags &= ~IEEE80211_SDATA_DISCONNECT_RESUME; | 2902 | sdata->flags &= ~IEEE80211_SDATA_DISCONNECT_RESUME; |
2921 | mutex_lock(&ifmgd->mtx); | 2903 | mutex_lock(&ifmgd->mtx); |
2922 | if (ifmgd->associated) { | 2904 | if (ifmgd->associated) { |
2923 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 2905 | mlme_dbg(sdata, |
2924 | wiphy_debug(sdata->local->hw.wiphy, | 2906 | "driver requested disconnect after resume\n"); |
2925 | "%s: driver requested disconnect after resume.\n", | ||
2926 | sdata->name); | ||
2927 | #endif | ||
2928 | ieee80211_sta_connection_lost(sdata, | 2907 | ieee80211_sta_connection_lost(sdata, |
2929 | ifmgd->associated->bssid, | 2908 | ifmgd->associated->bssid, |
2930 | WLAN_REASON_UNSPECIFIED); | 2909 | WLAN_REASON_UNSPECIFIED); |
@@ -3065,10 +3044,11 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3065 | * since we look at probe response/beacon data here | 3044 | * since we look at probe response/beacon data here |
3066 | * it should be OK. | 3045 | * it should be OK. |
3067 | */ | 3046 | */ |
3068 | pr_debug("%s: Wrong control channel: center-freq: %d ht-cfreq: %d ht->primary_chan: %d band: %d - Disabling HT\n", | 3047 | sdata_info(sdata, |
3069 | sdata->name, cbss->channel->center_freq, | 3048 | "Wrong control channel: center-freq: %d ht-cfreq: %d ht->primary_chan: %d band: %d - Disabling HT\n", |
3070 | ht_cfreq, ht_oper->primary_chan, | 3049 | cbss->channel->center_freq, |
3071 | cbss->channel->band); | 3050 | ht_cfreq, ht_oper->primary_chan, |
3051 | cbss->channel->band); | ||
3072 | ht_oper = NULL; | 3052 | ht_oper = NULL; |
3073 | } | 3053 | } |
3074 | } | 3054 | } |
@@ -3092,8 +3072,8 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3092 | if (!ieee80211_set_channel_type(local, sdata, channel_type)) { | 3072 | if (!ieee80211_set_channel_type(local, sdata, channel_type)) { |
3093 | /* can only fail due to HT40+/- mismatch */ | 3073 | /* can only fail due to HT40+/- mismatch */ |
3094 | channel_type = NL80211_CHAN_HT20; | 3074 | channel_type = NL80211_CHAN_HT20; |
3095 | pr_debug("%s: disabling 40 MHz due to multi-vif mismatch\n", | 3075 | sdata_info(sdata, |
3096 | sdata->name); | 3076 | "disabling 40 MHz due to multi-vif mismatch\n"); |
3097 | ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ; | 3077 | ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ; |
3098 | WARN_ON(!ieee80211_set_channel_type(local, sdata, | 3078 | WARN_ON(!ieee80211_set_channel_type(local, sdata, |
3099 | channel_type)); | 3079 | channel_type)); |
@@ -3122,8 +3102,8 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3122 | * we can connect -- with a warning. | 3102 | * we can connect -- with a warning. |
3123 | */ | 3103 | */ |
3124 | if (!basic_rates && min_rate_index >= 0) { | 3104 | if (!basic_rates && min_rate_index >= 0) { |
3125 | pr_debug("%s: No basic rates, using min rate instead\n", | 3105 | sdata_info(sdata, |
3126 | sdata->name); | 3106 | "No basic rates, using min rate instead\n"); |
3127 | basic_rates = BIT(min_rate_index); | 3107 | basic_rates = BIT(min_rate_index); |
3128 | } | 3108 | } |
3129 | 3109 | ||
@@ -3149,8 +3129,9 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3149 | err = sta_info_insert(sta); | 3129 | err = sta_info_insert(sta); |
3150 | sta = NULL; | 3130 | sta = NULL; |
3151 | if (err) { | 3131 | if (err) { |
3152 | pr_debug("%s: failed to insert STA entry for the AP (error %d)\n", | 3132 | sdata_info(sdata, |
3153 | sdata->name, err); | 3133 | "failed to insert STA entry for the AP (error %d)\n", |
3134 | err); | ||
3154 | return err; | 3135 | return err; |
3155 | } | 3136 | } |
3156 | } else | 3137 | } else |
@@ -3228,7 +3209,7 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, | |||
3228 | if (ifmgd->associated) | 3209 | if (ifmgd->associated) |
3229 | ieee80211_set_disassoc(sdata, 0, 0, false, NULL); | 3210 | ieee80211_set_disassoc(sdata, 0, 0, false, NULL); |
3230 | 3211 | ||
3231 | pr_debug("%s: authenticate with %pM\n", sdata->name, req->bss->bssid); | 3212 | sdata_info(sdata, "authenticate with %pM\n", req->bss->bssid); |
3232 | 3213 | ||
3233 | err = ieee80211_prep_connection(sdata, req->bss, false); | 3214 | err = ieee80211_prep_connection(sdata, req->bss, false); |
3234 | if (err) | 3215 | if (err) |
@@ -3410,8 +3391,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3410 | * Wait up to one beacon interval ... | 3391 | * Wait up to one beacon interval ... |
3411 | * should this be more if we miss one? | 3392 | * should this be more if we miss one? |
3412 | */ | 3393 | */ |
3413 | pr_debug("%s: waiting for beacon from %pM\n", | 3394 | sdata_info(sdata, "waiting for beacon from %pM\n", |
3414 | sdata->name, ifmgd->bssid); | 3395 | ifmgd->bssid); |
3415 | assoc_data->timeout = TU_TO_EXP_TIME(req->bss->beacon_interval); | 3396 | assoc_data->timeout = TU_TO_EXP_TIME(req->bss->beacon_interval); |
3416 | } else { | 3397 | } else { |
3417 | assoc_data->have_beacon = true; | 3398 | assoc_data->have_beacon = true; |
@@ -3430,8 +3411,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3430 | corrupt_type = "beacon"; | 3411 | corrupt_type = "beacon"; |
3431 | } else if (bss->corrupt_data & IEEE80211_BSS_CORRUPT_PROBE_RESP) | 3412 | } else if (bss->corrupt_data & IEEE80211_BSS_CORRUPT_PROBE_RESP) |
3432 | corrupt_type = "probe response"; | 3413 | corrupt_type = "probe response"; |
3433 | pr_debug("%s: associating with AP with corrupt %s\n", | 3414 | sdata_info(sdata, "associating with AP with corrupt %s\n", |
3434 | sdata->name, corrupt_type); | 3415 | corrupt_type); |
3435 | } | 3416 | } |
3436 | 3417 | ||
3437 | err = 0; | 3418 | err = 0; |
@@ -3460,8 +3441,9 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
3460 | return 0; | 3441 | return 0; |
3461 | } | 3442 | } |
3462 | 3443 | ||
3463 | pr_debug("%s: deauthenticating from %pM by local choice (reason=%d)\n", | 3444 | sdata_info(sdata, |
3464 | sdata->name, req->bssid, req->reason_code); | 3445 | "deauthenticating from %pM by local choice (reason=%d)\n", |
3446 | req->bssid, req->reason_code); | ||
3465 | 3447 | ||
3466 | if (ifmgd->associated && | 3448 | if (ifmgd->associated && |
3467 | ether_addr_equal(ifmgd->associated->bssid, req->bssid)) | 3449 | ether_addr_equal(ifmgd->associated->bssid, req->bssid)) |
@@ -3503,8 +3485,9 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, | |||
3503 | return -ENOLINK; | 3485 | return -ENOLINK; |
3504 | } | 3486 | } |
3505 | 3487 | ||
3506 | pr_debug("%s: disassociating from %pM by local choice (reason=%d)\n", | 3488 | sdata_info(sdata, |
3507 | sdata->name, req->bss->bssid, req->reason_code); | 3489 | "disassociating from %pM by local choice (reason=%d)\n", |
3490 | req->bss->bssid, req->reason_code); | ||
3508 | 3491 | ||
3509 | memcpy(bssid, req->bss->bssid, ETH_ALEN); | 3492 | memcpy(bssid, req->bss->bssid, ETH_ALEN); |
3510 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DISASSOC, | 3493 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DISASSOC, |