diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-05-20 15:19:01 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-05-20 15:19:01 -0400 |
commit | ba7c96bec59d1c11cf9eaf6489e70e22f53da31b (patch) | |
tree | 6d5c92ee3b4fa2d422f11d05da308a7cde614a5f /net | |
parent | 057cf65e4f715f62acccbd9125cf63eddfe69d30 (diff) | |
parent | 6bb4880d9ef30375da4507aeabd6dc261a2c6c2b (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 1 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 61 | ||||
-rw-r--r-- | net/mac80211/rate.c | 9 | ||||
-rw-r--r-- | net/mac80211/rx.c | 3 | ||||
-rw-r--r-- | net/mac80211/tkip.c | 4 | ||||
-rw-r--r-- | net/mac80211/util.c | 7 | ||||
-rw-r--r-- | net/wireless/core.c | 17 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 4 | ||||
-rw-r--r-- | net/wireless/sme.c | 3 | ||||
-rw-r--r-- | net/wireless/trace.h | 23 |
10 files changed, 101 insertions, 31 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 158e6eb188d3..44be28cfc6c4 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1267,6 +1267,7 @@ void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata); | |||
1267 | void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata); | 1267 | void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata); |
1268 | void ieee80211_mgd_conn_tx_status(struct ieee80211_sub_if_data *sdata, | 1268 | void ieee80211_mgd_conn_tx_status(struct ieee80211_sub_if_data *sdata, |
1269 | __le16 fc, bool acked); | 1269 | __le16 fc, bool acked); |
1270 | void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata); | ||
1270 | 1271 | ||
1271 | /* IBSS code */ | 1272 | /* IBSS code */ |
1272 | void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local); | 1273 | void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local); |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 29620bfc7a69..a46e490f20dd 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1015,7 +1015,8 @@ static void ieee80211_chswitch_timer(unsigned long data) | |||
1015 | 1015 | ||
1016 | static void | 1016 | static void |
1017 | ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, | 1017 | ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, |
1018 | u64 timestamp, struct ieee802_11_elems *elems) | 1018 | u64 timestamp, struct ieee802_11_elems *elems, |
1019 | bool beacon) | ||
1019 | { | 1020 | { |
1020 | struct ieee80211_local *local = sdata->local; | 1021 | struct ieee80211_local *local = sdata->local; |
1021 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 1022 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
@@ -1032,6 +1033,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
1032 | struct cfg80211_chan_def new_vht_chandef = {}; | 1033 | struct cfg80211_chan_def new_vht_chandef = {}; |
1033 | const struct ieee80211_sec_chan_offs_ie *sec_chan_offs; | 1034 | const struct ieee80211_sec_chan_offs_ie *sec_chan_offs; |
1034 | const struct ieee80211_wide_bw_chansw_ie *wide_bw_chansw_ie; | 1035 | const struct ieee80211_wide_bw_chansw_ie *wide_bw_chansw_ie; |
1036 | const struct ieee80211_ht_operation *ht_oper; | ||
1035 | int secondary_channel_offset = -1; | 1037 | int secondary_channel_offset = -1; |
1036 | 1038 | ||
1037 | ASSERT_MGD_MTX(ifmgd); | 1039 | ASSERT_MGD_MTX(ifmgd); |
@@ -1048,11 +1050,14 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
1048 | 1050 | ||
1049 | sec_chan_offs = elems->sec_chan_offs; | 1051 | sec_chan_offs = elems->sec_chan_offs; |
1050 | wide_bw_chansw_ie = elems->wide_bw_chansw_ie; | 1052 | wide_bw_chansw_ie = elems->wide_bw_chansw_ie; |
1053 | ht_oper = elems->ht_operation; | ||
1051 | 1054 | ||
1052 | if (ifmgd->flags & (IEEE80211_STA_DISABLE_HT | | 1055 | if (ifmgd->flags & (IEEE80211_STA_DISABLE_HT | |
1053 | IEEE80211_STA_DISABLE_40MHZ)) { | 1056 | IEEE80211_STA_DISABLE_40MHZ)) { |
1054 | sec_chan_offs = NULL; | 1057 | sec_chan_offs = NULL; |
1055 | wide_bw_chansw_ie = NULL; | 1058 | wide_bw_chansw_ie = NULL; |
1059 | /* only used for bandwidth here */ | ||
1060 | ht_oper = NULL; | ||
1056 | } | 1061 | } |
1057 | 1062 | ||
1058 | if (ifmgd->flags & IEEE80211_STA_DISABLE_VHT) | 1063 | if (ifmgd->flags & IEEE80211_STA_DISABLE_VHT) |
@@ -1094,10 +1099,20 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
1094 | return; | 1099 | return; |
1095 | } | 1100 | } |
1096 | 1101 | ||
1097 | if (sec_chan_offs) { | 1102 | if (!beacon && sec_chan_offs) { |
1098 | secondary_channel_offset = sec_chan_offs->sec_chan_offs; | 1103 | secondary_channel_offset = sec_chan_offs->sec_chan_offs; |
1104 | } else if (beacon && ht_oper) { | ||
1105 | secondary_channel_offset = | ||
1106 | ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET; | ||
1099 | } else if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HT)) { | 1107 | } else if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HT)) { |
1100 | /* if HT is enabled and the IE not present, it's still HT */ | 1108 | /* |
1109 | * If it's not a beacon, HT is enabled and the IE not present, | ||
1110 | * it's 20 MHz, 802.11-2012 8.5.2.6: | ||
1111 | * This element [the Secondary Channel Offset Element] is | ||
1112 | * present when switching to a 40 MHz channel. It may be | ||
1113 | * present when switching to a 20 MHz channel (in which | ||
1114 | * case the secondary channel offset is set to SCN). | ||
1115 | */ | ||
1101 | secondary_channel_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE; | 1116 | secondary_channel_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE; |
1102 | } | 1117 | } |
1103 | 1118 | ||
@@ -2796,7 +2811,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
2796 | mutex_unlock(&local->iflist_mtx); | 2811 | mutex_unlock(&local->iflist_mtx); |
2797 | } | 2812 | } |
2798 | 2813 | ||
2799 | ieee80211_sta_process_chanswitch(sdata, rx_status->mactime, elems); | 2814 | ieee80211_sta_process_chanswitch(sdata, rx_status->mactime, |
2815 | elems, true); | ||
2800 | 2816 | ||
2801 | } | 2817 | } |
2802 | 2818 | ||
@@ -3210,7 +3226,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
3210 | 3226 | ||
3211 | ieee80211_sta_process_chanswitch(sdata, | 3227 | ieee80211_sta_process_chanswitch(sdata, |
3212 | rx_status->mactime, | 3228 | rx_status->mactime, |
3213 | &elems); | 3229 | &elems, false); |
3214 | } else if (mgmt->u.action.category == WLAN_CATEGORY_PUBLIC) { | 3230 | } else if (mgmt->u.action.category == WLAN_CATEGORY_PUBLIC) { |
3215 | ies_len = skb->len - | 3231 | ies_len = skb->len - |
3216 | offsetof(struct ieee80211_mgmt, | 3232 | offsetof(struct ieee80211_mgmt, |
@@ -3232,7 +3248,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
3232 | 3248 | ||
3233 | ieee80211_sta_process_chanswitch(sdata, | 3249 | ieee80211_sta_process_chanswitch(sdata, |
3234 | rx_status->mactime, | 3250 | rx_status->mactime, |
3235 | &elems); | 3251 | &elems, false); |
3236 | } | 3252 | } |
3237 | break; | 3253 | break; |
3238 | } | 3254 | } |
@@ -3623,6 +3639,31 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) | |||
3623 | } | 3639 | } |
3624 | } | 3640 | } |
3625 | 3641 | ||
3642 | #ifdef CONFIG_PM | ||
3643 | void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata) | ||
3644 | { | ||
3645 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | ||
3646 | |||
3647 | mutex_lock(&ifmgd->mtx); | ||
3648 | if (!ifmgd->associated) { | ||
3649 | mutex_unlock(&ifmgd->mtx); | ||
3650 | return; | ||
3651 | } | ||
3652 | |||
3653 | if (sdata->flags & IEEE80211_SDATA_DISCONNECT_RESUME) { | ||
3654 | sdata->flags &= ~IEEE80211_SDATA_DISCONNECT_RESUME; | ||
3655 | mlme_dbg(sdata, "driver requested disconnect after resume\n"); | ||
3656 | ieee80211_sta_connection_lost(sdata, | ||
3657 | ifmgd->associated->bssid, | ||
3658 | WLAN_REASON_UNSPECIFIED, | ||
3659 | true); | ||
3660 | mutex_unlock(&ifmgd->mtx); | ||
3661 | return; | ||
3662 | } | ||
3663 | mutex_unlock(&ifmgd->mtx); | ||
3664 | } | ||
3665 | #endif | ||
3666 | |||
3626 | /* interface setup */ | 3667 | /* interface setup */ |
3627 | void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) | 3668 | void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) |
3628 | { | 3669 | { |
@@ -4329,7 +4370,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
4329 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 4370 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
4330 | u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; | 4371 | u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; |
4331 | bool tx = !req->local_state_change; | 4372 | bool tx = !req->local_state_change; |
4332 | bool sent_frame = false; | 4373 | bool report_frame = false; |
4333 | 4374 | ||
4334 | mutex_lock(&ifmgd->mtx); | 4375 | mutex_lock(&ifmgd->mtx); |
4335 | 4376 | ||
@@ -4346,7 +4387,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
4346 | ieee80211_destroy_auth_data(sdata, false); | 4387 | ieee80211_destroy_auth_data(sdata, false); |
4347 | mutex_unlock(&ifmgd->mtx); | 4388 | mutex_unlock(&ifmgd->mtx); |
4348 | 4389 | ||
4349 | sent_frame = tx; | 4390 | report_frame = true; |
4350 | goto out; | 4391 | goto out; |
4351 | } | 4392 | } |
4352 | 4393 | ||
@@ -4354,12 +4395,12 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
4354 | ether_addr_equal(ifmgd->associated->bssid, req->bssid)) { | 4395 | ether_addr_equal(ifmgd->associated->bssid, req->bssid)) { |
4355 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, | 4396 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, |
4356 | req->reason_code, tx, frame_buf); | 4397 | req->reason_code, tx, frame_buf); |
4357 | sent_frame = tx; | 4398 | report_frame = true; |
4358 | } | 4399 | } |
4359 | mutex_unlock(&ifmgd->mtx); | 4400 | mutex_unlock(&ifmgd->mtx); |
4360 | 4401 | ||
4361 | out: | 4402 | out: |
4362 | if (sent_frame) | 4403 | if (report_frame) |
4363 | __cfg80211_send_deauth(sdata->dev, frame_buf, | 4404 | __cfg80211_send_deauth(sdata->dev, frame_buf, |
4364 | IEEE80211_DEAUTH_FRAME_LEN); | 4405 | IEEE80211_DEAUTH_FRAME_LEN); |
4365 | 4406 | ||
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 0d51877efdb7..d3f414fe67e0 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -688,8 +688,15 @@ int rate_control_set_rates(struct ieee80211_hw *hw, | |||
688 | struct ieee80211_sta *pubsta, | 688 | struct ieee80211_sta *pubsta, |
689 | struct ieee80211_sta_rates *rates) | 689 | struct ieee80211_sta_rates *rates) |
690 | { | 690 | { |
691 | struct ieee80211_sta_rates *old = rcu_dereference(pubsta->rates); | 691 | struct ieee80211_sta_rates *old; |
692 | 692 | ||
693 | /* | ||
694 | * mac80211 guarantees that this function will not be called | ||
695 | * concurrently, so the following RCU access is safe, even without | ||
696 | * extra locking. This can not be checked easily, so we just set | ||
697 | * the condition to true. | ||
698 | */ | ||
699 | old = rcu_dereference_protected(pubsta->rates, true); | ||
693 | rcu_assign_pointer(pubsta->rates, rates); | 700 | rcu_assign_pointer(pubsta->rates, rates); |
694 | if (old) | 701 | if (old) |
695 | kfree_rcu(old, rcu_head); | 702 | kfree_rcu(old, rcu_head); |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index c8447af76ead..8e2952620256 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -3036,6 +3036,9 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
3036 | * and location updates. Note that mac80211 | 3036 | * and location updates. Note that mac80211 |
3037 | * itself never looks at these frames. | 3037 | * itself never looks at these frames. |
3038 | */ | 3038 | */ |
3039 | if (!multicast && | ||
3040 | !ether_addr_equal(sdata->vif.addr, hdr->addr1)) | ||
3041 | return 0; | ||
3039 | if (ieee80211_is_public_action(hdr, skb->len)) | 3042 | if (ieee80211_is_public_action(hdr, skb->len)) |
3040 | return 1; | 3043 | return 1; |
3041 | if (!ieee80211_is_beacon(hdr->frame_control)) | 3044 | if (!ieee80211_is_beacon(hdr->frame_control)) |
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c index 3ed801d90f1e..124b1fdc20d0 100644 --- a/net/mac80211/tkip.c +++ b/net/mac80211/tkip.c | |||
@@ -208,10 +208,10 @@ void ieee80211_get_tkip_p2k(struct ieee80211_key_conf *keyconf, | |||
208 | u32 iv32 = get_unaligned_le32(&data[4]); | 208 | u32 iv32 = get_unaligned_le32(&data[4]); |
209 | u16 iv16 = data[2] | (data[0] << 8); | 209 | u16 iv16 = data[2] | (data[0] << 8); |
210 | 210 | ||
211 | spin_lock_bh(&key->u.tkip.txlock); | 211 | spin_lock(&key->u.tkip.txlock); |
212 | ieee80211_compute_tkip_p1k(key, iv32); | 212 | ieee80211_compute_tkip_p1k(key, iv32); |
213 | tkip_mixing_phase2(tk, ctx, iv16, p2k); | 213 | tkip_mixing_phase2(tk, ctx, iv16, p2k); |
214 | spin_unlock_bh(&key->u.tkip.txlock); | 214 | spin_unlock(&key->u.tkip.txlock); |
215 | } | 215 | } |
216 | EXPORT_SYMBOL(ieee80211_get_tkip_p2k); | 216 | EXPORT_SYMBOL(ieee80211_get_tkip_p2k); |
217 | 217 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 3f87fa468b1f..27e07150eb46 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1740,6 +1740,13 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1740 | mb(); | 1740 | mb(); |
1741 | local->resuming = false; | 1741 | local->resuming = false; |
1742 | 1742 | ||
1743 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
1744 | if (!ieee80211_sdata_running(sdata)) | ||
1745 | continue; | ||
1746 | if (sdata->vif.type == NL80211_IFTYPE_STATION) | ||
1747 | ieee80211_sta_restart(sdata); | ||
1748 | } | ||
1749 | |||
1743 | mod_timer(&local->sta_cleanup, jiffies + 1); | 1750 | mod_timer(&local->sta_cleanup, jiffies + 1); |
1744 | #else | 1751 | #else |
1745 | WARN_ON(1); | 1752 | WARN_ON(1); |
diff --git a/net/wireless/core.c b/net/wireless/core.c index 84c9ad7e1dca..73405e00c800 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -638,17 +638,21 @@ int wiphy_register(struct wiphy *wiphy) | |||
638 | * cfg80211_mutex lock | 638 | * cfg80211_mutex lock |
639 | */ | 639 | */ |
640 | res = rfkill_register(rdev->rfkill); | 640 | res = rfkill_register(rdev->rfkill); |
641 | if (res) | 641 | if (res) { |
642 | goto out_rm_dev; | 642 | device_del(&rdev->wiphy.dev); |
643 | |||
644 | mutex_lock(&cfg80211_mutex); | ||
645 | debugfs_remove_recursive(rdev->wiphy.debugfsdir); | ||
646 | list_del_rcu(&rdev->list); | ||
647 | wiphy_regulatory_deregister(wiphy); | ||
648 | mutex_unlock(&cfg80211_mutex); | ||
649 | return res; | ||
650 | } | ||
643 | 651 | ||
644 | rtnl_lock(); | 652 | rtnl_lock(); |
645 | rdev->wiphy.registered = true; | 653 | rdev->wiphy.registered = true; |
646 | rtnl_unlock(); | 654 | rtnl_unlock(); |
647 | return 0; | 655 | return 0; |
648 | |||
649 | out_rm_dev: | ||
650 | device_del(&rdev->wiphy.dev); | ||
651 | return res; | ||
652 | } | 656 | } |
653 | EXPORT_SYMBOL(wiphy_register); | 657 | EXPORT_SYMBOL(wiphy_register); |
654 | 658 | ||
@@ -866,7 +870,6 @@ void cfg80211_leave(struct cfg80211_registered_device *rdev, | |||
866 | #endif | 870 | #endif |
867 | __cfg80211_disconnect(rdev, dev, | 871 | __cfg80211_disconnect(rdev, dev, |
868 | WLAN_REASON_DEAUTH_LEAVING, true); | 872 | WLAN_REASON_DEAUTH_LEAVING, true); |
869 | cfg80211_mlme_down(rdev, dev); | ||
870 | wdev_unlock(wdev); | 873 | wdev_unlock(wdev); |
871 | break; | 874 | break; |
872 | case NL80211_IFTYPE_MESH_POINT: | 875 | case NL80211_IFTYPE_MESH_POINT: |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index afa283841e8c..dfdb5e643211 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -7577,6 +7577,8 @@ static int nl80211_send_wowlan_tcp(struct sk_buff *msg, | |||
7577 | &tcp->payload_tok)) | 7577 | &tcp->payload_tok)) |
7578 | return -ENOBUFS; | 7578 | return -ENOBUFS; |
7579 | 7579 | ||
7580 | nla_nest_end(msg, nl_tcp); | ||
7581 | |||
7580 | return 0; | 7582 | return 0; |
7581 | } | 7583 | } |
7582 | 7584 | ||
@@ -9970,6 +9972,7 @@ int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, | |||
9970 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 9972 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
9971 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, | 9973 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, |
9972 | netdev->ifindex)) || | 9974 | netdev->ifindex)) || |
9975 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) || | ||
9973 | nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) || | 9976 | nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) || |
9974 | (sig_dbm && | 9977 | (sig_dbm && |
9975 | nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) || | 9978 | nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) || |
@@ -10010,6 +10013,7 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie, | |||
10010 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 10013 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
10011 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, | 10014 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, |
10012 | netdev->ifindex)) || | 10015 | netdev->ifindex)) || |
10016 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) || | ||
10013 | nla_put(msg, NL80211_ATTR_FRAME, len, buf) || | 10017 | nla_put(msg, NL80211_ATTR_FRAME, len, buf) || |
10014 | nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie) || | 10018 | nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie) || |
10015 | (ack && nla_put_flag(msg, NL80211_ATTR_ACK))) | 10019 | (ack && nla_put_flag(msg, NL80211_ATTR_ACK))) |
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index a9dc5c736df0..8b5eddfba1e5 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -961,7 +961,7 @@ int __cfg80211_disconnect(struct cfg80211_registered_device *rdev, | |||
961 | /* was it connected by userspace SME? */ | 961 | /* was it connected by userspace SME? */ |
962 | if (!wdev->conn) { | 962 | if (!wdev->conn) { |
963 | cfg80211_mlme_down(rdev, dev); | 963 | cfg80211_mlme_down(rdev, dev); |
964 | return 0; | 964 | goto disconnect; |
965 | } | 965 | } |
966 | 966 | ||
967 | if (wdev->sme_state == CFG80211_SME_CONNECTING && | 967 | if (wdev->sme_state == CFG80211_SME_CONNECTING && |
@@ -987,6 +987,7 @@ int __cfg80211_disconnect(struct cfg80211_registered_device *rdev, | |||
987 | return err; | 987 | return err; |
988 | } | 988 | } |
989 | 989 | ||
990 | disconnect: | ||
990 | if (wdev->sme_state == CFG80211_SME_CONNECTED) | 991 | if (wdev->sme_state == CFG80211_SME_CONNECTED) |
991 | __cfg80211_disconnected(dev, NULL, 0, 0, false); | 992 | __cfg80211_disconnected(dev, NULL, 0, 0, false); |
992 | else if (wdev->sme_state == CFG80211_SME_CONNECTING) | 993 | else if (wdev->sme_state == CFG80211_SME_CONNECTING) |
diff --git a/net/wireless/trace.h b/net/wireless/trace.h index ecd4fcec3c94..5755bc14abbd 100644 --- a/net/wireless/trace.h +++ b/net/wireless/trace.h | |||
@@ -2441,6 +2441,7 @@ TRACE_EVENT(cfg80211_report_wowlan_wakeup, | |||
2441 | TP_STRUCT__entry( | 2441 | TP_STRUCT__entry( |
2442 | WIPHY_ENTRY | 2442 | WIPHY_ENTRY |
2443 | WDEV_ENTRY | 2443 | WDEV_ENTRY |
2444 | __field(bool, non_wireless) | ||
2444 | __field(bool, disconnect) | 2445 | __field(bool, disconnect) |
2445 | __field(bool, magic_pkt) | 2446 | __field(bool, magic_pkt) |
2446 | __field(bool, gtk_rekey_failure) | 2447 | __field(bool, gtk_rekey_failure) |
@@ -2449,20 +2450,22 @@ TRACE_EVENT(cfg80211_report_wowlan_wakeup, | |||
2449 | __field(bool, rfkill_release) | 2450 | __field(bool, rfkill_release) |
2450 | __field(s32, pattern_idx) | 2451 | __field(s32, pattern_idx) |
2451 | __field(u32, packet_len) | 2452 | __field(u32, packet_len) |
2452 | __dynamic_array(u8, packet, wakeup->packet_present_len) | 2453 | __dynamic_array(u8, packet, |
2454 | wakeup ? wakeup->packet_present_len : 0) | ||
2453 | ), | 2455 | ), |
2454 | TP_fast_assign( | 2456 | TP_fast_assign( |
2455 | WIPHY_ASSIGN; | 2457 | WIPHY_ASSIGN; |
2456 | WDEV_ASSIGN; | 2458 | WDEV_ASSIGN; |
2457 | __entry->disconnect = wakeup->disconnect; | 2459 | __entry->non_wireless = !wakeup; |
2458 | __entry->magic_pkt = wakeup->magic_pkt; | 2460 | __entry->disconnect = wakeup ? wakeup->disconnect : false; |
2459 | __entry->gtk_rekey_failure = wakeup->gtk_rekey_failure; | 2461 | __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false; |
2460 | __entry->eap_identity_req = wakeup->eap_identity_req; | 2462 | __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false; |
2461 | __entry->four_way_handshake = wakeup->four_way_handshake; | 2463 | __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false; |
2462 | __entry->rfkill_release = wakeup->rfkill_release; | 2464 | __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false; |
2463 | __entry->pattern_idx = wakeup->pattern_idx; | 2465 | __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false; |
2464 | __entry->packet_len = wakeup->packet_len; | 2466 | __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false; |
2465 | if (wakeup->packet && wakeup->packet_present_len) | 2467 | __entry->packet_len = wakeup ? wakeup->packet_len : false; |
2468 | if (wakeup && wakeup->packet && wakeup->packet_present_len) | ||
2466 | memcpy(__get_dynamic_array(packet), wakeup->packet, | 2469 | memcpy(__get_dynamic_array(packet), wakeup->packet, |
2467 | wakeup->packet_present_len); | 2470 | wakeup->packet_present_len); |
2468 | ), | 2471 | ), |