23.05: update to latest release branch

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2023-09-07 05:57:59 +02:00
parent 6517fff793
commit eef130b2fe
7 changed files with 1173 additions and 1489 deletions

View File

@@ -1,6 +1,6 @@
repo: https://github.com/openwrt/openwrt.git
branch: openwrt-23.05
revision: a4792d79e899b28cefdb6d54c43cf0c13a9646e5
revision: cdc8470aecd03e6994714af092f030f209951de4
output_dir: ./output
patch_folders:

View File

@@ -1,7 +1,7 @@
From 2a47e049084cd27d3277056d488329f4d4c9cd4b Mon Sep 17 00:00:00 2001
From ea120b770155e6a18b94ac28c0afac85acd40105 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 15 Jul 2023 16:11:53 +0200
Subject: [PATCH 39/43] ipq807x: drop upstream target
Date: Thu, 7 Sep 2023 05:51:43 +0200
Subject: [PATCH] ipq807x: drop upstream target
Signed-off-by: John Crispin <john@phrozen.org>
---
@@ -78,8 +78,6 @@ Signed-off-by: John Crispin <john@phrozen.org>
...4-dts-qcom-ipq8074-add-thermal-nodes.patch | 130 -
...-dts-qcom-ipq8074-add-clocks-to-APCS.patch | 29 -
...-qcom-ipq8074-convert-to-parent-data.patch | 3601 -----
...-Allow-specifying-custom-reset-delay.patch | 54 -
...eset-support-resetting-multiple-bits.patch | 59 -
...k-qcom-ipq8074-add-missing-networkin.patch | 39 -
...pq8074-add-missing-networking-resets.patch | 41 -
...074-populate-fw_name-for-all-parents.patch | 152 -
@@ -140,7 +138,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
.../0900-power-Add-Qualcomm-APM.patch | 1047 --
...egulator-add-Qualcomm-CPR-regulators.patch | 12147 ----------------
...rm64-dts-ipq8074-add-label-to-clocks.patch | 24 -
135 files changed, 30006 deletions(-)
133 files changed, 29893 deletions(-)
delete mode 100644 target/linux/ipq807x/Makefile
delete mode 100644 target/linux/ipq807x/base-files/etc/board.d/01_leds
delete mode 100644 target/linux/ipq807x/base-files/etc/board.d/02_network
@@ -214,8 +212,6 @@ Signed-off-by: John Crispin <john@phrozen.org>
delete mode 100644 target/linux/ipq807x/patches-5.15/0045-v6.2-arm64-dts-qcom-ipq8074-add-thermal-nodes.patch
delete mode 100644 target/linux/ipq807x/patches-5.15/0046-v6.2-arm64-dts-qcom-ipq8074-add-clocks-to-APCS.patch
delete mode 100644 target/linux/ipq807x/patches-5.15/0047-v6.2-clk-qcom-ipq8074-convert-to-parent-data.patch
delete mode 100644 target/linux/ipq807x/patches-5.15/0048-v6.1-clk-qcom-reset-Allow-specifying-custom-reset-delay.patch
delete mode 100644 target/linux/ipq807x/patches-5.15/0049-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch
delete mode 100644 target/linux/ipq807x/patches-5.15/0050-v6.2-dt-bindings-clock-qcom-ipq8074-add-missing-networkin.patch
delete mode 100644 target/linux/ipq807x/patches-5.15/0051-v6.2-clk-qcom-ipq8074-add-missing-networking-resets.patch
delete mode 100644 target/linux/ipq807x/patches-5.15/0052-v6.2-clk-qcom-ipq8074-populate-fw_name-for-all-parents.patch
@@ -12330,131 +12326,6 @@ index 9162ea538d..0000000000
- .ops = &clk_rcg2_ops,
- },
- };
diff --git a/target/linux/ipq807x/patches-5.15/0048-v6.1-clk-qcom-reset-Allow-specifying-custom-reset-delay.patch b/target/linux/ipq807x/patches-5.15/0048-v6.1-clk-qcom-reset-Allow-specifying-custom-reset-delay.patch
deleted file mode 100644
index 6a525f2c3e..0000000000
--- a/target/linux/ipq807x/patches-5.15/0048-v6.1-clk-qcom-reset-Allow-specifying-custom-reset-delay.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 72bc31aa621e21a7c36a7da8aa6f6a77bb234e0b Mon Sep 17 00:00:00 2001
-From: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
-Date: Wed, 6 Jul 2022 15:41:29 +0200
-Subject: [PATCH] clk: qcom: reset: Allow specifying custom reset delay
-
-The amount of time required between asserting and deasserting the reset
-signal can vary depending on the involved hardware component. Sometimes
-1 us might not be enough and a larger delay is necessary to conform to
-the specifications.
-
-Usually this is worked around in the consuming drivers, by replacing
-reset_control_reset() with a sequence of reset_control_assert(), waiting
-for a custom delay, followed by reset_control_deassert().
-
-However, in some cases the driver making use of the reset is generic and
-can be used with different reset controllers. In this case the reset
-time requirement is better handled directly by the reset controller
-driver.
-
-Make this possible by adding an "udelay" field to the qcom_reset_map
-that allows setting a different reset delay (in microseconds).
-
-Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
-Signed-off-by: Bjorn Andersson <andersson@kernel.org>
-Link: https://lore.kernel.org/r/20220706134132.3623415-4-stephan.gerhold@kernkonzept.com
----
- drivers/clk/qcom/reset.c | 4 +++-
- drivers/clk/qcom/reset.h | 1 +
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
---- a/drivers/clk/qcom/reset.c
-+++ b/drivers/clk/qcom/reset.c
-@@ -13,8 +13,10 @@
-
- static int qcom_reset(struct reset_controller_dev *rcdev, unsigned long id)
- {
-+ struct qcom_reset_controller *rst = to_qcom_reset_controller(rcdev);
-+
- rcdev->ops->assert(rcdev, id);
-- udelay(1);
-+ udelay(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */
- rcdev->ops->deassert(rcdev, id);
- return 0;
- }
---- a/drivers/clk/qcom/reset.h
-+++ b/drivers/clk/qcom/reset.h
-@@ -11,6 +11,7 @@
- struct qcom_reset_map {
- unsigned int reg;
- u8 bit;
-+ u8 udelay;
- };
-
- struct regmap;
diff --git a/target/linux/ipq807x/patches-5.15/0049-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch b/target/linux/ipq807x/patches-5.15/0049-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch
deleted file mode 100644
index e0725a6612..0000000000
--- a/target/linux/ipq807x/patches-5.15/0049-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 813ba3e427671ba3ff35c825087b03f0ad91cf02 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robimarko@gmail.com>
-Date: Mon, 7 Nov 2022 14:28:59 +0100
-Subject: [PATCH] clk: qcom: reset: support resetting multiple bits
-
-This patch adds the support for giving the complete bitmask
-in reset structure and reset operation will use this bitmask
-for all reset operations.
-
-Currently, reset structure only takes a single bit for each reset
-and then calculates the bitmask by using the BIT() macro.
-
-However, this is not sufficient anymore for newer SoC-s like IPQ8074,
-IPQ6018 and more, since their networking resets require multiple bits
-to be asserted in order to properly reset the HW block completely.
-
-So, in order to allow asserting multiple bits add "bitmask" field to
-qcom_reset_map, and then use that bitmask value if its populated in the
-driver, if its not populated, then we just default to existing behaviour
-and calculate the bitmask on the fly.
-
-Signed-off-by: Robert Marko <robimarko@gmail.com>
-Signed-off-by: Bjorn Andersson <andersson@kernel.org>
-Link: https://lore.kernel.org/r/20221107132901.489240-1-robimarko@gmail.com
----
- drivers/clk/qcom/reset.c | 4 ++--
- drivers/clk/qcom/reset.h | 1 +
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
---- a/drivers/clk/qcom/reset.c
-+++ b/drivers/clk/qcom/reset.c
-@@ -30,7 +30,7 @@ qcom_reset_assert(struct reset_controlle
-
- rst = to_qcom_reset_controller(rcdev);
- map = &rst->reset_map[id];
-- mask = BIT(map->bit);
-+ mask = map->bitmask ? map->bitmask : BIT(map->bit);
-
- return regmap_update_bits(rst->regmap, map->reg, mask, mask);
- }
-@@ -44,7 +44,7 @@ qcom_reset_deassert(struct reset_control
-
- rst = to_qcom_reset_controller(rcdev);
- map = &rst->reset_map[id];
-- mask = BIT(map->bit);
-+ mask = map->bitmask ? map->bitmask : BIT(map->bit);
-
- return regmap_update_bits(rst->regmap, map->reg, mask, 0);
- }
---- a/drivers/clk/qcom/reset.h
-+++ b/drivers/clk/qcom/reset.h
-@@ -12,6 +12,7 @@ struct qcom_reset_map {
- unsigned int reg;
- u8 bit;
- u8 udelay;
-+ u32 bitmask;
- };
-
- struct regmap;
diff --git a/target/linux/ipq807x/patches-5.15/0050-v6.2-dt-bindings-clock-qcom-ipq8074-add-missing-networkin.patch b/target/linux/ipq807x/patches-5.15/0050-v6.2-dt-bindings-clock-qcom-ipq8074-add-missing-networkin.patch
deleted file mode 100644
index 75f16a1673..0000000000
@@ -14611,7 +14482,7 @@ index bc1464b126..0000000000
- val &= ~PCI_EXP_LNKCAP_ASPMS;
diff --git a/target/linux/ipq807x/patches-5.15/0076-v5.16-PCI-qcom-Replace-ops-with-struct-pcie_cfg-in-pcie-ma.patch b/target/linux/ipq807x/patches-5.15/0076-v5.16-PCI-qcom-Replace-ops-with-struct-pcie_cfg-in-pcie-ma.patch
deleted file mode 100644
index b29512fb76..0000000000
index 817a3c64c9..0000000000
--- a/target/linux/ipq807x/patches-5.15/0076-v5.16-PCI-qcom-Replace-ops-with-struct-pcie_cfg-in-pcie-ma.patch
+++ /dev/null
@@ -1,122 +0,0 @@
@@ -14647,7 +14518,7 @@ index b29512fb76..0000000000
- struct qcom_pcie {
- struct dw_pcie *pci;
- void __iomem *parf; /* DT parf */
-@@ -1467,6 +1471,38 @@ static const struct qcom_pcie_ops ops_1_
-@@ -1469,6 +1473,38 @@ static const struct qcom_pcie_ops ops_1_
- .config_sid = qcom_pcie_config_sid_sm8250,
- };
-
@@ -14686,7 +14557,7 @@ index b29512fb76..0000000000
- static const struct dw_pcie_ops dw_pcie_ops = {
- .link_up = qcom_pcie_link_up,
- .start_link = qcom_pcie_start_link,
-@@ -1478,6 +1514,7 @@ static int qcom_pcie_probe(struct platfo
-@@ -1480,6 +1516,7 @@ static int qcom_pcie_probe(struct platfo
- struct pcie_port *pp;
- struct dw_pcie *pci;
- struct qcom_pcie *pcie;
@@ -14694,7 +14565,7 @@ index b29512fb76..0000000000
- int ret;
-
- pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL);
-@@ -1499,7 +1536,13 @@ static int qcom_pcie_probe(struct platfo
-@@ -1501,7 +1538,13 @@ static int qcom_pcie_probe(struct platfo
-
- pcie->pci = pci;
-
@@ -14709,7 +14580,7 @@ index b29512fb76..0000000000
-
- pcie->reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_HIGH);
- if (IS_ERR(pcie->reset)) {
-@@ -1555,16 +1598,17 @@ err_pm_runtime_put:
-@@ -1557,16 +1600,17 @@ err_pm_runtime_put:
- }
-
- static const struct of_device_id qcom_pcie_match[] = {
@@ -14739,7 +14610,7 @@ index b29512fb76..0000000000
-
diff --git a/target/linux/ipq807x/patches-5.15/0077-v6.0-PCI-qcom-Add-IPQ60xx-support.patch b/target/linux/ipq807x/patches-5.15/0077-v6.0-PCI-qcom-Add-IPQ60xx-support.patch
deleted file mode 100644
index af8ba2a4e1..0000000000
index 6881ed6d25..0000000000
--- a/target/linux/ipq807x/patches-5.15/0077-v6.0-PCI-qcom-Add-IPQ60xx-support.patch
+++ /dev/null
@@ -1,220 +0,0 @@
@@ -14815,7 +14686,7 @@ index af8ba2a4e1..0000000000
- };
-
- struct qcom_pcie;
-@@ -1280,6 +1290,112 @@ static void qcom_pcie_post_deinit_2_7_0(
-@@ -1282,6 +1292,112 @@ static void qcom_pcie_post_deinit_2_7_0(
- clk_disable_unprepare(res->pipe_clk);
- }
-
@@ -14928,7 +14799,7 @@ index af8ba2a4e1..0000000000
- static int qcom_pcie_link_up(struct dw_pcie *pci)
- {
- u16 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
-@@ -1471,6 +1587,15 @@ static const struct qcom_pcie_ops ops_1_
-@@ -1473,6 +1589,15 @@ static const struct qcom_pcie_ops ops_1_
- .config_sid = qcom_pcie_config_sid_sm8250,
- };
-
@@ -14944,7 +14815,7 @@ index af8ba2a4e1..0000000000
- static const struct qcom_pcie_cfg apq8084_cfg = {
- .ops = &ops_1_0_0,
- };
-@@ -1503,6 +1628,10 @@ static const struct qcom_pcie_cfg sc7280
-@@ -1505,6 +1630,10 @@ static const struct qcom_pcie_cfg sc7280
- .ops = &ops_1_9_0,
- };
-
@@ -14955,7 +14826,7 @@ index af8ba2a4e1..0000000000
- static const struct dw_pcie_ops dw_pcie_ops = {
- .link_up = qcom_pcie_link_up,
- .start_link = qcom_pcie_start_link,
-@@ -1609,6 +1738,7 @@ static const struct of_device_id qcom_pc
-@@ -1611,6 +1740,7 @@ static const struct of_device_id qcom_pc
- { .compatible = "qcom,pcie-sdm845", .data = &sdm845_cfg },
- { .compatible = "qcom,pcie-sm8250", .data = &sm8250_cfg },
- { .compatible = "qcom,pcie-sc7280", .data = &sc7280_cfg },
@@ -15922,7 +15793,7 @@ index 0fa38394b9..0000000000
-
diff --git a/target/linux/ipq807x/patches-5.15/0107-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch b/target/linux/ipq807x/patches-5.15/0107-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch
deleted file mode 100644
index c7a7e7ab49..0000000000
index ae6b148210..0000000000
--- a/target/linux/ipq807x/patches-5.15/0107-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch
+++ /dev/null
@@ -1,23 +0,0 @@
@@ -15941,7 +15812,7 @@ index c7a7e7ab49..0000000000
-
---- a/drivers/pci/controller/dwc/pcie-qcom.c
-+++ b/drivers/pci/controller/dwc/pcie-qcom.c
-@@ -1733,6 +1733,7 @@ static const struct of_device_id qcom_pc
-@@ -1735,6 +1735,7 @@ static const struct of_device_id qcom_pc
- { .compatible = "qcom,pcie-apq8064", .data = &ipq8064_cfg },
- { .compatible = "qcom,pcie-msm8996", .data = &msm8996_cfg },
- { .compatible = "qcom,pcie-ipq8074", .data = &ipq8074_cfg },

File diff suppressed because it is too large Load Diff

View File

@@ -1,750 +0,0 @@
From f144ecc68e6b3abf3bf2d7ad14ac7a70fb3d76aa Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 17 Aug 2023 15:54:39 +0200
Subject: [PATCH 50/52] hostapd: add TIP hostapd.sh version
Signed-off-by: John Crispin <john@phrozen.org>
---
.../network/services/hostapd/files/hostapd.sh | 385 ++++++++++--------
1 file changed, 225 insertions(+), 160 deletions(-)
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 65ae662c4d..90d9210410 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -24,12 +24,12 @@ hostapd_append_wep_key() {
[1234])
for idx in 1 2 3 4; do
local zidx
- zidx="$(($idx - 1))"
+ zidx=$(($idx - 1))
json_get_var ckey "key${idx}"
[ -n "$ckey" ] && \
append $var "wep_key${zidx}=$(prepare_key_wep "$ckey")" "$N$T"
done
- wep_keyidx="$((key - 1))"
+ wep_keyidx=$((key - 1))
;;
*)
append $var "wep_key0=$(prepare_key_wep "$key")" "$N$T"
@@ -48,16 +48,17 @@ hostapd_append_wpa_key_mgmt() {
;;
eap192)
append wpa_key_mgmt "WPA-EAP-SUITE-B-192"
- [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP-SHA384"
+ append wpa_key_mgmt "WPA-EAP-SHA256"
+ [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP"
;;
- eap-eap192)
- append wpa_key_mgmt "WPA-EAP-SUITE-B-192"
+ eap-eap256)
append wpa_key_mgmt "WPA-EAP"
- [ "${ieee80211r:-0}" -gt 0 ] && {
- append wpa_key_mgmt "FT-EAP-SHA384"
- append wpa_key_mgmt "FT-EAP"
- }
- [ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-EAP-SHA256"
+ append wpa_key_mgmt "WPA-EAP-SHA256"
+ [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP"
+ ;;
+ eap256)
+ append wpa_key_mgmt "WPA-EAP-SHA256"
+ [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP"
;;
sae)
append wpa_key_mgmt "SAE"
@@ -116,12 +117,15 @@ hostapd_common_add_device_config() {
config_add_int rssi_reject_assoc_rssi
config_add_int rssi_ignore_probe_request
config_add_int maxassoc
+ config_add_boolean maxassoc_ignore_probe
config_add_string acs_chan_bias
+ config_add_boolean acs_exclude_dfs
config_add_array hostapd_options
config_add_int airtime_mode
- config_add_int mbssid
+
+ config_add_boolean multiple_bssid rnr_beacon he_co_locate ema
hostapd_add_log_config
}
@@ -132,10 +136,11 @@ hostapd_prepare_device_config() {
local base_cfg=
- json_get_vars country country3 country_ie beacon_int:100 doth require_mode legacy_rates \
+ json_get_vars country country3 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 maxassoc \
- mbssid:0
+ multiple_bssid he_co_locate rnr_beacon ema acs_exclude_dfs \
+ maxassoc_ignore_probe
hostapd_set_log_options base_cfg
@@ -145,6 +150,11 @@ hostapd_prepare_device_config() {
set_default legacy_rates 0
set_default airtime_mode 0
set_default cell_density 0
+ set_default he_co_locate 0
+ set_default rnr_beacon 0
+ set_default multiple_bssid 0
+ set_default ema 0
+ set_default acs_exclude_dfs 0
[ -n "$country" ] && {
append base_cfg "country_code=$country" "$N"
@@ -234,9 +244,15 @@ hostapd_prepare_device_config() {
[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N"
append base_cfg "beacon_int=$beacon_int" "$N"
[ -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"
- [ "$mbssid" -gt 0 ] && [ "$mbssid" -le 2 ] && append base_cfg "mbssid=$mbssid" "$N"
+ [ "$maxassoc_ignore_probe" -gt 0 ] && append base_cfg "no_probe_resp_if_max_sta=1" "$N"
+ [ "$rnr_beacon" -gt 0 ] && append base_cfg "rnr_beacon=$rnr_beacon" "$N"
+ [ "$he_co_locate" -gt 0 ] && append base_cfg "he_co_locate=$he_co_locate" "$N"
+ [ "$multiple_bssid" -gt 0 ] && append base_cfg "multiple_bssid=$multiple_bssid" "$N"
+ [ "$ema" -gt 0 ] && append base_cfg "ema=$ema" "$N"
+ [ "$acs_exclude_dfs" -gt 0 ] && append base_cfg "acs_exclude_dfs=$acs_exclude_dfs" "$N"
json_get_values opts hostapd_options
for val in $opts; do
@@ -251,7 +267,7 @@ EOF
hostapd_common_add_bss_config() {
config_add_string 'bssid:macaddr' 'ssid:string'
- config_add_boolean wds wmm uapsd hidden utf8_ssid ppsk
+ config_add_boolean wds wmm uapsd hidden utf8_ssid
config_add_int maxassoc max_inactivity
config_add_boolean disassoc_low_ack isolate short_preamble skip_inactivity_poll
@@ -268,15 +284,24 @@ hostapd_common_add_bss_config() {
config_add_int ieee80211w
config_add_int eapol_version
- config_add_array auth_server acct_server
- config_add_string 'server:host'
+ config_add_string 'auth_server:host' 'server:host'
config_add_string auth_secret key
config_add_int 'auth_port:port' 'port:port'
+ config_add_string acct_server
config_add_string acct_secret
config_add_int acct_port
+
+ config_add_string acct_server_secondary
+ config_add_string acct_secret_secondary
+ config_add_int acct_port_secondary
+
config_add_int acct_interval
+ config_add_string auth_server_secondary
+ config_add_string auth_secret_secondary
+ config_add_int auth_port_secondary
+
config_add_int bss_load_update_period chan_util_avg_period
config_add_string dae_client
@@ -309,7 +334,7 @@ hostapd_common_add_bss_config() {
config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin
config_add_string multi_ap_backhaul_ssid multi_ap_backhaul_key
- config_add_boolean wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition mbo
+ config_add_boolean wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition
config_add_int time_advertisement
config_add_string time_zone
config_add_string vendor_elements
@@ -351,7 +376,7 @@ hostapd_common_add_bss_config() {
config_add_boolean hs20 disable_dgaf osen
config_add_int anqp_domain_id
- config_add_int hs20_deauth_req_timeout
+ config_add_int hs20_deauth_req_timeout hs20_release
config_add_array hs20_oper_friendly_name
config_add_array osu_provider
config_add_array operator_icon
@@ -378,7 +403,11 @@ hostapd_common_add_bss_config() {
config_add_boolean fils
config_add_string fils_dhcp
- config_add_int ocv
+ config_add_boolean ratelimit
+
+ config_add_string uci_section
+
+ config_add_boolean dynamic_probe_resp
}
hostapd_set_vlan_file() {
@@ -430,7 +459,7 @@ append_iw_anqp_3gpp_cell_net() {
if [ -z "$iw_anqp_3gpp_cell_net_conf" ]; then
iw_anqp_3gpp_cell_net_conf="$1"
else
- iw_anqp_3gpp_cell_net_conf="$iw_anqp_3gpp_cell_net_conf:$1"
+ iw_anqp_3gpp_cell_net_conf="$iw_anqp_3gpp_cell_net_conf;$1"
fi
}
@@ -527,18 +556,83 @@ append_airtime_sta_weight() {
[ -n "$1" ] && append bss_conf "airtime_sta_weight=$1" "$N"
}
-append_auth_server() {
- [ -n "$1" ] || return
- append bss_conf "auth_server_addr=$1" "$N"
- append bss_conf "auth_server_port=$auth_port" "$N"
- [ -n "$auth_secret" ] && append bss_conf "auth_server_shared_secret=$auth_secret" "$N"
-}
+append_radius_server() {
+
+ json_get_vars \
+ auth_server auth_secret auth_port \
+ auth_server_secondary auth_secret_secondary auth_port_secondary \
+ dae_client dae_secret dae_port \
+ dynamic_ownip ownip radius_client_addr \
+ eap_reauth_period request_cui \
+ erp_domain mobility_domain \
+ fils_realm fils_dhcp
+
+ set_default dynamic_ownip 1
+
+ # legacy compatibility
+ [ -n "$auth_server" ] || json_get_var auth_server server
+ [ -n "$auth_port" ] || json_get_var auth_port port
+ [ -n "$auth_secret" ] || json_get_var auth_secret key
+
+ [ "$fils" -gt 0 ] && {
+ set_default erp_domain "$mobility_domain"
+ set_default erp_domain "$(echo "$ssid" | md5sum | head -c 8)"
+ set_default fils_realm "$erp_domain"
+
+ append bss_conf "erp_send_reauth_start=1" "$N"
+ append bss_conf "erp_domain=$erp_domain" "$N"
+ append bss_conf "fils_realm=$fils_realm" "$N"
+ append bss_conf "fils_cache_id=$(echo "$fils_realm" | md5sum | head -c 4)" "$N"
+
+ [ "$fils_dhcp" = "*" ] && {
+ json_get_values network network
+ fils_dhcp=
+ for net in $network; do
+ fils_dhcp="$(ifstatus "$net" | jsonfilter -e '@.data.dhcpserver')"
+ [ -n "$fils_dhcp" ] && break
+ done
+
+ [ -z "$fils_dhcp" -a -n "$network_bridge" -a -n "$network_ifname" ] && \
+ fils_dhcp="$(udhcpc -B -n -q -s /lib/netifd/dhcp-get-server.sh -t 1 -i "$network_ifname" 2>/dev/null)"
+ }
+ [ -n "$fils_dhcp" ] && append bss_conf "dhcp_server=$fils_dhcp" "$N"
+ }
+
+ set_default auth_port 1812
+ set_default auth_port_secondary 1812
+ set_default dae_port 3799
+ set_default request_cui 0
+
+ [ "$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"
+ }
+
+ [ -n "$auth_server_secondary" ] && {
+ append bss_conf "auth_server_addr=$auth_server_secondary" "$N"
+ append bss_conf "auth_server_port=$auth_port_secondary" "$N"
+ [ -n "$auth_secret_secondary" ] && \
+ append bss_conf "auth_server_shared_secret=$auth_secret_secondary" "$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"
+
+ [ -n "$dae_client" -a -n "$dae_secret" ] && {
+ append bss_conf "radius_das_port=$dae_port" "$N"
+ append bss_conf "radius_das_client=$dae_client $dae_secret" "$N"
+ }
+ json_for_each_item append_radius_auth_req_attr radius_auth_req_attr
+
+ if [ -n "$ownip" ]; then
+ append bss_conf "own_ip_addr=$ownip" "$N"
+ elif [ "$dynamic_ownip" -gt 0 ]; then
+ append bss_conf "dynamic_own_ip_addr=$dynamic_ownip" "$N"
+ fi
-append_acct_server() {
- [ -n "$1" ] || return
- append bss_conf "acct_server_addr=$1" "$N"
- append bss_conf "acct_server_port=$acct_port" "$N"
- [ -n "$acct_secret" ] && append bss_conf "acct_server_shared_secret=$acct_secret" "$N"
+ [ -n "$radius_client_addr" ] && append bss_conf "radius_client_addr=$radius_client_addr" "$N"
+ [ "$macfilter" = radius ] && append bss_conf "macaddr_acl=2" "$N"
}
hostapd_set_bss_options() {
@@ -548,7 +642,7 @@ hostapd_set_bss_options() {
wireless_vif_parse_encryption
- local bss_conf bss_md5sum ft_key
+ local bss_conf bss_md5sum
local wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey wpa_key_mgmt
json_get_vars \
@@ -559,13 +653,14 @@ hostapd_set_bss_options() {
wps_independent wps_device_type wps_device_name wps_manufacturer wps_pin \
macfilter ssid utf8_ssid wmm uapsd hidden short_preamble rsn_preauth \
iapp_interface eapol_version dynamic_vlan ieee80211w nasid \
- acct_secret acct_port acct_interval \
+ acct_server acct_secret acct_port acct_interval \
+ acct_server_secondary acct_secret_secondary acct_port_secondary \
bss_load_update_period chan_util_avg_period sae_require_mfp sae_pwe \
multi_ap multi_ap_backhaul_ssid multi_ap_backhaul_key skip_inactivity_poll \
- ppsk airtime_bss_weight airtime_bss_limit airtime_sta_weight \
+ airtime_bss_weight airtime_bss_limit airtime_sta_weight \
multicast_to_unicast_all proxy_arp per_sta_vif \
eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \
- vendor_elements fils ocv
+ vendor_elements fils uci_section dynamic_probe_resp
set_default fils 0
set_default isolate 0
@@ -581,14 +676,15 @@ hostapd_set_bss_options() {
set_default tdls_prohibit 0
set_default eapol_version $((wpa & 1))
set_default acct_port 1813
+ set_default acct_port_secondary 1813
set_default bss_load_update_period 60
set_default chan_util_avg_period 600
set_default utf8_ssid 1
set_default multi_ap 0
- set_default ppsk 0
set_default airtime_bss_weight 0
set_default airtime_bss_limit 0
set_default eap_server 0
+ set_default dynamic_probe_resp 0
/usr/sbin/hostapd -vfils || fils=0
@@ -614,6 +710,7 @@ hostapd_set_bss_options() {
append bss_conf "preamble=$short_preamble" "$N"
append bss_conf "wmm_enabled=$wmm" "$N"
append bss_conf "ignore_broadcast_ssid=$hidden" "$N"
+ append bss_conf "dynamic_probe_resp=$dynamic_probe_resp" "$N"
append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N"
append bss_conf "utf8_ssid=$utf8_ssid" "$N"
append bss_conf "multi_ap=$multi_ap" "$N"
@@ -631,23 +728,31 @@ hostapd_set_bss_options() {
set_default nasid "${macaddr//\:}"
append bss_conf "nas_identifier=$nasid" "$N"
- [ -n "$acct_interval" ] && \
- append bss_conf "radius_acct_interim_interval=$acct_interval" "$N"
- json_for_each_item append_acct_server acct_server
- json_for_each_item append_radius_acct_req_attr radius_acct_req_attr
+ [ -n "$acct_server" ] && {
+ append bss_conf "acct_server_addr=$acct_server" "$N"
+ append bss_conf "acct_server_port=$acct_port" "$N"
+ [ -n "$acct_secret" ] && \
+ append bss_conf "acct_server_shared_secret=$acct_secret" "$N"
+ [ -n "$acct_interval" ] && \
+ append bss_conf "radius_acct_interim_interval=$acct_interval" "$N"
+ json_for_each_item append_radius_acct_req_attr radius_acct_req_attr
+ }
- [ -n "$ocv" ] && append bss_conf "ocv=$ocv" "$N"
+ [ -n "$acct_server_secondary" ] && {
+ append bss_conf "acct_server_addr=$acct_server_secondary" "$N"
+ append bss_conf "acct_server_port=$acct_port_secondary" "$N"
+ [ -n "$acct_secret_secondary" ] && \
+ append bss_conf "acct_server_shared_secret=$acct_secret_secondary" "$N"
+ }
case "$auth_type" in
- sae|owe|eap192|eap-eap192)
+ sae|owe|eap192|eap256)
set_default ieee80211w 2
set_default sae_require_mfp 1
- set_default sae_pwe 2
;;
- psk-sae)
+ psk-sae|psk2-radius|eap-eap256)
set_default ieee80211w 1
set_default sae_require_mfp 1
- set_default sae_pwe 2
;;
esac
[ -n "$sae_require_mfp" ] && append bss_conf "sae_require_mfp=$sae_require_mfp" "$N"
@@ -667,16 +772,14 @@ hostapd_set_bss_options() {
# Here we make the assumption that if we're in open mode
# with WPS enabled, we got to be in unconfigured state.
wps_not_configured=1
+ vlan_possible=1
+ [ "$macfilter" = radius ] && {
+ append_radius_server
+ }
;;
psk|sae|psk-sae)
json_get_vars key wpa_psk_file
- if [ "$auth_type" = "psk" ] && [ "$ppsk" -ne 0 ] ; then
- json_get_vars auth_secret auth_port
- set_default auth_port 1812
- json_for_each_item append_auth_server auth_server
- append bss_conf "macaddr_acl=2" "$N"
- append bss_conf "wpa_psk_radius=2" "$N"
- elif [ ${#key} -eq 64 ]; then
+ if [ ${#key} -eq 64 ]; then
append bss_conf "wpa_psk=$key" "$N"
elif [ ${#key} -ge 8 ] && [ ${#key} -le 63 ]; then
append bss_conf "wpa_passphrase=$key" "$N"
@@ -695,70 +798,10 @@ hostapd_set_bss_options() {
vlan_possible=1
wps_possible=1
;;
- eap|eap192|eap-eap192)
- json_get_vars \
- auth_server auth_secret auth_port \
- dae_client dae_secret dae_port \
- dynamic_ownip ownip radius_client_addr \
- eap_reauth_period request_cui \
- erp_domain mobility_domain \
- fils_realm fils_dhcp
-
+ eap|eap192|eap-eap256|eap256)
+ append_radius_server
# radius can provide VLAN ID for clients
vlan_possible=1
-
- set_default dynamic_ownip 1
-
- # legacy compatibility
- [ -n "$auth_server" ] || json_get_var auth_server server
- [ -n "$auth_port" ] || json_get_var auth_port port
- [ -n "$auth_secret" ] || json_get_var auth_secret key
-
- [ "$fils" -gt 0 ] && {
- set_default erp_domain "$mobility_domain"
- set_default erp_domain "$(echo "$ssid" | md5sum | head -c 8)"
- set_default fils_realm "$erp_domain"
-
- append bss_conf "erp_send_reauth_start=1" "$N"
- append bss_conf "erp_domain=$erp_domain" "$N"
- append bss_conf "fils_realm=$fils_realm" "$N"
- append bss_conf "fils_cache_id=$(echo "$fils_realm" | md5sum | head -c 4)" "$N"
-
- [ "$fils_dhcp" = "*" ] && {
- json_get_values network network
- fils_dhcp=
- for net in $network; do
- fils_dhcp="$(ifstatus "$net" | jsonfilter -e '@.data.dhcpserver')"
- [ -n "$fils_dhcp" ] && break
- done
-
- [ -z "$fils_dhcp" -a -n "$network_bridge" -a -n "$network_ifname" ] && \
- fils_dhcp="$(udhcpc -B -n -q -s /lib/netifd/dhcp-get-server.sh -t 1 -i "$network_ifname" 2>/dev/null)"
- }
- [ -n "$fils_dhcp" ] && append bss_conf "dhcp_server=$fils_dhcp" "$N"
- }
-
- set_default auth_port 1812
- set_default dae_port 3799
- set_default request_cui 0
-
- [ "$eap_server" -eq 0 ] && json_for_each_item append_auth_server auth_server
- [ "$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"
-
- [ -n "$dae_client" -a -n "$dae_secret" ] && {
- append bss_conf "radius_das_port=$dae_port" "$N"
- append bss_conf "radius_das_client=$dae_client $dae_secret" "$N"
- }
- json_for_each_item append_radius_auth_req_attr radius_auth_req_attr
-
- if [ -n "$ownip" ]; then
- append bss_conf "own_ip_addr=$ownip" "$N"
- elif [ "$dynamic_ownip" -gt 0 ]; then
- append bss_conf "dynamic_own_ip_addr=$dynamic_ownip" "$N"
- fi
-
- [ -n "$radius_client_addr" ] && append bss_conf "radius_client_addr=$radius_client_addr" "$N"
append bss_conf "eapol_key_index_workaround=1" "$N"
append bss_conf "ieee8021x=1" "$N"
@@ -771,26 +814,14 @@ hostapd_set_bss_options() {
append bss_conf "wep_default_key=$wep_keyidx" "$N"
[ -n "$wep_rekey" ] && append bss_conf "wep_rekey_period=$wep_rekey" "$N"
;;
- esac
-
- case "$auth_type" in
- none|owe|psk|sae|psk-sae|wep)
- json_get_vars \
- auth_server auth_port auth_secret \
- ownip radius_client_addr
-
- [ -n "$auth_server" ] && {
- set_default auth_port 1812
-
- json_for_each_item append_auth_server auth_server
- [ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" "$N"
- [ -n "$radius_client_addr" ] && append bss_conf "radius_client_addr=$radius_client_addr" "$N"
- append bss_conf "macaddr_acl=2" "$N"
- }
+ psk2-radius)
+ append bss_conf "wpa_psk_radius=3" "$N"
+ append_radius_server
+ vlan_possible=1
;;
esac
- local auth_algs="$((($auth_mode_shared << 1) | $auth_mode_open))"
+ local auth_algs=$((($auth_mode_shared << 1) | $auth_mode_open))
append bss_conf "auth_algs=${auth_algs:-1}" "$N"
append bss_conf "wpa=$wpa" "$N"
[ -n "$wpa_pairwise" ] && append bss_conf "wpa_pairwise=$wpa_pairwise" "$N"
@@ -852,11 +883,10 @@ hostapd_set_bss_options() {
append bss_conf "iapp_interface=$ifname" "$N"
}
- json_get_vars time_advertisement time_zone wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition mbo
+ json_get_vars time_advertisement time_zone wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition
set_default bss_transition 0
set_default wnm_sleep_mode 0
set_default wnm_sleep_mode_no_keys 0
- set_default mbo 0
[ -n "$time_advertisement" ] && append bss_conf "time_advertisement=$time_advertisement" "$N"
[ -n "$time_zone" ] && append bss_conf "time_zone=$time_zone" "$N"
@@ -865,7 +895,6 @@ hostapd_set_bss_options() {
[ "$wnm_sleep_mode_no_keys" -eq "1" ] && append bss_conf "wnm_sleep_mode_no_keys=1" "$N"
fi
[ "$bss_transition" -eq "1" ] && append bss_conf "bss_transition=1" "$N"
- [ "$mbo" -eq 1 ] && append bss_conf "mbo=1" "$N"
json_get_vars ieee80211k rrm_neighbor_report rrm_beacon_report
set_default ieee80211k 0
@@ -900,25 +929,31 @@ hostapd_set_bss_options() {
json_get_vars mobility_domain ft_psk_generate_local ft_over_ds reassociation_deadline
set_default mobility_domain "$(echo "$ssid" | md5sum | head -c 4)"
- set_default ft_over_ds 0
+ set_default ft_over_ds 1
set_default reassociation_deadline 1000
+ skip_kh_setup=0
case "$auth_type" in
- psk|sae|psk-sae)
+ psk|psk-sae)
set_default ft_psk_generate_local 1
+ skip_kh_setup="$ft_psk_generate_local"
;;
*)
set_default ft_psk_generate_local 0
;;
esac
+ case "$auth_type" in
+ *sae*) skip_kh_setup=0;;
+ esac
+
[ -n "$network_ifname" ] && append bss_conf "ft_iface=$network_ifname" "$N"
append bss_conf "mobility_domain=$mobility_domain" "$N"
append bss_conf "ft_psk_generate_local=$ft_psk_generate_local" "$N"
append bss_conf "ft_over_ds=$ft_over_ds" "$N"
append bss_conf "reassociation_deadline=$reassociation_deadline" "$N"
- if [ "$ft_psk_generate_local" -eq "0" ]; then
+ if [ "$skip_kh_setup" -eq "0" ]; then
json_get_vars r0_key_lifetime r1_key_holder pmk_r1_push
json_get_values r0kh r0kh
json_get_values r1kh r1kh
@@ -927,10 +962,10 @@ hostapd_set_bss_options() {
set_default pmk_r1_push 0
[ -n "$r0kh" -a -n "$r1kh" ] || {
- ft_key=`echo -n "$mobility_domain/${auth_secret:-${key}}" | md5sum | awk '{print $1}'`
+ key=`echo -n "$mobility_domain/$auth_secret" | md5sum | awk '{print $1}'`
- set_default r0kh "ff:ff:ff:ff:ff:ff,*,$ft_key"
- set_default r1kh "00:00:00:00:00:00,00:00:00:00:00:00,$ft_key"
+ 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"
@@ -981,11 +1016,16 @@ hostapd_set_bss_options() {
json_get_vars ieee80211w_mgmt_cipher ieee80211w_max_timeout ieee80211w_retry_timeout
append bss_conf "ieee80211w=$ieee80211w" "$N"
[ "$ieee80211w" -gt "0" ] && {
- if [ "$auth_type" = "eap192" ]; then
+ case "$auth_type" in
+ eap192)
append bss_conf "group_mgmt_cipher=BIP-GMAC-256" "$N"
- else
+ append bss_conf "group_cipher=GCMP-256" "$N"
+ ;;
+ *)
append bss_conf "group_mgmt_cipher=${ieee80211w_mgmt_cipher:-AES-128-CMAC}" "$N"
- fi
+ ;;
+ esac
+
[ -n "$ieee80211w_max_timeout" ] && \
append bss_conf "assoc_sa_query_max_timeout=$ieee80211w_max_timeout" "$N"
[ -n "$ieee80211w_retry_timeout" ] && \
@@ -1100,12 +1140,13 @@ hostapd_set_bss_options() {
local hs20 disable_dgaf osen anqp_domain_id hs20_deauth_req_timeout \
osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp \
- hs20_t_c_server_url
+ hs20_t_c_server_url hs20_release
json_get_vars hs20 disable_dgaf osen anqp_domain_id hs20_deauth_req_timeout \
osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp \
- hs20_t_c_server_url
+ hs20_t_c_server_url hs20_release
set_default hs20 0
+ set_default hs20_release 1
set_default disable_dgaf $hs20
set_default osen 0
set_default anqp_domain_id 0
@@ -1113,6 +1154,7 @@ hostapd_set_bss_options() {
if [ "$hs20" = "1" ]; then
append bss_conf "hs20=1" "$N"
append_hs20_icons
+ append bss_conf "hs20_release=$hs20_release" "$N"
append bss_conf "disable_dgaf=$disable_dgaf" "$N"
append bss_conf "osen=$osen" "$N"
append bss_conf "anqp_domain_id=$anqp_domain_id" "$N"
@@ -1154,6 +1196,8 @@ hostapd_set_bss_options() {
append bss_conf "per_sta_vif=$per_sta_vif" "$N"
fi
+ [ -n "$uci_section" ] && append bss_conf "uci_section=$uci_section" "$N"
+
json_get_values opts hostapd_bss_options
for val in $opts; do
append bss_conf "$val" "$N"
@@ -1178,7 +1222,7 @@ hostapd_set_log_options() {
set_default log_iapp 1
set_default log_mlme 1
- local log_mask="$(( \
+ local log_mask=$(( \
($log_80211 << 0) | \
($log_8021x << 1) | \
($log_radius << 2) | \
@@ -1186,7 +1230,7 @@ hostapd_set_log_options() {
($log_driver << 4) | \
($log_iapp << 5) | \
($log_mlme << 6) \
- ))"
+ ))
append "$var" "logger_syslog=$log_mask" "$N"
append "$var" "logger_syslog_level=$log_level" "$N"
@@ -1295,15 +1339,15 @@ wpa_supplicant_add_network() {
json_get_vars \
ssid bssid key \
basic_rate mcast_rate \
- ieee80211w ieee80211r fils ocv \
+ ieee80211w ieee80211r fils \
multi_ap \
default_disabled
case "$auth_type" in
- sae|owe|eap192|eap-eap192)
+ sae|owe|eap-eap256)
set_default ieee80211w 2
;;
- psk-sae)
+ psk-sae|eap192|eap256)
set_default ieee80211w 1
;;
esac
@@ -1330,7 +1374,7 @@ wpa_supplicant_add_network() {
}
[ "$_w_mode" = "mesh" ] && {
- json_get_vars mesh_id mesh_fwding mesh_rssi_threshold encryption
+ json_get_vars mesh_id mesh_fwding mesh_rssi_threshold
[ -n "$mesh_id" ] && ssid="${mesh_id}"
append network_data "mode=5" "$N$T"
@@ -1338,7 +1382,7 @@ wpa_supplicant_add_network() {
[ -n "$mesh_rssi_threshold" ] && append network_data "mesh_rssi_threshold=${mesh_rssi_threshold}" "$N$T"
[ -n "$freq" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode"
[ "$noscan" = "1" ] && append network_data "noscan=1" "$N$T"
- [ "$encryption" = "none" -o -z "$encryption" ] || append wpa_key_mgmt "SAE"
+ append wpa_key_mgmt "SAE"
scan_ssid=""
}
@@ -1347,8 +1391,6 @@ wpa_supplicant_add_network() {
[ "$default_disabled" = 1 ] && append network_data "disabled=1" "$N$T"
}
- [ -n "$ocv" ] && append network_data "ocv=$ocv" "$N$T"
-
case "$auth_type" in
none) ;;
owe)
@@ -1372,18 +1414,18 @@ wpa_supplicant_add_network() {
key_mgmt="$wpa_key_mgmt"
- if [ "$_w_mode" = "mesh" ] || [ "$auth_type" = "sae" ]; then
- passphrase="sae_password=\"${key}\""
+ if [ ${#key} -eq 64 ]; then
+ passphrase="psk=${key}"
else
- if [ ${#key} -eq 64 ]; then
- passphrase="psk=${key}"
+ if [ "$_w_mode" = "mesh" ]; then
+ passphrase="sae_password=\"${key}\""
else
passphrase="psk=\"${key}\""
fi
fi
append network_data "$passphrase" "$N$T"
;;
- eap|eap192|eap-eap192)
+ eap|eap192|eap-eap256|eap256)
hostapd_append_wpa_key_mgmt
key_mgmt="$wpa_key_mgmt"
@@ -1588,6 +1630,29 @@ EOF
return 0
}
+wpa_supplicant_run() {
+ local ifname="$1"
+ local hostapd_ctrl="$2"
+
+ _wpa_supplicant_common "$ifname"
+
+ ubus wait_for wpa_supplicant
+ local supplicant_res="$(ubus call wpa_supplicant config_add "{ \
+ \"driver\": \"${_w_driver:-wext}\", \"ctrl\": \"$_rpath\", \
+ \"iface\": \"$ifname\", \"config\": \"$_config\" \
+ ${network_bridge:+, \"bridge\": \"$network_bridge\"} \
+ ${hostapd_ctrl:+, \"hostapd_ctrl\": \"$hostapd_ctrl\"} \
+ }")"
+
+ ret="$?"
+
+ [ "$ret" != 0 -o -z "$supplicant_res" ] && wireless_setup_vif_failed WPA_SUPPLICANT_FAILED
+
+ wireless_add_process "$(jsonfilter -s "$supplicant_res" -l 1 -e @.pid)" "/usr/sbin/wpa_supplicant" 1 1
+
+ return $ret
+}
+
hostapd_common_cleanup() {
killall meshd-nl80211
}
--
2.34.1

File diff suppressed because it is too large Load Diff

View File

@@ -1,132 +0,0 @@
From 23eafe1d6f07339e666ae1492af9b322b9769d02 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sun, 27 Aug 2023 15:57:00 +0100
Subject: [PATCH 59/60] mediatek: improve mt7981.dtsi
* re-factor WED components to boot fine also on limited loaders
* add LEDs of integrated GE PHY
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 3ef8760e876e09fa91b54a09b2a5003c175829d3)
---
.../arch/arm64/boot/dts/mediatek/mt7981.dtsi | 71 ++++++++++++++-----
1 file changed, 52 insertions(+), 19 deletions(-)
diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi
index 3629a6f6dd..05d4b7d91d 100644
--- a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi
+++ b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi
@@ -11,6 +11,7 @@
#include <dt-bindings/clock/mediatek,mt7981-clk.h>
#include <dt-bindings/reset/mt7986-resets.h>
#include <dt-bindings/pinctrl/mt65xx.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/mux/mux.h>
@@ -191,21 +192,6 @@
reg = <0 0x47dc0000 0 0x240000>;
no-map;
};
-
- wo_ilm0: wo-ilm@151e0000 {
- reg = <0 0x151e0000 0 0x8000>;
- no-map;
- };
-
- wo_dlm0: wo-dlm@151e8000 {
- reg = <0 0x151e8000 0 0x2000>;
- no-map;
- };
-
- wo_boot: wo-boot@15194000 {
- reg = <0 0x15194000 0 0x1000>;
- no-map;
- };
};
psci {
@@ -432,6 +418,20 @@
drive-strength = <4>;
};
};
+
+ gbe_led0_pins: gbe-led0-pins {
+ mux {
+ function = "led";
+ groups = "gbe_led0";
+ };
+ };
+
+ gbe_led1_pins: gbe-led1-pins {
+ mux {
+ function = "led";
+ groups = "gbe_led1";
+ };
+ };
};
ethsys: syscon@15000000 {
@@ -452,11 +452,12 @@
reg = <0 0x15010000 0 0x1000>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
- memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>,
- <&wo_data>, <&wo_boot>;
- memory-region-names = "wo-emi", "wo-ilm", "wo-dlm",
- "wo-data", "wo-boot";
+ memory-region = <&wo_emi0>, <&wo_data>;
+ memory-region-names = "wo-emi", "wo-data";
mediatek,wo-ccif = <&wo_ccif0>;
+ mediatek,wo-ilm = <&wo_ilm0>;
+ mediatek,wo-dlm = <&wo_dlm0>;
+ mediatek,wo-cpuboot = <&wo_cpuboot>;
};
eth: ethernet@15100000 {
@@ -511,10 +512,42 @@
phy-is-integrated;
nvmem-cells = <&phy_calibration>;
nvmem-cell-names = "phy-cal-data";
+
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ int_gbe_phy_led0: int-gbe-phy-led0@0 {
+ reg = <0>;
+ function = LED_FUNCTION_LAN;
+ status = "disabled";
+ };
+
+ int_gbe_phy_led1: int-gbe-phy-led1@1 {
+ reg = <1>;
+ function = LED_FUNCTION_LAN;
+ status = "disabled";
+ };
+ };
};
};
};
+ wo_dlm0: syscon@151e8000 {
+ compatible = "mediatek,mt7986-wo-dlm", "syscon";
+ reg = <0 0x151e8000 0 0x2000>;
+ };
+
+ wo_ilm0: syscon@151e0000 {
+ compatible = "mediatek,mt7986-wo-ilm", "syscon";
+ reg = <0 0x151e0000 0 0x8000>;
+ };
+
+ wo_cpuboot: syscon@15194000 {
+ compatible = "mediatek,mt7986-wo-cpuboot", "syscon";
+ reg = <0 0x15194000 0 0x1000>;
+ };
+
wo_ccif0: syscon@151a5000 {
compatible = "mediatek,mt7986-wo-ccif", "syscon";
reg = <0 0x151a5000 0 0x1000>;
--
2.34.1

View File

@@ -1,11 +1,11 @@
From 168061a6d41dac4650855da74c4f5f1b5e7ea925 Mon Sep 17 00:00:00 2001
From cd67118233e5912d99dc5ba5c4cae62e622572dd Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 5 Sep 2023 08:58:23 +0200
Subject: [PATCH 60/60] mediatek: add edgecore eap111 support
Subject: [PATCH] mediatek: add edgecore eap111 support
Signed-off-by: John Crispin <john@phrozen.org>
---
.../mediatek/dts/mt7981a-edgecore-eap111.dts | 187 +++
.../mediatek/dts/mt7981a-edgecore-eap111.dts | 189 +++
.../mediatek/files/drivers/net/phy/en8801sc.c | 1152 +++++++++++++++++
.../mediatek/files/drivers/net/phy/en8801sc.h | 255 ++++
.../filogic/base-files/etc/board.d/01_leds | 4 +
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
target/linux/mediatek/filogic/config-5.15 | 1 +
target/linux/mediatek/image/filogic.mk | 16 +
.../mediatek/patches-5.15/999-en8801sc.patch | 28 +
8 files changed, 1646 insertions(+)
8 files changed, 1648 insertions(+)
create mode 100644 target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts
create mode 100644 target/linux/mediatek/files/drivers/net/phy/en8801sc.c
create mode 100644 target/linux/mediatek/files/drivers/net/phy/en8801sc.h
@@ -21,10 +21,10 @@ Signed-off-by: John Crispin <john@phrozen.org>
diff --git a/target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts b/target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts
new file mode 100644
index 0000000000..aeedffecdf
index 0000000000..e22c099b34
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts
@@ -0,0 +1,187 @@
@@ -0,0 +1,189 @@
+/dts-v1/;
+
+#include "mt7981.dtsi"
@@ -101,6 +101,7 @@ index 0000000000..aeedffecdf
+ nvmem-cells = <&macaddr>;
+ nvmem-cell-names = "mac-address";
+ mac-address-increment = <1>;
+ managed = "in-band-status";
+ };
+
+ gmac1: mac@1 {
@@ -121,6 +122,7 @@ index 0000000000..aeedffecdf
+ phy0: ethernet-phy@24 {
+ reg = <24>;
+ //compatible = "ethernet-phy-ieee802.3-c45";
+ //compatible = "ethernet-phy-ieee802.3-c22";
+ compatible = "ethernet-phy-id03a2.9471";
+ phy-mode = "sgmii";
+ full-duplex;