Compare commits

...

5 Commits

Author SHA1 Message Date
Venkat Chimata
fcc965567f WIFI-14998: wifi: ap: mitigate peer-delete WMI timeout to reduce blind period & prevent peer leaks
1. When a connected client roams to another AP, the AP is trying to delete the peer
   but for some reason the WMI command times out and while driver is waiting for
   the response, we observed that the AP doesn't respond to any frames from STA
   (probe requests, authentication etc) and once the response times out (3seconds default)
   then AP starts responding to the older requets but client has already connected to
   another AP. As the root cause for the response timing out is in the FW, we added
   a WAR to reduce the timeout to minimize this blind period, with this AP responds
   after 100ms and client connects successfully. And 100ms timeout is also reasonable
   for this internal operation.
2. In case of peer deletion timeout, the driver peer database is not cleared, so,
   if this happens often (which it is) then eventually we hit the max peers in the
   driver and all subsequent operations fail, so, in case of timeout ignore the failure
   and proceed with driver peer database cleanup.

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2025-09-04 00:16:00 +05:30
Arif Alam
c27b015a63 est_client: fix certificate issuer matching
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-08-29 22:52:28 -04:00
Arif Alam
02c2e6945b est_client: cloud_discovery: fixup demo environment
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-08-28 21:39:54 -04:00
Sebastian Huang
e7cd5038ac mediatek-sdk: Disable surge protection mode for AN8801SB PHY driver
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-08-20 08:16:30 +02:00
Paul White
34e4a01e25 ucentral-state: Respect LED config before enabling
Ensure that LEDs are configured to be ON before attempting to change their state.

Previously, if the LED was configured to be OFF, it would still enter a double-blink
state when the cloud connection was lost, and then switch to solid ON upon
reconnection—ignoring the configured OFF state.

This update changes that behavior:
    - If LEDs are configured OFF, they will remain OFF even during cloud
      disconnection (no double-blink).
    - After temporary state changes (e.g., during factory reset), the LED will
      return to its configured state (either OFF or ON).

Signed-off-by: Paul White <paul@shasta.cloud>
2025-08-20 08:16:08 +02:00
5 changed files with 72 additions and 7 deletions

View File

@@ -0,0 +1,53 @@
From 375d0d25e6c02991392e44956c81cbac84909f49 Mon Sep 17 00:00:00 2001
From: Venkat Chimata <venkat@nearhop.com>
Date: Thu, 4 Sep 2025 00:09:17 +0530
Subject: [PATCH] wifi: ap: mitigate peer-delete WMI timeout to reduce blind
period & prevent peer leaks
1. When a connected client roams to another AP, the AP is trying to delete the peer
but for some reason the WMI command times out and while driver is waiting for
the response, we observed that the AP doesn't respond to any frames from STA
(probe requests, authentication etc) and once the response times out (3seconds default)
then AP starts responding to the older requets but client has already connected to
another AP. As the root cause for the response timing out is in the FW, we added
a WAR to reduce the timeout to minimize this blind period, with this AP responds
after 100ms and client connects successfully. And 100ms timeout is also reasonable
for this internal operation.
2. In case of peer deletion timeout, the driver peer database is not cleared, so,
if this happens often (which it is) then eventually we hit the max peers in the
driver and all subsequent operations fail, so, in case of timeout ignore the failure
and proceed with driver peer database cleanup.
Signed-off-by: Venkat Chimata <venkat@nearhop.com>
---
drivers/net/wireless/ath/ath11k/peer.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/peer.c b/drivers/net/wireless/ath/ath11k/peer.c
index 1907067..aefc6ba 100644
--- a/drivers/net/wireless/ath/ath11k/peer.c
+++ b/drivers/net/wireless/ath/ath11k/peer.c
@@ -771,7 +771,7 @@ int ath11k_wait_for_peer_delete_done(struct ath11k *ar, u32 vdev_id,
}
time_left = wait_for_completion_timeout(&ar->peer_delete_done,
- 3 * HZ);
+ 100 * HZ / 1000);
if (time_left == 0) {
ath11k_warn(ar->ab, "Timeout in receiving peer delete response\n");
return -ETIMEDOUT;
@@ -857,7 +857,10 @@ int ath11k_peer_delete(struct ath11k *ar, u32 vdev_id, u8 *addr)
}
ret = ath11k_wait_for_peer_delete_done(ar, vdev_id, addr);
- if (ret)
+ /* WAR: For the timeout case, proceed to delete the peer anyway, as FW is
+ * still functional, without this, driver ends up hitting max peers
+ */
+ if (ret && ret != -ETIMEDOUT)
return ret;
ATH11K_MEMORY_STATS_DEC(ar->ab, per_peer_object,
--
2.34.1

View File

@@ -200,7 +200,7 @@
phy-mode = "sgmii";
full-duplex;
pause;
airoha,surge = <1>;
airoha,surge = <0>;
airoha,polarity = <2>;
};

