From patchwork Sun Dec 12 21:17:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1567055 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=PbnnMgiS; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=D9igGQcQ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JByHB3x8Wz9t2p for ; Mon, 13 Dec 2021 08:20:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=xOePdxX9PNsmQniXEg15OPzSe4XmvmxIoyztlRT0F98=; b=PbnnMgiSakS8je mbFH2G/PFfQsjPWDQdeDiy0LwVJ1fqimCwnfUbEr7kC27lSflw3jaoY8N2JRBydkUXjPabANUv/cI BDmoFDx7qGX63hlxjcHPDvs7Gq0zRFPkL4xVg9pjWke/VkzA8bjDqFyh5lHv2bjSqOnx44Lmgm1M+ j6SNDa8bkkSIKrZS+nd4GrBPDMsssP8hjjcWMNZo2YBZdyAusS473khxv/MynudLpad7qNWbon/0y dHNyVAJ2BeOPydGy537Dmdg2V39xuhTJVxq3XEkABxpDDSlpIn6IAbO3kiYChgPIQthwL/UTSPTda +lETq8BMfMT9TMMYUpyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwWEZ-007Iy7-KX; Sun, 12 Dec 2021 21:18:15 +0000 Received: from mout-p-201.mailbox.org ([80.241.56.171]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwWEJ-007IwF-6W for openwrt-devel@lists.openwrt.org; Sun, 12 Dec 2021 21:18:03 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [80.241.60.233]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4JByCk32nxzQjcN; Sun, 12 Dec 2021 22:17:54 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1639343872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=wZgHKzJThcbyzzrlXjlKz5m/POHkUhnYlGq8k/v8RzM=; b=D9igGQcQ5DmddFhyrO1+FyQFhdkpUo/rNt2vQoykB64euia6VlHHaQFmQULwJ1oSvBmQbC QRU63u2+Q5EkbnRGIwvYV68ApdD6rPdRHSVkFI5pjmx3xXOo0hF3aZpUA9GhGpYciJIOD5 ezYpH7A6Uzyr0E1/zNcgGMWl3GShwpzoVzeOnv8d2dxnd2lZW4sX177iHtuM3opW7W9S/X u3U/dvlrc+xyMlG40eNUKFdcvWuvagZh3sfXOlPHMHx9uzYUXxml5bt5MbllHtCGzI20za ER4DTuuQHxfcLxS3MzmVIwx3aI4wH6aYXrtlALOZ93VXViB1ih8gyf+IF8n+JQ== From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: Hauke Mehrtens Subject: [PATCH 1/3] mac80211: Update to version 5.15.6 Date: Sun, 12 Dec 2021 22:17:33 +0100 Message-Id: <20211212211735.2457250-1-hauke@hauke-m.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211212_131759_758441_EFAA55B1 X-CRM114-Status: GOOD ( 22.14 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The following patches were backported from upstream before and are not needed any more: package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch pa [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The following patches were backported from upstream before and are not needed any more: package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch package/kernel/mac80211/patches/ath10k/980-ath10k-fix-max-antenna-gain-unit.patch package/kernel/mac80211/patches/build/010-headers-Add-devm_platform_get_and_ioremap_resource.patch package/kernel/mac80211/patches/subsys/300-mac80211-drop-check-for-DONT_REORDER-in-__ieee80211_.patch package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch package/kernel/mac80211/patches/subsys/308-mac80211-fix-radiotap-header-generation.patch Signed-off-by: Hauke Mehrtens --- package/kernel/mac80211/Makefile | 6 +- ...egression-with-iram-recovery-feature.patch | 121 ------------------ .../930-ath10k_add_tpt_led_trigger.patch | 4 +- ...rolling-support-for-various-chipsets.patch | 14 +- ...75-ath10k-use-tpt-trigger-by-default.patch | 2 +- ...980-ath10k-fix-max-antenna-gain-unit.patch | 49 ------- ...-power-reduction-for-US-regulatory-d.patch | 8 +- .../ath9k/542-ath9k_debugfs_diag.patch | 4 +- .../ath9k/551-ath9k_ubnt_uap_plus_hsr.patch | 4 +- ...vm_platform_get_and_ioremap_resource.patch | 79 ------------ .../110-mac80211_keep_keys_on_stop_ap.patch | 2 +- .../mac80211/patches/subsys/210-ap_scan.patch | 2 +- ...eck-for-DONT_REORDER-in-__ieee80211_.patch | 37 ------ ...ate-control-for-retransmitted-frames.patch | 2 +- ...-the-fwd_skb-dev-for-mesh-forwarding.patch | 2 +- ...t-access-the-IV-when-it-was-stripped.patch | 26 ---- ...80211-fix-radiotap-header-generation.patch | 49 ------- .../patches/subsys/400-allow-ibss-mixed.patch | 2 +- .../500-mac80211_configure_antenna_gain.patch | 6 +- 19 files changed, 29 insertions(+), 390 deletions(-) delete mode 100644 package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch delete mode 100644 package/kernel/mac80211/patches/ath10k/980-ath10k-fix-max-antenna-gain-unit.patch delete mode 100644 package/kernel/mac80211/patches/build/010-headers-Add-devm_platform_get_and_ioremap_resource.patch delete mode 100644 package/kernel/mac80211/patches/subsys/300-mac80211-drop-check-for-DONT_REORDER-in-__ieee80211_.patch delete mode 100644 package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch delete mode 100644 package/kernel/mac80211/patches/subsys/308-mac80211-fix-radiotap-header-generation.patch diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index e3cf2d380098..dfc907344fc9 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=5.15-rc6-1 +PKG_VERSION:=5.15.7-test2 PKG_RELEASE:=1 -PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15-rc6/ -PKG_HASH:=9282612c4c02ef9fc9d74405303033f6b53914cd63d631eef0f43155fcd38932 +PKG_SOURCE_URL:=https://hauke-m.de/files/backports-test/ +PKG_HASH:=539c256521d88b3965884e92f06b6f3f9f64bd1c5ea060acf35d51efc5f907d5 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) diff --git a/package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch b/package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch deleted file mode 100644 index 7a7d08be487f..000000000000 --- a/package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 6f8c8bf4c7c9be1c42088689fd4370e06b46608a Mon Sep 17 00:00:00 2001 -From: Abinaya Kalaiselvan -Date: Wed, 20 Oct 2021 11:59:07 +0300 -Subject: ath10k: fix module load regression with iram-recovery feature - -Commit 9af7c32ceca8 ("ath10k: add target IRAM recovery feature support") -introduced a new firmware feature flag ATH10K_FW_FEATURE_IRAM_RECOVERY. But -this caused ath10k_pci module load to fail if ATH10K_FW_CRASH_DUMP_RAM_DATA bit -was not enabled in the ath10k coredump_mask module parameter: - -[ 2209.328190] ath10k_pci 0000:02:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe -[ 2209.434414] ath10k_pci 0000:02:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 1 -[ 2209.547191] ath10k_pci 0000:02:00.0: firmware ver 10.4-3.9.0.2-00099 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps,peer-fixed-rate,iram-recovery crc32 cbade90a -[ 2210.896485] ath10k_pci 0000:02:00.0: board_file api 1 bmi_id 0:1 crc32 a040efc2 -[ 2213.603339] ath10k_pci 0000:02:00.0: failed to copy target iram contents: -12 -[ 2213.839027] ath10k_pci 0000:02:00.0: could not init core (-12) -[ 2213.933910] ath10k_pci 0000:02:00.0: could not probe fw (-12) - -And by default coredump_mask does not have ATH10K_FW_CRASH_DUMP_RAM_DATA -enabled so anyone using a firmware with iram-recovery feature would fail. To my -knowledge only QCA9984 firmwares starting from release 10.4-3.9.0.2-00099 -enabled the feature. - -The reason for regression was that ath10k_core_copy_target_iram() used -ath10k_coredump_get_mem_layout() to get the memory layout, but when -ATH10K_FW_CRASH_DUMP_RAM_DATA was disabled it would get just NULL and bail out -with an error. - -While looking at all this I noticed another bug: if CONFIG_DEV_COREDUMP is -disabled but the firmware has iram-recovery enabled the module load fails with -similar error messages. I fixed that by returning 0 from -ath10k_core_copy_target_iram() when _ath10k_coredump_get_mem_layout() returns -NULL. - -Tested-on: QCA9984 hw2.0 PCI 10.4-3.9.0.2-00139 - -Fixes: 9af7c32ceca8 ("ath10k: add target IRAM recovery feature support") -Signed-off-by: Abinaya Kalaiselvan -Signed-off-by: Jouni Malinen -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20211020075054.23061-1-kvalo@codeaurora.org ---- - drivers/net/wireless/ath/ath10k/core.c | 11 +++++++++-- - drivers/net/wireless/ath/ath10k/coredump.c | 11 ++++++++--- - drivers/net/wireless/ath/ath10k/coredump.h | 7 +++++++ - 3 files changed, 24 insertions(+), 5 deletions(-) - ---- a/drivers/net/wireless/ath/ath10k/core.c -+++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -2690,9 +2690,16 @@ static int ath10k_core_copy_target_iram( - int i, ret; - u32 len, remaining_len; - -- hw_mem = ath10k_coredump_get_mem_layout(ar); -+ /* copy target iram feature must work also when -+ * ATH10K_FW_CRASH_DUMP_RAM_DATA is disabled, so -+ * _ath10k_coredump_get_mem_layout() to accomplist that -+ */ -+ hw_mem = _ath10k_coredump_get_mem_layout(ar); - if (!hw_mem) -- return -ENOMEM; -+ /* if CONFIG_DEV_COREDUMP is disabled we get NULL, then -+ * just silently disable the feature by doing nothing -+ */ -+ return 0; - - for (i = 0; i < hw_mem->region_table.size; i++) { - tmp = &hw_mem->region_table.regions[i]; ---- a/drivers/net/wireless/ath/ath10k/coredump.c -+++ b/drivers/net/wireless/ath/ath10k/coredump.c -@@ -1447,11 +1447,17 @@ static u32 ath10k_coredump_get_ramdump_s - - const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10k *ar) - { -- int i; -- - if (!test_bit(ATH10K_FW_CRASH_DUMP_RAM_DATA, &ath10k_coredump_mask)) - return NULL; - -+ return _ath10k_coredump_get_mem_layout(ar); -+} -+EXPORT_SYMBOL(ath10k_coredump_get_mem_layout); -+ -+const struct ath10k_hw_mem_layout *_ath10k_coredump_get_mem_layout(struct ath10k *ar) -+{ -+ int i; -+ - if (WARN_ON(ar->target_version == 0)) - return NULL; - -@@ -1464,7 +1470,6 @@ const struct ath10k_hw_mem_layout *ath10 - - return NULL; - } --EXPORT_SYMBOL(ath10k_coredump_get_mem_layout); - - struct ath10k_fw_crash_data *ath10k_coredump_new(struct ath10k *ar) - { ---- a/drivers/net/wireless/ath/ath10k/coredump.h -+++ b/drivers/net/wireless/ath/ath10k/coredump.h -@@ -176,6 +176,7 @@ int ath10k_coredump_register(struct ath1 - void ath10k_coredump_unregister(struct ath10k *ar); - void ath10k_coredump_destroy(struct ath10k *ar); - -+const struct ath10k_hw_mem_layout *_ath10k_coredump_get_mem_layout(struct ath10k *ar); - const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10k *ar); - - #else /* CONFIG_DEV_COREDUMP */ -@@ -213,6 +214,12 @@ ath10k_coredump_get_mem_layout(struct at - { - return NULL; - } -+ -+static inline const struct ath10k_hw_mem_layout * -+_ath10k_coredump_get_mem_layout(struct ath10k *ar) -+{ -+ return NULL; -+} - - #endif /* CONFIG_DEV_COREDUMP */ - diff --git a/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch index e4e72786fe36..b60db1946470 100644 --- a/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch +++ b/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -9820,6 +9820,21 @@ static int ath10k_mac_init_rd(struct ath +@@ -9843,6 +9843,21 @@ static int ath10k_mac_init_rd(struct ath return 0; } @@ -22,7 +22,7 @@ int ath10k_mac_register(struct ath10k *ar) { static const u32 cipher_suites[] = { -@@ -10172,6 +10187,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -10195,6 +10210,12 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; diff --git a/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index cc491feace75..65d67b2e03f9 100644 --- a/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -467,7 +467,7 @@ v13: static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c -@@ -7468,6 +7468,49 @@ ath10k_wmi_op_gen_peer_set_param(struct +@@ -7472,6 +7472,49 @@ ath10k_wmi_op_gen_peer_set_param(struct return skb; } @@ -517,7 +517,7 @@ v13: static struct sk_buff * ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, enum wmi_sta_ps_mode psmode) -@@ -9156,6 +9199,9 @@ static const struct wmi_ops wmi_ops = { +@@ -9160,6 +9203,9 @@ static const struct wmi_ops wmi_ops = { .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -527,7 +527,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9226,6 +9272,8 @@ static const struct wmi_ops wmi_10_1_ops +@@ -9230,6 +9276,8 @@ static const struct wmi_ops wmi_10_1_ops .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -536,7 +536,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9298,6 +9346,8 @@ static const struct wmi_ops wmi_10_2_ops +@@ -9302,6 +9350,8 @@ static const struct wmi_ops wmi_10_2_ops .gen_delba_send = ath10k_wmi_op_gen_delba_send, .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, @@ -545,7 +545,7 @@ v13: /* .gen_pdev_enable_adaptive_cca not implemented */ }; -@@ -9369,6 +9419,8 @@ static const struct wmi_ops wmi_10_2_4_o +@@ -9373,6 +9423,8 @@ static const struct wmi_ops wmi_10_2_4_o ath10k_wmi_op_gen_pdev_enable_adaptive_cca, .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, @@ -554,7 +554,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9450,6 +9502,8 @@ static const struct wmi_ops wmi_10_4_ops +@@ -9454,6 +9506,8 @@ static const struct wmi_ops wmi_10_4_ops .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, .gen_echo = ath10k_wmi_op_gen_echo, .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, @@ -565,7 +565,7 @@ v13: int ath10k_wmi_attach(struct ath10k *ar) --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h -@@ -3027,6 +3027,41 @@ enum wmi_10_4_feature_mask { +@@ -3030,6 +3030,41 @@ enum wmi_10_4_feature_mask { }; diff --git a/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch index 1529abfad000..da31ad578a77 100644 --- a/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch @@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin if (ret) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -10189,7 +10189,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -10212,7 +10212,7 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; #ifdef CPTCFG_MAC80211_LEDS diff --git a/package/kernel/mac80211/patches/ath10k/980-ath10k-fix-max-antenna-gain-unit.patch b/package/kernel/mac80211/patches/ath10k/980-ath10k-fix-max-antenna-gain-unit.patch deleted file mode 100644 index f3f3b1b9213e..000000000000 --- a/package/kernel/mac80211/patches/ath10k/980-ath10k-fix-max-antenna-gain-unit.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Sven Eckelmann -Date: Tue, 11 Jun 2019 13:58:35 +0200 -Subject: ath10k: fix max antenna gain unit - -Most of the txpower for the ath10k firmware is stored as twicepower (0.5 dB -steps). This isn't the case for max_antenna_gain - which is still expected -by the firmware as dB. - -The firmware is converting it from dB to the internal (twicepower) -representation when it calculates the limits of a channel. This can be seen -in tpc_stats when configuring "12" as max_antenna_gain. Instead of the -expected 12 (6 dB), the tpc_stats shows 24 (12 dB). - -Tested on QCA9888 and IPQ4019 with firmware 10.4-3.5.3-00057. - -Fixes: 02256930d9b8 ("ath10k: use proper tx power unit") -Signed-off-by: Sven Eckelmann - -Forwarded: https://patchwork.kernel.org/patch/10986723/ - ---- a/drivers/net/wireless/ath/ath10k/mac.c -+++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -1049,7 +1049,7 @@ static int ath10k_monitor_vdev_start(str - arg.channel.min_power = 0; - arg.channel.max_power = channel->max_power * 2; - arg.channel.max_reg_power = channel->max_reg_power * 2; -- arg.channel.max_antenna_gain = channel->max_antenna_gain * 2; -+ arg.channel.max_antenna_gain = channel->max_antenna_gain; - - reinit_completion(&ar->vdev_setup_done); - reinit_completion(&ar->vdev_delete_done); -@@ -1495,7 +1495,7 @@ static int ath10k_vdev_start_restart(str - arg.channel.min_power = 0; - arg.channel.max_power = chandef->chan->max_power * 2; - arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; -- arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain * 2; -+ arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain; - - if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { - arg.ssid = arvif->u.ap.ssid; -@@ -3423,7 +3423,7 @@ static int ath10k_update_channel_list(st - ch->min_power = 0; - ch->max_power = channel->max_power * 2; - ch->max_reg_power = channel->max_reg_power * 2; -- ch->max_antenna_gain = channel->max_antenna_gain * 2; -+ ch->max_antenna_gain = channel->max_antenna_gain; - ch->reg_class_id = 0; /* FIXME */ - - /* FIXME: why use only legacy modes, why not any diff --git a/package/kernel/mac80211/patches/ath10k/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch b/package/kernel/mac80211/patches/ath10k/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch index 9f7ac903eb1f..a45addf11964 100644 --- a/package/kernel/mac80211/patches/ath10k/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch +++ b/package/kernel/mac80211/patches/ath10k/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch @@ -28,7 +28,7 @@ Forwarded: no --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -1017,6 +1017,40 @@ static inline int ath10k_vdev_setup_sync +@@ -1021,6 +1021,40 @@ static inline int ath10k_vdev_setup_sync return ar->last_wmi_vdev_start_status; } @@ -69,7 +69,7 @@ Forwarded: no static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id) { struct cfg80211_chan_def *chandef = NULL; -@@ -1049,7 +1083,8 @@ static int ath10k_monitor_vdev_start(str +@@ -1053,7 +1087,8 @@ static int ath10k_monitor_vdev_start(str arg.channel.min_power = 0; arg.channel.max_power = channel->max_power * 2; arg.channel.max_reg_power = channel->max_reg_power * 2; @@ -79,7 +79,7 @@ Forwarded: no reinit_completion(&ar->vdev_setup_done); reinit_completion(&ar->vdev_delete_done); -@@ -1495,7 +1530,8 @@ static int ath10k_vdev_start_restart(str +@@ -1499,7 +1534,8 @@ static int ath10k_vdev_start_restart(str arg.channel.min_power = 0; arg.channel.max_power = chandef->chan->max_power * 2; arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; @@ -89,7 +89,7 @@ Forwarded: no if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { arg.ssid = arvif->u.ap.ssid; -@@ -3423,7 +3459,8 @@ static int ath10k_update_channel_list(st +@@ -3427,7 +3463,8 @@ static int ath10k_update_channel_list(st ch->min_power = 0; ch->max_power = channel->max_power * 2; ch->max_reg_power = channel->max_reg_power * 2; diff --git a/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch index 85c5a9deb6d0..5b64f560fdc5 100644 --- a/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch @@ -125,9 +125,9 @@ REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON); --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -536,6 +536,11 @@ irqreturn_t ath_isr(int irq, void *dev) - if (test_bit(ATH_OP_HW_RESET, &common->op_flags)) +@@ -538,6 +538,11 @@ irqreturn_t ath_isr(int irq, void *dev) return IRQ_HANDLED; + } + if (test_bit(ATH_DIAG_TRIGGER_ERROR, &ah->diag)) { + status |= ATH9K_INT_FATAL; diff --git a/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch index 1010f758075c..cb6374feb0cb 100644 --- a/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch +++ b/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch @@ -339,7 +339,7 @@ static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop); -@@ -657,6 +658,7 @@ void ath_reset_work(struct work_struct * +@@ -659,6 +660,7 @@ void ath_reset_work(struct work_struct * static int ath9k_start(struct ieee80211_hw *hw) { struct ath_softc *sc = hw->priv; @@ -347,7 +347,7 @@ struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan; -@@ -735,6 +737,11 @@ static int ath9k_start(struct ieee80211_ +@@ -737,6 +739,11 @@ static int ath9k_start(struct ieee80211_ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); } diff --git a/package/kernel/mac80211/patches/build/010-headers-Add-devm_platform_get_and_ioremap_resource.patch b/package/kernel/mac80211/patches/build/010-headers-Add-devm_platform_get_and_ioremap_resource.patch deleted file mode 100644 index a06c619471ba..000000000000 --- a/package/kernel/mac80211/patches/build/010-headers-Add-devm_platform_get_and_ioremap_resource.patch +++ /dev/null @@ -1,79 +0,0 @@ -From d49395058c6bd4fb7b8bcc5ff7b4d7fbd9b6f97b Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 24 Oct 2021 14:49:55 +0200 -Subject: [PATCH] headers: Add devm_platform_get_and_ioremap_resource() - -This function is copied from kernel 5.7 and used by mt76, ath10k and -ath11k. devm_platform_ioremap_resource() was changed to make sue of -this new function. - -Signed-off-by: Hauke Mehrtens ---- - .../backport-include/linux/platform_device.h | 45 ++++++++++++++++--- - 1 file changed, 38 insertions(+), 7 deletions(-) - ---- a/backport-include/linux/platform_device.h -+++ b/backport-include/linux/platform_device.h -@@ -33,7 +33,39 @@ module_exit(__platform_driver##_exit); - platform_driver_unregister) - #endif - -+#if LINUX_VERSION_IS_LESS(5,7,0) -+#ifdef CONFIG_HAS_IOMEM -+#define devm_platform_get_and_ioremap_resource LINUX_BACKPORT(devm_platform_get_and_ioremap_resource) -+/** -+ * devm_platform_get_and_ioremap_resource - call devm_ioremap_resource() for a -+ * platform device and get resource -+ * -+ * @pdev: platform device to use both for memory resource lookup as well as -+ * resource management -+ * @index: resource index -+ * @res: optional output parameter to store a pointer to the obtained resource. -+ * -+ * Return: a pointer to the remapped memory or an ERR_PTR() encoded error code -+ * on failure. -+ */ -+static inline void __iomem * -+devm_platform_get_and_ioremap_resource(struct platform_device *pdev, -+ unsigned int index, struct resource **res) -+{ -+ struct resource *r; -+ -+ r = platform_get_resource(pdev, IORESOURCE_MEM, index); -+ if (res) -+ *res = r; -+ return devm_ioremap_resource(&pdev->dev, r); -+} -+#endif /* CONFIG_HAS_IOMEM */ -+#endif /* < 5.7 */ -+ - #if LINUX_VERSION_IS_LESS(5,1,0) -+ -+#ifdef CONFIG_HAS_IOMEM -+#define devm_platform_ioremap_resource LINUX_BACKPORT(devm_platform_ioremap_resource) - /** - * devm_platform_ioremap_resource - call devm_ioremap_resource() for a platform - * device -@@ -41,16 +73,15 @@ module_exit(__platform_driver##_exit); - * @pdev: platform device to use both for memory resource lookup as well as - * resource management - * @index: resource index -+ * -+ * Return: a pointer to the remapped memory or an ERR_PTR() encoded error code -+ * on failure. - */ --#ifdef CONFIG_HAS_IOMEM --#define devm_platform_ioremap_resource LINUX_BACKPORT(devm_platform_ioremap_resource) --static inline void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev, -+static inline void __iomem * -+devm_platform_ioremap_resource(struct platform_device *pdev, - unsigned int index) - { -- struct resource *res; -- -- res = platform_get_resource(pdev, IORESOURCE_MEM, index); -- return devm_ioremap_resource(&pdev->dev, res); -+ return devm_platform_get_and_ioremap_resource(pdev, index, NULL); - } - #endif /* CONFIG_HAS_IOMEM */ - #endif diff --git a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch index 02b2947ebf2d..638da143468a 100644 --- a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch +++ b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch @@ -2,7 +2,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1314,7 +1314,6 @@ static int ieee80211_stop_ap(struct wiph +@@ -1316,7 +1316,6 @@ static int ieee80211_stop_ap(struct wiph sdata->vif.bss_conf.ftmr_params = NULL; __sta_info_flush(sdata, true); diff --git a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch index 5d1823e5c6cc..0c06829ce486 100644 --- a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch +++ b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2495,7 +2495,7 @@ static int ieee80211_scan(struct wiphy * +@@ -2497,7 +2497,7 @@ static int ieee80211_scan(struct wiphy * * the frames sent while scanning on other channel will be * lost) */ diff --git a/package/kernel/mac80211/patches/subsys/300-mac80211-drop-check-for-DONT_REORDER-in-__ieee80211_.patch b/package/kernel/mac80211/patches/subsys/300-mac80211-drop-check-for-DONT_REORDER-in-__ieee80211_.patch deleted file mode 100644 index b55da2b1aa4c..000000000000 --- a/package/kernel/mac80211/patches/subsys/300-mac80211-drop-check-for-DONT_REORDER-in-__ieee80211_.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Felix Fietkau -Date: Wed, 10 Nov 2021 22:17:13 +0100 -Subject: [PATCH] mac80211: drop check for DONT_REORDER in - __ieee80211_select_queue - -When __ieee80211_select_queue is called, skb->cb has not been cleared yet, -which means that info->control.flags can contain garbage. -In some cases this leads to IEEE80211_TX_CTRL_DONT_REORDER being set, causing -packets marked for other queues to randomly end up in BE instead. - -This flag only needs to be checked in ieee80211_select_queue_80211, since -the radiotap parser is the only piece of code that sets it - -Fixes: 66d06c84730c ("mac80211: adhere to Tx control flag that prevents frame reordering") -Cc: stable@vger.kernel.org -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/wme.c -+++ b/net/mac80211/wme.c -@@ -143,7 +143,6 @@ u16 ieee80211_select_queue_80211(struct - u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, - struct sta_info *sta, struct sk_buff *skb) - { -- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct mac80211_qos_map *qos_map; - bool qos; - -@@ -156,7 +155,7 @@ u16 __ieee80211_select_queue(struct ieee - else - qos = false; - -- if (!qos || (info->control.flags & IEEE80211_TX_CTRL_DONT_REORDER)) { -+ if (!qos) { - skb->priority = 0; /* required for correct WPA/11i MIC */ - return IEEE80211_AC_BE; - } diff --git a/package/kernel/mac80211/patches/subsys/301-mac80211-fix-rate-control-for-retransmitted-frames.patch b/package/kernel/mac80211/patches/subsys/301-mac80211-fix-rate-control-for-retransmitted-frames.patch index 42f7d6bfe7f6..98dfe88cbd76 100644 --- a/package/kernel/mac80211/patches/subsys/301-mac80211-fix-rate-control-for-retransmitted-frames.patch +++ b/package/kernel/mac80211/patches/subsys/301-mac80211-fix-rate-control-for-retransmitted-frames.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -1825,15 +1825,15 @@ static int invoke_tx_handlers_late(struc +@@ -1821,15 +1821,15 @@ static int invoke_tx_handlers_late(struc struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); ieee80211_tx_result res = TX_CONTINUE; diff --git a/package/kernel/mac80211/patches/subsys/306-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch b/package/kernel/mac80211/patches/subsys/306-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch index 68fa8a91c2a9..1ceb2be25c23 100644 --- a/package/kernel/mac80211/patches/subsys/306-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch +++ b/package/kernel/mac80211/patches/subsys/306-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch @@ -52,7 +52,7 @@ Signed-off-by: Xing Song --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2947,6 +2947,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 +@@ -2948,6 +2948,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 if (!fwd_skb) goto out; diff --git a/package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch b/package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch deleted file mode 100644 index 7b662acdc525..000000000000 --- a/package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Xing Song -Date: Mon, 1 Nov 2021 10:46:57 +0800 -Subject: [PATCH] mac80211: do not access the IV when it was stripped - -ieee80211_get_keyid() will return false value if IV has been stripped, -such as return 0 for IP/ARP frames due to LLC header, and return -EINVAL -for disassociation frames due to its length... etc. Don't try to access -it if it's not present. - -Signed-off-by: Xing Song -Link: https://lore.kernel.org/r/20211101024657.143026-1-xing.song@mediatek.com -Signed-off-by: Johannes Berg ---- - ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -1952,7 +1952,8 @@ ieee80211_rx_h_decrypt(struct ieee80211_ - int keyid = rx->sta->ptk_idx; - sta_ptk = rcu_dereference(rx->sta->ptk[keyid]); - -- if (ieee80211_has_protected(fc)) { -+ if (ieee80211_has_protected(fc) && -+ !(status->flag & RX_FLAG_IV_STRIPPED)) { - cs = rx->sta->cipher_scheme; - keyid = ieee80211_get_keyid(rx->skb, cs); - diff --git a/package/kernel/mac80211/patches/subsys/308-mac80211-fix-radiotap-header-generation.patch b/package/kernel/mac80211/patches/subsys/308-mac80211-fix-radiotap-header-generation.patch deleted file mode 100644 index a408c3d802b9..000000000000 --- a/package/kernel/mac80211/patches/subsys/308-mac80211-fix-radiotap-header-generation.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Johannes Berg -Date: Tue, 9 Nov 2021 10:02:04 +0100 -Subject: [PATCH] mac80211: fix radiotap header generation - -In commit 8c89f7b3d3f2 ("mac80211: Use flex-array for radiotap header -bitmap") we accidentally pointed the position to the wrong place, so -we overwrite a present bitmap, and thus cause all kinds of trouble. - -To see the issue, note that the previous code read: - - pos = (void *)(it_present + 1); - -The requirement now is that we need to calculate pos via it_optional, -to not trigger the compiler hardening checks, as: - - pos = (void *)&rthdr->it_optional[...]; - -Rewriting the original expression, we get (obviously, since that just -adds "+ x - x" terms): - - pos = (void *)(it_present + 1 + rthdr->it_optional - rthdr->it_optional) - -and moving the "+ rthdr->it_optional" outside to be used as an array: - - pos = (void *)&rthdr->it_optional[it_present + 1 - rthdr->it_optional]; - -The original is off by one, fix it. - -Cc: stable@vger.kernel.org -Fixes: 8c89f7b3d3f2 ("mac80211: Use flex-array for radiotap header bitmap") -Reported-by: Sid Hayn -Signed-off-by: Johannes Berg -Tested-by: Sid Hayn -Reviewed-by: Kees Cook -Link: https://lore.kernel.org/r/20211109100203.c61007433ed6.I1dade57aba7de9c4f48d68249adbae62636fd98c@changeid -Signed-off-by: Johannes Berg ---- - ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -364,7 +364,7 @@ ieee80211_add_rx_radiotap_header(struct - * the compiler to think we have walked past the end of the - * struct member. - */ -- pos = (void *)&rthdr->it_optional[it_present - rthdr->it_optional]; -+ pos = (void *)&rthdr->it_optional[it_present + 1 - rthdr->it_optional]; - - /* the order of the following fields is important */ - diff --git a/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch b/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch index b9fd8e3ea221..3df4062ec5bd 100644 --- a/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch +++ b/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch @@ -5,7 +5,7 @@ and we should ignore this. --- a/net/wireless/core.c +++ b/net/wireless/core.c -@@ -629,21 +629,6 @@ static int wiphy_verify_combinations(str +@@ -630,21 +630,6 @@ static int wiphy_verify_combinations(str c->limits[j].max > 1)) return -EINVAL; diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch index 821032fa8936..e0a259cde57f 100644 --- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch @@ -57,7 +57,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2760,6 +2760,19 @@ static int ieee80211_get_tx_power(struct +@@ -2764,6 +2764,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -77,7 +77,7 @@ static void ieee80211_rfkill_poll(struct wiphy *wiphy) { struct ieee80211_local *local = wiphy_priv(wiphy); -@@ -4395,6 +4408,7 @@ const struct cfg80211_ops mac80211_confi +@@ -4399,6 +4412,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, @@ -137,7 +137,7 @@ }; /* policy for the key attributes */ -@@ -3324,6 +3325,22 @@ static int nl80211_set_wiphy(struct sk_b +@@ -3328,6 +3329,22 @@ static int nl80211_set_wiphy(struct sk_b if (result) goto out; } From patchwork Sun Dec 12 21:17:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1567057 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=rzv7esr9; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=JiOmZqYG; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JByHC05pTz9t4b for ; Mon, 13 Dec 2021 08:20:52 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AkBYkNd1cOU5gfqoabXFBScOfhY1tNU3HRKwqkRUrjg=; b=rzv7esr9vrYh8F oeHlb2naCd+KUrg5UQpdrscDCINjeQTTyE5DA90ng1WauCZQbSzS8moxbQNVeKRAZTyFdwLtuGms+ tC2mFNb5isJC9Q8smdd6sTc6hnHUujI5ljtObRFooo/ZVdBtwLwmmCPdd/Q6p9mUVvkIDl+uQUlRE 0nc2lf6rZe9EDuj/N4OjUErrz6T6R09Oa3gsH1EltCX4o4GekATdbqI+kP0N6iYT6j2BKrfe5s0Wz LaEdWh5J+FZMmRSXQ8T/TYM7BCTZzBJglRuKsw1N+H46KJpLUVbXBxQXFGjenZq+LeHs+jra8/jxr IeWcGjFxtFbDmMK57k9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwWEM-007IxF-GJ; Sun, 12 Dec 2021 21:18:02 +0000 Received: from mout-p-201.mailbox.org ([80.241.56.171]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwWEI-007Ivg-Kr for openwrt-devel@lists.openwrt.org; Sun, 12 Dec 2021 21:18:00 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [80.241.60.233]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4JByCj2RzqzQkM3; Sun, 12 Dec 2021 22:17:53 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1639343871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uGf05z5VQHIVb8tMAJMgGJRfKDI0Ma7eYqoMHSioRjI=; b=JiOmZqYGrol0E1OFt7x5SIYl5d9sn6+LyxITa5t+vZ5diN62uIOep+nK8eR5dg7ay7Shlp 3PwTBiv8Vg/RutEh9lrPiHn2vkaqeAhIROKX7Q4jTn5gqKuqy7TVkxK1eWSpduvJXfjj4U 5Muv8YPIFY63l/jta4lXxQ0OOxVhUtG1N5hSFhg/4GRdsjoYjbE0XMupYnpKU0vYEu1Dws O29LSCwdU8Op0FX655LLpNJYv+uSrsUz+TZUkTnf8/6iGnNo0rMrteRVt7ycyvbFS65BNs MJz+oiLaivQ1AXG4aQG5Ad1FQXEtHTpplBX0ZxNviiC0tP+7PJZ5vUfMKzQI1Q== From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: Hauke Mehrtens Subject: [PATCH 2/3] libnl-tiny: Add NLA_PUT_S32() Date: Sun, 12 Dec 2021 22:17:34 +0100 Message-Id: <20211212211735.2457250-2-hauke@hauke-m.de> In-Reply-To: <20211212211735.2457250-1-hauke@hauke-m.de> References: <20211212211735.2457250-1-hauke@hauke-m.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211212_131758_927340_61F9408F X-CRM114-Status: GOOD ( 11.39 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This function is used by iw 5.16. Signed-off-by: Hauke Mehrtens --- package/libs/libnl-tiny/Makefile | 2 +- .../patches/0001-attr.h-Add-NLA_PUT_S32.patch | 62 +++++++++++++++++++ 2 files changed, 63 insertions(+), 1 [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This function is used by iw 5.16. Signed-off-by: Hauke Mehrtens --- package/libs/libnl-tiny/Makefile | 2 +- .../patches/0001-attr.h-Add-NLA_PUT_S32.patch | 62 +++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 package/libs/libnl-tiny/patches/0001-attr.h-Add-NLA_PUT_S32.patch diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile index bdb496c48e60..7fe8b5c5f708 100644 --- a/package/libs/libnl-tiny/Makefile +++ b/package/libs/libnl-tiny/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnl-tiny -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git diff --git a/package/libs/libnl-tiny/patches/0001-attr.h-Add-NLA_PUT_S32.patch b/package/libs/libnl-tiny/patches/0001-attr.h-Add-NLA_PUT_S32.patch new file mode 100644 index 000000000000..517d4b5c1565 --- /dev/null +++ b/package/libs/libnl-tiny/patches/0001-attr.h-Add-NLA_PUT_S32.patch @@ -0,0 +1,62 @@ +From f4e190cfed119fcf8db4870b0a86dd6ba95034a8 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 21 Nov 2021 00:08:55 +0100 +Subject: [PATCH] attr.h: Add NLA_PUT_S32 + +This function is used by iw now. + +Signed-off-by: Hauke Mehrtens +--- + include/netlink/attr.h | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +--- a/include/netlink/attr.h ++++ b/include/netlink/attr.h +@@ -299,6 +299,31 @@ static inline uint16_t nla_get_u16(struc + } + + /** ++ * Add 32 bit signed integer attribute to netlink message. ++ * @arg msg Netlink message. ++ * @arg attrtype Attribute type. ++ * @arg value Numeric value to store as payload. ++ * ++ * @see nla_put ++ * @return 0 on success or a negative error code. ++ */ ++static inline int nla_put_s32(struct nl_msg *msg, int attrtype, int32_t value) ++{ ++ return nla_put(msg, attrtype, sizeof(int32_t), &value); ++} ++ ++/** ++ * Return payload of 32 bit signed integer attribute. ++ * @arg nla 32 bit integer attribute. ++ * ++ * @return Payload as 32 bit integer. ++ */ ++static inline int32_t nla_get_s32(struct nlattr *nla) ++{ ++ return *(int32_t *) nla_data(nla); ++} ++ ++/** + * Add 32 bit integer attribute to netlink message. + * @arg msg Netlink message. + * @arg attrtype Attribute type. +@@ -632,6 +657,15 @@ static inline size_t nla_strlcpy(char *d + NLA_PUT_TYPE(msg, uint16_t, attrtype, value) + + /** ++ * Add 32 bit signed integer attribute to netlink message. ++ * @arg msg Netlink message. ++ * @arg attrtype Attribute type. ++ * @arg value Numeric value. ++ */ ++#define NLA_PUT_S32(msg, attrtype, value) \ ++ NLA_PUT_TYPE(msg, int32_t, attrtype, value) ++ ++/** + * Add 32 bit integer attribute to netlink message. + * @arg msg Netlink message. + * @arg attrtype Attribute type. From patchwork Sun Dec 12 21:17:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1567058 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=MDNzXRQz; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=DsYoQbjI; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JByHB11P8z9sRN for ; Mon, 13 Dec 2021 08:20:52 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hH/sxxsfd0A3JbV6aCak7Cjjv2Y02q75s2FHPJ9J7EY=; b=MDNzXRQzYzP9Jx r5kSaDHlgB/dX2H5F9/Jc2alEW2FgkypnuD5YQxDwbg5dGKLWG/wMyViOGm2R4ZyR/xhsdL/bpclK xdIYkxOM9PjGAe2Qb4uVhJ9LTu1btliw6/Dby6EA2rMscyM6m/2y0fdWAnffGQeEhM7vrBx8mUTds kJ95gx2KTMRB+c6xFzNY2SqDq9Vzi/E+CbZkaaqNMpROJRa8m2uWW7SHvx0kNhQqItMXoTGgPvFks n4ZU1p7pqT88x75ZkShHj1c5xRYij3v/gFAcD8UoFxm/eSbVvxjO3u46Wf55MHDwV+l4zJ5Oepge3 1PckCwT7Pp8VMZPt4ltQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwWEn-007IyV-JN; Sun, 12 Dec 2021 21:18:29 +0000 Received: from mout-p-102.mailbox.org ([2001:67c:2050::465:102]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwWEJ-007IwE-O0 for openwrt-devel@lists.openwrt.org; Sun, 12 Dec 2021 21:18:03 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:105:465:1:3:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4JByCk5zClzQjbb; Sun, 12 Dec 2021 22:17:54 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1639343872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OZU9UTPghczy8DGh1IXJyq/TU5PCyNKNVdf2+I3+Jc4=; b=DsYoQbjI2HOWzYr+vFHYkD0J9OQLRNOzvpOxTVNXrBB/uf+GodfvjKvOOAZTmIBeBywCeH wUwoSkUxSe+hnxjbD91Ie+f6f7D4b+g+62dBKB9bcmgvF3IVZ0Db3d/gYmIpooZVmV0nYy FSQsDr9hw77fAtYxm6ER8UqYigmN7T2s5TDvDSvevgicTBOqZWrKf02jsbiKjpLCLMGLgr hP8EMRmEGejpWPbY7CZAr7I6W85iKumORP1IVWlgruMlX4C+2W20TXeffEMKX5PXsPaCHk l6oZB/3b9AJ+0g5dlerL2P0jBaGumrzWYV39vzseXavdyASOoLleWgiNY80uWQ== From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: Hauke Mehrtens Subject: [PATCH 3/3] iw: Update to version 5.16 Date: Sun, 12 Dec 2021 22:17:35 +0100 Message-Id: <20211212211735.2457250-3-hauke@hauke-m.de> In-Reply-To: <20211212211735.2457250-1-hauke@hauke-m.de> References: <20211212211735.2457250-1-hauke@hauke-m.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211212_131800_217328_8D6A374F X-CRM114-Status: GOOD ( 28.77 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Revert a commit to allow providing CFLAGS and LIBS from OpenWrt package Makefile. This downgrades the nl80211.h to kernel 5.15 and removes FILS_CRYPTO_OFFLOAD. This is needed to make it compatible with our patches mac80211 from kernel 5.15 Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [2001:67c:2050:0:0:0:465:102 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Revert a commit to allow providing CFLAGS and LIBS from OpenWrt package Makefile. This downgrades the nl80211.h to kernel 5.15 and removes FILS_CRYPTO_OFFLOAD. This is needed to make it compatible with our patches mac80211 from kernel 5.15 Signed-off-by: Hauke Mehrtens --- package/network/utils/iw/Makefile | 13 +- .../utils/iw/patches/001-nl80211_h_sync.patch | 512 ++++++------------ ...ow-specifying-CFLAGS-LIBS-externally.patch | 68 +++ .../utils/iw/patches/200-reduce_size.patch | 34 +- 4 files changed, 260 insertions(+), 367 deletions(-) create mode 100644 package/network/utils/iw/patches/010-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile index 8e11046189c0..da2b5564168f 100644 --- a/package/network/utils/iw/Makefile +++ b/package/network/utils/iw/Makefile @@ -8,13 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iw -PKG_VERSION:=5.9-8fab0c9e -PKG_RELEASE:=$(AUTORELEASE) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git -PKG_SOURCE_VERSION:=8fab0c9ee9db217587a58efcc37421c86edcb638 -PKG_MIRROR_HASH:=797b322bc03952f3127ae0a7da476c14ada1bbe9a9ae234a56dd6f864c568e16 +PKG_VERSION:=5.16 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@KERNEL/software/network/iw +PKG_HASH:=4c44e42762f903f9094ba5a598998c800a97a62afd6fd31ec1e0a799e308659c PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iw/patches/001-nl80211_h_sync.patch b/package/network/utils/iw/patches/001-nl80211_h_sync.patch index f788e6915f96..6d81dd0da1ef 100644 --- a/package/network/utils/iw/patches/001-nl80211_h_sync.patch +++ b/package/network/utils/iw/patches/001-nl80211_h_sync.patch @@ -1,375 +1,203 @@ --- a/nl80211.h +++ b/nl80211.h -@@ -11,7 +11,7 @@ - * Copyright 2008 Jouni Malinen - * Copyright 2008 Colin McCabe - * Copyright 2015-2017 Intel Deutschland GmbH -- * Copyright (C) 2018-2020 Intel Corporation -+ * Copyright (C) 2018-2021 Intel Corporation - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above -@@ -655,6 +655,9 @@ - * When a security association was established on an 802.1X network using - * fast transition, this event should be followed by an - * %NL80211_CMD_PORT_AUTHORIZED event. -+ * Following a %NL80211_CMD_ROAM event userspace can issue -+ * %NL80211_CMD_GET_SCAN in order to obtain the scan information for the -+ * new BSS the card/driver roamed to. - * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify - * userspace that a connection was dropped by the AP or due to other - * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and -@@ -757,7 +760,8 @@ - * of any other interfaces, and other interfaces will again take - * precedence when they are used. +@@ -301,29 +301,6 @@ + */ + + /** +- * DOC: FILS shared key crypto offload +- * +- * This feature is applicable to drivers running in AP mode. +- * +- * FILS shared key crypto offload can be advertised by drivers by setting +- * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD flag. The drivers that support +- * FILS shared key crypto offload should be able to encrypt and decrypt +- * association frames for FILS shared key authentication as per IEEE 802.11ai. +- * With this capability, for FILS key derivation, drivers depend on userspace. +- * +- * After FILS key derivation, userspace shares the FILS AAD details with the +- * driver and the driver stores the same to use in decryption of association +- * request and in encryption of association response. The below parameters +- * should be given to the driver in %NL80211_CMD_SET_FILS_AAD. +- * %NL80211_ATTR_MAC - STA MAC address, used for storing FILS AAD per STA +- * %NL80211_ATTR_FILS_KEK - Used for encryption or decryption +- * %NL80211_ATTR_FILS_NONCES - Used for encryption or decryption +- * (STA Nonce 16 bytes followed by AP Nonce 16 bytes) +- * +- * Once the association is done, the driver cleans the FILS AAD data. +- */ +- +-/** + * enum nl80211_commands - supported nl80211 commands * -- * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface. -+ * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface -+ * (no longer supported). + * @NL80211_CMD_UNSPEC: unspecified command to catch errors +@@ -360,10 +337,7 @@ + * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes + * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from + * userspace to request deletion of a virtual interface, then requires +- * attribute %NL80211_ATTR_IFINDEX. If multiple BSSID advertisements are +- * enabled using %NL80211_ATTR_MBSSID_CONFIG, %NL80211_ATTR_MBSSID_ELEMS, +- * and if this command is used for the transmitting interface, then all +- * the non-transmitting interfaces are deleted as well. ++ * attribute %NL80211_ATTR_IFINDEX. * - * @NL80211_CMD_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform - * multicast to unicast conversion. When enabled, all multicast packets -@@ -1177,6 +1181,25 @@ - * includes the contents of the frame. %NL80211_ATTR_ACK flag is included - * if the recipient acknowledged the frame. + * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified + * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. +@@ -1226,12 +1200,6 @@ + * @NL80211_CMD_COLOR_CHANGE_COMPLETED: Notify userland that the color change + * has completed * -+ * @NL80211_CMD_SET_SAR_SPECS: SAR power limitation configuration is -+ * passed using %NL80211_ATTR_SAR_SPEC. %NL80211_ATTR_WIPHY is used to -+ * specify the wiphy index to be applied to. -+ * -+ * @NL80211_CMD_OBSS_COLOR_COLLISION: This notification is sent out whenever -+ * mac80211/drv detects a bss color collision. -+ * -+ * @NL80211_CMD_COLOR_CHANGE_REQUEST: This command is used to indicate that -+ * userspace wants to change the BSS color. -+ * -+ * @NL80211_CMD_COLOR_CHANGE_STARTED: Notify userland, that a color change has -+ * started -+ * -+ * @NL80211_CMD_COLOR_CHANGE_ABORTED: Notify userland, that the color change has -+ * been aborted -+ * -+ * @NL80211_CMD_COLOR_CHANGE_COMPLETED: Notify userland that the color change -+ * has completed -+ * +- * @NL80211_CMD_SET_FILS_AAD: Set FILS AAD data to the driver using - +- * &NL80211_ATTR_MAC - for STA MAC address +- * &NL80211_ATTR_FILS_KEK - for KEK +- * &NL80211_ATTR_FILS_NONCES - for FILS Nonces +- * (STA Nonce 16 bytes followed by AP Nonce 16 bytes) +- * * @NL80211_CMD_MAX: highest used command number * @__NL80211_CMD_AFTER_LAST: internal use */ -@@ -1407,6 +1430,16 @@ enum nl80211_commands { +@@ -1472,8 +1440,6 @@ enum nl80211_commands { + NL80211_CMD_COLOR_CHANGE_ABORTED, + NL80211_CMD_COLOR_CHANGE_COMPLETED, - NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS, - -+ NL80211_CMD_SET_SAR_SPECS, -+ -+ NL80211_CMD_OBSS_COLOR_COLLISION, -+ -+ NL80211_CMD_COLOR_CHANGE_REQUEST, -+ -+ NL80211_CMD_COLOR_CHANGE_STARTED, -+ NL80211_CMD_COLOR_CHANGE_ABORTED, -+ NL80211_CMD_COLOR_CHANGE_COMPLETED, -+ +- NL80211_CMD_SET_FILS_AAD, +- /* add new commands above here */ /* used to define NL80211_CMD_MAX below */ -@@ -1750,8 +1783,9 @@ enum nl80211_commands { - * specify just a single bitrate, which is to be used for the beacon. - * The driver must also specify support for this with the extended - * features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY, -- * NL80211_EXT_FEATURE_BEACON_RATE_HT and -- * NL80211_EXT_FEATURE_BEACON_RATE_VHT. -+ * NL80211_EXT_FEATURE_BEACON_RATE_HT, -+ * NL80211_EXT_FEATURE_BEACON_RATE_VHT and -+ * NL80211_EXT_FEATURE_BEACON_RATE_HE. - * - * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain - * at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME. -@@ -1955,8 +1989,15 @@ enum nl80211_commands { - * @NL80211_ATTR_PROBE_RESP: Probe Response template data. Contains the entire - * probe-response frame. The DA field in the 802.11 header is zero-ed out, - * to be filled by the FW. -- * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable -- * this feature. Currently, only supported in mac80211 drivers. -+ * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable -+ * this feature during association. This is a flag attribute. -+ * Currently only supported in mac80211 drivers. -+ * @NL80211_ATTR_DISABLE_VHT: Force VHT capable interfaces to disable -+ * this feature during association. This is a flag attribute. -+ * Currently only supported in mac80211 drivers. -+ * @NL80211_ATTR_DISABLE_HE: Force HE capable interfaces to disable -+ * this feature during association. This is a flag attribute. -+ * Currently only supported in mac80211 drivers. - * @NL80211_ATTR_HT_CAPABILITY_MASK: Specify which bits of the - * ATTR_HT_CAPABILITY to which attention should be paid. - * Currently, only mac80211 NICs support this feature. -@@ -2077,7 +2118,8 @@ enum nl80211_commands { - * until the channel switch event. - * @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission - * must be blocked on the current channel (before the channel switch -- * operation). -+ * operation). Also included in the channel switch started event if quiet -+ * was requested by the AP. - * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information - * for the time while performing a channel switch. - * @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel -@@ -2527,6 +2569,33 @@ enum nl80211_commands { - * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in - * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT. +@@ -2627,17 +2593,8 @@ enum nl80211_commands { + * @NL80211_ATTR_COLOR_CHANGE_ELEMS: Nested set of attributes containing the IE + * information for the time while performing a color switch. * -+ * @NL80211_ATTR_SAE_PWE: Indicates the mechanism(s) allowed for SAE PWE -+ * derivation in WPA3-Personal networks which are using SAE authentication. -+ * This is a u8 attribute that encapsulates one of the values from -+ * &enum nl80211_sae_pwe_mechanism. -+ * -+ * @NL80211_ATTR_SAR_SPEC: SAR power limitation specification when -+ * used with %NL80211_CMD_SET_SAR_SPECS. The message contains fields -+ * of %nl80211_sar_attrs which specifies the sar type and related -+ * sar specs. Sar specs contains array of %nl80211_sar_specs_attrs. -+ * -+ * @NL80211_ATTR_RECONNECT_REQUESTED: flag attribute, used with deauth and -+ * disassoc events to indicate that an immediate reconnect to the AP -+ * is desired. -+ * -+ * @NL80211_ATTR_OBSS_COLOR_BITMAP: bitmap of the u64 BSS colors for the -+ * %NL80211_CMD_OBSS_COLOR_COLLISION event. -+ * -+ * @NL80211_ATTR_COLOR_CHANGE_COUNT: u8 attribute specifying the number of TBTT's -+ * until the color switch event. -+ * @NL80211_ATTR_COLOR_CHANGE_COLOR: u8 attribute specifying the color that we are -+ * switching to -+ * @NL80211_ATTR_COLOR_CHANGE_ELEMS: Nested set of attributes containing the IE -+ * information for the time while performing a color switch. -+ * +- * @NL80211_ATTR_MBSSID_CONFIG: Nested attribute for multiple BSSID +- * advertisements (MBSSID) parameters in AP mode. +- * Kernel uses this attribute to indicate the driver's support for MBSSID +- * and enhanced multi-BSSID advertisements (EMA AP) to the userspace. +- * Userspace should use this attribute to configure per interface MBSSID +- * parameters. +- * See &enum nl80211_mbssid_config_attributes for details. +- * +- * @NL80211_ATTR_MBSSID_ELEMS: Nested parameter to pass multiple BSSID elements. +- * Mandatory parameter for the transmitting interface to enable MBSSID. +- * Optional for the non-transmitting interfaces. + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce + * transmit power to stay within regulatory limits. u32, dBi. -+ * + * * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined - * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -3016,6 +3085,22 @@ enum nl80211_attrs { - NL80211_ATTR_S1G_CAPABILITY, - NL80211_ATTR_S1G_CAPABILITY_MASK, +@@ -3142,8 +3099,7 @@ enum nl80211_attrs { + NL80211_ATTR_COLOR_CHANGE_COLOR, + NL80211_ATTR_COLOR_CHANGE_ELEMS, -+ NL80211_ATTR_SAE_PWE, -+ -+ NL80211_ATTR_RECONNECT_REQUESTED, -+ -+ NL80211_ATTR_SAR_SPEC, -+ -+ NL80211_ATTR_DISABLE_HE, -+ -+ NL80211_ATTR_OBSS_COLOR_BITMAP, -+ -+ NL80211_ATTR_COLOR_CHANGE_COUNT, -+ NL80211_ATTR_COLOR_CHANGE_COLOR, -+ NL80211_ATTR_COLOR_CHANGE_ELEMS, -+ +- NL80211_ATTR_MBSSID_CONFIG, +- NL80211_ATTR_MBSSID_ELEMS, + NL80211_ATTR_WIPHY_ANTENNA_GAIN, -+ + /* add attributes here, update the policy in nl80211.c */ - __NL80211_ATTR_AFTER_LAST, -@@ -3613,6 +3698,8 @@ enum nl80211_mpath_info { - * defined - * @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities (__le16), - * given for all 6 GHz band channels -+ * @NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS: vendor element capabilities that are -+ * advertised on this band/for this iftype (binary) - * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use +@@ -4978,7 +4934,6 @@ enum nl80211_txrate_gi { + * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz) + * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz) + * @NL80211_BAND_S1GHZ: around 900MHz, supported by S1G PHYs +- * @NL80211_BAND_LC: light communication band (placeholder) + * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace + * since newer kernel versions may support more bands */ - enum nl80211_band_iftype_attr { -@@ -3624,6 +3711,7 @@ enum nl80211_band_iftype_attr { - NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET, - NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE, - NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA, -+ NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS, +@@ -4988,7 +4943,6 @@ enum nl80211_band { + NL80211_BAND_60GHZ, + NL80211_BAND_6GHZ, + NL80211_BAND_S1GHZ, +- NL80211_BAND_LC, - /* keep last */ - __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST, -@@ -5896,6 +5984,22 @@ enum nl80211_feature_flags { - * @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports - * unsolicited broadcast probe response transmission + NUM_NL80211_BANDS, + }; +@@ -6046,11 +6000,6 @@ enum nl80211_feature_flags { + * @NL80211_EXT_FEATURE_BSS_COLOR: The driver supports BSS color collision + * detection and change announcemnts. * -+ * @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate -+ * configuration (AP/mesh) with HE rates. -+ * -+ * @NL80211_EXT_FEATURE_SECURE_LTF: Device supports secure LTF measurement -+ * exchange protocol. -+ * -+ * @NL80211_EXT_FEATURE_SECURE_RTT: Device supports secure RTT measurement -+ * exchange protocol. -+ * -+ * @NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE: Device supports management -+ * frame protection for all management frames exchanged during the -+ * negotiation and range measurement procedure. -+ * -+ * @NL80211_EXT_FEATURE_BSS_COLOR: The driver supports BSS color collision -+ * detection and change announcemnts. -+ * +- * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD: Driver running in AP mode supports +- * FILS encryption and decryption for (Re)Association Request and Response +- * frames. Userspace has to share FILS AAD details to the driver by using +- * @NL80211_CMD_SET_FILS_AAD. +- * * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index. */ -@@ -5956,6 +6060,11 @@ enum nl80211_ext_feature_index { - NL80211_EXT_FEATURE_SAE_OFFLOAD_AP, - NL80211_EXT_FEATURE_FILS_DISCOVERY, - NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP, -+ NL80211_EXT_FEATURE_BEACON_RATE_HE, -+ NL80211_EXT_FEATURE_SECURE_LTF, -+ NL80211_EXT_FEATURE_SECURE_RTT, -+ NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE, -+ NL80211_EXT_FEATURE_BSS_COLOR, +@@ -6116,7 +6065,6 @@ enum nl80211_ext_feature_index { + NL80211_EXT_FEATURE_SECURE_RTT, + NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE, + NL80211_EXT_FEATURE_BSS_COLOR, +- NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD, /* add new features before the definition below */ NUM_NL80211_EXT_FEATURES, -@@ -6253,11 +6362,13 @@ struct nl80211_vendor_cmd_info { - * @NL80211_TDLS_PEER_HT: TDLS peer is HT capable. - * @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable. - * @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable. -+ * @NL80211_TDLS_PEER_HE: TDLS peer is HE capable. - */ - enum nl80211_tdls_peer_capability { - NL80211_TDLS_PEER_HT = 1<<0, - NL80211_TDLS_PEER_VHT = 1<<1, - NL80211_TDLS_PEER_WMM = 1<<2, -+ NL80211_TDLS_PEER_HE = 1<<3, +@@ -7406,60 +7354,4 @@ enum nl80211_sar_specs_attrs { + NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1, }; - /** -@@ -6849,6 +6960,12 @@ enum nl80211_peer_measurement_ftm_capa { - * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor - * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based - * ranging will be used. -+ * @NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK: negotiate for LMR feedback. Only -+ * valid if either %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED or -+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set. -+ * @NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR: optional. The BSS color of the -+ * responder. Only valid if %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED -+ * or %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED is set. - * - * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal - * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number -@@ -6867,6 +6984,8 @@ enum nl80211_peer_measurement_ftm_req { - NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC, - NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED, - NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED, -+ NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK, -+ NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR, - - /* keep last */ - NUM_NL80211_PMSR_FTM_REQ_ATTR, -@@ -7124,4 +7243,115 @@ enum nl80211_unsol_bcast_probe_resp_attr - NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX = - __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1 - }; -+ -+/** -+ * enum nl80211_sae_pwe_mechanism - The mechanism(s) allowed for SAE PWE -+ * derivation. Applicable only when WPA3-Personal SAE authentication is -+ * used. -+ * -+ * @NL80211_SAE_PWE_UNSPECIFIED: not specified, used internally to indicate that -+ * attribute is not present from userspace. -+ * @NL80211_SAE_PWE_HUNT_AND_PECK: hunting-and-pecking loop only -+ * @NL80211_SAE_PWE_HASH_TO_ELEMENT: hash-to-element only -+ * @NL80211_SAE_PWE_BOTH: both hunting-and-pecking loop and hash-to-element -+ * can be used. -+ */ -+enum nl80211_sae_pwe_mechanism { -+ NL80211_SAE_PWE_UNSPECIFIED, -+ NL80211_SAE_PWE_HUNT_AND_PECK, -+ NL80211_SAE_PWE_HASH_TO_ELEMENT, -+ NL80211_SAE_PWE_BOTH, -+}; -+ -+/** -+ * enum nl80211_sar_type - type of SAR specs -+ * -+ * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit -+ * -+ */ -+enum nl80211_sar_type { -+ NL80211_SAR_TYPE_POWER, -+ -+ /* add new type here */ -+ -+ /* Keep last */ -+ NUM_NL80211_SAR_TYPE, -+}; -+ -+/** -+ * enum nl80211_sar_attrs - Attributes for SAR spec -+ * -+ * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type. -+ * -+ * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power -+ * limit specifications. Each specification contains a set -+ * of %nl80211_sar_specs_attrs. -+ * -+ * For SET operation, it contains array of %NL80211_SAR_ATTR_SPECS_POWER -+ * and %NL80211_SAR_ATTR_SPECS_RANGE_INDEX. -+ * -+ * For sar_capa dump, it contains array of -+ * %NL80211_SAR_ATTR_SPECS_START_FREQ -+ * and %NL80211_SAR_ATTR_SPECS_END_FREQ. -+ * -+ * @__NL80211_SAR_ATTR_LAST: Internal -+ * @NL80211_SAR_ATTR_MAX: highest sar attribute -+ * -+ * These attributes are used with %NL80211_CMD_SET_SAR_SPEC -+ */ -+enum nl80211_sar_attrs { -+ __NL80211_SAR_ATTR_INVALID, -+ -+ NL80211_SAR_ATTR_TYPE, -+ NL80211_SAR_ATTR_SPECS, -+ -+ __NL80211_SAR_ATTR_LAST, -+ NL80211_SAR_ATTR_MAX = __NL80211_SAR_ATTR_LAST - 1, -+}; -+ -+/** -+ * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs -+ * -+ * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual -+ * power limit value in units of 0.25 dBm if type is -+ * NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm). -+ * 0 means userspace doesn't have SAR limitation on this associated range. -+ * -+ * @NL80211_SAR_ATTR_SPECS_RANGE_INDEX: Required (u32) value to specify the -+ * index of exported freq range table and the associated power limitation -+ * is applied to this range. -+ * -+ * Userspace isn't required to set all the ranges advertised by WLAN driver, -+ * and userspace can skip some certain ranges. These skipped ranges don't -+ * have SAR limitations, and they are same as setting the -+ * %NL80211_SAR_ATTR_SPECS_POWER to any unreasonable high value because any -+ * value higher than regulatory allowed value just means SAR power -+ * limitation is removed, but it's required to set at least one range. -+ * It's not allowed to set duplicated range in one SET operation. -+ * -+ * Every SET operation overwrites previous SET operation. -+ * -+ * @NL80211_SAR_ATTR_SPECS_START_FREQ: Required (u32) value to specify the start -+ * frequency of this range edge when registering SAR capability to wiphy. -+ * It's not a channel center frequency. The unit is kHz. -+ * -+ * @NL80211_SAR_ATTR_SPECS_END_FREQ: Required (u32) value to specify the end -+ * frequency of this range edge when registering SAR capability to wiphy. -+ * It's not a channel center frequency. The unit is kHz. -+ * -+ * @__NL80211_SAR_ATTR_SPECS_LAST: Internal -+ * @NL80211_SAR_ATTR_SPECS_MAX: highest sar specs attribute -+ */ -+enum nl80211_sar_specs_attrs { -+ __NL80211_SAR_ATTR_SPECS_INVALID, -+ -+ NL80211_SAR_ATTR_SPECS_POWER, -+ NL80211_SAR_ATTR_SPECS_RANGE_INDEX, -+ NL80211_SAR_ATTR_SPECS_START_FREQ, -+ NL80211_SAR_ATTR_SPECS_END_FREQ, -+ -+ __NL80211_SAR_ATTR_SPECS_LAST, -+ NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1, -+}; -+ +-/** +- * enum nl80211_mbssid_config_attributes - multiple BSSID (MBSSID) and enhanced +- * multi-BSSID advertisements (EMA) in AP mode. +- * Kernel uses some of these attributes to advertise driver's support for +- * MBSSID and EMA. +- * Remaining attributes should be used by the userspace to configure the +- * features. +- * +- * @__NL80211_MBSSID_CONFIG_ATTR_INVALID: Invalid +- * +- * @NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES: Used by the kernel to advertise +- * the maximum number of MBSSID interfaces supported by the driver. +- * Driver should indicate MBSSID support by setting +- * wiphy->mbssid_max_interfaces to a value more than or equal to 2. +- * +- * @NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY: Used by the kernel +- * to advertise the maximum profile periodicity supported by the driver +- * if EMA is enabled. Driver should indicate EMA support to the userspace +- * by setting wiphy->ema_max_profile_periodicity to +- * a non-zero value. +- * +- * @NL80211_MBSSID_CONFIG_ATTR_INDEX: Mandatory parameter to pass the index of +- * this BSS (u8) in the multiple BSSID set. +- * Value must be set to 0 for the transmitting interface and non-zero for +- * all non-transmitting interfaces. The userspace will be responsible +- * for using unique indices for the interfaces. +- * Range: 0 to wiphy->mbssid_max_interfaces-1. +- * +- * @NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX: Mandatory parameter for +- * a non-transmitted profile which provides the interface index (u32) of +- * the transmitted profile. The value must match one of the interface +- * indices advertised by the kernel. Optional if the interface being set up +- * is the transmitting one, however, if provided then the value must match +- * the interface index of the same. +- * +- * @NL80211_MBSSID_CONFIG_ATTR_EMA: Flag used to enable EMA AP feature. +- * Setting this flag is permitted only if the driver advertises EMA support +- * by setting wiphy->ema_max_profile_periodicity to non-zero. +- * +- * @__NL80211_MBSSID_CONFIG_ATTR_LAST: Internal +- * @NL80211_MBSSID_CONFIG_ATTR_MAX: highest attribute +- */ +-enum nl80211_mbssid_config_attributes { +- __NL80211_MBSSID_CONFIG_ATTR_INVALID, +- +- NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES, +- NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY, +- NL80211_MBSSID_CONFIG_ATTR_INDEX, +- NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX, +- NL80211_MBSSID_CONFIG_ATTR_EMA, +- +- /* keep last */ +- __NL80211_MBSSID_CONFIG_ATTR_LAST, +- NL80211_MBSSID_CONFIG_ATTR_MAX = __NL80211_MBSSID_CONFIG_ATTR_LAST - 1, +-}; +- #endif /* __LINUX_NL80211_H */ +--- a/info.c ++++ b/info.c +@@ -701,7 +701,6 @@ broken_combination: + ext_feat_print(tb, OPERATING_CHANNEL_VALIDATION, "Operating Channel Validation (OCV) support"); + ext_feat_print(tb, 4WAY_HANDSHAKE_AP_PSK, "AP mode PSK offload support"); + ext_feat_print(tb, BSS_COLOR, "BSS coloring support"); +- ext_feat_print(tb, FILS_CRYPTO_OFFLOAD, "FILS crypto offload"); + } + + if (tb_msg[NL80211_ATTR_COALESCE_RULE]) { diff --git a/package/network/utils/iw/patches/010-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch b/package/network/utils/iw/patches/010-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch new file mode 100644 index 000000000000..1254efa9c705 --- /dev/null +++ b/package/network/utils/iw/patches/010-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch @@ -0,0 +1,68 @@ +From 1f3706d10812d70adefe32fe0d7d3a3ec25374f0 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 21 Nov 2021 00:02:57 +0100 +Subject: Revert "iw: allow specifying CFLAGS/LIBS externally" + +This reverts commit 1325244b77d56fd7a16d1e35fdae0efc151920b1. + +The OpenWrt build system provides the CFLAGS and LIBS names from the +package Makefile to overwrite them for libnl-tiny. This is not possible +after this upstream change which we revert here any more + +Signed-off-by: Hauke Mehrtens +--- + Makefile | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -45,30 +45,30 @@ NLLIBNAME = libnl-1 + endif + + ifeq ($(NL2FOUND),Y) +-override CFLAGS += -DCONFIG_LIBNL20 +-override LIBS += -lnl-genl ++CFLAGS += -DCONFIG_LIBNL20 ++LIBS += -lnl-genl + NLLIBNAME = libnl-2.0 + endif + + ifeq ($(NL3xFOUND),Y) + # libnl 3.2 might be found as 3.2 and 3.0 + NL3FOUND = N +-override CFLAGS += -DCONFIG_LIBNL30 +-override LIBS += -lnl-genl-3 ++CFLAGS += -DCONFIG_LIBNL30 ++LIBS += -lnl-genl-3 + NLLIBNAME = libnl-3.0 + endif + + ifeq ($(NL3FOUND),Y) +-override CFLAGS += -DCONFIG_LIBNL30 +-override LIBS += -lnl-genl ++CFLAGS += -DCONFIG_LIBNL30 ++LIBS += -lnl-genl + NLLIBNAME = libnl-3.0 + endif + + # nl-3.1 has a broken libnl-gnl-3.1.pc file + # as show by pkg-config --debug --libs --cflags --exact-version=3.1 libnl-genl-3.1;echo $? + ifeq ($(NL31FOUND),Y) +-override CFLAGS += -DCONFIG_LIBNL30 +-override LIBS += -lnl-genl ++CFLAGS += -DCONFIG_LIBNL30 ++LIBS += -lnl-genl + NLLIBNAME = libnl-3.1 + endif + +@@ -76,8 +76,8 @@ ifeq ($(NLLIBNAME),) + $(error Cannot find development files for any supported version of libnl) + endif + +-override LIBS += $(shell $(PKG_CONFIG) --libs $(NLLIBNAME)) +-override CFLAGS += $(shell $(PKG_CONFIG) --cflags $(NLLIBNAME)) ++LIBS += $(shell $(PKG_CONFIG) --libs $(NLLIBNAME)) ++CFLAGS += $(shell $(PKG_CONFIG) --cflags $(NLLIBNAME)) + endif # NO_PKG_CONFIG + + ifeq ($(V),1) diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch index c50a4a4d3899..d0e837c69532 100644 --- a/package/network/utils/iw/patches/200-reduce_size.patch +++ b/package/network/utils/iw/patches/200-reduce_size.patch @@ -38,7 +38,7 @@ --- a/info.c +++ b/info.c -@@ -216,6 +216,7 @@ next: +@@ -215,6 +215,7 @@ next: } } @@ -46,7 +46,7 @@ if (tb_band[NL80211_BAND_ATTR_RATES]) { printf("\t\tBitrates (non-HT):\n"); nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) { -@@ -232,6 +233,7 @@ next: +@@ -231,6 +232,7 @@ next: printf("\n"); } } @@ -54,7 +54,7 @@ } } -@@ -297,6 +299,7 @@ next: +@@ -296,6 +298,7 @@ next: printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage); } @@ -62,7 +62,7 @@ if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) { int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32); int i; -@@ -308,6 +311,7 @@ next: +@@ -307,6 +310,7 @@ next: cipher_name(ciphers[i])); } } @@ -70,21 +70,19 @@ if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] && tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX]) -@@ -327,11 +331,13 @@ next: - printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); - } +@@ -324,9 +328,11 @@ next: + print_iftype_list("\tSupported interface modes", "\t\t", + tb_msg[NL80211_ATTR_SUPPORTED_IFTYPES]); +#ifdef IW_FULL - if (tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES]) { - printf("\tsoftware interface modes (can always be added):\n"); - nla_for_each_nested(nl_mode, tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES], rem_mode) - printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); - } + if (tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES]) + print_iftype_list("\tsoftware interface modes (can always be added)", + "\t\t", tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES]); +#endif if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) { struct nlattr *nl_combi; -@@ -428,6 +434,7 @@ broken_combination: +@@ -416,6 +422,7 @@ broken_combination: printf("\tinterface combinations are not supported\n"); } @@ -92,7 +90,7 @@ if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) { printf("\tSupported commands:\n"); nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd) -@@ -525,6 +532,7 @@ broken_combination: +@@ -513,6 +520,7 @@ broken_combination: printf("\t\t * wake up on TCP connection\n"); } } @@ -100,7 +98,7 @@ if (tb_msg[NL80211_ATTR_ROAM_SUPPORT]) printf("\tDevice supports roaming.\n"); -@@ -563,6 +571,7 @@ broken_combination: +@@ -551,6 +559,7 @@ broken_combination: } } @@ -108,7 +106,7 @@ if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) { unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]); -@@ -627,6 +636,7 @@ broken_combination: +@@ -615,6 +624,7 @@ broken_combination: if (features & NL80211_FEATURE_ND_RANDOM_MAC_ADDR) printf("\tDevice supports randomizing MAC-addr in net-detect scans.\n"); } @@ -116,7 +114,7 @@ if (tb_msg[NL80211_ATTR_TDLS_SUPPORT]) printf("\tDevice supports T-DLS.\n"); -@@ -762,6 +772,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP +@@ -751,6 +761,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP "List all wireless devices and their capabilities."); TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL); @@ -124,7 +122,7 @@ static int handle_commands(struct nl80211_state *state, struct nl_msg *msg, int argc, char **argv, enum id_input id) { -@@ -773,6 +784,7 @@ static int handle_commands(struct nl8021 +@@ -762,6 +773,7 @@ static int handle_commands(struct nl8021 } TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands, "list all known commands and their decimal & hex value");