diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-08-28 13:51:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-28 13:51:40 -0400 |
commit | f3e979a52c554f45e4ca6f01ca6933acef34b872 (patch) | |
tree | 53aa9e61aa7fd0c225528fba4144b2d15f709ad9 | |
parent | cd80e107b741f9e05c53a01e5cbe2cdf4b6074bc (diff) | |
parent | a98655387762394371b88cdfb8215884757978ab (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/util.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 3 | ||||
-rw-r--r-- | include/net/cfg80211.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/nl80211.h | 16 | ||||
-rw-r--r-- | net/mac80211/iface.c | 19 | ||||
-rw-r--r-- | net/mac80211/main.c | 3 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 3 | ||||
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 3 | ||||
-rw-r--r-- | net/mac80211/rx.c | 3 | ||||
-rw-r--r-- | net/mac80211/tx.c | 6 | ||||
-rw-r--r-- | net/wireless/mlme.c | 4 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 6 | ||||
-rw-r--r-- | net/wireless/nl80211.h | 2 |
17 files changed, 58 insertions, 34 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 87aefb4c4c23..546d5da0b894 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -568,8 +568,8 @@ static int ath6kl_wmi_rx_probe_req_event_rx(struct wmi *wmi, u8 *datap, int len, | |||
568 | dlen, freq, vif->probe_req_report); | 568 | dlen, freq, vif->probe_req_report); |
569 | 569 | ||
570 | if (vif->probe_req_report || vif->nw_type == AP_NETWORK) | 570 | if (vif->probe_req_report || vif->nw_type == AP_NETWORK) |
571 | cfg80211_rx_mgmt(&vif->wdev, freq, 0, | 571 | cfg80211_rx_mgmt(&vif->wdev, freq, 0, ev->data, dlen, 0, |
572 | ev->data, dlen, GFP_ATOMIC); | 572 | GFP_ATOMIC); |
573 | 573 | ||
574 | return 0; | 574 | return 0; |
575 | } | 575 | } |
@@ -608,8 +608,7 @@ static int ath6kl_wmi_rx_action_event_rx(struct wmi *wmi, u8 *datap, int len, | |||
608 | return -EINVAL; | 608 | return -EINVAL; |
609 | } | 609 | } |
610 | ath6kl_dbg(ATH6KL_DBG_WMI, "rx_action: len=%u freq=%u\n", dlen, freq); | 610 | ath6kl_dbg(ATH6KL_DBG_WMI, "rx_action: len=%u freq=%u\n", dlen, freq); |
611 | cfg80211_rx_mgmt(&vif->wdev, freq, 0, | 611 | cfg80211_rx_mgmt(&vif->wdev, freq, 0, ev->data, dlen, 0, GFP_ATOMIC); |
612 | ev->data, dlen, GFP_ATOMIC); | ||
613 | 612 | ||
614 | return 0; | 613 | return 0; |
615 | } | 614 | } |
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 5220f158b8f5..063963ee422a 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
@@ -339,7 +339,7 @@ static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len) | |||
339 | } | 339 | } |
340 | } else { | 340 | } else { |
341 | cfg80211_rx_mgmt(wil->wdev, freq, signal, | 341 | cfg80211_rx_mgmt(wil->wdev, freq, signal, |
342 | (void *)rx_mgmt_frame, d_len, GFP_KERNEL); | 342 | (void *)rx_mgmt_frame, d_len, 0, GFP_KERNEL); |
343 | } | 343 | } |
344 | } | 344 | } |
345 | 345 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c index 79555f006d53..d7a974532909 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c | |||
@@ -1430,7 +1430,7 @@ int brcmf_p2p_notify_action_frame_rx(struct brcmf_if *ifp, | |||
1430 | IEEE80211_BAND_5GHZ); | 1430 | IEEE80211_BAND_5GHZ); |
1431 | 1431 | ||
1432 | wdev = &ifp->vif->wdev; | 1432 | wdev = &ifp->vif->wdev; |
1433 | cfg80211_rx_mgmt(wdev, freq, 0, (u8 *)mgmt_frame, mgmt_frame_len, | 1433 | cfg80211_rx_mgmt(wdev, freq, 0, (u8 *)mgmt_frame, mgmt_frame_len, 0, |
1434 | GFP_ATOMIC); | 1434 | GFP_ATOMIC); |
1435 | 1435 | ||
1436 | kfree(mgmt_frame); | 1436 | kfree(mgmt_frame); |
@@ -1895,7 +1895,7 @@ s32 brcmf_p2p_notify_rx_mgmt_p2p_probereq(struct brcmf_if *ifp, | |||
1895 | IEEE80211_BAND_2GHZ : | 1895 | IEEE80211_BAND_2GHZ : |
1896 | IEEE80211_BAND_5GHZ); | 1896 | IEEE80211_BAND_5GHZ); |
1897 | 1897 | ||
1898 | cfg80211_rx_mgmt(&vif->wdev, freq, 0, mgmt_frame, mgmt_frame_len, | 1898 | cfg80211_rx_mgmt(&vif->wdev, freq, 0, mgmt_frame, mgmt_frame_len, 0, |
1899 | GFP_ATOMIC); | 1899 | GFP_ATOMIC); |
1900 | 1900 | ||
1901 | brcmf_dbg(INFO, "mgmt_frame_len (%d) , e->datalen (%d), chanspec (%04x), freq (%d)\n", | 1901 | brcmf_dbg(INFO, "mgmt_frame_len (%d) , e->datalen (%d), chanspec (%04x), freq (%d)\n", |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index a0d2aacd5e09..2cd3f54e1efa 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -2528,8 +2528,10 @@ static int __init init_mac80211_hwsim(void) | |||
2528 | } | 2528 | } |
2529 | 2529 | ||
2530 | hwsim_mon = alloc_netdev(0, "hwsim%d", hwsim_mon_setup); | 2530 | hwsim_mon = alloc_netdev(0, "hwsim%d", hwsim_mon_setup); |
2531 | if (hwsim_mon == NULL) | 2531 | if (hwsim_mon == NULL) { |
2532 | err = -ENOMEM; | ||
2532 | goto failed; | 2533 | goto failed; |
2534 | } | ||
2533 | 2535 | ||
2534 | rtnl_lock(); | 2536 | rtnl_lock(); |
2535 | 2537 | ||
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c index e57ac0dd3ab5..5d9e150f4111 100644 --- a/drivers/net/wireless/mwifiex/util.c +++ b/drivers/net/wireless/mwifiex/util.c | |||
@@ -171,8 +171,8 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv, | |||
171 | rx_pd->rx_pkt_length = cpu_to_le16(pkt_len); | 171 | rx_pd->rx_pkt_length = cpu_to_le16(pkt_len); |
172 | 172 | ||
173 | cfg80211_rx_mgmt(priv->wdev, priv->roc_cfg.chan.center_freq, | 173 | cfg80211_rx_mgmt(priv->wdev, priv->roc_cfg.chan.center_freq, |
174 | CAL_RSSI(rx_pd->snr, rx_pd->nf), | 174 | CAL_RSSI(rx_pd->snr, rx_pd->nf), skb->data, pkt_len, |
175 | skb->data, pkt_len, GFP_ATOMIC); | 175 | 0, GFP_ATOMIC); |
176 | 176 | ||
177 | return 0; | 177 | return 0; |
178 | } | 178 | } |
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index d1b19c38a907..38995f90040d 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -5623,7 +5623,8 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) | |||
5623 | wl->hw->wiphy->max_remain_on_channel_duration = 5000; | 5623 | wl->hw->wiphy->max_remain_on_channel_duration = 5000; |
5624 | 5624 | ||
5625 | wl->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD | | 5625 | wl->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD | |
5626 | WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; | 5626 | WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL | |
5627 | WIPHY_FLAG_SUPPORTS_SCHED_SCAN; | ||
5627 | 5628 | ||
5628 | /* make sure all our channels fit in the scanned_ch bitmask */ | 5629 | /* make sure all our channels fit in the scanned_ch bitmask */ |
5629 | BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) + | 5630 | BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) + |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 9ab7a0690d93..d530c54a3662 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -4056,6 +4056,7 @@ void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr, | |||
4056 | * @sig_dbm: signal strength in mBm, or 0 if unknown | 4056 | * @sig_dbm: signal strength in mBm, or 0 if unknown |
4057 | * @buf: Management frame (header + body) | 4057 | * @buf: Management frame (header + body) |
4058 | * @len: length of the frame data | 4058 | * @len: length of the frame data |
4059 | * @flags: flags, as defined in enum nl80211_rxmgmt_flags | ||
4059 | * @gfp: context flags | 4060 | * @gfp: context flags |
4060 | * | 4061 | * |
4061 | * This function is called whenever an Action frame is received for a station | 4062 | * This function is called whenever an Action frame is received for a station |
@@ -4067,7 +4068,7 @@ void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr, | |||
4067 | * driver is responsible for rejecting the frame. | 4068 | * driver is responsible for rejecting the frame. |
4068 | */ | 4069 | */ |
4069 | bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm, | 4070 | bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm, |
4070 | const u8 *buf, size_t len, gfp_t gfp); | 4071 | const u8 *buf, size_t len, u32 flags, gfp_t gfp); |
4071 | 4072 | ||
4072 | /** | 4073 | /** |
4073 | * cfg80211_mgmt_tx_status - notification of TX status for management frame | 4074 | * cfg80211_mgmt_tx_status - notification of TX status for management frame |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 1f42bc3dcb9c..fde2c021b26d 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
@@ -1493,6 +1493,9 @@ enum nl80211_commands { | |||
1493 | * @NL80211_ATTR_CSA_C_OFF_PRESP: Offset of the channel switch counter | 1493 | * @NL80211_ATTR_CSA_C_OFF_PRESP: Offset of the channel switch counter |
1494 | * field in the probe response (%NL80211_ATTR_PROBE_RESP). | 1494 | * field in the probe response (%NL80211_ATTR_PROBE_RESP). |
1495 | * | 1495 | * |
1496 | * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32. | ||
1497 | * As specified in the &enum nl80211_rxmgmt_flags. | ||
1498 | * | ||
1496 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1499 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
1497 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1500 | * @__NL80211_ATTR_AFTER_LAST: internal use |
1498 | */ | 1501 | */ |
@@ -1801,6 +1804,8 @@ enum nl80211_attrs { | |||
1801 | NL80211_ATTR_CSA_C_OFF_BEACON, | 1804 | NL80211_ATTR_CSA_C_OFF_BEACON, |
1802 | NL80211_ATTR_CSA_C_OFF_PRESP, | 1805 | NL80211_ATTR_CSA_C_OFF_PRESP, |
1803 | 1806 | ||
1807 | NL80211_ATTR_RXMGMT_FLAGS, | ||
1808 | |||
1804 | /* add attributes here, update the policy in nl80211.c */ | 1809 | /* add attributes here, update the policy in nl80211.c */ |
1805 | 1810 | ||
1806 | __NL80211_ATTR_AFTER_LAST, | 1811 | __NL80211_ATTR_AFTER_LAST, |
@@ -3901,4 +3906,15 @@ enum nl80211_crit_proto_id { | |||
3901 | /* maximum duration for critical protocol measures */ | 3906 | /* maximum duration for critical protocol measures */ |
3902 | #define NL80211_CRIT_PROTO_MAX_DURATION 5000 /* msec */ | 3907 | #define NL80211_CRIT_PROTO_MAX_DURATION 5000 /* msec */ |
3903 | 3908 | ||
3909 | /** | ||
3910 | * enum nl80211_rxmgmt_flags - flags for received management frame. | ||
3911 | * | ||
3912 | * Used by cfg80211_rx_mgmt() | ||
3913 | * | ||
3914 | * @NL80211_RXMGMT_FLAG_ANSWERED: frame was answered by device/driver. | ||
3915 | */ | ||
3916 | enum nl80211_rxmgmt_flags { | ||
3917 | NL80211_RXMGMT_FLAG_ANSWERED = 1 << 0, | ||
3918 | }; | ||
3919 | |||
3904 | #endif /* __LINUX_NL80211_H */ | 3920 | #endif /* __LINUX_NL80211_H */ |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 7ca534bf4cea..fcecd633514e 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -308,12 +308,13 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata, | |||
308 | return 0; | 308 | return 0; |
309 | } | 309 | } |
310 | 310 | ||
311 | static int ieee80211_check_queues(struct ieee80211_sub_if_data *sdata) | 311 | static int ieee80211_check_queues(struct ieee80211_sub_if_data *sdata, |
312 | enum nl80211_iftype iftype) | ||
312 | { | 313 | { |
313 | int n_queues = sdata->local->hw.queues; | 314 | int n_queues = sdata->local->hw.queues; |
314 | int i; | 315 | int i; |
315 | 316 | ||
316 | if (sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE) { | 317 | if (iftype != NL80211_IFTYPE_P2P_DEVICE) { |
317 | for (i = 0; i < IEEE80211_NUM_ACS; i++) { | 318 | for (i = 0; i < IEEE80211_NUM_ACS; i++) { |
318 | if (WARN_ON_ONCE(sdata->vif.hw_queue[i] == | 319 | if (WARN_ON_ONCE(sdata->vif.hw_queue[i] == |
319 | IEEE80211_INVAL_HW_QUEUE)) | 320 | IEEE80211_INVAL_HW_QUEUE)) |
@@ -324,8 +325,9 @@ static int ieee80211_check_queues(struct ieee80211_sub_if_data *sdata) | |||
324 | } | 325 | } |
325 | } | 326 | } |
326 | 327 | ||
327 | if ((sdata->vif.type != NL80211_IFTYPE_AP && | 328 | if ((iftype != NL80211_IFTYPE_AP && |
328 | sdata->vif.type != NL80211_IFTYPE_MESH_POINT) || | 329 | iftype != NL80211_IFTYPE_P2P_GO && |
330 | iftype != NL80211_IFTYPE_MESH_POINT) || | ||
329 | !(sdata->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL)) { | 331 | !(sdata->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL)) { |
330 | sdata->vif.cab_queue = IEEE80211_INVAL_HW_QUEUE; | 332 | sdata->vif.cab_queue = IEEE80211_INVAL_HW_QUEUE; |
331 | return 0; | 333 | return 0; |
@@ -408,7 +410,7 @@ int ieee80211_add_virtual_monitor(struct ieee80211_local *local) | |||
408 | return ret; | 410 | return ret; |
409 | } | 411 | } |
410 | 412 | ||
411 | ret = ieee80211_check_queues(sdata); | 413 | ret = ieee80211_check_queues(sdata, NL80211_IFTYPE_MONITOR); |
412 | if (ret) { | 414 | if (ret) { |
413 | kfree(sdata); | 415 | kfree(sdata); |
414 | return ret; | 416 | return ret; |
@@ -592,7 +594,8 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) | |||
592 | res = drv_add_interface(local, sdata); | 594 | res = drv_add_interface(local, sdata); |
593 | if (res) | 595 | if (res) |
594 | goto err_stop; | 596 | goto err_stop; |
595 | res = ieee80211_check_queues(sdata); | 597 | res = ieee80211_check_queues(sdata, |
598 | ieee80211_vif_type_p2p(&sdata->vif)); | ||
596 | if (res) | 599 | if (res) |
597 | goto err_del_interface; | 600 | goto err_del_interface; |
598 | } | 601 | } |
@@ -1389,14 +1392,14 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata, | |||
1389 | 1392 | ||
1390 | ret = drv_change_interface(local, sdata, internal_type, p2p); | 1393 | ret = drv_change_interface(local, sdata, internal_type, p2p); |
1391 | if (ret) | 1394 | if (ret) |
1392 | type = sdata->vif.type; | 1395 | type = ieee80211_vif_type_p2p(&sdata->vif); |
1393 | 1396 | ||
1394 | /* | 1397 | /* |
1395 | * Ignore return value here, there's not much we can do since | 1398 | * Ignore return value here, there's not much we can do since |
1396 | * the driver changed the interface type internally already. | 1399 | * the driver changed the interface type internally already. |
1397 | * The warnings will hopefully make driver authors fix it :-) | 1400 | * The warnings will hopefully make driver authors fix it :-) |
1398 | */ | 1401 | */ |
1399 | ieee80211_check_queues(sdata); | 1402 | ieee80211_check_queues(sdata, type); |
1400 | 1403 | ||
1401 | ieee80211_setup_sdata(sdata, type); | 1404 | ieee80211_setup_sdata(sdata, type); |
1402 | 1405 | ||
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 25eb35b01938..21d5d44444d0 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -892,9 +892,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
892 | if (!local->ops->remain_on_channel) | 892 | if (!local->ops->remain_on_channel) |
893 | local->hw.wiphy->max_remain_on_channel_duration = 5000; | 893 | local->hw.wiphy->max_remain_on_channel_duration = 5000; |
894 | 894 | ||
895 | if (local->ops->sched_scan_start) | ||
896 | local->hw.wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN; | ||
897 | |||
898 | /* mac80211 based drivers don't support internal TDLS setup */ | 895 | /* mac80211 based drivers don't support internal TDLS setup */ |
899 | if (local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) | 896 | if (local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) |
900 | local->hw.wiphy->flags |= WIPHY_FLAG_TDLS_EXTERNAL_SETUP; | 897 | local->hw.wiphy->flags |= WIPHY_FLAG_TDLS_EXTERNAL_SETUP; |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 885a5f6e2c21..707ac61d63e5 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -832,6 +832,9 @@ ieee80211_mesh_rx_probe_req(struct ieee80211_sub_if_data *sdata, | |||
832 | 832 | ||
833 | ieee802_11_parse_elems(pos, len - baselen, false, &elems); | 833 | ieee802_11_parse_elems(pos, len - baselen, false, &elems); |
834 | 834 | ||
835 | if (!elems.mesh_id) | ||
836 | return; | ||
837 | |||
835 | /* 802.11-2012 10.1.4.3.2 */ | 838 | /* 802.11-2012 10.1.4.3.2 */ |
836 | if ((!ether_addr_equal(mgmt->da, sdata->vif.addr) && | 839 | if ((!ether_addr_equal(mgmt->da, sdata->vif.addr) && |
837 | !is_broadcast_ether_addr(mgmt->da)) || | 840 | !is_broadcast_ether_addr(mgmt->da)) || |
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 339a6b8b107a..7c323f27ba23 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c | |||
@@ -439,13 +439,12 @@ minstrel_aggr_check(struct ieee80211_sta *pubsta, struct sk_buff *skb) | |||
439 | { | 439 | { |
440 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 440 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; |
441 | struct sta_info *sta = container_of(pubsta, struct sta_info, sta); | 441 | struct sta_info *sta = container_of(pubsta, struct sta_info, sta); |
442 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
443 | u16 tid; | 442 | u16 tid; |
444 | 443 | ||
445 | if (unlikely(!ieee80211_is_data_qos(hdr->frame_control))) | 444 | if (unlikely(!ieee80211_is_data_qos(hdr->frame_control))) |
446 | return; | 445 | return; |
447 | 446 | ||
448 | if (unlikely(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO)) | 447 | if (unlikely(skb->protocol == cpu_to_be16(ETH_P_PAE))) |
449 | return; | 448 | return; |
450 | 449 | ||
451 | tid = *ieee80211_get_qos_ctl(hdr) & IEEE80211_QOS_CTL_TID_MASK; | 450 | tid = *ieee80211_get_qos_ctl(hdr) & IEEE80211_QOS_CTL_TID_MASK; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index a84f319c11ad..54395d7583ba 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -2684,8 +2684,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx) | |||
2684 | sig = status->signal; | 2684 | sig = status->signal; |
2685 | 2685 | ||
2686 | if (cfg80211_rx_mgmt(&rx->sdata->wdev, status->freq, sig, | 2686 | if (cfg80211_rx_mgmt(&rx->sdata->wdev, status->freq, sig, |
2687 | rx->skb->data, rx->skb->len, | 2687 | rx->skb->data, rx->skb->len, 0, GFP_ATOMIC)) { |
2688 | GFP_ATOMIC)) { | ||
2689 | if (rx->sta) | 2688 | if (rx->sta) |
2690 | rx->sta->rx_packets++; | 2689 | rx->sta->rx_packets++; |
2691 | dev_kfree_skb(rx->skb); | 2690 | dev_kfree_skb(rx->skb); |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 098ae854ad3c..3456c0486b48 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -781,9 +781,11 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx) | |||
781 | /* | 781 | /* |
782 | * Anything but QoS data that has a sequence number field | 782 | * Anything but QoS data that has a sequence number field |
783 | * (is long enough) gets a sequence number from the global | 783 | * (is long enough) gets a sequence number from the global |
784 | * counter. | 784 | * counter. QoS data frames with a multicast destination |
785 | * also use the global counter (802.11-2012 9.3.2.10). | ||
785 | */ | 786 | */ |
786 | if (!ieee80211_is_data_qos(hdr->frame_control)) { | 787 | if (!ieee80211_is_data_qos(hdr->frame_control) || |
788 | is_multicast_ether_addr(hdr->addr1)) { | ||
787 | /* driver should assign sequence number */ | 789 | /* driver should assign sequence number */ |
788 | info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ; | 790 | info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ; |
789 | /* for pure STA mode without beacons, we can do it */ | 791 | /* for pure STA mode without beacons, we can do it */ |
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index bfac5e186f57..8d49c1ce3dea 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -621,7 +621,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
621 | } | 621 | } |
622 | 622 | ||
623 | bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, | 623 | bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, |
624 | const u8 *buf, size_t len, gfp_t gfp) | 624 | const u8 *buf, size_t len, u32 flags, gfp_t gfp) |
625 | { | 625 | { |
626 | struct wiphy *wiphy = wdev->wiphy; | 626 | struct wiphy *wiphy = wdev->wiphy; |
627 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 627 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
@@ -664,7 +664,7 @@ bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, | |||
664 | /* Indicate the received Action frame to user space */ | 664 | /* Indicate the received Action frame to user space */ |
665 | if (nl80211_send_mgmt(rdev, wdev, reg->nlportid, | 665 | if (nl80211_send_mgmt(rdev, wdev, reg->nlportid, |
666 | freq, sig_mbm, | 666 | freq, sig_mbm, |
667 | buf, len, gfp)) | 667 | buf, len, flags, gfp)) |
668 | continue; | 668 | continue; |
669 | 669 | ||
670 | result = true; | 670 | result = true; |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 741368c31270..af8d84a4a5b2 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -10450,7 +10450,7 @@ EXPORT_SYMBOL(cfg80211_rx_unexpected_4addr_frame); | |||
10450 | int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, | 10450 | int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, |
10451 | struct wireless_dev *wdev, u32 nlportid, | 10451 | struct wireless_dev *wdev, u32 nlportid, |
10452 | int freq, int sig_dbm, | 10452 | int freq, int sig_dbm, |
10453 | const u8 *buf, size_t len, gfp_t gfp) | 10453 | const u8 *buf, size_t len, u32 flags, gfp_t gfp) |
10454 | { | 10454 | { |
10455 | struct net_device *netdev = wdev->netdev; | 10455 | struct net_device *netdev = wdev->netdev; |
10456 | struct sk_buff *msg; | 10456 | struct sk_buff *msg; |
@@ -10473,7 +10473,9 @@ int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, | |||
10473 | nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) || | 10473 | nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) || |
10474 | (sig_dbm && | 10474 | (sig_dbm && |
10475 | nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) || | 10475 | nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) || |
10476 | nla_put(msg, NL80211_ATTR_FRAME, len, buf)) | 10476 | nla_put(msg, NL80211_ATTR_FRAME, len, buf) || |
10477 | (flags && | ||
10478 | nla_put_u32(msg, NL80211_ATTR_RXMGMT_FLAGS, flags))) | ||
10477 | goto nla_put_failure; | 10479 | goto nla_put_failure; |
10478 | 10480 | ||
10479 | genlmsg_end(msg, hdr); | 10481 | genlmsg_end(msg, hdr); |
diff --git a/net/wireless/nl80211.h b/net/wireless/nl80211.h index 44341bf53cfc..2c0f2b3c07cb 100644 --- a/net/wireless/nl80211.h +++ b/net/wireless/nl80211.h | |||
@@ -66,7 +66,7 @@ void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev, | |||
66 | int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, | 66 | int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, |
67 | struct wireless_dev *wdev, u32 nlpid, | 67 | struct wireless_dev *wdev, u32 nlpid, |
68 | int freq, int sig_dbm, | 68 | int freq, int sig_dbm, |
69 | const u8 *buf, size_t len, gfp_t gfp); | 69 | const u8 *buf, size_t len, u32 flags, gfp_t gfp); |
70 | 70 | ||
71 | void | 71 | void |
72 | nl80211_radar_notify(struct cfg80211_registered_device *rdev, | 72 | nl80211_radar_notify(struct cfg80211_registered_device *rdev, |