History

Merge tag 'wireless-next-2026-03-19' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next

Johannes Berg says: ==================== Aside from various small improvements/cleanups, not much: - cfg80211/mac80211: S1G and UHR improvements - hwsim: incumbent signal report test support * tag 'wireless-next-2026-03-19' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (31 commits) qtnfmac: use alloc_netdev macro for single queue devices wifi: libertas: don't kill URBs in interrupt context wifi: libertas: use USB anchors for tracking in-flight URBs wifi: nl80211: use int for band coming from netlink wifi: rsi_91x_usb: do not pause rfkill polling when stopping mac80211 wifi: mac80211: fix STA link removal during link removal wifi: nl80211: reject S1G/60G with HT chantype wifi: ieee80211: fix definition of EHT-MCS 15 in MRU wifi: cfg80211: check non-S1G width with S1G chandef wifi: cfg80211: restrict cfg80211_chandef_create() to only HT-based bands wifi: mac80211: don't use cfg80211_chandef_create() for default chandef wifi: mac80211: Remove deleted sta links in ieee80211_ml_reconf_work() wifi: b43: use register definitions in nphy_op_software_rfkill wifi: cfg80211: split control freq check from chandef check wifi: mac80211: always use full chanctx compatible check wifi: mac80211: refactor chandef tracing macros wifi: mac80211: validate HE 6 GHz operation when EHT is used wifi: nl80211: split out UHR operation information wifi: mwifiex: drop redundant device reference wifi: rt2x00: drop redundant device reference ... ====================

Paolo Abeni committed 8 months ago

Commit 9ac76f32 parents 96450df dee55bc65 files · +735 −682Browse files

Unified · Split

65 files
  1. drivers/net/wireless/ath/ath11k/mac.c +2 −2
  2. drivers/net/wireless/ath/ath12k/mac.c +2 −2
  3. drivers/net/wireless/ath/ath12k/wifi7/hw.c +1 −1
  4. drivers/net/wireless/atmel/at76c50x-usb.c +4 −8
  5. drivers/net/wireless/broadcom/b43/phy_n.c +13 −13
  6. drivers/net/wireless/intel/iwlwifi/mld/time_sync.c +3 −3
  7. drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c +3 −4
  8. drivers/net/wireless/intel/iwlwifi/mvm/time-sync.c +3 −3
  9. drivers/net/wireless/marvell/libertas/if_usb.c +22 −13
  10. drivers/net/wireless/marvell/libertas/if_usb.h +3 −0
  11. drivers/net/wireless/marvell/libertas_tf/if_usb.c +0 −2
  12. drivers/net/wireless/marvell/mwifiex/tdls.c +4 −8
  13. drivers/net/wireless/marvell/mwifiex/usb.c +0 −4
  14. drivers/net/wireless/marvell/mwl8k.c +2 −2
  15. drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +3 −3
  16. drivers/net/wireless/mediatek/mt76/mt7925/mac.c +2 −2
  17. drivers/net/wireless/mediatek/mt76/mt7996/mac.c +2 −2
  18. drivers/net/wireless/quantenna/qtnfmac/core.c +2 −2
  19. drivers/net/wireless/ralink/rt2x00/rt2x00usb.c +1 −11
  20. drivers/net/wireless/realtek/rtl8xxxu/core.c +7 −7
  21. drivers/net/wireless/realtek/rtlwifi/base.c +14 −14
  22. drivers/net/wireless/realtek/rtlwifi/pci.c +1 −1
  23. drivers/net/wireless/rsi/rsi_91x_mac80211.c +16 −1
  24. drivers/net/wireless/rsi/rsi_91x_usb.c +2 −0
  25. drivers/net/wireless/rsi/rsi_common.h +1 −0
  26. drivers/net/wireless/silabs/wfx/data_rx.c +4 −4
  27. drivers/net/wireless/virtual/mac80211_hwsim.c +64 −0
  28. include/linux/ieee80211-eht.h +2 −2
  29. include/linux/ieee80211-ht.h +3 −0
  30. include/linux/ieee80211-uhr.h +2 −2
  31. include/linux/ieee80211.h +32 −53
  32. include/net/mac80211.h +4 −0
  33. include/uapi/linux/nl80211.h +6 −0
  34. net/mac80211/agg-rx.c +34 −15
  35. net/mac80211/agg-tx.c +22 −17
  36. net/mac80211/chan.c +37 −49
  37. net/mac80211/debugfs.c +1 −0
  38. net/mac80211/eht.c +10 −11
  39. net/mac80211/ht.c +20 −17
  40. net/mac80211/ibss.c +5 −13
  41. net/mac80211/ieee80211_i.h +5 −1
  42. net/mac80211/iface.c +12 −9
  43. net/mac80211/main.c +15 −3
  44. net/mac80211/mesh.c +6 −8
  45. net/mac80211/mesh_hwmp.c +8 −12
  46. net/mac80211/mesh_plink.c +10 −11
  47. net/mac80211/mlme.c +66 −47
  48. net/mac80211/rx.c +60 −74
  49. net/mac80211/s1g.c +22 −14
  50. net/mac80211/spectmgmt.c +13 −18
  51. net/mac80211/sta_info.h +2 −1
  52. net/mac80211/tdls.c +12 −17
  53. net/mac80211/trace.h +41 −59
  54. net/mac80211/util.c +2 −3
  55. net/mac80211/vht.c +5 −5
  56. net/wireless/chan.c +65 −45
  57. net/wireless/nl80211.c +24 −13
  58. net/wireless/of.c +1 −12
  59. net/wireless/radiotap.c +1 −9
  60. net/wireless/reg.c +1 −12
  61. net/wireless/reg.h +1 −12
  62. net/wireless/trace.c +1 −0
  63. net/wireless/wext-core.c +1 −2
  64. net/wireless/wext-priv.c +1 −2
  65. net/wireless/wext-proc.c +1 −2