View File

@@ -49,10 +49,12 @@ function detect_certificate_type() {
let issuer = pipe.read("all");
pipe.close();
if (!match(issuer, /Telecom Infra Project Issuing CA/)) {
if (match(issuer, /OpenLAN Demo Birth CA/)) {
ulog(LOG_INFO, 'Certificate type is "Demo" \n');
cds_server = 'discovery-qa.open-lan.org';
timeouts.expiry_threshold = 3 * 24 * 60 * 60;
} else if (match(issuer, /OpenLAN Birth Issuing CA/)) {
ulog(LOG_INFO, 'Certificate type is "Production"\n');
} else {
ulog(LOG_INFO, 'Certificate type is "TIP"\n');
}

View File

@@ -16,9 +16,11 @@ function set_est_server() {
let issuer = pipe.read("all");
pipe.close();
if (!match(issuer, /Telecom Infra Project Issuing CA/)) {
if (match(issuer, /OpenLAN Demo Birth CA/)) {
ulog(LOG_INFO, 'Certificate type is "Demo" \n');
est_server = 'qaest.certificates.open-lan.org:8001';
} else if (match(issuer, /OpenLAN Birth Issuing CA/)) {
ulog(LOG_INFO, 'Certificate type is "Production"\n');
} else {
ulog(LOG_INFO, 'Certificate type is "TIP"\n');
}
@@ -165,7 +167,7 @@ function fwtool() {
let issuer = pipe.read("all");
pipe.close();
if (!(match(issuer, /OpenLAN/) && match(issuer, /Birth CA/)))
if (!(match(issuer, /OpenLAN/) && match(issuer, /Birth/)))
return 0;
ulog(LOG_INFO, 'The issuer is insta\n');

View File

@@ -20,6 +20,7 @@ let config;
let offline_timer;
let current_state;
let online = false;
let leds_off = false;
function self_healing() {
let heal_wifi = false;
@@ -148,6 +149,13 @@ function online_handler() {
function config_load() {
ulog(LOG_INFO, 'loading config\n');
uci.load('system');
let led_off_cfg = uci.get("system", "@system[0]", "leds_off");
if (led_off_cfg == 1) {
leds_off = true;
}
uci.load('state');
config = uci.get_all('state');
@@ -191,7 +199,7 @@ function led_find(alias) {
function factory_reset_timeout() {
let led = led_find('led-running');
if (led)
led_write(led, 'trigger', 'default-on');
led_write(led, 'trigger', leds-off ? 'none' : 'default-on');
}
let blink_timer;
@@ -210,7 +218,7 @@ let state_handler = {
offline: function() {
online = false;
let led = led_find('led-running');
if (led)
if (!leds_off && led)
led_write(led, 'trigger', 'heartbeat');
if (config.ui.offline_trigger) {
if (offline_timer)
@@ -223,7 +231,7 @@ let state_handler = {
online: function() {
online = true;
let led = led_find('led-running');
if (led)
if (!leds_off && led)
led_write(led, 'trigger', 'default-on');
online_handler();
return 0;