From 2bc192c3f46dadc7cfbcd7e1ad62b1a34d6aca10 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 14 Jun 2021 20:33:04 +0200 Subject: [PATCH 1/8] OpenWrt v21.02.0-rc3: adjust config defaults Signed-off-by: Hauke Mehrtens --- feeds.conf.default | 9 ++++----- include/version.mk | 6 +++--- package/base-files/image-config.in | 4 ++-- version | 1 + version.date | 1 + 5 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 version create mode 100644 version.date diff --git a/feeds.conf.default b/feeds.conf.default index 98bf97232d..5b4ad8cef3 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,5 +1,4 @@ -src-git packages https://git.openwrt.org/feed/packages.git;openwrt-21.02 -src-git luci https://git.openwrt.org/project/luci.git;openwrt-21.02 -src-git routing https://git.openwrt.org/feed/routing.git;openwrt-21.02 -src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02 -#src-link custom /usr/src/openwrt/custom-feed +src-git packages https://git.openwrt.org/feed/packages.git^e738d2faf1c4ed68094f1d5da075d2d92fb35049 +src-git luci https://git.openwrt.org/project/luci.git^2778366916f815d4af9534218bef10aa3aad3c01 +src-git routing https://git.openwrt.org/feed/routing.git^2baff33918c089fd3744c7192f8ae7a29c47a8d7 +src-git telephony https://git.openwrt.org/feed/telephony.git^ee64ec42e981e1f9e5a21cd3478497987ff76680 diff --git a/include/version.mk b/include/version.mk index a4b47c8a57..ddbf22922b 100644 --- a/include/version.mk +++ b/include/version.mk @@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \ sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) -VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02-SNAPSHOT) +VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.0-rc3) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) -VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) +VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r16172-2aba3e9784) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) -VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02-SNAPSHOT) +VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02.0-rc3) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt) diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 1f06332b00..7a8840fd41 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -183,7 +183,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "https://downloads.openwrt.org/releases/21.02-SNAPSHOT" + default "https://downloads.openwrt.org/releases/21.02.0-rc3" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -259,7 +259,7 @@ if VERSIONOPT config VERSION_CODE_FILENAMES bool prompt "Revision code in filenames" - default y + default n help Enable this to include the revision identifier or the configured version code into the firmware image, SDK- and Image Builder archive diff --git a/version b/version new file mode 100644 index 0000000000..44428ad84b --- /dev/null +++ b/version @@ -0,0 +1 @@ +r16172-2aba3e9784 diff --git a/version.date b/version.date new file mode 100644 index 0000000000..d556c14ae8 --- /dev/null +++ b/version.date @@ -0,0 +1 @@ +1623621739 From aeb7b57798c7274a0bc0bc0a18ce5b2acb4a851f Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 14 Jun 2021 20:33:17 +0200 Subject: [PATCH 2/8] OpenWrt v21.02.0-rc3: revert to branch defaults Signed-off-by: Hauke Mehrtens --- feeds.conf.default | 9 +++++---- include/version.mk | 6 +++--- package/base-files/image-config.in | 4 ++-- version | 1 - version.date | 1 - 5 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 version delete mode 100644 version.date diff --git a/feeds.conf.default b/feeds.conf.default index 5b4ad8cef3..98bf97232d 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,4 +1,5 @@ -src-git packages https://git.openwrt.org/feed/packages.git^e738d2faf1c4ed68094f1d5da075d2d92fb35049 -src-git luci https://git.openwrt.org/project/luci.git^2778366916f815d4af9534218bef10aa3aad3c01 -src-git routing https://git.openwrt.org/feed/routing.git^2baff33918c089fd3744c7192f8ae7a29c47a8d7 -src-git telephony https://git.openwrt.org/feed/telephony.git^ee64ec42e981e1f9e5a21cd3478497987ff76680 +src-git packages https://git.openwrt.org/feed/packages.git;openwrt-21.02 +src-git luci https://git.openwrt.org/project/luci.git;openwrt-21.02 +src-git routing https://git.openwrt.org/feed/routing.git;openwrt-21.02 +src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02 +#src-link custom /usr/src/openwrt/custom-feed diff --git a/include/version.mk b/include/version.mk index ddbf22922b..a4b47c8a57 100644 --- a/include/version.mk +++ b/include/version.mk @@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \ sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) -VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.0-rc3) +VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02-SNAPSHOT) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) -VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r16172-2aba3e9784) +VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) -VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02.0-rc3) +VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02-SNAPSHOT) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt) diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 7a8840fd41..1f06332b00 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -183,7 +183,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "https://downloads.openwrt.org/releases/21.02.0-rc3" + default "https://downloads.openwrt.org/releases/21.02-SNAPSHOT" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -259,7 +259,7 @@ if VERSIONOPT config VERSION_CODE_FILENAMES bool prompt "Revision code in filenames" - default n + default y help Enable this to include the revision identifier or the configured version code into the firmware image, SDK- and Image Builder archive diff --git a/version b/version deleted file mode 100644 index 44428ad84b..0000000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -r16172-2aba3e9784 diff --git a/version.date b/version.date deleted file mode 100644 index d556c14ae8..0000000000 --- a/version.date +++ /dev/null @@ -1 +0,0 @@ -1623621739 From 25c75424e7b51a60dd7a06336257232173619e2c Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 7 Jun 2021 23:13:18 +0100 Subject: [PATCH 3/8] ugps: update to git HEAD 86ee86e nmea: parse $GPZDA sentences for date/time 8e12414 nmea: parse $GPGLL sentences for position 5e88403 ubus: display only available information Signed-off-by: Daniel Golle (cherry picked from commit 3a8b75b56927d679dbf1a86827ceffef35207281) --- package/utils/ugps/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/utils/ugps/Makefile b/package/utils/ugps/Makefile index 4ce64d9631..c70a7b7ea6 100644 --- a/package/utils/ugps/Makefile +++ b/package/utils/ugps/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ugps -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_URL=$(PROJECT_GIT)/project/ugps.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-08-29 -PKG_SOURCE_VERSION:=511a5b3c84fa715ef0305cf26c98619c12a4867a -PKG_MIRROR_HASH:=551d57b4c18da4c4695fa2f7a959c25a03be35d14cf872785e7db740f12366e2 +PKG_SOURCE_DATE:=2021-06-08 +PKG_SOURCE_VERSION:=5e88403fc0d39ae8a270d2c6c6e9c8a4d5232cf3 +PKG_MIRROR_HASH:=a3dfc2cc6def3b634d8b7cda9139926be3d876cf2faa5251c4821987954442a5 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0+ From 072d0afb8fa6359541568081c23fe2d8d411651c Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 27 May 2021 12:34:38 +0200 Subject: [PATCH 4/8] ugps: start also in case device is absent Don't bail out from init script in case the GPS device is missing. Some modems take time to come up, and some people may use things like 'kplex' to feed ugpsd. Hence it is better to always start ugpsd unconditionally and let procd's respawn take care of retrying. Signed-off-by: Daniel Golle (cherry picked from commit 3d026d24257a0e2f3170538d8a54d520315699a1) --- package/utils/ugps/files/ugps.init | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/package/utils/ugps/files/ugps.init b/package/utils/ugps/files/ugps.init index 3cd1ca1b8d..77c3603066 100644 --- a/package/utils/ugps/files/ugps.init +++ b/package/utils/ugps/files/ugps.init @@ -16,11 +16,16 @@ start_service() { local disabled="$(uci get gps.@gps[-1].disabled || echo 0)" [ "$disabled" == "0" ] || return + [ "$tty" ] || return - [ -c "$tty" ] || { - tty="/dev/$tty" - [ -c "$tty" ] || return - } + case "$tty" in + "/"*) + true + ;; + *) + tty="/dev/$tty" + ;; + esac procd_open_instance procd_set_param command "$PROG" From 05a8bf04ec43ce0f2b7d8e81caae3f00fb545c46 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 26 May 2021 20:00:14 +0200 Subject: [PATCH 5/8] mac80211: sync nl80211.h with upstream and backport a WPA3 related commit Fixes compatibility issues with the latest hostapd update Signed-off-by: Felix Fietkau (cherry-picked from commit 91abeebd3bd29a98de516e49260d61165096009a) --- .../patches/subsys/010-sync-nl80211_h.patch | 297 ++++++++++++++++++ ...ort-immediate-reconnect-request-hint.patch | 22 -- ...port-to-configure-SAE-PWE-value-to-d.patch | 74 +++++ .../500-mac80211_configure_antenna_gain.patch | 18 +- .../utils/iw/patches/001-nl80211_h_sync.patch | 279 +++++++++++++++- 5 files changed, 657 insertions(+), 33 deletions(-) create mode 100644 package/kernel/mac80211/patches/subsys/010-sync-nl80211_h.patch create mode 100644 package/kernel/mac80211/patches/subsys/302-cfg80211-Add-support-to-configure-SAE-PWE-value-to-d.patch diff --git a/package/kernel/mac80211/patches/subsys/010-sync-nl80211_h.patch b/package/kernel/mac80211/patches/subsys/010-sync-nl80211_h.patch new file mode 100644 index 0000000000..e1f66ac1c3 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/010-sync-nl80211_h.patch @@ -0,0 +1,297 @@ +--- a/include/uapi/linux/nl80211.h ++++ b/include/uapi/linux/nl80211.h +@@ -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. + * +- * @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_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform + * multicast to unicast conversion. When enabled, all multicast packets +@@ -1177,6 +1181,10 @@ + * includes the contents of the frame. %NL80211_ATTR_ACK flag is included + * if the recipient acknowledged the frame. + * ++ * @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_MAX: highest used command number + * @__NL80211_CMD_AFTER_LAST: internal use + */ +@@ -1407,6 +1415,8 @@ enum nl80211_commands { + + NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS, + ++ NL80211_CMD_SET_SAR_SPECS, ++ + /* add new commands above here */ + + /* used to define NL80211_CMD_MAX below */ +@@ -1750,8 +1760,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 +1966,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 +2095,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 +2546,20 @@ enum nl80211_commands { + * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in + * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT. + * ++ * @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. ++ * + * @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 +3049,14 @@ enum nl80211_attrs { + NL80211_ATTR_S1G_CAPABILITY, + NL80211_ATTR_S1G_CAPABILITY_MASK, + ++ NL80211_ATTR_SAE_PWE, ++ ++ NL80211_ATTR_RECONNECT_REQUESTED, ++ ++ NL80211_ATTR_SAR_SPEC, ++ ++ NL80211_ATTR_DISABLE_HE, ++ + /* add attributes here, update the policy in nl80211.c */ + + __NL80211_ATTR_AFTER_LAST, +@@ -5896,6 +5937,19 @@ enum nl80211_feature_flags { + * @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports + * unsolicited broadcast probe response transmission + * ++ * @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. ++ * + * @NUM_NL80211_EXT_FEATURES: number of extended features. + * @MAX_NL80211_EXT_FEATURES: highest extended feature index. + */ +@@ -5956,6 +6010,10 @@ 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, + + /* add new features before the definition below */ + NUM_NL80211_EXT_FEATURES, +@@ -6253,11 +6311,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, + }; + + /** +@@ -6849,6 +6909,9 @@ 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. + * + * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal + * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number +@@ -6867,6 +6930,7 @@ 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, + + /* keep last */ + NUM_NL80211_PMSR_FTM_REQ_ATTR, +@@ -7124,4 +7188,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, ++}; ++ + #endif /* __LINUX_NL80211_H */ diff --git a/package/kernel/mac80211/patches/subsys/300-cfg80211-support-immediate-reconnect-request-hint.patch b/package/kernel/mac80211/patches/subsys/300-cfg80211-support-immediate-reconnect-request-hint.patch index 7c442429cf..8fe8723cfe 100644 --- a/package/kernel/mac80211/patches/subsys/300-cfg80211-support-immediate-reconnect-request-hint.patch +++ b/package/kernel/mac80211/patches/subsys/300-cfg80211-support-immediate-reconnect-request-hint.patch @@ -31,28 +31,6 @@ Signed-off-by: Johannes Berg /** * cfg80211_rx_unprot_mlme_mgmt - notification of unprotected mlme mgmt frame ---- a/include/uapi/linux/nl80211.h -+++ b/include/uapi/linux/nl80211.h -@@ -2527,6 +2527,10 @@ enum nl80211_commands { - * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in - * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT. - * -+ * @NL80211_ATTR_RECONNECT_REQUESTED: flag attribute, used with deauth and -+ * disassoc events to indicate that an immediate reconnect to the AP -+ * is desired. -+ * - * @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 +3020,8 @@ enum nl80211_attrs { - NL80211_ATTR_S1G_CAPABILITY, - NL80211_ATTR_S1G_CAPABILITY_MASK, - -+ NL80211_ATTR_RECONNECT_REQUESTED, -+ - /* add attributes here, update the policy in nl80211.c */ - - __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2734,7 +2734,7 @@ static void ieee80211_report_disconnect( diff --git a/package/kernel/mac80211/patches/subsys/302-cfg80211-Add-support-to-configure-SAE-PWE-value-to-d.patch b/package/kernel/mac80211/patches/subsys/302-cfg80211-Add-support-to-configure-SAE-PWE-value-to-d.patch new file mode 100644 index 0000000000..acfdae0f5b --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/302-cfg80211-Add-support-to-configure-SAE-PWE-value-to-d.patch @@ -0,0 +1,74 @@ +From: Rohan Dutta +Date: Tue, 27 Oct 2020 12:09:10 +0200 +Subject: [PATCH] cfg80211: Add support to configure SAE PWE value to drivers + +Add support to configure SAE PWE preference from userspace to drivers in +both AP and STA modes. This is needed for cases where the driver takes +care of Authentication frame processing (SME in the driver) so that +correct enforcement of the acceptable PWE derivation mechanism can be +performed. + +The userspace applications can pass the sae_pwe value using the +NL80211_ATTR_SAE_PWE attribute in the NL80211_CMD_CONNECT and +NL80211_CMD_START_AP commands to the driver. This allows selection +between the hunting-and-pecking loop and hash-to-element options for PWE +derivation. For backwards compatibility, this new attribute is optional +and if not included, the driver is notified of the value being +unspecified. + +Signed-off-by: Rohan Dutta +Signed-off-by: Jouni Malinen +Link: https://lore.kernel.org/r/20201027100910.22283-1-jouni@codeaurora.org +Signed-off-by: Johannes Berg +--- + +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -1009,6 +1009,14 @@ struct survey_info { + * @sae_pwd: password for SAE authentication (for devices supporting SAE + * offload) + * @sae_pwd_len: length of SAE password (for devices supporting SAE offload) ++ * @sae_pwe: The mechanisms allowed for SAE PWE derivation ++ * NL80211_SAE_PWE_UNSPECIFIED: Not-specified, used to indicate userspace ++ * did not specify any preference. The driver should follow its ++ * internal policy in such a scenario. ++ * NL80211_SAE_PWE_HUNT_AND_PECK: Allow hunting-and-pecking loop only ++ * NL80211_SAE_PWE_HASH_TO_ELEMENT: Allow hash-to-element only ++ * NL80211_SAE_PWE_BOTH: Allow either hunting-and-pecking loop ++ * or hash-to-element + */ + struct cfg80211_crypto_settings { + u32 wpa_versions; +@@ -1027,6 +1035,7 @@ struct cfg80211_crypto_settings { + const u8 *psk; + const u8 *sae_pwd; + u8 sae_pwd_len; ++ enum nl80211_sae_pwe_mechanism sae_pwe; + }; + + /** +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -736,6 +736,9 @@ static const struct nla_policy nl80211_p + NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN), + [NL80211_ATTR_S1G_CAPABILITY_MASK] = + NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN), ++ [NL80211_ATTR_SAE_PWE] = ++ NLA_POLICY_RANGE(NLA_U8, NL80211_SAE_PWE_HUNT_AND_PECK, ++ NL80211_SAE_PWE_BOTH), + [NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT }, + }; + +@@ -9764,6 +9767,12 @@ static int nl80211_crypto_settings(struc + nla_len(info->attrs[NL80211_ATTR_SAE_PASSWORD]); + } + ++ if (info->attrs[NL80211_ATTR_SAE_PWE]) ++ settings->sae_pwe = ++ nla_get_u8(info->attrs[NL80211_ATTR_SAE_PWE]); ++ else ++ settings->sae_pwe = NL80211_SAE_PWE_UNSPECIFIED; ++ + return 0; + } + 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 eb967f77d7..febe42eb9d 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 @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -3736,6 +3736,7 @@ struct mgmt_frame_regs { +@@ -3745,6 +3745,7 @@ struct mgmt_frame_regs { * (as advertised by the nl80211 feature flag.) * @get_tx_power: store the current TX power into the dbm variable; * return 0 if successful @@ -8,7 +8,7 @@ * * @set_wds_peer: set the WDS peer for a WDS interface * -@@ -4058,6 +4059,7 @@ struct cfg80211_ops { +@@ -4067,6 +4068,7 @@ struct cfg80211_ops { enum nl80211_tx_power_setting type, int mbm); int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, int *dbm); @@ -36,7 +36,7 @@ u8 ps_dtim_period; --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h -@@ -2531,6 +2531,9 @@ enum nl80211_commands { +@@ -2560,6 +2560,9 @@ enum nl80211_commands { * disassoc events to indicate that an immediate reconnect to the AP * is desired. * @@ -46,9 +46,9 @@ * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -3022,6 +3025,8 @@ enum nl80211_attrs { +@@ -3057,6 +3060,8 @@ enum nl80211_attrs { - NL80211_ATTR_RECONNECT_REQUESTED, + NL80211_ATTR_DISABLE_HE, + NL80211_ATTR_WIPHY_ANTENNA_GAIN, + @@ -129,15 +129,15 @@ local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -737,6 +737,7 @@ static const struct nla_policy nl80211_p - [NL80211_ATTR_S1G_CAPABILITY_MASK] = - NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN), +@@ -740,6 +740,7 @@ static const struct nla_policy nl80211_p + NLA_POLICY_RANGE(NLA_U8, NL80211_SAE_PWE_HUNT_AND_PECK, + NL80211_SAE_PWE_BOTH), [NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT }, + [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 }, }; /* policy for the key attributes */ -@@ -3245,6 +3246,20 @@ static int nl80211_set_wiphy(struct sk_b +@@ -3248,6 +3249,20 @@ static int nl80211_set_wiphy(struct sk_b if (result) return result; } 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 5aa3cd5146..1d6ea0fae0 100644 --- a/package/network/utils/iw/patches/001-nl80211_h_sync.patch +++ b/package/network/utils/iw/patches/001-nl80211_h_sync.patch @@ -1,9 +1,99 @@ --- a/nl80211.h +++ b/nl80211.h -@@ -2527,6 +2527,13 @@ enum nl80211_commands { +@@ -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. + * +- * @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_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform + * multicast to unicast conversion. When enabled, all multicast packets +@@ -1177,6 +1181,10 @@ + * includes the contents of the frame. %NL80211_ATTR_ACK flag is included + * if the recipient acknowledged the frame. + * ++ * @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_MAX: highest used command number + * @__NL80211_CMD_AFTER_LAST: internal use + */ +@@ -1407,6 +1415,8 @@ enum nl80211_commands { + + NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS, + ++ NL80211_CMD_SET_SAR_SPECS, ++ + /* add new commands above here */ + + /* used to define NL80211_CMD_MAX below */ +@@ -1750,8 +1760,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 +1966,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 +2095,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 +2546,23 @@ enum nl80211_commands { * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT. * ++ * @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. @@ -14,14 +104,199 @@ * @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 +3023,10 @@ enum nl80211_attrs { +@@ -3016,6 +3052,16 @@ enum nl80211_attrs { NL80211_ATTR_S1G_CAPABILITY, NL80211_ATTR_S1G_CAPABILITY_MASK, ++ NL80211_ATTR_SAE_PWE, ++ + NL80211_ATTR_RECONNECT_REQUESTED, + ++ NL80211_ATTR_SAR_SPEC, ++ ++ NL80211_ATTR_DISABLE_HE, ++ + NL80211_ATTR_WIPHY_ANTENNA_GAIN, + /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, +@@ -5896,6 +5942,19 @@ enum nl80211_feature_flags { + * @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports + * unsolicited broadcast probe response transmission + * ++ * @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. ++ * + * @NUM_NL80211_EXT_FEATURES: number of extended features. + * @MAX_NL80211_EXT_FEATURES: highest extended feature index. + */ +@@ -5956,6 +6015,10 @@ 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, + + /* add new features before the definition below */ + NUM_NL80211_EXT_FEATURES, +@@ -6253,11 +6316,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, + }; + + /** +@@ -6849,6 +6914,9 @@ 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. + * + * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal + * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number +@@ -6867,6 +6935,7 @@ 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, + + /* keep last */ + NUM_NL80211_PMSR_FTM_REQ_ATTR, +@@ -7124,4 +7193,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, ++}; ++ + #endif /* __LINUX_NL80211_H */ From 20f66649dda3094320e515006cd5ddc9c096ac30 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 2 Jun 2021 08:49:19 +0200 Subject: [PATCH 6/8] mt76: update to the latest version bddc1db76d0f mt76: mt7915: drop the use of repeater entries for station interfaces 3c90f35dddac mt76: mt7915: add thermal sensor device support afab0e8202ff mt76: mt7915: add thermal cooling device support 41cf02184699 mt76: mt7615: add thermal sensor device support 2ac6b8762565 mt76: connac: update BA win size in Rx direction ddb301127291 mt76: mt7921: fix reset under the deep sleep is enabled e4cbefd1d69a mt76: mt7921: avoid unnecessary consecutive WiFi resets 393eea2034d7 mt76: mt7921: fix invalid register access in wake_work a15d46407ffa mt76: mt7921: fix OMAC idx usage e4d267d8e900 mt76: mt7921: enable runtime pm by default 50fd8ce2412a mt76: connac: add bss color support for sta mode e29058c3c860 mt76: mt7921: return proper error value in mt7921_mac_init c89c8c347b1e mt76: mt7921: do not schedule hw reset if the device is not running 9f7bb428e587 mt76: mt7921: reset wfsys during hw probe 22ea365913b5 mt76: mt7915: add .offset_tsf callback ad91f8e8e494 mt76: mt7615: add .offset_tsf callback 6f871f35e3c1 mt76: mt7915: use mt7915_mcu_get_txpower_sku() to get per-rate txpower 597b68b7daa3 mt76: mt7615: remove useless if condition in mt7615_add_interface() 3945264468eb mt76: testmode: fix memory leak in mt76_testmode_alloc_skb bdcc57a11606 mt76: testmode: remove unnecessary function calls in mt76_testmode_free_skb a9763452601d mt76: testmode: remove undefined behaviour in mt76_testmode_alloc_skb 4aef2a2be464 mt76: mt7615: fix potential overflow on large shift d9dd7635b055 mt76: mt7915: use mt7915_mcu_get_mib_info() to get survey data d740e921758a mt76: mt7921: introduce mac tx done handling 259ddfc7cb73 mt76: mt7921: update statistic in active mode only 757b93f4b179 mt76: mt7921: remove leftover 80+80 HE capability 1fcff599b2e1 mt76: allow hw driver code to overwrite wiphy interface_modes c55c22e39b7d mt7915: update firmware to 2020110522 10548aef1f45 mt76: mt7915: improve error recovery reliability ed6b0c79820c mt76: mt7921: set MT76_RESET during mac reset 321443258bea mt76: move mt76_rates in mt76 module d1652e8af9e1 Revert "mt76: connac: do not schedule wake_work if the runtime-pm is disabled" 4f4cab39ed9f mt76: mt7915: read all eeprom fields from fw in efuse mode 71450535f164 mt76: mt7921: enable hw offloading for wep keys 833d577e430c mt76: mt7921: remove mt7921_get_wtbl_info routine 67b7a22d2b99 mt76: mt7921: enable random mac address during sched_scan cf1ff7bf4f1b mt76: mt7915: setup drr group for peers ef2f7aa8745f mt76: mt7615: update radar parameters b9f09f530223 mt76: mt7915: fix MT_EE_CAL_GROUP_SIZE 22b690334c0f mt76: mt7915: do not fail if the cooling device could not be registered Signed-off-by: Felix Fietkau (cherry-picked from commit 3c46ba053d899df65dc07e373c64d1925d30f88e) --- package/kernel/mt76/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 5104c3ec53..e4051d8347 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-05-15 -PKG_SOURCE_VERSION:=9d736545bb5ac9707e60b7900b7d6b290492e24d -PKG_MIRROR_HASH:=8fd98f488579c18cfd8c442cff1796dcd70e2ecbc59c5d5b92ee8c0f06efafcf +PKG_SOURCE_DATE:=2021-06-06 +PKG_SOURCE_VERSION:=22b690334c0f49b11534cc2e331c9d5e17c4a0bc +PKG_MIRROR_HASH:=ff5e563935919d2e40c1e7254ef3bc06f7ecc5e69f8ddd12903e8f5de942d630 PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 @@ -155,7 +155,7 @@ define KernelPackage/mt7615-common $(KernelPackage/mt76-default) TITLE:=MediaTek MT7615 wireless driver common code HIDDEN:=1 - DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac + DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core FILES:= $(PKG_BUILD_DIR)/mt7615/mt7615-common.ko endef @@ -213,7 +213,7 @@ endef define KernelPackage/mt7915e $(KernelPackage/mt76-default) TITLE:=MediaTek MT7915e wireless driver - DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +@DRIVER_11AX_SUPPORT + DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko AUTOLOAD:=$(call AutoProbe,mt7915e) endef From 3921f213e5ed091731f11b2543c206eab672cc17 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Tue, 18 May 2021 07:13:50 +0200 Subject: [PATCH 7/8] iw: update to 8fab0c9e This fixes `iw dev wlan0-mesh station dump`. 8fab0c9 iw: fix ftm_request missing arguments segfault e816fbc iw: fix mgmt dump missing arguments segfault 5d9d1b8 iw: Fix timestamp output on 32-bit architectures 4b25ae3 iw: fix pointer arithmetic in __print_he_capa c3df363 iw: add option to print human readable event time cd64525 iw: print ctrl port tx status event 0ba98b9 iw: use correct type in policy check for mesh 9e38dee iw: scan: fixup HE caps whitespace 17e8564 iw: scan: parse HE capabilities 5735e58 iw: util: factor out HE capability parser 6d8d507 iw: scan: add extension tag parsing b4e1ec4 man: update wikipage URL, reformat SEE ALSO section c56036a iw: enable 80MHz support for 6GHz band 11s mesh fa72728 iw: handle positive error codes gracefully 7ba9093 iw: scan: add flag for scanning colocated ap 5ec60ed iw: Add 'coloc' and 'flush' options to sched_scan f8ade75 iw: update wikipage URL b6f2dac iw: Add support for specifying the 160MHz bandwidth when setting the channel/frequency Signed-off-by: Andre Heider (cherry-picked from commit b5420dd710aaad703f6f7a900840609d4d1176a1) --- package/network/utils/iw/Makefile | 11 +++---- .../utils/iw/patches/200-reduce_size.patch | 30 +++++++++---------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile index 6db9aaf105..8e11046189 100644 --- a/package/network/utils/iw/Makefile +++ b/package/network/utils/iw/Makefile @@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iw -PKG_VERSION:=5.9 -PKG_RELEASE:=1 +PKG_VERSION:=5.9-8fab0c9e +PKG_RELEASE:=$(AUTORELEASE) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@KERNEL/software/network/iw -PKG_HASH:=293a07109aeb7e36267cf59e3ce52857e9ffae3a6666eb8ac77894b1839fe1f2 +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_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch index af30876012..83e11405cb 100644 --- a/package/network/utils/iw/patches/200-reduce_size.patch +++ b/package/network/utils/iw/patches/200-reduce_size.patch @@ -1,6 +1,6 @@ --- a/event.c +++ b/event.c -@@ -944,6 +944,7 @@ static int print_event(struct nl_msg *ms +@@ -956,6 +956,7 @@ static int print_event(struct nl_msg *ms } switch (gnlh->cmd) { @@ -8,7 +8,7 @@ case NL80211_CMD_NEW_WIPHY: printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])); break; -@@ -979,6 +980,7 @@ static int print_event(struct nl_msg *ms +@@ -991,6 +992,7 @@ static int print_event(struct nl_msg *ms case NL80211_CMD_SCHED_SCAN_RESULTS: printf("got scheduled scan results\n"); break; @@ -16,7 +16,7 @@ case NL80211_CMD_WIPHY_REG_CHANGE: case NL80211_CMD_REG_CHANGE: if (gnlh->cmd == NL80211_CMD_WIPHY_REG_CHANGE) -@@ -1061,6 +1063,7 @@ static int print_event(struct nl_msg *ms +@@ -1073,6 +1075,7 @@ static int print_event(struct nl_msg *ms mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); printf("del station %s\n", macbuf); break; @@ -24,7 +24,7 @@ case NL80211_CMD_JOIN_IBSS: mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); printf("IBSS %s joined\n", macbuf); -@@ -1254,9 +1257,9 @@ static int print_event(struct nl_msg *ms +@@ -1271,9 +1274,9 @@ static int print_event(struct nl_msg *ms case NL80211_CMD_CH_SWITCH_NOTIFY: parse_ch_switch_notify(tb, gnlh->cmd); break; @@ -134,7 +134,7 @@ { --- a/scan.c +++ b/scan.c -@@ -1297,6 +1297,9 @@ static void print_ht_op(const uint8_t ty +@@ -1306,6 +1306,9 @@ static void print_ht_op(const uint8_t ty printf("\t\t * secondary channel offset: %s\n", ht_secondary_offset[data[1] & 0x3]); printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]); @@ -144,7 +144,7 @@ printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3); printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]); printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2); -@@ -1707,6 +1710,14 @@ static void print_ie(const struct ie_pri +@@ -1716,6 +1719,14 @@ static void print_ie(const struct ie_pri static const struct ie_print ieprinters[] = { [0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, @@ -159,7 +159,7 @@ [1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), }, [3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), }, [5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), }, -@@ -1716,26 +1727,20 @@ static const struct ie_print ieprinters[ +@@ -1725,26 +1736,20 @@ static const struct ie_print ieprinters[ [32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), }, [35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), }, [42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), }, @@ -187,15 +187,15 @@ }; static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data, -@@ -2279,6 +2284,7 @@ void print_ies(unsigned char *ie, int ie +@@ -2326,6 +2331,7 @@ void print_ies(unsigned char *ie, int ie ieprinters[ie[0]].flags & BIT(ptype)) { print_ie(&ieprinters[ie[0]], ie[0], ie[1], ie + 2, &ie_buffer); +#ifdef IW_FULL } else if (ie[0] == 221 /* vendor */) { print_vendor(ie[1], ie + 2, unknown, ptype); - } else if (unknown) { -@@ -2288,6 +2294,7 @@ void print_ies(unsigned char *ie, int ie + } else if (ie[0] == 255 /* extension */) { +@@ -2337,6 +2343,7 @@ void print_ies(unsigned char *ie, int ie for (i=0; i Date: Thu, 17 Jun 2021 12:40:15 +0200 Subject: [PATCH 8/8] mac80211: fix minstrel sample time check We need to skip sampling if the next sample time is after jiffies, not before. This patch fixes an issue where in some cases only very little sampling (or none at all) is performed, leading to really bad data rates Signed-off-by: Felix Fietkau --- ...11-minstrel_ht-fix-sample-time-check.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/377-mac80211-minstrel_ht-fix-sample-time-check.patch diff --git a/package/kernel/mac80211/patches/subsys/377-mac80211-minstrel_ht-fix-sample-time-check.patch b/package/kernel/mac80211/patches/subsys/377-mac80211-minstrel_ht-fix-sample-time-check.patch new file mode 100644 index 0000000000..787254b4df --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/377-mac80211-minstrel_ht-fix-sample-time-check.patch @@ -0,0 +1,23 @@ +From: Felix Fietkau +Date: Thu, 17 Jun 2021 12:05:54 +0200 +Subject: [PATCH] mac80211: minstrel_ht: fix sample time check + +We need to skip sampling if the next sample time is after jiffies, not before. +This patch fixes an issue where in some cases only very little sampling (or none +at all) is performed, leading to really bad data rates + +Fixes: 80d55154b2f8 ("mac80211: minstrel_ht: significantly redesign the rate probing strategy") +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/rc80211_minstrel_ht.c ++++ b/net/mac80211/rc80211_minstrel_ht.c +@@ -1498,7 +1498,7 @@ minstrel_ht_get_rate(void *priv, struct + (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO)) + return; + +- if (time_is_before_jiffies(mi->sample_time)) ++ if (time_is_after_jiffies(mi->sample_time)) + return; + + mi->sample_time = jiffies + MINSTREL_SAMPLE_INTERVAL;