drivers/net/wireless/ath/ath11k/mac.c+2−2
@@ -6288,10 +6288,10 @@ static int ath11k_mac_mgmt_action_frame_fill_elem_data(struct ath11k_vif *arvif, · 6287 unmodified lines
6288 lockdep_assert_held(&ar->conf_mutex);6288 lockdep_assert_held(&ar->conf_mutex);
6289 6289
6290 /* make sure category field is present */6290 /* make sure category field is present */
6291 if (skb->len < IEEE80211_MIN_ACTION_SIZE)6291 if (skb->len < IEEE80211_MIN_ACTION_SIZE(category))
6292 return -EINVAL;6292 return -EINVAL;
6293 6293
6294 remaining_len = skb->len - IEEE80211_MIN_ACTION_SIZE;6294 remaining_len = skb->len - IEEE80211_MIN_ACTION_SIZE(category);
6295 has_protected = ieee80211_has_protected(hdr->frame_control);6295 has_protected = ieee80211_has_protected(hdr->frame_control);
6296 6296
6297 /* In case of SW crypto and hdr protected (PMF), packet will already be encrypted,6297 /* In case of SW crypto and hdr protected (PMF), packet will already be encrypted,
drivers/net/wireless/ath/ath12k/mac.c+2−2
@@ -9119,10 +9119,10 @@ static int ath12k_mac_mgmt_action_frame_fill_elem_data(struct ath12k_link_vif *a · 9118 unmodified lines
9119 lockdep_assert_wiphy(wiphy);9119 lockdep_assert_wiphy(wiphy);
9120 9120
9121 /* make sure category field is present */9121 /* make sure category field is present */
9122 if (skb->len < IEEE80211_MIN_ACTION_SIZE)9122 if (skb->len < IEEE80211_MIN_ACTION_SIZE(category))
9123 return -EINVAL;9123 return -EINVAL;
9124 9124
9125 remaining_len = skb->len - IEEE80211_MIN_ACTION_SIZE;9125 remaining_len = skb->len - IEEE80211_MIN_ACTION_SIZE(category);
9126 has_protected = ieee80211_has_protected(hdr->frame_control);9126 has_protected = ieee80211_has_protected(hdr->frame_control);
9127 9127
9128 /* In case of SW crypto and hdr protected (PMF), packet will already be encrypted,9128 /* In case of SW crypto and hdr protected (PMF), packet will already be encrypted,
drivers/net/wireless/ath/ath12k/wifi7/hw.c+1−1
@@ -104,7 +104,7 @@ static bool ath12k_is_addba_resp_action_code(struct ieee80211_mgmt *mgmt) · 103 unmodified lines
104 if (mgmt->u.action.category != WLAN_CATEGORY_BACK)104 if (mgmt->u.action.category != WLAN_CATEGORY_BACK)
105 return false;105 return false;
106 106
107 if (mgmt->u.action.u.addba_resp.action_code != WLAN_ACTION_ADDBA_RESP)107 if (mgmt->u.action.action_code != WLAN_ACTION_ADDBA_RESP)
108 return false;108 return false;
109 109
110 return true;110 return true;
drivers/net/wireless/atmel/at76c50x-usb.c+4−8
@@ -2440,13 +2440,11 @@ static int at76_probe(struct usb_interface *interface, · 2439 unmodified lines
2440 struct mib_fw_version *fwv;2440 struct mib_fw_version *fwv;
2441 int board_type = (int)id->driver_info;2441 int board_type = (int)id->driver_info;
2442 2442
2443 udev = usb_get_dev(interface_to_usbdev(interface));2443 udev = interface_to_usbdev(interface);
2444 2444
2445 fwv = kmalloc_obj(*fwv);2445 fwv = kmalloc_obj(*fwv);
2446 if (!fwv) {2446 if (!fwv)
2447 ret = -ENOMEM;2447 return -ENOMEM;
2448 goto exit;
2449 }
2450 2448
2451 /* Load firmware into kernel memory */2449 /* Load firmware into kernel memory */
2452 fwe = at76_load_firmware(udev, board_type);2450 fwe = at76_load_firmware(udev, board_type);
@@ -2534,8 +2532,7 @@ static int at76_probe(struct usb_interface *interface, · 81 unmodified lines
2534 2532
2535exit:2533exit:
2536 kfree(fwv);2534 kfree(fwv);
2537 if (ret < 0)2535
2538 usb_put_dev(udev);
2539 return ret;2536 return ret;
2540}2537}
2541 2538
@@ -2552,7 +2549,6 @@ static void at76_disconnect(struct usb_interface *interface) · 10 unmodified lines
2552 2549
2553 wiphy_info(priv->hw->wiphy, "disconnecting\n");2550 wiphy_info(priv->hw->wiphy, "disconnecting\n");
2554 at76_delete_device(priv);2551 at76_delete_device(priv);
2555 usb_put_dev(interface_to_usbdev(interface));
2556 dev_info(&interface->dev, "disconnected\n");2552 dev_info(&interface->dev, "disconnected\n");
2557}2553}
2558 2554
drivers/net/wireless/broadcom/b43/phy_n.c+13−13
@@ -6566,19 +6566,19 @@ static void b43_nphy_op_software_rfkill(struct b43_wldev *dev, · 6565 unmodified lines
6566 6566
6567 b43_radio_mask(dev, 0x09, ~0x2);6567 b43_radio_mask(dev, 0x09, ~0x2);
6568 6568
6569 b43_radio_write(dev, 0x204D, 0);6569 b43_radio_write(dev, B2056_TX0 | B2056_TX_PADA_BOOST_TUNE, 0);
6570 b43_radio_write(dev, 0x2053, 0);6570 b43_radio_write(dev, B2056_TX0 | B2056_TX_PADG_BOOST_TUNE, 0);
6571 b43_radio_write(dev, 0x2058, 0);6571 b43_radio_write(dev, B2056_TX0 | B2056_TX_PGAA_BOOST_TUNE, 0);
6572 b43_radio_write(dev, 0x205E, 0);6572 b43_radio_write(dev, B2056_TX0 | B2056_TX_PGAG_BOOST_TUNE, 0);
6573 b43_radio_mask(dev, 0x2062, ~0xF0);6573 b43_radio_mask(dev, B2056_TX0 | B2056_TX_MIXA_BOOST_TUNE, ~0xF0);
6574 b43_radio_write(dev, 0x2064, 0);6574 b43_radio_write(dev, B2056_TX0 | B2056_TX_MIXG_BOOST_TUNE, 0);
6575 6575
6576 b43_radio_write(dev, 0x304D, 0);6576 b43_radio_write(dev, B2056_TX1 | B2056_TX_PADA_BOOST_TUNE, 0);
6577 b43_radio_write(dev, 0x3053, 0);6577 b43_radio_write(dev, B2056_TX1 | B2056_TX_PADG_BOOST_TUNE, 0);
6578 b43_radio_write(dev, 0x3058, 0);6578 b43_radio_write(dev, B2056_TX1 | B2056_TX_PGAA_BOOST_TUNE, 0);
6579 b43_radio_write(dev, 0x305E, 0);6579 b43_radio_write(dev, B2056_TX1 | B2056_TX_PGAG_BOOST_TUNE, 0);
6580 b43_radio_mask(dev, 0x3062, ~0xF0);6580 b43_radio_mask(dev, B2056_TX1 | B2056_TX_MIXA_BOOST_TUNE, ~0xF0);
6581 b43_radio_write(dev, 0x3064, 0);6581 b43_radio_write(dev, B2056_TX1 | B2056_TX_MIXG_BOOST_TUNE, 0);
6582 }6582 }
6583 } else {6583 } else {
6584 if (phy->rev >= 19) {6584 if (phy->rev >= 19) {
drivers/net/wireless/intel/iwlwifi/mld/time_sync.c+3−3
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*2/*
3 * Copyright (C) 2025 Intel Corporation3 * Copyright (C) 2025-2026 Intel Corporation
4 */4 */
5 5
6#include "mld.h"6#include "mld.h"
@@ -116,9 +116,9 @@ static bool iwl_mld_is_skb_match(struct sk_buff *skb, u8 *addr, u8 dialog_token) · 109 unmodified lines
116 u8 skb_dialog_token;116 u8 skb_dialog_token;
117 117
118 if (ieee80211_is_timing_measurement(skb))118 if (ieee80211_is_timing_measurement(skb))
119 skb_dialog_token = mgmt->u.action.u.wnm_timing_msr.dialog_token;119 skb_dialog_token = mgmt->u.action.wnm_timing_msr.dialog_token;
120 else120 else
121 skb_dialog_token = mgmt->u.action.u.ftm.dialog_token;121 skb_dialog_token = mgmt->u.action.ftm.dialog_token;
122 122
123 if ((ether_addr_equal(mgmt->sa, addr) ||123 if ((ether_addr_equal(mgmt->sa, addr) ||
124 ether_addr_equal(mgmt->da, addr)) &&124 ether_addr_equal(mgmt->da, addr)) &&
drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c+3−4
@@ -1,7 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*2/*
3 * Copyright (C) 2015-2017 Intel Deutschland GmbH3 * Copyright (C) 2015-2017 Intel Deutschland GmbH
4 * Copyright (C) 2018-2025 Intel Corporation4 * Copyright (C) 2018-2026 Intel Corporation
5 */5 */
6#include <linux/etherdevice.h>6#include <linux/etherdevice.h>
7#include <linux/math64.h>7#include <linux/math64.h>
@@ -1409,8 +1409,7 @@ void iwl_mvm_ftm_lc_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) · 1401 unmodified lines
1409 struct iwl_mvm_loc_entry *entry;1409 struct iwl_mvm_loc_entry *entry;
1410 const u8 *ies, *lci, *civic, *msr_ie;1410 const u8 *ies, *lci, *civic, *msr_ie;
1411 size_t ies_len, lci_len = 0, civic_len = 0;1411 size_t ies_len, lci_len = 0, civic_len = 0;
1412 size_t baselen = IEEE80211_MIN_ACTION_SIZE +1412 size_t baselen = IEEE80211_MIN_ACTION_SIZE(ftm);
1413 sizeof(mgmt->u.action.u.ftm);
1414 static const u8 rprt_type_lci = IEEE80211_SPCT_MSR_RPRT_TYPE_LCI;1413 static const u8 rprt_type_lci = IEEE80211_SPCT_MSR_RPRT_TYPE_LCI;
1415 static const u8 rprt_type_civic = IEEE80211_SPCT_MSR_RPRT_TYPE_CIVIC;1414 static const u8 rprt_type_civic = IEEE80211_SPCT_MSR_RPRT_TYPE_CIVIC;
1416 1415
@@ -1419,7 +1418,7 @@ void iwl_mvm_ftm_lc_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) · 2 unmodified lines
1419 1418
1420 lockdep_assert_held(&mvm->mutex);1419 lockdep_assert_held(&mvm->mutex);
1421 1420
1422 ies = mgmt->u.action.u.ftm.variable;1421 ies = mgmt->u.action.ftm.variable;
1423 ies_len = len - baselen;1422 ies_len = len - baselen;
1424 1423
1425 msr_ie = cfg80211_find_ie_match(WLAN_EID_MEASURE_REPORT, ies, ies_len,1424 msr_ie = cfg80211_find_ie_match(WLAN_EID_MEASURE_REPORT, ies, ies_len,
drivers/net/wireless/intel/iwlwifi/mvm/time-sync.c+3−3
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*2/*
3 * Copyright (C) 2022 Intel Corporation3 * Copyright (C) 2022, 2026 Intel Corporation
4 */4 */
5 5
6#include "mvm.h"6#include "mvm.h"
@@ -18,9 +18,9 @@ static bool iwl_mvm_is_skb_match(struct sk_buff *skb, u8 *addr, u8 dialog_token) · 11 unmodified lines
18 u8 skb_dialog_token;18 u8 skb_dialog_token;
19 19
20 if (ieee80211_is_timing_measurement(skb))20 if (ieee80211_is_timing_measurement(skb))
21 skb_dialog_token = mgmt->u.action.u.wnm_timing_msr.dialog_token;21 skb_dialog_token = mgmt->u.action.wnm_timing_msr.dialog_token;
22 else22 else
23 skb_dialog_token = mgmt->u.action.u.ftm.dialog_token;23 skb_dialog_token = mgmt->u.action.ftm.dialog_token;
24 24
25 if ((ether_addr_equal(mgmt->sa, addr) ||25 if ((ether_addr_equal(mgmt->sa, addr) ||
26 ether_addr_equal(mgmt->da, addr)) &&26 ether_addr_equal(mgmt->da, addr)) &&
drivers/net/wireless/marvell/libertas/if_usb.c+22−13
@@ -114,8 +114,8 @@ static void if_usb_write_bulk_callback(struct urb *urb) · 113 unmodified lines
114static void if_usb_free(struct if_usb_card *cardp)114static void if_usb_free(struct if_usb_card *cardp)
115{115{
116 /* Unlink tx & rx urb */116 /* Unlink tx & rx urb */
117 usb_kill_urb(cardp->tx_urb);117 usb_kill_anchored_urbs(&cardp->tx_submitted);
118 usb_kill_urb(cardp->rx_urb);118 usb_kill_anchored_urbs(&cardp->rx_submitted);
119 119
120 usb_free_urb(cardp->tx_urb);120 usb_free_urb(cardp->tx_urb);
121 cardp->tx_urb = NULL;121 cardp->tx_urb = NULL;
@@ -221,6 +221,9 @@ static int if_usb_probe(struct usb_interface *intf, · 99 unmodified lines
221 udev->descriptor.bDeviceSubClass,221 udev->descriptor.bDeviceSubClass,
222 udev->descriptor.bDeviceProtocol);222 udev->descriptor.bDeviceProtocol);
223 223
224 init_usb_anchor(&cardp->rx_submitted);
225 init_usb_anchor(&cardp->tx_submitted);
226
224 for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {227 for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
225 endpoint = &iface_desc->endpoint[i].desc;228 endpoint = &iface_desc->endpoint[i].desc;
226 if (usb_endpoint_is_bulk_in(endpoint)) {229 if (usb_endpoint_is_bulk_in(endpoint)) {
@@ -276,7 +279,6 @@ static int if_usb_probe(struct usb_interface *intf, · 49 unmodified lines
276 279
277 cardp->boot2_version = udev->descriptor.bcdDevice;280 cardp->boot2_version = udev->descriptor.bcdDevice;
278 281
279 usb_get_dev(udev);
280 usb_set_intfdata(intf, cardp);282 usb_set_intfdata(intf, cardp);
281 283
282 r = lbs_get_firmware_async(priv, &udev->dev, cardp->model,284 r = lbs_get_firmware_async(priv, &udev->dev, cardp->model,
@@ -287,7 +289,6 @@ static int if_usb_probe(struct usb_interface *intf, · 4 unmodified lines
287 return 0;289 return 0;
288 290
289err_get_fw:291err_get_fw:
290 usb_put_dev(udev);
291 lbs_remove_card(priv);292 lbs_remove_card(priv);
292err_add_card:293err_add_card:
293 if_usb_reset_device(cardp);294 if_usb_reset_device(cardp);
@@ -321,7 +322,6 @@ static void if_usb_disconnect(struct usb_interface *intf) · 27 unmodified lines
321 kfree(cardp);322 kfree(cardp);
322 323
323 usb_set_intfdata(intf, NULL);324 usb_set_intfdata(intf, NULL);
324 usb_put_dev(interface_to_usbdev(intf));
325}325}
326 326
327/**327/**
@@ -426,7 +426,12 @@ static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb · 98 unmodified lines
426 goto tx_ret;426 goto tx_ret;
427 }427 }
428 428
429 usb_kill_urb(cardp->tx_urb);429 /* check if there are pending URBs */
430 if (!usb_anchor_empty(&cardp->tx_submitted)) {
431 lbs_deb_usbd(&cardp->udev->dev, "%s failed: pending URB\n", __func__);
432 ret = -EBUSY;
433 goto tx_ret;
434 }
430 435
431 usb_fill_bulk_urb(cardp->tx_urb, cardp->udev,436 usb_fill_bulk_urb(cardp->tx_urb, cardp->udev,
432 usb_sndbulkpipe(cardp->udev,437 usb_sndbulkpipe(cardp->udev,
@@ -435,8 +440,10 @@ static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb · 2 unmodified lines
435 440
436 cardp->tx_urb->transfer_flags |= URB_ZERO_PACKET;441 cardp->tx_urb->transfer_flags |= URB_ZERO_PACKET;
437 442
443 usb_anchor_urb(cardp->tx_urb, &cardp->tx_submitted);
438 if ((ret = usb_submit_urb(cardp->tx_urb, GFP_ATOMIC))) {444 if ((ret = usb_submit_urb(cardp->tx_urb, GFP_ATOMIC))) {
439 lbs_deb_usbd(&cardp->udev->dev, "usb_submit_urb failed: %d\n", ret);445 lbs_deb_usbd(&cardp->udev->dev, "usb_submit_urb failed: %d\n", ret);
446 usb_unanchor_urb(cardp->tx_urb);
440 } else {447 } else {
441 lbs_deb_usb2(&cardp->udev->dev, "usb_submit_urb success\n");448 lbs_deb_usb2(&cardp->udev->dev, "usb_submit_urb success\n");
442 ret = 0;449 ret = 0;
@@ -467,8 +474,10 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp, · 24 unmodified lines
467 cardp);474 cardp);
468 475
469 lbs_deb_usb2(&cardp->udev->dev, "Pointer for rx_urb %p\n", cardp->rx_urb);476 lbs_deb_usb2(&cardp->udev->dev, "Pointer for rx_urb %p\n", cardp->rx_urb);
477 usb_anchor_urb(cardp->rx_urb, &cardp->rx_submitted);
470 if ((ret = usb_submit_urb(cardp->rx_urb, GFP_ATOMIC))) {478 if ((ret = usb_submit_urb(cardp->rx_urb, GFP_ATOMIC))) {
471 lbs_deb_usbd(&cardp->udev->dev, "Submit Rx URB failed: %d\n", ret);479 lbs_deb_usbd(&cardp->udev->dev, "Submit Rx URB failed: %d\n", ret);
480 usb_unanchor_urb(cardp->rx_urb);
472 kfree_skb(skb);481 kfree_skb(skb);
473 cardp->rx_skb = NULL;482 cardp->rx_skb = NULL;
474 ret = -1;483 ret = -1;
@@ -838,8 +847,8 @@ static void if_usb_prog_firmware(struct lbs_private *priv, int ret, · 363 unmodified lines
838 }847 }
839 848
840 /* Cancel any pending usb business */849 /* Cancel any pending usb business */
841 usb_kill_urb(cardp->rx_urb);850 usb_kill_anchored_urbs(&cardp->rx_submitted);
842 usb_kill_urb(cardp->tx_urb);851 usb_kill_anchored_urbs(&cardp->tx_submitted);
843 852
844 cardp->fwlastblksent = 0;853 cardp->fwlastblksent = 0;
845 cardp->fwdnldover = 0;854 cardp->fwdnldover = 0;
@@ -869,8 +878,8 @@ restart: · 23 unmodified lines
869 if (cardp->bootcmdresp == BOOT_CMD_RESP_NOT_SUPPORTED) {878 if (cardp->bootcmdresp == BOOT_CMD_RESP_NOT_SUPPORTED) {
870 /* Return to normal operation */879 /* Return to normal operation */
871 ret = -EOPNOTSUPP;880 ret = -EOPNOTSUPP;
872 usb_kill_urb(cardp->rx_urb);881 usb_kill_anchored_urbs(&cardp->rx_submitted);
873 usb_kill_urb(cardp->tx_urb);882 usb_kill_anchored_urbs(&cardp->tx_submitted);
874 if (if_usb_submit_rx_urb(cardp) < 0)883 if (if_usb_submit_rx_urb(cardp) < 0)
875 ret = -EIO;884 ret = -EIO;
876 goto done;885 goto done;
@@ -900,7 +909,7 @@ restart: · 23 unmodified lines
900 wait_event_interruptible(cardp->fw_wq, cardp->surprise_removed || cardp->fwdnldover);909 wait_event_interruptible(cardp->fw_wq, cardp->surprise_removed || cardp->fwdnldover);
901 910
902 timer_delete_sync(&cardp->fw_timeout);911 timer_delete_sync(&cardp->fw_timeout);
903 usb_kill_urb(cardp->rx_urb);912 usb_kill_anchored_urbs(&cardp->rx_submitted);
904 913
905 if (!cardp->fwdnldover) {914 if (!cardp->fwdnldover) {
906 pr_info("failed to load fw, resetting device!\n");915 pr_info("failed to load fw, resetting device!\n");
@@ -960,8 +969,8 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) · 53 unmodified lines
960 goto out;969 goto out;
961 970
962 /* Unlink tx & rx urb */971 /* Unlink tx & rx urb */
963 usb_kill_urb(cardp->tx_urb);972 usb_kill_anchored_urbs(&cardp->tx_submitted);
964 usb_kill_urb(cardp->rx_urb);973 usb_kill_anchored_urbs(&cardp->rx_submitted);
965 974
966 out:975 out:
967 return ret;976 return ret;
drivers/net/wireless/marvell/libertas/if_usb.h+3−0
@@ -48,6 +48,9 @@ struct if_usb_card { · 47 unmodified lines
48 struct urb *rx_urb, *tx_urb;48 struct urb *rx_urb, *tx_urb;
49 struct lbs_private *priv;49 struct lbs_private *priv;
50 50
51 struct usb_anchor rx_submitted;
52 struct usb_anchor tx_submitted;
53
51 struct sk_buff *rx_skb;54 struct sk_buff *rx_skb;
52 55
53 uint8_t ep_in;56 uint8_t ep_in;
drivers/net/wireless/marvell/libertas_tf/if_usb.c+0−2
@@ -223,7 +223,6 @@ static int if_usb_probe(struct usb_interface *intf, · 222 unmodified lines
223 if (!priv)223 if (!priv)
224 goto dealloc;224 goto dealloc;
225 225
226 usb_get_dev(udev);
227 usb_set_intfdata(intf, cardp);226 usb_set_intfdata(intf, cardp);
228 227
229 return 0;228 return 0;
@@ -258,7 +257,6 @@ static void if_usb_disconnect(struct usb_interface *intf) · 28 unmodified lines
258 kfree(cardp);257 kfree(cardp);
259 258
260 usb_set_intfdata(intf, NULL);259 usb_set_intfdata(intf, NULL);
261 usb_put_dev(interface_to_usbdev(intf));
262 260
263 lbtf_deb_leave(LBTF_DEB_MAIN);261 lbtf_deb_leave(LBTF_DEB_MAIN);
264}262}
drivers/net/wireless/marvell/mwifiex/tdls.c+4−8
@@ -755,16 +755,12 @@ mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv, · 754 unmodified lines
755 switch (action_code) {755 switch (action_code) {
756 case WLAN_PUB_ACTION_TDLS_DISCOVER_RES:756 case WLAN_PUB_ACTION_TDLS_DISCOVER_RES:
757 /* See the layout of 'struct ieee80211_mgmt'. */757 /* See the layout of 'struct ieee80211_mgmt'. */
758 extra = sizeof(mgmt->u.action.u.tdls_discover_resp) +758 extra = IEEE80211_MIN_ACTION_SIZE(tdls_discover_resp) - 24;
759 sizeof(mgmt->u.action.category);
760 skb_put(skb, extra);759 skb_put(skb, extra);
761 mgmt->u.action.category = WLAN_CATEGORY_PUBLIC;760 mgmt->u.action.category = WLAN_CATEGORY_PUBLIC;
762 mgmt->u.action.u.tdls_discover_resp.action_code =761 mgmt->u.action.action_code = WLAN_PUB_ACTION_TDLS_DISCOVER_RES;
763 WLAN_PUB_ACTION_TDLS_DISCOVER_RES;762 mgmt->u.action.tdls_discover_resp.dialog_token = dialog_token;
764 mgmt->u.action.u.tdls_discover_resp.dialog_token =763 mgmt->u.action.tdls_discover_resp.capability = cpu_to_le16(capab);
765 dialog_token;
766 mgmt->u.action.u.tdls_discover_resp.capability =
767 cpu_to_le16(capab);
768 /* move back for addr4 */764 /* move back for addr4 */
769 memmove(pos + ETH_ALEN, &mgmt->u.action, extra);765 memmove(pos + ETH_ALEN, &mgmt->u.action, extra);
770 /* init address 4 */766 /* init address 4 */
drivers/net/wireless/marvell/mwifiex/usb.c+0−4
@@ -520,8 +520,6 @@ static int mwifiex_usb_probe(struct usb_interface *intf, · 519 unmodified lines
520 return ret;520 return ret;
521 }521 }
522 522
523 usb_get_dev(udev);
524
525 return 0;523 return 0;
526}524}
527 525
@@ -666,8 +664,6 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf) · 138 unmodified lines
666 mwifiex_dbg(adapter, FATAL,664 mwifiex_dbg(adapter, FATAL,
667 "%s: removing card\n", __func__);665 "%s: removing card\n", __func__);
668 mwifiex_remove_card(adapter);666 mwifiex_remove_card(adapter);
669
670 usb_put_dev(interface_to_usbdev(intf));
671}667}
672 668
673static void mwifiex_usb_coredump(struct device *dev)669static void mwifiex_usb_coredump(struct device *dev)
drivers/net/wireless/marvell/mwl8k.c+2−2
@@ -1985,9 +1985,9 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, · 1984 unmodified lines
1985 */1985 */
1986 if (unlikely(ieee80211_is_action(wh->frame_control) &&1986 if (unlikely(ieee80211_is_action(wh->frame_control) &&
1987 mgmt->u.action.category == WLAN_CATEGORY_BACK &&1987 mgmt->u.action.category == WLAN_CATEGORY_BACK &&
1988 mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ &&1988 mgmt->u.action.action_code == WLAN_ACTION_ADDBA_REQ &&
1989 priv->ap_fw)) {1989 priv->ap_fw)) {
1990 u16 capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab);1990 u16 capab = le16_to_cpu(mgmt->u.action.addba_req.capab);
1991 tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;1991 tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
1992 index = mwl8k_tid_queue_mapping(tid);1992 index = mwl8k_tid_queue_mapping(tid);
1993 }1993 }
drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c+3−3
@@ -413,10 +413,10 @@ mt76_connac2_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi, · 412 unmodified lines
413 u32 val;413 u32 val;
414 414
415 if (ieee80211_is_action(fc) &&415 if (ieee80211_is_action(fc) &&
416 skb->len >= IEEE80211_MIN_ACTION_SIZE + 1 + 1 + 2 &&416 skb->len >= IEEE80211_MIN_ACTION_SIZE(addba_req.capab) &&
417 mgmt->u.action.category == WLAN_CATEGORY_BACK &&417 mgmt->u.action.category == WLAN_CATEGORY_BACK &&
418 mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ) {418 mgmt->u.action.action_code == WLAN_ACTION_ADDBA_REQ) {
419 u16 capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab);419 u16 capab = le16_to_cpu(mgmt->u.action.addba_req.capab);
420 420
421 txwi[5] |= cpu_to_le32(MT_TXD5_ADD_BA);421 txwi[5] |= cpu_to_le32(MT_TXD5_ADD_BA);
422 tid = (capab >> 2) & IEEE80211_QOS_CTL_TID_MASK;422 tid = (capab >> 2) & IEEE80211_QOS_CTL_TID_MASK;
drivers/net/wireless/mediatek/mt76/mt7925/mac.c+2−2
@@ -668,9 +668,9 @@ mt7925_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi, · 667 unmodified lines
668 u32 val;668 u32 val;
669 669
670 if (ieee80211_is_action(fc) &&670 if (ieee80211_is_action(fc) &&
671 skb->len >= IEEE80211_MIN_ACTION_SIZE + 1 &&671 skb->len >= IEEE80211_MIN_ACTION_SIZE(action_code) &&
672 mgmt->u.action.category == WLAN_CATEGORY_BACK &&672 mgmt->u.action.category == WLAN_CATEGORY_BACK &&
673 mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ)673 mgmt->u.action.action_code == WLAN_ACTION_ADDBA_REQ)
674 tid = MT_TX_ADDBA;674 tid = MT_TX_ADDBA;
675 else if (ieee80211_is_mgmt(hdr->frame_control))675 else if (ieee80211_is_mgmt(hdr->frame_control))
676 tid = MT_TX_NORMAL;676 tid = MT_TX_NORMAL;
drivers/net/wireless/mediatek/mt76/mt7996/mac.c+2−2
@@ -800,9 +800,9 @@ mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi, · 799 unmodified lines
800 u32 val;800 u32 val;
801 801
802 if (ieee80211_is_action(fc) &&802 if (ieee80211_is_action(fc) &&
803 skb->len >= IEEE80211_MIN_ACTION_SIZE + 1 &&803 skb->len >= IEEE80211_MIN_ACTION_SIZE(action_code) &&
804 mgmt->u.action.category == WLAN_CATEGORY_BACK &&804 mgmt->u.action.category == WLAN_CATEGORY_BACK &&
805 mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ) {805 mgmt->u.action.action_code == WLAN_ACTION_ADDBA_REQ) {
806 if (is_mt7990(&dev->mt76))806 if (is_mt7990(&dev->mt76))
807 txwi[6] |= cpu_to_le32(FIELD_PREP(MT_TXD6_TID_ADDBA, tid));807 txwi[6] |= cpu_to_le32(FIELD_PREP(MT_TXD6_TID_ADDBA, tid));
808 else808 else
drivers/net/wireless/quantenna/qtnfmac/core.c+2−2
@@ -452,8 +452,8 @@ int qtnf_core_net_attach(struct qtnf_wmac *mac, struct qtnf_vif *vif, · 451 unmodified lines
452 void *qdev_vif;452 void *qdev_vif;
453 int ret;453 int ret;
454 454
455 dev = alloc_netdev_mqs(sizeof(struct qtnf_vif *), name,455 dev = alloc_netdev(sizeof(struct qtnf_vif *), name,
456 name_assign_type, ether_setup, 1, 1);456 name_assign_type, ether_setup);
457 if (!dev)457 if (!dev)
458 return -ENOMEM;458 return -ENOMEM;
459 459
drivers/net/wireless/ralink/rt2x00/rt2x00usb.c+1−11
@@ -802,14 +802,12 @@ int rt2x00usb_probe(struct usb_interface *usb_intf, · 801 unmodified lines
802 struct rt2x00_dev *rt2x00dev;802 struct rt2x00_dev *rt2x00dev;
803 int retval;803 int retval;
804 804
805 usb_dev = usb_get_dev(usb_dev);
806 usb_reset_device(usb_dev);805 usb_reset_device(usb_dev);
807 806
808 hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);807 hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
809 if (!hw) {808 if (!hw) {
810 rt2x00_probe_err("Failed to allocate hardware\n");809 rt2x00_probe_err("Failed to allocate hardware\n");
811 retval = -ENOMEM;810 return -ENOMEM;
812 goto exit_put_device;
813 }811 }
814 812
815 usb_set_intfdata(usb_intf, hw);813 usb_set_intfdata(usb_intf, hw);
@@ -851,10 +849,6 @@ exit_free_reg: · 35 unmodified lines
851 849
852exit_free_device:850exit_free_device:
853 ieee80211_free_hw(hw);851 ieee80211_free_hw(hw);
854
855exit_put_device:
856 usb_put_dev(usb_dev);
857
858 usb_set_intfdata(usb_intf, NULL);852 usb_set_intfdata(usb_intf, NULL);
859 853
860 return retval;854 return retval;
@@ -873,11 +867,7 @@ void rt2x00usb_disconnect(struct usb_interface *usb_intf) · 12 unmodified lines
873 rt2x00usb_free_reg(rt2x00dev);867 rt2x00usb_free_reg(rt2x00dev);
874 ieee80211_free_hw(hw);868 ieee80211_free_hw(hw);
875 869
876 /*
877 * Free the USB device data.
878 */
879 usb_set_intfdata(usb_intf, NULL);870 usb_set_intfdata(usb_intf, NULL);
880 usb_put_dev(interface_to_usbdev(usb_intf));
881}871}
882EXPORT_SYMBOL_GPL(rt2x00usb_disconnect);872EXPORT_SYMBOL_GPL(rt2x00usb_disconnect);
883 873
drivers/net/wireless/realtek/rtl8xxxu/core.c+7−7
@@ -5146,10 +5146,10 @@ static void rtl8xxxu_dump_action(struct device *dev, · 5145 unmodified lines
5146 if (!(rtl8xxxu_debug & RTL8XXXU_DEBUG_ACTION))5146 if (!(rtl8xxxu_debug & RTL8XXXU_DEBUG_ACTION))
5147 return;5147 return;
5148 5148
5149 switch (mgmt->u.action.u.addba_resp.action_code) {5149 switch (mgmt->u.action.action_code) {
5150 case WLAN_ACTION_ADDBA_RESP:5150 case WLAN_ACTION_ADDBA_RESP:
5151 cap = le16_to_cpu(mgmt->u.action.u.addba_resp.capab);5151 cap = le16_to_cpu(mgmt->u.action.addba_resp.capab);
5152 timeout = le16_to_cpu(mgmt->u.action.u.addba_resp.timeout);5152 timeout = le16_to_cpu(mgmt->u.action.addba_resp.timeout);
5153 dev_info(dev, "WLAN_ACTION_ADDBA_RESP: "5153 dev_info(dev, "WLAN_ACTION_ADDBA_RESP: "
5154 "timeout %i, tid %02x, buf_size %02x, policy %02x, "5154 "timeout %i, tid %02x, buf_size %02x, policy %02x, "
5155 "status %02x\n",5155 "status %02x\n",
@@ -5157,11 +5157,11 @@ static void rtl8xxxu_dump_action(struct device *dev, · 1 unmodified line
5157 (cap & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2,5157 (cap & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2,
5158 (cap & IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK) >> 6,5158 (cap & IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK) >> 6,
5159 (cap >> 1) & 0x1,5159 (cap >> 1) & 0x1,
5160 le16_to_cpu(mgmt->u.action.u.addba_resp.status));5160 le16_to_cpu(mgmt->u.action.addba_resp.status));
5161 break;5161 break;
5162 case WLAN_ACTION_ADDBA_REQ:5162 case WLAN_ACTION_ADDBA_REQ:
5163 cap = le16_to_cpu(mgmt->u.action.u.addba_req.capab);5163 cap = le16_to_cpu(mgmt->u.action.addba_req.capab);
5164 timeout = le16_to_cpu(mgmt->u.action.u.addba_req.timeout);5164 timeout = le16_to_cpu(mgmt->u.action.addba_req.timeout);
5165 dev_info(dev, "WLAN_ACTION_ADDBA_REQ: "5165 dev_info(dev, "WLAN_ACTION_ADDBA_REQ: "
5166 "timeout %i, tid %02x, buf_size %02x, policy %02x\n",5166 "timeout %i, tid %02x, buf_size %02x, policy %02x\n",
5167 timeout,5167 timeout,
@@ -5171,7 +5171,7 @@ static void rtl8xxxu_dump_action(struct device *dev, · 3 unmodified lines
5171 break;5171 break;
5172 default:5172 default:
5173 dev_info(dev, "action frame %02x\n",5173 dev_info(dev, "action frame %02x\n",
5174 mgmt->u.action.u.addba_resp.action_code);5174 mgmt->u.action.action_code);
5175 break;5175 break;
5176 }5176 }
5177}5177}
drivers/net/wireless/realtek/rtlwifi/base.c+14−14
@@ -1409,7 +1409,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) · 1408 unmodified lines
1409 sta_entry =1409 sta_entry =
1410 (struct rtl_sta_info *)sta->drv_priv;1410 (struct rtl_sta_info *)sta->drv_priv;
1411 capab =1411 capab =
1412 le16_to_cpu(mgmt->u.action.u.addba_req.capab);1412 le16_to_cpu(mgmt->u.action.addba_req.capab);
1413 tid = (capab &1413 tid = (capab &
1414 IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;1414 IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
1415 if (tid >= MAX_TID_COUNT) {1415 if (tid >= MAX_TID_COUNT) {
@@ -2392,35 +2392,35 @@ static struct sk_buff *rtl_make_smps_action(struct ieee80211_hw *hw, · 976 unmodified lines
2392 struct sk_buff *skb;2392 struct sk_buff *skb;
2393 struct ieee80211_mgmt *action_frame;2393 struct ieee80211_mgmt *action_frame;
2394 2394
2395 /* 27 = header + category + action + smps mode */2395 skb = dev_alloc_skb(IEEE80211_MIN_ACTION_SIZE(ht_smps) +
2396 skb = dev_alloc_skb(27 + hw->extra_tx_headroom);2396 hw->extra_tx_headroom);
2397 if (!skb)2397 if (!skb)
2398 return NULL;2398 return NULL;
2399 2399
2400 skb_reserve(skb, hw->extra_tx_headroom);2400 skb_reserve(skb, hw->extra_tx_headroom);
2401 action_frame = skb_put_zero(skb, 27);2401 action_frame = skb_put_zero(skb, IEEE80211_MIN_ACTION_SIZE(ht_smps));
2402 memcpy(action_frame->da, da, ETH_ALEN);2402 memcpy(action_frame->da, da, ETH_ALEN);
2403 memcpy(action_frame->sa, rtlefuse->dev_addr, ETH_ALEN);2403 memcpy(action_frame->sa, rtlefuse->dev_addr, ETH_ALEN);
2404 memcpy(action_frame->bssid, bssid, ETH_ALEN);2404 memcpy(action_frame->bssid, bssid, ETH_ALEN);
2405 action_frame->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |2405 action_frame->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
2406 IEEE80211_STYPE_ACTION);2406 IEEE80211_STYPE_ACTION);
2407 action_frame->u.action.category = WLAN_CATEGORY_HT;2407 action_frame->u.action.category = WLAN_CATEGORY_HT;
2408 action_frame->u.action.u.ht_smps.action = WLAN_HT_ACTION_SMPS;2408 action_frame->u.action.action_code = WLAN_HT_ACTION_SMPS;
2409 switch (smps) {2409 switch (smps) {
2410 case IEEE80211_SMPS_AUTOMATIC:/* 0 */2410 case IEEE80211_SMPS_AUTOMATIC:/* 0 */
2411 case IEEE80211_SMPS_NUM_MODES:/* 4 */2411 case IEEE80211_SMPS_NUM_MODES:/* 4 */
2412 WARN_ON(1);2412 WARN_ON(1);
2413 fallthrough;2413 fallthrough;
2414 case IEEE80211_SMPS_OFF:/* 1 */ /*MIMO_PS_NOLIMIT*/2414 case IEEE80211_SMPS_OFF:/* 1 */ /*MIMO_PS_NOLIMIT*/
2415 action_frame->u.action.u.ht_smps.smps_control =2415 action_frame->u.action.ht_smps.smps_control =
2416 WLAN_HT_SMPS_CONTROL_DISABLED;/* 0 */2416 WLAN_HT_SMPS_CONTROL_DISABLED;/* 0 */
2417 break;2417 break;
2418 case IEEE80211_SMPS_STATIC:/* 2 */ /*MIMO_PS_STATIC*/2418 case IEEE80211_SMPS_STATIC:/* 2 */ /*MIMO_PS_STATIC*/
2419 action_frame->u.action.u.ht_smps.smps_control =2419 action_frame->u.action.ht_smps.smps_control =
2420 WLAN_HT_SMPS_CONTROL_STATIC;/* 1 */2420 WLAN_HT_SMPS_CONTROL_STATIC;/* 1 */
2421 break;2421 break;
2422 case IEEE80211_SMPS_DYNAMIC:/* 3 */ /*MIMO_PS_DYNAMIC*/2422 case IEEE80211_SMPS_DYNAMIC:/* 3 */ /*MIMO_PS_DYNAMIC*/
2423 action_frame->u.action.u.ht_smps.smps_control =2423 action_frame->u.action.ht_smps.smps_control =
2424 WLAN_HT_SMPS_CONTROL_DYNAMIC;/* 3 */2424 WLAN_HT_SMPS_CONTROL_DYNAMIC;/* 3 */
2425 break;2425 break;
2426 }2426 }
@@ -2519,25 +2519,25 @@ struct sk_buff *rtl_make_del_ba(struct ieee80211_hw *hw, · 92 unmodified lines
2519 struct ieee80211_mgmt *action_frame;2519 struct ieee80211_mgmt *action_frame;
2520 u16 params;2520 u16 params;
2521 2521
2522 /* 27 = header + category + action + smps mode */2522 skb = dev_alloc_skb(IEEE80211_MIN_ACTION_SIZE(delba) +
2523 skb = dev_alloc_skb(34 + hw->extra_tx_headroom);2523 hw->extra_tx_headroom);
2524 if (!skb)2524 if (!skb)
2525 return NULL;2525 return NULL;
2526 2526
2527 skb_reserve(skb, hw->extra_tx_headroom);2527 skb_reserve(skb, hw->extra_tx_headroom);
2528 action_frame = skb_put_zero(skb, 34);2528 action_frame = skb_put_zero(skb, IEEE80211_MIN_ACTION_SIZE(delba));
2529 memcpy(action_frame->sa, sa, ETH_ALEN);2529 memcpy(action_frame->sa, sa, ETH_ALEN);
2530 memcpy(action_frame->da, rtlefuse->dev_addr, ETH_ALEN);2530 memcpy(action_frame->da, rtlefuse->dev_addr, ETH_ALEN);
2531 memcpy(action_frame->bssid, bssid, ETH_ALEN);2531 memcpy(action_frame->bssid, bssid, ETH_ALEN);
2532 action_frame->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |2532 action_frame->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
2533 IEEE80211_STYPE_ACTION);2533 IEEE80211_STYPE_ACTION);
2534 action_frame->u.action.category = WLAN_CATEGORY_BACK;2534 action_frame->u.action.category = WLAN_CATEGORY_BACK;
2535 action_frame->u.action.u.delba.action_code = WLAN_ACTION_DELBA;2535 action_frame->u.action.action_code = WLAN_ACTION_DELBA;
2536 params = (u16)(1 << 11); /* bit 11 initiator */2536 params = (u16)(1 << 11); /* bit 11 initiator */
2537 params |= (u16)(tid << 12); /* bit 15:12 TID number */2537 params |= (u16)(tid << 12); /* bit 15:12 TID number */
2538 2538
2539 action_frame->u.action.u.delba.params = cpu_to_le16(params);2539 action_frame->u.action.delba.params = cpu_to_le16(params);
2540 action_frame->u.action.u.delba.reason_code =2540 action_frame->u.action.delba.reason_code =
2541 cpu_to_le16(WLAN_REASON_QSTA_TIMEOUT);2541 cpu_to_le16(WLAN_REASON_QSTA_TIMEOUT);
2542 2542
2543 return skb;2543 return skb;
drivers/net/wireless/realtek/rtlwifi/pci.c+1−1
@@ -507,7 +507,7 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio) · 506 unmodified lines
507 if (ieee80211_is_action(fc)) {507 if (ieee80211_is_action(fc)) {
508 struct ieee80211_mgmt *action_frame =508 struct ieee80211_mgmt *action_frame =
509 (struct ieee80211_mgmt *)skb->data;509 (struct ieee80211_mgmt *)skb->data;
510 if (action_frame->u.action.u.ht_smps.action ==510 if (action_frame->u.action.action_code ==
511 WLAN_HT_ACTION_SMPS) {511 WLAN_HT_ACTION_SMPS) {
512 dev_kfree_skb(skb);512 dev_kfree_skb(skb);
513 goto tx_status_ok;513 goto tx_status_ok;
drivers/net/wireless/rsi/rsi_91x_mac80211.c+16−1
@@ -325,6 +325,22 @@ void rsi_mac80211_detach(struct rsi_hw *adapter) · 324 unmodified lines
325}325}
326EXPORT_SYMBOL_GPL(rsi_mac80211_detach);326EXPORT_SYMBOL_GPL(rsi_mac80211_detach);
327 327
328/**
329 * rsi_mac80211_rfkill_exit() - This function is used to stop rfkill polling
330 * when the device is removed.
331 * @adapter: Pointer to the adapter structure.
332 *
333 * Return: None.
334 */
335void rsi_mac80211_rfkill_exit(struct rsi_hw *adapter)
336{
337 struct ieee80211_hw *hw = adapter->hw;
338
339 if (hw)
340 wiphy_rfkill_stop_polling(hw->wiphy);
341}
342EXPORT_SYMBOL_GPL(rsi_mac80211_rfkill_exit);
343
328/**344/**
329 * rsi_indicate_tx_status() - This function indicates the transmit status.345 * rsi_indicate_tx_status() - This function indicates the transmit status.
330 * @adapter: Pointer to the adapter structure.346 * @adapter: Pointer to the adapter structure.
@@ -422,7 +438,6 @@ static void rsi_mac80211_stop(struct ieee80211_hw *hw, bool suspend) · 91 unmodified lines
422 rsi_dbg(ERR_ZONE, "===> Interface DOWN <===\n");438 rsi_dbg(ERR_ZONE, "===> Interface DOWN <===\n");
423 mutex_lock(&common->mutex);439 mutex_lock(&common->mutex);
424 common->iface_down = true;440 common->iface_down = true;
425 wiphy_rfkill_stop_polling(hw->wiphy);
426 441
427 /* Block all rx frames */442 /* Block all rx frames */
428 rsi_send_rx_filter_frame(common, 0xffff);443 rsi_send_rx_filter_frame(common, 0xffff);
drivers/net/wireless/rsi/rsi_91x_usb.c+2−0
@@ -877,6 +877,8 @@ static void rsi_disconnect(struct usb_interface *pfunction) · 876 unmodified lines
877 if (!adapter)877 if (!adapter)
878 return;878 return;
879 879
880 rsi_mac80211_rfkill_exit(adapter);
881
880 rsi_mac80211_detach(adapter);882 rsi_mac80211_detach(adapter);
881 883
882 if (IS_ENABLED(CONFIG_RSI_COEX) && adapter->priv->coex_mode > 1 &&884 if (IS_ENABLED(CONFIG_RSI_COEX) && adapter->priv->coex_mode > 1 &&
drivers/net/wireless/rsi/rsi_common.h+1−0
@@ -79,6 +79,7 @@ static inline int rsi_kill_thread(struct rsi_thread *handle) · 78 unmodified lines
79}79}
80 80
81void rsi_mac80211_detach(struct rsi_hw *hw);81void rsi_mac80211_detach(struct rsi_hw *hw);
82void rsi_mac80211_rfkill_exit(struct rsi_hw *hw);
82u16 rsi_get_connected_channel(struct ieee80211_vif *vif);83u16 rsi_get_connected_channel(struct ieee80211_vif *vif);
83struct rsi_hw *rsi_91x_init(u16 oper_mode);84struct rsi_hw *rsi_91x_init(u16 oper_mode);
84void rsi_91x_deinit(struct rsi_hw *adapter);85void rsi_91x_deinit(struct rsi_hw *adapter);
drivers/net/wireless/silabs/wfx/data_rx.c+4−4
@@ -21,14 +21,14 @@ static void wfx_rx_handle_ba(struct wfx_vif *wvif, struct ieee80211_mgmt *mgmt) · 20 unmodified lines
21 if (wfx_api_older_than(wvif->wdev, 3, 6))21 if (wfx_api_older_than(wvif->wdev, 3, 6))
22 return;22 return;
23 23
24 switch (mgmt->u.action.u.addba_req.action_code) {24 switch (mgmt->u.action.action_code) {
25 case WLAN_ACTION_ADDBA_REQ:25 case WLAN_ACTION_ADDBA_REQ:
26 params = le16_to_cpu(mgmt->u.action.u.addba_req.capab);26 params = le16_to_cpu(mgmt->u.action.addba_req.capab);
27 tid = (params & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;27 tid = (params & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
28 ieee80211_start_rx_ba_session_offl(vif, mgmt->sa, tid);28 ieee80211_start_rx_ba_session_offl(vif, mgmt->sa, tid);
29 break;29 break;
30 case WLAN_ACTION_DELBA:30 case WLAN_ACTION_DELBA:
31 params = le16_to_cpu(mgmt->u.action.u.delba.params);31 params = le16_to_cpu(mgmt->u.action.delba.params);
32 tid = (params & IEEE80211_DELBA_PARAM_TID_MASK) >> 12;32 tid = (params & IEEE80211_DELBA_PARAM_TID_MASK) >> 12;
33 ieee80211_stop_rx_ba_session_offl(vif, mgmt->sa, tid);33 ieee80211_stop_rx_ba_session_offl(vif, mgmt->sa, tid);
34 break;34 break;
@@ -80,7 +80,7 @@ void wfx_rx_cb(struct wfx_vif *wvif, const struct wfx_hif_ind_rx *arg, struct sk · 45 unmodified lines
80 */80 */
81 if (ieee80211_is_action(frame->frame_control) &&81 if (ieee80211_is_action(frame->frame_control) &&
82 mgmt->u.action.category == WLAN_CATEGORY_BACK &&82 mgmt->u.action.category == WLAN_CATEGORY_BACK &&
83 skb->len > IEEE80211_MIN_ACTION_SIZE) {83 skb->len > IEEE80211_MIN_ACTION_SIZE(action_code)) {
84 wfx_rx_handle_ba(wvif, mgmt);84 wfx_rx_handle_ba(wvif, mgmt);
85 goto drop;85 goto drop;
86 }86 }
drivers/net/wireless/virtual/mac80211_hwsim.c+64−0
@@ -36,6 +36,8 @@ · 35 unmodified lines
36#include <linux/virtio.h>36#include <linux/virtio.h>
37#include <linux/virtio_ids.h>37#include <linux/virtio_ids.h>
38#include <linux/virtio_config.h>38#include <linux/virtio_config.h>
39#include <linux/uaccess.h>
40#include <linux/string.h>
39#include "mac80211_hwsim.h"41#include "mac80211_hwsim.h"
40 42
41#define WARN_QUEUE 10043#define WARN_QUEUE 100
@@ -1203,6 +1205,65 @@ static const struct file_operations hwsim_background_cac_ops = { · 1161 unmodified lines
1203 .llseek = default_llseek,1205 .llseek = default_llseek,
1204};1206};
1205 1207
1208struct hwsim_chanctx_iter_arg {
1209 struct ieee80211_chanctx_conf *conf;
1210 u32 freq_mhz;
1211};
1212
1213static void hwsim_6ghz_chanctx_iter(struct ieee80211_hw *hw,
1214 struct ieee80211_chanctx_conf *conf,
1215 void *data)
1216{
1217 struct hwsim_chanctx_iter_arg *arg = data;
1218
1219 if (conf->def.chan &&
1220 conf->def.chan->band == NL80211_BAND_6GHZ &&
1221 conf->def.chan->center_freq == arg->freq_mhz)
1222 arg->conf = conf;
1223}
1224
1225static ssize_t hwsim_simulate_incumbent_signal_write(struct file *file,
1226 const char __user *ubuf,
1227 size_t len, loff_t *ppos)
1228{
1229 struct mac80211_hwsim_data *data = file->private_data;
1230 struct hwsim_chanctx_iter_arg arg = {};
1231 u32 bitmap;
1232 char buf[64];
1233
1234 if (!len || len > sizeof(buf) - 1)
1235 return -EINVAL;
1236
1237 if (copy_from_user(buf, ubuf, len))
1238 return -EFAULT;
1239 buf[len] = '\0';
1240
1241 if (sscanf(buf, "%u %i", &arg.freq_mhz, &bitmap) != 2)
1242 return -EINVAL;
1243
1244 if (!arg.freq_mhz)
1245 return -EINVAL;
1246
1247 ieee80211_iter_chan_contexts_atomic(data->hw,
1248 hwsim_6ghz_chanctx_iter,
1249 &arg);
1250
1251 if (!arg.conf)
1252 return -EINVAL;
1253
1254 cfg80211_incumbent_signal_notify(data->hw->wiphy,
1255 &arg.conf->def,
1256 bitmap,
1257 GFP_KERNEL);
1258
1259 return len;
1260}
1261
1262static const struct file_operations hwsim_simulate_incumbent_signal_fops = {
1263 .open = simple_open,
1264 .write = hwsim_simulate_incumbent_signal_write,
1265};
1266
1206static int hwsim_fops_group_read(void *dat, u64 *val)1267static int hwsim_fops_group_read(void *dat, u64 *val)
1207{1268{
1208 struct mac80211_hwsim_data *data = dat;1269 struct mac80211_hwsim_data *data = dat;
@@ -5950,6 +6011,9 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, · 4741 unmodified lines
5950 debugfs_create_file("dfs_background_cac", 0200,6011 debugfs_create_file("dfs_background_cac", 0200,
5951 data->debugfs,6012 data->debugfs,
5952 data, &hwsim_background_cac_ops);6013 data, &hwsim_background_cac_ops);
6014 debugfs_create_file("simulate_incumbent_signal_interference", 0200,
6015 data->debugfs,
6016 data, &hwsim_simulate_incumbent_signal_fops);
5953 6017
5954 if (param->pmsr_capa) {6018 if (param->pmsr_capa) {
5955 data->pmsr_capa = *param->pmsr_capa;6019 data->pmsr_capa = *param->pmsr_capa;
include/linux/ieee80211-eht.h+2−2
@@ -251,8 +251,8 @@ struct ieee80211_eht_operation_info { · 250 unmodified lines
251#define IEEE80211_EHT_PHY_CAP5_SUPP_EXTRA_EHT_LTF 0x40251#define IEEE80211_EHT_PHY_CAP5_SUPP_EXTRA_EHT_LTF 0x40
252#define IEEE80211_EHT_PHY_CAP6_MAX_NUM_SUPP_EHT_LTF_MASK 0x07252#define IEEE80211_EHT_PHY_CAP6_MAX_NUM_SUPP_EHT_LTF_MASK 0x07
253 253
254#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_80MHZ 0x08254#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_80MHZ 0x10
255#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_160MHZ 0x30255#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_160MHZ 0x20
256#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_320MHZ 0x40256#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_320MHZ 0x40
257#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_MASK 0x78257#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_MASK 0x78
258#define IEEE80211_EHT_PHY_CAP6_EHT_DUP_6GHZ_SUPP 0x80258#define IEEE80211_EHT_PHY_CAP6_EHT_DUP_6GHZ_SUPP 0x80
include/linux/ieee80211-ht.h+3−0
@@ -281,6 +281,9 @@ enum ieee80211_back_actioncode { · 280 unmodified lines
281 WLAN_ACTION_ADDBA_REQ = 0,281 WLAN_ACTION_ADDBA_REQ = 0,
282 WLAN_ACTION_ADDBA_RESP = 1,282 WLAN_ACTION_ADDBA_RESP = 1,
283 WLAN_ACTION_DELBA = 2,283 WLAN_ACTION_DELBA = 2,
284 WLAN_ACTION_NDP_ADDBA_REQ = 128,
285 WLAN_ACTION_NDP_ADDBA_RESP = 129,
286 WLAN_ACTION_NDP_DELBA = 130,
284};287};
285 288
286/* BACK (block-ack) parties */289/* BACK (block-ack) parties */
include/linux/ieee80211-uhr.h+2−2
@@ -12,8 +12,8 @@ · 11 unmodified lines
12 12
13#define IEEE80211_UHR_OPER_PARAMS_DPS_ENA 0x000113#define IEEE80211_UHR_OPER_PARAMS_DPS_ENA 0x0001
14#define IEEE80211_UHR_OPER_PARAMS_NPCA_ENA 0x000214#define IEEE80211_UHR_OPER_PARAMS_NPCA_ENA 0x0002
15#define IEEE80211_UHR_OPER_PARAMS_DBE_ENA 0x000415#define IEEE80211_UHR_OPER_PARAMS_PEDCA_ENA 0x0004
16#define IEEE80211_UHR_OPER_PARAMS_PEDCA_ENA 0x000816#define IEEE80211_UHR_OPER_PARAMS_DBE_ENA 0x0008
17 17
18struct ieee80211_uhr_operation {18struct ieee80211_uhr_operation {
19 __le16 params;19 __le16 params;
include/linux/ieee80211.h+32−53
@@ -1046,31 +1046,28 @@ struct ieee80211_mgmt { · 1045 unmodified lines
1046 } __packed probe_resp;1046 } __packed probe_resp;
1047 struct {1047 struct {
1048 u8 category;1048 u8 category;
1049 u8 action_code;
1049 union {1050 union {
1050 struct {1051 struct {
1051 u8 action_code;
1052 u8 dialog_token;1052 u8 dialog_token;
1053 u8 status_code;1053 u8 status_code;
1054 u8 variable[];1054 u8 variable[];
1055 } __packed wme_action;1055 } __packed wme_action;
1056 struct{1056 struct{
1057 u8 action_code;1057 u8 no_fixed_fields[0];
1058 u8 variable[];1058 u8 variable[];
1059 } __packed chan_switch;1059 } __packed chan_switch;
1060 struct{1060 struct{
1061 u8 action_code;
1062 struct ieee80211_ext_chansw_ie data;1061 struct ieee80211_ext_chansw_ie data;
1063 u8 variable[];1062 u8 variable[];
1064 } __packed ext_chan_switch;1063 } __packed ext_chan_switch;
1065 struct{1064 struct{
1066 u8 action_code;
1067 u8 dialog_token;1065 u8 dialog_token;
1068 u8 element_id;1066 u8 element_id;
1069 u8 length;1067 u8 length;
1070 struct ieee80211_msrment_ie msr_elem;1068 struct ieee80211_msrment_ie msr_elem;
1071 } __packed measurement;1069 } __packed measurement;
1072 struct{1070 struct{
1073 u8 action_code;
1074 u8 dialog_token;1071 u8 dialog_token;
1075 __le16 capab;1072 __le16 capab;
1076 __le16 timeout;1073 __le16 timeout;
@@ -1079,7 +1076,6 @@ struct ieee80211_mgmt { · 2 unmodified lines
1079 u8 variable[];1076 u8 variable[];
1080 } __packed addba_req;1077 } __packed addba_req;
1081 struct{1078 struct{
1082 u8 action_code;
1083 u8 dialog_token;1079 u8 dialog_token;
1084 __le16 status;1080 __le16 status;
1085 __le16 capab;1081 __le16 capab;
@@ -1088,54 +1084,45 @@ struct ieee80211_mgmt { · 2 unmodified lines
1088 u8 variable[];1084 u8 variable[];
1089 } __packed addba_resp;1085 } __packed addba_resp;
1090 struct{1086 struct{
1091 u8 action_code;
1092 __le16 params;1087 __le16 params;
1093 __le16 reason_code;1088 __le16 reason_code;
1094 } __packed delba;1089 } __packed delba;
1095 struct {1090 struct {
1096 u8 action_code;1091 u8 no_fixed_fields[0];
1097 u8 variable[];1092 u8 variable[];
1098 } __packed self_prot;1093 } __packed self_prot;
1099 struct{1094 struct{
1100 u8 action_code;1095 u8 no_fixed_fields[0];
1101 u8 variable[];1096 u8 variable[];
1102 } __packed mesh_action;1097 } __packed mesh_action;
1103 struct {1098 struct {
1104 u8 action;
1105 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];1099 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
1106 } __packed sa_query;1100 } __packed sa_query;
1107 struct {1101 struct {
1108 u8 action;
1109 u8 smps_control;1102 u8 smps_control;
1110 } __packed ht_smps;1103 } __packed ht_smps;
1111 struct {1104 struct {
1112 u8 action_code;
1113 u8 chanwidth;1105 u8 chanwidth;
1114 } __packed ht_notify_cw;1106 } __packed ht_notify_cw;
1115 struct {1107 struct {
1116 u8 action_code;
1117 u8 dialog_token;1108 u8 dialog_token;
1118 __le16 capability;1109 __le16 capability;
1119 u8 variable[];1110 u8 variable[];
1120 } __packed tdls_discover_resp;1111 } __packed tdls_discover_resp;
1121 struct {1112 struct {
1122 u8 action_code;
1123 u8 operating_mode;1113 u8 operating_mode;
1124 } __packed vht_opmode_notif;1114 } __packed vht_opmode_notif;
1125 struct {1115 struct {
1126 u8 action_code;
1127 u8 membership[WLAN_MEMBERSHIP_LEN];1116 u8 membership[WLAN_MEMBERSHIP_LEN];
1128 u8 position[WLAN_USER_POSITION_LEN];1117 u8 position[WLAN_USER_POSITION_LEN];
1129 } __packed vht_group_notif;1118 } __packed vht_group_notif;
1130 struct {1119 struct {
1131 u8 action_code;
1132 u8 dialog_token;1120 u8 dialog_token;
1133 u8 tpc_elem_id;1121 u8 tpc_elem_id;
1134 u8 tpc_elem_length;1122 u8 tpc_elem_length;
1135 struct ieee80211_tpc_report_ie tpc;1123 struct ieee80211_tpc_report_ie tpc;
1136 } __packed tpc_report;1124 } __packed tpc_report;
1137 struct {1125 struct {
1138 u8 action_code;
1139 u8 dialog_token;1126 u8 dialog_token;
1140 u8 follow_up;1127 u8 follow_up;
1141 u8 tod[6];1128 u8 tod[6];
@@ -1145,11 +1132,10 @@ struct ieee80211_mgmt { · 3 unmodified lines
1145 u8 variable[];1132 u8 variable[];
1146 } __packed ftm;1133 } __packed ftm;
1147 struct {1134 struct {
1148 u8 action_code;1135 u8 no_fixed_fields[0];
1149 u8 variable[];1136 u8 variable[];
1150 } __packed s1g;1137 } __packed s1g;
1151 struct {1138 struct {
1152 u8 action_code;
1153 u8 dialog_token;1139 u8 dialog_token;
1154 u8 follow_up;1140 u8 follow_up;
1155 u32 tod;1141 u32 tod;
@@ -1158,41 +1144,37 @@ struct ieee80211_mgmt { · 2 unmodified lines
1158 u8 max_toa_error;1144 u8 max_toa_error;
1159 } __packed wnm_timing_msr;1145 } __packed wnm_timing_msr;
1160 struct {1146 struct {
1161 u8 action_code;
1162 u8 dialog_token;1147 u8 dialog_token;
1163 u8 variable[];1148 u8 variable[];
1164 } __packed ttlm_req;1149 } __packed ttlm_req;
1165 struct {1150 struct {
1166 u8 action_code;
1167 u8 dialog_token;1151 u8 dialog_token;
1168 __le16 status_code;1152 __le16 status_code;
1169 u8 variable[];1153 u8 variable[];
1170 } __packed ttlm_res;1154 } __packed ttlm_res;
1171 struct {1155 struct {
1172 u8 action_code;1156 u8 no_fixed_fields[0];
1157 /* no variable fields either */
1173 } __packed ttlm_tear_down;1158 } __packed ttlm_tear_down;
1174 struct {1159 struct {
1175 u8 action_code;
1176 u8 dialog_token;1160 u8 dialog_token;
1177 u8 variable[];1161 u8 variable[];
1178 } __packed ml_reconf_req;1162 } __packed ml_reconf_req;
1179 struct {1163 struct {
1180 u8 action_code;
1181 u8 dialog_token;1164 u8 dialog_token;
1182 u8 count;1165 u8 count;
1183 u8 variable[];1166 u8 variable[];
1184 } __packed ml_reconf_resp;1167 } __packed ml_reconf_resp;
1185 struct {1168 struct {
1186 u8 action_code;1169 u8 no_fixed_fields[0];
1187 u8 variable[];1170 u8 variable[];
1188 } __packed epcs;1171 } __packed epcs;
1189 struct {1172 struct {
1190 u8 action_code;
1191 u8 dialog_token;1173 u8 dialog_token;
1192 u8 control;1174 u8 control;
1193 u8 variable[];1175 u8 variable[];
1194 } __packed eml_omn;1176 } __packed eml_omn;
1195 } u;1177 };
1196 } __packed action;1178 } __packed action;
1197 DECLARE_FLEX_ARRAY(u8, body); /* Generic frame body */1179 DECLARE_FLEX_ARRAY(u8, body); /* Generic frame body */
1198 } u;1180 } u;
@@ -1210,8 +1192,7 @@ struct ieee80211_mgmt { · 11 unmodified lines
1210 1192
1211#define BSS_MEMBERSHIP_SELECTOR_MIN BSS_MEMBERSHIP_SELECTOR_UHR_PHY1193#define BSS_MEMBERSHIP_SELECTOR_MIN BSS_MEMBERSHIP_SELECTOR_UHR_PHY
1212 1194
1213/* mgmt header + 1 byte category code */1195#define IEEE80211_MIN_ACTION_SIZE(type) offsetofend(struct ieee80211_mgmt, u.action.type)
1214#define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u)
1215 1196
1216 1197
1217/* Management MIC information element (IEEE 802.11w) for CMAC */1198/* Management MIC information element (IEEE 802.11w) for CMAC */
@@ -1501,6 +1482,8 @@ enum ieee80211_statuscode { · 283 unmodified lines
1501 WLAN_STATUS_REJECT_DSE_BAND = 96,1482 WLAN_STATUS_REJECT_DSE_BAND = 96,
1502 WLAN_STATUS_DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL = 99,1483 WLAN_STATUS_DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL = 99,
1503 WLAN_STATUS_DENIED_DUE_TO_SPECTRUM_MANAGEMENT = 103,1484 WLAN_STATUS_DENIED_DUE_TO_SPECTRUM_MANAGEMENT = 103,
1485 /* 802.11ah */
1486 WLAN_STATUS_REJECTED_NDP_BLOCK_ACK_SUGGESTED = 109,
1504 /* 802.11ai */1487 /* 802.11ai */
1505 WLAN_STATUS_FILS_AUTHENTICATION_FAILURE = 112,1488 WLAN_STATUS_FILS_AUTHENTICATION_FAILURE = 112,
1506 WLAN_STATUS_UNKNOWN_AUTHENTICATION_SERVER = 113,1489 WLAN_STATUS_UNKNOWN_AUTHENTICATION_SERVER = 113,
@@ -2391,7 +2374,7 @@ static inline bool ieee80211_is_bufferable_mmpdu(struct sk_buff *skb) · 884 unmodified lines
2391 if (!ieee80211_is_action(fc))2374 if (!ieee80211_is_action(fc))
2392 return false;2375 return false;
2393 2376
2394 if (skb->len < offsetofend(typeof(*mgmt), u.action.u.ftm.action_code))2377 if (skb->len < IEEE80211_MIN_ACTION_SIZE(action_code))
2395 return true;2378 return true;
2396 2379
2397 /* action frame - additionally check for non-bufferable FTM */2380 /* action frame - additionally check for non-bufferable FTM */
@@ -2400,8 +2383,8 @@ static inline bool ieee80211_is_bufferable_mmpdu(struct sk_buff *skb) · 2 unmodified lines
2400 mgmt->u.action.category != WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION)2383 mgmt->u.action.category != WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION)
2401 return true;2384 return true;
2402 2385
2403 if (mgmt->u.action.u.ftm.action_code == WLAN_PUB_ACTION_FTM_REQUEST ||2386 if (mgmt->u.action.action_code == WLAN_PUB_ACTION_FTM_REQUEST ||
2404 mgmt->u.action.u.ftm.action_code == WLAN_PUB_ACTION_FTM_RESPONSE)2387 mgmt->u.action.action_code == WLAN_PUB_ACTION_FTM_RESPONSE)
2405 return false;2388 return false;
2406 2389
2407 return true;2390 return true;
@@ -2451,7 +2434,7 @@ static inline bool _ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) · 43 unmodified lines
2451 */2434 */
2452static inline bool ieee80211_is_robust_mgmt_frame(struct sk_buff *skb)2435static inline bool ieee80211_is_robust_mgmt_frame(struct sk_buff *skb)
2453{2436{
2454 if (skb->len < IEEE80211_MIN_ACTION_SIZE)2437 if (skb->len < IEEE80211_MIN_ACTION_SIZE(category))
2455 return false;2438 return false;
2456 return _ieee80211_is_robust_mgmt_frame((void *)skb->data);2439 return _ieee80211_is_robust_mgmt_frame((void *)skb->data);
2457}2440}
@@ -2467,7 +2450,7 @@ static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr, · 9 unmodified lines
2467{2450{
2468 struct ieee80211_mgmt *mgmt = (void *)hdr;2451 struct ieee80211_mgmt *mgmt = (void *)hdr;
2469 2452
2470 if (len < IEEE80211_MIN_ACTION_SIZE)2453 if (len < IEEE80211_MIN_ACTION_SIZE(category))
2471 return false;2454 return false;
2472 if (!ieee80211_is_action(hdr->frame_control))2455 if (!ieee80211_is_action(hdr->frame_control))
2473 return false;2456 return false;
@@ -2485,13 +2468,14 @@ static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr, · 11 unmodified lines
2485static inline bool2468static inline bool
2486ieee80211_is_protected_dual_of_public_action(struct sk_buff *skb)2469ieee80211_is_protected_dual_of_public_action(struct sk_buff *skb)
2487{2470{
2471 struct ieee80211_mgmt *mgmt = (void *)skb->data;
2488 u8 action;2472 u8 action;
2489 2473
2490 if (!ieee80211_is_public_action((void *)skb->data, skb->len) ||2474 if (!ieee80211_is_public_action((void *)skb->data, skb->len) ||
2491 skb->len < IEEE80211_MIN_ACTION_SIZE + 1)2475 skb->len < IEEE80211_MIN_ACTION_SIZE(action_code))
2492 return false;2476 return false;
2493 2477
2494 action = *(u8 *)(skb->data + IEEE80211_MIN_ACTION_SIZE);2478 action = mgmt->u.action.action_code;
2495 2479
2496 return action != WLAN_PUB_ACTION_20_40_BSS_COEX &&2480 return action != WLAN_PUB_ACTION_20_40_BSS_COEX &&
2497 action != WLAN_PUB_ACTION_DSE_REG_LOC_ANN &&2481 action != WLAN_PUB_ACTION_DSE_REG_LOC_ANN &&
@@ -2530,7 +2514,7 @@ static inline bool _ieee80211_is_group_privacy_action(struct ieee80211_hdr *hdr) · 32 unmodified lines
2530 */2514 */
2531static inline bool ieee80211_is_group_privacy_action(struct sk_buff *skb)2515static inline bool ieee80211_is_group_privacy_action(struct sk_buff *skb)
2532{2516{
2533 if (skb->len < IEEE80211_MIN_ACTION_SIZE)2517 if (skb->len < IEEE80211_MIN_ACTION_SIZE(category))
2534 return false;2518 return false;
2535 return _ieee80211_is_group_privacy_action((void *)skb->data);2519 return _ieee80211_is_group_privacy_action((void *)skb->data);
2536}2520}
@@ -2626,8 +2610,7 @@ static inline bool ieee80211_action_contains_tpc(struct sk_buff *skb) · 89 unmodified lines
2626 if (!ieee80211_is_action(mgmt->frame_control))2610 if (!ieee80211_is_action(mgmt->frame_control))
2627 return false;2611 return false;
2628 2612
2629 if (skb->len < IEEE80211_MIN_ACTION_SIZE +2613 if (skb->len < IEEE80211_MIN_ACTION_SIZE(tpc_report))
2630 sizeof(mgmt->u.action.u.tpc_report))
2631 return false;2614 return false;
2632 2615
2633 /*2616 /*
@@ -2646,12 +2629,11 @@ static inline bool ieee80211_action_contains_tpc(struct sk_buff *skb) · 12 unmodified lines
2646 return false;2629 return false;
2647 2630
2648 /* both spectrum mgmt and link measurement have same action code */2631 /* both spectrum mgmt and link measurement have same action code */
2649 if (mgmt->u.action.u.tpc_report.action_code !=2632 if (mgmt->u.action.action_code != WLAN_ACTION_SPCT_TPC_RPRT)
2650 WLAN_ACTION_SPCT_TPC_RPRT)
2651 return false;2633 return false;
2652 2634
2653 if (mgmt->u.action.u.tpc_report.tpc_elem_id != WLAN_EID_TPC_REPORT ||2635 if (mgmt->u.action.tpc_report.tpc_elem_id != WLAN_EID_TPC_REPORT ||
2654 mgmt->u.action.u.tpc_report.tpc_elem_length !=2636 mgmt->u.action.tpc_report.tpc_elem_length !=
2655 sizeof(struct ieee80211_tpc_report_ie))2637 sizeof(struct ieee80211_tpc_report_ie))
2656 return false;2638 return false;
2657 2639
@@ -2667,16 +2649,15 @@ static inline bool ieee80211_is_timing_measurement(struct sk_buff *skb) · 9 unmodified lines
2667{2649{
2668 struct ieee80211_mgmt *mgmt = (void *)skb->data;2650 struct ieee80211_mgmt *mgmt = (void *)skb->data;
2669 2651
2670 if (skb->len < IEEE80211_MIN_ACTION_SIZE)2652 if (skb->len < IEEE80211_MIN_ACTION_SIZE(wnm_timing_msr))
2671 return false;2653 return false;
2672 2654
2673 if (!ieee80211_is_action(mgmt->frame_control))2655 if (!ieee80211_is_action(mgmt->frame_control))
2674 return false;2656 return false;
2675 2657
2676 if (mgmt->u.action.category == WLAN_CATEGORY_WNM_UNPROTECTED &&2658 if (mgmt->u.action.category == WLAN_CATEGORY_WNM_UNPROTECTED &&
2677 mgmt->u.action.u.wnm_timing_msr.action_code ==2659 mgmt->u.action.action_code ==
2678 WLAN_UNPROTECTED_WNM_ACTION_TIMING_MEASUREMENT_RESPONSE &&2660 WLAN_UNPROTECTED_WNM_ACTION_TIMING_MEASUREMENT_RESPONSE)
2679 skb->len >= offsetofend(typeof(*mgmt), u.action.u.wnm_timing_msr))
2680 return true;2661 return true;
2681 2662
2682 return false;2663 return false;
@@ -2691,15 +2672,13 @@ static inline bool ieee80211_is_ftm(struct sk_buff *skb) · 8 unmodified lines
2691{2672{
2692 struct ieee80211_mgmt *mgmt = (void *)skb->data;2673 struct ieee80211_mgmt *mgmt = (void *)skb->data;
2693 2674
2694 if (!ieee80211_is_public_action((void *)mgmt, skb->len))2675 if (skb->len < IEEE80211_MIN_ACTION_SIZE(ftm))
2695 return false;2676 return false;
2696 2677
2697 if (mgmt->u.action.u.ftm.action_code ==2678 if (!ieee80211_is_public_action((void *)mgmt, skb->len))
2698 WLAN_PUB_ACTION_FTM_RESPONSE &&2679 return false;
2699 skb->len >= offsetofend(typeof(*mgmt), u.action.u.ftm))
2700 return true;
2701 2680
2702 return false;2681 return mgmt->u.action.action_code == WLAN_PUB_ACTION_FTM_RESPONSE;
2703}2682}
2704 2683
2705struct element {2684struct element {
include/net/mac80211.h+4−0
@@ -2913,6 +2913,9 @@ struct ieee80211_txq { · 2912 unmodified lines
2913 * HW flag so drivers can opt in according to their own control, e.g. in2913 * HW flag so drivers can opt in according to their own control, e.g. in
2914 * testing.2914 * testing.
2915 *2915 *
2916 * @IEEE80211_HW_SUPPORTS_NDP_BLOCKACK: HW can transmit/receive S1G NDP
2917 * BlockAck frames.
2918 *
2916 * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays2919 * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
2917 */2920 */
2918enum ieee80211_hw_flags {2921enum ieee80211_hw_flags {
@@ -2973,6 +2976,7 @@ enum ieee80211_hw_flags { · 54 unmodified lines
2973 IEEE80211_HW_DISALLOW_PUNCTURING,2976 IEEE80211_HW_DISALLOW_PUNCTURING,
2974 IEEE80211_HW_HANDLES_QUIET_CSA,2977 IEEE80211_HW_HANDLES_QUIET_CSA,
2975 IEEE80211_HW_STRICT,2978 IEEE80211_HW_STRICT,
2979 IEEE80211_HW_SUPPORTS_NDP_BLOCKACK,
2976 2980
2977 /* keep last, obviously */2981 /* keep last, obviously */
2978 NUM_IEEE80211_HW_FLAGS2982 NUM_IEEE80211_HW_FLAGS
include/uapi/linux/nl80211.h+6−0
@@ -3001,6 +3001,10 @@ enum nl80211_commands { · 3000 unmodified lines
3001 * interference detection is not performed on these sub-channels, their3001 * interference detection is not performed on these sub-channels, their
3002 * corresponding bits are consistently set to zero.3002 * corresponding bits are consistently set to zero.
3003 *3003 *
3004 * @NL80211_ATTR_UHR_OPERATION: Full UHR Operation element, as it appears in
3005 * association response etc., since it's abridged in the beacon. Used
3006 * for START_AP etc.
3007 *
3004 * @NUM_NL80211_ATTR: total number of nl80211_attrs available3008 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
3005 * @NL80211_ATTR_MAX: highest attribute number currently defined3009 * @NL80211_ATTR_MAX: highest attribute number currently defined
3006 * @__NL80211_ATTR_AFTER_LAST: internal use3010 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3576,6 +3580,8 @@ enum nl80211_attrs { · 569 unmodified lines
3576 3580
3577 NL80211_ATTR_INCUMBENT_SIGNAL_INTERFERENCE_BITMAP,3581 NL80211_ATTR_INCUMBENT_SIGNAL_INTERFERENCE_BITMAP,
3578 3582
3583 NL80211_ATTR_UHR_OPERATION,
3584
3579 /* add attributes here, update the policy in nl80211.c */3585 /* add attributes here, update the policy in nl80211.c */
3580 3586
3581 __NL80211_ATTR_AFTER_LAST,3587 __NL80211_ATTR_AFTER_LAST,
net/mac80211/agg-rx.c+34−15
@@ -9,7 +9,7 @@ · 8 unmodified lines
9 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>9 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
10 * Copyright 2007-2010, Intel Corporation10 * Copyright 2007-2010, Intel Corporation
11 * Copyright(c) 2015-2017 Intel Deutschland GmbH11 * Copyright(c) 2015-2017 Intel Deutschland GmbH
12 * Copyright (C) 2018-2025 Intel Corporation12 * Copyright (C) 2018-2026 Intel Corporation
13 */13 */
14 14
15/**15/**
@@ -94,7 +94,8 @@ void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, · 78 unmodified lines
94 /* check if this is a self generated aggregation halt */94 /* check if this is a self generated aggregation halt */
95 if (initiator == WLAN_BACK_RECIPIENT && tx)95 if (initiator == WLAN_BACK_RECIPIENT && tx)
96 ieee80211_send_delba(sta->sdata, sta->sta.addr,96 ieee80211_send_delba(sta->sdata, sta->sta.addr,
97 tid, WLAN_BACK_RECIPIENT, reason);97 tid, WLAN_BACK_RECIPIENT, reason,
98 ieee80211_s1g_use_ndp_ba(sta->sdata, sta));
98 99
99 /*100 /*
100 * return here in case tid_rx is not assigned - which will happen if101 * return here in case tid_rx is not assigned - which will happen if
@@ -240,6 +241,7 @@ static void ieee80211_send_addba_resp(struct sta_info *sta, u8 *da, u16 tid, · 139 unmodified lines
240 struct sk_buff *skb;241 struct sk_buff *skb;
241 struct ieee80211_mgmt *mgmt;242 struct ieee80211_mgmt *mgmt;
242 bool amsdu = ieee80211_hw_check(&local->hw, SUPPORTS_AMSDU_IN_AMPDU);243 bool amsdu = ieee80211_hw_check(&local->hw, SUPPORTS_AMSDU_IN_AMPDU);
244 bool use_ndp = ieee80211_s1g_use_ndp_ba(sdata, sta);
243 u16 capab;245 u16 capab;
244 246
245 skb = dev_alloc_skb(sizeof(*mgmt) +247 skb = dev_alloc_skb(sizeof(*mgmt) +
@@ -251,19 +253,21 @@ static void ieee80211_send_addba_resp(struct sta_info *sta, u8 *da, u16 tid, · 5 unmodified lines
251 skb_reserve(skb, local->hw.extra_tx_headroom);253 skb_reserve(skb, local->hw.extra_tx_headroom);
252 mgmt = ieee80211_mgmt_ba(skb, da, sdata);254 mgmt = ieee80211_mgmt_ba(skb, da, sdata);
253 255
254 skb_put(skb, 1 + sizeof(mgmt->u.action.u.addba_resp));256 skb_put(skb, 2 + sizeof(mgmt->u.action.addba_resp));
255 mgmt->u.action.category = WLAN_CATEGORY_BACK;257 mgmt->u.action.category = WLAN_CATEGORY_BACK;
256 mgmt->u.action.u.addba_resp.action_code = WLAN_ACTION_ADDBA_RESP;258 mgmt->u.action.action_code = use_ndp ?
257 mgmt->u.action.u.addba_resp.dialog_token = dialog_token;259 WLAN_ACTION_NDP_ADDBA_RESP : WLAN_ACTION_ADDBA_RESP;
260
261 mgmt->u.action.addba_resp.dialog_token = dialog_token;
258 262
259 capab = u16_encode_bits(amsdu, IEEE80211_ADDBA_PARAM_AMSDU_MASK);263 capab = u16_encode_bits(amsdu, IEEE80211_ADDBA_PARAM_AMSDU_MASK);
260 capab |= u16_encode_bits(policy, IEEE80211_ADDBA_PARAM_POLICY_MASK);264 capab |= u16_encode_bits(policy, IEEE80211_ADDBA_PARAM_POLICY_MASK);
261 capab |= u16_encode_bits(tid, IEEE80211_ADDBA_PARAM_TID_MASK);265 capab |= u16_encode_bits(tid, IEEE80211_ADDBA_PARAM_TID_MASK);
262 capab |= u16_encode_bits(buf_size, IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK);266 capab |= u16_encode_bits(buf_size, IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK);
263 267
264 mgmt->u.action.u.addba_resp.capab = cpu_to_le16(capab);268 mgmt->u.action.addba_resp.capab = cpu_to_le16(capab);
265 mgmt->u.action.u.addba_resp.timeout = cpu_to_le16(timeout);269 mgmt->u.action.addba_resp.timeout = cpu_to_le16(timeout);
266 mgmt->u.action.u.addba_resp.status = cpu_to_le16(status);270 mgmt->u.action.addba_resp.status = cpu_to_le16(status);
267 271
268 if (sta->sta.valid_links || sta->sta.deflink.he_cap.has_he)272 if (sta->sta.valid_links || sta->sta.deflink.he_cap.has_he)
269 ieee80211_add_addbaext(skb, req_addba_ext_data, buf_size);273 ieee80211_add_addbaext(skb, req_addba_ext_data, buf_size);
@@ -275,6 +279,7 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, · 5 unmodified lines
275 u8 dialog_token, u16 timeout,279 u8 dialog_token, u16 timeout,
276 u16 start_seq_num, u16 ba_policy, u16 tid,280 u16 start_seq_num, u16 ba_policy, u16 tid,
277 u16 buf_size, bool tx, bool auto_seq,281 u16 buf_size, bool tx, bool auto_seq,
282 bool req_ndp,
278 const u8 addba_ext_data)283 const u8 addba_ext_data)
279{284{
280 struct ieee80211_local *local = sta->sdata->local;285 struct ieee80211_local *local = sta->sdata->local;
@@ -300,6 +305,18 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, · 19 unmodified lines
300 goto end;305 goto end;
301 }306 }
302 307
308 if (tx && ieee80211_s1g_use_ndp_ba(sta->sdata, sta) && !req_ndp) {
309 /*
310 * According to IEEE 802.11-2024: Inform S1G originator
311 * ADDBA rejected as NDP BlockAck is preferred
312 */
313 status = WLAN_STATUS_REJECTED_NDP_BLOCK_ACK_SUGGESTED;
314 ht_dbg(sta->sdata,
315 "Rejecting AddBA Req from %pM tid %u - require NDP BlockAck\n",
316 sta->sta.addr, tid);
317 goto end;
318 }
319
303 if (!sta->sta.valid_links &&320 if (!sta->sta.valid_links &&
304 !sta->sta.deflink.ht_cap.ht_supported &&321 !sta->sta.deflink.ht_cap.ht_supported &&
305 !sta->sta.deflink.he_cap.has_he &&322 !sta->sta.deflink.he_cap.has_he &&
@@ -473,31 +490,33 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, · 167 unmodified lines
473 struct ieee80211_mgmt *mgmt,490 struct ieee80211_mgmt *mgmt,
474 size_t len)491 size_t len)
475{492{
493 bool req_ndp = mgmt->u.action.action_code == WLAN_ACTION_NDP_ADDBA_REQ;
476 u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num;494 u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num;
477 u8 dialog_token, addba_ext_data;495 u8 dialog_token, addba_ext_data;
478 496
479 /* extract session parameters from addba request frame */497 /* extract session parameters from addba request frame */
480 dialog_token = mgmt->u.action.u.addba_req.dialog_token;498 dialog_token = mgmt->u.action.addba_req.dialog_token;
481 timeout = le16_to_cpu(mgmt->u.action.u.addba_req.timeout);499 timeout = le16_to_cpu(mgmt->u.action.addba_req.timeout);
482 start_seq_num =500 start_seq_num =
483 le16_to_cpu(mgmt->u.action.u.addba_req.start_seq_num) >> 4;501 le16_to_cpu(mgmt->u.action.addba_req.start_seq_num) >> 4;
484 502
485 capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab);503 capab = le16_to_cpu(mgmt->u.action.addba_req.capab);
486 ba_policy = (capab & IEEE80211_ADDBA_PARAM_POLICY_MASK) >> 1;504 ba_policy = (capab & IEEE80211_ADDBA_PARAM_POLICY_MASK) >> 1;
487 tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;505 tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
488 buf_size = (capab & IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK) >> 6;506 buf_size = (capab & IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK) >> 6;
489 507
490 addba_ext_data =508 addba_ext_data =
491 ieee80211_retrieve_addba_ext_data(sta,509 ieee80211_retrieve_addba_ext_data(sta,
492 mgmt->u.action.u.addba_req.variable,510 mgmt->u.action.addba_req.variable,
493 len -511 len -
494 offsetof(typeof(*mgmt),512 offsetof(typeof(*mgmt),
495 u.action.u.addba_req.variable),513 u.action.addba_req.variable),
496 &buf_size);514 &buf_size);
497 515
498 __ieee80211_start_rx_ba_session(sta, dialog_token, timeout,516 __ieee80211_start_rx_ba_session(sta, dialog_token, timeout,
499 start_seq_num, ba_policy, tid,517 start_seq_num, ba_policy, tid,
500 buf_size, true, false, addba_ext_data);518 buf_size, true, false,
519 req_ndp, addba_ext_data);
501}520}
502 521
503void ieee80211_manage_rx_ba_offl(struct ieee80211_vif *vif,522void ieee80211_manage_rx_ba_offl(struct ieee80211_vif *vif,
net/mac80211/agg-tx.c+22−17
@@ -9,7 +9,7 @@ · 8 unmodified lines
9 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>9 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
10 * Copyright 2007-2010, Intel Corporation10 * Copyright 2007-2010, Intel Corporation
11 * Copyright(c) 2015-2017 Intel Deutschland GmbH11 * Copyright(c) 2015-2017 Intel Deutschland GmbH
12 * Copyright (C) 2018 - 2024 Intel Corporation12 * Copyright (C) 2018-2026 Intel Corporation
13 */13 */
14 14
15#include <linux/ieee80211.h>15#include <linux/ieee80211.h>
@@ -60,7 +60,7 @@ · 44 unmodified lines
60 60
61static void ieee80211_send_addba_request(struct sta_info *sta, u16 tid,61static void ieee80211_send_addba_request(struct sta_info *sta, u16 tid,
62 u8 dialog_token, u16 start_seq_num,62 u8 dialog_token, u16 start_seq_num,
63 u16 agg_size, u16 timeout)63 u16 agg_size, u16 timeout, bool ndp)
64{64{
65 struct ieee80211_sub_if_data *sdata = sta->sdata;65 struct ieee80211_sub_if_data *sdata = sta->sdata;
66 struct ieee80211_local *local = sdata->local;66 struct ieee80211_local *local = sdata->local;
@@ -68,7 +68,7 @@ static void ieee80211_send_addba_request(struct sta_info *sta, u16 tid, · 1 unmodified line
68 struct ieee80211_mgmt *mgmt;68 struct ieee80211_mgmt *mgmt;
69 u16 capab;69 u16 capab;
70 70
71 skb = dev_alloc_skb(sizeof(*mgmt) +71 skb = dev_alloc_skb(IEEE80211_MIN_ACTION_SIZE(addba_req) +
72 2 + sizeof(struct ieee80211_addba_ext_ie) +72 2 + sizeof(struct ieee80211_addba_ext_ie) +
73 local->hw.extra_tx_headroom);73 local->hw.extra_tx_headroom);
74 if (!skb)74 if (!skb)
@@ -77,21 +77,22 @@ static void ieee80211_send_addba_request(struct sta_info *sta, u16 tid, · 2 unmodified lines
77 skb_reserve(skb, local->hw.extra_tx_headroom);77 skb_reserve(skb, local->hw.extra_tx_headroom);
78 mgmt = ieee80211_mgmt_ba(skb, sta->sta.addr, sdata);78 mgmt = ieee80211_mgmt_ba(skb, sta->sta.addr, sdata);
79 79
80 skb_put(skb, 1 + sizeof(mgmt->u.action.u.addba_req));80 skb_put(skb, 2 + sizeof(mgmt->u.action.addba_req));
81 81
82 mgmt->u.action.category = WLAN_CATEGORY_BACK;82 mgmt->u.action.category = WLAN_CATEGORY_BACK;
83 mgmt->u.action.u.addba_req.action_code = WLAN_ACTION_ADDBA_REQ;83 mgmt->u.action.action_code = ndp ?
84 WLAN_ACTION_NDP_ADDBA_REQ : WLAN_ACTION_ADDBA_REQ;
84 85
85 mgmt->u.action.u.addba_req.dialog_token = dialog_token;86 mgmt->u.action.addba_req.dialog_token = dialog_token;
86 capab = IEEE80211_ADDBA_PARAM_AMSDU_MASK;87 capab = IEEE80211_ADDBA_PARAM_AMSDU_MASK;
87 capab |= IEEE80211_ADDBA_PARAM_POLICY_MASK;88 capab |= IEEE80211_ADDBA_PARAM_POLICY_MASK;
88 capab |= u16_encode_bits(tid, IEEE80211_ADDBA_PARAM_TID_MASK);89 capab |= u16_encode_bits(tid, IEEE80211_ADDBA_PARAM_TID_MASK);
89 capab |= u16_encode_bits(agg_size, IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK);90 capab |= u16_encode_bits(agg_size, IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK);
90 91
91 mgmt->u.action.u.addba_req.capab = cpu_to_le16(capab);92 mgmt->u.action.addba_req.capab = cpu_to_le16(capab);
92 93
93 mgmt->u.action.u.addba_req.timeout = cpu_to_le16(timeout);94 mgmt->u.action.addba_req.timeout = cpu_to_le16(timeout);
94 mgmt->u.action.u.addba_req.start_seq_num =95 mgmt->u.action.addba_req.start_seq_num =
95 cpu_to_le16(start_seq_num << 4);96 cpu_to_le16(start_seq_num << 4);
96 97
97 if (sta->sta.deflink.he_cap.has_he)98 if (sta->sta.deflink.he_cap.has_he)
@@ -484,7 +485,8 @@ static void ieee80211_send_addba_with_timeout(struct sta_info *sta, · 386 unmodified lines
484 485
485 /* send AddBA request */486 /* send AddBA request */
486 ieee80211_send_addba_request(sta, tid, tid_tx->dialog_token,487 ieee80211_send_addba_request(sta, tid, tid_tx->dialog_token,
487 tid_tx->ssn, buf_size, tid_tx->timeout);488 tid_tx->ssn, buf_size, tid_tx->timeout,
489 tid_tx->ndp);
488 490
489 WARN_ON(test_and_set_bit(HT_AGG_STATE_SENT_ADDBA, &tid_tx->state));491 WARN_ON(test_and_set_bit(HT_AGG_STATE_SENT_ADDBA, &tid_tx->state));
490}492}
@@ -521,6 +523,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) · 30 unmodified lines
521 */523 */
522 synchronize_net();524 synchronize_net();
523 525
526 tid_tx->ndp = ieee80211_s1g_use_ndp_ba(sdata, sta);
524 params.ssn = sta->tid_seq[tid] >> 4;527 params.ssn = sta->tid_seq[tid] >> 4;
525 ret = drv_ampdu_action(local, sdata, &params);528 ret = drv_ampdu_action(local, sdata, &params);
526 tid_tx->ssn = params.ssn;529 tid_tx->ssn = params.ssn;
@@ -940,7 +943,9 @@ void ieee80211_stop_tx_ba_cb(struct sta_info *sta, int tid, · 413 unmodified lines
940 943
941 if (send_delba)944 if (send_delba)
942 ieee80211_send_delba(sdata, sta->sta.addr, tid,945 ieee80211_send_delba(sdata, sta->sta.addr, tid,
943 WLAN_BACK_INITIATOR, WLAN_REASON_QSTA_NOT_USE);946 WLAN_BACK_INITIATOR,
947 WLAN_REASON_QSTA_NOT_USE,
948 tid_tx->ndp);
944}949}
945 950
946void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,951void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
@@ -978,15 +983,15 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, · 31 unmodified lines
978 983
979 lockdep_assert_wiphy(sta->local->hw.wiphy);984 lockdep_assert_wiphy(sta->local->hw.wiphy);
980 985
981 capab = le16_to_cpu(mgmt->u.action.u.addba_resp.capab);986 capab = le16_to_cpu(mgmt->u.action.addba_resp.capab);
982 amsdu = capab & IEEE80211_ADDBA_PARAM_AMSDU_MASK;987 amsdu = capab & IEEE80211_ADDBA_PARAM_AMSDU_MASK;
983 tid = u16_get_bits(capab, IEEE80211_ADDBA_PARAM_TID_MASK);988 tid = u16_get_bits(capab, IEEE80211_ADDBA_PARAM_TID_MASK);
984 buf_size = u16_get_bits(capab, IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK);989 buf_size = u16_get_bits(capab, IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK);
985 990
986 ieee80211_retrieve_addba_ext_data(sta,991 ieee80211_retrieve_addba_ext_data(sta,
987 mgmt->u.action.u.addba_resp.variable,992 mgmt->u.action.addba_resp.variable,
988 len - offsetof(typeof(*mgmt),993 len - offsetof(typeof(*mgmt),
989 u.action.u.addba_resp.variable),994 u.action.addba_resp.variable),
990 &buf_size);995 &buf_size);
991 996
992 buf_size = min(buf_size, local->hw.max_tx_aggregation_subframes);997 buf_size = min(buf_size, local->hw.max_tx_aggregation_subframes);
@@ -999,7 +1004,7 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, · 6 unmodified lines
999 if (!tid_tx)1004 if (!tid_tx)
1000 return;1005 return;
1001 1006
1002 if (mgmt->u.action.u.addba_resp.dialog_token != tid_tx->dialog_token) {1007 if (mgmt->u.action.addba_resp.dialog_token != tid_tx->dialog_token) {
1003 ht_dbg(sta->sdata, "wrong addBA response token, %pM tid %d\n",1008 ht_dbg(sta->sdata, "wrong addBA response token, %pM tid %d\n",
1004 sta->sta.addr, tid);1009 sta->sta.addr, tid);
1005 return;1010 return;
@@ -1029,7 +1034,7 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, · 23 unmodified lines
1029 * is set to 0, the Buffer Size subfield is set to a value1034 * is set to 0, the Buffer Size subfield is set to a value
1030 * of at least 1.1035 * of at least 1.
1031 */1036 */
1032 if (le16_to_cpu(mgmt->u.action.u.addba_resp.status)1037 if (le16_to_cpu(mgmt->u.action.addba_resp.status)
1033 == WLAN_STATUS_SUCCESS && buf_size) {1038 == WLAN_STATUS_SUCCESS && buf_size) {
1034 if (test_and_set_bit(HT_AGG_STATE_RESPONSE_RECEIVED,1039 if (test_and_set_bit(HT_AGG_STATE_RESPONSE_RECEIVED,
1035 &tid_tx->state)) {1040 &tid_tx->state)) {
@@ -1046,7 +1051,7 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, · 10 unmodified lines
1046 sta->ampdu_mlme.addba_req_num[tid] = 0;1051 sta->ampdu_mlme.addba_req_num[tid] = 0;
1047 1052
1048 tid_tx->timeout =1053 tid_tx->timeout =
1049 le16_to_cpu(mgmt->u.action.u.addba_resp.timeout);1054 le16_to_cpu(mgmt->u.action.addba_resp.timeout);
1050 1055
1051 if (tid_tx->timeout) {1056 if (tid_tx->timeout) {
1052 mod_timer(&tid_tx->session_timer,1057 mod_timer(&tid_tx->session_timer,
net/mac80211/chan.c+37−49
@@ -1,7 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only1// SPDX-License-Identifier: GPL-2.0-only
2/*2/*
3 * mac80211 - channel management3 * mac80211 - channel management
4 * Copyright 2020 - 2025 Intel Corporation4 * Copyright 2020-2026 Intel Corporation
5 */5 */
6 6
7#include <linux/nl80211.h>7#include <linux/nl80211.h>
@@ -239,26 +239,47 @@ ieee80211_chanreq_compatible(const struct ieee80211_chan_req *a, · 231 unmodified lines
239 return tmp;239 return tmp;
240}240}
241 241
242/*
243 * When checking for compatible, check against all the links using
244 * the chanctx (except the one passed that might be changing) to
245 * allow changes to the AP's bandwidth for wider bandwidth OFDMA
246 * purposes, which wouldn't be treated as compatible by checking
247 * against the chanctx's oper/ap chandefs.
248 */
242static const struct ieee80211_chan_req *249static const struct ieee80211_chan_req *
243ieee80211_chanctx_compatible(struct ieee80211_chanctx *ctx,250_ieee80211_chanctx_compatible(struct ieee80211_local *local,
244 const struct ieee80211_chan_req *req,251 struct ieee80211_link_data *skip_link,
245 struct ieee80211_chan_req *tmp)252 struct ieee80211_chanctx *ctx,
253 const struct ieee80211_chan_req *req,
254 struct ieee80211_chan_req *tmp)
246{255{
247 const struct ieee80211_chan_req *ret;256 const struct ieee80211_chan_req *ret = req;
248 struct ieee80211_chan_req tmp2;257 struct ieee80211_chanctx_user_iter iter;
249 258
250 *tmp = (struct ieee80211_chan_req){259 lockdep_assert_wiphy(local->hw.wiphy);
251 .oper = ctx->conf.def,260
252 .ap = ctx->conf.ap,261 for_each_chanctx_user_all(local, ctx, &iter) {
253 };262 if (iter.link && iter.link == skip_link)
263 continue;
264
265 ret = ieee80211_chanreq_compatible(ret, iter.chanreq, tmp);
266 if (!ret)
267 return NULL;
268 }
254 269
255 ret = ieee80211_chanreq_compatible(tmp, req, &tmp2);
256 if (!ret)
257 return NULL;
258 *tmp = *ret;270 *tmp = *ret;
259 return tmp;271 return tmp;
260}272}
261 273
274static const struct ieee80211_chan_req *
275ieee80211_chanctx_compatible(struct ieee80211_local *local,
276 struct ieee80211_chanctx *ctx,
277 const struct ieee80211_chan_req *req,
278 struct ieee80211_chan_req *tmp)
279{
280 return _ieee80211_chanctx_compatible(local, NULL, ctx, req, tmp);
281}
282
262static const struct ieee80211_chan_req *283static const struct ieee80211_chan_req *
263ieee80211_chanctx_reserved_chanreq(struct ieee80211_local *local,284ieee80211_chanctx_reserved_chanreq(struct ieee80211_local *local,
264 struct ieee80211_chanctx *ctx,285 struct ieee80211_chanctx *ctx,
@@ -756,7 +777,8 @@ ieee80211_find_chanctx(struct ieee80211_local *local, · 491 unmodified lines
756 if (ctx->mode == IEEE80211_CHANCTX_EXCLUSIVE)777 if (ctx->mode == IEEE80211_CHANCTX_EXCLUSIVE)
757 continue;778 continue;
758 779
759 compat = ieee80211_chanctx_compatible(ctx, chanreq, &tmp);780 compat = ieee80211_chanctx_compatible(local, ctx, chanreq,
781 &tmp);
760 if (!compat)782 if (!compat)
761 continue;783 continue;
762 784
@@ -2128,40 +2150,6 @@ int ieee80211_link_use_reserved_context(struct ieee80211_link_data *link) · 1365 unmodified lines
2128 return 0;2150 return 0;
2129}2151}
2130 2152
2131/*
2132 * This is similar to ieee80211_chanctx_compatible(), but rechecks
2133 * against all the links actually using it (except the one that's
2134 * passed, since that one is changing).
2135 * This is done in order to allow changes to the AP's bandwidth for
2136 * wider bandwidth OFDMA purposes, which wouldn't be treated as
2137 * compatible by ieee80211_chanctx_recheck() but is OK if the link
2138 * requesting the update is the only one using it.
2139 */
2140static const struct ieee80211_chan_req *
2141ieee80211_chanctx_recheck(struct ieee80211_local *local,
2142 struct ieee80211_link_data *skip_link,
2143 struct ieee80211_chanctx *ctx,
2144 const struct ieee80211_chan_req *req,
2145 struct ieee80211_chan_req *tmp)
2146{
2147 const struct ieee80211_chan_req *ret = req;
2148 struct ieee80211_chanctx_user_iter iter;
2149
2150 lockdep_assert_wiphy(local->hw.wiphy);
2151
2152 for_each_chanctx_user_all(local, ctx, &iter) {
2153 if (iter.link == skip_link)
2154 continue;
2155
2156 ret = ieee80211_chanreq_compatible(ret, iter.chanreq, tmp);
2157 if (!ret)
2158 return NULL;
2159 }
2160
2161 *tmp = *ret;
2162 return tmp;
2163}
2164
2165int ieee80211_link_change_chanreq(struct ieee80211_link_data *link,2153int ieee80211_link_change_chanreq(struct ieee80211_link_data *link,
2166 const struct ieee80211_chan_req *chanreq,2154 const struct ieee80211_chan_req *chanreq,
2167 u64 *changed)2155 u64 *changed)
@@ -2198,7 +2186,7 @@ int ieee80211_link_change_chanreq(struct ieee80211_link_data *link, · 30 unmodified lines
2198 2186
2199 ctx = container_of(conf, struct ieee80211_chanctx, conf);2187 ctx = container_of(conf, struct ieee80211_chanctx, conf);
2200 2188
2201 compat = ieee80211_chanctx_recheck(local, link, ctx, chanreq, &tmp);2189 compat = _ieee80211_chanctx_compatible(local, link, ctx, chanreq, &tmp);
2202 if (!compat)2190 if (!compat)
2203 return -EINVAL;2191 return -EINVAL;
2204 2192
net/mac80211/debugfs.c+1−0
@@ -490,6 +490,7 @@ static const char *hw_flag_names[] = { · 489 unmodified lines
490 FLAG(DISALLOW_PUNCTURING),490 FLAG(DISALLOW_PUNCTURING),
491 FLAG(HANDLES_QUIET_CSA),491 FLAG(HANDLES_QUIET_CSA),
492 FLAG(STRICT),492 FLAG(STRICT),
493 FLAG(SUPPORTS_NDP_BLOCKACK),
493#undef FLAG494#undef FLAG
494};495};
495 496
net/mac80211/eht.c+10−11
@@ -108,7 +108,7 @@ static void · 107 unmodified lines
108ieee80211_send_eml_op_mode_notif(struct ieee80211_sub_if_data *sdata,108ieee80211_send_eml_op_mode_notif(struct ieee80211_sub_if_data *sdata,
109 struct ieee80211_mgmt *req, int opt_len)109 struct ieee80211_mgmt *req, int opt_len)
110{110{
111 int len = offsetofend(struct ieee80211_mgmt, u.action.u.eml_omn);111 int len = IEEE80211_MIN_ACTION_SIZE(eml_omn);
112 struct ieee80211_local *local = sdata->local;112 struct ieee80211_local *local = sdata->local;
113 struct ieee80211_mgmt *mgmt;113 struct ieee80211_mgmt *mgmt;
114 struct sk_buff *skb;114 struct sk_buff *skb;
@@ -127,16 +127,15 @@ ieee80211_send_eml_op_mode_notif(struct ieee80211_sub_if_data *sdata, · 12 unmodified lines
127 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);127 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
128 128
129 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;129 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;
130 mgmt->u.action.u.eml_omn.action_code =130 mgmt->u.action.action_code = WLAN_PROTECTED_EHT_ACTION_EML_OP_MODE_NOTIF;
131 WLAN_PROTECTED_EHT_ACTION_EML_OP_MODE_NOTIF;131 mgmt->u.action.eml_omn.dialog_token =
132 mgmt->u.action.u.eml_omn.dialog_token =132 req->u.action.eml_omn.dialog_token;
133 req->u.action.u.eml_omn.dialog_token;133 mgmt->u.action.eml_omn.control = req->u.action.eml_omn.control &
134 mgmt->u.action.u.eml_omn.control = req->u.action.u.eml_omn.control &
135 ~(IEEE80211_EML_CTRL_EMLSR_PARAM_UPDATE |134 ~(IEEE80211_EML_CTRL_EMLSR_PARAM_UPDATE |
136 IEEE80211_EML_CTRL_INDEV_COEX_ACT);135 IEEE80211_EML_CTRL_INDEV_COEX_ACT);
137 /* Copy optional fields from the received notification frame */136 /* Copy optional fields from the received notification frame */
138 memcpy(mgmt->u.action.u.eml_omn.variable,137 memcpy(mgmt->u.action.eml_omn.variable,
139 req->u.action.u.eml_omn.variable, opt_len);138 req->u.action.eml_omn.variable, opt_len);
140 139
141 ieee80211_tx_skb(sdata, skb);140 ieee80211_tx_skb(sdata, skb);
142}141}
@@ -144,14 +143,14 @@ ieee80211_send_eml_op_mode_notif(struct ieee80211_sub_if_data *sdata, · 1 unmodified line
144void ieee80211_rx_eml_op_mode_notif(struct ieee80211_sub_if_data *sdata,143void ieee80211_rx_eml_op_mode_notif(struct ieee80211_sub_if_data *sdata,
145 struct sk_buff *skb)144 struct sk_buff *skb)
146{145{
147 int len = offsetofend(struct ieee80211_mgmt, u.action.u.eml_omn);146 int len = IEEE80211_MIN_ACTION_SIZE(eml_omn);
148 enum nl80211_iftype type = ieee80211_vif_type_p2p(&sdata->vif);147 enum nl80211_iftype type = ieee80211_vif_type_p2p(&sdata->vif);
149 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);148 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
150 const struct wiphy_iftype_ext_capab *ift_ext_capa;149 const struct wiphy_iftype_ext_capab *ift_ext_capa;
151 struct ieee80211_mgmt *mgmt = (void *)skb->data;150 struct ieee80211_mgmt *mgmt = (void *)skb->data;
152 struct ieee80211_local *local = sdata->local;151 struct ieee80211_local *local = sdata->local;
153 u8 control = mgmt->u.action.u.eml_omn.control;152 u8 control = mgmt->u.action.eml_omn.control;
154 u8 *ptr = mgmt->u.action.u.eml_omn.variable;153 u8 *ptr = mgmt->u.action.eml_omn.variable;
155 struct ieee80211_eml_params eml_params = {154 struct ieee80211_eml_params eml_params = {
156 .link_id = status->link_id,155 .link_id = status->link_id,
157 .control = control,156 .control = control,
net/mac80211/ht.c+20−17
@@ -9,7 +9,7 @@ · 8 unmodified lines
9 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>9 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
10 * Copyright 2007-2010, Intel Corporation10 * Copyright 2007-2010, Intel Corporation
11 * Copyright 2017 Intel Deutschland GmbH11 * Copyright 2017 Intel Deutschland GmbH
12 * Copyright(c) 2020-2025 Intel Corporation12 * Copyright(c) 2020-2026 Intel Corporation
13 */13 */
14 14
15#include <linux/ieee80211.h>15#include <linux/ieee80211.h>
@@ -379,7 +379,7 @@ void ieee80211_ba_session_work(struct wiphy *wiphy, struct wiphy_work *work) · 363 unmodified lines
379 sta->ampdu_mlme.tid_rx_manage_offl))379 sta->ampdu_mlme.tid_rx_manage_offl))
380 __ieee80211_start_rx_ba_session(sta, 0, 0, 0, 1, tid,380 __ieee80211_start_rx_ba_session(sta, 0, 0, 0, 1, tid,
381 IEEE80211_MAX_AMPDU_BUF_HT,381 IEEE80211_MAX_AMPDU_BUF_HT,
382 false, true, 0);382 false, true, false, 0);
383 383
384 if (test_and_clear_bit(tid + IEEE80211_NUM_TIDS,384 if (test_and_clear_bit(tid + IEEE80211_NUM_TIDS,
385 sta->ampdu_mlme.tid_rx_manage_offl))385 sta->ampdu_mlme.tid_rx_manage_offl))
@@ -455,29 +455,32 @@ void ieee80211_ba_session_work(struct wiphy *wiphy, struct wiphy_work *work) · 69 unmodified lines
455 455
456void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,456void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
457 const u8 *da, u16 tid,457 const u8 *da, u16 tid,
458 u16 initiator, u16 reason_code)458 u16 initiator, u16 reason_code,
459 bool use_ndp)
459{460{
460 struct ieee80211_local *local = sdata->local;461 struct ieee80211_local *local = sdata->local;
461 struct sk_buff *skb;462 struct sk_buff *skb;
462 struct ieee80211_mgmt *mgmt;463 struct ieee80211_mgmt *mgmt;
463 u16 params;464 u16 params;
464 465
465 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);466 skb = dev_alloc_skb(IEEE80211_MIN_ACTION_SIZE(delba) +
467 local->hw.extra_tx_headroom);
466 if (!skb)468 if (!skb)
467 return;469 return;
468 470
469 skb_reserve(skb, local->hw.extra_tx_headroom);471 skb_reserve(skb, local->hw.extra_tx_headroom);
470 mgmt = ieee80211_mgmt_ba(skb, da, sdata);472 mgmt = ieee80211_mgmt_ba(skb, da, sdata);
471 473
472 skb_put(skb, 1 + sizeof(mgmt->u.action.u.delba));474 skb_put(skb, 2 + sizeof(mgmt->u.action.delba));
473 475
474 mgmt->u.action.category = WLAN_CATEGORY_BACK;476 mgmt->u.action.category = WLAN_CATEGORY_BACK;
475 mgmt->u.action.u.delba.action_code = WLAN_ACTION_DELBA;477 mgmt->u.action.action_code = use_ndp ?
478 WLAN_ACTION_NDP_DELBA : WLAN_ACTION_DELBA;
476 params = (u16)(initiator << 11); /* bit 11 initiator */479 params = (u16)(initiator << 11); /* bit 11 initiator */
477 params |= (u16)(tid << 12); /* bit 15:12 TID number */480 params |= (u16)(tid << 12); /* bit 15:12 TID number */
478 481
479 mgmt->u.action.u.delba.params = cpu_to_le16(params);482 mgmt->u.action.delba.params = cpu_to_le16(params);
480 mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code);483 mgmt->u.action.delba.reason_code = cpu_to_le16(reason_code);
481 484
482 ieee80211_tx_skb(sdata, skb);485 ieee80211_tx_skb(sdata, skb);
483}486}
@@ -489,14 +492,14 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, · 5 unmodified lines
489 u16 tid, params;492 u16 tid, params;
490 u16 initiator;493 u16 initiator;
491 494
492 params = le16_to_cpu(mgmt->u.action.u.delba.params);495 params = le16_to_cpu(mgmt->u.action.delba.params);
493 tid = (params & IEEE80211_DELBA_PARAM_TID_MASK) >> 12;496 tid = (params & IEEE80211_DELBA_PARAM_TID_MASK) >> 12;
494 initiator = (params & IEEE80211_DELBA_PARAM_INITIATOR_MASK) >> 11;497 initiator = (params & IEEE80211_DELBA_PARAM_INITIATOR_MASK) >> 11;
495 498
496 ht_dbg_ratelimited(sdata, "delba from %pM (%s) tid %d reason code %d\n",499 ht_dbg_ratelimited(sdata, "delba from %pM (%s) tid %d reason code %d\n",
497 mgmt->sa, initiator ? "initiator" : "recipient",500 mgmt->sa, initiator ? "initiator" : "recipient",
498 tid,501 tid,
499 le16_to_cpu(mgmt->u.action.u.delba.reason_code));502 le16_to_cpu(mgmt->u.action.delba.reason_code));
500 503
501 if (initiator == WLAN_BACK_INITIATOR)504 if (initiator == WLAN_BACK_INITIATOR)
502 __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_INITIATOR, 0,505 __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_INITIATOR, 0,
@@ -530,20 +533,20 @@ int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata, · 27 unmodified lines
530 struct ieee80211_tx_info *info;533 struct ieee80211_tx_info *info;
531 u8 status_link_id = link_id < 0 ? 0 : link_id;534 u8 status_link_id = link_id < 0 ? 0 : link_id;
532 535
533 /* 27 = header + category + action + smps mode */536 skb = dev_alloc_skb(IEEE80211_MIN_ACTION_SIZE(ht_smps) +
534 skb = dev_alloc_skb(27 + local->hw.extra_tx_headroom);537 local->hw.extra_tx_headroom);
535 if (!skb)538 if (!skb)
536 return -ENOMEM;539 return -ENOMEM;
537 540
538 skb_reserve(skb, local->hw.extra_tx_headroom);541 skb_reserve(skb, local->hw.extra_tx_headroom);
539 action_frame = skb_put(skb, 27);542 action_frame = skb_put_zero(skb, IEEE80211_MIN_ACTION_SIZE(ht_smps));
540 memcpy(action_frame->da, da, ETH_ALEN);543 memcpy(action_frame->da, da, ETH_ALEN);
541 memcpy(action_frame->sa, sdata->dev->dev_addr, ETH_ALEN);544 memcpy(action_frame->sa, sdata->dev->dev_addr, ETH_ALEN);
542 memcpy(action_frame->bssid, bssid, ETH_ALEN);545 memcpy(action_frame->bssid, bssid, ETH_ALEN);
543 action_frame->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |546 action_frame->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
544 IEEE80211_STYPE_ACTION);547 IEEE80211_STYPE_ACTION);
545 action_frame->u.action.category = WLAN_CATEGORY_HT;548 action_frame->u.action.category = WLAN_CATEGORY_HT;
546 action_frame->u.action.u.ht_smps.action = WLAN_HT_ACTION_SMPS;549 action_frame->u.action.action_code = WLAN_HT_ACTION_SMPS;
547 switch (smps) {550 switch (smps) {
548 case IEEE80211_SMPS_AUTOMATIC:551 case IEEE80211_SMPS_AUTOMATIC:
549 case IEEE80211_SMPS_NUM_MODES:552 case IEEE80211_SMPS_NUM_MODES:
@@ -551,15 +554,15 @@ int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata, · 1 unmodified line
551 smps = IEEE80211_SMPS_OFF;554 smps = IEEE80211_SMPS_OFF;
552 fallthrough;555 fallthrough;
553 case IEEE80211_SMPS_OFF:556 case IEEE80211_SMPS_OFF:
554 action_frame->u.action.u.ht_smps.smps_control =557 action_frame->u.action.ht_smps.smps_control =
555 WLAN_HT_SMPS_CONTROL_DISABLED;558 WLAN_HT_SMPS_CONTROL_DISABLED;
556 break;559 break;
557 case IEEE80211_SMPS_STATIC:560 case IEEE80211_SMPS_STATIC:
558 action_frame->u.action.u.ht_smps.smps_control =561 action_frame->u.action.ht_smps.smps_control =
559 WLAN_HT_SMPS_CONTROL_STATIC;562 WLAN_HT_SMPS_CONTROL_STATIC;
560 break;563 break;
561 case IEEE80211_SMPS_DYNAMIC:564 case IEEE80211_SMPS_DYNAMIC:
562 action_frame->u.action.u.ht_smps.smps_control =565 action_frame->u.action.ht_smps.smps_control =
563 WLAN_HT_SMPS_CONTROL_DYNAMIC;566 WLAN_HT_SMPS_CONTROL_DYNAMIC;
564 break;567 break;
565 }568 }
net/mac80211/ibss.c+5−13
@@ -9,7 +9,7 @@ · 8 unmodified lines
9 * Copyright 2009, Johannes Berg <johannes@sipsolutions.net>9 * Copyright 2009, Johannes Berg <johannes@sipsolutions.net>
10 * Copyright 2013-2014 Intel Mobile Communications GmbH10 * Copyright 2013-2014 Intel Mobile Communications GmbH
11 * Copyright(c) 2016 Intel Deutschland GmbH11 * Copyright(c) 2016 Intel Deutschland GmbH
12 * Copyright(c) 2018-2025 Intel Corporation12 * Copyright(c) 2018-2026 Intel Corporation
13 */13 */
14 14
15#include <linux/delay.h>15#include <linux/delay.h>
@@ -888,19 +888,11 @@ ieee80211_rx_mgmt_spectrum_mgmt(struct ieee80211_sub_if_data *sdata, · 872 unmodified lines
888 struct ieee80211_rx_status *rx_status,888 struct ieee80211_rx_status *rx_status,
889 struct ieee802_11_elems *elems)889 struct ieee802_11_elems *elems)
890{890{
891 int required_len;891 if (len < IEEE80211_MIN_ACTION_SIZE(chan_switch))
892
893 if (len < IEEE80211_MIN_ACTION_SIZE + 1)
894 return;892 return;
895 893
896 /* CSA is the only action we handle for now */894 /* CSA is the only action we handle for now */
897 if (mgmt->u.action.u.measurement.action_code !=895 if (mgmt->u.action.action_code != WLAN_ACTION_SPCT_CHL_SWITCH)
898 WLAN_ACTION_SPCT_CHL_SWITCH)
899 return;
900
901 required_len = IEEE80211_MIN_ACTION_SIZE +
902 sizeof(mgmt->u.action.u.chan_switch);
903 if (len < required_len)
904 return;896 return;
905 897
906 if (!sdata->vif.bss_conf.csa_active)898 if (!sdata->vif.bss_conf.csa_active)
@@ -1613,12 +1605,12 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, · 706 unmodified lines
1613 case WLAN_CATEGORY_SPECTRUM_MGMT:1605 case WLAN_CATEGORY_SPECTRUM_MGMT:
1614 ies_len = skb->len -1606 ies_len = skb->len -
1615 offsetof(struct ieee80211_mgmt,1607 offsetof(struct ieee80211_mgmt,
1616 u.action.u.chan_switch.variable);1608 u.action.chan_switch.variable);
1617 1609
1618 if (ies_len < 0)1610 if (ies_len < 0)
1619 break;1611 break;
1620 1612
1621 elems = ieee802_11_parse_elems(mgmt->u.action.u.chan_switch.variable,1613 elems = ieee802_11_parse_elems(mgmt->u.action.chan_switch.variable,
1622 ies_len,1614 ies_len,
1623 IEEE80211_FTYPE_MGMT |1615 IEEE80211_FTYPE_MGMT |
1624 IEEE80211_STYPE_ACTION,1616 IEEE80211_STYPE_ACTION,
net/mac80211/ieee80211_i.h+5−1
@@ -2190,7 +2190,8 @@ bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, · 2189 unmodified lines
2190 struct link_sta_info *link_sta);2190 struct link_sta_info *link_sta);
2191void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,2191void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
2192 const u8 *da, u16 tid,2192 const u8 *da, u16 tid,
2193 u16 initiator, u16 reason_code);2193 u16 initiator, u16 reason_code,
2194 bool use_ndp);
2194int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,2195int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,
2195 enum ieee80211_smps_mode smps, const u8 *da,2196 enum ieee80211_smps_mode smps, const u8 *da,
2196 const u8 *bssid, int link_id);2197 const u8 *bssid, int link_id);
@@ -2206,6 +2207,7 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, · 9 unmodified lines
2206 u8 dialog_token, u16 timeout,2207 u8 dialog_token, u16 timeout,
2207 u16 start_seq_num, u16 ba_policy, u16 tid,2208 u16 start_seq_num, u16 ba_policy, u16 tid,
2208 u16 buf_size, bool tx, bool auto_seq,2209 u16 buf_size, bool tx, bool auto_seq,
2210 bool req_ndp,
2209 const u8 addba_ext_data);2211 const u8 addba_ext_data);
2210void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta,2212void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta,
2211 enum ieee80211_agg_stop_reason reason);2213 enum ieee80211_agg_stop_reason reason);
@@ -2331,6 +2333,8 @@ void ieee80211_s1g_status_twt_action(struct ieee80211_sub_if_data *sdata, · 119 unmodified lines
2331void ieee80211_s1g_cap_to_sta_s1g_cap(struct ieee80211_sub_if_data *sdata,2333void ieee80211_s1g_cap_to_sta_s1g_cap(struct ieee80211_sub_if_data *sdata,
2332 const struct ieee80211_s1g_cap *s1g_cap_ie,2334 const struct ieee80211_s1g_cap *s1g_cap_ie,
2333 struct link_sta_info *link_sta);2335 struct link_sta_info *link_sta);
2336bool ieee80211_s1g_use_ndp_ba(const struct ieee80211_sub_if_data *sdata,
2337 const struct sta_info *sta);
2334 2338
2335/* Spectrum management */2339/* Spectrum management */
2336void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,2340void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
net/mac80211/iface.c+12−9
@@ -1579,16 +1579,19 @@ static void ieee80211_iface_process_skb(struct ieee80211_local *local, · 1578 unmodified lines
1579 1579
1580 sta = sta_info_get_bss(sdata, mgmt->sa);1580 sta = sta_info_get_bss(sdata, mgmt->sa);
1581 if (sta) {1581 if (sta) {
1582 switch (mgmt->u.action.u.addba_req.action_code) {1582 switch (mgmt->u.action.action_code) {
1583 case WLAN_ACTION_ADDBA_REQ:1583 case WLAN_ACTION_ADDBA_REQ:
1584 case WLAN_ACTION_NDP_ADDBA_REQ:
1584 ieee80211_process_addba_request(local, sta,1585 ieee80211_process_addba_request(local, sta,
1585 mgmt, len);1586 mgmt, len);
1586 break;1587 break;
1587 case WLAN_ACTION_ADDBA_RESP:1588 case WLAN_ACTION_ADDBA_RESP:
1589 case WLAN_ACTION_NDP_ADDBA_RESP:
1588 ieee80211_process_addba_resp(local, sta,1590 ieee80211_process_addba_resp(local, sta,
1589 mgmt, len);1591 mgmt, len);
1590 break;1592 break;
1591 case WLAN_ACTION_DELBA:1593 case WLAN_ACTION_DELBA:
1594 case WLAN_ACTION_NDP_DELBA:
1592 ieee80211_process_delba(sdata, sta,1595 ieee80211_process_delba(sdata, sta,
1593 mgmt, len);1596 mgmt, len);
1594 break;1597 break;
@@ -1599,9 +1602,9 @@ static void ieee80211_iface_process_skb(struct ieee80211_local *local, · 4 unmodified lines
1599 }1602 }
1600 } else if (ieee80211_is_action(mgmt->frame_control) &&1603 } else if (ieee80211_is_action(mgmt->frame_control) &&
1601 mgmt->u.action.category == WLAN_CATEGORY_HT) {1604 mgmt->u.action.category == WLAN_CATEGORY_HT) {
1602 switch (mgmt->u.action.u.ht_smps.action) {1605 switch (mgmt->u.action.action_code) {
1603 case WLAN_HT_ACTION_NOTIFY_CHANWIDTH: {1606 case WLAN_HT_ACTION_NOTIFY_CHANWIDTH: {
1604 u8 chanwidth = mgmt->u.action.u.ht_notify_cw.chanwidth;1607 u8 chanwidth = mgmt->u.action.ht_notify_cw.chanwidth;
1605 struct ieee80211_rx_status *status;1608 struct ieee80211_rx_status *status;
1606 struct link_sta_info *link_sta;1609 struct link_sta_info *link_sta;
1607 struct sta_info *sta;1610 struct sta_info *sta;
@@ -1628,7 +1631,7 @@ static void ieee80211_iface_process_skb(struct ieee80211_local *local, · 20 unmodified lines
1628 }1631 }
1629 } else if (ieee80211_is_action(mgmt->frame_control) &&1632 } else if (ieee80211_is_action(mgmt->frame_control) &&
1630 mgmt->u.action.category == WLAN_CATEGORY_VHT) {1633 mgmt->u.action.category == WLAN_CATEGORY_VHT) {
1631 switch (mgmt->u.action.u.vht_group_notif.action_code) {1634 switch (mgmt->u.action.action_code) {
1632 case WLAN_VHT_ACTION_OPMODE_NOTIF: {1635 case WLAN_VHT_ACTION_OPMODE_NOTIF: {
1633 struct ieee80211_rx_status *status;1636 struct ieee80211_rx_status *status;
1634 enum nl80211_band band;1637 enum nl80211_band band;
@@ -1637,7 +1640,7 @@ static void ieee80211_iface_process_skb(struct ieee80211_local *local, · 2 unmodified lines
1637 1640
1638 status = IEEE80211_SKB_RXCB(skb);1641 status = IEEE80211_SKB_RXCB(skb);
1639 band = status->band;1642 band = status->band;
1640 opmode = mgmt->u.action.u.vht_opmode_notif.operating_mode;1643 opmode = mgmt->u.action.vht_opmode_notif.operating_mode;
1641 1644
1642 sta = sta_info_get_bss(sdata, mgmt->sa);1645 sta = sta_info_get_bss(sdata, mgmt->sa);
1643 1646
@@ -1658,7 +1661,7 @@ static void ieee80211_iface_process_skb(struct ieee80211_local *local, · 14 unmodified lines
1658 }1661 }
1659 } else if (ieee80211_is_action(mgmt->frame_control) &&1662 } else if (ieee80211_is_action(mgmt->frame_control) &&
1660 mgmt->u.action.category == WLAN_CATEGORY_S1G) {1663 mgmt->u.action.category == WLAN_CATEGORY_S1G) {
1661 switch (mgmt->u.action.u.s1g.action_code) {1664 switch (mgmt->u.action.action_code) {
1662 case WLAN_S1G_TWT_TEARDOWN:1665 case WLAN_S1G_TWT_TEARDOWN:
1663 case WLAN_S1G_TWT_SETUP:1666 case WLAN_S1G_TWT_SETUP:
1664 ieee80211_s1g_rx_twt_action(sdata, skb);1667 ieee80211_s1g_rx_twt_action(sdata, skb);
@@ -1669,7 +1672,7 @@ static void ieee80211_iface_process_skb(struct ieee80211_local *local, · 4 unmodified lines
1669 } else if (ieee80211_is_action(mgmt->frame_control) &&1672 } else if (ieee80211_is_action(mgmt->frame_control) &&
1670 mgmt->u.action.category == WLAN_CATEGORY_PROTECTED_EHT) {1673 mgmt->u.action.category == WLAN_CATEGORY_PROTECTED_EHT) {
1671 if (sdata->vif.type == NL80211_IFTYPE_AP) {1674 if (sdata->vif.type == NL80211_IFTYPE_AP) {
1672 switch (mgmt->u.action.u.eml_omn.action_code) {1675 switch (mgmt->u.action.action_code) {
1673 case WLAN_PROTECTED_EHT_ACTION_EML_OP_MODE_NOTIF:1676 case WLAN_PROTECTED_EHT_ACTION_EML_OP_MODE_NOTIF:
1674 ieee80211_rx_eml_op_mode_notif(sdata, skb);1677 ieee80211_rx_eml_op_mode_notif(sdata, skb);
1675 break;1678 break;
@@ -1677,7 +1680,7 @@ static void ieee80211_iface_process_skb(struct ieee80211_local *local, · 1 unmodified line
1677 break;1680 break;
1678 }1681 }
1679 } else if (sdata->vif.type == NL80211_IFTYPE_STATION) {1682 } else if (sdata->vif.type == NL80211_IFTYPE_STATION) {
1680 switch (mgmt->u.action.u.ttlm_req.action_code) {1683 switch (mgmt->u.action.action_code) {
1681 case WLAN_PROTECTED_EHT_ACTION_TTLM_REQ:1684 case WLAN_PROTECTED_EHT_ACTION_TTLM_REQ:
1682 ieee80211_process_neg_ttlm_req(sdata, mgmt,1685 ieee80211_process_neg_ttlm_req(sdata, mgmt,
1683 skb->len);1686 skb->len);
@@ -1765,7 +1768,7 @@ static void ieee80211_iface_process_status(struct ieee80211_sub_if_data *sdata, · 81 unmodified lines
1765 1768
1766 if (ieee80211_is_action(mgmt->frame_control) &&1769 if (ieee80211_is_action(mgmt->frame_control) &&
1767 mgmt->u.action.category == WLAN_CATEGORY_S1G) {1770 mgmt->u.action.category == WLAN_CATEGORY_S1G) {
1768 switch (mgmt->u.action.u.s1g.action_code) {1771 switch (mgmt->u.action.action_code) {
1769 case WLAN_S1G_TWT_TEARDOWN:1772 case WLAN_S1G_TWT_TEARDOWN:
1770 case WLAN_S1G_TWT_SETUP:1773 case WLAN_S1G_TWT_SETUP:
1771 ieee80211_s1g_status_twt_action(sdata, skb);1774 ieee80211_s1g_status_twt_action(sdata, skb);
net/mac80211/main.c+15−3
@@ -1118,6 +1118,19 @@ ieee80211_ifcomb_check(const struct ieee80211_iface_combination *c, int n_comb) · 1117 unmodified lines
1118 return true;1118 return true;
1119}1119}
1120 1120
1121static void ieee80211_create_default_chandef(struct cfg80211_chan_def *chandef,
1122 struct ieee80211_channel *chan)
1123{
1124 *chandef = (struct cfg80211_chan_def) {
1125 .chan = chan,
1126 .width = chan->band == NL80211_BAND_S1GHZ ?
1127 NL80211_CHAN_WIDTH_1 :
1128 NL80211_CHAN_WIDTH_20_NOHT,
1129 .center_freq1 = chan->center_freq,
1130 .freq1_offset = chan->freq_offset,
1131 };
1132}
1133
1121int ieee80211_register_hw(struct ieee80211_hw *hw)1134int ieee80211_register_hw(struct ieee80211_hw *hw)
1122{1135{
1123 struct ieee80211_local *local = hw_to_local(hw);1136 struct ieee80211_local *local = hw_to_local(hw);
@@ -1261,9 +1274,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) · 137 unmodified lines
1261 /* if none found then use the first anyway */1274 /* if none found then use the first anyway */
1262 if (i == sband->n_channels)1275 if (i == sband->n_channels)
1263 i = 0;1276 i = 0;
1264 cfg80211_chandef_create(&dflt_chandef,1277 ieee80211_create_default_chandef(&dflt_chandef,
1265 &sband->channels[i],1278 &sband->channels[i]);
1266 NL80211_CHAN_NO_HT);
1267 /* init channel we're on */1279 /* init channel we're on */
1268 local->monitor_chanreq.oper = dflt_chandef;1280 local->monitor_chanreq.oper = dflt_chandef;
1269 if (local->emulate_chanctx) {1281 if (local->emulate_chanctx) {
net/mac80211/mesh.c+6−8
@@ -1,7 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only1// SPDX-License-Identifier: GPL-2.0-only
2/*2/*
3 * Copyright (c) 2008, 2009 open80211s Ltd.3 * Copyright (c) 2008, 2009 open80211s Ltd.
4 * Copyright (C) 2018 - 2025 Intel Corporation4 * Copyright (C) 2018-2026 Intel Corporation
5 * Authors: Luis Carlos Cobo <luisca@cozybit.com>5 * Authors: Luis Carlos Cobo <luisca@cozybit.com>
6 * Javier Cardona <javier@cozybit.com>6 * Javier Cardona <javier@cozybit.com>
7 */7 */
@@ -19,8 +19,7 @@ static struct kmem_cache *rm_cache; · 11 unmodified lines
19 19
20bool mesh_action_is_path_sel(struct ieee80211_mgmt *mgmt)20bool mesh_action_is_path_sel(struct ieee80211_mgmt *mgmt)
21{21{
22 return (mgmt->u.action.u.mesh_action.action_code ==22 return mgmt->u.action.action_code == WLAN_MESH_ACTION_HWMP_PATH_SELECTION;
23 WLAN_MESH_ACTION_HWMP_PATH_SELECTION);
24}23}
25 24
26void ieee80211s_init(void)25void ieee80211s_init(void)
@@ -1618,13 +1617,12 @@ static void mesh_rx_csa_frame(struct ieee80211_sub_if_data *sdata, · 1591 unmodified lines
1618 size_t baselen;1617 size_t baselen;
1619 u8 *pos;1618 u8 *pos;
1620 1619
1621 if (mgmt->u.action.u.measurement.action_code !=1620 if (mgmt->u.action.action_code != WLAN_ACTION_SPCT_CHL_SWITCH)
1622 WLAN_ACTION_SPCT_CHL_SWITCH)
1623 return;1621 return;
1624 1622
1625 pos = mgmt->u.action.u.chan_switch.variable;1623 pos = mgmt->u.action.chan_switch.variable;
1626 baselen = offsetof(struct ieee80211_mgmt,1624 baselen = offsetof(struct ieee80211_mgmt,
1627 u.action.u.chan_switch.variable);1625 u.action.chan_switch.variable);
1628 elems = ieee802_11_parse_elems(pos, len - baselen,1626 elems = ieee802_11_parse_elems(pos, len - baselen,
1629 IEEE80211_FTYPE_MGMT |1627 IEEE80211_FTYPE_MGMT |
1630 IEEE80211_STYPE_ACTION,1628 IEEE80211_STYPE_ACTION,
@@ -1670,7 +1668,7 @@ static void ieee80211_mesh_rx_mgmt_action(struct ieee80211_sub_if_data *sdata, · 39 unmodified lines
1670{1668{
1671 switch (mgmt->u.action.category) {1669 switch (mgmt->u.action.category) {
1672 case WLAN_CATEGORY_SELF_PROTECTED:1670 case WLAN_CATEGORY_SELF_PROTECTED:
1673 switch (mgmt->u.action.u.self_prot.action_code) {1671 switch (mgmt->u.action.action_code) {
1674 case WLAN_SP_MESH_PEERING_OPEN:1672 case WLAN_SP_MESH_PEERING_OPEN:
1675 case WLAN_SP_MESH_PEERING_CLOSE:1673 case WLAN_SP_MESH_PEERING_CLOSE:
1676 case WLAN_SP_MESH_PEERING_CONFIRM:1674 case WLAN_SP_MESH_PEERING_CONFIRM:
net/mac80211/mesh_hwmp.c+8−12
@@ -1,7 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only1// SPDX-License-Identifier: GPL-2.0-only
2/*2/*
3 * Copyright (c) 2008, 2009 open80211s Ltd.3 * Copyright (c) 2008, 2009 open80211s Ltd.
4 * Copyright (C) 2019, 2021-2023, 2025 Intel Corporation4 * Copyright (C) 2019, 2021-2023, 2025-2026 Intel Corporation
5 * Author: Luis Carlos Cobo <luisca@cozybit.com>5 * Author: Luis Carlos Cobo <luisca@cozybit.com>
6 */6 */
7 7
@@ -105,12 +105,11 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags, · 97 unmodified lines
105 u32 lifetime, u32 metric, u32 preq_id,105 u32 lifetime, u32 metric, u32 preq_id,
106 struct ieee80211_sub_if_data *sdata)106 struct ieee80211_sub_if_data *sdata)
107{107{
108 int hdr_len = IEEE80211_MIN_ACTION_SIZE(mesh_action);
108 struct ieee80211_local *local = sdata->local;109 struct ieee80211_local *local = sdata->local;
109 struct sk_buff *skb;110 struct sk_buff *skb;
110 struct ieee80211_mgmt *mgmt;111 struct ieee80211_mgmt *mgmt;
111 u8 *pos, ie_len;112 u8 *pos, ie_len;
112 int hdr_len = offsetofend(struct ieee80211_mgmt,
113 u.action.u.mesh_action);
114 113
115 skb = dev_alloc_skb(local->tx_headroom +114 skb = dev_alloc_skb(local->tx_headroom +
116 hdr_len +115 hdr_len +
@@ -127,8 +126,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags, · 10 unmodified lines
127 /* BSSID == SA */126 /* BSSID == SA */
128 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);127 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
129 mgmt->u.action.category = WLAN_CATEGORY_MESH_ACTION;128 mgmt->u.action.category = WLAN_CATEGORY_MESH_ACTION;
130 mgmt->u.action.u.mesh_action.action_code =129 mgmt->u.action.action_code = WLAN_MESH_ACTION_HWMP_PATH_SELECTION;
131 WLAN_MESH_ACTION_HWMP_PATH_SELECTION;
132 130
133 switch (action) {131 switch (action) {
134 case MPATH_PREQ:132 case MPATH_PREQ:
@@ -237,13 +235,12 @@ int mesh_path_error_tx(struct ieee80211_sub_if_data *sdata, · 102 unmodified lines
237 u8 ttl, const u8 *target, u32 target_sn,235 u8 ttl, const u8 *target, u32 target_sn,
238 u16 target_rcode, const u8 *ra)236 u16 target_rcode, const u8 *ra)
239{237{
238 int hdr_len = IEEE80211_MIN_ACTION_SIZE(mesh_action);
240 struct ieee80211_local *local = sdata->local;239 struct ieee80211_local *local = sdata->local;
241 struct sk_buff *skb;240 struct sk_buff *skb;
242 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;241 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
243 struct ieee80211_mgmt *mgmt;242 struct ieee80211_mgmt *mgmt;
244 u8 *pos, ie_len;243 u8 *pos, ie_len;
245 int hdr_len = offsetofend(struct ieee80211_mgmt,
246 u.action.u.mesh_action);
247 244
248 if (time_before(jiffies, ifmsh->next_perr))245 if (time_before(jiffies, ifmsh->next_perr))
249 return -EAGAIN;246 return -EAGAIN;
@@ -265,8 +262,7 @@ int mesh_path_error_tx(struct ieee80211_sub_if_data *sdata, · 15 unmodified lines
265 /* BSSID == SA */262 /* BSSID == SA */
266 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);263 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
267 mgmt->u.action.category = WLAN_CATEGORY_MESH_ACTION;264 mgmt->u.action.category = WLAN_CATEGORY_MESH_ACTION;
268 mgmt->u.action.u.mesh_action.action_code =265 mgmt->u.action.action_code = WLAN_MESH_ACTION_HWMP_PATH_SELECTION;
269 WLAN_MESH_ACTION_HWMP_PATH_SELECTION;
270 ie_len = 15;266 ie_len = 15;
271 pos = skb_put(skb, 2 + ie_len);267 pos = skb_put(skb, 2 + ie_len);
272 *pos++ = WLAN_EID_PERR;268 *pos++ = WLAN_EID_PERR;
@@ -938,7 +934,7 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata, · 665 unmodified lines
938 struct sta_info *sta;934 struct sta_info *sta;
939 935
940 /* need action_code */936 /* need action_code */
941 if (len < IEEE80211_MIN_ACTION_SIZE + 1)937 if (len < IEEE80211_MIN_ACTION_SIZE(mesh_action))
942 return;938 return;
943 939
944 rcu_read_lock();940 rcu_read_lock();
@@ -949,8 +945,8 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata, · 4 unmodified lines
949 }945 }
950 rcu_read_unlock();946 rcu_read_unlock();
951 947
952 baselen = (u8 *) mgmt->u.action.u.mesh_action.variable - (u8 *) mgmt;948 baselen = mgmt->u.action.mesh_action.variable - (u8 *)mgmt;
953 elems = ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable,949 elems = ieee802_11_parse_elems(mgmt->u.action.mesh_action.variable,
954 len - baselen,950 len - baselen,
955 IEEE80211_FTYPE_MGMT |951 IEEE80211_FTYPE_MGMT |
956 IEEE80211_STYPE_ACTION,952 IEEE80211_STYPE_ACTION,
net/mac80211/mesh_plink.c+10−11
@@ -1,7 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only1// SPDX-License-Identifier: GPL-2.0-only
2/*2/*
3 * Copyright (c) 2008, 2009 open80211s Ltd.3 * Copyright (c) 2008, 2009 open80211s Ltd.
4 * Copyright (C) 2019, 2021-2025 Intel Corporation4 * Copyright (C) 2019, 2021-2026 Intel Corporation
5 * Author: Luis Carlos Cobo <luisca@cozybit.com>5 * Author: Luis Carlos Cobo <luisca@cozybit.com>
6 */6 */
7#include <linux/gfp.h>7#include <linux/gfp.h>
@@ -13,7 +13,7 @@ · 5 unmodified lines
13#include "rate.h"13#include "rate.h"
14#include "mesh.h"14#include "mesh.h"
15 15
16#define PLINK_CNF_AID(mgmt) ((mgmt)->u.action.u.self_prot.variable + 2)16#define PLINK_CNF_AID(mgmt) ((mgmt)->u.action.self_prot.variable + 2)
17#define PLINK_GET_LLID(p) (p + 2)17#define PLINK_GET_LLID(p) (p + 2)
18#define PLINK_GET_PLID(p) (p + 4)18#define PLINK_GET_PLID(p) (p + 4)
19 19
@@ -215,6 +215,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, · 195 unmodified lines
215 enum ieee80211_self_protected_actioncode action,215 enum ieee80211_self_protected_actioncode action,
216 u8 *da, u16 llid, u16 plid, u16 reason)216 u8 *da, u16 llid, u16 plid, u16 reason)
217{217{
218 int hdr_len = IEEE80211_MIN_ACTION_SIZE(self_prot);
218 struct ieee80211_local *local = sdata->local;219 struct ieee80211_local *local = sdata->local;
219 struct sk_buff *skb;220 struct sk_buff *skb;
220 struct ieee80211_tx_info *info;221 struct ieee80211_tx_info *info;
@@ -223,7 +224,6 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, · 2 unmodified lines
223 u16 peering_proto = 0;224 u16 peering_proto = 0;
224 u8 *pos, ie_len = 4;225 u8 *pos, ie_len = 4;
225 u8 ie_len_he_cap, ie_len_eht_cap;226 u8 ie_len_he_cap, ie_len_eht_cap;
226 int hdr_len = offsetofend(struct ieee80211_mgmt, u.action.u.self_prot);
227 int err = -ENOMEM;227 int err = -ENOMEM;
228 228
229 ie_len_he_cap = ieee80211_ie_len_he_cap(sdata);229 ie_len_he_cap = ieee80211_ie_len_he_cap(sdata);
@@ -260,7 +260,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, · 30 unmodified lines
260 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);260 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
261 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);261 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
262 mgmt->u.action.category = WLAN_CATEGORY_SELF_PROTECTED;262 mgmt->u.action.category = WLAN_CATEGORY_SELF_PROTECTED;
263 mgmt->u.action.u.self_prot.action_code = action;263 mgmt->u.action.action_code = action;
264 264
265 if (action != WLAN_SP_MESH_PEERING_CLOSE) {265 if (action != WLAN_SP_MESH_PEERING_CLOSE) {
266 struct ieee80211_supported_band *sband;266 struct ieee80211_supported_band *sband;
@@ -1141,7 +1141,7 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata, · 874 unmodified lines
1141 return;1141 return;
1142 }1142 }
1143 1143
1144 ftype = mgmt->u.action.u.self_prot.action_code;1144 ftype = mgmt->u.action.action_code;
1145 if ((ftype == WLAN_SP_MESH_PEERING_OPEN && ie_len != 4) ||1145 if ((ftype == WLAN_SP_MESH_PEERING_OPEN && ie_len != 4) ||
1146 (ftype == WLAN_SP_MESH_PEERING_CONFIRM && ie_len != 6) ||1146 (ftype == WLAN_SP_MESH_PEERING_CONFIRM && ie_len != 6) ||
1147 (ftype == WLAN_SP_MESH_PEERING_CLOSE && ie_len != 61147 (ftype == WLAN_SP_MESH_PEERING_CLOSE && ie_len != 6
@@ -1224,8 +1224,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, · 76 unmodified lines
1224 size_t baselen;1224 size_t baselen;
1225 u8 *baseaddr;1225 u8 *baseaddr;
1226 1226
1227 /* need action_code, aux */1227 /* need aux */
1228 if (len < IEEE80211_MIN_ACTION_SIZE + 3)1228 if (len < IEEE80211_MIN_ACTION_SIZE(self_prot) + 1)
1229 return;1229 return;
1230 1230
1231 if (sdata->u.mesh.user_mpm)1231 if (sdata->u.mesh.user_mpm)
@@ -1238,10 +1238,9 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, · 6 unmodified lines
1238 return;1238 return;
1239 }1239 }
1240 1240
1241 baseaddr = mgmt->u.action.u.self_prot.variable;1241 baseaddr = mgmt->u.action.self_prot.variable;
1242 baselen = (u8 *) mgmt->u.action.u.self_prot.variable - (u8 *) mgmt;1242 baselen = mgmt->u.action.self_prot.variable - (u8 *)mgmt;
1243 if (mgmt->u.action.u.self_prot.action_code ==1243 if (mgmt->u.action.action_code == WLAN_SP_MESH_PEERING_CONFIRM) {
1244 WLAN_SP_MESH_PEERING_CONFIRM) {
1245 baseaddr += 4;1244 baseaddr += 4;
1246 baselen += 4;1245 baselen += 4;
1247 1246
net/mac80211/mlme.c+66−47
@@ -216,6 +216,24 @@ ieee80211_determine_ap_chan(struct ieee80211_sub_if_data *sdata, · 215 unmodified lines
216 return IEEE80211_CONN_MODE_LEGACY;216 return IEEE80211_CONN_MODE_LEGACY;
217 }217 }
218 218
219 if (eht_oper && ieee80211_hw_check(&sdata->local->hw, STRICT)) {
220 struct cfg80211_chan_def he_chandef = *chandef;
221
222 if (!ieee80211_chandef_he_6ghz_oper(sdata->local,
223 he_oper, NULL,
224 &he_chandef)) {
225 sdata_info(sdata,
226 "bad HE operation in EHT AP\n");
227 return IEEE80211_CONN_MODE_LEGACY;
228 }
229
230 if (!cfg80211_chandef_compatible(chandef,
231 &he_chandef)) {
232 sdata_info(sdata, "HE/EHT incompatible\n");
233 return IEEE80211_CONN_MODE_LEGACY;
234 }
235 }
236
219 if (mode <= IEEE80211_CONN_MODE_EHT)237 if (mode <= IEEE80211_CONN_MODE_EHT)
220 return mode;238 return mode;
221 goto check_uhr;239 goto check_uhr;
@@ -6721,7 +6739,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, · 6499 unmodified lines
6721 sdata_info(sdata,6739 sdata_info(sdata,
6722 "RX %sssocResp from %pM (capab=0x%x status=%d aid=%d)\n",6740 "RX %sssocResp from %pM (capab=0x%x status=%d aid=%d)\n",
6723 reassoc ? "Rea" : "A", assoc_data->ap_addr,6741 reassoc ? "Rea" : "A", assoc_data->ap_addr,
6724 capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14))));6742 capab_info, status_code, aid);
6725 6743
6726 ifmgd->broken_ap = false;6744 ifmgd->broken_ap = false;
6727 6745
@@ -7058,6 +7076,7 @@ static void ieee80211_ml_reconf_work(struct wiphy *wiphy, · 330 unmodified lines
7058 container_of(work, struct ieee80211_sub_if_data,7076 container_of(work, struct ieee80211_sub_if_data,
7059 u.mgd.ml_reconf_work.work);7077 u.mgd.ml_reconf_work.work);
7060 u16 new_valid_links, new_active_links, new_dormant_links;7078 u16 new_valid_links, new_active_links, new_dormant_links;
7079 struct sta_info *sta;
7061 int ret;7080 int ret;
7062 7081
7063 if (!sdata->u.mgd.removed_links)7082 if (!sdata->u.mgd.removed_links)
@@ -7093,6 +7112,16 @@ static void ieee80211_ml_reconf_work(struct wiphy *wiphy, · 29 unmodified lines
7093 }7112 }
7094 }7113 }
7095 7114
7115 sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
7116 if (sta) {
7117 unsigned long removed_links = sdata->u.mgd.removed_links;
7118 unsigned int link_id;
7119
7120 for_each_set_bit(link_id, &removed_links,
7121 IEEE80211_MLD_MAX_NUM_LINKS)
7122 ieee80211_sta_remove_link(sta, link_id);
7123 }
7124
7096 new_dormant_links = sdata->vif.dormant_links & ~sdata->u.mgd.removed_links;7125 new_dormant_links = sdata->vif.dormant_links & ~sdata->u.mgd.removed_links;
7097 7126
7098 ret = ieee80211_vif_set_links(sdata, new_valid_links,7127 ret = ieee80211_vif_set_links(sdata, new_valid_links,
@@ -7957,7 +7986,7 @@ ieee80211_send_neg_ttlm_req(struct ieee80211_sub_if_data *sdata, · 858 unmodified lines
7957 struct ieee80211_local *local = sdata->local;7986 struct ieee80211_local *local = sdata->local;
7958 struct ieee80211_mgmt *mgmt;7987 struct ieee80211_mgmt *mgmt;
7959 struct sk_buff *skb;7988 struct sk_buff *skb;
7960 int hdr_len = offsetofend(struct ieee80211_mgmt, u.action.u.ttlm_req);7989 int hdr_len = IEEE80211_MIN_ACTION_SIZE(ttlm_req);
7961 int ttlm_max_len = 2 + 1 + sizeof(struct ieee80211_ttlm_elem) + 1 +7990 int ttlm_max_len = 2 + 1 + sizeof(struct ieee80211_ttlm_elem) + 1 +
7962 2 * 2 * IEEE80211_TTLM_NUM_TIDS;7991 2 * 2 * IEEE80211_TTLM_NUM_TIDS;
7963 7992
@@ -7974,9 +8003,8 @@ ieee80211_send_neg_ttlm_req(struct ieee80211_sub_if_data *sdata, · 10 unmodified lines
7974 memcpy(mgmt->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN);8003 memcpy(mgmt->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN);
7975 8004
7976 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;8005 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;
7977 mgmt->u.action.u.ttlm_req.action_code =8006 mgmt->u.action.action_code = WLAN_PROTECTED_EHT_ACTION_TTLM_REQ;
7978 WLAN_PROTECTED_EHT_ACTION_TTLM_REQ;8007 mgmt->u.action.ttlm_req.dialog_token = dialog_token;
7979 mgmt->u.action.u.ttlm_req.dialog_token = dialog_token;
7980 ieee80211_neg_ttlm_add_suggested_map(skb, neg_ttlm);8008 ieee80211_neg_ttlm_add_suggested_map(skb, neg_ttlm);
7981 ieee80211_tx_skb(sdata, skb);8009 ieee80211_tx_skb(sdata, skb);
7982}8010}
@@ -8026,7 +8054,7 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata, · 43 unmodified lines
8026 struct ieee80211_local *local = sdata->local;8054 struct ieee80211_local *local = sdata->local;
8027 struct ieee80211_mgmt *mgmt;8055 struct ieee80211_mgmt *mgmt;
8028 struct sk_buff *skb;8056 struct sk_buff *skb;
8029 int hdr_len = offsetofend(struct ieee80211_mgmt, u.action.u.ttlm_res);8057 int hdr_len = IEEE80211_MIN_ACTION_SIZE(ttlm_res);
8030 int ttlm_max_len = 2 + 1 + sizeof(struct ieee80211_ttlm_elem) + 1 +8058 int ttlm_max_len = 2 + 1 + sizeof(struct ieee80211_ttlm_elem) + 1 +
8031 2 * 2 * IEEE80211_TTLM_NUM_TIDS;8059 2 * 2 * IEEE80211_TTLM_NUM_TIDS;
8032 u16 status_code;8060 u16 status_code;
@@ -8044,9 +8072,8 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata, · 11 unmodified lines
8044 memcpy(mgmt->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN);8072 memcpy(mgmt->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN);
8045 8073
8046 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;8074 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;
8047 mgmt->u.action.u.ttlm_res.action_code =8075 mgmt->u.action.action_code = WLAN_PROTECTED_EHT_ACTION_TTLM_RES;
8048 WLAN_PROTECTED_EHT_ACTION_TTLM_RES;8076 mgmt->u.action.ttlm_res.dialog_token = dialog_token;
8049 mgmt->u.action.u.ttlm_res.dialog_token = dialog_token;
8050 switch (ttlm_res) {8077 switch (ttlm_res) {
8051 default:8078 default:
8052 WARN_ON(1);8079 WARN_ON(1);
@@ -8063,7 +8090,7 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata, · 10 unmodified lines
8063 break;8090 break;
8064 }8091 }
8065 8092
8066 mgmt->u.action.u.ttlm_res.status_code = cpu_to_le16(status_code);8093 mgmt->u.action.ttlm_res.status_code = cpu_to_le16(status_code);
8067 ieee80211_tx_skb(sdata, skb);8094 ieee80211_tx_skb(sdata, skb);
8068}8095}
8069 8096
@@ -8163,10 +8190,9 @@ void ieee80211_process_neg_ttlm_req(struct ieee80211_sub_if_data *sdata, · 93 unmodified lines
8163 if (!ieee80211_vif_is_mld(&sdata->vif))8190 if (!ieee80211_vif_is_mld(&sdata->vif))
8164 return;8191 return;
8165 8192
8166 dialog_token = mgmt->u.action.u.ttlm_req.dialog_token;8193 dialog_token = mgmt->u.action.ttlm_req.dialog_token;
8167 ies_len = len - offsetof(struct ieee80211_mgmt,8194 ies_len = len - IEEE80211_MIN_ACTION_SIZE(ttlm_req);
8168 u.action.u.ttlm_req.variable);8195 elems = ieee802_11_parse_elems(mgmt->u.action.ttlm_req.variable,
8169 elems = ieee802_11_parse_elems(mgmt->u.action.u.ttlm_req.variable,
8170 ies_len,8196 ies_len,
8171 IEEE80211_FTYPE_MGMT |8197 IEEE80211_FTYPE_MGMT |
8172 IEEE80211_STYPE_ACTION,8198 IEEE80211_STYPE_ACTION,
@@ -8217,8 +8243,7 @@ void ieee80211_process_neg_ttlm_res(struct ieee80211_sub_if_data *sdata, · 44 unmodified lines
8217 struct ieee80211_mgmt *mgmt, size_t len)8243 struct ieee80211_mgmt *mgmt, size_t len)
8218{8244{
8219 if (!ieee80211_vif_is_mld(&sdata->vif) ||8245 if (!ieee80211_vif_is_mld(&sdata->vif) ||
8220 mgmt->u.action.u.ttlm_req.dialog_token !=8246 mgmt->u.action.ttlm_res.dialog_token != sdata->u.mgd.dialog_token_alloc)
8221 sdata->u.mgd.dialog_token_alloc)
8222 return;8247 return;
8223 8248
8224 wiphy_delayed_work_cancel(sdata->local->hw.wiphy,8249 wiphy_delayed_work_cancel(sdata->local->hw.wiphy,
@@ -8232,7 +8257,7 @@ void ieee80211_process_neg_ttlm_res(struct ieee80211_sub_if_data *sdata, · 7 unmodified lines
8232 * This can be better implemented in the future, to handle request8257 * This can be better implemented in the future, to handle request
8233 * rejections.8258 * rejections.
8234 */8259 */
8235 if (le16_to_cpu(mgmt->u.action.u.ttlm_res.status_code) != WLAN_STATUS_SUCCESS)8260 if (le16_to_cpu(mgmt->u.action.ttlm_res.status_code) != WLAN_STATUS_SUCCESS)
8236 __ieee80211_disconnect(sdata);8261 __ieee80211_disconnect(sdata);
8237}8262}
8238 8263
@@ -8265,12 +8290,11 @@ static void ieee80211_teardown_ttlm_work(struct wiphy *wiphy, · 26 unmodified lines
8265 8290
8266void ieee80211_send_teardown_neg_ttlm(struct ieee80211_vif *vif)8291void ieee80211_send_teardown_neg_ttlm(struct ieee80211_vif *vif)
8267{8292{
8293 int frame_len = IEEE80211_MIN_ACTION_SIZE(ttlm_tear_down);
8268 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);8294 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
8269 struct ieee80211_local *local = sdata->local;8295 struct ieee80211_local *local = sdata->local;
8270 struct ieee80211_mgmt *mgmt;8296 struct ieee80211_mgmt *mgmt;
8271 struct sk_buff *skb;8297 struct sk_buff *skb;
8272 int frame_len = offsetofend(struct ieee80211_mgmt,
8273 u.action.u.ttlm_tear_down);
8274 struct ieee80211_tx_info *info;8298 struct ieee80211_tx_info *info;
8275 8299
8276 skb = dev_alloc_skb(local->hw.extra_tx_headroom + frame_len);8300 skb = dev_alloc_skb(local->hw.extra_tx_headroom + frame_len);
@@ -8286,8 +8310,7 @@ void ieee80211_send_teardown_neg_ttlm(struct ieee80211_vif *vif) · 9 unmodified lines
8286 memcpy(mgmt->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN);8310 memcpy(mgmt->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN);
8287 8311
8288 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;8312 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;
8289 mgmt->u.action.u.ttlm_tear_down.action_code =8313 mgmt->u.action.action_code = WLAN_PROTECTED_EHT_ACTION_TTLM_TEARDOWN;
8290 WLAN_PROTECTED_EHT_ACTION_TTLM_TEARDOWN;
8291 8314
8292 info = IEEE80211_SKB_CB(skb);8315 info = IEEE80211_SKB_CB(skb);
8293 info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;8316 info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
@@ -8370,13 +8393,13 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, · 76 unmodified lines
8370 case WLAN_CATEGORY_SPECTRUM_MGMT:8393 case WLAN_CATEGORY_SPECTRUM_MGMT:
8371 ies_len = skb->len -8394 ies_len = skb->len -
8372 offsetof(struct ieee80211_mgmt,8395 offsetof(struct ieee80211_mgmt,
8373 u.action.u.chan_switch.variable);8396 u.action.chan_switch.variable);
8374 8397
8375 if (ies_len < 0)8398 if (ies_len < 0)
8376 break;8399 break;
8377 8400
8378 /* CSA IE cannot be overridden, no need for BSSID */8401 /* CSA IE cannot be overridden, no need for BSSID */
8379 elems = ieee802_11_parse_elems(mgmt->u.action.u.chan_switch.variable,8402 elems = ieee802_11_parse_elems(mgmt->u.action.chan_switch.variable,
8380 ies_len,8403 ies_len,
8381 IEEE80211_FTYPE_MGMT |8404 IEEE80211_FTYPE_MGMT |
8382 IEEE80211_STYPE_ACTION,8405 IEEE80211_STYPE_ACTION,
@@ -8398,7 +8421,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, · 15 unmodified lines
8398 case WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION:8421 case WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION:
8399 ies_len = skb->len -8422 ies_len = skb->len -
8400 offsetof(struct ieee80211_mgmt,8423 offsetof(struct ieee80211_mgmt,
8401 u.action.u.ext_chan_switch.variable);8424 u.action.ext_chan_switch.variable);
8402 8425
8403 if (ies_len < 0)8426 if (ies_len < 0)
8404 break;8427 break;
@@ -8407,7 +8430,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, · 2 unmodified lines
8407 * extended CSA IE can't be overridden, no need for8430 * extended CSA IE can't be overridden, no need for
8408 * BSSID8431 * BSSID
8409 */8432 */
8410 elems = ieee802_11_parse_elems(mgmt->u.action.u.ext_chan_switch.variable,8433 elems = ieee802_11_parse_elems(mgmt->u.action.ext_chan_switch.variable,
8411 ies_len,8434 ies_len,
8412 IEEE80211_FTYPE_MGMT |8435 IEEE80211_FTYPE_MGMT |
8413 IEEE80211_STYPE_ACTION,8436 IEEE80211_STYPE_ACTION,
@@ -8424,7 +8447,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, · 10 unmodified lines
8424 8447
8425 /* for the handling code pretend it was an IE */8448 /* for the handling code pretend it was an IE */
8426 elems->ext_chansw_ie =8449 elems->ext_chansw_ie =
8427 &mgmt->u.action.u.ext_chan_switch.data;8450 &mgmt->u.action.ext_chan_switch.data;
8428 8451
8429 ieee80211_sta_process_chanswitch(link,8452 ieee80211_sta_process_chanswitch(link,
8430 rx_status->mactime,8453 rx_status->mactime,
@@ -10426,25 +10449,25 @@ void ieee80211_process_ml_reconf_resp(struct ieee80211_sub_if_data *sdata, · 1995 unmodified lines
10426 u8 *pos;10449 u8 *pos;
10427 10450
10428 if (!ieee80211_vif_is_mld(&sdata->vif) ||10451 if (!ieee80211_vif_is_mld(&sdata->vif) ||
10429 len < offsetofend(typeof(*mgmt), u.action.u.ml_reconf_resp) ||10452 len < IEEE80211_MIN_ACTION_SIZE(ml_reconf_resp) ||
10430 mgmt->u.action.u.ml_reconf_resp.dialog_token !=10453 mgmt->u.action.ml_reconf_resp.dialog_token !=
10431 sdata->u.mgd.reconf.dialog_token ||10454 sdata->u.mgd.reconf.dialog_token ||
10432 !sta_changed_links)10455 !sta_changed_links)
10433 return;10456 return;
10434 10457
10435 pos = mgmt->u.action.u.ml_reconf_resp.variable;10458 pos = mgmt->u.action.ml_reconf_resp.variable;
10436 len -= offsetofend(typeof(*mgmt), u.action.u.ml_reconf_resp);10459 len -= offsetofend(typeof(*mgmt), u.action.ml_reconf_resp);
10437 10460
10438 /* each status duple is 3 octets */10461 /* each status duple is 3 octets */
10439 if (len < mgmt->u.action.u.ml_reconf_resp.count * 3) {10462 if (len < mgmt->u.action.ml_reconf_resp.count * 3) {
10440 sdata_info(sdata,10463 sdata_info(sdata,
10441 "mlo: reconf: unexpected len=%zu, count=%u\n",10464 "mlo: reconf: unexpected len=%zu, count=%u\n",
10442 len, mgmt->u.action.u.ml_reconf_resp.count);10465 len, mgmt->u.action.ml_reconf_resp.count);
10443 goto disconnect;10466 goto disconnect;
10444 }10467 }
10445 10468
10446 link_mask = sta_changed_links;10469 link_mask = sta_changed_links;
10447 for (i = 0; i < mgmt->u.action.u.ml_reconf_resp.count; i++) {10470 for (i = 0; i < mgmt->u.action.ml_reconf_resp.count; i++) {
10448 u16 status = get_unaligned_le16(pos + 1);10471 u16 status = get_unaligned_le16(pos + 1);
10449 10472
10450 link_id = *pos;10473 link_id = *pos;
@@ -10729,8 +10752,7 @@ ieee80211_build_ml_reconf_req(struct ieee80211_sub_if_data *sdata, · 278 unmodified lines
10729 return NULL;10752 return NULL;
10730 10753
10731 skb_reserve(skb, local->hw.extra_tx_headroom);10754 skb_reserve(skb, local->hw.extra_tx_headroom);
10732 mgmt = skb_put_zero(skb, offsetofend(struct ieee80211_mgmt,10755 mgmt = skb_put_zero(skb, IEEE80211_MIN_ACTION_SIZE(ml_reconf_req));
10733 u.action.u.ml_reconf_req));
10734 10756
10735 /* Add the MAC header */10757 /* Add the MAC header */
10736 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |10758 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
@@ -10741,12 +10763,11 @@ ieee80211_build_ml_reconf_req(struct ieee80211_sub_if_data *sdata, · 4 unmodified lines
10741 10763
10742 /* Add the action frame fixed fields */10764 /* Add the action frame fixed fields */
10743 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;10765 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;
10744 mgmt->u.action.u.ml_reconf_req.action_code =10766 mgmt->u.action.action_code = WLAN_PROTECTED_EHT_ACTION_LINK_RECONFIG_REQ;
10745 WLAN_PROTECTED_EHT_ACTION_LINK_RECONFIG_REQ;
10746 10767
10747 /* allocate a dialog token and store it */10768 /* allocate a dialog token and store it */
10748 sdata->u.mgd.reconf.dialog_token = ++sdata->u.mgd.dialog_token_alloc;10769 sdata->u.mgd.reconf.dialog_token = ++sdata->u.mgd.dialog_token_alloc;
10749 mgmt->u.action.u.ml_reconf_req.dialog_token =10770 mgmt->u.action.ml_reconf_req.dialog_token =
10750 sdata->u.mgd.reconf.dialog_token;10771 sdata->u.mgd.reconf.dialog_token;
10751 10772
10752 /* Add the ML reconfiguration element and the common information */10773 /* Add the ML reconfiguration element and the common information */
@@ -11116,11 +11137,10 @@ static bool ieee80211_mgd_epcs_supp(struct ieee80211_sub_if_data *sdata) · 363 unmodified lines
11116 11137
11117int ieee80211_mgd_set_epcs(struct ieee80211_sub_if_data *sdata, bool enable)11138int ieee80211_mgd_set_epcs(struct ieee80211_sub_if_data *sdata, bool enable)
11118{11139{
11140 int frame_len = IEEE80211_MIN_ACTION_SIZE(epcs) + (enable ? 1 : 0);
11119 struct ieee80211_local *local = sdata->local;11141 struct ieee80211_local *local = sdata->local;
11120 struct ieee80211_mgmt *mgmt;11142 struct ieee80211_mgmt *mgmt;
11121 struct sk_buff *skb;11143 struct sk_buff *skb;
11122 int frame_len = offsetofend(struct ieee80211_mgmt,
11123 u.action.u.epcs) + (enable ? 1 : 0);
11124 11144
11125 if (!ieee80211_mgd_epcs_supp(sdata))11145 if (!ieee80211_mgd_epcs_supp(sdata))
11126 return -EINVAL;11146 return -EINVAL;
@@ -11149,15 +11169,15 @@ int ieee80211_mgd_set_epcs(struct ieee80211_sub_if_data *sdata, bool enable) · 22 unmodified lines
11149 11169
11150 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;11170 mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT;
11151 if (enable) {11171 if (enable) {
11152 u8 *pos = mgmt->u.action.u.epcs.variable;11172 u8 *pos = mgmt->u.action.epcs.variable;
11153 11173
11154 mgmt->u.action.u.epcs.action_code =11174 mgmt->u.action.action_code =
11155 WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_REQ;11175 WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_REQ;
11156 11176
11157 *pos = ++sdata->u.mgd.dialog_token_alloc;11177 *pos = ++sdata->u.mgd.dialog_token_alloc;
11158 sdata->u.mgd.epcs.dialog_token = *pos;11178 sdata->u.mgd.epcs.dialog_token = *pos;
11159 } else {11179 } else {
11160 mgmt->u.action.u.epcs.action_code =11180 mgmt->u.action.action_code =
11161 WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_TEARDOWN;11181 WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_TEARDOWN;
11162 11182
11163 ieee80211_epcs_teardown(sdata);11183 ieee80211_epcs_teardown(sdata);
@@ -11246,7 +11266,7 @@ void ieee80211_process_epcs_ena_resp(struct ieee80211_sub_if_data *sdata, · 82 unmodified lines
11246 return;11266 return;
11247 11267
11248 /* Handle dialog token and status code */11268 /* Handle dialog token and status code */
11249 pos = mgmt->u.action.u.epcs.variable;11269 pos = mgmt->u.action.epcs.variable;
11250 dialog_token = *pos;11270 dialog_token = *pos;
11251 status_code = get_unaligned_le16(pos + 1);11271 status_code = get_unaligned_le16(pos + 1);
11252 11272
@@ -11268,8 +11288,7 @@ void ieee80211_process_epcs_ena_resp(struct ieee80211_sub_if_data *sdata, · 15 unmodified lines
11268 return;11288 return;
11269 11289
11270 pos += IEEE80211_EPCS_ENA_RESP_BODY_LEN;11290 pos += IEEE80211_EPCS_ENA_RESP_BODY_LEN;
11271 ies_len = len - offsetof(struct ieee80211_mgmt,11291 ies_len = len - IEEE80211_MIN_ACTION_SIZE(epcs) -
11272 u.action.u.epcs.variable) -
11273 IEEE80211_EPCS_ENA_RESP_BODY_LEN;11292 IEEE80211_EPCS_ENA_RESP_BODY_LEN;
11274 11293
11275 elems = ieee802_11_parse_elems(pos, ies_len,11294 elems = ieee802_11_parse_elems(pos, ies_len,
net/mac80211/rx.c+60−74
@@ -274,7 +274,7 @@ static void ieee80211_handle_mu_mimo_mon(struct ieee80211_sub_if_data *sdata, · 273 unmodified lines
274 if (!sdata)274 if (!sdata)
275 return;275 return;
276 276
277 BUILD_BUG_ON(sizeof(action) != IEEE80211_MIN_ACTION_SIZE + 1);277 BUILD_BUG_ON(sizeof(action) != IEEE80211_MIN_ACTION_SIZE(action_code));
278 278
279 if (skb->len < rtap_space + sizeof(action) +279 if (skb->len < rtap_space + sizeof(action) +
280 VHT_MUMIMO_GROUPS_DATA_LEN)280 VHT_MUMIMO_GROUPS_DATA_LEN)
@@ -1162,7 +1162,7 @@ static ieee80211_rx_result ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx) · 881 unmodified lines
1162 u8 category;1162 u8 category;
1163 1163
1164 /* make sure category field is present */1164 /* make sure category field is present */
1165 if (rx->skb->len < IEEE80211_MIN_ACTION_SIZE)1165 if (rx->skb->len < IEEE80211_MIN_ACTION_SIZE(category))
1166 return RX_DROP_U_RUNT_ACTION;1166 return RX_DROP_U_RUNT_ACTION;
1167 1167
1168 mgmt = (struct ieee80211_mgmt *)hdr;1168 mgmt = (struct ieee80211_mgmt *)hdr;
@@ -1475,7 +1475,9 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx, · 306 unmodified lines
1475 !test_and_set_bit(tid, rx->sta->ampdu_mlme.unexpected_agg))1475 !test_and_set_bit(tid, rx->sta->ampdu_mlme.unexpected_agg))
1476 ieee80211_send_delba(rx->sdata, rx->sta->sta.addr, tid,1476 ieee80211_send_delba(rx->sdata, rx->sta->sta.addr, tid,
1477 WLAN_BACK_RECIPIENT,1477 WLAN_BACK_RECIPIENT,
1478 WLAN_REASON_QSTA_REQUIRE_SETUP);1478 WLAN_REASON_QSTA_REQUIRE_SETUP,
1479 ieee80211_s1g_use_ndp_ba(rx->sdata,
1480 rx->sta));
1479 goto dont_reorder;1481 goto dont_reorder;
1480 }1482 }
1481 1483
@@ -3372,7 +3374,9 @@ ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx, struct sk_buff_head *frames) · 1890 unmodified lines
3372 !test_and_set_bit(tid, rx->sta->ampdu_mlme.unexpected_agg))3374 !test_and_set_bit(tid, rx->sta->ampdu_mlme.unexpected_agg))
3373 ieee80211_send_delba(rx->sdata, rx->sta->sta.addr, tid,3375 ieee80211_send_delba(rx->sdata, rx->sta->sta.addr, tid,
3374 WLAN_BACK_RECIPIENT,3376 WLAN_BACK_RECIPIENT,
3375 WLAN_REASON_QSTA_REQUIRE_SETUP);3377 WLAN_REASON_QSTA_REQUIRE_SETUP,
3378 ieee80211_s1g_use_ndp_ba(rx->sdata,
3379 rx->sta));
3376 3380
3377 tid_agg_rx = rcu_dereference(rx->sta->ampdu_mlme.tid_rx[tid]);3381 tid_agg_rx = rcu_dereference(rx->sta->ampdu_mlme.tid_rx[tid]);
3378 if (!tid_agg_rx)3382 if (!tid_agg_rx)
@@ -3422,7 +3426,7 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata, · 43 unmodified lines
3422 return;3426 return;
3423 }3427 }
3424 3428
3425 if (len < 24 + 1 + sizeof(resp->u.action.u.sa_query)) {3429 if (len < IEEE80211_MIN_ACTION_SIZE(sa_query)) {
3426 /* Too short SA Query request frame */3430 /* Too short SA Query request frame */
3427 return;3431 return;
3428 }3432 }
@@ -3432,17 +3436,16 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata, · 3 unmodified lines
3432 return;3436 return;
3433 3437
3434 skb_reserve(skb, local->hw.extra_tx_headroom);3438 skb_reserve(skb, local->hw.extra_tx_headroom);
3435 resp = skb_put_zero(skb, 24);3439 resp = skb_put_zero(skb, IEEE80211_MIN_ACTION_SIZE(sa_query));
3436 memcpy(resp->da, sdata->vif.cfg.ap_addr, ETH_ALEN);3440 memcpy(resp->da, sdata->vif.cfg.ap_addr, ETH_ALEN);
3437 memcpy(resp->sa, sdata->vif.addr, ETH_ALEN);3441 memcpy(resp->sa, sdata->vif.addr, ETH_ALEN);
3438 memcpy(resp->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN);3442 memcpy(resp->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN);
3439 resp->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |3443 resp->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
3440 IEEE80211_STYPE_ACTION);3444 IEEE80211_STYPE_ACTION);
3441 skb_put(skb, 1 + sizeof(resp->u.action.u.sa_query));
3442 resp->u.action.category = WLAN_CATEGORY_SA_QUERY;3445 resp->u.action.category = WLAN_CATEGORY_SA_QUERY;
3443 resp->u.action.u.sa_query.action = WLAN_ACTION_SA_QUERY_RESPONSE;3446 resp->u.action.action_code = WLAN_ACTION_SA_QUERY_RESPONSE;
3444 memcpy(resp->u.action.u.sa_query.trans_id,3447 memcpy(resp->u.action.sa_query.trans_id,
3445 mgmt->u.action.u.sa_query.trans_id,3448 mgmt->u.action.sa_query.trans_id,
3446 WLAN_SA_QUERY_TR_ID_LEN);3449 WLAN_SA_QUERY_TR_ID_LEN);
3447 3450
3448 ieee80211_tx_skb(sdata, skb);3451 ieee80211_tx_skb(sdata, skb);
@@ -3516,7 +3519,7 @@ ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx) · 67 unmodified lines
3516 3519
3517 /* drop too small action frames */3520 /* drop too small action frames */
3518 if (ieee80211_is_action(mgmt->frame_control) &&3521 if (ieee80211_is_action(mgmt->frame_control) &&
3519 rx->skb->len < IEEE80211_MIN_ACTION_SIZE)3522 rx->skb->len < IEEE80211_MIN_ACTION_SIZE(category))
3520 return RX_DROP_U_RUNT_ACTION;3523 return RX_DROP_U_RUNT_ACTION;
3521 3524
3522 /* Drop non-broadcast Beacon frames */3525 /* Drop non-broadcast Beacon frames */
@@ -3565,29 +3568,28 @@ ieee80211_process_rx_twt_action(struct ieee80211_rx_data *rx) · 42 unmodified lines
3565 if (!rx->sta)3568 if (!rx->sta)
3566 return false;3569 return false;
3567 3570
3568 switch (mgmt->u.action.u.s1g.action_code) {3571 switch (mgmt->u.action.action_code) {
3569 case WLAN_S1G_TWT_SETUP: {3572 case WLAN_S1G_TWT_SETUP: {
3570 struct ieee80211_twt_setup *twt;3573 struct ieee80211_twt_setup *twt;
3571 3574
3572 if (rx->skb->len < IEEE80211_MIN_ACTION_SIZE +3575 if (rx->skb->len < IEEE80211_MIN_ACTION_SIZE(action_code) +
3573 1 + /* action code */
3574 sizeof(struct ieee80211_twt_setup) +3576 sizeof(struct ieee80211_twt_setup) +
3575 2 /* TWT req_type agrt */)3577 2 /* TWT req_type agrt */)
3576 break;3578 break;
3577 3579
3578 twt = (void *)mgmt->u.action.u.s1g.variable;3580 twt = (void *)mgmt->u.action.s1g.variable;
3579 if (twt->element_id != WLAN_EID_S1G_TWT)3581 if (twt->element_id != WLAN_EID_S1G_TWT)
3580 break;3582 break;
3581 3583
3582 if (rx->skb->len < IEEE80211_MIN_ACTION_SIZE +3584 if (rx->skb->len < IEEE80211_MIN_ACTION_SIZE(action_code) +
3583 4 + /* action code + token + tlv */3585 3 + /* token + tlv */
3584 twt->length)3586 twt->length)
3585 break;3587 break;
3586 3588
3587 return true; /* queue the frame */3589 return true; /* queue the frame */
3588 }3590 }
3589 case WLAN_S1G_TWT_TEARDOWN:3591 case WLAN_S1G_TWT_TEARDOWN:
3590 if (rx->skb->len < IEEE80211_MIN_ACTION_SIZE + 2)3592 if (rx->skb->len < IEEE80211_MIN_ACTION_SIZE(action_code) + 1)
3591 break;3593 break;
3592 3594
3593 return true; /* queue the frame */3595 return true; /* queue the frame */
@@ -3632,10 +3634,10 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 38 unmodified lines
3632 break;3634 break;
3633 3635
3634 /* verify action & smps_control/chanwidth are present */3636 /* verify action & smps_control/chanwidth are present */
3635 if (len < IEEE80211_MIN_ACTION_SIZE + 2)3637 if (len < IEEE80211_MIN_ACTION_SIZE(ht_smps))
3636 goto invalid;3638 goto invalid;
3637 3639
3638 switch (mgmt->u.action.u.ht_smps.action) {3640 switch (mgmt->u.action.action_code) {
3639 case WLAN_HT_ACTION_SMPS: {3641 case WLAN_HT_ACTION_SMPS: {
3640 struct ieee80211_supported_band *sband;3642 struct ieee80211_supported_band *sband;
3641 enum ieee80211_smps_mode smps_mode;3643 enum ieee80211_smps_mode smps_mode;
@@ -3646,7 +3648,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 4 unmodified lines
3646 goto handled;3648 goto handled;
3647 3649
3648 /* convert to HT capability */3650 /* convert to HT capability */
3649 switch (mgmt->u.action.u.ht_smps.smps_control) {3651 switch (mgmt->u.action.ht_smps.smps_control) {
3650 case WLAN_HT_SMPS_CONTROL_DISABLED:3652 case WLAN_HT_SMPS_CONTROL_DISABLED:
3651 smps_mode = IEEE80211_SMPS_OFF;3653 smps_mode = IEEE80211_SMPS_OFF;
3652 break;3654 break;
@@ -3679,7 +3681,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 26 unmodified lines
3679 goto handled;3681 goto handled;
3680 }3682 }
3681 case WLAN_HT_ACTION_NOTIFY_CHANWIDTH: {3683 case WLAN_HT_ACTION_NOTIFY_CHANWIDTH: {
3682 u8 chanwidth = mgmt->u.action.u.ht_notify_cw.chanwidth;3684 u8 chanwidth = mgmt->u.action.ht_notify_cw.chanwidth;
3683 3685
3684 if (chanwidth != IEEE80211_HT_CHANWIDTH_20MHZ &&3686 if (chanwidth != IEEE80211_HT_CHANWIDTH_20MHZ &&
3685 chanwidth != IEEE80211_HT_CHANWIDTH_ANY)3687 chanwidth != IEEE80211_HT_CHANWIDTH_ANY)
@@ -3699,7 +3701,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 13 unmodified lines
3699 break;3701 break;
3700 case WLAN_CATEGORY_PUBLIC:3702 case WLAN_CATEGORY_PUBLIC:
3701 case WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION:3703 case WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION:
3702 if (len < IEEE80211_MIN_ACTION_SIZE + 1)3704 if (len < IEEE80211_MIN_ACTION_SIZE(action_code))
3703 goto invalid;3705 goto invalid;
3704 if (sdata->vif.type != NL80211_IFTYPE_STATION)3706 if (sdata->vif.type != NL80211_IFTYPE_STATION)
3705 break;3707 break;
@@ -3707,11 +3709,10 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 1 unmodified line
3707 break;3709 break;
3708 if (!ether_addr_equal(mgmt->bssid, sdata->deflink.u.mgd.bssid))3710 if (!ether_addr_equal(mgmt->bssid, sdata->deflink.u.mgd.bssid))
3709 break;3711 break;
3710 if (mgmt->u.action.u.ext_chan_switch.action_code !=3712 if (mgmt->u.action.action_code !=
3711 WLAN_PUB_ACTION_EXT_CHANSW_ANN)3713 WLAN_PUB_ACTION_EXT_CHANSW_ANN)
3712 break;3714 break;
3713 if (len < offsetof(struct ieee80211_mgmt,3715 if (len < IEEE80211_MIN_ACTION_SIZE(ext_chan_switch))
3714 u.action.u.ext_chan_switch.variable))
3715 goto invalid;3716 goto invalid;
3716 goto queue;3717 goto queue;
3717 case WLAN_CATEGORY_VHT:3718 case WLAN_CATEGORY_VHT:
@@ -3723,18 +3724,18 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 5 unmodified lines
3723 break;3724 break;
3724 3725
3725 /* verify action code is present */3726 /* verify action code is present */
3726 if (len < IEEE80211_MIN_ACTION_SIZE + 1)3727 if (len < IEEE80211_MIN_ACTION_SIZE(action_code))
3727 goto invalid;3728 goto invalid;
3728 3729
3729 switch (mgmt->u.action.u.vht_opmode_notif.action_code) {3730 switch (mgmt->u.action.action_code) {
3730 case WLAN_VHT_ACTION_OPMODE_NOTIF: {3731 case WLAN_VHT_ACTION_OPMODE_NOTIF: {
3731 /* verify opmode is present */3732 /* verify opmode is present */
3732 if (len < IEEE80211_MIN_ACTION_SIZE + 2)3733 if (len < IEEE80211_MIN_ACTION_SIZE(vht_opmode_notif))
3733 goto invalid;3734 goto invalid;
3734 goto queue;3735 goto queue;
3735 }3736 }
3736 case WLAN_VHT_ACTION_GROUPID_MGMT: {3737 case WLAN_VHT_ACTION_GROUPID_MGMT: {
3737 if (len < IEEE80211_MIN_ACTION_SIZE + 25)3738 if (len < IEEE80211_MIN_ACTION_SIZE(vht_group_notif))
3738 goto invalid;3739 goto invalid;
3739 goto queue;3740 goto queue;
3740 }3741 }
@@ -3751,23 +3752,23 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 10 unmodified lines
3751 break;3752 break;
3752 3753
3753 /* verify action_code is present */3754 /* verify action_code is present */
3754 if (len < IEEE80211_MIN_ACTION_SIZE + 1)3755 if (len < IEEE80211_MIN_ACTION_SIZE(action_code))
3755 break;3756 break;
3756 3757
3757 switch (mgmt->u.action.u.addba_req.action_code) {3758 switch (mgmt->u.action.action_code) {
3758 case WLAN_ACTION_ADDBA_REQ:3759 case WLAN_ACTION_ADDBA_REQ:
3759 if (len < (IEEE80211_MIN_ACTION_SIZE +3760 case WLAN_ACTION_NDP_ADDBA_REQ:
3760 sizeof(mgmt->u.action.u.addba_req)))3761 if (len < IEEE80211_MIN_ACTION_SIZE(addba_req))
3761 goto invalid;3762 goto invalid;
3762 break;3763 break;
3763 case WLAN_ACTION_ADDBA_RESP:3764 case WLAN_ACTION_ADDBA_RESP:
3764 if (len < (IEEE80211_MIN_ACTION_SIZE +3765 case WLAN_ACTION_NDP_ADDBA_RESP:
3765 sizeof(mgmt->u.action.u.addba_resp)))3766 if (len < IEEE80211_MIN_ACTION_SIZE(addba_resp))
3766 goto invalid;3767 goto invalid;
3767 break;3768 break;
3768 case WLAN_ACTION_DELBA:3769 case WLAN_ACTION_DELBA:
3769 if (len < (IEEE80211_MIN_ACTION_SIZE +3770 case WLAN_ACTION_NDP_DELBA:
3770 sizeof(mgmt->u.action.u.delba)))3771 if (len < IEEE80211_MIN_ACTION_SIZE(delba))
3771 goto invalid;3772 goto invalid;
3772 break;3773 break;
3773 default:3774 default:
@@ -3777,16 +3778,15 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 3 unmodified lines
3777 goto queue;3778 goto queue;
3778 case WLAN_CATEGORY_SPECTRUM_MGMT:3779 case WLAN_CATEGORY_SPECTRUM_MGMT:
3779 /* verify action_code is present */3780 /* verify action_code is present */
3780 if (len < IEEE80211_MIN_ACTION_SIZE + 1)3781 if (len < IEEE80211_MIN_ACTION_SIZE(action_code))
3781 break;3782 break;
3782 3783
3783 switch (mgmt->u.action.u.measurement.action_code) {3784 switch (mgmt->u.action.action_code) {
3784 case WLAN_ACTION_SPCT_MSR_REQ:3785 case WLAN_ACTION_SPCT_MSR_REQ:
3785 if (status->band != NL80211_BAND_5GHZ)3786 if (status->band != NL80211_BAND_5GHZ)
3786 break;3787 break;
3787 3788
3788 if (len < (IEEE80211_MIN_ACTION_SIZE +3789 if (len < IEEE80211_MIN_ACTION_SIZE(measurement))
3789 sizeof(mgmt->u.action.u.measurement)))
3790 break;3790 break;
3791 3791
3792 if (sdata->vif.type != NL80211_IFTYPE_STATION)3792 if (sdata->vif.type != NL80211_IFTYPE_STATION)
@@ -3796,8 +3796,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 3 unmodified lines
3796 goto handled;3796 goto handled;
3797 case WLAN_ACTION_SPCT_CHL_SWITCH: {3797 case WLAN_ACTION_SPCT_CHL_SWITCH: {
3798 u8 *bssid;3798 u8 *bssid;
3799 if (len < (IEEE80211_MIN_ACTION_SIZE +3799 if (len < IEEE80211_MIN_ACTION_SIZE(chan_switch))
3800 sizeof(mgmt->u.action.u.chan_switch)))
3801 break;3800 break;
3802 3801
3803 if (sdata->vif.type != NL80211_IFTYPE_STATION &&3802 if (sdata->vif.type != NL80211_IFTYPE_STATION &&
@@ -3822,11 +3821,10 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 18 unmodified lines
3822 }3821 }
3823 break;3822 break;
3824 case WLAN_CATEGORY_SELF_PROTECTED:3823 case WLAN_CATEGORY_SELF_PROTECTED:
3825 if (len < (IEEE80211_MIN_ACTION_SIZE +3824 if (len < IEEE80211_MIN_ACTION_SIZE(self_prot))
3826 sizeof(mgmt->u.action.u.self_prot.action_code)))
3827 break;3825 break;
3828 3826
3829 switch (mgmt->u.action.u.self_prot.action_code) {3827 switch (mgmt->u.action.action_code) {
3830 case WLAN_SP_MESH_PEERING_OPEN:3828 case WLAN_SP_MESH_PEERING_OPEN:
3831 case WLAN_SP_MESH_PEERING_CLOSE:3829 case WLAN_SP_MESH_PEERING_CLOSE:
3832 case WLAN_SP_MESH_PEERING_CONFIRM:3830 case WLAN_SP_MESH_PEERING_CONFIRM:
@@ -3844,8 +3842,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 11 unmodified lines
3844 }3842 }
3845 break;3843 break;
3846 case WLAN_CATEGORY_MESH_ACTION:3844 case WLAN_CATEGORY_MESH_ACTION:
3847 if (len < (IEEE80211_MIN_ACTION_SIZE +3845 if (len < IEEE80211_MIN_ACTION_SIZE(action_code))
3848 sizeof(mgmt->u.action.u.mesh_action.action_code)))
3849 break;3846 break;
3850 3847
3851 if (!ieee80211_vif_is_mesh(&sdata->vif))3848 if (!ieee80211_vif_is_mesh(&sdata->vif))
@@ -3855,11 +3852,10 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 3 unmodified lines
3855 break;3852 break;
3856 goto queue;3853 goto queue;
3857 case WLAN_CATEGORY_S1G:3854 case WLAN_CATEGORY_S1G:
3858 if (len < offsetofend(typeof(*mgmt),3855 if (len < IEEE80211_MIN_ACTION_SIZE(action_code))
3859 u.action.u.s1g.action_code))
3860 break;3856 break;
3861 3857
3862 switch (mgmt->u.action.u.s1g.action_code) {3858 switch (mgmt->u.action.action_code) {
3863 case WLAN_S1G_TWT_SETUP:3859 case WLAN_S1G_TWT_SETUP:
3864 case WLAN_S1G_TWT_TEARDOWN:3860 case WLAN_S1G_TWT_TEARDOWN:
3865 if (ieee80211_process_rx_twt_action(rx))3861 if (ieee80211_process_rx_twt_action(rx))
@@ -3870,33 +3866,29 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 4 unmodified lines
3870 }3866 }
3871 break;3867 break;
3872 case WLAN_CATEGORY_PROTECTED_EHT:3868 case WLAN_CATEGORY_PROTECTED_EHT:
3873 if (len < offsetofend(typeof(*mgmt),3869 if (len < IEEE80211_MIN_ACTION_SIZE(action_code))
3874 u.action.u.ttlm_req.action_code))
3875 break;3870 break;
3876 3871
3877 switch (mgmt->u.action.u.ttlm_req.action_code) {3872 switch (mgmt->u.action.action_code) {
3878 case WLAN_PROTECTED_EHT_ACTION_TTLM_REQ:3873 case WLAN_PROTECTED_EHT_ACTION_TTLM_REQ:
3879 if (sdata->vif.type != NL80211_IFTYPE_STATION)3874 if (sdata->vif.type != NL80211_IFTYPE_STATION)
3880 break;3875 break;
3881 3876
3882 if (len < offsetofend(typeof(*mgmt),3877 if (len < IEEE80211_MIN_ACTION_SIZE(ttlm_req))
3883 u.action.u.ttlm_req))
3884 goto invalid;3878 goto invalid;
3885 goto queue;3879 goto queue;
3886 case WLAN_PROTECTED_EHT_ACTION_TTLM_RES:3880 case WLAN_PROTECTED_EHT_ACTION_TTLM_RES:
3887 if (sdata->vif.type != NL80211_IFTYPE_STATION)3881 if (sdata->vif.type != NL80211_IFTYPE_STATION)
3888 break;3882 break;
3889 3883
3890 if (len < offsetofend(typeof(*mgmt),3884 if (len < IEEE80211_MIN_ACTION_SIZE(ttlm_res))
3891 u.action.u.ttlm_res))
3892 goto invalid;3885 goto invalid;
3893 goto queue;3886 goto queue;
3894 case WLAN_PROTECTED_EHT_ACTION_TTLM_TEARDOWN:3887 case WLAN_PROTECTED_EHT_ACTION_TTLM_TEARDOWN:
3895 if (sdata->vif.type != NL80211_IFTYPE_STATION)3888 if (sdata->vif.type != NL80211_IFTYPE_STATION)
3896 break;3889 break;
3897 3890
3898 if (len < offsetofend(typeof(*mgmt),3891 if (len < IEEE80211_MIN_ACTION_SIZE(ttlm_tear_down))
3899 u.action.u.ttlm_tear_down))
3900 goto invalid;3892 goto invalid;
3901 goto queue;3893 goto queue;
3902 case WLAN_PROTECTED_EHT_ACTION_LINK_RECONFIG_RESP:3894 case WLAN_PROTECTED_EHT_ACTION_LINK_RECONFIG_RESP:
@@ -3906,34 +3898,29 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 3 unmodified lines
3906 /* The reconfiguration response action frame must3898 /* The reconfiguration response action frame must
3907 * least one 'Status Duple' entry (3 octets)3899 * least one 'Status Duple' entry (3 octets)
3908 */3900 */
3909 if (len <3901 if (len < IEEE80211_MIN_ACTION_SIZE(ml_reconf_resp) + 3)
3910 offsetofend(typeof(*mgmt),
3911 u.action.u.ml_reconf_resp) + 3)
3912 goto invalid;3902 goto invalid;
3913 goto queue;3903 goto queue;
3914 case WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_RESP:3904 case WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_RESP:
3915 if (sdata->vif.type != NL80211_IFTYPE_STATION)3905 if (sdata->vif.type != NL80211_IFTYPE_STATION)
3916 break;3906 break;
3917 3907
3918 if (len < offsetofend(typeof(*mgmt),3908 if (len < IEEE80211_MIN_ACTION_SIZE(epcs) +
3919 u.action.u.epcs) +3909 IEEE80211_EPCS_ENA_RESP_BODY_LEN)
3920 IEEE80211_EPCS_ENA_RESP_BODY_LEN)
3921 goto invalid;3910 goto invalid;
3922 goto queue;3911 goto queue;
3923 case WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_TEARDOWN:3912 case WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_TEARDOWN:
3924 if (sdata->vif.type != NL80211_IFTYPE_STATION)3913 if (sdata->vif.type != NL80211_IFTYPE_STATION)
3925 break;3914 break;
3926 3915
3927 if (len < offsetofend(typeof(*mgmt),3916 if (len < IEEE80211_MIN_ACTION_SIZE(epcs))
3928 u.action.u.epcs))
3929 goto invalid;3917 goto invalid;
3930 goto queue;3918 goto queue;
3931 case WLAN_PROTECTED_EHT_ACTION_EML_OP_MODE_NOTIF:3919 case WLAN_PROTECTED_EHT_ACTION_EML_OP_MODE_NOTIF:
3932 if (sdata->vif.type != NL80211_IFTYPE_AP)3920 if (sdata->vif.type != NL80211_IFTYPE_AP)
3933 break;3921 break;
3934 3922
3935 if (len < offsetofend(typeof(*mgmt),3923 if (len < IEEE80211_MIN_ACTION_SIZE(eml_omn))
3936 u.action.u.eml_omn))
3937 goto invalid;3924 goto invalid;
3938 goto queue;3925 goto queue;
3939 default:3926 default:
@@ -4015,11 +4002,10 @@ ieee80211_rx_h_action_post_userspace(struct ieee80211_rx_data *rx) · 75 unmodified lines
4015 4002
4016 switch (mgmt->u.action.category) {4003 switch (mgmt->u.action.category) {
4017 case WLAN_CATEGORY_SA_QUERY:4004 case WLAN_CATEGORY_SA_QUERY:
4018 if (len < (IEEE80211_MIN_ACTION_SIZE +4005 if (len < IEEE80211_MIN_ACTION_SIZE(sa_query))
4019 sizeof(mgmt->u.action.u.sa_query)))
4020 break;4006 break;
4021 4007
4022 switch (mgmt->u.action.u.sa_query.action) {4008 switch (mgmt->u.action.action_code) {
4023 case WLAN_ACTION_SA_QUERY_REQUEST:4009 case WLAN_ACTION_SA_QUERY_REQUEST:
4024 if (sdata->vif.type != NL80211_IFTYPE_STATION)4010 if (sdata->vif.type != NL80211_IFTYPE_STATION)
4025 break;4011 break;
net/mac80211/s1g.c+22−14
@@ -2,7 +2,7 @@ · 1 unmodified line
2/*2/*
3 * S1G handling3 * S1G handling
4 * Copyright(c) 2020 Adapt-IP4 * Copyright(c) 2020 Adapt-IP
5 * Copyright (C) 2023 Intel Corporation5 * Copyright (C) 2023, 2026 Intel Corporation
6 */6 */
7#include <linux/ieee80211.h>7#include <linux/ieee80211.h>
8#include <net/mac80211.h>8#include <net/mac80211.h>
@@ -27,14 +27,14 @@ bool ieee80211_s1g_is_twt_setup(struct sk_buff *skb) · 18 unmodified lines
27 if (likely(mgmt->u.action.category != WLAN_CATEGORY_S1G))27 if (likely(mgmt->u.action.category != WLAN_CATEGORY_S1G))
28 return false;28 return false;
29 29
30 return mgmt->u.action.u.s1g.action_code == WLAN_S1G_TWT_SETUP;30 return mgmt->u.action.action_code == WLAN_S1G_TWT_SETUP;
31}31}
32 32
33static void33static void
34ieee80211_s1g_send_twt_setup(struct ieee80211_sub_if_data *sdata, const u8 *da,34ieee80211_s1g_send_twt_setup(struct ieee80211_sub_if_data *sdata, const u8 *da,
35 const u8 *bssid, struct ieee80211_twt_setup *twt)35 const u8 *bssid, struct ieee80211_twt_setup *twt)
36{36{
37 int len = IEEE80211_MIN_ACTION_SIZE + 4 + twt->length;37 int len = IEEE80211_MIN_ACTION_SIZE(s1g) + 3 + twt->length;
38 struct ieee80211_local *local = sdata->local;38 struct ieee80211_local *local = sdata->local;
39 struct ieee80211_mgmt *mgmt;39 struct ieee80211_mgmt *mgmt;
40 struct sk_buff *skb;40 struct sk_buff *skb;
@@ -52,8 +52,8 @@ ieee80211_s1g_send_twt_setup(struct ieee80211_sub_if_data *sdata, const u8 *da, · 11 unmodified lines
52 memcpy(mgmt->bssid, bssid, ETH_ALEN);52 memcpy(mgmt->bssid, bssid, ETH_ALEN);
53 53
54 mgmt->u.action.category = WLAN_CATEGORY_S1G;54 mgmt->u.action.category = WLAN_CATEGORY_S1G;
55 mgmt->u.action.u.s1g.action_code = WLAN_S1G_TWT_SETUP;55 mgmt->u.action.action_code = WLAN_S1G_TWT_SETUP;
56 memcpy(mgmt->u.action.u.s1g.variable, twt, 3 + twt->length);56 memcpy(mgmt->u.action.s1g.variable, twt, 3 + twt->length);
57 57
58 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |58 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
59 IEEE80211_TX_INTFL_MLME_CONN_TX |59 IEEE80211_TX_INTFL_MLME_CONN_TX |
@@ -71,12 +71,12 @@ ieee80211_s1g_send_twt_teardown(struct ieee80211_sub_if_data *sdata, · 11 unmodified lines
71 u8 *id;71 u8 *id;
72 72
73 skb = dev_alloc_skb(local->hw.extra_tx_headroom +73 skb = dev_alloc_skb(local->hw.extra_tx_headroom +
74 IEEE80211_MIN_ACTION_SIZE + 2);74 IEEE80211_MIN_ACTION_SIZE(s1g) + 1);
75 if (!skb)75 if (!skb)
76 return;76 return;
77 77
78 skb_reserve(skb, local->hw.extra_tx_headroom);78 skb_reserve(skb, local->hw.extra_tx_headroom);
79 mgmt = skb_put_zero(skb, IEEE80211_MIN_ACTION_SIZE + 2);79 mgmt = skb_put_zero(skb, IEEE80211_MIN_ACTION_SIZE(s1g) + 1);
80 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |80 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
81 IEEE80211_STYPE_ACTION);81 IEEE80211_STYPE_ACTION);
82 memcpy(mgmt->da, da, ETH_ALEN);82 memcpy(mgmt->da, da, ETH_ALEN);
@@ -84,8 +84,8 @@ ieee80211_s1g_send_twt_teardown(struct ieee80211_sub_if_data *sdata, · 1 unmodified line
84 memcpy(mgmt->bssid, bssid, ETH_ALEN);84 memcpy(mgmt->bssid, bssid, ETH_ALEN);
85 85
86 mgmt->u.action.category = WLAN_CATEGORY_S1G;86 mgmt->u.action.category = WLAN_CATEGORY_S1G;
87 mgmt->u.action.u.s1g.action_code = WLAN_S1G_TWT_TEARDOWN;87 mgmt->u.action.action_code = WLAN_S1G_TWT_TEARDOWN;
88 id = (u8 *)mgmt->u.action.u.s1g.variable;88 id = (u8 *)mgmt->u.action.s1g.variable;
89 *id = flowid;89 *id = flowid;
90 90
91 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |91 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
@@ -98,7 +98,7 @@ ieee80211_s1g_rx_twt_setup(struct ieee80211_sub_if_data *sdata, · 6 unmodified lines
98 struct sta_info *sta, struct sk_buff *skb)98 struct sta_info *sta, struct sk_buff *skb)
99{99{
100 struct ieee80211_mgmt *mgmt = (void *)skb->data;100 struct ieee80211_mgmt *mgmt = (void *)skb->data;
101 struct ieee80211_twt_setup *twt = (void *)mgmt->u.action.u.s1g.variable;101 struct ieee80211_twt_setup *twt = (void *)mgmt->u.action.s1g.variable;
102 struct ieee80211_twt_params *twt_agrt = (void *)twt->params;102 struct ieee80211_twt_params *twt_agrt = (void *)twt->params;
103 103
104 twt_agrt->req_type &= cpu_to_le16(~IEEE80211_TWT_REQTYPE_REQUEST);104 twt_agrt->req_type &= cpu_to_le16(~IEEE80211_TWT_REQTYPE_REQUEST);
@@ -128,7 +128,7 @@ ieee80211_s1g_rx_twt_teardown(struct ieee80211_sub_if_data *sdata, · 23 unmodified lines
128 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;128 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;
129 129
130 drv_twt_teardown_request(sdata->local, sdata, &sta->sta,130 drv_twt_teardown_request(sdata->local, sdata, &sta->sta,
131 mgmt->u.action.u.s1g.variable[0]);131 mgmt->u.action.s1g.variable[0]);
132}132}
133 133
134static void134static void
@@ -136,7 +136,7 @@ ieee80211_s1g_tx_twt_setup_fail(struct ieee80211_sub_if_data *sdata, · 1 unmodified line
136 struct sta_info *sta, struct sk_buff *skb)136 struct sta_info *sta, struct sk_buff *skb)
137{137{
138 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;138 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;
139 struct ieee80211_twt_setup *twt = (void *)mgmt->u.action.u.s1g.variable;139 struct ieee80211_twt_setup *twt = (void *)mgmt->u.action.s1g.variable;
140 struct ieee80211_twt_params *twt_agrt = (void *)twt->params;140 struct ieee80211_twt_params *twt_agrt = (void *)twt->params;
141 u8 flowid = le16_get_bits(twt_agrt->req_type,141 u8 flowid = le16_get_bits(twt_agrt->req_type,
142 IEEE80211_TWT_REQTYPE_FLOWID);142 IEEE80211_TWT_REQTYPE_FLOWID);
@@ -160,7 +160,7 @@ void ieee80211_s1g_rx_twt_action(struct ieee80211_sub_if_data *sdata, · 17 unmodified lines
160 if (!sta)160 if (!sta)
161 return;161 return;
162 162
163 switch (mgmt->u.action.u.s1g.action_code) {163 switch (mgmt->u.action.action_code) {
164 case WLAN_S1G_TWT_SETUP:164 case WLAN_S1G_TWT_SETUP:
165 ieee80211_s1g_rx_twt_setup(sdata, sta, skb);165 ieee80211_s1g_rx_twt_setup(sdata, sta, skb);
166 break;166 break;
@@ -185,7 +185,7 @@ void ieee80211_s1g_status_twt_action(struct ieee80211_sub_if_data *sdata, · 18 unmodified lines
185 if (!sta)185 if (!sta)
186 return;186 return;
187 187
188 switch (mgmt->u.action.u.s1g.action_code) {188 switch (mgmt->u.action.action_code) {
189 case WLAN_S1G_TWT_SETUP:189 case WLAN_S1G_TWT_SETUP:
190 /* process failed twt setup frames */190 /* process failed twt setup frames */
191 ieee80211_s1g_tx_twt_setup_fail(sdata, sta, skb);191 ieee80211_s1g_tx_twt_setup_fail(sdata, sta, skb);
@@ -220,3 +220,11 @@ void ieee80211_s1g_cap_to_sta_s1g_cap(struct ieee80211_sub_if_data *sdata, · 28 unmodified lines
220 220
221 ieee80211_sta_recalc_aggregates(&link_sta->sta->sta);221 ieee80211_sta_recalc_aggregates(&link_sta->sta->sta);
222}222}
223
224bool ieee80211_s1g_use_ndp_ba(const struct ieee80211_sub_if_data *sdata,
225 const struct sta_info *sta)
226{
227 return sdata->vif.cfg.s1g &&
228 ieee80211_hw_check(&sdata->local->hw, SUPPORTS_NDP_BLOCKACK) &&
229 (sta && sta->sta.deflink.s1g_cap.s1g);
230}
net/mac80211/spectmgmt.c+13−18
@@ -9,7 +9,7 @@ · 8 unmodified lines
9 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>9 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
10 * Copyright 2007-2008, Intel Corporation10 * Copyright 2007-2008, Intel Corporation
11 * Copyright 2008, Johannes Berg <johannes@sipsolutions.net>11 * Copyright 2008, Johannes Berg <johannes@sipsolutions.net>
12 * Copyright (C) 2018, 2020, 2022-2024 Intel Corporation12 * Copyright (C) 2018, 2020, 2022-2024, 2026 Intel Corporation
13 */13 */
14 14
15#include <linux/ieee80211.h>15#include <linux/ieee80211.h>
@@ -409,35 +409,30 @@ static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_da · 393 unmodified lines
409 struct sk_buff *skb;409 struct sk_buff *skb;
410 struct ieee80211_mgmt *msr_report;410 struct ieee80211_mgmt *msr_report;
411 411
412 skb = dev_alloc_skb(sizeof(*msr_report) + local->hw.extra_tx_headroom +412 skb = dev_alloc_skb(IEEE80211_MIN_ACTION_SIZE(measurement) +
413 sizeof(struct ieee80211_msrment_ie));413 local->hw.extra_tx_headroom);
414 if (!skb)414 if (!skb)
415 return;415 return;
416 416
417 skb_reserve(skb, local->hw.extra_tx_headroom);417 skb_reserve(skb, local->hw.extra_tx_headroom);
418 msr_report = skb_put_zero(skb, 24);418 msr_report = skb_put_zero(skb, IEEE80211_MIN_ACTION_SIZE(measurement));
419 memcpy(msr_report->da, da, ETH_ALEN);419 memcpy(msr_report->da, da, ETH_ALEN);
420 memcpy(msr_report->sa, sdata->vif.addr, ETH_ALEN);420 memcpy(msr_report->sa, sdata->vif.addr, ETH_ALEN);
421 memcpy(msr_report->bssid, bssid, ETH_ALEN);421 memcpy(msr_report->bssid, bssid, ETH_ALEN);
422 msr_report->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |422 msr_report->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
423 IEEE80211_STYPE_ACTION);423 IEEE80211_STYPE_ACTION);
424 424
425 skb_put(skb, 1 + sizeof(msr_report->u.action.u.measurement));
426 msr_report->u.action.category = WLAN_CATEGORY_SPECTRUM_MGMT;425 msr_report->u.action.category = WLAN_CATEGORY_SPECTRUM_MGMT;
427 msr_report->u.action.u.measurement.action_code =426 msr_report->u.action.action_code = WLAN_ACTION_SPCT_MSR_RPRT;
428 WLAN_ACTION_SPCT_MSR_RPRT;
429 msr_report->u.action.u.measurement.dialog_token = dialog_token;
430 427
431 msr_report->u.action.u.measurement.element_id = WLAN_EID_MEASURE_REPORT;428 msr_report->u.action.measurement.dialog_token = dialog_token;
432 msr_report->u.action.u.measurement.length =429 msr_report->u.action.measurement.element_id = WLAN_EID_MEASURE_REPORT;
430 msr_report->u.action.measurement.length =
433 sizeof(struct ieee80211_msrment_ie);431 sizeof(struct ieee80211_msrment_ie);
434 432 msr_report->u.action.measurement.msr_elem.token = request_ie->token;
435 memset(&msr_report->u.action.u.measurement.msr_elem, 0,433 msr_report->u.action.measurement.msr_elem.mode |=
436 sizeof(struct ieee80211_msrment_ie));
437 msr_report->u.action.u.measurement.msr_elem.token = request_ie->token;
438 msr_report->u.action.u.measurement.msr_elem.mode |=
439 IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED;434 IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED;
440 msr_report->u.action.u.measurement.msr_elem.type = request_ie->type;435 msr_report->u.action.measurement.msr_elem.type = request_ie->type;
441 436
442 ieee80211_tx_skb(sdata, skb);437 ieee80211_tx_skb(sdata, skb);
443}438}
@@ -454,7 +449,7 @@ void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, · 10 unmodified lines
454 * TODO: Answer basic measurement as unmeasured449 * TODO: Answer basic measurement as unmeasured
455 */450 */
456 ieee80211_send_refuse_measurement_request(sdata,451 ieee80211_send_refuse_measurement_request(sdata,
457 &mgmt->u.action.u.measurement.msr_elem,452 &mgmt->u.action.measurement.msr_elem,
458 mgmt->sa, mgmt->bssid,453 mgmt->sa, mgmt->bssid,
459 mgmt->u.action.u.measurement.dialog_token);454 mgmt->u.action.measurement.dialog_token);
460}455}
net/mac80211/sta_info.h+2−1
@@ -171,6 +171,7 @@ struct sta_info; · 170 unmodified lines
171 * @bar_pending: BAR needs to be re-sent171 * @bar_pending: BAR needs to be re-sent
172 * @amsdu: support A-MSDU within A-MDPU172 * @amsdu: support A-MSDU within A-MDPU
173 * @ssn: starting sequence number of the session173 * @ssn: starting sequence number of the session
174 * @ndp: this session is using NDP Block ACKs
174 *175 *
175 * This structure's lifetime is managed by RCU, assignments to176 * This structure's lifetime is managed by RCU, assignments to
176 * the array holding it must hold the aggregation mutex.177 * the array holding it must hold the aggregation mutex.
@@ -199,6 +200,7 @@ struct tid_ampdu_tx { · 22 unmodified lines
199 u16 failed_bar_ssn;200 u16 failed_bar_ssn;
200 bool bar_pending;201 bool bar_pending;
201 bool amsdu;202 bool amsdu;
203 bool ndp;
202 u8 tid;204 u8 tid;
203};205};
204 206
@@ -510,7 +512,6 @@ struct ieee80211_fragment_cache { · 305 unmodified lines
510 * during finalize512 * during finalize
511 * @debugfs_dir: debug filesystem directory dentry513 * @debugfs_dir: debug filesystem directory dentry
512 * @pub: public (driver visible) link STA data514 * @pub: public (driver visible) link STA data
513 * TODO Move other link params from sta_info as required for MLD operation
514 */515 */
515struct link_sta_info {516struct link_sta_info {
516 u8 addr[ETH_ALEN];517 u8 addr[ETH_ALEN];
net/mac80211/tdls.c+12−17
@@ -6,7 +6,7 @@ · 5 unmodified lines
6 * Copyright 2014, Intel Corporation6 * Copyright 2014, Intel Corporation
7 * Copyright 2014 Intel Mobile Communications GmbH7 * Copyright 2014 Intel Mobile Communications GmbH
8 * Copyright 2015 - 2016 Intel Deutschland GmbH8 * Copyright 2015 - 2016 Intel Deutschland GmbH
9 * Copyright (C) 2019, 2021-2025 Intel Corporation9 * Copyright (C) 2019, 2021-2026 Intel Corporation
10 */10 */
11 11
12#include <linux/ieee80211.h>12#include <linux/ieee80211.h>
@@ -879,28 +879,23 @@ ieee80211_prep_tdls_direct(struct wiphy *wiphy, struct net_device *dev, · 866 unmodified lines
879 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);879 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
880 struct ieee80211_mgmt *mgmt;880 struct ieee80211_mgmt *mgmt;
881 881
882 mgmt = skb_put_zero(skb, 24);882 if (action_code != WLAN_PUB_ACTION_TDLS_DISCOVER_RES)
883 return -EINVAL;
884
885 mgmt = skb_put_zero(skb, IEEE80211_MIN_ACTION_SIZE(tdls_discover_resp));
883 memcpy(mgmt->da, peer, ETH_ALEN);886 memcpy(mgmt->da, peer, ETH_ALEN);
884 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);887 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
885 memcpy(mgmt->bssid, link->u.mgd.bssid, ETH_ALEN);888 memcpy(mgmt->bssid, link->u.mgd.bssid, ETH_ALEN);
886 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |889 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
887 IEEE80211_STYPE_ACTION);890 IEEE80211_STYPE_ACTION);
888 891
889 switch (action_code) {892 mgmt->u.action.category = WLAN_CATEGORY_PUBLIC;
890 case WLAN_PUB_ACTION_TDLS_DISCOVER_RES:893 mgmt->u.action.action_code = WLAN_PUB_ACTION_TDLS_DISCOVER_RES;
891 skb_put(skb, 1 + sizeof(mgmt->u.action.u.tdls_discover_resp));894
892 mgmt->u.action.category = WLAN_CATEGORY_PUBLIC;895 mgmt->u.action.tdls_discover_resp.dialog_token = dialog_token;
893 mgmt->u.action.u.tdls_discover_resp.action_code =896 mgmt->u.action.tdls_discover_resp.capability =
894 WLAN_PUB_ACTION_TDLS_DISCOVER_RES;897 cpu_to_le16(ieee80211_get_tdls_sta_capab(link,
895 mgmt->u.action.u.tdls_discover_resp.dialog_token =898 status_code));
896 dialog_token;
897 mgmt->u.action.u.tdls_discover_resp.capability =
898 cpu_to_le16(ieee80211_get_tdls_sta_capab(link,
899 status_code));
900 break;
901 default:
902 return -EINVAL;
903 }
904 899
905 return 0;900 return 0;
906}901}
net/mac80211/trace.h+41−59
@@ -2,7 +2,7 @@ · 1 unmodified line
2/*2/*
3 * Portions of this file3 * Portions of this file
4 * Copyright(c) 2016-2017 Intel Deutschland GmbH4 * Copyright(c) 2016-2017 Intel Deutschland GmbH
5 * Copyright (C) 2018 - 2024 Intel Corporation5 * Copyright (C) 2018-2024, 2026 Intel Corporation
6 */6 */
7 7
8#if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)8#if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
@@ -37,64 +37,46 @@ · 28 unmodified lines
37#define VIF_PR_FMT " vif:%s(%d%s)"37#define VIF_PR_FMT " vif:%s(%d%s)"
38#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""38#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
39 39
40#define CHANDEF_ENTRY __field(u32, control_freq) \40#define __CHANDEF_ENTRY(n) \
41 __field(u32, freq_offset) \41 __field(u32, n##control_freq) \
42 __field(u32, chan_width) \42 __field(u32, n##freq_offset) \
43 __field(u32, center_freq1) \43 __field(u32, n##chan_width) \
44 __field(u32, freq1_offset) \44 __field(u32, n##center_freq1) \
45 __field(u32, center_freq2)45 __field(u32, n##freq1_offset) \
46#define CHANDEF_ASSIGN(c) \46 __field(u32, n##center_freq2) \
47 __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \47 __field(u16, n##punctured)
48 __entry->freq_offset = (c) ? ((c)->chan ? (c)->chan->freq_offset : 0) : 0; \48#define __CHANDEF_ASSIGN(n, c) \
49 __entry->chan_width = (c) ? (c)->width : 0; \49 __entry->n##control_freq = (c) && (c)->chan ? \
50 __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \50 (c)->chan->center_freq : 0; \
51 __entry->freq1_offset = (c) ? (c)->freq1_offset : 0; \51 __entry->n##freq_offset = (c) && (c)->chan ? \
52 __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;52 (c)->chan->freq_offset : 0; \
53#define CHANDEF_PR_FMT " chandef(%d.%03d MHz,width:%d,center: %d.%03d/%d MHz)"53 __entry->n##chan_width = (c) ? (c)->width : 0; \
54#define CHANDEF_PR_ARG __entry->control_freq, __entry->freq_offset, __entry->chan_width, \54 __entry->n##center_freq1 = (c) ? (c)->center_freq1 : 0; \
55 __entry->center_freq1, __entry->freq1_offset, __entry->center_freq255 __entry->n##freq1_offset = (c) ? (c)->freq1_offset : 0; \
56 56 __entry->n##center_freq2 = (c) ? (c)->center_freq2 : 0; \
57#define MIN_CHANDEF_ENTRY \57 __entry->n##punctured = (c) ? (c)->punctured : 0;
58 __field(u32, min_control_freq) \58#define __CHANDEF_PR_FMT(n) \
59 __field(u32, min_freq_offset) \59 " " #n "(%d.%03d MHz,width:%d,center: %d.%03d/%d MHz, punct:0x%x)"
60 __field(u32, min_chan_width) \60#define __CHANDEF_PR_ARG(n) \
61 __field(u32, min_center_freq1) \61 __entry->n##control_freq, __entry->n##freq_offset, \
62 __field(u32, min_freq1_offset) \62 __entry->n##chan_width, __entry->n##center_freq1, \
63 __field(u32, min_center_freq2)63 __entry->n##freq1_offset, __entry->n##center_freq2, \
64 64 __entry->n##punctured
65#define MIN_CHANDEF_ASSIGN(c) \65
66 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \66#define CHANDEF_ENTRY __CHANDEF_ENTRY()
67 __entry->min_freq_offset = (c)->chan ? (c)->chan->freq_offset : 0; \67#define CHANDEF_ASSIGN(c) __CHANDEF_ASSIGN(, c)
68 __entry->min_chan_width = (c)->width; \68#define CHANDEF_PR_FMT __CHANDEF_PR_FMT(chandef)
69 __entry->min_center_freq1 = (c)->center_freq1; \69#define CHANDEF_PR_ARG __CHANDEF_PR_ARG()
70 __entry->min_freq1_offset = (c)->freq1_offset; \70
71 __entry->min_center_freq2 = (c)->center_freq2;71#define MIN_CHANDEF_ENTRY __CHANDEF_ENTRY(min)
72#define MIN_CHANDEF_PR_FMT " mindef(%d.%03d MHz,width:%d,center: %d.%03d/%d MHz)"72#define MIN_CHANDEF_ASSIGN(c) __CHANDEF_ASSIGN(min, c)
73#define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_freq_offset, \73#define MIN_CHANDEF_PR_FMT __CHANDEF_PR_FMT(mindef)
74 __entry->min_chan_width, \74#define MIN_CHANDEF_PR_ARG __CHANDEF_PR_ARG(min)
75 __entry->min_center_freq1, __entry->min_freq1_offset, \75
76 __entry->min_center_freq276#define AP_CHANDEF_ENTRY __CHANDEF_ENTRY(ap)
77 77#define AP_CHANDEF_ASSIGN(c) __CHANDEF_ASSIGN(ap, c)
78#define AP_CHANDEF_ENTRY \78#define AP_CHANDEF_PR_FMT __CHANDEF_PR_FMT(ap)
79 __field(u32, ap_control_freq) \79#define AP_CHANDEF_PR_ARG __CHANDEF_PR_ARG(ap)
80 __field(u32, ap_freq_offset) \
81 __field(u32, ap_chan_width) \
82 __field(u32, ap_center_freq1) \
83 __field(u32, ap_freq1_offset) \
84 __field(u32, ap_center_freq2)
85
86#define AP_CHANDEF_ASSIGN(c) \
87 __entry->ap_control_freq = (c)->chan ? (c)->chan->center_freq : 0;\
88 __entry->ap_freq_offset = (c)->chan ? (c)->chan->freq_offset : 0;\
89 __entry->ap_chan_width = (c)->chan ? (c)->width : 0; \
90 __entry->ap_center_freq1 = (c)->chan ? (c)->center_freq1 : 0; \
91 __entry->ap_freq1_offset = (c)->chan ? (c)->freq1_offset : 0; \
92 __entry->ap_center_freq2 = (c)->chan ? (c)->center_freq2 : 0;
93#define AP_CHANDEF_PR_FMT " ap(%d.%03d MHz,width:%d,center: %d.%03d/%d MHz)"
94#define AP_CHANDEF_PR_ARG __entry->ap_control_freq, __entry->ap_freq_offset, \
95 __entry->ap_chan_width, \
96 __entry->ap_center_freq1, __entry->ap_freq1_offset, \
97 __entry->ap_center_freq2
98 80
99#define CHANCTX_ENTRY CHANDEF_ENTRY \81#define CHANCTX_ENTRY CHANDEF_ENTRY \
100 MIN_CHANDEF_ENTRY \82 MIN_CHANDEF_ENTRY \
net/mac80211/util.c+2−3
@@ -3766,12 +3766,11 @@ again: · 3765 unmodified lines
3766int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata,3766int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata,
3767 struct cfg80211_csa_settings *csa_settings)3767 struct cfg80211_csa_settings *csa_settings)
3768{3768{
3769 int hdr_len = IEEE80211_MIN_ACTION_SIZE(chan_switch);
3769 struct sk_buff *skb;3770 struct sk_buff *skb;
3770 struct ieee80211_mgmt *mgmt;3771 struct ieee80211_mgmt *mgmt;
3771 struct ieee80211_local *local = sdata->local;3772 struct ieee80211_local *local = sdata->local;
3772 int freq;3773 int freq;
3773 int hdr_len = offsetofend(struct ieee80211_mgmt,
3774 u.action.u.chan_switch);
3775 u8 *pos;3774 u8 *pos;
3776 3775
3777 if (sdata->vif.type != NL80211_IFTYPE_ADHOC &&3776 if (sdata->vif.type != NL80211_IFTYPE_ADHOC &&
@@ -3800,7 +3799,7 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata, · 22 unmodified lines
3800 memcpy(mgmt->bssid, ifibss->bssid, ETH_ALEN);3799 memcpy(mgmt->bssid, ifibss->bssid, ETH_ALEN);
3801 }3800 }
3802 mgmt->u.action.category = WLAN_CATEGORY_SPECTRUM_MGMT;3801 mgmt->u.action.category = WLAN_CATEGORY_SPECTRUM_MGMT;
3803 mgmt->u.action.u.chan_switch.action_code = WLAN_ACTION_SPCT_CHL_SWITCH;3802 mgmt->u.action.action_code = WLAN_ACTION_SPCT_CHL_SWITCH;
3804 pos = skb_put(skb, 5);3803 pos = skb_put(skb, 5);
3805 *pos++ = WLAN_EID_CHANNEL_SWITCH; /* EID */3804 *pos++ = WLAN_EID_CHANNEL_SWITCH; /* EID */
3806 *pos++ = 3; /* IE length */3805 *pos++ = 3; /* IE length */
net/mac80211/vht.c+5−5
@@ -4,7 +4,7 @@ · 3 unmodified lines
4 *4 *
5 * Portions of this file5 * Portions of this file
6 * Copyright(c) 2015 - 2016 Intel Deutschland GmbH6 * Copyright(c) 2015 - 2016 Intel Deutschland GmbH
7 * Copyright (C) 2018 - 2024 Intel Corporation7 * Copyright (C) 2018-2026 Intel Corporation
8 */8 */
9 9
10#include <linux/ieee80211.h>10#include <linux/ieee80211.h>
@@ -723,17 +723,17 @@ void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata, · 712 unmodified lines
723 if (!link_conf->mu_mimo_owner)723 if (!link_conf->mu_mimo_owner)
724 return;724 return;
725 725
726 if (!memcmp(mgmt->u.action.u.vht_group_notif.position,726 if (!memcmp(mgmt->u.action.vht_group_notif.position,
727 link_conf->mu_group.position, WLAN_USER_POSITION_LEN) &&727 link_conf->mu_group.position, WLAN_USER_POSITION_LEN) &&
728 !memcmp(mgmt->u.action.u.vht_group_notif.membership,728 !memcmp(mgmt->u.action.vht_group_notif.membership,
729 link_conf->mu_group.membership, WLAN_MEMBERSHIP_LEN))729 link_conf->mu_group.membership, WLAN_MEMBERSHIP_LEN))
730 return;730 return;
731 731
732 memcpy(link_conf->mu_group.membership,732 memcpy(link_conf->mu_group.membership,
733 mgmt->u.action.u.vht_group_notif.membership,733 mgmt->u.action.vht_group_notif.membership,
734 WLAN_MEMBERSHIP_LEN);734 WLAN_MEMBERSHIP_LEN);
735 memcpy(link_conf->mu_group.position,735 memcpy(link_conf->mu_group.position,
736 mgmt->u.action.u.vht_group_notif.position,736 mgmt->u.action.vht_group_notif.position,
737 WLAN_USER_POSITION_LEN);737 WLAN_USER_POSITION_LEN);
738 738
739 ieee80211_link_info_change_notify(sdata, link,739 ieee80211_link_info_change_notify(sdata, link,
net/wireless/chan.c+65−45
@@ -6,7 +6,7 @@ · 5 unmodified lines
6 *6 *
7 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>7 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
8 * Copyright 2013-2014 Intel Mobile Communications GmbH8 * Copyright 2013-2014 Intel Mobile Communications GmbH
9 * Copyright 2018-2025 Intel Corporation9 * Copyright 2018-2026 Intel Corporation
10 */10 */
11 11
12#include <linux/export.h>12#include <linux/export.h>
@@ -29,9 +29,11 @@ void cfg80211_chandef_create(struct cfg80211_chan_def *chandef, · 16 unmodified lines
29 29
30 *chandef = (struct cfg80211_chan_def) {30 *chandef = (struct cfg80211_chan_def) {
31 .chan = chan,31 .chan = chan,
32 .freq1_offset = chan->freq_offset,
33 };32 };
34 33
34 WARN_ON(chan->band == NL80211_BAND_60GHZ ||
35 chan->band == NL80211_BAND_S1GHZ);
36
35 switch (chan_type) {37 switch (chan_type) {
36 case NL80211_CHAN_NO_HT:38 case NL80211_CHAN_NO_HT:
37 chandef->width = NL80211_CHAN_WIDTH_20_NOHT;39 chandef->width = NL80211_CHAN_WIDTH_20_NOHT;
@@ -339,6 +341,58 @@ static bool cfg80211_valid_center_freq(u32 center, · 301 unmodified lines
339 return (center - bw / 2 - 5945) % step == 0;341 return (center - bw / 2 - 5945) % step == 0;
340}342}
341 343
344static bool
345cfg80211_chandef_valid_control_freq(const struct cfg80211_chan_def *chandef,
346 u32 control_freq)
347{
348 switch (chandef->width) {
349 case NL80211_CHAN_WIDTH_5:
350 case NL80211_CHAN_WIDTH_10:
351 case NL80211_CHAN_WIDTH_20:
352 case NL80211_CHAN_WIDTH_20_NOHT:
353 case NL80211_CHAN_WIDTH_1:
354 case NL80211_CHAN_WIDTH_2:
355 case NL80211_CHAN_WIDTH_4:
356 case NL80211_CHAN_WIDTH_8:
357 case NL80211_CHAN_WIDTH_16:
358 /* checked separately */
359 break;
360 case NL80211_CHAN_WIDTH_320:
361 if (chandef->center_freq1 == control_freq + 150 ||
362 chandef->center_freq1 == control_freq + 130 ||
363 chandef->center_freq1 == control_freq + 110 ||
364 chandef->center_freq1 == control_freq + 90 ||
365 chandef->center_freq1 == control_freq - 90 ||
366 chandef->center_freq1 == control_freq - 110 ||
367 chandef->center_freq1 == control_freq - 130 ||
368 chandef->center_freq1 == control_freq - 150)
369 break;
370 fallthrough;
371 case NL80211_CHAN_WIDTH_160:
372 if (chandef->center_freq1 == control_freq + 70 ||
373 chandef->center_freq1 == control_freq + 50 ||
374 chandef->center_freq1 == control_freq - 50 ||
375 chandef->center_freq1 == control_freq - 70)
376 break;
377 fallthrough;
378 case NL80211_CHAN_WIDTH_80P80:
379 case NL80211_CHAN_WIDTH_80:
380 if (chandef->center_freq1 == control_freq + 30 ||
381 chandef->center_freq1 == control_freq - 30)
382 break;
383 fallthrough;
384 case NL80211_CHAN_WIDTH_40:
385 if (chandef->center_freq1 == control_freq + 10 ||
386 chandef->center_freq1 == control_freq - 10)
387 break;
388 fallthrough;
389 default:
390 return false;
391 }
392
393 return true;
394}
395
342bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef)396bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef)
343{397{
344 u32 control_freq, control_freq_khz, start_khz, end_khz;398 u32 control_freq, control_freq_khz, start_khz, end_khz;
@@ -351,6 +405,14 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef) · 6 unmodified lines
351 405
352 control_freq = chandef->chan->center_freq;406 control_freq = chandef->chan->center_freq;
353 407
408 if (cfg80211_chandef_is_s1g(chandef) &&
409 chandef->width != NL80211_CHAN_WIDTH_1 &&
410 chandef->width != NL80211_CHAN_WIDTH_2 &&
411 chandef->width != NL80211_CHAN_WIDTH_4 &&
412 chandef->width != NL80211_CHAN_WIDTH_8 &&
413 chandef->width != NL80211_CHAN_WIDTH_16)
414 return false;
415
354 switch (chandef->width) {416 switch (chandef->width) {
355 case NL80211_CHAN_WIDTH_5:417 case NL80211_CHAN_WIDTH_5:
356 case NL80211_CHAN_WIDTH_10:418 case NL80211_CHAN_WIDTH_10:
@@ -393,50 +455,8 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef) · 36 unmodified lines
393 break;455 break;
394 }456 }
395 457
396 switch (chandef->width) {458 if (!cfg80211_chandef_valid_control_freq(chandef, control_freq))
397 case NL80211_CHAN_WIDTH_5:
398 case NL80211_CHAN_WIDTH_10:
399 case NL80211_CHAN_WIDTH_20:
400 case NL80211_CHAN_WIDTH_20_NOHT:
401 case NL80211_CHAN_WIDTH_1:
402 case NL80211_CHAN_WIDTH_2:
403 case NL80211_CHAN_WIDTH_4:
404 case NL80211_CHAN_WIDTH_8:
405 case NL80211_CHAN_WIDTH_16:
406 /* all checked above */
407 break;
408 case NL80211_CHAN_WIDTH_320:
409 if (chandef->center_freq1 == control_freq + 150 ||
410 chandef->center_freq1 == control_freq + 130 ||
411 chandef->center_freq1 == control_freq + 110 ||
412 chandef->center_freq1 == control_freq + 90 ||
413 chandef->center_freq1 == control_freq - 90 ||
414 chandef->center_freq1 == control_freq - 110 ||
415 chandef->center_freq1 == control_freq - 130 ||
416 chandef->center_freq1 == control_freq - 150)
417 break;
418 fallthrough;
419 case NL80211_CHAN_WIDTH_160:
420 if (chandef->center_freq1 == control_freq + 70 ||
421 chandef->center_freq1 == control_freq + 50 ||
422 chandef->center_freq1 == control_freq - 50 ||
423 chandef->center_freq1 == control_freq - 70)
424 break;
425 fallthrough;
426 case NL80211_CHAN_WIDTH_80P80:
427 case NL80211_CHAN_WIDTH_80:
428 if (chandef->center_freq1 == control_freq + 30 ||
429 chandef->center_freq1 == control_freq - 30)
430 break;
431 fallthrough;
432 case NL80211_CHAN_WIDTH_40:
433 if (chandef->center_freq1 == control_freq + 10 ||
434 chandef->center_freq1 == control_freq - 10)
435 break;
436 fallthrough;
437 default:
438 return false;459 return false;
439 }
440 460
441 if (!cfg80211_valid_center_freq(chandef->center_freq1, chandef->width))461 if (!cfg80211_valid_center_freq(chandef->center_freq1, chandef->width))
442 return false;462 return false;
net/wireless/nl80211.c+24−13
@@ -339,7 +339,20 @@ static int validate_uhr_capa(const struct nlattr *attr, · 338 unmodified lines
339 const u8 *data = nla_data(attr);339 const u8 *data = nla_data(attr);
340 unsigned int len = nla_len(attr);340 unsigned int len = nla_len(attr);
341 341
342 return ieee80211_uhr_capa_size_ok(data, len, false);342 if (!ieee80211_uhr_capa_size_ok(data, len, false))
343 return -EINVAL;
344 return 0;
345}
346
347static int validate_uhr_operation(const struct nlattr *attr,
348 struct netlink_ext_ack *extack)
349{
350 const u8 *data = nla_data(attr);
351 unsigned int len = nla_len(attr);
352
353 if (!ieee80211_uhr_oper_size_ok(data, len, false))
354 return -EINVAL;
355 return 0;
343}356}
344 357
345/* policy for the attributes */358/* policy for the attributes */
@@ -947,6 +960,8 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { · 601 unmodified lines
947 [NL80211_ATTR_UHR_CAPABILITY] =960 [NL80211_ATTR_UHR_CAPABILITY] =
948 NLA_POLICY_VALIDATE_FN(NLA_BINARY, validate_uhr_capa, 255),961 NLA_POLICY_VALIDATE_FN(NLA_BINARY, validate_uhr_capa, 255),
949 [NL80211_ATTR_DISABLE_UHR] = { .type = NLA_FLAG },962 [NL80211_ATTR_DISABLE_UHR] = { .type = NLA_FLAG },
963 [NL80211_ATTR_UHR_OPERATION] =
964 NLA_POLICY_VALIDATE_FN(NLA_BINARY, validate_uhr_operation),
950};965};
951 966
952/* policy for the key attributes */967/* policy for the key attributes */
@@ -3619,6 +3634,9 @@ static int _nl80211_parse_chandef(struct cfg80211_registered_device *rdev, · 2666 unmodified lines
3619 case NL80211_CHAN_HT20:3634 case NL80211_CHAN_HT20:
3620 case NL80211_CHAN_HT40PLUS:3635 case NL80211_CHAN_HT40PLUS:
3621 case NL80211_CHAN_HT40MINUS:3636 case NL80211_CHAN_HT40MINUS:
3637 if (chandef->chan->band == NL80211_BAND_60GHZ ||
3638 chandef->chan->band == NL80211_BAND_S1GHZ)
3639 return -EINVAL;
3622 cfg80211_chandef_create(chandef, chandef->chan,3640 cfg80211_chandef_create(chandef, chandef->chan,
3623 chantype);3641 chantype);
3624 /* user input for center_freq is incorrect */3642 /* user input for center_freq is incorrect */
@@ -5825,7 +5843,7 @@ static int nl80211_parse_tx_bitrate_mask(struct genl_info *info, · 2200 unmodified lines
5825 */5843 */
5826 BUILD_BUG_ON(NL80211_MAX_SUPP_HT_RATES > IEEE80211_HT_MCS_MASK_LEN * 8);5844 BUILD_BUG_ON(NL80211_MAX_SUPP_HT_RATES > IEEE80211_HT_MCS_MASK_LEN * 8);
5827 nla_for_each_nested(tx_rates, attrs[attr], rem) {5845 nla_for_each_nested(tx_rates, attrs[attr], rem) {
5828 enum nl80211_band band = nla_type(tx_rates);5846 int band = nla_type(tx_rates);
5829 int err;5847 int err;
5830 5848
5831 if (band < 0 || band >= NUM_NL80211_BANDS)5849 if (band < 0 || band >= NUM_NL80211_BANDS)
@@ -6499,16 +6517,6 @@ static int nl80211_calculate_ap_params(struct cfg80211_ap_settings *params) · 667 unmodified lines
6499 return -EINVAL;6517 return -EINVAL;
6500 }6518 }
6501 6519
6502 cap = cfg80211_find_ext_elem(WLAN_EID_EXT_UHR_OPER, ies, ies_len);
6503 if (cap) {
6504 if (!cap->datalen)
6505 return -EINVAL;
6506 params->uhr_oper = (void *)(cap->data + 1);
6507 if (!ieee80211_uhr_oper_size_ok((const u8 *)params->uhr_oper,
6508 cap->datalen - 1, true))
6509 return -EINVAL;
6510 }
6511
6512 return 0;6520 return 0;
6513}6521}
6514 6522
@@ -6950,6 +6958,9 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) · 435 unmodified lines
6950 if (err)6958 if (err)
6951 goto out;6959 goto out;
6952 6960
6961 if (info->attrs[NL80211_ATTR_UHR_OPERATION])
6962 params->uhr_oper = nla_data(info->attrs[NL80211_ATTR_UHR_OPERATION]);
6963
6953 err = nl80211_validate_ap_phy_operation(params);6964 err = nl80211_validate_ap_phy_operation(params);
6954 if (err)6965 if (err)
6955 goto out;6966 goto out;
@@ -10694,7 +10705,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) · 3738 unmodified lines
10694 nla_for_each_nested(attr,10705 nla_for_each_nested(attr,
10695 info->attrs[NL80211_ATTR_SCAN_SUPP_RATES],10706 info->attrs[NL80211_ATTR_SCAN_SUPP_RATES],
10696 tmp) {10707 tmp) {
10697 enum nl80211_band band = nla_type(attr);10708 int band = nla_type(attr);
10698 10709
10699 if (band < 0 || band >= NUM_NL80211_BANDS) {10710 if (band < 0 || band >= NUM_NL80211_BANDS) {
10700 err = -EINVAL;10711 err = -EINVAL;
net/wireless/of.c+1−12
@@ -1,17 +1,6 @@
1// SPDX-License-Identifier: ISC
1/*2/*
2 * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>3 * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */4 */
16 5
17#include <linux/of.h>6#include <linux/of.h>
net/wireless/radiotap.c+1−9
@@ -1,17 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
1/*2/*
2 * Radiotap parser3 * Radiotap parser
3 *4 *
4 * Copyright 2007 Andy Green <andy@warmcat.com>5 * Copyright 2007 Andy Green <andy@warmcat.com>
5 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>6 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Alternatively, this software may be distributed under the terms of BSD
12 * license.
13 *
14 * See COPYING for more details.
15 */7 */
16 8
17#include <linux/kernel.h>9#include <linux/kernel.h>
net/wireless/reg.c+1−12
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: ISC
1/*2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc.3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc.4 * Copyright 2005-2006, Devicescape Software, Inc.
@@ -6,18 +7,6 @@ · 2 unmodified lines
6 * Copyright 2013-2014 Intel Mobile Communications GmbH7 * Copyright 2013-2014 Intel Mobile Communications GmbH
7 * Copyright 2017 Intel Deutschland GmbH8 * Copyright 2017 Intel Deutschland GmbH
8 * Copyright (C) 2018 - 2026 Intel Corporation9 * Copyright (C) 2018 - 2026 Intel Corporation
9 *
10 * Permission to use, copy, modify, and/or distribute this software for any
11 * purpose with or without fee is hereby granted, provided that the above
12 * copyright notice and this permission notice appear in all copies.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 */10 */
22 11
23 12
net/wireless/reg.h+1−12
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: ISC */
1#ifndef __NET_WIRELESS_REG_H2#ifndef __NET_WIRELESS_REG_H
2#define __NET_WIRELESS_REG_H3#define __NET_WIRELESS_REG_H
3 4
@@ -6,18 +7,6 @@ · 2 unmodified lines
6/*7/*
7 * Copyright 2008-2011 Luis R. Rodriguez <mcgrof@qca.qualcomm.com>8 * Copyright 2008-2011 Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
8 * Copyright (C) 2019, 2023 Intel Corporation9 * Copyright (C) 2019, 2023 Intel Corporation
9 *
10 * Permission to use, copy, modify, and/or distribute this software for any
11 * purpose with or without fee is hereby granted, provided that the above
12 * copyright notice and this permission notice appear in all copies.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 */10 */
22 11
23enum ieee80211_regd_source {12enum ieee80211_regd_source {
net/wireless/trace.c+1−0
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/module.h>2#include <linux/module.h>
2 3
3#ifndef __CHECKER__4#ifndef __CHECKER__
net/wireless/wext-core.c+1−2
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/*2/*
2 * This file implement the Wireless Extensions core API.3 * This file implement the Wireless Extensions core API.
3 *4 *
@@ -5,8 +6,6 @@ · 1 unmodified line
5 * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.6 * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.
6 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>7 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
7 * Copyright (C) 2024 Intel Corporation8 * Copyright (C) 2024 Intel Corporation
8 *
9 * (As all part of the Linux kernel, this file is GPL)
10 */9 */
11#include <linux/kernel.h>10#include <linux/kernel.h>
12#include <linux/netdevice.h>11#include <linux/netdevice.h>
net/wireless/wext-priv.c+1−2
@@ -1,11 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0
1/*2/*
2 * This file implement the Wireless Extensions priv API.3 * This file implement the Wireless Extensions priv API.
3 *4 *
4 * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>5 * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
5 * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.6 * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.
6 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>7 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
7 *
8 * (As all part of the Linux kernel, this file is GPL)
9 */8 */
10#include <linux/slab.h>9#include <linux/slab.h>
11#include <linux/wireless.h>10#include <linux/wireless.h>
net/wireless/wext-proc.c+1−2
@@ -1,10 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0
1/*2/*
2 * This file implement the Wireless Extensions proc API.3 * This file implement the Wireless Extensions proc API.
3 *4 *
4 * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>5 * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
5 * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.6 * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.
6 *
7 * (As all part of the Linux kernel, this file is GPL)
8 */7 */
9 8
10/*9/*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t