mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
mac80211: bump to 5.8-rc2, add ath10k VHT support and very basic support for ipq807x ath11k (#5288)
* mac80211: bump to 5.8-rc2 changelog: dfe0bc8 mac80211: allow ACS restriction with fixed channel 727685c mac80211: rt2x00: define RF5592 in init_eeprom routine cfd2f3b mac80211: create channel list for fixed channel operation d1100c7 mac80211: Update to version 5.7.5-1 ed2015c mac80211: Update to version 5.8-rc2-1 a956c14 mac80211: util: don't warn on missing sband iftype data 8b3e170 hostapd: fix incorrect service name 68bf5a9 mac80211: don't kill wireless daemon on teardown 25e0ae6 mac80211: make cfg80211 testmode support optional (and disabled by default) b7727a8 mac80211: fix AQL issues 3d731fc mac80211: merge performance improvement patches * mt76: update to 2020-07-22 Signed-off-by: Felix Fietkau <nbd@nbd.name> * mac80211: allow VHT on 2.4GHz Allow VHT rate on 2.4GHz in order to use 256-QAM Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> * ath10k: allow VHT on 2.4GHz Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> * hostapd: add vendor_vht option hostapd has vendor_vht option to enable VHT (256-QAM) on 2.4GHz Add this option to hostapd.sh so users can enable it via uci Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> * ipq807x: Refresh kernel configuration Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> * ipq807x: Add WCSS bus This is needed to build ath11k. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> * mac80211: Add ath11k This adds the Qualcomm 802.11ax wireless chipset support. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Co-authored-by: Felix Fietkau <nbd@nbd.name> Co-authored-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
aed7fc6131
commit
b1677a562c
@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=5.7-rc3-1
|
||||
PKG_RELEASE:=5
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.7-rc3/
|
||||
PKG_HASH:=7bc785c932f011c65adb75ffa746be2fa90b16ab61a6e1fd883acee403ffeed1
|
||||
PKG_VERSION:=5.8-rc2-1
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.8-rc2/
|
||||
PKG_HASH:=363a648a6bded577044b505289dd711b160b8334cd73cbc6301e341e6b4c78fc
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||
@ -35,6 +35,7 @@ PKG_DRIVERS = \
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_kmod-mac80211 \
|
||||
CONFIG_PACKAGE_CFG80211_TESTMODE \
|
||||
CONFIG_PACKAGE_MAC80211_DEBUGFS \
|
||||
CONFIG_PACKAGE_MAC80211_MESH \
|
||||
CONFIG_PACKAGE_MAC80211_TRACING \
|
||||
@ -56,7 +57,6 @@ config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
|
||||
|
||||
config-y:= \
|
||||
WLAN \
|
||||
NL80211_TESTMODE \
|
||||
CFG80211_WEXT \
|
||||
CFG80211_CERTIFICATION_ONUS \
|
||||
MAC80211_RC_MINSTREL \
|
||||
@ -80,6 +80,7 @@ config-y:= \
|
||||
WLAN_VENDOR_ZYDAS \
|
||||
|
||||
config-$(call config_package,cfg80211) += CFG80211
|
||||
config-$(CONFIG_PACKAGE_CFG80211_TESTMODE) += NL80211_TESTMODE
|
||||
|
||||
config-$(call config_package,mac80211) += MAC80211
|
||||
config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
|
||||
@ -108,6 +109,20 @@ define KernelPackage/cfg80211/description
|
||||
cfg80211 is the Linux wireless LAN (802.11) configuration API.
|
||||
endef
|
||||
|
||||
define KernelPackage/cfg80211/config
|
||||
if PACKAGE_kmod-cfg80211
|
||||
|
||||
config PACKAGE_CFG80211_TESTMODE
|
||||
bool "Enable testmode command support"
|
||||
default n
|
||||
help
|
||||
This is typically used for tests and calibration during
|
||||
manufacturing, or vendor specific debugging features
|
||||
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
define KernelPackage/mac80211
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Linux 802.11 Wireless Networking Stack
|
||||
|
@ -1,6 +1,6 @@
|
||||
PKG_DRIVERS += \
|
||||
ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k \
|
||||
carl9170 owl-loader
|
||||
ath11k carl9170 owl-loader
|
||||
|
||||
PKG_CONFIG_DEPENDS += \
|
||||
CONFIG_PACKAGE_ATH_DEBUG \
|
||||
@ -19,6 +19,7 @@ ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
|
||||
ATH9K_DEBUGFS \
|
||||
ATH9K_HTC_DEBUGFS \
|
||||
ATH10K_DEBUGFS \
|
||||
ATH11K_DEBUGFS \
|
||||
CARL9170_DEBUGFS \
|
||||
ATH5K_DEBUG \
|
||||
ATH6KL_DEBUG
|
||||
@ -27,13 +28,14 @@ endif
|
||||
ifdef CONFIG_PACKAGE_MAC80211_TRACING
|
||||
config-y += \
|
||||
ATH10K_TRACING \
|
||||
ATH11K_TRACING \
|
||||
ATH6KL_TRACING \
|
||||
ATH_TRACEPOINTS \
|
||||
ATH5K_TRACER
|
||||
endif
|
||||
|
||||
config-$(call config_package,ath) += ATH_CARDS ATH_COMMON ATH_REG_DYNAMIC_USER_REG_HINTS
|
||||
config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS
|
||||
config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH9K_STATION_STATISTICS
|
||||
config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
|
||||
config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL
|
||||
config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
|
||||
@ -54,6 +56,7 @@ config-$(CONFIG_ATH10K_THERMAL) += ATH10K_THERMAL
|
||||
|
||||
config-$(call config_package,ath9k-htc) += ATH9K_HTC
|
||||
config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
|
||||
config-$(call config_package,ath11k) += ATH11K
|
||||
|
||||
config-$(call config_package,ath5k) += ATH5K
|
||||
ifdef CONFIG_TARGET_ath25
|
||||
@ -276,6 +279,20 @@ define KernelPackage/ath10k/config
|
||||
|
||||
endef
|
||||
|
||||
define KernelPackage/ath11k
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Qualcomm 802.11ax wireless chipset support
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
|
||||
DEPENDS+= @TARGET_ipq807x +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT +@DRIVER_11W_SUPPORT +kmod-crypto-michael-mic
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath11k)
|
||||
endef
|
||||
|
||||
define KernelPackage/ath11k/description
|
||||
This module adds support for Qualcomm Technologies 802.11ax family of
|
||||
chipsets.
|
||||
endef
|
||||
|
||||
define KernelPackage/carl9170
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Driver for Atheros AR9170 USB sticks
|
||||
|
@ -105,7 +105,7 @@ define KernelPackage/b43
|
||||
CONFIG_HW_RANDOM=y
|
||||
# Depend on PCI_SUPPORT to make sure we can select kmod-bcma or kmod-ssb
|
||||
DEPENDS += \
|
||||
@PCI_SUPPORT +kmod-mac80211 +kmod-lib-cordic \
|
||||
@PCI_SUPPORT +@DRIVER_11W_SUPPORT +kmod-mac80211 +kmod-lib-cordic \
|
||||
$(if $(CONFIG_PACKAGE_B43_USE_SSB),+kmod-ssb) \
|
||||
$(if $(CONFIG_PACKAGE_B43_USE_BCMA),+kmod-bcma)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/broadcom/b43/b43.ko
|
||||
@ -347,7 +347,7 @@ define KernelPackage/b43legacy
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/b43
|
||||
KCONFIG:= \
|
||||
CONFIG_HW_RANDOM=y
|
||||
DEPENDS+= +kmod-mac80211 +!(TARGET_bcm47xx||TARGET_bcm63xx):kmod-ssb @!TARGET_bcm47xx_mips74k +b43legacy-firmware
|
||||
DEPENDS+= +kmod-mac80211 +!(TARGET_bcm47xx||TARGET_bcm63xx):kmod-ssb @!TARGET_bcm47xx_mips74k +b43legacy-firmware +@DRIVER_11W_SUPPORT
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/broadcom/b43legacy/b43legacy.ko
|
||||
AUTOLOAD:=$(call AutoProbe,b43legacy)
|
||||
MENU:=1
|
||||
|
@ -101,14 +101,17 @@ mac80211_hostapd_setup_base() {
|
||||
json_select config
|
||||
|
||||
[ "$auto_channel" -gt 0 ] && channel=acs_survey
|
||||
[ "$auto_channel" -gt 0 ] && json_get_values channel_list channels
|
||||
|
||||
[ "$auto_channel" -gt 0 ] && json_get_vars acs_exclude_dfs
|
||||
[ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] &&
|
||||
append base_cfg "acs_exclude_dfs=1" "$N"
|
||||
|
||||
json_get_vars noscan ht_coex
|
||||
json_get_vars noscan ht_coex vendor_vht
|
||||
json_get_values ht_capab_list ht_capab tx_burst
|
||||
json_get_values channel_list channels
|
||||
|
||||
[ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \
|
||||
channel_list="$channel"
|
||||
|
||||
set_default noscan 0
|
||||
|
||||
@ -223,7 +226,7 @@ mac80211_hostapd_setup_base() {
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$enable_ac" != "0" ]; then
|
||||
if [ "$enable_ac" != "0" -o "$vendor_vht" = "1" ]; then
|
||||
json_get_vars \
|
||||
rxldpc:1 \
|
||||
short_gi_80:1 \
|
||||
@ -990,7 +993,7 @@ drv_mac80211_setup() {
|
||||
add_ap=1
|
||||
ubus wait_for hostapd
|
||||
ubus call hostapd config_add "{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}"
|
||||
local hostapd_pid=$(ubus call service list '{"name": "hostapd"}' | jsonfilter -l 1 -e "@['hostapd'].instances['hostapd'].pid")
|
||||
local hostapd_pid=$(ubus call service list '{"name": "wpad"}' | jsonfilter -l 1 -e "@['wpad'].instances['hostapd'].pid")
|
||||
wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 1
|
||||
fi
|
||||
ret="$?"
|
||||
@ -1045,8 +1048,6 @@ list_phy_interfaces() {
|
||||
}
|
||||
|
||||
drv_mac80211_teardown() {
|
||||
wireless_process_kill_all
|
||||
|
||||
json_select data
|
||||
json_get_vars phy
|
||||
json_select ..
|
||||
|
@ -1,7 +1,7 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
@@ -87,6 +87,12 @@ config ATH10K_TRACING
|
||||
---help---
|
||||
@@ -86,6 +86,12 @@ config ATH10K_TRACING
|
||||
help
|
||||
Select this to ath10k use tracing infrastructure.
|
||||
|
||||
+config ATH10K_THERMAL
|
||||
|
@ -79,7 +79,7 @@
|
||||
+
|
||||
config ATH_DEBUG
|
||||
bool "Atheros wireless debugging"
|
||||
---help---
|
||||
help
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -85,6 +85,7 @@ ADM8211=
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -3041,6 +3041,8 @@ void regulatory_hint_country_ie(struct w
|
||||
@@ -3042,6 +3042,8 @@ void regulatory_hint_country_ie(struct w
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request = NULL, *lr;
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
/* IE len must be evenly divisible by 2 */
|
||||
if (country_ie_len & 0x01)
|
||||
return;
|
||||
@@ -3292,6 +3294,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
@@ -3293,6 +3295,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
|
@ -62,7 +62,7 @@
|
||||
debugfs_create_devm_seqfile(sc->dev, "interrupt", sc->debug.debugfs_phy,
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -521,6 +521,12 @@ enum {
|
||||
@@ -522,6 +522,12 @@ enum {
|
||||
ATH9K_RESET_COLD,
|
||||
};
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
struct ath9k_hw_version {
|
||||
u32 magic;
|
||||
u16 devid;
|
||||
@@ -809,6 +815,8 @@ struct ath_hw {
|
||||
@@ -810,6 +816,8 @@ struct ath_hw {
|
||||
u32 ah_flags;
|
||||
s16 nf_override;
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
bool reset_power_on;
|
||||
bool htc_reset_init;
|
||||
|
||||
@@ -1074,6 +1082,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
|
||||
@@ -1076,6 +1084,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
|
||||
bool ath9k_hw_check_alive(struct ath_hw *ah);
|
||||
|
||||
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -722,6 +722,7 @@ struct ath_spec_scan {
|
||||
@@ -723,6 +723,7 @@ struct ath_spec_scan {
|
||||
* @config_pci_powersave:
|
||||
* @calibrate: periodic calibration for NF, ANI, IQ, ADC gain, ADC-DC
|
||||
*
|
||||
@ -8,7 +8,7 @@
|
||||
* @spectral_scan_config: set parameters for spectral scan and enable/disable it
|
||||
* @spectral_scan_trigger: trigger a spectral scan run
|
||||
* @spectral_scan_wait: wait for a spectral scan run to finish
|
||||
@@ -744,6 +745,7 @@ struct ath_hw_ops {
|
||||
@@ -745,6 +746,7 @@ struct ath_hw_ops {
|
||||
struct ath_hw_antcomb_conf *antconf);
|
||||
void (*antdiv_comb_conf_set)(struct ath_hw *ah,
|
||||
struct ath_hw_antcomb_conf *antconf);
|
||||
@ -66,7 +66,7 @@
|
||||
|
||||
static const struct ieee80211_iface_limit if_limits[] = {
|
||||
@@ -1015,6 +1016,18 @@ static void ath9k_set_hw_capab(struct at
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_AIRTIME_FAIRNESS);
|
||||
NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS);
|
||||
}
|
||||
|
||||
+static void ath_get_initial_entropy(struct ath_softc *sc)
|
||||
|
@ -0,0 +1,262 @@
|
||||
From 1cfd3426ef989b83fa6176490a38777057e57f6c Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Tue, 14 Jul 2020 22:58:02 +0200
|
||||
Subject: [PATCH] ath10k: Fix NULL pointer dereference in AHB device probe
|
||||
|
||||
This fixes a NULL pointer dereference in the probe path for AHB devices.
|
||||
There attr parameter in the ath10k_ce_alloc_pipe() function is not
|
||||
initialized, but accessed. This function is called by
|
||||
ath10k_pci_setup_resource() which is called by ath10k_ahb_probe().
|
||||
|
||||
The struct ath10k_pci is also used for AHB devices and not only for PCI
|
||||
devices.
|
||||
|
||||
The initialization of the new members of struct ath10k_pci is moved to
|
||||
ath10k_pci_setup_resource() which is used by the PCI and the AHB code.
|
||||
|
||||
This also fixes a use after free bug in ath10k_pci_remove() when ar_pci
|
||||
is accessed after ath10k_core_destroy() was called, which calls
|
||||
ieee80211_free_hw() and frees this memory.
|
||||
|
||||
This fixes the following bug seen with backports-5.8-rc2 on OpenWrt on a
|
||||
IPQ4019 device:
|
||||
|
||||
[ 11.117462] 8<--- cut here ---
|
||||
[ 11.117494] Unable to handle kernel NULL pointer dereference at virtual address 00000000
|
||||
[ 11.119510] pgd = f377fd58
|
||||
[ 11.127657] [00000000] *pgd=8e9a0835, *pte=00000000, *ppte=00000000
|
||||
[ 11.130206] Internal error: Oops: 17 [#1] SMP ARM
|
||||
[ 11.136339] Modules linked in: ath10k_pci(+) ath10k_core ath xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt compat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom gpio_button_hotplug
|
||||
[ 11.174355] CPU: 2 PID: 257 Comm: kmodloader Not tainted 5.4.51 #0
|
||||
[ 11.196585] Hardware name: Generic DT based system
|
||||
[ 11.202746] PC is at ath10k_ce_alloc_pipe+0x58/0x180 [ath10k_core]
|
||||
[ 11.207459] LR is at ath10k_pci_alloc_pipes+0x94/0xc8 [ath10k_pci]
|
||||
[ 11.213600] pc : [<bf2c96cc>] lr : [<bf2fbf98>] psr: 80000013
|
||||
[ 11.219760] sp : cea0dc90 ip : cf4001f0 fp : 00000001
|
||||
[ 11.225923] r10: 00000000 r9 : 00000018 r8 : ce4963b4
|
||||
[ 11.231133] r7 : 00000000 r6 : ce491ea0 r5 : 00000000 r4 : ce4963b4
|
||||
[ 11.236342] r3 : 0004a000 r2 : 0004a000 r1 : bf2d0d70 r0 : 00000006
|
||||
[ 11.242942] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
|
||||
[ 11.249452] Control: 10c5387d Table: 8e9c006a DAC: 00000051
|
||||
[ 11.256656] Process kmodloader (pid: 257, stack limit = 0xaba286ca)
|
||||
[ 11.262386] Stack: (0xcea0dc90 to 0xcea0e000)
|
||||
[ 11.268462] dc80: 00000000 ce49629c ce491ea0 ce4963bc
|
||||
[ 11.272984] dca0: ce495ea0 bf2fbf98 00000002 ce4963a8 ce495ea0 00000000 ce491ea0 cf95d800
|
||||
[ 11.281142] dcc0: cf95d810 cf95d810 00000001 bf2fc854 00000000 cf95d800 bf300748 ce495ea0
|
||||
[ 11.289304] dce0: ce491ea0 d1300000 cf95d800 bf2fde8c 00000000 00000001 ce49cea0 00000000
|
||||
[ 11.297462] dd00: 00000000 00000000 bf3010a0 cf95d810 bf3010a0 c0b61580 00000000 00000000
|
||||
[ 11.305624] dd20: bf3010a0 0000000b c0b04e48 c06110c8 c0b61588 cf95d810 c0b61580 c060f740
|
||||
[ 11.313781] dd40: cf95d810 00000000 bf3010a0 00000000 00000000 ce49d2a4 bf301100 c060fc90
|
||||
[ 11.321943] dd60: 00000000 bf3010a0 cf95d810 c060fcf0 cf95d810 bf3010a0 c060fc98 c060dca4
|
||||
[ 11.330101] dd80: cf809d58 cf952cb4 bf3010a0 ce967900 c0b1f2c8 c060ec28 bf3007b8 bf301038
|
||||
[ 11.338263] dda0: bf3010a0 bf3010a0 c0b2d4d4 ffffe000 bf304000 c0610278 c0b04e48 c0b2d4d4
|
||||
[ 11.346422] ddc0: ffffe000 bf2fe2b4 c0b04e48 bf30403c c0b04e48 c0302764 8040003f 00000001
|
||||
[ 11.354582] dde0: 38e38e39 ce513580 c0b2cb50 cf801e00 cffbc6ac ce513600 cf801e00 cffbc6ac
|
||||
[ 11.362740] de00: 8040003e ce49d280 00000001 c0428d54 00000001 cf801e00 cffbc6ac ce513580
|
||||
[ 11.370900] de20: ce49d280 0e391998 bf301100 ce49d340 d12d2000 ce49d280 00000001 c0398c2c
|
||||
[ 11.379061] de40: 00000001 cea0df34 cea0df34 00000001 d12d2000 c039ae48 bf30110c 00007fff
|
||||
[ 11.387221] de60: bf301100 c0398044 cf804028 bf301148 c0397674 bf30126c c08ee5c0 c08ee70c
|
||||
[ 11.395380] de80: bf30110c c0b04e48 c08ee518 00000000 c08ee570 c0b04e48 ce513600 fffff000
|
||||
[ 11.403540] dea0: 00000001 ce513580 0000000d 0000000d 00000000 00000000 00000000 00000000
|
||||
[ 11.411698] dec0: 00000000 00000000 6e72656b 00006c65 00000000 00000000 00000000 00000000
|
||||
[ 11.419858] dee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
|
||||
[ 11.428018] df00: 00000000 0e391998 00000000 0000c610 d12de610 00000000 0062c620 ffffe000
|
||||
[ 11.436180] df20: 000129d1 00000051 00000000 c039b228 00000000 d12d7afd d12d8e80 d12d2000
|
||||
[ 11.444337] df40: 0000c610 d12de0e8 d12ddfa8 d12dab74 00009000 00009570 00003a2c 00009cae
|
||||
[ 11.452498] df60: 00000000 00000000 00000000 00003a1c 0000001e 0000001f 00000018 00000000
|
||||
[ 11.460656] df80: 00000010 00000000 00000000 00000000 00000003 00000080 c0301204 cea0c000
|
||||
[ 11.468817] dfa0: 00000080 c0301000 00000000 00000000 00620010 0000c610 000129d1 00000014
|
||||
[ 11.476975] dfc0: 00000000 00000000 00000003 00000080 0000c610 00000000 b6fc1d20 00000000
|
||||
[ 11.485137] dfe0: bef0ad14 bef0acf8 00011e14 b6f74c94 60000010 00620010 00000000 00000000
|
||||
[ 11.493390] [<bf2c96cc>] (ath10k_ce_alloc_pipe [ath10k_core]) from [<bf2fbf98>] (ath10k_pci_alloc_pipes+0x94/0xc8 [ath10k_pci])
|
||||
[ 11.501498] [<bf2fbf98>] (ath10k_pci_alloc_pipes [ath10k_pci]) from [<bf2fc854>] (ath10k_pci_setup_resource+0xb8/0xf0 [ath10k_pci])
|
||||
[ 11.512773] [<bf2fc854>] (ath10k_pci_setup_resource [ath10k_pci]) from [<bf2fde8c>] (ath10k_ahb_probe+0x32c/0x670 [ath10k_pci])
|
||||
[ 11.524566] [<bf2fde8c>] (ath10k_ahb_probe [ath10k_pci]) from [<c06110c8>] (platform_drv_probe+0x34/0x70)
|
||||
[ 11.536016] [<c06110c8>] (platform_drv_probe) from [<c060f740>] (really_probe+0x1f0/0x358)
|
||||
[ 11.545729] [<c060f740>] (really_probe) from [<c060fc90>] (device_driver_attach+0x58/0x60)
|
||||
[ 11.553886] [<c060fc90>] (device_driver_attach) from [<c060fcf0>] (__driver_attach+0x58/0xcc)
|
||||
[ 11.562134] [<c060fcf0>] (__driver_attach) from [<c060dca4>] (bus_for_each_dev+0x68/0x8c)
|
||||
[ 11.570731] [<c060dca4>] (bus_for_each_dev) from [<c060ec28>] (bus_add_driver+0x1c8/0x1d8)
|
||||
[ 11.578886] [<c060ec28>] (bus_add_driver) from [<c0610278>] (driver_register+0x74/0x108)
|
||||
[ 11.587060] [<c0610278>] (driver_register) from [<bf2fe2b4>] (ath10k_ahb_init+0x18/0x38 [ath10k_pci])
|
||||
[ 11.595320] [<bf2fe2b4>] (ath10k_ahb_init [ath10k_pci]) from [<bf30403c>] (init_module+0x3c/0x1000 [ath10k_pci])
|
||||
[ 11.604432] [<bf30403c>] (init_module [ath10k_pci]) from [<c0302764>] (do_one_initcall+0x84/0x1d8)
|
||||
[ 11.614657] [<c0302764>] (do_one_initcall) from [<c0398c2c>] (do_init_module+0x5c/0x228)
|
||||
[ 11.623421] [<c0398c2c>] (do_init_module) from [<c039ae48>] (load_module+0x1fc8/0x224c)
|
||||
[ 11.631663] [<c039ae48>] (load_module) from [<c039b228>] (sys_init_module+0x15c/0x17c)
|
||||
[ 11.639390] [<c039b228>] (sys_init_module) from [<c0301000>] (ret_fast_syscall+0x0/0x54)
|
||||
[ 11.647370] Exception stack(0xcea0dfa8 to 0xcea0dff0)
|
||||
[ 11.655615] dfa0: 00000000 00000000 00620010 0000c610 000129d1 00000014
|
||||
[ 11.660569] dfc0: 00000000 00000000 00000003 00000080 0000c610 00000000 b6fc1d20 00000000
|
||||
[ 11.668725] dfe0: bef0ad14 bef0acf8 00011e14 b6f74c94
|
||||
[ 11.676886] Code: e1c321d4 e0433002 e0232397 e5843014 (e5953000)
|
||||
[ 11.681958] ---[ end trace 8f35917de2e76854 ]---
|
||||
|
||||
Fixes: 521fc37be3d8 ("ath10k: Avoid override CE5 configuration for QCA99X0 chipsets")
|
||||
Reported-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq40xx/ map-ac2200]
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
Link: https://lore.kernel.org/r/20200714205802.17688-1-hauke@hauke-m.de
|
||||
---
|
||||
drivers/net/wireless/ath/ath10k/ahb.c | 2 +-
|
||||
drivers/net/wireless/ath/ath10k/pci.c | 78 +++++++++++++--------------
|
||||
2 files changed, 38 insertions(+), 42 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
|
||||
@@ -820,7 +820,7 @@ err_free_irq:
|
||||
ath10k_ahb_release_irq_legacy(ar);
|
||||
|
||||
err_free_pipes:
|
||||
- ath10k_pci_free_pipes(ar);
|
||||
+ ath10k_pci_release_resource(ar);
|
||||
|
||||
err_resource_deinit:
|
||||
ath10k_ahb_resource_deinit(ar);
|
||||
--- a/drivers/net/wireless/ath/ath10k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
@@ -3473,6 +3473,28 @@ int ath10k_pci_setup_resource(struct ath
|
||||
|
||||
timer_setup(&ar_pci->rx_post_retry, ath10k_pci_rx_replenish_retry, 0);
|
||||
|
||||
+ ar_pci->attr = kmemdup(pci_host_ce_config_wlan,
|
||||
+ sizeof(pci_host_ce_config_wlan),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!ar_pci->attr)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ ar_pci->pipe_config = kmemdup(pci_target_ce_config_wlan,
|
||||
+ sizeof(pci_target_ce_config_wlan),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!ar_pci->pipe_config) {
|
||||
+ ret = -ENOMEM;
|
||||
+ goto err_free_attr;
|
||||
+ }
|
||||
+
|
||||
+ ar_pci->serv_to_pipe = kmemdup(pci_target_service_to_ce_map_wlan,
|
||||
+ sizeof(pci_target_service_to_ce_map_wlan),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!ar_pci->serv_to_pipe) {
|
||||
+ ret = -ENOMEM;
|
||||
+ goto err_free_pipe_config;
|
||||
+ }
|
||||
+
|
||||
if (QCA_REV_6174(ar) || QCA_REV_9377(ar))
|
||||
ath10k_pci_override_ce_config(ar);
|
||||
|
||||
@@ -3480,18 +3502,31 @@ int ath10k_pci_setup_resource(struct ath
|
||||
if (ret) {
|
||||
ath10k_err(ar, "failed to allocate copy engine pipes: %d\n",
|
||||
ret);
|
||||
- return ret;
|
||||
+ goto err_free_serv_to_pipe;
|
||||
}
|
||||
|
||||
return 0;
|
||||
+
|
||||
+err_free_serv_to_pipe:
|
||||
+ kfree(ar_pci->serv_to_pipe);
|
||||
+err_free_pipe_config:
|
||||
+ kfree(ar_pci->pipe_config);
|
||||
+err_free_attr:
|
||||
+ kfree(ar_pci->attr);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
void ath10k_pci_release_resource(struct ath10k *ar)
|
||||
{
|
||||
+ struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
|
||||
+
|
||||
ath10k_pci_rx_retry_sync(ar);
|
||||
netif_napi_del(&ar->napi);
|
||||
ath10k_pci_ce_deinit(ar);
|
||||
ath10k_pci_free_pipes(ar);
|
||||
+ kfree(ar_pci->attr);
|
||||
+ kfree(ar_pci->pipe_config);
|
||||
+ kfree(ar_pci->serv_to_pipe);
|
||||
}
|
||||
|
||||
static const struct ath10k_bus_ops ath10k_pci_bus_ops = {
|
||||
@@ -3601,30 +3636,6 @@ static int ath10k_pci_probe(struct pci_d
|
||||
|
||||
timer_setup(&ar_pci->ps_timer, ath10k_pci_ps_timer, 0);
|
||||
|
||||
- ar_pci->attr = kmemdup(pci_host_ce_config_wlan,
|
||||
- sizeof(pci_host_ce_config_wlan),
|
||||
- GFP_KERNEL);
|
||||
- if (!ar_pci->attr) {
|
||||
- ret = -ENOMEM;
|
||||
- goto err_free;
|
||||
- }
|
||||
-
|
||||
- ar_pci->pipe_config = kmemdup(pci_target_ce_config_wlan,
|
||||
- sizeof(pci_target_ce_config_wlan),
|
||||
- GFP_KERNEL);
|
||||
- if (!ar_pci->pipe_config) {
|
||||
- ret = -ENOMEM;
|
||||
- goto err_free;
|
||||
- }
|
||||
-
|
||||
- ar_pci->serv_to_pipe = kmemdup(pci_target_service_to_ce_map_wlan,
|
||||
- sizeof(pci_target_service_to_ce_map_wlan),
|
||||
- GFP_KERNEL);
|
||||
- if (!ar_pci->serv_to_pipe) {
|
||||
- ret = -ENOMEM;
|
||||
- goto err_free;
|
||||
- }
|
||||
-
|
||||
ret = ath10k_pci_setup_resource(ar);
|
||||
if (ret) {
|
||||
ath10k_err(ar, "failed to setup resource: %d\n", ret);
|
||||
@@ -3705,10 +3716,9 @@ err_unsupported:
|
||||
|
||||
err_free_irq:
|
||||
ath10k_pci_free_irq(ar);
|
||||
- ath10k_pci_rx_retry_sync(ar);
|
||||
|
||||
err_deinit_irq:
|
||||
- ath10k_pci_deinit_irq(ar);
|
||||
+ ath10k_pci_release_resource(ar);
|
||||
|
||||
err_sleep:
|
||||
ath10k_pci_sleep_sync(ar);
|
||||
@@ -3720,29 +3730,18 @@ err_free_pipes:
|
||||
err_core_destroy:
|
||||
ath10k_core_destroy(ar);
|
||||
|
||||
-err_free:
|
||||
- kfree(ar_pci->attr);
|
||||
- kfree(ar_pci->pipe_config);
|
||||
- kfree(ar_pci->serv_to_pipe);
|
||||
-
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void ath10k_pci_remove(struct pci_dev *pdev)
|
||||
{
|
||||
struct ath10k *ar = pci_get_drvdata(pdev);
|
||||
- struct ath10k_pci *ar_pci;
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_PCI, "pci remove\n");
|
||||
|
||||
if (!ar)
|
||||
return;
|
||||
|
||||
- ar_pci = ath10k_pci_priv(ar);
|
||||
-
|
||||
- if (!ar_pci)
|
||||
- return;
|
||||
-
|
||||
ath10k_core_unregister(ar);
|
||||
ath10k_pci_free_irq(ar);
|
||||
ath10k_pci_deinit_irq(ar);
|
||||
@@ -3750,9 +3749,6 @@ static void ath10k_pci_remove(struct pci
|
||||
ath10k_pci_sleep_sync(ar);
|
||||
ath10k_pci_release(ar);
|
||||
ath10k_core_destroy(ar);
|
||||
- kfree(ar_pci->attr);
|
||||
- kfree(ar_pci->pipe_config);
|
||||
- kfree(ar_pci->serv_to_pipe);
|
||||
}
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, ath10k_pci_id_table);
|
@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -3174,6 +3174,16 @@ int ath10k_core_register(struct ath10k *
|
||||
@@ -3172,6 +3172,16 @@ int ath10k_core_register(struct ath10k *
|
||||
|
||||
queue_work(ar->workqueue, &ar->register_work);
|
||||
|
||||
|
@ -26,7 +26,7 @@ Forwarded: https://patchwork.kernel.org/patch/11367055/
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt.h
|
||||
@@ -2221,7 +2221,7 @@ struct htt_rx_chan_info {
|
||||
@@ -2242,7 +2242,7 @@ struct htt_rx_chan_info {
|
||||
* Should be: sizeof(struct htt_host_rx_desc) + max rx MSDU size,
|
||||
* rounded up to a cache line size.
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -8781,6 +8781,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
@@ -9053,6 +9053,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[] = {
|
||||
@@ -9109,6 +9124,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -9380,6 +9395,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
|
@ -1,144 +0,0 @@
|
||||
From: Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||
|
||||
current handling of peer_bw_rxnss_override parameter is based on guessing the VHT160/8080 capability by rx rate. this is wrong and may lead
|
||||
to a non initialized peer_bw_rxnss_override parameter which is required since VHT160 operation mode only supports 2x2 chainmasks in addition the original code
|
||||
initialized the parameter with wrong masked values.
|
||||
This patch uses the peer phymode and peer nss information for correct initialisation of the peer_bw_rxnss_override parameter.
|
||||
if this peer information is not available, we initialize the parameter by minimum nss which is suggested by QCA as temporary workaround according
|
||||
to the QCA sourcecodes.
|
||||
|
||||
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||
|
||||
v2: remove debug messages
|
||||
v3: apply some cosmetics, update documentation
|
||||
v4: fix compile warning and truncate nss to maximum of 2x2 since current chipsets only support 2x2 at vht160
|
||||
v5: handle maximum nss for chipsets supportig vht160 with 1x1 only
|
||||
v7: use more simple code variant and take care about hw/sw chainmask configuration
|
||||
v8: fix some code style issues
|
||||
v9: use SM/MS macros from code.h to simplify shift/mask handling
|
||||
---
|
||||
drivers/net/wireless/ath/ath10k/mac.c | 54 +++++++++++++++++++--------
|
||||
drivers/net/wireless/ath/ath10k/wmi.c | 7 +---
|
||||
drivers/net/wireless/ath/ath10k/wmi.h | 14 ++++++-
|
||||
3 files changed, 52 insertions(+), 23 deletions(-)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -2517,7 +2517,7 @@ static void ath10k_peer_assoc_h_vht(stru
|
||||
const u16 *vht_mcs_mask;
|
||||
u8 ampdu_factor;
|
||||
u8 max_nss, vht_mcs;
|
||||
- int i;
|
||||
+ int i, nss160;
|
||||
|
||||
if (WARN_ON(ath10k_mac_vif_chan(vif, &def)))
|
||||
return;
|
||||
@@ -2577,23 +2577,45 @@ static void ath10k_peer_assoc_h_vht(stru
|
||||
__le16_to_cpu(vht_cap->vht_mcs.tx_highest);
|
||||
arg->peer_vht_rates.tx_mcs_set = ath10k_peer_assoc_h_vht_limit(
|
||||
__le16_to_cpu(vht_cap->vht_mcs.tx_mcs_map), vht_mcs_mask);
|
||||
+ arg->peer_bw_rxnss_override = 0;
|
||||
+ nss160 = 1; /* 1x1 default config for VHT160 */
|
||||
|
||||
- ath10k_dbg(ar, ATH10K_DBG_MAC, "mac vht peer %pM max_mpdu %d flags 0x%x\n",
|
||||
- sta->addr, arg->peer_max_mpdu, arg->peer_flags);
|
||||
+ /* only local 4x4 configuration do support 2x2 for VHT160,
|
||||
+ * everything else must use 1x1
|
||||
+ */
|
||||
|
||||
- if (arg->peer_vht_rates.rx_max_rate &&
|
||||
- (sta->vht_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK)) {
|
||||
- switch (arg->peer_vht_rates.rx_max_rate) {
|
||||
- case 1560:
|
||||
- /* Must be 2x2 at 160Mhz is all it can do. */
|
||||
- arg->peer_bw_rxnss_override = 2;
|
||||
- break;
|
||||
- case 780:
|
||||
- /* Can only do 1x1 at 160Mhz (Long Guard Interval) */
|
||||
- arg->peer_bw_rxnss_override = 1;
|
||||
- break;
|
||||
- }
|
||||
+ if (ar->cfg_rx_chainmask == 15)
|
||||
+ nss160 = arg->peer_num_spatial_streams <= 2 ? 1 : 2;
|
||||
+
|
||||
+ /* if peer provides 1x1 nss160 information using max rate
|
||||
+ * vht information, we reduce local nss160 to 1x1.
|
||||
+ * consider that it has been observed that some client
|
||||
+ * devices provide zero here, no matter which transmission
|
||||
+ * rate is possible. in that case the local nss configuration
|
||||
+ * will be used at maxmimum configuration possible. (see above)
|
||||
+ */
|
||||
+
|
||||
+ if (arg->peer_vht_rates.rx_max_rate == 780)
|
||||
+ nss160 = 1;
|
||||
+
|
||||
+ /* in case if peer is connected with vht160 or vht80+80,
|
||||
+ * we need to properly adjust rxnss parameters otherwise
|
||||
+ * firmware will raise a assert
|
||||
+ */
|
||||
+ switch (arg->peer_phymode) {
|
||||
+ case MODE_11AC_VHT80_80:
|
||||
+ arg->peer_bw_rxnss_override = BW_NSS_FWCONF_80_80(nss160);
|
||||
+ /* fall through */
|
||||
+ case MODE_11AC_VHT160:
|
||||
+ arg->peer_bw_rxnss_override |= BW_NSS_FWCONF_160(nss160);
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
}
|
||||
+
|
||||
+ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac vht peer %pM max_mpdu %d flags 0x%x peer_bw_rxnss_override 0x%x\n",
|
||||
+ sta->addr, arg->peer_max_mpdu, arg->peer_flags,
|
||||
+ arg->peer_bw_rxnss_override);
|
||||
}
|
||||
|
||||
static void ath10k_peer_assoc_h_qos(struct ath10k *ar,
|
||||
@@ -2745,9 +2767,9 @@ static int ath10k_peer_assoc_prepare(str
|
||||
ath10k_peer_assoc_h_crypto(ar, vif, sta, arg);
|
||||
ath10k_peer_assoc_h_rates(ar, vif, sta, arg);
|
||||
ath10k_peer_assoc_h_ht(ar, vif, sta, arg);
|
||||
+ ath10k_peer_assoc_h_phymode(ar, vif, sta, arg);
|
||||
ath10k_peer_assoc_h_vht(ar, vif, sta, arg);
|
||||
ath10k_peer_assoc_h_qos(ar, vif, sta, arg);
|
||||
- ath10k_peer_assoc_h_phymode(ar, vif, sta, arg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
@@ -7628,12 +7628,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a
|
||||
struct wmi_10_4_peer_assoc_complete_cmd *cmd = buf;
|
||||
|
||||
ath10k_wmi_peer_assoc_fill_10_2(ar, buf, arg);
|
||||
- if (arg->peer_bw_rxnss_override)
|
||||
- cmd->peer_bw_rxnss_override =
|
||||
- __cpu_to_le32((arg->peer_bw_rxnss_override - 1) |
|
||||
- BIT(PEER_BW_RXNSS_OVERRIDE_OFFSET));
|
||||
- else
|
||||
- cmd->peer_bw_rxnss_override = 0;
|
||||
+ cmd->peer_bw_rxnss_override = __cpu_to_le32(arg->peer_bw_rxnss_override);
|
||||
}
|
||||
|
||||
static int
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
@@ -6508,7 +6508,19 @@ struct wmi_10_2_peer_assoc_complete_cmd
|
||||
__le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
|
||||
} __packed;
|
||||
|
||||
-#define PEER_BW_RXNSS_OVERRIDE_OFFSET 31
|
||||
+#define BW_NSS_FWCONF_MAP_ENABLE BIT(31)
|
||||
+#define BW_NSS_FWCONF_MAP_160MHZ_LSB (0)
|
||||
+#define BW_NSS_FWCONF_MAP_160MHZ_MASK (0x00000007)
|
||||
+#define BW_NSS_FWCONF_MAP_80_80MHZ_LSB (3)
|
||||
+#define BW_NSS_FWCONF_MAP_80_80MHZ_MASK (0x00000038)
|
||||
+#define BW_NSS_FWCONF_MAP_MASK (0x0000003F)
|
||||
+
|
||||
+#define GET_BW_NSS_FWCONF_160(x) (MS(x, BW_NSS_FWCONF_MAP_160MHZ) + 1)
|
||||
+#define GET_BW_NSS_FWCONF_80_80(x) (MS(x, BW_NSS_FWCONF_MAP_80_80MHZ) + 1)
|
||||
+
|
||||
+/* Values defined to set 160 MHz Bandwidth NSS Mapping into FW*/
|
||||
+#define BW_NSS_FWCONF_160(x) (BW_NSS_FWCONF_MAP_ENABLE | SM(x - 1, BW_NSS_FWCONF_MAP_160MHZ))
|
||||
+#define BW_NSS_FWCONF_80_80(x) (BW_NSS_FWCONF_MAP_ENABLE | SM(x - 1, BW_NSS_FWCONF_MAP_80_80MHZ))
|
||||
|
||||
struct wmi_10_4_peer_assoc_complete_cmd {
|
||||
struct wmi_10_2_peer_assoc_complete_cmd cmd;
|
@ -1,53 +0,0 @@
|
||||
From: Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||
|
||||
starting with firmware 10.4.3.4.x series QCA changed the handling of the channel property band_center_freq1 and band_center_freq2 in vht160 operation mode
|
||||
likelly for backward compatiblity with vht80 only capable clients.
|
||||
this patch adjusts the handling to get vht160 to work again with official qca firmwares newer than 3.3
|
||||
consider that this patch will not work with older firmwares anymore. to avoid undefined behaviour this we disable vht160 capability for outdated firmwares
|
||||
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||
|
||||
v2: fix trailing whitespace issue and fix some typos within the commit note
|
||||
---
|
||||
drivers/net/wireless/ath/ath10k/mac.c | 7 -------
|
||||
drivers/net/wireless/ath/ath10k/wmi.c | 11 ++++++++---
|
||||
2 files changed, 8 insertions(+), 10 deletions(-)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -4585,13 +4585,6 @@ static struct ieee80211_sta_vht_cap ath1
|
||||
vht_cap.cap |= val;
|
||||
}
|
||||
|
||||
- /* Currently the firmware seems to be buggy, don't enable 80+80
|
||||
- * mode until that's resolved.
|
||||
- */
|
||||
- if ((ar->vht_cap_info & IEEE80211_VHT_CAP_SHORT_GI_160) &&
|
||||
- (ar->vht_cap_info & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) == 0)
|
||||
- vht_cap.cap |= IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
|
||||
-
|
||||
mcs_map = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if ((i < ar->num_rf_chains) && (ar->cfg_tx_chainmask & BIT(i)))
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
@@ -1713,13 +1713,18 @@ void ath10k_wmi_put_wmi_channel(struct w
|
||||
flags |= WMI_CHAN_FLAG_HT40_PLUS;
|
||||
if (arg->chan_radar)
|
||||
flags |= WMI_CHAN_FLAG_DFS;
|
||||
-
|
||||
+ ch->band_center_freq2 = 0;
|
||||
ch->mhz = __cpu_to_le32(arg->freq);
|
||||
ch->band_center_freq1 = __cpu_to_le32(arg->band_center_freq1);
|
||||
if (arg->mode == MODE_11AC_VHT80_80)
|
||||
ch->band_center_freq2 = __cpu_to_le32(arg->band_center_freq2);
|
||||
- else
|
||||
- ch->band_center_freq2 = 0;
|
||||
+ if (arg->mode == MODE_11AC_VHT160) {
|
||||
+ if (arg->freq < arg->band_center_freq1)
|
||||
+ ch->band_center_freq1 = __cpu_to_le32(arg->band_center_freq1 - 40);
|
||||
+ else
|
||||
+ ch->band_center_freq1 = __cpu_to_le32(arg->band_center_freq1 + 40);
|
||||
+ ch->band_center_freq2 = __cpu_to_le32(arg->band_center_freq1);
|
||||
+ }
|
||||
ch->min_power = arg->min_power;
|
||||
ch->max_power = arg->max_power;
|
||||
ch->reg_power = arg->max_reg_power;
|
@ -85,7 +85,7 @@ v13:
|
||||
create mode 100644 drivers/net/wireless/ath/ath10k/leds.h
|
||||
--- a/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
@@ -71,6 +71,16 @@ config ATH10K_DEBUGFS
|
||||
@@ -70,6 +70,16 @@ config ATH10K_DEBUGFS
|
||||
|
||||
If unsure, say Y to make it easier to debug problems.
|
||||
|
||||
@ -148,7 +148,7 @@ v13:
|
||||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -339,6 +342,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -340,6 +343,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca99x0 hw2.0",
|
||||
@ -156,7 +156,7 @@ v13:
|
||||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.otp_exe_param = 0x00000700,
|
||||
@@ -380,6 +384,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -381,6 +385,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9984/qca9994 hw1.0",
|
||||
@ -164,7 +164,7 @@ v13:
|
||||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -428,6 +433,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -429,6 +434,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9888 hw2.0",
|
||||
@ -172,7 +172,7 @@ v13:
|
||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -2889,6 +2895,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
@@ -2887,6 +2893,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
goto err_hif_stop;
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ v13:
|
||||
return 0;
|
||||
|
||||
err_hif_stop:
|
||||
@@ -3147,9 +3157,18 @@ static void ath10k_core_register_work(st
|
||||
@@ -3145,9 +3155,18 @@ static void ath10k_core_register_work(st
|
||||
goto err_spectral_destroy;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ v13:
|
||||
err_spectral_destroy:
|
||||
ath10k_spectral_destroy(ar);
|
||||
err_debug_destroy:
|
||||
@@ -3195,6 +3214,8 @@ void ath10k_core_unregister(struct ath10
|
||||
@@ -3193,6 +3212,8 @@ void ath10k_core_unregister(struct ath10
|
||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||
return;
|
||||
|
||||
@ -221,7 +221,7 @@ v13:
|
||||
|
||||
#include "htt.h"
|
||||
#include "htc.h"
|
||||
@@ -1182,6 +1183,13 @@ struct ath10k {
|
||||
@@ -1216,6 +1217,13 @@ struct ath10k {
|
||||
} testmode;
|
||||
|
||||
struct {
|
||||
@ -407,7 +407,7 @@ v13:
|
||||
/* Rates */
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
|
||||
@@ -216,7 +216,10 @@ struct wmi_ops {
|
||||
@@ -224,7 +224,10 @@ struct wmi_ops {
|
||||
struct sk_buff *(*gen_bb_timing)
|
||||
(struct ath10k *ar,
|
||||
const struct wmi_bb_timing_cfg_arg *arg);
|
||||
@ -418,7 +418,7 @@ v13:
|
||||
};
|
||||
|
||||
int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
|
||||
@@ -1080,6 +1083,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
|
||||
@@ -1120,6 +1123,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
|
||||
return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid);
|
||||
}
|
||||
|
||||
@ -456,7 +456,7 @@ v13:
|
||||
{
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
@@ -4447,6 +4447,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||
@@ -4583,6 +4583,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
|
||||
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
|
||||
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
|
||||
@ -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
|
||||
@@ -7448,6 +7448,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
||||
@@ -7471,6 +7471,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)
|
||||
@@ -9105,6 +9148,9 @@ static const struct wmi_ops wmi_ops = {
|
||||
@@ -9129,6 +9172,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 */
|
||||
@@ -9175,6 +9221,8 @@ static const struct wmi_ops wmi_10_1_ops
|
||||
@@ -9199,6 +9245,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 */
|
||||
@@ -9247,6 +9295,8 @@ static const struct wmi_ops wmi_10_2_ops
|
||||
@@ -9271,6 +9319,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 */
|
||||
};
|
||||
|
||||
@@ -9318,6 +9368,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
||||
@@ -9342,6 +9392,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 */
|
||||
@@ -9398,6 +9450,8 @@ static const struct wmi_ops wmi_10_4_ops
|
||||
@@ -9422,6 +9474,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
|
||||
@@ -3014,6 +3014,41 @@ enum wmi_10_4_feature_mask {
|
||||
@@ -3016,6 +3016,41 @@ enum wmi_10_4_feature_mask {
|
||||
|
||||
};
|
||||
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
||||
@@ -1235,6 +1235,10 @@ struct ath10k {
|
||||
@@ -1269,6 +1269,10 @@ struct ath10k {
|
||||
bool coex_support;
|
||||
int coex_gpio_pin;
|
||||
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
+#endif
|
||||
+
|
||||
/* must be last */
|
||||
u8 drv_priv[0] __aligned(sizeof(void *));
|
||||
u8 drv_priv[] __aligned(sizeof(void *));
|
||||
};
|
||||
--- a/drivers/net/wireless/ath/ath10k/leds.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/leds.c
|
||||
@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
if (ret)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -9141,7 +9141,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -9397,7 +9397,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
@ -38,7 +38,7 @@ Forwarded: https://patchwork.kernel.org/patch/10986723/
|
||||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = arvif->u.ap.ssid;
|
||||
@@ -3170,7 +3170,7 @@ static int ath10k_update_channel_list(st
|
||||
@@ -3194,7 +3194,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;
|
||||
|
@ -89,7 +89,7 @@ Forwarded: no
|
||||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = arvif->u.ap.ssid;
|
||||
@@ -3170,7 +3206,8 @@ static int ath10k_update_channel_list(st
|
||||
@@ -3194,7 +3230,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;
|
||||
|
@ -0,0 +1,10 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -4718,6 +4718,7 @@ static void ath10k_mac_setup_ht_vht_cap(
|
||||
if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) {
|
||||
band = &ar->mac.sbands[NL80211_BAND_2GHZ];
|
||||
band->ht_cap = ht_cap;
|
||||
+ band->vht_cap = vht_cap;
|
||||
}
|
||||
if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) {
|
||||
band = &ar->mac.sbands[NL80211_BAND_5GHZ];
|
@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1554,6 +1554,7 @@ int __init brcmf_core_init(void)
|
||||
@@ -1551,6 +1551,7 @@ int __init brcmf_core_init(void)
|
||||
{
|
||||
if (!schedule_work(&brcmf_driver_work))
|
||||
return -EBUSY;
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -711,8 +711,36 @@ static struct wireless_dev *brcmf_cfg802
|
||||
@@ -712,8 +712,36 @@ static struct wireless_dev *brcmf_cfg802
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
struct wireless_dev *wdev;
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -2942,6 +2942,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
@@ -2953,6 +2953,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
* preference in cfg struct to apply this to
|
||||
* FW later while initializing the dongle
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -2894,6 +2894,63 @@ done:
|
||||
@@ -2905,6 +2905,63 @@ done:
|
||||
}
|
||||
|
||||
static int
|
||||
@ -64,7 +64,7 @@
|
||||
brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
|
||||
int idx, u8 *mac, struct station_info *sinfo)
|
||||
{
|
||||
@@ -2983,6 +3040,7 @@ static s32 brcmf_inform_single_bss(struc
|
||||
@@ -2994,6 +3051,7 @@ static s32 brcmf_inform_single_bss(struc
|
||||
struct brcmu_chan ch;
|
||||
u16 channel;
|
||||
u32 freq;
|
||||
@ -72,7 +72,7 @@
|
||||
u16 notify_capability;
|
||||
u16 notify_interval;
|
||||
u8 *notify_ie;
|
||||
@@ -3007,6 +3065,17 @@ static s32 brcmf_inform_single_bss(struc
|
||||
@@ -3018,6 +3076,17 @@ static s32 brcmf_inform_single_bss(struc
|
||||
band = NL80211_BAND_5GHZ;
|
||||
|
||||
freq = ieee80211_channel_to_frequency(channel, band);
|
||||
@ -90,7 +90,7 @@
|
||||
bss_data.chan = ieee80211_get_channel(wiphy, freq);
|
||||
bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20;
|
||||
bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime());
|
||||
@@ -5424,6 +5493,7 @@ static struct cfg80211_ops brcmf_cfg8021
|
||||
@@ -5470,6 +5539,7 @@ static struct cfg80211_ops brcmf_cfg8021
|
||||
.leave_ibss = brcmf_cfg80211_leave_ibss,
|
||||
.get_station = brcmf_cfg80211_get_station,
|
||||
.dump_station = brcmf_cfg80211_dump_station,
|
||||
@ -100,7 +100,7 @@
|
||||
.add_key = brcmf_cfg80211_add_key,
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1352,6 +1352,8 @@ int brcmf_attach(struct device *dev)
|
||||
@@ -1349,6 +1349,8 @@ int brcmf_attach(struct device *dev)
|
||||
|
||||
/* Link to bus module */
|
||||
drvr->hdrlen = 0;
|
||||
@ -109,7 +109,7 @@
|
||||
|
||||
/* Attach and link in the protocol */
|
||||
ret = brcmf_proto_attach(drvr);
|
||||
@@ -1434,6 +1436,12 @@ void brcmf_detach(struct device *dev)
|
||||
@@ -1431,6 +1433,12 @@ void brcmf_detach(struct device *dev)
|
||||
if (drvr == NULL)
|
||||
return;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
@@ -11479,6 +11479,15 @@ static const struct attribute_group ipw_
|
||||
@@ -11470,6 +11470,15 @@ static const struct attribute_group ipw_
|
||||
.attrs = ipw_sysfs_entries,
|
||||
};
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#ifdef CPTCFG_IPW2200_PROMISCUOUS
|
||||
static int ipw_prom_open(struct net_device *dev)
|
||||
{
|
||||
@@ -11527,15 +11536,6 @@ static netdev_tx_t ipw_prom_hard_start_x
|
||||
@@ -11518,15 +11527,6 @@ static netdev_tx_t ipw_prom_hard_start_x
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -417,43 +417,6 @@ USB_SIERRA_NET=
|
||||
@@ -424,43 +424,6 @@ USB_SIERRA_NET=
|
||||
USB_VL600=
|
||||
USB_NET_CH9200=
|
||||
USB_NET_AQC111=
|
||||
@ -69,7 +69,7 @@
|
||||
depends on B43 && B43_SSB && SSB_SDIOHOST_POSSIBLE
|
||||
- select SSB_SDIOHOST
|
||||
+ depends on SSB_SDIOHOST
|
||||
---help---
|
||||
help
|
||||
Broadcom 43xx device support for Soft-MAC SDIO devices.
|
||||
|
||||
@@ -96,13 +96,13 @@ config B43_SDIO
|
||||
@ -117,7 +117,7 @@
|
||||
- select SSB
|
||||
+ depends on SSB
|
||||
depends on FW_LOADER
|
||||
---help---
|
||||
help
|
||||
b43legacy is a driver for 802.11b devices from Broadcom (BCM4301 and
|
||||
@@ -25,15 +25,15 @@ config B43LEGACY
|
||||
config B43LEGACY_PCI_AUTOSELECT
|
||||
@ -192,7 +192,7 @@
|
||||
select BRCMUTIL
|
||||
--- a/Kconfig.local
|
||||
+++ b/Kconfig.local
|
||||
@@ -1255,117 +1255,6 @@ config BACKPORTED_USB_NET_CH9200
|
||||
@@ -1276,117 +1276,6 @@ config BACKPORTED_USB_NET_CH9200
|
||||
config BACKPORTED_USB_NET_AQC111
|
||||
tristate
|
||||
default USB_NET_AQC111
|
||||
|
@ -1,44 +0,0 @@
|
||||
From b6b15e20421fefae9f78274f9fef80bc97bf5d5c Mon Sep 17 00:00:00 2001
|
||||
From: Rui Salvaterra <rsalvaterra@gmail.com>
|
||||
Date: Mon, 25 May 2020 14:49:07 +0100
|
||||
Subject: [PATCH] rt2800: enable MFP support unconditionally
|
||||
|
||||
This gives us WPA3 support out of the box without having to manually disable
|
||||
hardware crypto. The driver will fall back to software crypto if the connection
|
||||
requires management frame protection.
|
||||
|
||||
Suggested-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
|
||||
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
Link: https://lore.kernel.org/r/20200525134906.1672-1-rsalvaterra@gmail.com
|
||||
---
|
||||
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 +---
|
||||
drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 3 ++-
|
||||
2 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -9971,9 +9971,7 @@ static int rt2800_probe_hw_mode(struct r
|
||||
if (!rt2x00_is_usb(rt2x00dev))
|
||||
ieee80211_hw_set(rt2x00dev->hw, HOST_BROADCAST_PS_BUFFERING);
|
||||
|
||||
- /* Set MFP if HW crypto is disabled. */
|
||||
- if (rt2800_hwcrypt_disabled(rt2x00dev))
|
||||
- ieee80211_hw_set(rt2x00dev->hw, MFP_CAPABLE);
|
||||
+ ieee80211_hw_set(rt2x00dev->hw, MFP_CAPABLE);
|
||||
|
||||
SET_IEEE80211_DEV(rt2x00dev->hw, rt2x00dev->dev);
|
||||
SET_IEEE80211_PERM_ADDR(rt2x00dev->hw,
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
|
||||
@@ -468,7 +468,8 @@ int rt2x00mac_set_key(struct ieee80211_h
|
||||
if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
||||
return 0;
|
||||
|
||||
- if (!rt2x00_has_cap_hw_crypto(rt2x00dev))
|
||||
+ /* The hardware can't do MFP */
|
||||
+ if (!rt2x00_has_cap_hw_crypto(rt2x00dev) || (sta && sta->mfp))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/*
|
@ -0,0 +1,51 @@
|
||||
From patchwork Thu Dec 27 14:05:26 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
X-Patchwork-Submitter: Tom Psyborg <pozega.tomislav@gmail.com>
|
||||
X-Patchwork-Id: 10743707
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
From: =?utf-8?q?Tomislav_Po=C5=BEega?= <pozega.tomislav@gmail.com>
|
||||
To: linux-wireless@vger.kernel.org
|
||||
Cc: kvalo@codeaurora.org, hauke@hauke-m.de, nbd@nbd.name,
|
||||
john@phrozen.org, sgruszka@redhat.com, daniel@makrotopia.org
|
||||
Subject: [PATCH 2/2] rt2x00: define RF5592 in init_eeprom routine
|
||||
Date: Thu, 27 Dec 2018 15:05:26 +0100
|
||||
Message-Id: <1545919526-4074-2-git-send-email-pozega.tomislav@gmail.com>
|
||||
X-Mailer: git-send-email 1.7.0.4
|
||||
In-Reply-To: <1545919526-4074-1-git-send-email-pozega.tomislav@gmail.com>
|
||||
References: <1545919526-4074-1-git-send-email-pozega.tomislav@gmail.com>
|
||||
MIME-Version: 1.0
|
||||
Sender: linux-wireless-owner@vger.kernel.org
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
This patch fixes following crash on Linksys EA2750 during 5GHz wifi
|
||||
init:
|
||||
|
||||
[ 7.955153] rt2800pci 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
|
||||
[ 7.962259] rt2800pci 0000:01:00.0: loaded eeprom from mtd device "Factory"
|
||||
[ 7.969435] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5592, rev 0222 detected
|
||||
[ 7.977348] ieee80211 phy0: rt2800_init_eeprom: Error - Invalid RF chipset 0x0000 detected
|
||||
[ 7.985793] ieee80211 phy0: rt2x00lib_probe_dev: Error - Failed to allocate device
|
||||
[ 7.993569] CPU 0 Unable to handle kernel paging request at virtual address 00000024, epc == 800c8f54, ra == 80249ff8
|
||||
[ 8.004408] Oops[#1]:
|
||||
|
||||
Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -9416,6 +9416,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
rf = RF3853;
|
||||
else if (rt2x00_rt(rt2x00dev, RT5350))
|
||||
rf = RF5350;
|
||||
+ else if (rt2x00_rt(rt2x00dev, RT5592))
|
||||
+ rf = RF5592;
|
||||
else
|
||||
rf = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -318,6 +318,7 @@ RT2X00_LIB_FIRMWARE=
|
||||
@@ -321,6 +321,7 @@ RT2X00_LIB_FIRMWARE=
|
||||
RT2X00_LIB_CRYPTO=
|
||||
RT2X00_LIB_LEDS=
|
||||
RT2X00_LIB_DEBUGFS=
|
||||
@ -25,7 +25,7 @@
|
||||
+ select RT2X00_LIB_EEPROM
|
||||
select RT2800_LIB
|
||||
select RT2800_LIB_MMIO
|
||||
---help---
|
||||
help
|
||||
@@ -266,6 +268,9 @@ config RT2X00_LIB_FIRMWARE
|
||||
config RT2X00_LIB_CRYPTO
|
||||
bool
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
select RT2800_LIB
|
||||
select RT2800_LIB_MMIO
|
||||
+ select MTD if SOC_RT288X || SOC_RT305X
|
||||
---help---
|
||||
help
|
||||
This adds support for Ralink WiSoC devices.
|
||||
Supported chips: RT2880, RT3050, RT3052, RT3350, RT3352.
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "rt2x00.h"
|
||||
#include "rt2800lib.h"
|
||||
@@ -9528,6 +9529,17 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9530,6 +9531,17 @@ static int rt2800_init_eeprom(struct rt2
|
||||
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
|
||||
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
|
||||
|
||||
|
@ -76,7 +76,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
|
||||
bbp = rt2800_bbp_read(rt2x00dev, 4);
|
||||
rt2x00_set_field8(&bbp, BBP4_BANDWIDTH, 2 * conf_is_ht40(conf));
|
||||
rt2800_bbp_write(rt2x00dev, 4, bbp);
|
||||
@@ -9557,7 +9596,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9559,7 +9598,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
*/
|
||||
eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1);
|
||||
|
||||
@ -86,7 +86,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
|
||||
if (rt2x00_get_field16(eeprom,
|
||||
EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352))
|
||||
__set_bit(CAPABILITY_EXTERNAL_PA_TX0,
|
||||
@@ -9568,6 +9608,18 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9570,6 +9610,18 @@ static int rt2800_init_eeprom(struct rt2
|
||||
&rt2x00dev->cap_flags);
|
||||
}
|
||||
|
||||
|
@ -1,31 +0,0 @@
|
||||
From e1f04bf9d38633f0bf9d041089366fea0ad22623 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Thu, 21 May 2020 19:50:05 +0200
|
||||
Subject: [PATCH] wireless: Use linux/stddef.h instead of stddef.h
|
||||
|
||||
When compiling inside the kernel include linux/stddef.h instead of
|
||||
stddef.h. When I compile this header file in backports for power PC I
|
||||
run into a conflict with ptrdiff_t. I was unable to reproduce this in
|
||||
mainline kernel. I still would like to fix this problem in the kernel.
|
||||
|
||||
Fixes: 6989310f5d43 ("wireless: Use offsetof instead of custom macro.")
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
include/uapi/linux/wireless.h | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/include/uapi/linux/wireless.h
|
||||
+++ b/include/uapi/linux/wireless.h
|
||||
@@ -74,7 +74,11 @@
|
||||
#include <linux/socket.h> /* for "struct sockaddr" et al */
|
||||
#include <linux/if.h> /* for IFNAMSIZ and co... */
|
||||
|
||||
-#include <stddef.h> /* for offsetof */
|
||||
+#ifdef __KERNEL__
|
||||
+# include <linux/stddef.h> /* for offsetof */
|
||||
+#else
|
||||
+# include <stddef.h> /* for offsetof */
|
||||
+#endif
|
||||
|
||||
/***************************** VERSION *****************************/
|
||||
/*
|
@ -654,7 +654,7 @@
|
||||
- depends on CRYPTO_GCM
|
||||
depends on CRYPTO_CMAC
|
||||
depends on CRC32
|
||||
---help---
|
||||
help
|
||||
--- a/net/mac80211/aes_gmac.h
|
||||
+++ b/net/mac80211/aes_gmac.h
|
||||
@@ -12,10 +12,22 @@
|
||||
|
@ -2,11 +2,11 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects
|
||||
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1186,7 +1186,6 @@ static int ieee80211_stop_ap(struct wiph
|
||||
@@ -1197,7 +1197,6 @@ static int ieee80211_stop_ap(struct wiph
|
||||
sdata->vif.bss_conf.ftmr_params = NULL;
|
||||
|
||||
__sta_info_flush(sdata, true);
|
||||
- ieee80211_free_keys(sdata, true);
|
||||
|
||||
sdata->vif.bss_conf.enable_beacon = false;
|
||||
sdata->vif.bss_conf.ssid_len = 0;
|
||||
sdata->beacon_rate_set = false;
|
||||
|
@ -21,7 +21,7 @@ Disable FILS support, since it pulls in crypto hash support
|
||||
* FILS AEAD for (Re)Association Request/Response frames
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -586,7 +586,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
@@ -591,7 +591,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
NL80211_FEATURE_MAC_ON_CREATE |
|
||||
NL80211_FEATURE_USERSPACE_MPM |
|
||||
NL80211_FEATURE_FULL_AP_CLIENT_STATE;
|
||||
|
@ -6,5 +6,5 @@
|
||||
depends on CRYPTO_AES
|
||||
- depends on CRYPTO_CMAC
|
||||
depends on CRC32
|
||||
---help---
|
||||
help
|
||||
This option enables the hardware independent IEEE 802.11
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -4119,6 +4119,12 @@ out:
|
||||
@@ -4133,6 +4133,12 @@ out:
|
||||
netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -316,7 +316,7 @@ void ieee80211_restart_hw(struct ieee802
|
||||
@@ -321,7 +321,7 @@ void ieee80211_restart_hw(struct ieee802
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_restart_hw);
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
static int ieee80211_ifa_changed(struct notifier_block *nb,
|
||||
unsigned long data, void *arg)
|
||||
{
|
||||
@@ -375,7 +375,7 @@ static int ieee80211_ifa_changed(struct
|
||||
@@ -380,7 +380,7 @@ static int ieee80211_ifa_changed(struct
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
static int ieee80211_ifa6_changed(struct notifier_block *nb,
|
||||
unsigned long data, void *arg)
|
||||
{
|
||||
@@ -1292,14 +1292,14 @@ int ieee80211_register_hw(struct ieee802
|
||||
@@ -1301,14 +1301,14 @@ int ieee80211_register_hw(struct ieee802
|
||||
|
||||
rtnl_unlock();
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
|
||||
result = register_inet6addr_notifier(&local->ifa6_notifier);
|
||||
if (result)
|
||||
@@ -1308,13 +1308,13 @@ int ieee80211_register_hw(struct ieee802
|
||||
@@ -1317,13 +1317,13 @@ int ieee80211_register_hw(struct ieee802
|
||||
|
||||
return 0;
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
fail_ifa:
|
||||
#endif
|
||||
wiphy_unregister(local->hw.wiphy);
|
||||
@@ -1342,10 +1342,10 @@ void ieee80211_unregister_hw(struct ieee
|
||||
@@ -1351,10 +1351,10 @@ void ieee80211_unregister_hw(struct ieee
|
||||
tasklet_kill(&local->tx_pending_tasklet);
|
||||
tasklet_kill(&local->tasklet);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -2317,7 +2317,7 @@ static int ieee80211_scan(struct wiphy *
|
||||
@@ -2344,7 +2344,7 @@ static int ieee80211_scan(struct wiphy *
|
||||
* the frames sent while scanning on other channel will be
|
||||
* lost)
|
||||
*/
|
||||
|
@ -24,8 +24,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1801,6 +1801,9 @@ int ieee80211_tx_control_port(struct wip
|
||||
const u8 *dest, __be16 proto, bool unencrypted);
|
||||
@@ -1809,6 +1809,9 @@ int ieee80211_tx_control_port(struct wip
|
||||
u64 *cookie);
|
||||
int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *buf, size_t len);
|
||||
+int ieee80211_skb_resize(struct ieee80211_local *local,
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
|
||||
--- a/net/mac80211/status.c
|
||||
+++ b/net/mac80211/status.c
|
||||
@@ -828,6 +828,11 @@ void ieee80211_tx_monitor(struct ieee802
|
||||
@@ -835,6 +835,11 @@ void ieee80211_tx_monitor(struct ieee802
|
||||
struct net_device *prev_dev = NULL;
|
||||
int rtap_len;
|
||||
|
||||
@ -143,7 +143,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
ieee80211_free_txskb(&local->hw, skb);
|
||||
return;
|
||||
}
|
||||
@@ -2796,29 +2802,13 @@ static struct sk_buff *ieee80211_build_h
|
||||
@@ -2809,29 +2815,13 @@ static struct sk_buff *ieee80211_build_h
|
||||
}
|
||||
|
||||
skb_pull(skb, skip_header_bytes);
|
||||
@ -179,7 +179,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
if (encaps_data)
|
||||
@@ -3433,7 +3423,6 @@ static bool ieee80211_xmit_fast(struct i
|
||||
@@ -3446,7 +3436,6 @@ static bool ieee80211_xmit_fast(struct i
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
u16 ethertype = (skb->data[12] << 8) | skb->data[13];
|
||||
int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
|
||||
@ -187,7 +187,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
struct ethhdr eth;
|
||||
struct ieee80211_tx_info *info;
|
||||
struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
|
||||
@@ -3485,10 +3474,7 @@ static bool ieee80211_xmit_fast(struct i
|
||||
@@ -3498,10 +3487,7 @@ static bool ieee80211_xmit_fast(struct i
|
||||
* as the may-encrypt argument for the resize to not account for
|
||||
* more room than we already have in 'extra_head'
|
||||
*/
|
||||
|
@ -0,0 +1,81 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 24 Jul 2020 20:25:07 +0200
|
||||
Subject: [PATCH] mac80211: improve AQL tx airtime estimation
|
||||
|
||||
AQL does not take into account that most HT/VHT/HE traffic is A-MPDU aggregated.
|
||||
Because of that, the per-packet airtime overhead is vastly overestimated.
|
||||
Improve it by assuming an average aggregation length of 16 for non-legacy
|
||||
traffic if not using the VO AC queue.
|
||||
This should improve performance with high data rates, especially with multiple
|
||||
stations
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/airtime.c
|
||||
+++ b/net/mac80211/airtime.c
|
||||
@@ -551,7 +551,7 @@ EXPORT_SYMBOL_GPL(ieee80211_calc_tx_airt
|
||||
u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *pubsta,
|
||||
- int len)
|
||||
+ int len, bool ampdu)
|
||||
{
|
||||
struct ieee80211_supported_band *sband;
|
||||
struct ieee80211_chanctx_conf *conf;
|
||||
@@ -572,10 +572,26 @@ u32 ieee80211_calc_expected_tx_airtime(s
|
||||
if (pubsta) {
|
||||
struct sta_info *sta = container_of(pubsta, struct sta_info,
|
||||
sta);
|
||||
+ struct ieee80211_tx_rate *rate = &sta->tx_stats.last_rate;
|
||||
+ u32 airtime;
|
||||
|
||||
- return ieee80211_calc_tx_airtime_rate(hw,
|
||||
- &sta->tx_stats.last_rate,
|
||||
- band, len);
|
||||
+ if (!(rate->flags & (IEEE80211_TX_RC_VHT_MCS |
|
||||
+ IEEE80211_TX_RC_MCS)))
|
||||
+ ampdu = false;
|
||||
+
|
||||
+ /*
|
||||
+ * Assume that HT/VHT transmission on any AC except VO will
|
||||
+ * use aggregation. Since we don't have reliable reporting
|
||||
+ * of aggregation length, assume an average of 16.
|
||||
+ * This will not be very accurate, but much better than simply
|
||||
+ * assuming un-aggregated tx.
|
||||
+ */
|
||||
+ airtime = ieee80211_calc_tx_airtime_rate(hw, rate, band,
|
||||
+ ampdu ? len * 16 : len);
|
||||
+ if (ampdu)
|
||||
+ airtime /= 16;
|
||||
+
|
||||
+ return airtime;
|
||||
}
|
||||
|
||||
if (!conf)
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -2278,7 +2278,7 @@ extern const struct ethtool_ops ieee8021
|
||||
u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *pubsta,
|
||||
- int len);
|
||||
+ int len, bool ampdu);
|
||||
#ifdef CPTCFG_MAC80211_NOINLINE
|
||||
#define debug_noinline noinline
|
||||
#else
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -3694,10 +3694,11 @@ encap_out:
|
||||
|
||||
if (vif &&
|
||||
wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) {
|
||||
+ bool ampdu = txq->ac != IEEE80211_AC_VO;
|
||||
u32 airtime;
|
||||
|
||||
airtime = ieee80211_calc_expected_tx_airtime(hw, vif, txq->sta,
|
||||
- skb->len);
|
||||
+ skb->len, ampdu);
|
||||
if (airtime) {
|
||||
airtime = ieee80211_info_set_tx_time_est(info, airtime);
|
||||
ieee80211_sta_update_pending_airtime(local, tx.sta,
|
@ -0,0 +1,31 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 25 Jul 2020 10:42:30 +0200
|
||||
Subject: [PATCH] mac80211: remove STA txq pending airtime underflow
|
||||
warning
|
||||
|
||||
This warning can trigger if there is a mismatch between frames that were
|
||||
sent with the sta pointer set vs tx status frames reported for the sta address.
|
||||
|
||||
This can happen due to race conditions on re-creating stations, or even
|
||||
in the case of .sta_add/remove being used instead of .sta_state, which can cause
|
||||
frames to be sent to a station that has not been uploaded yet.
|
||||
|
||||
If there is an actual underflow issue, it should show up in the device airtime
|
||||
warning below, so it is better to remove this one.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -1924,9 +1924,7 @@ void ieee80211_sta_update_pending_airtim
|
||||
if (sta) {
|
||||
tx_pending = atomic_sub_return(tx_airtime,
|
||||
&sta->airtime[ac].aql_tx_pending);
|
||||
- if (WARN_ONCE(tx_pending < 0,
|
||||
- "STA %pM AC %d txq pending airtime underflow: %u, %u",
|
||||
- sta->addr, ac, tx_pending, tx_airtime))
|
||||
+ if (tx_pending < 0)
|
||||
atomic_cmpxchg(&sta->airtime[ac].aql_tx_pending,
|
||||
tx_pending, 0);
|
||||
}
|
@ -0,0 +1,186 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 25 Jul 2020 20:53:23 +0200
|
||||
Subject: [PATCH] mac80211: add a function for running rx without passing skbs
|
||||
to the stack
|
||||
|
||||
This can be used to run mac80211 rx processing on a batch of frames in NAPI
|
||||
poll before passing them to the network stack in a large batch.
|
||||
This can improve icache footprint, or it can be used to pass frames via
|
||||
netif_receive_skb_list.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -4358,6 +4358,31 @@ void ieee80211_free_hw(struct ieee80211_
|
||||
void ieee80211_restart_hw(struct ieee80211_hw *hw);
|
||||
|
||||
/**
|
||||
+ * ieee80211_rx_list - receive frame and store processed skbs in a list
|
||||
+ *
|
||||
+ * Use this function to hand received frames to mac80211. The receive
|
||||
+ * buffer in @skb must start with an IEEE 802.11 header. In case of a
|
||||
+ * paged @skb is used, the driver is recommended to put the ieee80211
|
||||
+ * header of the frame on the linear part of the @skb to avoid memory
|
||||
+ * allocation and/or memcpy by the stack.
|
||||
+ *
|
||||
+ * This function may not be called in IRQ context. Calls to this function
|
||||
+ * for a single hardware must be synchronized against each other. Calls to
|
||||
+ * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be
|
||||
+ * mixed for a single hardware. Must not run concurrently with
|
||||
+ * ieee80211_tx_status() or ieee80211_tx_status_ni().
|
||||
+ *
|
||||
+ * This function must be called with BHs disabled and RCU read lock
|
||||
+ *
|
||||
+ * @hw: the hardware this frame came in on
|
||||
+ * @sta: the station the frame was received from, or %NULL
|
||||
+ * @skb: the buffer to receive, owned by mac80211 after this call
|
||||
+ * @list: the destination list
|
||||
+ */
|
||||
+void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
|
||||
+ struct sk_buff *skb, struct list_head *list);
|
||||
+
|
||||
+/**
|
||||
* ieee80211_rx_napi - receive frame from NAPI context
|
||||
*
|
||||
* Use this function to hand received frames to mac80211. The receive
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -218,7 +218,7 @@ enum ieee80211_rx_flags {
|
||||
};
|
||||
|
||||
struct ieee80211_rx_data {
|
||||
- struct napi_struct *napi;
|
||||
+ struct list_head *list;
|
||||
struct sk_buff *skb;
|
||||
struct ieee80211_local *local;
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2552,8 +2552,8 @@ static void ieee80211_deliver_skb_to_loc
|
||||
memset(skb->cb, 0, sizeof(skb->cb));
|
||||
|
||||
/* deliver to local stack */
|
||||
- if (rx->napi)
|
||||
- napi_gro_receive(rx->napi, skb);
|
||||
+ if (rx->list)
|
||||
+ list_add_tail(&skb->list, rx->list);
|
||||
else
|
||||
netif_receive_skb(skb);
|
||||
}
|
||||
@@ -3843,7 +3843,6 @@ void ieee80211_release_reorder_timeout(s
|
||||
/* This is OK -- must be QoS data frame */
|
||||
.security_idx = tid,
|
||||
.seqno_idx = tid,
|
||||
- .napi = NULL, /* must be NULL to not have races */
|
||||
};
|
||||
struct tid_ampdu_rx *tid_agg_rx;
|
||||
|
||||
@@ -4453,8 +4452,8 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
/* deliver to local stack */
|
||||
skb->protocol = eth_type_trans(skb, fast_rx->dev);
|
||||
memset(skb->cb, 0, sizeof(skb->cb));
|
||||
- if (rx->napi)
|
||||
- napi_gro_receive(rx->napi, skb);
|
||||
+ if (rx->list)
|
||||
+ list_add_tail(&skb->list, rx->list);
|
||||
else
|
||||
netif_receive_skb(skb);
|
||||
|
||||
@@ -4521,7 +4520,7 @@ static bool ieee80211_prepare_and_rx_han
|
||||
static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
|
||||
struct ieee80211_sta *pubsta,
|
||||
struct sk_buff *skb,
|
||||
- struct napi_struct *napi)
|
||||
+ struct list_head *list)
|
||||
{
|
||||
struct ieee80211_local *local = hw_to_local(hw);
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
@@ -4536,7 +4535,7 @@ static void __ieee80211_rx_handle_packet
|
||||
memset(&rx, 0, sizeof(rx));
|
||||
rx.skb = skb;
|
||||
rx.local = local;
|
||||
- rx.napi = napi;
|
||||
+ rx.list = list;
|
||||
|
||||
if (ieee80211_is_data(fc) || ieee80211_is_mgmt(fc))
|
||||
I802_DEBUG_INC(local->dot11ReceivedFragmentCount);
|
||||
@@ -4644,8 +4643,8 @@ static void __ieee80211_rx_handle_packet
|
||||
* This is the receive path handler. It is called by a low level driver when an
|
||||
* 802.11 MPDU is received from the hardware.
|
||||
*/
|
||||
-void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
|
||||
- struct sk_buff *skb, struct napi_struct *napi)
|
||||
+void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
|
||||
+ struct sk_buff *skb, struct list_head *list)
|
||||
{
|
||||
struct ieee80211_local *local = hw_to_local(hw);
|
||||
struct ieee80211_rate *rate = NULL;
|
||||
@@ -4737,36 +4736,53 @@ void ieee80211_rx_napi(struct ieee80211_
|
||||
status->rx_flags = 0;
|
||||
|
||||
/*
|
||||
- * key references and virtual interfaces are protected using RCU
|
||||
- * and this requires that we are in a read-side RCU section during
|
||||
- * receive processing
|
||||
- */
|
||||
- rcu_read_lock();
|
||||
-
|
||||
- /*
|
||||
* Frames with failed FCS/PLCP checksum are not returned,
|
||||
* all other frames are returned without radiotap header
|
||||
* if it was previously present.
|
||||
* Also, frames with less than 16 bytes are dropped.
|
||||
*/
|
||||
skb = ieee80211_rx_monitor(local, skb, rate);
|
||||
- if (!skb) {
|
||||
- rcu_read_unlock();
|
||||
+ if (!skb)
|
||||
return;
|
||||
- }
|
||||
|
||||
ieee80211_tpt_led_trig_rx(local,
|
||||
((struct ieee80211_hdr *)skb->data)->frame_control,
|
||||
skb->len);
|
||||
|
||||
- __ieee80211_rx_handle_packet(hw, pubsta, skb, napi);
|
||||
-
|
||||
- rcu_read_unlock();
|
||||
+ __ieee80211_rx_handle_packet(hw, pubsta, skb, list);
|
||||
|
||||
return;
|
||||
drop:
|
||||
kfree_skb(skb);
|
||||
}
|
||||
+EXPORT_SYMBOL(ieee80211_rx_list);
|
||||
+
|
||||
+void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
|
||||
+ struct sk_buff *skb, struct napi_struct *napi)
|
||||
+{
|
||||
+ struct sk_buff *tmp;
|
||||
+ LIST_HEAD(list);
|
||||
+
|
||||
+
|
||||
+ /*
|
||||
+ * key references and virtual interfaces are protected using RCU
|
||||
+ * and this requires that we are in a read-side RCU section during
|
||||
+ * receive processing
|
||||
+ */
|
||||
+ rcu_read_lock();
|
||||
+ ieee80211_rx_list(hw, pubsta, skb, &list);
|
||||
+ rcu_read_unlock();
|
||||
+
|
||||
+ if (!napi) {
|
||||
+ netif_receive_skb_list(&list);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ list_for_each_entry_safe(skb, tmp, &list, list) {
|
||||
+ skb_list_del_init(skb);
|
||||
+ napi_gro_receive(napi, skb);
|
||||
+ }
|
||||
+}
|
||||
EXPORT_SYMBOL(ieee80211_rx_napi);
|
||||
|
||||
/* This is a version of the rx handler that can be called from hard irq
|
@ -0,0 +1,55 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sun, 26 Jul 2020 14:37:02 +0200
|
||||
Subject: [PATCH] net/fq_impl: use skb_get_hash instead of
|
||||
skb_get_hash_perturb
|
||||
|
||||
This avoids unnecessary regenerating of the skb flow hash
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/include/net/fq.h
|
||||
+++ b/include/net/fq.h
|
||||
@@ -69,15 +69,6 @@ struct fq {
|
||||
struct list_head backlogs;
|
||||
spinlock_t lock;
|
||||
u32 flows_cnt;
|
||||
-#if LINUX_VERSION_IS_GEQ(5,3,10) || \
|
||||
- LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \
|
||||
- LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \
|
||||
- LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \
|
||||
- LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0)
|
||||
- siphash_key_t perturbation;
|
||||
-#else
|
||||
- u32 perturbation;
|
||||
-#endif
|
||||
u32 limit;
|
||||
u32 memory_limit;
|
||||
u32 memory_usage;
|
||||
--- a/include/net/fq_impl.h
|
||||
+++ b/include/net/fq_impl.h
|
||||
@@ -108,15 +108,7 @@ begin:
|
||||
|
||||
static u32 fq_flow_idx(struct fq *fq, struct sk_buff *skb)
|
||||
{
|
||||
-#if LINUX_VERSION_IS_GEQ(5,3,10) || \
|
||||
- LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \
|
||||
- LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \
|
||||
- LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \
|
||||
- LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0)
|
||||
- u32 hash = skb_get_hash_perturb(skb, &fq->perturbation);
|
||||
-#else
|
||||
- u32 hash = skb_get_hash_perturb(skb, fq->perturbation);
|
||||
-#endif
|
||||
+ u32 hash = skb_get_hash(skb);
|
||||
|
||||
return reciprocal_scale(hash, fq->flows_cnt);
|
||||
}
|
||||
@@ -316,7 +308,6 @@ static int fq_init(struct fq *fq, int fl
|
||||
INIT_LIST_HEAD(&fq->backlogs);
|
||||
spin_lock_init(&fq->lock);
|
||||
fq->flows_cnt = max_t(u32, flows_cnt, 1);
|
||||
- get_random_bytes(&fq->perturbation, sizeof(fq->perturbation));
|
||||
fq->quantum = 300;
|
||||
fq->limit = 8192;
|
||||
fq->memory_limit = 16 << 20; /* 16 MBytes */
|
@ -0,0 +1,19 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sun, 26 Jul 2020 14:42:58 +0200
|
||||
Subject: [PATCH] mac80211: calculcate skb hash early when using itxq
|
||||
|
||||
This avoids flow separation issues when using software encryption
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -3937,6 +3937,7 @@ void __ieee80211_subif_start_xmit(struct
|
||||
if (local->ops->wake_tx_queue) {
|
||||
u16 queue = __ieee80211_select_queue(sdata, sta, skb);
|
||||
skb_set_queue_mapping(skb, queue);
|
||||
+ skb_get_hash(skb);
|
||||
}
|
||||
|
||||
if (sta) {
|
@ -5,7 +5,7 @@ and we should ignore this.
|
||||
|
||||
--- a/net/wireless/core.c
|
||||
+++ b/net/wireless/core.c
|
||||
@@ -613,21 +613,6 @@ static int wiphy_verify_combinations(str
|
||||
@@ -612,21 +612,6 @@ static int wiphy_verify_combinations(str
|
||||
c->limits[j].max > 1))
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -3552,6 +3552,7 @@ struct cfg80211_update_owe_info {
|
||||
@@ -3610,6 +3610,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
|
||||
*
|
||||
@@ -3874,6 +3875,7 @@ struct cfg80211_ops {
|
||||
@@ -3932,6 +3933,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);
|
||||
@ -18,7 +18,7 @@
|
||||
const u8 *addr);
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -1504,6 +1504,7 @@ enum ieee80211_smps_mode {
|
||||
@@ -1519,6 +1519,7 @@ enum ieee80211_smps_mode {
|
||||
*
|
||||
* @power_level: requested transmit power (in dBm), backward compatibility
|
||||
* value only that is set to the minimum of all interfaces
|
||||
@ -26,7 +26,7 @@
|
||||
*
|
||||
* @chandef: the channel definition to tune to
|
||||
* @radar_enabled: whether radar detection is enabled
|
||||
@@ -1524,6 +1525,7 @@ enum ieee80211_smps_mode {
|
||||
@@ -1539,6 +1540,7 @@ enum ieee80211_smps_mode {
|
||||
struct ieee80211_conf {
|
||||
u32 flags;
|
||||
int power_level, dynamic_ps_timeout;
|
||||
@ -36,9 +36,9 @@
|
||||
u8 ps_dtim_period;
|
||||
--- a/include/uapi/linux/nl80211.h
|
||||
+++ b/include/uapi/linux/nl80211.h
|
||||
@@ -2470,6 +2470,9 @@ enum nl80211_commands {
|
||||
* no roaming occurs between the reauth threshold and PMK expiration,
|
||||
* disassociation is still forced.
|
||||
@@ -2505,6 +2505,9 @@ enum nl80211_commands {
|
||||
* @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element (from
|
||||
* association request when used with NL80211_CMD_NEW_STATION).
|
||||
*
|
||||
+ * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
|
||||
+ * transmit power to stay within regulatory limits. u32, dBi.
|
||||
@ -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
|
||||
@@ -2945,6 +2948,8 @@ enum nl80211_attrs {
|
||||
NL80211_ATTR_PMK_LIFETIME,
|
||||
NL80211_ATTR_PMK_REAUTH_THRESHOLD,
|
||||
@@ -2987,6 +2990,8 @@ enum nl80211_attrs {
|
||||
|
||||
NL80211_ATTR_HE_6GHZ_CAPABILITY,
|
||||
|
||||
+ NL80211_ATTR_WIPHY_ANTENNA_GAIN,
|
||||
+
|
||||
@ -57,7 +57,7 @@
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -2582,6 +2582,19 @@ static int ieee80211_get_tx_power(struct
|
||||
@@ -2609,6 +2609,19 @@ static int ieee80211_get_tx_power(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *addr)
|
||||
{
|
||||
@@ -4004,6 +4017,7 @@ const struct cfg80211_ops mac80211_confi
|
||||
@@ -4039,6 +4052,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,
|
||||
@ -87,7 +87,7 @@
|
||||
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1380,6 +1380,7 @@ struct ieee80211_local {
|
||||
@@ -1385,6 +1385,7 @@ struct ieee80211_local {
|
||||
int dynamic_ps_forced_timeout;
|
||||
|
||||
int user_power_level; /* in dBm, for all interfaces */
|
||||
@ -97,7 +97,7 @@
|
||||
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -93,7 +93,7 @@ static u32 ieee80211_hw_conf_chan(struct
|
||||
@@ -96,7 +96,7 @@ static u32 ieee80211_hw_conf_chan(struct
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
struct cfg80211_chan_def chandef = {};
|
||||
u32 changed = 0;
|
||||
@ -106,7 +106,7 @@
|
||||
u32 offchannel_flag;
|
||||
|
||||
offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
|
||||
@@ -152,6 +152,12 @@ static u32 ieee80211_hw_conf_chan(struct
|
||||
@@ -157,6 +157,12 @@ static u32 ieee80211_hw_conf_chan(struct
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
if (local->hw.conf.power_level != power) {
|
||||
changed |= IEEE80211_CONF_CHANGE_POWER;
|
||||
local->hw.conf.power_level = power;
|
||||
@@ -656,6 +662,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
@@ -665,6 +671,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
IEEE80211_RADIOTAP_MCS_HAVE_BW;
|
||||
local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI |
|
||||
IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH;
|
||||
@ -129,15 +129,15 @@
|
||||
local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -661,6 +661,7 @@ const struct nla_policy nl80211_policy[N
|
||||
[NL80211_ATTR_CONTROL_PORT_NO_PREAUTH] = { .type = NLA_FLAG },
|
||||
[NL80211_ATTR_PMK_LIFETIME] = NLA_POLICY_MIN(NLA_U32, 1),
|
||||
[NL80211_ATTR_PMK_REAUTH_THRESHOLD] = NLA_POLICY_RANGE(NLA_U8, 1, 100),
|
||||
@@ -658,6 +658,7 @@ static const struct nla_policy nl80211_p
|
||||
.type = NLA_EXACT_LEN,
|
||||
.len = sizeof(struct ieee80211_he_6ghz_capa),
|
||||
},
|
||||
+ [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 },
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -3132,6 +3133,20 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
@@ -3136,6 +3137,20 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
if (result)
|
||||
return result;
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
--- a/net/mac80211/vht.c
|
||||
+++ b/net/mac80211/vht.c
|
||||
@@ -135,7 +135,8 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
|
||||
have_80mhz = false;
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
|
||||
- IEEE80211_CHAN_NO_80MHZ))
|
||||
+ IEEE80211_CHAN_NO_80MHZ) &&
|
||||
+ (sband->band != NL80211_BAND_2GHZ))
|
||||
continue;
|
||||
|
||||
have_80mhz = true;
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1769,7 +1769,8 @@ static int ieee80211_build_preq_ies_band
|
||||
/* Check if any channel in this sband supports at least 80 MHz */
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
|
||||
- IEEE80211_CHAN_NO_80MHZ))
|
||||
+ IEEE80211_CHAN_NO_80MHZ) &&
|
||||
+ (sband->band != NL80211_BAND_2GHZ))
|
||||
continue;
|
||||
|
||||
have_80mhz = true;
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -4825,7 +4825,8 @@ static int ieee80211_prep_channel(struct
|
||||
have_80mhz = false;
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
|
||||
- IEEE80211_CHAN_NO_80MHZ))
|
||||
+ IEEE80211_CHAN_NO_80MHZ) &&
|
||||
+ (sband->band != NL80211_BAND_2GHZ))
|
||||
continue;
|
||||
|
||||
have_80mhz = true;
|
@ -0,0 +1,28 @@
|
||||
From db6d1e942f5a2828e1245e16ceb997f537a2d1a4 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Sat, 25 Jul 2020 01:43:26 +0200
|
||||
Subject: [PATCH] mac80211: util: don't warn on missing sband iftype data
|
||||
|
||||
The kernel currently floods the ringbuffer with warnings when adding a
|
||||
mesh interface for a device not support HE 6GHz modes.
|
||||
|
||||
Return without warning in this case, as mesh_add_he_6ghz_cap_ie calls
|
||||
ieee80211_ie_build_he_6ghz_cap regardless of the supported interface
|
||||
modes.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
net/mac80211/util.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -2875,7 +2875,7 @@ void ieee80211_ie_build_he_6ghz_cap(stru
|
||||
return;
|
||||
|
||||
iftd = ieee80211_get_sband_iftype_data(sband, iftype);
|
||||
- if (WARN_ON(!iftd))
|
||||
+ if (!iftd)
|
||||
return;
|
||||
|
||||
cap = le16_to_cpu(iftd->he_6ghz_capa.capa);
|
@ -26,7 +26,7 @@ config-$(call config_package,rtl8723bs) += RTL8723BS
|
||||
config-y += STAGING
|
||||
|
||||
config-$(call config_package,rtw88) += RTW88 RTW88_CORE RTW88_PCI
|
||||
config-y += RTW88_8822BE RTW88_8822CE
|
||||
config-y += RTW88_8822BE RTW88_8822CE RTW88_8723DE
|
||||
|
||||
define KernelPackage/rtl818x/Default
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
@ -177,11 +177,18 @@ endef
|
||||
|
||||
define KernelPackage/rtw88
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Realtek RTL8822BE/RTL8822CE
|
||||
TITLE:=Realtek RTL8822BE/RTL8822CE/RTL8723DE
|
||||
DEPENDS+= @(PCI_SUPPORT) +kmod-mac80211 +@DRIVER_11AC_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11W_SUPPORT
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtwpci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtwpci)
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822be.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822b.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822ce.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822c.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723de.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723d.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_core.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtw88_8822be rtw88_8822ce rtw88_8723de)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtl8723bs
|
||||
|
@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2020-05-30
|
||||
PKG_SOURCE_VERSION:=85c516081338d3d1454fb53b5741321c2adefbef
|
||||
PKG_MIRROR_HASH:=a3e110700843ecfee10eba274ab6fe63b9d78a00eb96ee1634b145e0a9ae9a69
|
||||
PKG_SOURCE_DATE:=2020-07-22
|
||||
PKG_SOURCE_VERSION:=b5df0fbb1847a51f0a11f03a3fa8dc9d98d4df82
|
||||
PKG_MIRROR_HASH:=70aca7f8912b89af975c7b63fdf25d41be831c434e0c991fcbdaa60127d4acd5
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
@ -23,12 +23,17 @@ PKG_CONFIG_DEPENDS += \
|
||||
CONFIG_PACKAGE_kmod-mt76x2-common \
|
||||
CONFIG_PACKAGE_kmod-mt76x2 \
|
||||
CONFIG_PACKAGE_kmod-mt76x2u \
|
||||
CONFIG_PACKAGE_kmod-mt7603
|
||||
CONFIG_PACKAGE_kmod-mt7603 \
|
||||
CONFIG_PACKAGE_CFG80211_TESTMODE
|
||||
|
||||
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
CMAKE_SOURCE_DIR:=$(PKG_BUILD_DIR)/tools
|
||||
CMAKE_BINARY_DIR:=$(PKG_BUILD_DIR)/tools
|
||||
|
||||
define KernelPackage/mt76-default
|
||||
SUBMENU:=Wireless Drivers
|
||||
@ -170,10 +175,29 @@ define KernelPackage/mt7663-firmware-sta
|
||||
TITLE:=MediaTek MT7663e firmware (client mode offload)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7663-usb-sdio
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7663 USB/SDIO shared code
|
||||
DEPENDS+=+kmod-mt7615-common
|
||||
HIDDEN:=1
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/mt7615/mt7663-usb-sdio-common.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7663s
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7663s wireless driver
|
||||
DEPENDS+=+kmod-mmc +kmod-mt7615-common +kmod-mt7663-usb-sdio
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/mt76-sdio.ko \
|
||||
$(PKG_BUILD_DIR)/mt7615/mt7663s.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7663s)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7663u
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7663u wireless driver
|
||||
DEPENDS+=+kmod-mt76-usb +kmod-mt7615-common
|
||||
DEPENDS+=+kmod-mt76-usb +kmod-mt7615-common +kmod-mt7663-usb-sdio
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7615/mt7663u.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7663u)
|
||||
endef
|
||||
@ -186,6 +210,15 @@ define KernelPackage/mt7915e
|
||||
AUTOLOAD:=$(call AutoProbe,mt7915e)
|
||||
endef
|
||||
|
||||
define Package/mt76-test
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=mt76 testmode CLI
|
||||
DEPENDS:=kmod-mt76-core +libnl-tiny
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
|
||||
|
||||
NOSTDINC_FLAGS = \
|
||||
-I$(PKG_BUILD_DIR) \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||
@ -199,6 +232,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH
|
||||
NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PACKAGE_CFG80211_TESTMODE
|
||||
NOSTDINC_FLAGS += -DCONFIG_NL80211_TESTMODE
|
||||
PKG_MAKE_FLAGS += CONFIG_NL80211_TESTMODE=y
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76-usb
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76_USB=m
|
||||
endif
|
||||
@ -239,6 +277,13 @@ ifdef CONFIG_PACKAGE_kmod-mt7615e
|
||||
NOSTDINC_FLAGS += -DCONFIG_MT7622_WMAC
|
||||
endif
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7663-usb-sdio
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7663_USB_SDIO_COMMON=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7663s
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76_SDIO=m
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7663S=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7663u
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7663U=m
|
||||
endif
|
||||
@ -253,6 +298,11 @@ define Build/Compile
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
||||
modules
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/tools
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
:
|
||||
endef
|
||||
|
||||
define Package/kmod-mt76/install
|
||||
@ -334,6 +384,11 @@ define KernelPackage/mt7915e/install
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define Package/mt76-test/install
|
||||
mkdir -p $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mt76-test $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,mt76-core))
|
||||
$(eval $(call KernelPackage,mt76-usb))
|
||||
$(eval $(call KernelPackage,mt76x02-usb))
|
||||
@ -350,6 +405,9 @@ $(eval $(call KernelPackage,mt7615-firmware))
|
||||
$(eval $(call KernelPackage,mt7615e))
|
||||
$(eval $(call KernelPackage,mt7663-firmware-ap))
|
||||
$(eval $(call KernelPackage,mt7663-firmware-sta))
|
||||
$(eval $(call KernelPackage,mt7663-usb-sdio))
|
||||
$(eval $(call KernelPackage,mt7663u))
|
||||
$(eval $(call KernelPackage,mt7663s))
|
||||
$(eval $(call KernelPackage,mt7915e))
|
||||
$(eval $(call KernelPackage,mt76))
|
||||
$(eval $(call BuildPackage,mt76-test))
|
||||
|
@ -7,7 +7,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostapd
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
@ -98,29 +98,31 @@ ifneq ($(LOCAL_VARIANT),mini)
|
||||
DRIVER_MAKEOPTS += CONFIG_IEEE80211W=$(CONFIG_DRIVER_11W_SUPPORT)
|
||||
endif
|
||||
|
||||
ifeq ($(LOCAL_VARIANT),full)
|
||||
ifeq ($(SSL_VARIANT),openssl)
|
||||
DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_SAE=y CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y
|
||||
TARGET_LDFLAGS += -lcrypto -lssl
|
||||
ifeq ($(SSL_VARIANT),openssl)
|
||||
DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_SAE=y
|
||||
TARGET_LDFLAGS += -lcrypto -lssl
|
||||
|
||||
ifeq ($(LOCAL_VARIANT),mesh)
|
||||
DRIVER_MAKEOPTS += CONFIG_AP=y CONFIG_MESH=y
|
||||
endif
|
||||
ifeq ($(SSL_VARIANT),wolfssl)
|
||||
DRIVER_MAKEOPTS += CONFIG_TLS=wolfssl CONFIG_WPS_NFC=1 CONFIG_SAE=y CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y
|
||||
TARGET_LDFLAGS += -lwolfssl
|
||||
ifeq ($(LOCAL_VARIANT),full)
|
||||
DRIVER_MAKEOPTS += CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SSL_VARIANT),wolfssl)
|
||||
DRIVER_MAKEOPTS += CONFIG_TLS=wolfssl CONFIG_SAE=y
|
||||
TARGET_LDFLAGS += -lwolfssl
|
||||
|
||||
ifeq ($(LOCAL_VARIANT),mesh)
|
||||
DRIVER_MAKEOPTS += CONFIG_AP=y CONFIG_MESH=y CONFIG_WPS_NFC=1
|
||||
endif
|
||||
ifeq ($(LOCAL_VARIANT),full)
|
||||
DRIVER_MAKEOPTS += CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y CONFIG_WPS_NFC=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(LOCAL_TYPE),hostapd)
|
||||
ifeq ($(LOCAL_VARIANT),mesh)
|
||||
ifeq ($(SSL_VARIANT),openssl)
|
||||
DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_AP=y CONFIG_SAE=y CONFIG_MESH=y
|
||||
TARGET_LDFLAGS += -lcrypto -lssl
|
||||
endif
|
||||
ifeq ($(SSL_VARIANT),wolfssl)
|
||||
DRIVER_MAKEOPTS += CONFIG_TLS=wolfssl CONFIG_WPS_NFC=1 CONFIG_AP=y CONFIG_SAE=y CONFIG_MESH=y
|
||||
TARGET_LDFLAGS += -lwolfssl
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_WPA_RFKILL_SUPPORT
|
||||
DRIVER_MAKEOPTS += NEED_RFKILL=y
|
||||
endif
|
||||
@ -148,7 +150,7 @@ endef
|
||||
|
||||
define Package/hostapd
|
||||
$(call Package/hostapd/Default,$(1))
|
||||
TITLE+= (full)
|
||||
TITLE+= (built-in full)
|
||||
VARIANT:=full-internal
|
||||
endef
|
||||
|
||||
@ -159,7 +161,7 @@ endef
|
||||
|
||||
define Package/hostapd-openssl
|
||||
$(call Package/hostapd/Default,$(1))
|
||||
TITLE+= (full)
|
||||
TITLE+= (OpenSSL full)
|
||||
VARIANT:=full-openssl
|
||||
DEPENDS+=+libopenssl
|
||||
endef
|
||||
@ -168,7 +170,7 @@ Package/hostapd-openssl/description = $(Package/hostapd/description)
|
||||
|
||||
define Package/hostapd-wolfssl
|
||||
$(call Package/hostapd/Default,$(1))
|
||||
TITLE+= (full)
|
||||
TITLE+= (wolfSSL full)
|
||||
VARIANT:=full-wolfssl
|
||||
DEPENDS+=+libwolfssl
|
||||
endef
|
||||
@ -177,7 +179,7 @@ Package/hostapd-wolfssl/description = $(Package/hostapd/description)
|
||||
|
||||
define Package/hostapd-basic
|
||||
$(call Package/hostapd/Default,$(1))
|
||||
TITLE+= (WPA-PSK, 11r and 11w)
|
||||
TITLE+= (WPA-PSK, 11r, 11w)
|
||||
VARIANT:=basic
|
||||
endef
|
||||
|
||||
@ -200,7 +202,7 @@ define Package/wpad/Default
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=WirelessAPD
|
||||
TITLE:=IEEE 802.1x Authenticator/Supplicant
|
||||
TITLE:=IEEE 802.1x Auth/Supplicant
|
||||
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
|
||||
URL:=http://hostap.epitest.fi/
|
||||
PROVIDES:=hostapd wpa-supplicant
|
||||
@ -211,7 +213,7 @@ endef
|
||||
|
||||
define Package/wpad
|
||||
$(call Package/wpad/Default,$(1))
|
||||
TITLE+= (full)
|
||||
TITLE+= (built-in full)
|
||||
VARIANT:=wpad-full-internal
|
||||
endef
|
||||
|
||||
@ -222,7 +224,7 @@ endef
|
||||
|
||||
define Package/wpad-openssl
|
||||
$(call Package/wpad/Default,$(1))
|
||||
TITLE+= (full)
|
||||
TITLE+= (OpenSSL full)
|
||||
VARIANT:=wpad-full-openssl
|
||||
DEPENDS+=+libopenssl
|
||||
endef
|
||||
@ -231,7 +233,7 @@ Package/wpad-openssl/description = $(Package/wpad/description)
|
||||
|
||||
define Package/wpad-wolfssl
|
||||
$(call Package/wpad/Default,$(1))
|
||||
TITLE+= (full)
|
||||
TITLE+= (wolfSSL full)
|
||||
VARIANT:=wpad-full-wolfssl
|
||||
DEPENDS+=+libwolfssl
|
||||
endef
|
||||
@ -240,7 +242,7 @@ Package/wpad-wolfssl/description = $(Package/wpad/description)
|
||||
|
||||
define Package/wpad-basic
|
||||
$(call Package/wpad/Default,$(1))
|
||||
TITLE+= (WPA-PSK, 11r and 11w)
|
||||
TITLE+= (WPA-PSK, 11r, 11w)
|
||||
VARIANT:=wpad-basic
|
||||
endef
|
||||
|
||||
@ -260,7 +262,6 @@ endef
|
||||
|
||||
define Package/wpad-mesh
|
||||
$(call Package/wpad/Default,$(1))
|
||||
TITLE+= (with 802.11s mesh and SAE support)
|
||||
DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
|
||||
PROVIDES+=wpa-supplicant-mesh wpad-mesh
|
||||
endef
|
||||
@ -271,6 +272,7 @@ endef
|
||||
|
||||
define Package/wpad-mesh-openssl
|
||||
$(call Package/wpad-mesh,$(1))
|
||||
TITLE+= (OpenSSL, 11s, SAE)
|
||||
DEPENDS+=+libopenssl
|
||||
VARIANT:=wpad-mesh-openssl
|
||||
endef
|
||||
@ -279,6 +281,7 @@ Package/wpad-mesh-openssl/description = $(Package/wpad-mesh/description)
|
||||
|
||||
define Package/wpad-mesh-wolfssl
|
||||
$(call Package/wpad-mesh,$(1))
|
||||
TITLE+= (wolfSSL, 11s, SAE)
|
||||
DEPENDS+=+libwolfssl
|
||||
VARIANT:=wpad-mesh-wolfssl
|
||||
endef
|
||||
@ -300,17 +303,20 @@ endef
|
||||
|
||||
define Package/wpa-supplicant
|
||||
$(call Package/wpa-supplicant/Default,$(1))
|
||||
TITLE+= (built-in full)
|
||||
VARIANT:=supplicant-full-internal
|
||||
endef
|
||||
|
||||
define Package/wpa-supplicant-openssl
|
||||
$(call Package/wpa-supplicant/Default,$(1))
|
||||
TITLE+= (OpenSSL full)
|
||||
VARIANT:=supplicant-full-openssl
|
||||
DEPENDS+=+libopenssl
|
||||
endef
|
||||
|
||||
define Package/wpa-supplicant-wolfssl
|
||||
$(call Package/wpa-supplicant/Default,$(1))
|
||||
TITLE+= (wolfSSL full)
|
||||
VARIANT:=supplicant-full-wolfssl
|
||||
DEPENDS+=+libwolfssl
|
||||
endef
|
||||
@ -321,39 +327,40 @@ endef
|
||||
|
||||
define Package/wpa-supplicant-p2p
|
||||
$(call Package/wpa-supplicant/Default,$(1))
|
||||
TITLE+= (with Wi-Fi P2P support)
|
||||
TITLE+= (Wi-Fi P2P support)
|
||||
DEPENDS+=@PACKAGE_kmod-cfg80211
|
||||
VARIANT:=supplicant-p2p-internal
|
||||
endef
|
||||
|
||||
define Package/wpa-supplicant-mesh/Default
|
||||
$(call Package/wpa-supplicant/Default,$(1))
|
||||
TITLE+= (with 802.11s and SAE)
|
||||
DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
|
||||
PROVIDES+=wpa-supplicant-mesh
|
||||
endef
|
||||
|
||||
define Package/wpa-supplicant-mesh-openssl
|
||||
$(call Package/wpa-supplicant-mesh/Default,$(1))
|
||||
TITLE+= (OpenSSL, 11s, SAE)
|
||||
VARIANT:=supplicant-mesh-openssl
|
||||
DEPENDS+=+libopenssl
|
||||
endef
|
||||
|
||||
define Package/wpa-supplicant-mesh-wolfssl
|
||||
$(call Package/wpa-supplicant-mesh/Default,$(1))
|
||||
TITLE+= (wolfSSL, 11s, SAE)
|
||||
VARIANT:=supplicant-mesh-wolfssl
|
||||
DEPENDS+=+libwolfssl
|
||||
endef
|
||||
|
||||
define Package/wpa-supplicant-basic
|
||||
$(call Package/wpa-supplicant/Default,$(1))
|
||||
TITLE+= (with 11r and 11w)
|
||||
TITLE+= (11r, 11w)
|
||||
VARIANT:=supplicant-basic
|
||||
endef
|
||||
|
||||
define Package/wpa-supplicant-mini
|
||||
$(call Package/wpa-supplicant/Default,$(1))
|
||||
TITLE+= (minimal version)
|
||||
TITLE+= (minimal)
|
||||
VARIANT:=supplicant-mini
|
||||
endef
|
||||
|
||||
@ -387,34 +394,35 @@ define Package/wpa-cli
|
||||
TITLE:=WPA Supplicant command line control utility
|
||||
endef
|
||||
|
||||
define Package/eapol-test
|
||||
TITLE:=802.1x authentication test utility
|
||||
define Package/eapol-test/Default
|
||||
TITLE:=802.1x auth test utility
|
||||
SECTION:=net
|
||||
SUBMENU:=WirelessAPD
|
||||
CATEGORY:=Network
|
||||
VARIANT:=supplicant-full-internal
|
||||
DEPENDS:=$(DRV_DEPENDS) +libubus
|
||||
endef
|
||||
|
||||
define Package/eapol-test
|
||||
$(call Package/eapol-test/Default,$(1))
|
||||
TITLE+= (built-in full)
|
||||
VARIANT:=supplicant-full-internal
|
||||
endef
|
||||
|
||||
define Package/eapol-test-openssl
|
||||
TITLE:=802.1x authentication test utility
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=WirelessAPD
|
||||
$(call Package/eapol-test/Default,$(1))
|
||||
TITLE+= (OpenSSL full)
|
||||
VARIANT:=supplicant-full-openssl
|
||||
CONFLICTS:=$(filter-out eapol-test-openssl ,$(EAPOL_TEST_PROVIDERS))
|
||||
DEPENDS:=$(DRV_DEPENDS) +libubus +libopenssl
|
||||
DEPENDS+=+libopenssl
|
||||
PROVIDES:=eapol-test
|
||||
endef
|
||||
|
||||
define Package/eapol-test-wolfssl
|
||||
TITLE:=802.1x authentication test utility
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=WirelessAPD
|
||||
$(call Package/eapol-test/Default,$(1))
|
||||
TITLE+= (wolfSSL full)
|
||||
VARIANT:=supplicant-full-wolfssl
|
||||
CONFLICTS:=$(filter-out eapol-test-openssl ,$(filter-out eapol-test-wolfssl ,$(EAPOL_TEST_PROVIDERS)))
|
||||
DEPENDS:=$(DRV_DEPENDS) +libubus +libwolfssl
|
||||
DEPENDS+=+libwolfssl
|
||||
PROVIDES:=eapol-test
|
||||
endef
|
||||
|
||||
|
@ -95,6 +95,7 @@ hostapd_common_add_device_config() {
|
||||
config_add_int local_pwr_constraint
|
||||
config_add_string require_mode
|
||||
config_add_boolean legacy_rates
|
||||
config_add_boolean vendor_vht
|
||||
|
||||
config_add_string acs_chan_bias
|
||||
config_add_array hostapd_options
|
||||
@ -110,7 +111,7 @@ hostapd_prepare_device_config() {
|
||||
local base_cfg=
|
||||
|
||||
json_get_vars country country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
|
||||
acs_chan_bias local_pwr_constraint spectrum_mgmt_required
|
||||
acs_chan_bias local_pwr_constraint spectrum_mgmt_required vendor_vht
|
||||
|
||||
hostapd_set_log_options base_cfg
|
||||
|
||||
@ -145,6 +146,7 @@ hostapd_prepare_device_config() {
|
||||
[ "$hwmode" = "g" ] && {
|
||||
[ "$legacy_rates" -eq 0 ] && set_default rate_list "6000 9000 12000 18000 24000 36000 48000 54000"
|
||||
[ -n "$require_mode" ] && set_default basic_rate_list "6000 12000 24000"
|
||||
[ -n "$vendor_vht" ] && append base_cfg "vendor_vht=$vendor_vht" "$N"
|
||||
}
|
||||
|
||||
case "$require_mode" in
|
||||
@ -1125,7 +1127,7 @@ wpa_supplicant_run() {
|
||||
|
||||
[ "$ret" != 0 ] && wireless_setup_vif_failed WPA_SUPPLICANT_FAILED
|
||||
|
||||
local supplicant_pid=$(ubus call service list '{"name": "hostapd"}' | jsonfilter -l 1 -e "@['hostapd'].instances['supplicant'].pid")
|
||||
local supplicant_pid=$(ubus call service list '{"name": "wpad"}' | jsonfilter -l 1 -e "@['wpad'].instances['supplicant'].pid")
|
||||
wireless_add_process "$supplicant_pid" "/usr/sbin/wpa_supplicant" 1
|
||||
|
||||
return $ret
|
||||
|
@ -0,0 +1,196 @@
|
||||
From 91976250359b263a44861aebe553b20627fe487e Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 13:53:17 +0200
|
||||
Subject: [PATCH 01/19] HE/VHT: fix frequency setup with HE enabled
|
||||
|
||||
Some places in the code base were not using the
|
||||
wrappers like hostapd_set_oper_centr_freq_seg0_idx
|
||||
and friends. This could lead to errors, for example when
|
||||
joining 80 MHz mesh networks. Fix this, by enforcing
|
||||
usage of these wrappers.
|
||||
|
||||
wpa_supplicant_conf_ap_ht now checks for HE capability
|
||||
before dealing with VHT in order for these wrappers to work,
|
||||
as they first check HE support in the config.
|
||||
|
||||
While doing these changes, I've noticed that the extra
|
||||
channel setup code for mesh networks in wpa_supplicant/mesh.c
|
||||
should not be necessary anymore and dropped it.
|
||||
wpa_supplicant_conf_ap_ht should handle this setup already.
|
||||
|
||||
Acked-by: John Crispin <john@phrozen.org>
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
src/ap/dfs.c | 8 ++++----
|
||||
wpa_supplicant/ap.c | 40 +++++++++++++++++++++++-----------------
|
||||
wpa_supplicant/mesh.c | 24 ------------------------
|
||||
3 files changed, 27 insertions(+), 45 deletions(-)
|
||||
|
||||
--- a/src/ap/dfs.c
|
||||
+++ b/src/ap/dfs.c
|
||||
@@ -1028,7 +1028,7 @@ static int hostapd_dfs_start_channel_swi
|
||||
unsigned int i;
|
||||
int err = 1;
|
||||
struct hostapd_hw_modes *cmode = iface->current_mode;
|
||||
- u8 current_vht_oper_chwidth = iface->conf->vht_oper_chwidth;
|
||||
+ u8 current_vht_oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
|
||||
|
||||
wpa_printf(MSG_DEBUG, "%s called (CAC active: %s, CSA active: %s)",
|
||||
__func__, iface->cac_started ? "yes" : "no",
|
||||
@@ -1089,8 +1089,8 @@ static int hostapd_dfs_start_channel_swi
|
||||
"freq=%d chan=%d sec_chan=%d", channel->freq,
|
||||
channel->chan, secondary_channel);
|
||||
|
||||
- new_vht_oper_chwidth = iface->conf->vht_oper_chwidth;
|
||||
- iface->conf->vht_oper_chwidth = current_vht_oper_chwidth;
|
||||
+ new_vht_oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
|
||||
+ hostapd_set_oper_chwidth(iface->conf, current_vht_oper_chwidth);
|
||||
|
||||
/* Setup CSA request */
|
||||
os_memset(&csa_settings, 0, sizeof(csa_settings));
|
||||
@@ -1130,7 +1130,7 @@ static int hostapd_dfs_start_channel_swi
|
||||
iface->freq = channel->freq;
|
||||
iface->conf->channel = channel->chan;
|
||||
iface->conf->secondary_channel = secondary_channel;
|
||||
- iface->conf->vht_oper_chwidth = new_vht_oper_chwidth;
|
||||
+ hostapd_set_oper_chwidth(iface->conf, new_vht_oper_chwidth);
|
||||
hostapd_set_oper_centr_freq_seg0_idx(iface->conf,
|
||||
oper_centr_freq_seg0_idx);
|
||||
hostapd_set_oper_centr_freq_seg1_idx(iface->conf,
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -52,6 +52,7 @@ static void wpas_conf_ap_vht(struct wpa_
|
||||
#ifdef CONFIG_P2P
|
||||
u8 center_chan = 0;
|
||||
u8 channel = conf->channel;
|
||||
+ u8 freq_seg_idx;
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
if (!conf->secondary_channel)
|
||||
@@ -59,19 +60,21 @@ static void wpas_conf_ap_vht(struct wpa_
|
||||
|
||||
/* Use the maximum oper channel width if it's given. */
|
||||
if (ssid->max_oper_chwidth)
|
||||
- conf->vht_oper_chwidth = ssid->max_oper_chwidth;
|
||||
+ hostapd_set_oper_chwidth(conf, ssid->max_oper_chwidth);
|
||||
|
||||
ieee80211_freq_to_chan(ssid->vht_center_freq2,
|
||||
- &conf->vht_oper_centr_freq_seg1_idx);
|
||||
+ &freq_seg_idx);
|
||||
+ hostapd_set_oper_centr_freq_seg1_idx(conf, freq_seg_idx);
|
||||
|
||||
if (!ssid->p2p_group) {
|
||||
if (!ssid->vht_center_freq1 ||
|
||||
- conf->vht_oper_chwidth == CHANWIDTH_USE_HT)
|
||||
+ hostapd_get_oper_chwidth(conf) == CHANWIDTH_USE_HT)
|
||||
goto no_vht;
|
||||
ieee80211_freq_to_chan(ssid->vht_center_freq1,
|
||||
- &conf->vht_oper_centr_freq_seg0_idx);
|
||||
+ &freq_seg_idx);
|
||||
+ hostapd_set_oper_centr_freq_seg0_idx(conf, freq_seg_idx);
|
||||
wpa_printf(MSG_DEBUG, "VHT seg0 index %d for AP",
|
||||
- conf->vht_oper_centr_freq_seg0_idx);
|
||||
+ hostapd_get_oper_centr_freq_seg0_idx(conf));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -96,14 +99,14 @@ static void wpas_conf_ap_vht(struct wpa_
|
||||
* try oper_cwidth 160 MHz first then VHT 80 MHz, if 160 MHz is
|
||||
* not supported.
|
||||
*/
|
||||
- conf->vht_oper_chwidth = CHANWIDTH_160MHZ;
|
||||
+ hostapd_set_oper_chwidth(conf, CHANWIDTH_160MHZ);
|
||||
center_chan = wpas_p2p_get_vht160_center(wpa_s, mode, channel);
|
||||
if (center_chan) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"VHT center channel %u for auto-selected 160 MHz bandwidth",
|
||||
center_chan);
|
||||
} else {
|
||||
- conf->vht_oper_chwidth = CHANWIDTH_80MHZ;
|
||||
+ hostapd_set_oper_chwidth(conf, CHANWIDTH_80MHZ);
|
||||
center_chan = wpas_p2p_get_vht80_center(wpa_s, mode,
|
||||
channel);
|
||||
wpa_printf(MSG_DEBUG,
|
||||
@@ -115,9 +118,9 @@ static void wpas_conf_ap_vht(struct wpa_
|
||||
if (!center_chan)
|
||||
goto no_vht;
|
||||
|
||||
- conf->vht_oper_centr_freq_seg0_idx = center_chan;
|
||||
+ hostapd_set_oper_centr_freq_seg0_idx(conf, center_chan);
|
||||
wpa_printf(MSG_DEBUG, "VHT seg0 index %d for P2P GO",
|
||||
- conf->vht_oper_centr_freq_seg0_idx);
|
||||
+ hostapd_get_oper_centr_freq_seg0_idx(conf));
|
||||
return;
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
@@ -125,9 +128,9 @@ no_vht:
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"No VHT higher bandwidth support for the selected channel %d",
|
||||
conf->channel);
|
||||
- conf->vht_oper_centr_freq_seg0_idx =
|
||||
- conf->channel + conf->secondary_channel * 2;
|
||||
- conf->vht_oper_chwidth = CHANWIDTH_USE_HT;
|
||||
+ hostapd_set_oper_centr_freq_seg0_idx(conf,
|
||||
+ conf->channel + conf->secondary_channel * 2);
|
||||
+ hostapd_set_oper_chwidth(conf, CHANWIDTH_USE_HT);
|
||||
}
|
||||
|
||||
|
||||
@@ -231,16 +234,19 @@ int wpa_supplicant_conf_ap_ht(struct wpa
|
||||
HT_CAP_INFO_TX_STBC |
|
||||
HT_CAP_INFO_MAX_AMSDU_SIZE);
|
||||
|
||||
+ /* check this before VHT, because setting oper chan
|
||||
+ * width and friends is the same call for HE and VHT
|
||||
+ * and checks if conf->ieee8021ax == 1 */
|
||||
+ if (mode->he_capab[wpas_mode_to_ieee80211_mode(
|
||||
+ ssid->mode)].he_supported &&
|
||||
+ ssid->he)
|
||||
+ conf->ieee80211ax = 1;
|
||||
+
|
||||
if (mode->vht_capab && ssid->vht) {
|
||||
conf->ieee80211ac = 1;
|
||||
conf->vht_capab |= mode->vht_capab;
|
||||
wpas_conf_ap_vht(wpa_s, ssid, conf, mode);
|
||||
}
|
||||
-
|
||||
- if (mode->he_capab[wpas_mode_to_ieee80211_mode(
|
||||
- ssid->mode)].he_supported &&
|
||||
- ssid->he)
|
||||
- conf->ieee80211ax = 1;
|
||||
}
|
||||
}
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -333,30 +333,6 @@ static int wpa_supplicant_mesh_init(stru
|
||||
frequency);
|
||||
goto out_free;
|
||||
}
|
||||
- if (ssid->ht40)
|
||||
- conf->secondary_channel = ssid->ht40;
|
||||
- if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && ssid->vht) {
|
||||
- if (ssid->max_oper_chwidth != DEFAULT_MAX_OPER_CHWIDTH)
|
||||
- conf->vht_oper_chwidth = ssid->max_oper_chwidth;
|
||||
- switch (conf->vht_oper_chwidth) {
|
||||
- case CHANWIDTH_80MHZ:
|
||||
- case CHANWIDTH_80P80MHZ:
|
||||
- ieee80211_freq_to_chan(
|
||||
- frequency,
|
||||
- &conf->vht_oper_centr_freq_seg0_idx);
|
||||
- conf->vht_oper_centr_freq_seg0_idx += ssid->ht40 * 2;
|
||||
- break;
|
||||
- case CHANWIDTH_160MHZ:
|
||||
- ieee80211_freq_to_chan(
|
||||
- frequency,
|
||||
- &conf->vht_oper_centr_freq_seg0_idx);
|
||||
- conf->vht_oper_centr_freq_seg0_idx += ssid->ht40 * 2;
|
||||
- conf->vht_oper_centr_freq_seg0_idx += 40 / 5;
|
||||
- break;
|
||||
- }
|
||||
- ieee80211_freq_to_chan(ssid->vht_center_freq2,
|
||||
- &conf->vht_oper_centr_freq_seg1_idx);
|
||||
- }
|
||||
|
||||
if (ssid->mesh_basic_rates == NULL) {
|
||||
/*
|
@ -0,0 +1,126 @@
|
||||
From d869c753b79a1423c2bd9b0afdfa0d89d55a930c Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 13:53:18 +0200
|
||||
Subject: [PATCH 02/19] mesh: fix channel init order, disable pri/sec channel
|
||||
switch
|
||||
|
||||
wpa_supplicant_conf_ap_ht has to happen before hostapd_setup_interface
|
||||
in order for its configuration settings to have effect on interface
|
||||
configuration.
|
||||
|
||||
Disable primary and secondary channel switch because of missing tie
|
||||
breaking rule/frames in mesh networks. A rather long comment about
|
||||
this issue is placed in mesh.c in the corresponding place.
|
||||
|
||||
In consequence, remove mesh coex test, which contradicts this change.
|
||||
|
||||
I was not able to reproduce the memory corruption during
|
||||
mesh_secure_ocv_mix_legacy, which lead to a revert of a similar patch
|
||||
in the past.
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
tests/hwsim/test_wpas_mesh.py | 50 -----------------------------------
|
||||
wpa_supplicant/mesh.c | 25 ++++++++++++++++--
|
||||
2 files changed, 23 insertions(+), 52 deletions(-)
|
||||
|
||||
--- a/tests/hwsim/test_wpas_mesh.py
|
||||
+++ b/tests/hwsim/test_wpas_mesh.py
|
||||
@@ -933,56 +933,6 @@ def _test_wpas_mesh_open_5ghz(dev, apdev
|
||||
dev[0].dump_monitor()
|
||||
dev[1].dump_monitor()
|
||||
|
||||
-def test_wpas_mesh_open_5ghz_coex(dev, apdev):
|
||||
- """Mesh network on 5 GHz band and 20/40 coex change"""
|
||||
- try:
|
||||
- _test_wpas_mesh_open_5ghz_coex(dev, apdev)
|
||||
- finally:
|
||||
- dev[0].request("MESH_GROUP_REMOVE " + dev[0].ifname)
|
||||
- dev[1].request("MESH_GROUP_REMOVE " + dev[1].ifname)
|
||||
- set_world_reg(apdev0=apdev[0], dev0=dev[0])
|
||||
- dev[0].flush_scan_cache()
|
||||
- dev[1].flush_scan_cache()
|
||||
-
|
||||
-def _test_wpas_mesh_open_5ghz_coex(dev, apdev):
|
||||
- check_mesh_support(dev[0])
|
||||
- subprocess.call(['iw', 'reg', 'set', 'US'])
|
||||
-
|
||||
- # Start a 20 MHz BSS on channel 40 that would be the secondary channel of
|
||||
- # HT40+ mesh on channel 36.
|
||||
- params = {"ssid": "test-ht40",
|
||||
- "hw_mode": "a",
|
||||
- "channel": "40",
|
||||
- "country_code": "US"}
|
||||
- hapd = hostapd.add_ap(apdev[0], params)
|
||||
- bssid = hapd.own_addr()
|
||||
-
|
||||
- for i in range(2):
|
||||
- for j in range(5):
|
||||
- ev = dev[i].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=5)
|
||||
- if ev is None:
|
||||
- raise Exception("No regdom change event")
|
||||
- if "alpha2=US" in ev:
|
||||
- break
|
||||
- dev[i].scan_for_bss(bssid, freq=5200)
|
||||
- add_open_mesh_network(dev[i], freq="5180")
|
||||
-
|
||||
- check_mesh_joined_connected(dev)
|
||||
-
|
||||
- freq = dev[0].get_status_field("freq")
|
||||
- if freq != "5200":
|
||||
- raise Exception("Unexpected STATUS freq=" + freq)
|
||||
- sig = dev[0].request("SIGNAL_POLL").splitlines()
|
||||
- if "FREQUENCY=5200" not in sig:
|
||||
- raise Exception("Unexpected SIGNAL_POLL output: " + str(sig))
|
||||
-
|
||||
- hapd.disable()
|
||||
- dev[0].mesh_group_remove()
|
||||
- dev[1].mesh_group_remove()
|
||||
- check_mesh_group_removed(dev[0])
|
||||
- check_mesh_group_removed(dev[1])
|
||||
- dev[0].dump_monitor()
|
||||
- dev[1].dump_monitor()
|
||||
|
||||
def test_wpas_mesh_open_ht40(dev, apdev):
|
||||
"""Mesh and HT40 support difference"""
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -363,6 +363,29 @@ static int wpa_supplicant_mesh_init(stru
|
||||
conf->basic_rates[rate_len] = -1;
|
||||
}
|
||||
|
||||
+ /* While it can enhance performance to switch the primary channel, which
|
||||
+ * is also the secondary channel of another network at the same time),
|
||||
+ * to the other primary channel, problems exist with this in mesh networks.
|
||||
+ *
|
||||
+ * Example with problems:
|
||||
+ * - 3 mesh nodes M1-M3, freq (5200, 5180)
|
||||
+ * - other node O1, e.g. AP mode, freq (5180, 5200),
|
||||
+ * Locations: O1 M1 M2 M3
|
||||
+ *
|
||||
+ * M3 can only send frames to M1 over M2, no direct connection is possible
|
||||
+ * Start O1, M1 and M3 first, M1 or O1 will switch channels to align with
|
||||
+ * each other. M3 does not swap, because M1 or O1 cannot be reached.
|
||||
+ * M2 is started afterwards and can either connect to M3 or M1 because of
|
||||
+ * this primary secondary channel switch.
|
||||
+ *
|
||||
+ * Solutions: (1) central coordination -> not always possible
|
||||
+ * (2) disable pri/sec channel switch in mesh networks
|
||||
+ *
|
||||
+ * In AP mode, when all nodes can work independently, this poses of course
|
||||
+ * no problem, therefore disable it only in mesh mode.`*/
|
||||
+ conf->no_pri_sec_switch = 1;
|
||||
+ wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
|
||||
+
|
||||
if (wpa_drv_init_mesh(wpa_s)) {
|
||||
wpa_msg(wpa_s, MSG_ERROR, "Failed to init mesh in driver");
|
||||
return -1;
|
||||
@@ -374,8 +397,6 @@ static int wpa_supplicant_mesh_init(stru
|
||||
return -1;
|
||||
}
|
||||
|
||||
- wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
|
||||
-
|
||||
return 0;
|
||||
out_free:
|
||||
wpa_supplicant_mesh_deinit(wpa_s);
|
@ -0,0 +1,102 @@
|
||||
From 978a59514ccde994b5c06e1cbb49cc8cebe6381c Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 13:53:19 +0200
|
||||
Subject: [PATCH 03/19] wpa_supplicant: handle HT40 and mode downgrade in AP
|
||||
mode
|
||||
|
||||
This patch adds some missing pieces to the interface configuration
|
||||
of AP/mesh mode in wpa_supplicant.
|
||||
- check for secondary channel and HT40 capability
|
||||
- try to downgrade to 11b if 11g is not available
|
||||
Especially with the HT40 check, this code now performs all settings,
|
||||
which the deleted/duplicated mesh code did.
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
wpa_supplicant/ap.c | 49 ++++++++++++++++++++++++++++++++++++---------
|
||||
1 file changed, 40 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -134,6 +134,23 @@ no_vht:
|
||||
}
|
||||
|
||||
|
||||
+static struct hostapd_hw_modes *wpa_supplicant_find_hw_mode(struct wpa_supplicant *wpa_s,
|
||||
+ enum hostapd_hw_mode hw_mode)
|
||||
+{
|
||||
+ struct hostapd_hw_modes *mode = NULL;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < wpa_s->hw.num_modes; i++) {
|
||||
+ if (wpa_s->hw.modes[i].mode == hw_mode) {
|
||||
+ mode = &wpa_s->hw.modes[i];
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return mode;
|
||||
+}
|
||||
+
|
||||
+
|
||||
int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s,
|
||||
struct wpa_ssid *ssid,
|
||||
struct hostapd_config *conf)
|
||||
@@ -147,9 +164,6 @@ int wpa_supplicant_conf_ap_ht(struct wpa
|
||||
return -1;
|
||||
}
|
||||
|
||||
- /* TODO: enable HT40 if driver supports it;
|
||||
- * drop to 11b if driver does not support 11g */
|
||||
-
|
||||
/*
|
||||
* Enable HT20 if the driver supports it, by setting conf->ieee80211n
|
||||
* and a mask of allowed capabilities within conf->ht_capab.
|
||||
@@ -158,17 +172,27 @@ int wpa_supplicant_conf_ap_ht(struct wpa
|
||||
*/
|
||||
if (wpa_s->hw.modes) {
|
||||
struct hostapd_hw_modes *mode = NULL;
|
||||
- int i, no_ht = 0;
|
||||
+ int no_ht = 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Determining HT/VHT options based on driver capabilities (freq=%u chan=%u)",
|
||||
ssid->frequency, conf->channel);
|
||||
|
||||
- for (i = 0; i < wpa_s->hw.num_modes; i++) {
|
||||
- if (wpa_s->hw.modes[i].mode == conf->hw_mode) {
|
||||
- mode = &wpa_s->hw.modes[i];
|
||||
- break;
|
||||
- }
|
||||
+ mode = wpa_supplicant_find_hw_mode(wpa_s, conf->hw_mode);
|
||||
+
|
||||
+ /* may drop drop to 11b if driver does not support 11g */
|
||||
+ if (!mode && conf->hw_mode == HOSTAPD_MODE_IEEE80211G) {
|
||||
+ conf->hw_mode = HOSTAPD_MODE_IEEE80211B;
|
||||
+ wpa_printf(MSG_INFO,
|
||||
+ "Try downgrade to IEEE 802.11b as 802.11g is not "
|
||||
+ "supported by the current hardware");
|
||||
+ mode = wpa_supplicant_find_hw_mode(wpa_s, conf->hw_mode);
|
||||
+ }
|
||||
+
|
||||
+ if (!mode) {
|
||||
+ wpa_printf(MSG_ERROR,
|
||||
+ "No match between requested and supported hw modes found");
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HT_OVERRIDES
|
||||
@@ -193,6 +217,13 @@ int wpa_supplicant_conf_ap_ht(struct wpa
|
||||
HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET),
|
||||
ssid->ht40);
|
||||
conf->ieee80211n = 1;
|
||||
+
|
||||
+ if (ssid->ht40 &&
|
||||
+ mode->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)
|
||||
+ conf->secondary_channel = ssid->ht40;
|
||||
+ else
|
||||
+ conf->secondary_channel = 0;
|
||||
+
|
||||
#ifdef CONFIG_P2P
|
||||
if (ssid->p2p_group &&
|
||||
conf->hw_mode == HOSTAPD_MODE_IEEE80211A &&
|
@ -0,0 +1,63 @@
|
||||
From 7f7325dae1d03a3964d4e91940d8369f3fed7b43 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 13:53:20 +0200
|
||||
Subject: [PATCH 04/19] wpa_supplicant: fix frequency config for non p2p vht/he
|
||||
cases
|
||||
|
||||
Fix compile without CONFIG_P2P and only set secondary channel seg idx
|
||||
if we use a mode supporting a sec channel for vht/he.
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
wpa_supplicant/ap.c | 23 +++++++++++++----------
|
||||
1 file changed, 13 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -52,8 +52,8 @@ static void wpas_conf_ap_vht(struct wpa_
|
||||
#ifdef CONFIG_P2P
|
||||
u8 center_chan = 0;
|
||||
u8 channel = conf->channel;
|
||||
- u8 freq_seg_idx;
|
||||
#endif /* CONFIG_P2P */
|
||||
+ u8 freq_seg_idx;
|
||||
|
||||
if (!conf->secondary_channel)
|
||||
goto no_vht;
|
||||
@@ -62,24 +62,27 @@ static void wpas_conf_ap_vht(struct wpa_
|
||||
if (ssid->max_oper_chwidth)
|
||||
hostapd_set_oper_chwidth(conf, ssid->max_oper_chwidth);
|
||||
|
||||
- ieee80211_freq_to_chan(ssid->vht_center_freq2,
|
||||
- &freq_seg_idx);
|
||||
- hostapd_set_oper_centr_freq_seg1_idx(conf, freq_seg_idx);
|
||||
-
|
||||
if (!ssid->p2p_group) {
|
||||
- if (!ssid->vht_center_freq1 ||
|
||||
- hostapd_get_oper_chwidth(conf) == CHANWIDTH_USE_HT)
|
||||
+ if (!ssid->vht_center_freq1)
|
||||
goto no_vht;
|
||||
ieee80211_freq_to_chan(ssid->vht_center_freq1,
|
||||
&freq_seg_idx);
|
||||
hostapd_set_oper_centr_freq_seg0_idx(conf, freq_seg_idx);
|
||||
- wpa_printf(MSG_DEBUG, "VHT seg0 index %d for AP",
|
||||
- hostapd_get_oper_centr_freq_seg0_idx(conf));
|
||||
+
|
||||
+ if (hostapd_get_oper_chwidth(conf) == CHANWIDTH_80P80MHZ) {
|
||||
+ ieee80211_freq_to_chan(ssid->vht_center_freq2,
|
||||
+ &freq_seg_idx);
|
||||
+ hostapd_set_oper_centr_freq_seg1_idx(conf, freq_seg_idx);
|
||||
+ }
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "VHT seg0 index %d and seg1 index %d for AP",
|
||||
+ hostapd_get_oper_centr_freq_seg0_idx(conf),
|
||||
+ hostapd_get_oper_centr_freq_seg1_idx(conf));
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
- switch (conf->vht_oper_chwidth) {
|
||||
+ switch (hostapd_get_oper_chwidth(conf)) {
|
||||
case CHANWIDTH_80MHZ:
|
||||
case CHANWIDTH_80P80MHZ:
|
||||
center_chan = wpas_p2p_get_vht80_center(wpa_s, mode, channel);
|
@ -0,0 +1,25 @@
|
||||
From ff7fb3fa0831c8521327d777c5607a3b7d8736b8 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 13:53:21 +0200
|
||||
Subject: [PATCH 05/19] wpa_supplicant: enable vht and he in default config
|
||||
parameters
|
||||
|
||||
Enable VHT and HE as default config parameters in order for
|
||||
wpa_supplicant AP mode to use it, if hw support is given.
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
wpa_supplicant/config.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/wpa_supplicant/config.c
|
||||
+++ b/wpa_supplicant/config.c
|
||||
@@ -3036,6 +3036,8 @@ void wpa_config_set_network_defaults(str
|
||||
ssid->wpa_deny_ptk0_rekey = PTK0_REKEY_ALLOW_ALWAYS;
|
||||
ssid->bg_scan_period = DEFAULT_BG_SCAN_PERIOD;
|
||||
ssid->ht = 1;
|
||||
+ ssid->vht = 1;
|
||||
+ ssid->he = 1;
|
||||
#ifdef IEEE8021X_EAPOL
|
||||
ssid->eapol_flags = DEFAULT_EAPOL_FLAGS;
|
||||
ssid->eap_workaround = DEFAULT_EAP_WORKAROUND;
|
@ -0,0 +1,83 @@
|
||||
From 6522dcbbcf71abcb80cce84b93b4a9a5cfcd4fca Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 13:53:22 +0200
|
||||
Subject: [PATCH 06/19] hw_features: better debug messages for some error cases
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
src/common/hw_features_common.c | 29 ++++++++++++++++++++++-------
|
||||
1 file changed, 22 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/src/common/hw_features_common.c
|
||||
+++ b/src/common/hw_features_common.c
|
||||
@@ -540,13 +540,18 @@ int hostapd_set_freq_params(struct hosta
|
||||
if (center_segment1 ||
|
||||
(center_segment0 != 0 &&
|
||||
5000 + center_segment0 * 5 != data->center_freq1 &&
|
||||
- 2407 + center_segment0 * 5 != data->center_freq1))
|
||||
+ 2407 + center_segment0 * 5 != data->center_freq1)) {
|
||||
+ wpa_printf(MSG_ERROR, "20/40 MHz: center segment 0 (=%i) and center freq 1 (=%i) not in sync",
|
||||
+ center_segment0, data->center_freq1);
|
||||
return -1;
|
||||
+ }
|
||||
break;
|
||||
case CHANWIDTH_80P80MHZ:
|
||||
if (center_segment1 == center_segment0 + 4 ||
|
||||
- center_segment1 == center_segment0 - 4)
|
||||
+ center_segment1 == center_segment0 - 4) {
|
||||
+ wpa_printf(MSG_ERROR, "80+80 MHz: center segment 1 only 20 MHz apart");
|
||||
return -1;
|
||||
+ }
|
||||
data->center_freq2 = 5000 + center_segment1 * 5;
|
||||
/* fall through */
|
||||
case CHANWIDTH_80MHZ:
|
||||
@@ -555,8 +560,10 @@ int hostapd_set_freq_params(struct hosta
|
||||
center_segment1) ||
|
||||
(oper_chwidth == CHANWIDTH_80P80MHZ &&
|
||||
!center_segment1) ||
|
||||
- !sec_channel_offset)
|
||||
+ !sec_channel_offset) {
|
||||
+ wpa_printf(MSG_ERROR, "80/80+80 MHz: center segment 1 wrong or no second channel offset");
|
||||
return -1;
|
||||
+ }
|
||||
if (!center_segment0) {
|
||||
if (channel <= 48)
|
||||
center_segment0 = 42;
|
||||
@@ -582,16 +589,22 @@ int hostapd_set_freq_params(struct hosta
|
||||
center_segment0 == channel - 2 ||
|
||||
center_segment0 == channel - 6)
|
||||
data->center_freq1 = 5000 + center_segment0 * 5;
|
||||
- else
|
||||
+ else {
|
||||
+ wpa_printf(MSG_ERROR, "Wrong coupling between HT and VHT/HE channel setting");
|
||||
return -1;
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
case CHANWIDTH_160MHZ:
|
||||
data->bandwidth = 160;
|
||||
- if (center_segment1)
|
||||
+ if (center_segment1) {
|
||||
+ wpa_printf(MSG_ERROR, "160 MHz: center segment 1 should not be set");
|
||||
return -1;
|
||||
- if (!sec_channel_offset)
|
||||
+ }
|
||||
+ if (!sec_channel_offset) {
|
||||
+ wpa_printf(MSG_ERROR, "160 MHz: second channel offset not set");
|
||||
return -1;
|
||||
+ }
|
||||
/*
|
||||
* Note: HT/VHT config and params are coupled. Check if
|
||||
* HT40 channel band is in VHT160 channel band configuration.
|
||||
@@ -605,8 +618,10 @@ int hostapd_set_freq_params(struct hosta
|
||||
center_segment0 == channel - 10 ||
|
||||
center_segment0 == channel - 14)
|
||||
data->center_freq1 = 5000 + center_segment0 * 5;
|
||||
- else
|
||||
+ else {
|
||||
+ wpa_printf(MSG_ERROR, "160 MHz: HT40 channel band is not in 160 MHz band");
|
||||
return -1;
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
From 6eacc14904b6f09a1490e697c01adf5dc56c4905 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 13:53:23 +0200
|
||||
Subject: [PATCH 07/19] dfs: use helper functions for vht/he parameters
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
src/ap/dfs.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/ap/dfs.c
|
||||
+++ b/src/ap/dfs.c
|
||||
@@ -955,10 +955,12 @@ dfs_downgrade_bandwidth(struct hostapd_i
|
||||
if (*skip_radar) {
|
||||
*skip_radar = 0;
|
||||
} else {
|
||||
- if (iface->conf->vht_oper_chwidth == CHANWIDTH_USE_HT)
|
||||
+ int oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
|
||||
+
|
||||
+ if (oper_chwidth == CHANWIDTH_USE_HT)
|
||||
break;
|
||||
*skip_radar = 1;
|
||||
- iface->conf->vht_oper_chwidth--;
|
||||
+ hostapd_set_oper_chwidth(iface->conf, oper_chwidth - 1);
|
||||
}
|
||||
}
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 2564184440d9d6041d11a8c7d50b31368634c3bd Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:40 -0700
|
||||
Subject: [PATCH] mesh: Apply channel attributes before setup interface
|
||||
|
||||
This helps mesh interface initialization with correct channel
|
||||
parameters.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
wpa_supplicant/mesh.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -253,7 +253,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
struct mesh_conf *mconf;
|
||||
int basic_rates_erp[] = { 10, 20, 55, 60, 110, 120, 240, -1 };
|
||||
int rate_len;
|
||||
- int frequency;
|
||||
+ int frequency, saved_freq;
|
||||
|
||||
if (!wpa_s->conf->user_mpm) {
|
||||
/* not much for us to do here */
|
||||
@@ -391,6 +391,13 @@ static int wpa_supplicant_mesh_init(stru
|
||||
conf->basic_rates[rate_len] = -1;
|
||||
}
|
||||
|
||||
+ /* Handle pri/sec switch frequency within AP configuration parameter
|
||||
+ * generation without changing the stored network profile in the end. */
|
||||
+ saved_freq = ssid->frequency;
|
||||
+ ssid->frequency = frequency;
|
||||
+ wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
|
||||
+ ssid->frequency = saved_freq;
|
||||
+
|
||||
if (wpa_drv_init_mesh(wpa_s)) {
|
||||
wpa_msg(wpa_s, MSG_ERROR, "Failed to init mesh in driver");
|
||||
return -1;
|
||||
@@ -402,8 +409,6 @@ static int wpa_supplicant_mesh_init(stru
|
||||
return -1;
|
||||
}
|
||||
|
||||
- wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
|
||||
-
|
||||
return 0;
|
||||
out_free:
|
||||
wpa_supplicant_mesh_deinit(wpa_s);
|
@ -1,7 +1,8 @@
|
||||
From c05ace7510ead96e72b97ce47b33f7b5865d6d36 Mon Sep 17 00:00:00 2001
|
||||
From 11e5bbe58eebdb10793eec374b6c8ccc7daf7ec8 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:38 -0700
|
||||
Subject: [PATCH 1/7] mesh: use setup completion callback to complete mesh join
|
||||
Date: Tue, 30 Jun 2020 14:18:56 +0200
|
||||
Subject: [PATCH 08/19] mesh: use setup completion callback to complete mesh
|
||||
join
|
||||
|
||||
mesh join function is the last function to be called during
|
||||
mesh join process, but it's been called a bit earlier than
|
||||
@ -16,12 +17,11 @@ The callback will be called by hostapd_setup_interface_complete_sync.
|
||||
There is possiblity that completing mesh init fails, so add error
|
||||
handle codes.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
src/ap/hostapd.c | 11 ++++++++++-
|
||||
wpa_supplicant/mesh.c | 13 +++++++------
|
||||
2 files changed, 17 insertions(+), 7 deletions(-)
|
||||
wpa_supplicant/mesh.c | 12 ++++++++++--
|
||||
2 files changed, 20 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@ -39,7 +39,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
hapd->setup_complete_cb(hapd->setup_complete_cb_ctx);
|
||||
|
||||
+#ifdef CONFIG_MESH
|
||||
+ if (delay_apply_cfg && !iface->mconf) {
|
||||
+ if (delay_apply_cfg && iface->mconf == NULL) {
|
||||
+ wpa_printf(MSG_ERROR, "Error while completing mesh init");
|
||||
+ goto fail;
|
||||
+ }
|
||||
@ -53,51 +53,35 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
if (ret) {
|
||||
wpa_printf(MSG_ERROR, "%s: Unable to setup interface.",
|
||||
- iface->bss[0]->conf->iface);
|
||||
+ iface->conf ? iface->conf->bss[0]->iface : "N/A");
|
||||
+ iface->conf ? iface->conf->bss[0]->iface : "N/A");
|
||||
return -1;
|
||||
}
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -194,8 +194,9 @@ static int wpas_mesh_init_rsn(struct wpa
|
||||
@@ -193,7 +193,6 @@ static int wpas_mesh_init_rsn(struct wpa
|
||||
return !wpa_s->mesh_rsn ? -1 : 0;
|
||||
}
|
||||
|
||||
|
||||
-static int wpas_mesh_complete(struct wpa_supplicant *wpa_s)
|
||||
+static void wpas_mesh_complete_cb(void *ctx)
|
||||
{
|
||||
+ struct wpa_supplicant *wpa_s = ctx;
|
||||
struct hostapd_iface *ifmsh = wpa_s->ifmsh;
|
||||
struct wpa_driver_mesh_join_params *params = wpa_s->mesh_params;
|
||||
struct wpa_ssid *ssid = wpa_s->current_ssid;
|
||||
@@ -204,7 +205,7 @@ static int wpas_mesh_complete(struct wpa
|
||||
if (!params || !ssid || !ifmsh) {
|
||||
wpa_printf(MSG_ERROR, "mesh: %s called without active mesh",
|
||||
__func__);
|
||||
- return -1;
|
||||
+ return;
|
||||
}
|
||||
|
||||
if (ifmsh->mconf->security != MESH_CONF_SEC_NONE &&
|
||||
@@ -213,7 +214,7 @@ static int wpas_mesh_complete(struct wpa
|
||||
"mesh: RSN initialization failed - deinit mesh");
|
||||
wpa_supplicant_mesh_deinit(wpa_s);
|
||||
wpa_drv_leave_mesh(wpa_s);
|
||||
- return -1;
|
||||
+ return;
|
||||
}
|
||||
|
||||
if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
|
||||
@@ -239,8 +240,6 @@ static int wpas_mesh_complete(struct wpa
|
||||
|
||||
if (!ret)
|
||||
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
|
||||
-
|
||||
- return ret;
|
||||
static int wpas_mesh_complete(struct wpa_supplicant *wpa_s)
|
||||
{
|
||||
struct hostapd_iface *ifmsh = wpa_s->ifmsh;
|
||||
@@ -244,6 +243,13 @@ static int wpas_mesh_complete(struct wpa
|
||||
}
|
||||
|
||||
|
||||
@@ -267,6 +266,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
+static void wpas_mesh_complete_cb(void *arg)
|
||||
+{
|
||||
+ struct wpa_supplicant *wpa_s = arg;
|
||||
+ wpas_mesh_complete(wpa_s);
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
|
||||
struct wpa_ssid *ssid,
|
||||
struct hostapd_freq_params *freq)
|
||||
@@ -267,6 +273,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
if (!ifmsh)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -105,7 +89,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
ifmsh->drv_flags = wpa_s->drv_flags;
|
||||
ifmsh->drv_flags2 = wpa_s->drv_flags2;
|
||||
ifmsh->num_bss = 1;
|
||||
@@ -285,6 +285,8 @@ static int wpa_supplicant_mesh_init(stru
|
||||
@@ -285,6 +292,8 @@ static int wpa_supplicant_mesh_init(stru
|
||||
bss->drv_priv = wpa_s->drv_priv;
|
||||
bss->iface = ifmsh;
|
||||
bss->mesh_sta_free_cb = mesh_mpm_free_sta;
|
||||
@ -114,7 +98,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
frequency = ssid->frequency;
|
||||
if (frequency != freq->freq &&
|
||||
frequency == freq->freq + freq->sec_channel_offset * 20) {
|
||||
@@ -526,7 +528,6 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
@@ -523,7 +532,6 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
goto out;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
From c56f18380d1d404a2abc0ea5373d294508ef1e54 Mon Sep 17 00:00:00 2001
|
||||
From 87c5e8883898e7eb8e9637e212350c1925a22654 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:41 -0700
|
||||
Subject: [PATCH 2/7] mesh: update ssid->frequency as pri/sec channel switch
|
||||
Date: Tue, 30 Jun 2020 14:18:57 +0200
|
||||
Subject: [PATCH 09/19] mesh: update ssid->frequency as pri/sec channel switch
|
||||
|
||||
ssid->frequency is one of variables used to gets channel
|
||||
number from given frequency. Leave it as unchanged when
|
||||
@ -16,7 +16,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -292,6 +292,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
@@ -299,6 +299,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
frequency == freq->freq + freq->sec_channel_offset * 20) {
|
||||
wpa_printf(MSG_DEBUG, "mesh: pri/sec channels switched");
|
||||
frequency = freq->freq;
|
@ -1,15 +1,16 @@
|
||||
From 89fa0d75fb1be82330258082ed3d7fd452eb6076 Mon Sep 17 00:00:00 2001
|
||||
From 8de8cd8380af0c43d4fde67a668d79ef73b26b26 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:45 -0700
|
||||
Subject: [PATCH 3/7] mesh: Allow DFS channels to be selected if dfs is enabled
|
||||
Date: Tue, 30 Jun 2020 14:18:58 +0200
|
||||
Subject: [PATCH 10/19] mesh: Allow DFS channels to be selected if dfs is
|
||||
enabled
|
||||
|
||||
Note: DFS is assumed to be usable if a country code has been set
|
||||
|
||||
Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
wpa_supplicant/wpa_supplicant.c | 24 ++++++++++++++++++------
|
||||
1 file changed, 18 insertions(+), 6 deletions(-)
|
||||
wpa_supplicant/wpa_supplicant.c | 25 +++++++++++++++++++------
|
||||
1 file changed, 19 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@ -18,7 +19,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
u32 vht_caps = 0;
|
||||
int is_24ghz;
|
||||
+ int dfs_enabled = wpa_s->conf->country[0] &&
|
||||
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
|
||||
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
|
||||
|
||||
freq->freq = ssid->frequency;
|
||||
|
||||
@ -61,7 +62,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
}
|
||||
|
||||
chwidth = CHANWIDTH_80MHZ;
|
||||
@@ -2585,10 +2596,11 @@ skip_ht40:
|
||||
@@ -2585,10 +2596,12 @@ skip_ht40:
|
||||
if (!chan)
|
||||
continue;
|
||||
|
||||
@ -70,7 +71,8 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
- HOSTAPD_CHAN_RADAR))
|
||||
+ if (chan->flag & HOSTAPD_CHAN_DISABLED)
|
||||
continue;
|
||||
+ if (chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
|
||||
+ if (chan->flag & (HOSTAPD_CHAN_RADAR |
|
||||
+ HOSTAPD_CHAN_NO_IR))
|
||||
+ if (!dfs_enabled)
|
||||
+ continue;
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 71e9c65a7c8af90a5fd11072062b596421316452 Mon Sep 17 00:00:00 2001
|
||||
From af8dcbc87466ed6472850a4f1cfe252652cb3d26 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:46 -0700
|
||||
Subject: [PATCH 4/7] mesh: do not set offchanok on DFS channels in non-ETSI
|
||||
Date: Tue, 30 Jun 2020 14:18:59 +0200
|
||||
Subject: [PATCH 11/19] mesh: do not set offchanok on DFS channels in non-ETSI
|
||||
|
||||
mac80211 does not allow mgmt tx to use off channel on
|
||||
DFS channels in non-ETSI domain, because it will invalidate
|
||||
@ -12,19 +12,20 @@ in non-ETSI.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
src/drivers/driver_nl80211.c | 21 ++++++++++++++++++++-
|
||||
1 file changed, 20 insertions(+), 1 deletion(-)
|
||||
src/drivers/driver_nl80211.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -7789,6 +7789,10 @@ static int wpa_driver_nl80211_send_actio
|
||||
@@ -7788,7 +7788,11 @@ static int wpa_driver_nl80211_send_actio
|
||||
int ret = -1;
|
||||
u8 *buf;
|
||||
struct ieee80211_hdr *hdr;
|
||||
int offchanok = 1;
|
||||
+ struct hostapd_hw_modes *modes;
|
||||
+ int i;
|
||||
int offchanok = 1;
|
||||
+ u16 num_modes, flags;
|
||||
+ u8 dfs_domain;
|
||||
+ int i;
|
||||
|
||||
if (is_ap_interface(drv->nlmode) && (int) freq == bss->freq &&
|
||||
bss->beacon_set)
|
@ -1,7 +1,7 @@
|
||||
From 5913d6e2a741683e7c747c046f72ca790bbe1337 Mon Sep 17 00:00:00 2001
|
||||
From ab6995f15aae17af93507dd2344615f91672a31a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:47 -0700
|
||||
Subject: [PATCH 5/7] mesh: fix channel switch error during CAC
|
||||
Date: Tue, 30 Jun 2020 14:19:00 +0200
|
||||
Subject: [PATCH 12/19] mesh: fix channel switch error during CAC
|
||||
|
||||
Mesh interface has used its channel parameters that configured
|
||||
during its initialization even after channel switched due to
|
||||
@ -11,8 +11,8 @@ when channel's been changed from initial one.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
wpa_supplicant/mesh.c | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
wpa_supplicant/mesh.c | 34 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 34 insertions(+)
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@ -24,8 +24,8 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
#include "ap/sta_info.h"
|
||||
#include "ap/hostapd.h"
|
||||
#include "ap/ieee802_11.h"
|
||||
@@ -208,6 +209,34 @@ static void wpas_mesh_complete_cb(void *
|
||||
return;
|
||||
@@ -206,6 +207,39 @@ static int wpas_mesh_complete(struct wpa
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ /*
|
||||
@ -35,6 +35,11 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
+ if (ifmsh->freq != params->freq.freq) {
|
||||
+ wpa_s->assoc_freq = ifmsh->freq;
|
||||
+ ssid->frequency = ifmsh->freq;
|
||||
+ struct he_capabilities *he_capab = NULL;
|
||||
+
|
||||
+ if (ifmsh->current_mode)
|
||||
+ he_capab = &ifmsh->current_mode->he_capab[IEEE80211_MODE_MESH];
|
||||
+
|
||||
+ if (hostapd_set_freq_params(¶ms->freq,
|
||||
+ ifmsh->conf->hw_mode,
|
||||
+ ifmsh->freq,
|
||||
@ -48,11 +53,11 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
+ hostapd_get_oper_chwidth(ifmsh->conf),
|
||||
+ hostapd_get_oper_centr_freq_seg0_idx(ifmsh->conf),
|
||||
+ hostapd_get_oper_centr_freq_seg1_idx(ifmsh->conf),
|
||||
+ ifmsh->current_mode->vht_capab,
|
||||
+ &ifmsh->current_mode->he_capab[IEEE80211_MODE_AP])) {
|
||||
+ ifmsh->conf->vht_capab,
|
||||
+ he_capab)) {
|
||||
+ wpa_printf(MSG_ERROR, "Error updating mesh frequency params.");
|
||||
+ wpa_supplicant_mesh_deinit(wpa_s);
|
||||
+ return;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
@ -1,29 +0,0 @@
|
||||
From 4f4a9b9e2e61fba334a21dadea749e4b440f42e6 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:48 -0700
|
||||
Subject: [PATCH 6/7] mesh: don't allow pri/sec channel switch
|
||||
|
||||
This limitation isn't backed by standard, but it is known that
|
||||
mesh doesn't have capability to handle 20/40 coex change in
|
||||
current implementation and it will not able to establish
|
||||
PLINK when channel switch between primary and secondary happens.
|
||||
|
||||
Since it's unknown when we will have the implementation of handling
|
||||
20/40 coex change for mesh, it'd better to avoid them from happening
|
||||
until standard based implementation is introduced.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
wpa_supplicant/mesh.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -391,6 +391,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
conf->basic_rates[rate_len] = -1;
|
||||
}
|
||||
|
||||
+ conf->no_pri_sec_switch = 1;
|
||||
/* Handle pri/sec switch frequency within AP configuration parameter
|
||||
* generation without changing the stored network profile in the end. */
|
||||
saved_freq = ssid->frequency;
|
@ -1,7 +1,7 @@
|
||||
From 593602b7f14be5c2695979639764b1c50f01bbec Mon Sep 17 00:00:00 2001
|
||||
From f1118eca5b1a63a4acb2a11ceea15dc4bc259c77 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:49 -0700
|
||||
Subject: [PATCH 7/7] mesh: inform kernel driver DFS handler in userspace
|
||||
Date: Tue, 30 Jun 2020 14:19:01 +0200
|
||||
Subject: [PATCH 13/19] mesh: inform kernel driver DFS handler in userspace
|
||||
|
||||
NL80211_ATTR_HANDLE_DFS is required by kerenel space
|
||||
to enable DFS channels that indicates DFS handler
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
struct wpa_driver_set_key_params {
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -10051,6 +10051,9 @@ static int nl80211_join_mesh(struct i802
|
||||
@@ -10070,6 +10070,9 @@ static int nl80211_join_mesh(struct i802
|
||||
|
||||
wpa_printf(MSG_DEBUG, " * flags=%08X", params->flags);
|
||||
|
||||
@ -38,7 +38,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
goto fail;
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -314,6 +314,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
@@ -355,6 +355,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
conf->country[0] = wpa_s->conf->country[0];
|
||||
conf->country[1] = wpa_s->conf->country[1];
|
||||
conf->country[2] = ' ';
|
@ -0,0 +1,158 @@
|
||||
From 30bdefd7559d57eae8c3c7e6f721ecf7be929bf2 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 14:19:02 +0200
|
||||
Subject: [PATCH 14/19] mesh: fixes for mesh init/deinit
|
||||
|
||||
Send mesh group started notification after join completion
|
||||
callback is called.
|
||||
|
||||
Implement outstanding TODO, to leave the mesh network on deinit.
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
wpa_supplicant/mesh.c | 32 ++++++++++++++++++++------------
|
||||
wpa_supplicant/mesh.h | 6 ++++--
|
||||
wpa_supplicant/wpa_supplicant.c | 8 ++------
|
||||
3 files changed, 26 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -30,20 +30,20 @@
|
||||
|
||||
static void wpa_supplicant_mesh_deinit(struct wpa_supplicant *wpa_s)
|
||||
{
|
||||
- wpa_supplicant_mesh_iface_deinit(wpa_s, wpa_s->ifmsh);
|
||||
+ wpa_supplicant_mesh_iface_deinit(wpa_s, wpa_s->ifmsh, true);
|
||||
wpa_s->ifmsh = NULL;
|
||||
wpa_s->current_ssid = NULL;
|
||||
os_free(wpa_s->mesh_rsn);
|
||||
wpa_s->mesh_rsn = NULL;
|
||||
os_free(wpa_s->mesh_params);
|
||||
wpa_s->mesh_params = NULL;
|
||||
- /* TODO: leave mesh (stop beacon). This will happen on link down
|
||||
- * anyway, so it's not urgent */
|
||||
+ wpa_supplicant_leave_mesh(wpa_s, false);
|
||||
}
|
||||
|
||||
|
||||
void wpa_supplicant_mesh_iface_deinit(struct wpa_supplicant *wpa_s,
|
||||
- struct hostapd_iface *ifmsh)
|
||||
+ struct hostapd_iface *ifmsh,
|
||||
+ bool also_clear_hostapd)
|
||||
{
|
||||
if (!ifmsh)
|
||||
return;
|
||||
@@ -64,8 +64,10 @@ void wpa_supplicant_mesh_iface_deinit(st
|
||||
}
|
||||
|
||||
/* take care of shared data */
|
||||
- hostapd_interface_deinit(ifmsh);
|
||||
- hostapd_interface_free(ifmsh);
|
||||
+ if (also_clear_hostapd) {
|
||||
+ hostapd_interface_deinit(ifmsh);
|
||||
+ hostapd_interface_free(ifmsh);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
@@ -244,8 +246,7 @@ static int wpas_mesh_complete(struct wpa
|
||||
wpas_mesh_init_rsn(wpa_s)) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"mesh: RSN initialization failed - deinit mesh");
|
||||
- wpa_supplicant_mesh_deinit(wpa_s);
|
||||
- wpa_drv_leave_mesh(wpa_s);
|
||||
+ wpa_supplicant_mesh_iface_deinit(wpa_s, wpa_s->ifmsh, false);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -270,9 +271,15 @@ static int wpas_mesh_complete(struct wpa
|
||||
/* hostapd sets the interface down until we associate */
|
||||
wpa_drv_set_operstate(wpa_s, 1);
|
||||
|
||||
- if (!ret)
|
||||
+ if (!ret) {
|
||||
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
|
||||
|
||||
+ wpa_msg(wpa_s, MSG_INFO, MESH_GROUP_STARTED "ssid=\"%s\" id=%d",
|
||||
+ wpa_ssid_txt(ssid->ssid, ssid->ssid_len),
|
||||
+ ssid->id);
|
||||
+ wpas_notify_mesh_group_started(wpa_s, ssid);
|
||||
+ }
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -563,7 +570,7 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
wpa_s->mesh_params = params;
|
||||
if (wpa_supplicant_mesh_init(wpa_s, ssid, ¶ms->freq)) {
|
||||
wpa_msg(wpa_s, MSG_ERROR, "Failed to init mesh");
|
||||
- wpa_drv_leave_mesh(wpa_s);
|
||||
+ wpa_supplicant_leave_mesh(wpa_s, true);
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
@@ -573,14 +580,15 @@ out:
|
||||
}
|
||||
|
||||
|
||||
-int wpa_supplicant_leave_mesh(struct wpa_supplicant *wpa_s)
|
||||
+int wpa_supplicant_leave_mesh(struct wpa_supplicant *wpa_s, bool need_deinit)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
wpa_msg(wpa_s, MSG_INFO, "leaving mesh");
|
||||
|
||||
/* Need to send peering close messages first */
|
||||
- wpa_supplicant_mesh_deinit(wpa_s);
|
||||
+ if (need_deinit)
|
||||
+ wpa_supplicant_mesh_deinit(wpa_s);
|
||||
|
||||
ret = wpa_drv_leave_mesh(wpa_s);
|
||||
if (ret)
|
||||
--- a/wpa_supplicant/mesh.h
|
||||
+++ b/wpa_supplicant/mesh.h
|
||||
@@ -11,9 +11,11 @@
|
||||
|
||||
int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
|
||||
struct wpa_ssid *ssid);
|
||||
-int wpa_supplicant_leave_mesh(struct wpa_supplicant *wpa_s);
|
||||
+int wpa_supplicant_leave_mesh(struct wpa_supplicant *wpa_s,
|
||||
+ bool need_deinit);
|
||||
void wpa_supplicant_mesh_iface_deinit(struct wpa_supplicant *wpa_s,
|
||||
- struct hostapd_iface *ifmsh);
|
||||
+ struct hostapd_iface *ifmsh,
|
||||
+ bool also_clear_hostapd);
|
||||
int wpas_mesh_scan_result_text(const u8 *ies, size_t ies_len, char *buf,
|
||||
char *end);
|
||||
int wpas_mesh_add_interface(struct wpa_supplicant *wpa_s, char *ifname,
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -2225,10 +2225,6 @@ void wpa_supplicant_associate(struct wpa
|
||||
return;
|
||||
}
|
||||
wpa_s->current_bss = bss;
|
||||
- wpa_msg(wpa_s, MSG_INFO, MESH_GROUP_STARTED "ssid=\"%s\" id=%d",
|
||||
- wpa_ssid_txt(ssid->ssid, ssid->ssid_len),
|
||||
- ssid->id);
|
||||
- wpas_notify_mesh_group_started(wpa_s, ssid);
|
||||
#else /* CONFIG_MESH */
|
||||
wpa_msg(wpa_s, MSG_ERROR,
|
||||
"mesh mode support not included in the build");
|
||||
@@ -3938,7 +3934,7 @@ void wpa_supplicant_deauthenticate(struc
|
||||
wpa_s->ifname);
|
||||
wpas_notify_mesh_group_removed(wpa_s, mconf->meshid,
|
||||
mconf->meshid_len, reason_code);
|
||||
- wpa_supplicant_leave_mesh(wpa_s);
|
||||
+ wpa_supplicant_leave_mesh(wpa_s, true);
|
||||
}
|
||||
#endif /* CONFIG_MESH */
|
||||
|
||||
@@ -6551,7 +6547,7 @@ static void wpa_supplicant_deinit_iface(
|
||||
|
||||
#ifdef CONFIG_MESH
|
||||
if (wpa_s->ifmsh) {
|
||||
- wpa_supplicant_mesh_iface_deinit(wpa_s, wpa_s->ifmsh);
|
||||
+ wpa_supplicant_mesh_iface_deinit(wpa_s, wpa_s->ifmsh, true);
|
||||
wpa_s->ifmsh = NULL;
|
||||
}
|
||||
#endif /* CONFIG_MESH */
|
@ -0,0 +1,262 @@
|
||||
From d017f5d98a143c46c3c3fcb0e6507ca0b2bebdb0 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 14:19:03 +0200
|
||||
Subject: [PATCH 15/19] mesh: fix DFS deinit/init
|
||||
|
||||
The hostapd DFS code deinitializes and initializes the
|
||||
AP interface, if a clean channel switch is not possible.
|
||||
In this case the AP code paths would deinit the driver, for
|
||||
example nl80211, without wpa_supplicant code paths getting
|
||||
notice of this.
|
||||
|
||||
Therefore add callbacks for wpa_supplicant mesh methods,
|
||||
which are called on init/deinit of the AP bss. These
|
||||
callbacks are then used to handle the reset in the mesh
|
||||
code.
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
src/ap/dfs.c | 2 +-
|
||||
src/ap/hostapd.c | 17 ++++++--
|
||||
src/ap/hostapd.h | 6 +++
|
||||
wpa_supplicant/mesh.c | 90 +++++++++++++++++++++++++++++++++++++------
|
||||
4 files changed, 100 insertions(+), 15 deletions(-)
|
||||
|
||||
--- a/src/ap/dfs.c
|
||||
+++ b/src/ap/dfs.c
|
||||
@@ -1112,7 +1112,7 @@ static int hostapd_dfs_start_channel_swi
|
||||
oper_centr_freq_seg0_idx,
|
||||
oper_centr_freq_seg1_idx,
|
||||
cmode->vht_capab,
|
||||
- &cmode->he_capab[IEEE80211_MODE_AP]);
|
||||
+ &cmode->he_capab[iface->conf->hw_mode]);
|
||||
|
||||
if (err) {
|
||||
wpa_printf(MSG_ERROR, "DFS failed to calculate CSA freq params");
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -354,7 +354,7 @@ static int hostapd_broadcast_wep_set(str
|
||||
#endif /* CONFIG_WEP */
|
||||
|
||||
|
||||
-static void hostapd_free_hapd_data(struct hostapd_data *hapd)
|
||||
+void hostapd_free_hapd_data(struct hostapd_data *hapd)
|
||||
{
|
||||
os_free(hapd->probereq_cb);
|
||||
hapd->probereq_cb = NULL;
|
||||
@@ -498,7 +498,7 @@ static void sta_track_deinit(struct host
|
||||
}
|
||||
|
||||
|
||||
-static void hostapd_cleanup_iface_partial(struct hostapd_iface *iface)
|
||||
+void hostapd_cleanup_iface_partial(struct hostapd_iface *iface)
|
||||
{
|
||||
wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
|
||||
#ifdef NEED_AP_MLME
|
||||
@@ -626,7 +626,7 @@ static int hostapd_flush_old_stations(st
|
||||
}
|
||||
|
||||
|
||||
-static void hostapd_bss_deinit_no_free(struct hostapd_data *hapd)
|
||||
+void hostapd_bss_deinit_no_free(struct hostapd_data *hapd)
|
||||
{
|
||||
hostapd_free_stas(hapd);
|
||||
hostapd_flush_old_stations(hapd, WLAN_REASON_DEAUTH_LEAVING);
|
||||
@@ -2690,6 +2690,13 @@ int hostapd_enable_iface(struct hostapd_
|
||||
{
|
||||
size_t j;
|
||||
|
||||
+ if (hapd_iface == NULL)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (hapd_iface->enable_iface_cb != NULL) {
|
||||
+ return hapd_iface->enable_iface_cb(hapd_iface);
|
||||
+ }
|
||||
+
|
||||
if (hapd_iface->bss[0]->drv_priv != NULL) {
|
||||
wpa_printf(MSG_ERROR, "Interface %s already enabled",
|
||||
hapd_iface->conf->bss[0]->iface);
|
||||
@@ -2751,6 +2758,10 @@ int hostapd_disable_iface(struct hostapd
|
||||
if (hapd_iface == NULL)
|
||||
return -1;
|
||||
|
||||
+ if (hapd_iface->disable_iface_cb != NULL) {
|
||||
+ return hapd_iface->disable_iface_cb(hapd_iface);
|
||||
+ }
|
||||
+
|
||||
if (hapd_iface->bss[0]->drv_priv == NULL) {
|
||||
wpa_printf(MSG_INFO, "Interface %s already disabled",
|
||||
hapd_iface->conf->bss[0]->iface);
|
||||
--- a/src/ap/hostapd.h
|
||||
+++ b/src/ap/hostapd.h
|
||||
@@ -589,6 +589,9 @@ struct hostapd_iface {
|
||||
|
||||
/* Previous WMM element information */
|
||||
struct hostapd_wmm_ac_params prev_wmm[WMM_AC_NUM];
|
||||
+
|
||||
+ int (*enable_iface_cb)(struct hostapd_iface *iface);
|
||||
+ int (*disable_iface_cb)(struct hostapd_iface *iface);
|
||||
};
|
||||
|
||||
/* hostapd.c */
|
||||
@@ -617,6 +620,9 @@ void hostapd_interface_deinit_free(struc
|
||||
int hostapd_enable_iface(struct hostapd_iface *hapd_iface);
|
||||
int hostapd_reload_iface(struct hostapd_iface *hapd_iface);
|
||||
int hostapd_disable_iface(struct hostapd_iface *hapd_iface);
|
||||
+void hostapd_bss_deinit_no_free(struct hostapd_data *hapd);
|
||||
+void hostapd_free_hapd_data(struct hostapd_data *hapd);
|
||||
+void hostapd_cleanup_iface_partial(struct hostapd_iface *iface);
|
||||
int hostapd_add_iface(struct hapd_interfaces *ifaces, char *buf);
|
||||
int hostapd_remove_iface(struct hapd_interfaces *ifaces, char *buf);
|
||||
void hostapd_channel_list_updated(struct hostapd_iface *iface, int initiator);
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -28,15 +28,20 @@
|
||||
#include "mesh.h"
|
||||
|
||||
|
||||
-static void wpa_supplicant_mesh_deinit(struct wpa_supplicant *wpa_s)
|
||||
+static void wpa_supplicant_mesh_deinit(struct wpa_supplicant *wpa_s, bool also_clear_hostapd)
|
||||
{
|
||||
- wpa_supplicant_mesh_iface_deinit(wpa_s, wpa_s->ifmsh, true);
|
||||
- wpa_s->ifmsh = NULL;
|
||||
- wpa_s->current_ssid = NULL;
|
||||
+ wpa_supplicant_mesh_iface_deinit(wpa_s, wpa_s->ifmsh, also_clear_hostapd);
|
||||
+
|
||||
+ if (also_clear_hostapd) {
|
||||
+ wpa_s->ifmsh = NULL;
|
||||
+ wpa_s->current_ssid = NULL;
|
||||
+ os_free(wpa_s->mesh_params);
|
||||
+ wpa_s->mesh_params = NULL;
|
||||
+ }
|
||||
+
|
||||
os_free(wpa_s->mesh_rsn);
|
||||
wpa_s->mesh_rsn = NULL;
|
||||
- os_free(wpa_s->mesh_params);
|
||||
- wpa_s->mesh_params = NULL;
|
||||
+
|
||||
wpa_supplicant_leave_mesh(wpa_s, false);
|
||||
}
|
||||
|
||||
@@ -237,7 +242,7 @@ static int wpas_mesh_complete(struct wpa
|
||||
ifmsh->conf->vht_capab,
|
||||
he_capab)) {
|
||||
wpa_printf(MSG_ERROR, "Error updating mesh frequency params.");
|
||||
- wpa_supplicant_mesh_deinit(wpa_s);
|
||||
+ wpa_supplicant_mesh_deinit(wpa_s, true);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -246,7 +251,7 @@ static int wpas_mesh_complete(struct wpa
|
||||
wpas_mesh_init_rsn(wpa_s)) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"mesh: RSN initialization failed - deinit mesh");
|
||||
- wpa_supplicant_mesh_iface_deinit(wpa_s, wpa_s->ifmsh, false);
|
||||
+ wpa_supplicant_mesh_deinit(wpa_s, false);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -291,6 +296,67 @@ static void wpas_mesh_complete_cb(void *
|
||||
}
|
||||
|
||||
|
||||
+static int wpa_supplicant_mesh_enable_iface_cb(struct hostapd_iface *ifmsh)
|
||||
+{
|
||||
+ struct wpa_supplicant *wpa_s = ifmsh->owner;
|
||||
+ struct hostapd_data *bss;
|
||||
+
|
||||
+ ifmsh->mconf = mesh_config_create(wpa_s, wpa_s->current_ssid);
|
||||
+
|
||||
+ bss = ifmsh->bss[0];
|
||||
+ bss->msg_ctx = wpa_s;
|
||||
+ os_memcpy(bss->own_addr, wpa_s->own_addr, ETH_ALEN);
|
||||
+ bss->driver = wpa_s->driver;
|
||||
+ bss->drv_priv = wpa_s->drv_priv;
|
||||
+ bss->iface = ifmsh;
|
||||
+ bss->mesh_sta_free_cb = mesh_mpm_free_sta;
|
||||
+ bss->setup_complete_cb = wpas_mesh_complete_cb;
|
||||
+ bss->setup_complete_cb_ctx = wpa_s;
|
||||
+
|
||||
+ bss->conf->start_disabled = 1;
|
||||
+ bss->conf->mesh = MESH_ENABLED;
|
||||
+ bss->conf->ap_max_inactivity = wpa_s->conf->mesh_max_inactivity;
|
||||
+
|
||||
+ if (wpa_drv_init_mesh(wpa_s)) {
|
||||
+ wpa_msg(wpa_s, MSG_ERROR, "Failed to init mesh in driver");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (hostapd_setup_interface(ifmsh)) {
|
||||
+ wpa_printf(MSG_ERROR,
|
||||
+ "Failed to initialize hostapd interface for mesh");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int wpa_supplicant_mesh_disable_iface_cb(struct hostapd_iface *ifmsh)
|
||||
+{
|
||||
+ struct wpa_supplicant *wpa_s = ifmsh->owner;
|
||||
+ int j;
|
||||
+
|
||||
+ wpa_supplicant_mesh_deinit(wpa_s, false);
|
||||
+
|
||||
+#ifdef NEED_AP_MLME
|
||||
+ for (j = 0; j < ifmsh->num_bss; j++)
|
||||
+ hostapd_cleanup_cs_params(ifmsh->bss[j]);
|
||||
+#endif /* NEED_AP_MLME */
|
||||
+
|
||||
+ /* same as hostapd_interface_deinit without deinitializing ctrl-iface */
|
||||
+ for (j = 0; j < ifmsh->num_bss; j++) {
|
||||
+ struct hostapd_data *hapd = ifmsh->bss[j];
|
||||
+ hostapd_bss_deinit_no_free(hapd);
|
||||
+ hostapd_free_hapd_data(hapd);
|
||||
+ }
|
||||
+
|
||||
+ hostapd_cleanup_iface_partial(ifmsh);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
|
||||
struct wpa_ssid *ssid,
|
||||
struct hostapd_freq_params *freq)
|
||||
@@ -318,6 +384,8 @@ static int wpa_supplicant_mesh_init(stru
|
||||
ifmsh->drv_flags = wpa_s->drv_flags;
|
||||
ifmsh->drv_flags2 = wpa_s->drv_flags2;
|
||||
ifmsh->num_bss = 1;
|
||||
+ ifmsh->enable_iface_cb = wpa_supplicant_mesh_enable_iface_cb;
|
||||
+ ifmsh->disable_iface_cb = wpa_supplicant_mesh_disable_iface_cb;
|
||||
ifmsh->bss = os_calloc(wpa_s->ifmsh->num_bss,
|
||||
sizeof(struct hostapd_data *));
|
||||
if (!ifmsh->bss)
|
||||
@@ -451,7 +519,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
|
||||
return 0;
|
||||
out_free:
|
||||
- wpa_supplicant_mesh_deinit(wpa_s);
|
||||
+ wpa_supplicant_mesh_deinit(wpa_s, true);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -499,7 +567,7 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
goto out;
|
||||
}
|
||||
|
||||
- wpa_supplicant_mesh_deinit(wpa_s);
|
||||
+ wpa_supplicant_mesh_deinit(wpa_s, true);
|
||||
|
||||
wpa_s->pairwise_cipher = WPA_CIPHER_NONE;
|
||||
wpa_s->group_cipher = WPA_CIPHER_NONE;
|
||||
@@ -588,7 +656,7 @@ int wpa_supplicant_leave_mesh(struct wpa
|
||||
|
||||
/* Need to send peering close messages first */
|
||||
if (need_deinit)
|
||||
- wpa_supplicant_mesh_deinit(wpa_s);
|
||||
+ wpa_supplicant_mesh_deinit(wpa_s, true);
|
||||
|
||||
ret = wpa_drv_leave_mesh(wpa_s);
|
||||
if (ret)
|
@ -0,0 +1,94 @@
|
||||
From 6ee4e70d469b8ce05013ed524eea32ea303e6563 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 14:19:04 +0200
|
||||
Subject: [PATCH 16/19] tests: DFS test for wpa_supplicant mesh
|
||||
|
||||
Add a test with uses a DFS channel, waits for CAC
|
||||
afterwards successfull mesh join and then triggers
|
||||
a radar event and check if the mesh comes up again
|
||||
on the same device.
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
tests/hwsim/test_wpas_mesh.py | 56 +++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 54 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/tests/hwsim/test_wpas_mesh.py
|
||||
+++ b/tests/hwsim/test_wpas_mesh.py
|
||||
@@ -80,8 +80,23 @@ def check_mesh_scan(dev, params, other_s
|
||||
if '[MESH]' not in bss['flags']:
|
||||
raise Exception("BSS output did not include MESH flag")
|
||||
|
||||
-def check_mesh_group_added(dev):
|
||||
- ev = dev.wait_event(["MESH-GROUP-STARTED"])
|
||||
+def check_dfs_started(dev, timeout=10):
|
||||
+ ev = dev.wait_event(["DFS-CAC-START"], timeout=timeout)
|
||||
+ if ev is None:
|
||||
+ raise Exception("Test exception: CAC did not start")
|
||||
+
|
||||
+def check_dfs_finished(dev, timeout=70):
|
||||
+ ev = dev.wait_event(["DFS-CAC-COMPLETED"], timeout=timeout)
|
||||
+ if ev is None:
|
||||
+ raise Exception("Test exception: CAC did not finish")
|
||||
+
|
||||
+def check_mesh_radar_handling_finished(dev, timeout=75):
|
||||
+ ev = dev.wait_event(["CTRL-EVENT-CHANNEL-SWITCH", "MESH-GROUP-STARTED"], timeout=timeout)
|
||||
+ if ev is None:
|
||||
+ raise Exception("Test exception: Couldn't join mesh")
|
||||
+
|
||||
+def check_mesh_group_added(dev, timeout=10):
|
||||
+ ev = dev.wait_event(["MESH-GROUP-STARTED"], timeout=timeout)
|
||||
if ev is None:
|
||||
raise Exception("Test exception: Couldn't join mesh")
|
||||
|
||||
@@ -91,6 +106,10 @@ def check_mesh_group_removed(dev):
|
||||
if ev is None:
|
||||
raise Exception("Test exception: Couldn't leave mesh")
|
||||
|
||||
+def check_regdom_change(dev, timeout=10):
|
||||
+ ev = dev.wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=timeout)
|
||||
+ if ev is None:
|
||||
+ raise Exception("Test exception: No regdom change happened.")
|
||||
|
||||
def check_mesh_peer_connected(dev, timeout=10):
|
||||
ev = dev.wait_event(["MESH-PEER-CONNECTED"], timeout=timeout)
|
||||
@@ -167,6 +186,39 @@ def test_wpas_mesh_group_remove(dev):
|
||||
check_mesh_group_removed(dev[0])
|
||||
dev[0].mesh_group_remove()
|
||||
|
||||
+def dfs_simulate_radar(dev):
|
||||
+ logger.info("Trigger a simulated radar event")
|
||||
+ phyname = dev.get_driver_status_field("phyname")
|
||||
+ radar_file = '/sys/kernel/debug/ieee80211/' + phyname + '/hwsim/dfs_simulate_radar'
|
||||
+ with open(radar_file, 'w') as f:
|
||||
+ f.write('1')
|
||||
+
|
||||
+@long_duration_test
|
||||
+def test_wpas_mesh_peer_connected_dfs(dev):
|
||||
+ """wpa_supplicant MESH peer connected"""
|
||||
+ dev[0].set("country", "DE")
|
||||
+ dev[1].set("country", "DE")
|
||||
+
|
||||
+ check_regdom_change(dev[0])
|
||||
+ check_regdom_change(dev[1])
|
||||
+
|
||||
+ check_mesh_support(dev[0])
|
||||
+ add_open_mesh_network(dev[0], freq="5500", beacon_int=160)
|
||||
+ add_open_mesh_network(dev[1], freq="5500", beacon_int=160)
|
||||
+ check_dfs_started(dev[0])
|
||||
+ check_dfs_finished(dev[0])
|
||||
+ check_mesh_joined_connected(dev, timeout0=10)
|
||||
+
|
||||
+ dfs_simulate_radar(dev[0])
|
||||
+
|
||||
+ check_mesh_radar_handling_finished(dev[0], timeout=75)
|
||||
+
|
||||
+ dev[0].set("country", "00")
|
||||
+ dev[1].set("country", "00")
|
||||
+
|
||||
+ check_regdom_change(dev[0])
|
||||
+ check_regdom_change(dev[1])
|
||||
+
|
||||
def test_wpas_mesh_peer_connected(dev):
|
||||
"""wpa_supplicant MESH peer connected"""
|
||||
check_mesh_support(dev[0])
|
@ -0,0 +1,24 @@
|
||||
From 928da9a270deaf4409aee4d87a33a6f61b56c136 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 14:19:05 +0200
|
||||
Subject: [PATCH 17/19] mesh: fix mesh_oom test
|
||||
|
||||
Only change freq params, if ifmsh->freq is set initially, which only
|
||||
happens if hostapd_get_hw_features in setup_interface2 succeeds.
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
wpa_supplicant/mesh.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -218,7 +218,7 @@ static int wpas_mesh_complete(struct wpa
|
||||
* inspect if channel's been changed since initialized.
|
||||
* i.e. DFS radar detection
|
||||
*/
|
||||
- if (ifmsh->freq != params->freq.freq) {
|
||||
+ if (ifmsh->freq > 0 && ifmsh->freq != params->freq.freq) {
|
||||
wpa_s->assoc_freq = ifmsh->freq;
|
||||
ssid->frequency = ifmsh->freq;
|
||||
struct he_capabilities *he_capab = NULL;
|
@ -0,0 +1,93 @@
|
||||
From 1eab0e62920f443f8814bad846f6439843223b69 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 14:19:06 +0200
|
||||
Subject: [PATCH 18/19] mesh: move mesh freq setting to own function
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
wpa_supplicant/mesh.c | 59 ++++++++++++++++++++++++++-----------------
|
||||
1 file changed, 36 insertions(+), 23 deletions(-)
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -201,6 +201,40 @@ static int wpas_mesh_init_rsn(struct wpa
|
||||
return !wpa_s->mesh_rsn ? -1 : 0;
|
||||
}
|
||||
|
||||
+
|
||||
+static int wpas_mesh_update_freq_params(struct wpa_supplicant *wpa_s)
|
||||
+{
|
||||
+ struct wpa_driver_mesh_join_params *params = wpa_s->mesh_params;
|
||||
+ struct hostapd_iface *ifmsh = wpa_s->ifmsh;
|
||||
+ struct he_capabilities *he_capab = NULL;
|
||||
+
|
||||
+ if (ifmsh->current_mode)
|
||||
+ he_capab = &ifmsh->current_mode->he_capab[IEEE80211_MODE_MESH];
|
||||
+
|
||||
+ if (hostapd_set_freq_params(¶ms->freq,
|
||||
+ ifmsh->conf->hw_mode,
|
||||
+ ifmsh->freq,
|
||||
+ ifmsh->conf->channel,
|
||||
+ ifmsh->conf->enable_edmg,
|
||||
+ ifmsh->conf->edmg_channel,
|
||||
+ ifmsh->conf->ieee80211n,
|
||||
+ ifmsh->conf->ieee80211ac,
|
||||
+ ifmsh->conf->ieee80211ax,
|
||||
+ ifmsh->conf->secondary_channel,
|
||||
+ hostapd_get_oper_chwidth(ifmsh->conf),
|
||||
+ hostapd_get_oper_centr_freq_seg0_idx(ifmsh->conf),
|
||||
+ hostapd_get_oper_centr_freq_seg1_idx(ifmsh->conf),
|
||||
+ ifmsh->conf->vht_capab,
|
||||
+ he_capab)) {
|
||||
+ wpa_printf(MSG_ERROR, "Error updating mesh frequency params.");
|
||||
+ wpa_supplicant_mesh_deinit(wpa_s, true);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int wpas_mesh_complete(struct wpa_supplicant *wpa_s)
|
||||
{
|
||||
struct hostapd_iface *ifmsh = wpa_s->ifmsh;
|
||||
@@ -221,30 +255,8 @@ static int wpas_mesh_complete(struct wpa
|
||||
if (ifmsh->freq > 0 && ifmsh->freq != params->freq.freq) {
|
||||
wpa_s->assoc_freq = ifmsh->freq;
|
||||
ssid->frequency = ifmsh->freq;
|
||||
- struct he_capabilities *he_capab = NULL;
|
||||
-
|
||||
- if (ifmsh->current_mode)
|
||||
- he_capab = &ifmsh->current_mode->he_capab[IEEE80211_MODE_MESH];
|
||||
-
|
||||
- if (hostapd_set_freq_params(¶ms->freq,
|
||||
- ifmsh->conf->hw_mode,
|
||||
- ifmsh->freq,
|
||||
- ifmsh->conf->channel,
|
||||
- ifmsh->conf->enable_edmg,
|
||||
- ifmsh->conf->edmg_channel,
|
||||
- ifmsh->conf->ieee80211n,
|
||||
- ifmsh->conf->ieee80211ac,
|
||||
- ifmsh->conf->ieee80211ax,
|
||||
- ifmsh->conf->secondary_channel,
|
||||
- hostapd_get_oper_chwidth(ifmsh->conf),
|
||||
- hostapd_get_oper_centr_freq_seg0_idx(ifmsh->conf),
|
||||
- hostapd_get_oper_centr_freq_seg1_idx(ifmsh->conf),
|
||||
- ifmsh->conf->vht_capab,
|
||||
- he_capab)) {
|
||||
- wpa_printf(MSG_ERROR, "Error updating mesh frequency params.");
|
||||
- wpa_supplicant_mesh_deinit(wpa_s, true);
|
||||
+ if (wpas_mesh_update_freq_params(wpa_s) != 0)
|
||||
return -1;
|
||||
- }
|
||||
}
|
||||
|
||||
if (ifmsh->mconf->security != MESH_CONF_SEC_NONE &&
|
||||
@@ -518,6 +530,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
}
|
||||
|
||||
return 0;
|
||||
+
|
||||
out_free:
|
||||
wpa_supplicant_mesh_deinit(wpa_s, true);
|
||||
return -ENOMEM;
|
@ -0,0 +1,81 @@
|
||||
From fc8ea40f6130ac18d9c66797de2cf1d5af55d496 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 14:19:07 +0200
|
||||
Subject: [PATCH 19/19] mesh: use deterministic channel on channel switch
|
||||
|
||||
This patch uses a deterministic channel on DFS channel switch
|
||||
in mesh networks. Otherwise, when switching to a usable but not
|
||||
available channel, no CSA can be sent and a random channel is choosen
|
||||
without notification of other nodes. It is then quite likely, that
|
||||
the mesh network gets disconnected.
|
||||
|
||||
Fix this by using a deterministic number, based on the sha256 hash
|
||||
of the mesh ID, in order to use at least a different number in each
|
||||
mesh network.
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
---
|
||||
src/ap/dfs.c | 20 +++++++++++++++++++-
|
||||
src/drivers/driver_nl80211.c | 4 ++++
|
||||
2 files changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/src/ap/dfs.c
|
||||
+++ b/src/ap/dfs.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "ap_drv_ops.h"
|
||||
#include "drivers/driver.h"
|
||||
#include "dfs.h"
|
||||
+#include "crypto/crypto.h"
|
||||
|
||||
|
||||
static int dfs_get_used_n_chans(struct hostapd_iface *iface, int *seg1)
|
||||
@@ -480,9 +481,14 @@ dfs_get_valid_channel(struct hostapd_ifa
|
||||
int num_available_chandefs;
|
||||
int chan_idx, chan_idx2;
|
||||
int sec_chan_idx_80p80 = -1;
|
||||
+ bool is_mesh = false;
|
||||
int i;
|
||||
u32 _rand;
|
||||
|
||||
+#ifdef CONFIG_MESH
|
||||
+ is_mesh = iface->mconf;
|
||||
+#endif
|
||||
+
|
||||
wpa_printf(MSG_DEBUG, "DFS: Selecting random channel");
|
||||
*secondary_channel = 0;
|
||||
*oper_centr_freq_seg0_idx = 0;
|
||||
@@ -502,8 +508,20 @@ dfs_get_valid_channel(struct hostapd_ifa
|
||||
if (num_available_chandefs == 0)
|
||||
return NULL;
|
||||
|
||||
- if (os_get_random((u8 *) &_rand, sizeof(_rand)) < 0)
|
||||
+ /* try to use deterministic channel in mesh, so that both sides
|
||||
+ * have a chance to switch to the same channel */
|
||||
+ if (is_mesh) {
|
||||
+#ifdef CONFIG_MESH
|
||||
+ u64 hash[4];
|
||||
+ const u8 *meshid[1] = { &iface->mconf->meshid[0] };
|
||||
+ const size_t meshid_len = iface->mconf->meshid_len;
|
||||
+
|
||||
+ sha256_vector(1, meshid, &meshid_len, (u8 *)&hash[0]);
|
||||
+ _rand = hash[0] + hash[1] + hash[2] + hash[3];
|
||||
+#endif
|
||||
+ } else if (os_get_random((u8 *) &_rand, sizeof(_rand)) < 0)
|
||||
return NULL;
|
||||
+
|
||||
chan_idx = _rand % num_available_chandefs;
|
||||
dfs_find_channel(iface, &chan, chan_idx, skip_radar);
|
||||
if (!chan) {
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -9473,6 +9473,10 @@ static int nl80211_switch_channel(void *
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
+ if (drv->nlmode == NL80211_IFTYPE_MESH_POINT) {
|
||||
+ nla_put_flag(msg, NL80211_ATTR_HANDLE_DFS);
|
||||
+ }
|
||||
+
|
||||
/* beacon_csa params */
|
||||
beacon_csa = nla_nest_start(msg, NL80211_ATTR_CSA_IES);
|
||||
if (!beacon_csa)
|
@ -59,7 +59,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -10019,6 +10019,9 @@ static int nl80211_put_mesh_config(struc
|
||||
@@ -10023,6 +10023,9 @@ static int nl80211_put_mesh_config(struc
|
||||
if (((params->flags & WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS) &&
|
||||
nla_put_u8(msg, NL80211_MESHCONF_AUTO_OPEN_PLINKS,
|
||||
params->auto_plinks)) ||
|
||||
@ -79,7 +79,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
{ INT_RANGE(mesh_rssi_threshold, -255, 1) },
|
||||
#else /* CONFIG_MESH */
|
||||
{ INT_RANGE(mode, 0, 4) },
|
||||
@@ -3047,6 +3048,7 @@ void wpa_config_set_network_defaults(str
|
||||
@@ -3049,6 +3050,7 @@ void wpa_config_set_network_defaults(str
|
||||
ssid->dot11MeshRetryTimeout = DEFAULT_MESH_RETRY_TIMEOUT;
|
||||
ssid->dot11MeshConfirmTimeout = DEFAULT_MESH_CONFIRM_TIMEOUT;
|
||||
ssid->dot11MeshHoldingTimeout = DEFAULT_MESH_HOLDING_TIMEOUT;
|
||||
@ -87,7 +87,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
ssid->mesh_rssi_threshold = DEFAULT_MESH_RSSI_THRESHOLD;
|
||||
#endif /* CONFIG_MESH */
|
||||
#ifdef CONFIG_HT_OVERRIDES
|
||||
@@ -4274,6 +4276,7 @@ struct wpa_config * wpa_config_alloc_emp
|
||||
@@ -4276,6 +4278,7 @@ struct wpa_config * wpa_config_alloc_emp
|
||||
config->user_mpm = DEFAULT_USER_MPM;
|
||||
config->max_peer_links = DEFAULT_MAX_PEER_LINKS;
|
||||
config->mesh_max_inactivity = DEFAULT_MESH_MAX_INACTIVITY;
|
||||
@ -95,7 +95,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
config->dot11RSNASAERetransPeriod =
|
||||
DEFAULT_DOT11_RSNA_SAE_RETRANS_PERIOD;
|
||||
config->fast_reauth = DEFAULT_FAST_REAUTH;
|
||||
@@ -4912,6 +4915,7 @@ static const struct global_parse_data gl
|
||||
@@ -4914,6 +4917,7 @@ static const struct global_parse_data gl
|
||||
{ INT(user_mpm), 0 },
|
||||
{ INT_RANGE(max_peer_links, 0, 255), 0 },
|
||||
{ INT(mesh_max_inactivity), 0 },
|
||||
@ -164,7 +164,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -130,6 +130,7 @@ static struct mesh_conf * mesh_config_cr
|
||||
@@ -137,6 +137,7 @@ static struct mesh_conf * mesh_config_cr
|
||||
conf->mesh_cc_id = 0;
|
||||
conf->mesh_sp_id = MESH_SYNC_METHOD_NEIGHBOR_OFFSET;
|
||||
conf->mesh_auth_id = (conf->security & MESH_CONF_SEC_AUTH) ? 1 : 0;
|
||||
@ -172,7 +172,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
conf->dot11MeshMaxRetries = ssid->dot11MeshMaxRetries;
|
||||
conf->dot11MeshRetryTimeout = ssid->dot11MeshRetryTimeout;
|
||||
conf->dot11MeshConfirmTimeout = ssid->dot11MeshConfirmTimeout;
|
||||
@@ -335,6 +336,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
@@ -434,6 +435,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
bss->conf->start_disabled = 1;
|
||||
bss->conf->mesh = MESH_ENABLED;
|
||||
bss->conf->ap_max_inactivity = wpa_s->conf->mesh_max_inactivity;
|
||||
@ -180,7 +180,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
if (ieee80211_is_dfs(ssid->frequency, wpa_s->hw.modes,
|
||||
wpa_s->hw.num_modes) && wpa_s->conf->country[0]) {
|
||||
@@ -556,6 +558,10 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
@@ -647,6 +649,10 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
}
|
||||
params->conf.peer_link_timeout = wpa_s->conf->mesh_max_inactivity;
|
||||
|
@ -253,7 +253,7 @@
|
||||
struct wpa_supplicant *wpa_s;
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -6597,7 +6597,6 @@ struct wpa_interface * wpa_supplicant_ma
|
||||
@@ -6594,7 +6594,6 @@ struct wpa_interface * wpa_supplicant_ma
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -261,7 +261,7 @@
|
||||
/**
|
||||
* wpa_supplicant_match_existing - Match existing interfaces
|
||||
* @global: Pointer to global data from wpa_supplicant_init()
|
||||
@@ -6634,6 +6633,11 @@ static int wpa_supplicant_match_existing
|
||||
@@ -6631,6 +6630,11 @@ static int wpa_supplicant_match_existing
|
||||
|
||||
#endif /* CONFIG_MATCH_IFACE */
|
||||
|
||||
@ -273,7 +273,7 @@
|
||||
|
||||
/**
|
||||
* wpa_supplicant_add_iface - Add a new network interface
|
||||
@@ -6890,6 +6894,8 @@ struct wpa_global * wpa_supplicant_init(
|
||||
@@ -6887,6 +6891,8 @@ struct wpa_global * wpa_supplicant_init(
|
||||
#ifndef CONFIG_NO_WPA_MSG
|
||||
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
|
||||
#endif /* CONFIG_NO_WPA_MSG */
|
||||
|
@ -20,18 +20,18 @@
|
||||
INT(enable_edmg);
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -368,6 +368,8 @@ static int wpa_supplicant_mesh_init(stru
|
||||
@@ -467,6 +467,8 @@ static int wpa_supplicant_mesh_init(stru
|
||||
frequency);
|
||||
goto out_free;
|
||||
}
|
||||
+ if (ssid->noscan)
|
||||
+ conf->noscan = 1;
|
||||
if (ssid->ht40)
|
||||
conf->secondary_channel = ssid->ht40;
|
||||
if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && ssid->vht) {
|
||||
|
||||
if (ssid->mesh_basic_rates == NULL) {
|
||||
/*
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -2338,12 +2338,12 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
@@ -2334,12 +2334,12 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
|
||||
enum hostapd_hw_mode hw_mode;
|
||||
struct hostapd_hw_modes *mode = NULL;
|
||||
@ -46,7 +46,7 @@
|
||||
unsigned int j, k;
|
||||
struct hostapd_freq_params vht_freq;
|
||||
int chwidth, seg0, seg1;
|
||||
@@ -2425,7 +2425,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
@@ -2421,7 +2421,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
#endif /* CONFIG_HE_OVERRIDES */
|
||||
|
||||
/* Setup higher BW only for 5 GHz */
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -4952,7 +4952,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
||||
@@ -4949,7 +4949,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
||||
if (wpa_s == NULL)
|
||||
return NULL;
|
||||
wpa_s->scan_req = INITIAL_SCAN_REQ;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -1426,15 +1426,35 @@ int ap_switch_channel(struct wpa_supplic
|
||||
@@ -1466,15 +1466,35 @@ int ap_switch_channel(struct wpa_supplic
|
||||
|
||||
|
||||
#ifdef CONFIG_CTRL_IFACE
|
||||
|
@ -183,16 +183,16 @@
|
||||
wpa_s->new_connection = 1;
|
||||
wpa_drv_set_operstate(wpa_s, 0);
|
||||
#ifndef IEEE8021X_EAPOL
|
||||
@@ -2229,6 +2281,8 @@ void wpa_supplicant_associate(struct wpa
|
||||
wpa_ssid_txt(ssid->ssid, ssid->ssid_len),
|
||||
ssid->id);
|
||||
wpas_notify_mesh_group_started(wpa_s, ssid);
|
||||
@@ -2225,6 +2277,8 @@ void wpa_supplicant_associate(struct wpa
|
||||
return;
|
||||
}
|
||||
wpa_s->current_bss = bss;
|
||||
+ if (wpa_s->hostapd)
|
||||
+ hostapd_reload(wpa_s, wpa_s->current_bss);
|
||||
#else /* CONFIG_MESH */
|
||||
wpa_msg(wpa_s, MSG_ERROR,
|
||||
"mesh mode support not included in the build");
|
||||
@@ -6210,6 +6264,16 @@ static int wpa_supplicant_init_iface(str
|
||||
@@ -6207,6 +6261,16 @@ static int wpa_supplicant_init_iface(str
|
||||
sizeof(wpa_s->bridge_ifname));
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@
|
||||
/* RSNA Supplicant Key Management - INITIALIZE */
|
||||
eapol_sm_notify_portEnabled(wpa_s->eapol, false);
|
||||
eapol_sm_notify_portValid(wpa_s->eapol, false);
|
||||
@@ -6543,6 +6607,11 @@ static void wpa_supplicant_deinit_iface(
|
||||
@@ -6540,6 +6604,11 @@ static void wpa_supplicant_deinit_iface(
|
||||
if (terminate)
|
||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
|
||||
|
||||
|
@ -182,7 +182,7 @@
|
||||
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -1284,7 +1284,7 @@ int wpas_ap_wps_nfc_report_handover(stru
|
||||
@@ -1324,7 +1324,7 @@ int wpas_ap_wps_nfc_report_handover(stru
|
||||
#endif /* CONFIG_WPS */
|
||||
|
||||
|
||||
|
@ -174,7 +174,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
* macsec_policy - Determines the policy for MACsec secure session
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -3641,6 +3641,12 @@ static void wpas_start_assoc_cb(struct w
|
||||
@@ -3638,6 +3638,12 @@ static void wpas_start_assoc_cb(struct w
|
||||
params.beacon_int = ssid->beacon_int;
|
||||
else
|
||||
params.beacon_int = wpa_s->conf->beacon_int;
|
||||
|
@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||
struct wpa_driver_set_key_params {
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -10039,6 +10039,18 @@ static int nl80211_put_mesh_id(struct nl
|
||||
@@ -10043,6 +10043,18 @@ static int nl80211_put_mesh_id(struct nl
|
||||
}
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||
static int nl80211_put_mesh_config(struct nl_msg *msg,
|
||||
struct wpa_driver_mesh_bss_params *params)
|
||||
{
|
||||
@@ -10100,6 +10112,7 @@ static int nl80211_join_mesh(struct i802
|
||||
@@ -10104,6 +10116,7 @@ static int nl80211_join_mesh(struct i802
|
||||
nl80211_put_basic_rates(msg, params->basic_rates) ||
|
||||
nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
|
||||
nl80211_put_beacon_int(msg, params->beacon_int) ||
|
||||
@ -58,7 +58,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -501,6 +501,7 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
@@ -592,6 +592,7 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
|
||||
params->meshid = ssid->ssid;
|
||||
params->meshid_len = ssid->ssid_len;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -2411,11 +2411,13 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
@@ -2407,11 +2407,13 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
for (j = 0; j < wpa_s->last_scan_res_used; j++) {
|
||||
struct wpa_bss *bss = wpa_s->last_scan_res[j];
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
int interface_added; /* virtual interface added for this BSS */
|
||||
unsigned int started:1;
|
||||
unsigned int disabled:1;
|
||||
@@ -603,6 +605,7 @@ hostapd_alloc_bss_data(struct hostapd_if
|
||||
@@ -606,6 +608,7 @@ hostapd_alloc_bss_data(struct hostapd_if
|
||||
struct hostapd_bss_config *bss);
|
||||
int hostapd_setup_interface(struct hostapd_iface *iface);
|
||||
int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
|
||||
@ -49,7 +49,7 @@
|
||||
struct hostapd_iface * hostapd_alloc_iface(void);
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -395,6 +395,7 @@ static void hostapd_free_hapd_data(struc
|
||||
@@ -395,6 +395,7 @@ void hostapd_free_hapd_data(struct hosta
|
||||
hapd->beacon_set_done = 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
|
||||
@ -296,7 +296,7 @@
|
||||
CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -6797,6 +6797,8 @@ struct wpa_supplicant * wpa_supplicant_a
|
||||
@@ -6794,6 +6794,8 @@ struct wpa_supplicant * wpa_supplicant_a
|
||||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
@ -305,7 +305,7 @@
|
||||
return wpa_s;
|
||||
}
|
||||
|
||||
@@ -6823,6 +6825,8 @@ int wpa_supplicant_remove_iface(struct w
|
||||
@@ -6820,6 +6822,8 @@ int wpa_supplicant_remove_iface(struct w
|
||||
struct wpa_supplicant *parent = wpa_s->parent;
|
||||
#endif /* CONFIG_MESH */
|
||||
|
||||
@ -314,7 +314,7 @@
|
||||
/* Remove interface from the global list of interfaces */
|
||||
prev = global->ifaces;
|
||||
if (prev == wpa_s) {
|
||||
@@ -7126,8 +7130,12 @@ int wpa_supplicant_run(struct wpa_global
|
||||
@@ -7123,8 +7127,12 @@ int wpa_supplicant_run(struct wpa_global
|
||||
eloop_register_signal_terminate(wpa_supplicant_terminate, global);
|
||||
eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
|
||||
|
||||
|
@ -163,7 +163,7 @@
|
||||
int interface_added; /* virtual interface added for this BSS */
|
||||
unsigned int started:1;
|
||||
unsigned int disabled:1;
|
||||
@@ -597,7 +598,7 @@ struct hostapd_iface {
|
||||
@@ -600,7 +601,7 @@ struct hostapd_iface {
|
||||
int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
|
||||
int (*cb)(struct hostapd_iface *iface,
|
||||
void *ctx), void *ctx);
|
||||
|
@ -0,0 +1,37 @@
|
||||
From cefc52e6b93731c713f1bba1cb5e7e92105b758b Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Fri, 3 Jul 2020 23:00:34 +0200
|
||||
Subject: [PATCH] dfs: enter DFS state if no available channel is found
|
||||
|
||||
Previously hostapd would not stop transmitting when a DFS event was
|
||||
detected and no available channel to switch to was available.
|
||||
|
||||
Disable and re-enable the interface to enter DFS state. This way, TX
|
||||
does not happen until the kernel notifies hostapd about the NOP
|
||||
expiring.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
src/ap/dfs.c | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/ap/dfs.c
|
||||
+++ b/src/ap/dfs.c
|
||||
@@ -1066,8 +1066,15 @@ static int hostapd_dfs_start_channel_swi
|
||||
&oper_centr_freq_seg0_idx,
|
||||
&oper_centr_freq_seg1_idx,
|
||||
&skip_radar);
|
||||
- if (!channel)
|
||||
- return err;
|
||||
+ if (!channel) {
|
||||
+ /*
|
||||
+ * Toggle interface state to enter DFS state
|
||||
+ * until NOP is finished.
|
||||
+ */
|
||||
+ hostapd_disable_iface(iface);
|
||||
+ hostapd_enable_iface(iface);
|
||||
+ return 0;
|
||||
+ }
|
||||
if (!skip_radar) {
|
||||
iface->freq = channel->freq;
|
||||
iface->conf->channel = channel->chan;
|
@ -6,24 +6,34 @@ CONFIG_64BIT=y
|
||||
CONFIG_AQUANTIA_PHY=y
|
||||
CONFIG_ARCH_CLOCKSOURCE_DATA=y
|
||||
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
||||
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
|
||||
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
|
||||
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
|
||||
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
|
||||
CONFIG_ARCH_HAS_DMA_COHERENT_TO_PFN=y
|
||||
CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y
|
||||
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
|
||||
CONFIG_ARCH_HAS_FAST_MULTIPLIER=y
|
||||
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
|
||||
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
|
||||
CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
|
||||
CONFIG_ARCH_HAS_GIGANTIC_PAGE=y
|
||||
CONFIG_ARCH_HAS_KCOV=y
|
||||
CONFIG_ARCH_HAS_KEEPINITRD=y
|
||||
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
|
||||
CONFIG_ARCH_HAS_PTE_DEVMAP=y
|
||||
CONFIG_ARCH_HAS_PTE_SPECIAL=y
|
||||
CONFIG_ARCH_HAS_SETUP_DMA_OPS=y
|
||||
CONFIG_ARCH_HAS_SET_DIRECT_MAP=y
|
||||
CONFIG_ARCH_HAS_SET_MEMORY=y
|
||||
CONFIG_ARCH_HAS_SG_CHAIN=y
|
||||
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
|
||||
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
|
||||
CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y
|
||||
CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y
|
||||
CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y
|
||||
CONFIG_ARCH_HAS_TICK_BROADCAST=y
|
||||
CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=24
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
||||
@ -43,17 +53,20 @@ CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
|
||||
CONFIG_ARCH_SUPPORTS_UPROBES=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
|
||||
CONFIG_ARCH_USE_MEMREMAP_PROT=y
|
||||
CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
|
||||
CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
|
||||
CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
|
||||
CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
|
||||
CONFIG_ARCH_WANT_FRAME_POINTERS=y
|
||||
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
|
||||
CONFIG_ARM64=y
|
||||
# CONFIG_ARM64_16K_PAGES is not set
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
# CONFIG_ARM64_64K_PAGES is not set
|
||||
CONFIG_ARM64_CNP=y
|
||||
CONFIG_ARM64_CONT_SHIFT=4
|
||||
# CONFIG_ARM64_CRYPTO is not set
|
||||
# CONFIG_ARM64_ERRATUM_1165522 is not set
|
||||
# CONFIG_ARM64_ERRATUM_1286807 is not set
|
||||
# CONFIG_ARM64_ERRATUM_1418040 is not set
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_826319=y
|
||||
@ -62,22 +75,20 @@ CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_843419=y
|
||||
CONFIG_ARM64_ERRATUM_845719=y
|
||||
CONFIG_ARM64_HW_AFDBM=y
|
||||
# CONFIG_ARM64_LSE_ATOMICS is not set
|
||||
CONFIG_ARM64_MODULE_PLTS=y
|
||||
CONFIG_ARM64_PAGE_SHIFT=12
|
||||
CONFIG_ARM64_PAN=y
|
||||
CONFIG_ARM64_PA_BITS=48
|
||||
CONFIG_ARM64_PA_BITS_48=y
|
||||
# CONFIG_ARM64_PMEM is not set
|
||||
# CONFIG_ARM64_PTDUMP_DEBUGFS is not set
|
||||
# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
|
||||
# CONFIG_ARM64_PTR_AUTH is not set
|
||||
CONFIG_ARM64_SSBD=y
|
||||
CONFIG_ARM64_SVE=y
|
||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
||||
CONFIG_ARM64_UAO=y
|
||||
CONFIG_ARM64_VA_BITS=39
|
||||
CONFIG_ARM64_VA_BITS_39=y
|
||||
# CONFIG_ARM64_VA_BITS_48 is not set
|
||||
CONFIG_ARM64_VHE=y
|
||||
CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
|
||||
# CONFIG_ARMV8_DEPRECATED is not set
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
@ -93,10 +104,11 @@ CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
CONFIG_ARM_GIC_V3_ITS_PCI=y
|
||||
CONFIG_ARM_PMU=y
|
||||
# CONFIG_ARM_PSCI_CPUIDLE is not set
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
# CONFIG_ARM_QCOM_CPUFREQ_KRYO is not set
|
||||
# CONFIG_ARM_QCOM_CPUFREQ_HW is not set
|
||||
# CONFIG_ARM_QCOM_CPUFREQ_NVMEM is not set
|
||||
# CONFIG_ARM_SCMI_PROTOCOL is not set
|
||||
# CONFIG_ARM_SP805_WATCHDOG is not set
|
||||
CONFIG_ASN1=y
|
||||
CONFIG_ASSOCIATIVE_ARRAY=y
|
||||
CONFIG_ASYMMETRIC_KEY_TYPE=y
|
||||
@ -109,8 +121,11 @@ CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_MQ_VIRTIO=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BLOCK_COMPAT=y
|
||||
CONFIG_BUILD_BIN2C=y
|
||||
# CONFIG_CAVIUM_TX2_ERRATUM_219 is not set
|
||||
CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED=y
|
||||
CONFIG_CC_HAS_KASAN_GENERIC=y
|
||||
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_CLEANCACHE=y
|
||||
@ -130,7 +145,6 @@ CONFIG_COREDUMP=y
|
||||
CONFIG_CORESIGHT=y
|
||||
# CONFIG_CORESIGHT_CATU is not set
|
||||
# CONFIG_CORESIGHT_CPU_DEBUG is not set
|
||||
# CONFIG_CORESIGHT_DYNAMIC_REPLICATOR is not set
|
||||
CONFIG_CORESIGHT_LINKS_AND_SINKS=y
|
||||
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
|
||||
# CONFIG_CORESIGHT_SINK_ETBV10 is not set
|
||||
@ -139,7 +153,6 @@ CONFIG_CORESIGHT_SOURCE_ETM4X=y
|
||||
CONFIG_CORESIGHT_STM=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
|
||||
@ -150,7 +163,6 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
@ -188,10 +200,12 @@ CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_KPP2=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
|
||||
# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set
|
||||
CONFIG_CRYPTO_NULL=y
|
||||
CONFIG_CRYPTO_NULL2=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
@ -200,20 +214,22 @@ CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_WORKQUEUE=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEBUG_GPIO=y
|
||||
CONFIG_DECOMPRESS_GZIP=y
|
||||
CONFIG_DEVMEM=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_DIRECT_OPS=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DMI=y
|
||||
CONFIG_DMIID=y
|
||||
# CONFIG_DMI_SYSFS is not set
|
||||
CONFIG_DRM_RCAR_WRITEBACK=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DT_IDLE_STATES=y
|
||||
CONFIG_DYNAMIC_DEBUG=y
|
||||
@ -223,6 +239,7 @@ CONFIG_EFIVAR_FS=m
|
||||
CONFIG_EFI_ARMSTUB=y
|
||||
CONFIG_EFI_ARMSTUB_DTB_LOADER=y
|
||||
# CONFIG_EFI_CAPSULE_LOADER is not set
|
||||
CONFIG_EFI_EARLYCON=y
|
||||
CONFIG_EFI_ESRT=y
|
||||
CONFIG_EFI_PARAMS_FROM_FDT=y
|
||||
CONFIG_EFI_RUNTIME_WRAPPERS=y
|
||||
@ -237,11 +254,16 @@ CONFIG_FB_CMDLINE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
# CONFIG_FLATMEM_MANUAL is not set
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_AUTOSELECT=y
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FRAME_WARN=2048
|
||||
CONFIG_FREEZER=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
# CONFIG_FUJITSU_ERRATUM_010001 is not set
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
@ -252,6 +274,7 @@ CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
@ -284,22 +307,27 @@ CONFIG_HAVE_ARCH_AUDITSYSCALL=y
|
||||
CONFIG_HAVE_ARCH_BITREVERSE=y
|
||||
CONFIG_HAVE_ARCH_HUGE_VMAP=y
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL=y
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y
|
||||
CONFIG_HAVE_ARCH_KASAN=y
|
||||
CONFIG_HAVE_ARCH_KASAN_SW_TAGS=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y
|
||||
CONFIG_HAVE_ARCH_PFN_VALID=y
|
||||
CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y
|
||||
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
|
||||
CONFIG_HAVE_ARCH_STACKLEAK=y
|
||||
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_HAVE_ARCH_VMAP_STACK=y
|
||||
CONFIG_HAVE_ARM_SMCCC=y
|
||||
CONFIG_HAVE_ASM_MODVERSIONS=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
CONFIG_HAVE_CLK_PREPARE=y
|
||||
CONFIG_HAVE_CMPXCHG_DOUBLE=y
|
||||
CONFIG_HAVE_CMPXCHG_LOCAL=y
|
||||
CONFIG_HAVE_CONTEXT_TRACKING=y
|
||||
CONFIG_HAVE_COPY_THREAD_TLS=y
|
||||
CONFIG_HAVE_C_RECORDMCOUNT=y
|
||||
CONFIG_HAVE_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
||||
@ -307,18 +335,20 @@ CONFIG_HAVE_DMA_CONTIGUOUS=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_EBPF_JIT=y
|
||||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||
CONFIG_HAVE_FAST_GUP=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y
|
||||
CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_GENERIC_GUP=y
|
||||
CONFIG_HAVE_GENERIC_VDSO=y
|
||||
CONFIG_HAVE_HW_BREAKPOINT=y
|
||||
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_HAVE_MEMBLOCK=y
|
||||
CONFIG_HAVE_MEMORY_PRESENT=y
|
||||
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
CONFIG_HAVE_PATA_PLATFORM=y
|
||||
CONFIG_HAVE_PCI=y
|
||||
CONFIG_HAVE_PERF_EVENTS=y
|
||||
CONFIG_HAVE_PERF_REGS=y
|
||||
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
|
||||
@ -331,10 +361,11 @@ CONFIG_HAVE_UID16=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_HOLES_IN_ZONE=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
# CONFIG_HUGETLBFS is not set
|
||||
CONFIG_HWSPINLOCK=y
|
||||
CONFIG_HWSPINLOCK_QCOM=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ=250
|
||||
CONFIG_HZ_250=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
@ -342,12 +373,11 @@ CONFIG_I2C_COMPAT=y
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_I2C_QUP=y
|
||||
CONFIG_IIO=y
|
||||
# CONFIG_IIO_BUFFER is not set
|
||||
# CONFIG_IIO_TRIGGER is not set
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_IONIC is not set
|
||||
# CONFIG_IPQ_GCC_4019 is not set
|
||||
# CONFIG_IPQ_GCC_806X is not set
|
||||
CONFIG_IPQ_GCC_8074=y
|
||||
@ -361,6 +391,7 @@ CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_KEYS_COMPAT=y
|
||||
# CONFIG_KPSS_XCC is not set
|
||||
# CONFIG_KVM is not set
|
||||
CONFIG_LEDS_TLC591XX=y
|
||||
CONFIG_LIBFDT=y
|
||||
@ -407,10 +438,10 @@ CONFIG_MPILIB=y
|
||||
# CONFIG_MSM_MMCC_8974 is not set
|
||||
# CONFIG_MSM_MMCC_8996 is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_M25P80=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
CONFIG_MTD_NAND_QCOM=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_FIRMWARE=y
|
||||
CONFIG_MTD_SPLIT_FIT_FW=y
|
||||
@ -428,15 +459,15 @@ CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
# CONFIG_NET_VENDOR_CAVIUM is not set
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NO_BOOTMEM=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
# CONFIG_NUMA is not set
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVME_CORE=y
|
||||
# CONFIG_NVME_MULTIPATH is not set
|
||||
# CONFIG_NVME_TCP is not set
|
||||
# CONFIG_OCTEONTX2_AF is not set
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
@ -446,13 +477,13 @@ CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_OF_RESERVED_MEM=y
|
||||
CONFIG_OID_REGISTRY=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PANIC_TIMEOUT=5
|
||||
CONFIG_PARTITION_PERCPU=y
|
||||
CONFIG_PCI=y
|
||||
# CONFIG_PCIE_AL is not set
|
||||
CONFIG_PCIE_DW=y
|
||||
CONFIG_PCIE_DW_HOST=y
|
||||
CONFIG_PCIE_QCOM=y
|
||||
@ -467,9 +498,11 @@ CONFIG_PHYLIB=y
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
# CONFIG_PHY_QCOM_APQ8064_SATA is not set
|
||||
# CONFIG_PHY_QCOM_IPQ806X_SATA is not set
|
||||
# CONFIG_PHY_QCOM_QMP is not set
|
||||
# CONFIG_PHY_QCOM_PCIE2 is not set
|
||||
CONFIG_PHY_QCOM_QMP=y
|
||||
# CONFIG_PHY_QCOM_QUSB2 is not set
|
||||
# CONFIG_PHY_QCOM_UFS is not set
|
||||
CONFIG_PID_IN_CONTEXTIDR=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_APQ8064 is not set
|
||||
# CONFIG_PINCTRL_APQ8084 is not set
|
||||
@ -486,10 +519,15 @@ CONFIG_PINCTRL_MSM=y
|
||||
# CONFIG_PINCTRL_MSM8998 is not set
|
||||
CONFIG_PINCTRL_QCOM_SPMI_PMIC=y
|
||||
# CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set
|
||||
# CONFIG_PINCTRL_QCS404 is not set
|
||||
# CONFIG_PINCTRL_SC7180 is not set
|
||||
# CONFIG_PINCTRL_SDM660 is not set
|
||||
# CONFIG_PINCTRL_SDM845 is not set
|
||||
# CONFIG_PINCTRL_SM8150 is not set
|
||||
# CONFIG_PKCS8_PRIVATE_KEY_PARSER is not set
|
||||
CONFIG_PM=y
|
||||
# CONFIG_PM8916_WATCHDOG is not set
|
||||
CONFIG_PM_CLK=y
|
||||
# CONFIG_PM_DEBUG is not set
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_PM_SLEEP=y
|
||||
CONFIG_PM_SLEEP_SMP=y
|
||||
@ -499,6 +537,7 @@ CONFIG_POWER_RESET_MSM=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_PREEMPTION=y
|
||||
CONFIG_PREEMPT_COUNT=y
|
||||
# CONFIG_PREEMPT_NONE is not set
|
||||
CONFIG_PREEMPT_RCU=y
|
||||
@ -509,31 +548,53 @@ CONFIG_PTP_1588_CLOCK=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
CONFIG_QCOM_A53PLL=y
|
||||
# CONFIG_QCOM_AOSS_QMP is not set
|
||||
# CONFIG_QCOM_APCS_IPC is not set
|
||||
# CONFIG_QCOM_APR is not set
|
||||
CONFIG_QCOM_BAM_DMA=y
|
||||
# CONFIG_QCOM_CLK_RPM is not set
|
||||
# CONFIG_QCOM_COINCELL is not set
|
||||
# CONFIG_QCOM_COMMAND_DB is not set
|
||||
CONFIG_QCOM_EBI2=y
|
||||
# CONFIG_QCOM_FASTRPC is not set
|
||||
# CONFIG_QCOM_GENI_SE is not set
|
||||
# CONFIG_QCOM_GLINK_SSR is not set
|
||||
CONFIG_QCOM_GSBI=y
|
||||
# CONFIG_QCOM_HFPLL is not set
|
||||
# CONFIG_QCOM_LLCC is not set
|
||||
CONFIG_QCOM_MDT_LOADER=y
|
||||
# CONFIG_QCOM_PDC is not set
|
||||
# CONFIG_QCOM_Q6V5_ADSP is not set
|
||||
CONFIG_QCOM_Q6V5_COMMON=y
|
||||
# CONFIG_QCOM_Q6V5_MSS is not set
|
||||
# CONFIG_QCOM_Q6V5_PAS is not set
|
||||
CONFIG_QCOM_Q6V5_WCSS=y
|
||||
CONFIG_QCOM_QFPROM=y
|
||||
CONFIG_QCOM_QMI_HELPERS=y
|
||||
# CONFIG_QCOM_RMTFS_MEM is not set
|
||||
# CONFIG_QCOM_RPMH is not set
|
||||
CONFIG_QCOM_RPROC_COMMON=y
|
||||
CONFIG_QCOM_SCM=y
|
||||
CONFIG_QCOM_SCM_64=y
|
||||
# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
|
||||
# CONFIG_QCOM_SMD_RPM is not set
|
||||
CONFIG_QCOM_SMEM=y
|
||||
CONFIG_QCOM_SMEM_STATE=y
|
||||
CONFIG_QCOM_SMP2P=y
|
||||
# CONFIG_QCOM_SMSM is not set
|
||||
# CONFIG_QCOM_SOCINFO is not set
|
||||
CONFIG_QCOM_SPMI_VADC=y
|
||||
CONFIG_QCOM_SYSMON=y
|
||||
CONFIG_QCOM_TSENS=y
|
||||
CONFIG_QCOM_VADC_COMMON=y
|
||||
# CONFIG_QCOM_WCNSS_CTRL is not set
|
||||
# CONFIG_QCOM_WCNSS_PIL is not set
|
||||
CONFIG_QCOM_WDT=y
|
||||
# CONFIG_QCS_GCC_404 is not set
|
||||
# CONFIG_QCS_TURING_404 is not set
|
||||
# CONFIG_QRTR is not set
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
# CONFIG_RANDOMIZE_BASE is not set
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_RCU_CPU_STALL_TIMEOUT=21
|
||||
# CONFIG_RCU_EXPERT is not set
|
||||
@ -556,25 +617,32 @@ CONFIG_REMOTEPROC=y
|
||||
# CONFIG_RESET_ATTACK_MITIGATION is not set
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_RESET_QCOM_AOSS is not set
|
||||
# CONFIG_RESET_QCOM_PDC is not set
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
||||
CONFIG_RPMSG=y
|
||||
# CONFIG_RPMSG_CHAR is not set
|
||||
# CONFIG_RPMSG_QCOM_GLINK_SMEM is not set
|
||||
# CONFIG_RPMSG_QCOM_SMD is not set
|
||||
CONFIG_RPMSG_QCOM_SMD=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
# CONFIG_RTC_DRV_EFI is not set
|
||||
# CONFIG_RTC_DRV_PM8XXX is not set
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
# CONFIG_SDM_CAMCC_845 is not set
|
||||
# CONFIG_SDM_DISPCC_845 is not set
|
||||
# CONFIG_SDM_GCC_660 is not set
|
||||
# CONFIG_SDM_GCC_845 is not set
|
||||
# CONFIG_SDM_GPUCC_845 is not set
|
||||
# CONFIG_SDM_LPASSCC_845 is not set
|
||||
# CONFIG_SDM_VIDEOCC_845 is not set
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
# CONFIG_SERIAL_AMBA_PL011 is not set
|
||||
CONFIG_SERIAL_MSM=y
|
||||
CONFIG_SERIAL_MSM_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
# CONFIG_SM_GCC_8150 is not set
|
||||
CONFIG_SND=y
|
||||
# CONFIG_SND_COMPRESS_OFFLOAD is not set
|
||||
CONFIG_SND_JACK=y
|
||||
@ -604,6 +672,8 @@ CONFIG_SPMI_MSM_PMIC_ARB=y
|
||||
CONFIG_SRCU=y
|
||||
# CONFIG_STAGING is not set
|
||||
CONFIG_STM=y
|
||||
# CONFIG_STM_PROTO_BASIC is not set
|
||||
# CONFIG_STM_PROTO_SYS_T is not set
|
||||
# CONFIG_STM_SOURCE_HEARTBEAT is not set
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_SUSPEND=y
|
||||
@ -632,6 +702,7 @@ CONFIG_UBIFS_FS=y
|
||||
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
|
||||
CONFIG_UBIFS_FS_LZO=y
|
||||
CONFIG_UBIFS_FS_ZLIB=y
|
||||
CONFIG_UBIFS_FS_ZSTD=y
|
||||
CONFIG_UCS2_STRING=y
|
||||
CONFIG_UEVENT_HELPER_PATH=""
|
||||
CONFIG_UNINLINE_SPIN_UNLOCK=y
|
||||
@ -649,8 +720,11 @@ CONFIG_WATCHDOG_CORE=y
|
||||
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
|
||||
CONFIG_X509_CERTIFICATE_PARSER=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZONE_DMA32=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
|
Loading…
Reference in New Issue
Block a user