From 507257778c733749816a8ca611f072d07916a918 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Sun, 30 May 2021 19:38:45 +0200 Subject: [PATCH 01/11] glibc: update to latest 2.33 HEAD (BZ #27892) 0ef0e6de7f powerpc: Fix handling of scv return error codes [BZ #27892] Signed-off-by: Hans Dedecker --- toolchain/glibc/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index 16f03c3c29..b88a456ce7 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -12,8 +12,8 @@ PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=3f5080aedd164c1f92a53552dd3e0b82ac6d2bd3 -PKG_MIRROR_HASH:=93b1f5dad3deeca05c4a897aa553f0f4423cde68c5640cc333166dc78d112bf4 +PKG_SOURCE_VERSION:=0ef0e6de7fdfa18328b09ba2afb4f0112d4bdab4 +PKG_MIRROR_HASH:=1f2cfa8bd69f6286f2449317758e3ef29fc55cd420dfe8cd9327f149b0e9ac62 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz From 9bda91d805b02ba3d3a6481bee31f4569e3c2324 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 1 Jun 2021 23:19:48 +0200 Subject: [PATCH 02/11] kernel: backport fix for hang on napi_disable with threaded NAPI Signed-off-by: Felix Fietkau --- ...up-on-napi_disable-for-threaded-napi.patch | 53 +++++++++++++++++++ ...T-skip-GRO-for-foreign-MAC-addresses.patch | 8 +-- 2 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch diff --git a/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch b/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch new file mode 100644 index 0000000000..4b83641291 --- /dev/null +++ b/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch @@ -0,0 +1,53 @@ +From: Paolo Abeni +Date: Fri, 9 Apr 2021 17:24:17 +0200 +Subject: [PATCH] net: fix hangup on napi_disable for threaded napi + +napi_disable() is subject to an hangup, when the threaded +mode is enabled and the napi is under heavy traffic. + +If the relevant napi has been scheduled and the napi_disable() +kicks in before the next napi_threaded_wait() completes - so +that the latter quits due to the napi_disable_pending() condition, +the existing code leaves the NAPI_STATE_SCHED bit set and the +napi_disable() loop waiting for such bit will hang. + +This patch addresses the issue by dropping the NAPI_STATE_DISABLE +bit test in napi_thread_wait(). The later napi_threaded_poll() +iteration will take care of clearing the NAPI_STATE_SCHED. + +This also addresses a related problem reported by Jakub: +before this patch a napi_disable()/napi_enable() pair killed +the napi thread, effectively disabling the threaded mode. +On the patched kernel napi_disable() simply stops scheduling +the relevant thread. + +v1 -> v2: + - let the main napi_thread_poll() loop clear the SCHED bit + +Reported-by: Jakub Kicinski +Fixes: 29863d41bb6e ("net: implement threaded-able napi poll loop support") +Signed-off-by: Paolo Abeni +Reviewed-by: Eric Dumazet +Link: https://lore.kernel.org/r/883923fa22745a9589e8610962b7dc59df09fb1f.1617981844.git.pabeni@redhat.com +Signed-off-by: Jakub Kicinski +--- + +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -6951,7 +6951,7 @@ static int napi_thread_wait(struct napi_ + + set_current_state(TASK_INTERRUPTIBLE); + +- while (!kthread_should_stop() && !napi_disable_pending(napi)) { ++ while (!kthread_should_stop()) { + /* Testing SCHED_THREADED bit here to make sure the current + * kthread owns this napi and could poll on this napi. + * Testing SCHED bit is not enough because SCHED bit might be +@@ -6969,6 +6969,7 @@ static int napi_thread_wait(struct napi_ + set_current_state(TASK_INTERRUPTIBLE); + } + __set_current_state(TASK_RUNNING); ++ + return -1; + } + diff --git a/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 8b5ec9c305..3b485e3cc9 100644 --- a/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -7986,6 +7989,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7987,6 +7990,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -8037,6 +8082,7 @@ static int __netdev_upper_dev_link(struc +@@ -8038,6 +8083,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -8133,6 +8179,7 @@ static void __netdev_upper_dev_unlink(st +@@ -8134,6 +8180,7 @@ static void __netdev_upper_dev_unlink(st __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -8919,6 +8966,7 @@ int dev_set_mac_address(struct net_devic +@@ -8920,6 +8967,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; From 3518b793a2f2293e7e9124b5beae7b09887c5e32 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 2 Jun 2021 07:42:40 +0200 Subject: [PATCH 03/11] mac80211: fix detecting VHT capabilities when generating the default config The colon does not directly follow the "VHT Capabilities" string Reported-by: John Thomson Signed-off-by: Felix Fietkau --- package/kernel/mac80211/files/lib/wifi/mac80211.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh index 0763da8fd8..f5d4f2e90a 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -92,7 +92,7 @@ $0 ~ "Capabilities:" { ht=1 } -$0 ~ "VHT Capabilities:" { +$0 ~ "VHT Capabilities" { vht=1 } From 42a99b18ff23fa768a6ae5f1076f15cbfa494f24 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 2 Jun 2021 07:45:31 +0200 Subject: [PATCH 04/11] mac80211: do not enable VHT in the default config on 2.4 GHz Some drivers advertise it, but it's not supported at the moment Reported-by: John Thomson Signed-off-by: Felix Fietkau --- package/kernel/mac80211/files/lib/wifi/mac80211.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh index f5d4f2e90a..02eabd0506 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -70,7 +70,7 @@ BEGIN { if (channel) { mode="NOHT" if (ht) mode="HT20" - if (vht) mode="VHT80" + if (vht && band != "1:")) mode="VHT80" if (he) mode="HE80" if (he && band == "1:") mode="HE20" sub("\\[", "", channel) From 46509a51dd63aa49648ad0f130461817f43532d0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 26 May 2021 13:04:50 +0200 Subject: [PATCH 05/11] hostapd: add support for configuring the beacon rate Signed-off-by: Felix Fietkau --- package/network/services/hostapd/files/hostapd.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 5e9678eef6..4c4cb3f4b1 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -91,6 +91,7 @@ hostapd_add_log_config() { hostapd_common_add_device_config() { config_add_array basic_rate config_add_array supported_rates + config_add_string beacon_rate config_add_string country config_add_boolean country_ie doth @@ -117,7 +118,7 @@ hostapd_prepare_device_config() { 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 airtime_mode cell_density \ - rts_threshold + rts_threshold beacon_rate hostapd_set_log_options base_cfg @@ -208,6 +209,7 @@ hostapd_prepare_device_config() { hostapd_add_rate brlist "$br" done + [ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N" [ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" [ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" append base_cfg "beacon_int=$beacon_int" "$N" From 190d4b6184ef3a5212a6d6fb9d3d8847035b7d0a Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 26 May 2021 13:34:41 +0200 Subject: [PATCH 06/11] hostapd: add configurable rssi thresholds for rejecting assoc/probe requests Signed-off-by: Felix Fietkau --- package/network/services/hostapd/files/hostapd.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 4c4cb3f4b1..13699bf673 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -101,6 +101,8 @@ hostapd_common_add_device_config() { config_add_boolean legacy_rates config_add_int cell_density config_add_int rts_threshold + config_add_int rssi_reject_assoc_rssi + config_add_int rssi_ignore_probe_request config_add_string acs_chan_bias config_add_array hostapd_options @@ -118,7 +120,7 @@ hostapd_prepare_device_config() { 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 airtime_mode cell_density \ - rts_threshold beacon_rate + rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request hostapd_set_log_options base_cfg @@ -209,6 +211,8 @@ hostapd_prepare_device_config() { hostapd_add_rate brlist "$br" done + [ -n "$rssi_reject_assoc_rssi" ] && append base_cfg "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N" + [ -n "$rssi_ignore_probe_request" ] && append base_cfg "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N" [ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N" [ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" [ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" From e309b57619b9c073b9b8857858d9456183f27d7d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 26 May 2021 13:50:43 +0200 Subject: [PATCH 07/11] hostapd: add support for configuring proxy ARP Signed-off-by: Felix Fietkau --- package/network/services/hostapd/files/hostapd.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 13699bf673..8d12683a39 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -341,7 +341,7 @@ hostapd_common_add_bss_config() { config_add_array airtime_sta_weight config_add_int airtime_bss_weight airtime_bss_limit - config_add_boolean multicast_to_unicast per_sta_vif + config_add_boolean multicast_to_unicast proxy_arp per_sta_vif config_add_array hostapd_bss_options @@ -518,7 +518,7 @@ hostapd_set_bss_options() { bss_load_update_period chan_util_avg_period sae_require_mfp \ multi_ap multi_ap_backhaul_ssid multi_ap_backhaul_key skip_inactivity_poll \ airtime_bss_weight airtime_bss_limit airtime_sta_weight \ - multicast_to_unicast per_sta_vif + multicast_to_unicast proxy_arp per_sta_vif set_default isolate 0 set_default maxassoc 0 @@ -997,6 +997,10 @@ hostapd_set_bss_options() { if [ "$multicast_to_unicast" -gt 0 ]; then append bss_conf "multicast_to_unicast=$multicast_to_unicast" "$N" fi + set_default proxy_arp 0 + if [ "$proxy_arp" -gt 0 ]; then + append bss_conf "proxy_arp=$proxy_arp" "$N" + fi set_default per_sta_vif 0 if [ "$per_sta_vif" -gt 0 ]; then From ec223cf7246d3134f92974be2608ffe8ae8e46c2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 26 May 2021 14:34:46 +0200 Subject: [PATCH 08/11] hostapd: add support for specifying the maxassoc parameter as a device option It allows enforcing a limit on associated stations to be enforced for the full device, e.g. in order to deal with hardware/driver limitations Signed-off-by: Felix Fietkau --- .../network/services/hostapd/files/hostapd.sh | 4 +- .../patches/720-iface_max_num_sta.patch | 82 +++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 package/network/services/hostapd/patches/720-iface_max_num_sta.patch diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 8d12683a39..9993bc9047 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -103,6 +103,7 @@ hostapd_common_add_device_config() { config_add_int rts_threshold config_add_int rssi_reject_assoc_rssi config_add_int rssi_ignore_probe_request + config_add_int maxassoc config_add_string acs_chan_bias config_add_array hostapd_options @@ -120,7 +121,7 @@ hostapd_prepare_device_config() { 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 airtime_mode cell_density \ - rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request + rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc hostapd_set_log_options base_cfg @@ -220,6 +221,7 @@ hostapd_prepare_device_config() { [ -n "$rts_threshold" ] && append base_cfg "rts_threshold=$rts_threshold" "$N" append base_cfg "dtim_period=$dtim_period" "$N" [ "$airtime_mode" -gt 0 ] && append base_cfg "airtime_mode=$airtime_mode" "$N" + [ -n "$maxassoc" ] && append base_cfg "iface_max_num_sta=$maxassoc" "$N" json_get_values opts hostapd_options for val in $opts; do diff --git a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch new file mode 100644 index 0000000000..b93a0bcbef --- /dev/null +++ b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch @@ -0,0 +1,82 @@ +--- a/hostapd/config_file.c ++++ b/hostapd/config_file.c +@@ -2873,6 +2873,14 @@ static int hostapd_config_fill(struct ho + line, bss->max_num_sta, MAX_STA_COUNT); + return 1; + } ++ } else if (os_strcmp(buf, "iface_max_num_sta") == 0) { ++ conf->max_num_sta = atoi(pos); ++ if (conf->max_num_sta < 0 || ++ conf->max_num_sta > MAX_STA_COUNT) { ++ wpa_printf(MSG_ERROR, "Line %d: Invalid max_num_sta=%d; allowed range 0..%d", ++ line, conf->max_num_sta, MAX_STA_COUNT); ++ return 1; ++ } + } else if (os_strcmp(buf, "wpa") == 0) { + bss->wpa = atoi(pos); + } else if (os_strcmp(buf, "extended_key_id") == 0) { +--- a/src/ap/hostapd.h ++++ b/src/ap/hostapd.h +@@ -648,6 +648,7 @@ void hostapd_cleanup_cs_params(struct ho + void hostapd_periodic_iface(struct hostapd_iface *iface); + int hostapd_owe_trans_get_info(struct hostapd_data *hapd); + void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx); ++int hostapd_check_max_sta(struct hostapd_data *hapd); + + /* utils.c */ + int hostapd_register_probereq_cb(struct hostapd_data *hapd, +--- a/src/ap/hostapd.c ++++ b/src/ap/hostapd.c +@@ -236,6 +236,30 @@ static int hostapd_iface_conf_changed(st + } + + ++static inline int hostapd_iface_num_sta(struct hostapd_iface *iface) ++{ ++ int num_sta = 0; ++ int i; ++ ++ for (i = 0; i < iface->num_bss; i++) ++ num_sta += iface->bss[i]->num_sta; ++ ++ return num_sta; ++} ++ ++ ++int hostapd_check_max_sta(struct hostapd_data *hapd) ++{ ++ if (hapd->num_sta >= hapd->conf->max_num_sta) ++ return 1; ++ ++ if (hapd->iconf->max_num_sta && ++ hostapd_iface_num_sta(hapd->iface) >= hapd->iconf->max_num_sta) ++ return 1; ++ ++ return 0; ++} ++ + int hostapd_reload_config(struct hostapd_iface *iface, int reconf) + { + struct hapd_interfaces *interfaces = iface->interfaces; +--- a/src/ap/beacon.c ++++ b/src/ap/beacon.c +@@ -1039,7 +1039,7 @@ void handle_probe_req(struct hostapd_dat + if (hapd->conf->no_probe_resp_if_max_sta && + is_multicast_ether_addr(mgmt->da) && + is_multicast_ether_addr(mgmt->bssid) && +- hapd->num_sta >= hapd->conf->max_num_sta && ++ hostapd_check_max_sta(hapd) && + !ap_get_sta(hapd, mgmt->sa)) { + wpa_printf(MSG_MSGDUMP, "%s: Ignore Probe Request from " MACSTR + " since no room for additional STA", +--- a/src/ap/ap_config.h ++++ b/src/ap/ap_config.h +@@ -976,6 +976,8 @@ struct hostapd_config { + unsigned int track_sta_max_num; + unsigned int track_sta_max_age; + ++ int max_num_sta; ++ + char country[3]; /* first two octets: country code as described in + * ISO/IEC 3166-1. Third octet: + * ' ' (ascii 32): all environments From 704ab6a002172e76d41612f6d07ff179ef035d10 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 27 May 2021 13:15:40 +0200 Subject: [PATCH 09/11] hostapd: add default values for r0kh/r1kh This allows WPA enterprise roaming in the same mobility domain without any manual key configuration (aside from radius credentials) Signed-off-by: Felix Fietkau --- package/network/services/hostapd/files/hostapd.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 9993bc9047..687a8d950a 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -812,6 +812,13 @@ hostapd_set_bss_options() { set_default r0_key_lifetime 10000 set_default pmk_r1_push 0 + [ -n "$r0kh" -a -n "$r1kh" ] || { + key=`echo -n "$mobility_domain/$auth_secret" | md5sum | awk '{print $1}'` + + set_default r0kh "ff:ff:ff:ff:ff:ff,*,$key" + set_default r1kh "00:00:00:00:00:00,00:00:00:00:00:00,$key" + } + [ -n "$r1_key_holder" ] && append bss_conf "r1_key_holder=$r1_key_holder" "$N" append bss_conf "r0_key_lifetime=$r0_key_lifetime" "$N" append bss_conf "pmk_r1_push=$pmk_r1_push" "$N" From 98621c97822eb20a80ab2248a253972051ea6f08 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 6 Apr 2021 14:59:41 +0200 Subject: [PATCH 10/11] hostapd: add eap_server support This makes it possible to avoid using a RADIUS server for WPA enterprise authentication Signed-off-by: John Crispin Signed-off-by: Felix Fietkau --- .../network/services/hostapd/files/hostapd.sh | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 687a8d950a..7981f02ed6 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -350,6 +350,9 @@ hostapd_common_add_bss_config() { config_add_boolean request_cui config_add_array radius_auth_req_attr config_add_array radius_acct_req_attr + + config_add_int eap_server + config_add_string eap_user_file ca_cert server_cert private_key private_key_passwd server_id } hostapd_set_vlan_file() { @@ -520,7 +523,8 @@ hostapd_set_bss_options() { bss_load_update_period chan_util_avg_period sae_require_mfp \ multi_ap multi_ap_backhaul_ssid multi_ap_backhaul_key skip_inactivity_poll \ airtime_bss_weight airtime_bss_limit airtime_sta_weight \ - multicast_to_unicast proxy_arp per_sta_vif + multicast_to_unicast proxy_arp per_sta_vif \ + eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id set_default isolate 0 set_default maxassoc 0 @@ -541,6 +545,7 @@ hostapd_set_bss_options() { set_default multi_ap 0 set_default airtime_bss_weight 0 set_default airtime_bss_limit 0 + set_default eap_server 0 append bss_conf "ctrl_interface=/var/run/hostapd" if [ "$isolate" -gt 0 ]; then @@ -654,9 +659,11 @@ hostapd_set_bss_options() { set_default dae_port 3799 set_default request_cui 0 - append bss_conf "auth_server_addr=$auth_server" "$N" - append bss_conf "auth_server_port=$auth_port" "$N" - append bss_conf "auth_server_shared_secret=$auth_secret" "$N" + [ "$eap_server" -eq 0 ] && { + append bss_conf "auth_server_addr=$auth_server" "$N" + append bss_conf "auth_server_port=$auth_port" "$N" + append bss_conf "auth_server_shared_secret=$auth_secret" "$N" + } [ "$request_cui" -gt 0 ] && append bss_conf "radius_request_cui=$request_cui" "$N" [ -n "$eap_reauth_period" ] && append bss_conf "eap_reauth_period=$eap_reauth_period" "$N" @@ -1002,6 +1009,16 @@ hostapd_set_bss_options() { json_for_each_item append_operator_icon operator_icon fi + if [ "$eap_server" = "1" ]; then + append bss_conf "eap_server=1" "$N" + [ -n "$eap_user_file" ] && append bss_conf "eap_user_file=$eap_user_file" "$N" + [ -n "$ca_cert" ] && append bss_conf "ca_cert=$ca_cert" "$N" + [ -n "$server_cert" ] && append bss_conf "server_cert=$server_cert" "$N" + [ -n "$private_key" ] && append bss_conf "private_key=$private_key" "$N" + [ -n "$private_key_passwd" ] && append bss_conf "private_key_passwd=$private_key_passwd" "$N" + [ -n "$server_id" ] && append bss_conf "server_id=$server_id" "$N" + fi + set_default multicast_to_unicast 0 if [ "$multicast_to_unicast" -gt 0 ]; then append bss_conf "multicast_to_unicast=$multicast_to_unicast" "$N" From b474142fa834e7c3d34a25ab7a46e1e2bc6c0c16 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 2 Jun 2021 08:49:19 +0200 Subject: [PATCH 11/11] mt76: update to the latest version bddc1db76d0f mt76: mt7915: drop the use of repeater entries for station interfaces 3c90f35dddac mt76: mt7915: add thermal sensor device support afab0e8202ff mt76: mt7915: add thermal cooling device support 41cf02184699 mt76: mt7615: add thermal sensor device support 2ac6b8762565 mt76: connac: update BA win size in Rx direction ddb301127291 mt76: mt7921: fix reset under the deep sleep is enabled e4cbefd1d69a mt76: mt7921: avoid unnecessary consecutive WiFi resets 393eea2034d7 mt76: mt7921: fix invalid register access in wake_work a15d46407ffa mt76: mt7921: fix OMAC idx usage e4d267d8e900 mt76: mt7921: enable runtime pm by default 50fd8ce2412a mt76: connac: add bss color support for sta mode e29058c3c860 mt76: mt7921: return proper error value in mt7921_mac_init c89c8c347b1e mt76: mt7921: do not schedule hw reset if the device is not running 9f7bb428e587 mt76: mt7921: reset wfsys during hw probe 22ea365913b5 mt76: mt7915: add .offset_tsf callback ad91f8e8e494 mt76: mt7615: add .offset_tsf callback 6f871f35e3c1 mt76: mt7915: use mt7915_mcu_get_txpower_sku() to get per-rate txpower 597b68b7daa3 mt76: mt7615: remove useless if condition in mt7615_add_interface() 3945264468eb mt76: testmode: fix memory leak in mt76_testmode_alloc_skb bdcc57a11606 mt76: testmode: remove unnecessary function calls in mt76_testmode_free_skb a9763452601d mt76: testmode: remove undefined behaviour in mt76_testmode_alloc_skb 4aef2a2be464 mt76: mt7615: fix potential overflow on large shift d9dd7635b055 mt76: mt7915: use mt7915_mcu_get_mib_info() to get survey data d740e921758a mt76: mt7921: introduce mac tx done handling 259ddfc7cb73 mt76: mt7921: update statistic in active mode only 757b93f4b179 mt76: mt7921: remove leftover 80+80 HE capability 1fcff599b2e1 mt76: allow hw driver code to overwrite wiphy interface_modes c55c22e39b7d mt7915: update firmware to 2020110522 10548aef1f45 mt76: mt7915: improve error recovery reliability ed6b0c79820c mt76: mt7921: set MT76_RESET during mac reset 321443258bea mt76: move mt76_rates in mt76 module d1652e8af9e1 Revert "mt76: connac: do not schedule wake_work if the runtime-pm is disabled" 4f4cab39ed9f mt76: mt7915: read all eeprom fields from fw in efuse mode 71450535f164 mt76: mt7921: enable hw offloading for wep keys 833d577e430c mt76: mt7921: remove mt7921_get_wtbl_info routine 67b7a22d2b99 mt76: mt7921: enable random mac address during sched_scan cf1ff7bf4f1b mt76: mt7915: setup drr group for peers ef2f7aa8745f mt76: mt7615: update radar parameters b9f09f530223 mt76: mt7915: fix MT_EE_CAL_GROUP_SIZE Signed-off-by: Felix Fietkau --- package/kernel/mt76/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 5104c3ec53..8a98c4bfc0 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-05-15 -PKG_SOURCE_VERSION:=9d736545bb5ac9707e60b7900b7d6b290492e24d -PKG_MIRROR_HASH:=8fd98f488579c18cfd8c442cff1796dcd70e2ecbc59c5d5b92ee8c0f06efafcf +PKG_SOURCE_DATE:=2021-06-02 +PKG_SOURCE_VERSION:=b9f09f530223893c0880c3b08fdb2afe55d152e1 +PKG_MIRROR_HASH:=4a8a8189c70d2f169ec69484c74af9221c1c3b62932624b049f3b23988f11d89 PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 @@ -155,7 +155,7 @@ define KernelPackage/mt7615-common $(KernelPackage/mt76-default) TITLE:=MediaTek MT7615 wireless driver common code HIDDEN:=1 - DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac + DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core FILES:= $(PKG_BUILD_DIR)/mt7615/mt7615-common.ko endef @@ -213,7 +213,7 @@ endef define KernelPackage/mt7915e $(KernelPackage/mt76-default) TITLE:=MediaTek MT7915e wireless driver - DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +@DRIVER_11AX_SUPPORT + DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +@DRIVER_11AX_SUPPORT FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko AUTOLOAD:=$(call AutoProbe,mt7915e) endef