From b1c3392ad232175be53eccd1454d1c8da1e48daf Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:37:51 +1100 Subject: [PATCH] wifi: apple: centauri: Quiesce Alpha for sleep on every N1 board The Alpha host-power and ACIPC sleep requests are the N1 firmware's protocol, but suspend and resume only ran them on apple,j813. J815 has the same N1 behind the same PCI functions and its own entry in the driver's board table. Run suspend wherever the native driver bound (c->wifi is set, which needs a board entry), still behind the TEST ONLY alpha_sleep_untested switch, and drop resume's board check: it only undoes requests suspend sent and returns at once otherwise. With the switch off nothing changes on any board. Fixes: 4cca392085a9 ("wifi: apple: centauri: quiesce Alpha for J813 system sleep") Suggested-by: Thomas Glanzmann Signed-off-by: Ryan Murray --- drivers/net/wireless/apple/centauri/centauri_wifi.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/apple/centauri/centauri_wifi.c b/drivers/net/wireless/apple/centauri/centauri_wifi.c index 48d1deca69ab2..3916292f3133b 100644 --- a/drivers/net/wireless/apple/centauri/centauri_wifi.c +++ b/drivers/net/wireless/apple/centauri/centauri_wifi.c @@ -87,7 +87,7 @@ MODULE_PARM_DESC(station_link_addresses, "Diagnostic: use the netdev address for static bool alpha_sleep_untested; module_param(alpha_sleep_untested, bool, 0600); -MODULE_PARM_DESC(alpha_sleep_untested, "TEST ONLY: J813 Alpha host-power and ACIPC sleep handshake"); +MODULE_PARM_DESC(alpha_sleep_untested, "TEST ONLY: Alpha host-power and ACIPC sleep handshake"); struct centauri_rx_snapshot { __le32 version, count; @@ -2705,12 +2705,17 @@ static int alpha_resume_locked(struct centauri_wifi *wifi) return 0; } +/* + * The host-power and ACIPC sleep requests are the N1 firmware's own protocol, the same on + * every board this driver binds (one board entry each, same PCI functions). Resume only + * undoes what suspend sent, so it needs no gate of its own. + */ int centauri_wifi_resume(struct centauri *c) { struct centauri_wifi *wifi = c->wifi; int ret; - if (!wifi || !of_machine_is_compatible("apple,j813")) + if (!wifi) return 0; mutex_lock(&wifi->lock); ret = alpha_resume_locked(wifi); @@ -2723,8 +2728,7 @@ int centauri_wifi_suspend(struct centauri *c) struct centauri_wifi *wifi = c->wifi; int ret, restore; - if (!wifi || !of_machine_is_compatible("apple,j813") || - !READ_ONCE(alpha_sleep_untested)) + if (!wifi || !READ_ONCE(alpha_sleep_untested)) return 0; mutex_lock(&wifi->lock); if (wifi->transport_paused || wifi->connected || wifi->connecting || wifi->scan_request ||