wifi: ath12k: skip hardware rfkill setup on Microsoft Surface devices
Subsystems (2)
PATCH v2 1/1 wifi: ath12k: skip hardware rfkill setup on Microsoft Surface devices
On the Microsoft Surface Pro 11 and Surface Laptop 7 (X1E80100), the WCN7850 hardware rfkill input reads as "radio off" and the OS has no way to control it. ath12k enables hardware rfkill handling, so Wi-Fi stays hard-blocked:
iwd: Error bringing interface 4 up: Operation not possible due to RF-kill
ACPI platforms can opt out through ath12k_acpi_get_disable_rfkill(), but DT platforms cannot. A DT property was proposed for this and rejected, because it describes what the OS should do rather than the hardware. The suggested alternative was to handle these machines in the driver until a connector binding can describe a broken rfkill line.
Add a table of board compatibles and hardware revisions on which hardware rfkill is known to be unusable, and skip the rfkill setup there. Other affected machines then only need a new table entry.
Tested on a Surface Pro 11 (microsoft,denali) with next-20260929, booted with the unmodified mainline DTB: the interface is no longer blocked and connects. The Surface Laptop 7 entries (microsoft,romulus13 and microsoft,romulus15) are based on reports from Jérôme de Bretagne and Dale Whinham. I have not tested them.
---
Changes in v2:
- Use a table of board compatibles and hardware revisions, as suggested by Jeff, so that other affected machines only need a new entry.
- Add the Surface Laptop 7 (microsoft,romulus13/15), which Dale and Jérôme report as affected too. These entries are untested by me; a Tested-by from someone with that machine would be welcome.
- Retested on the Surface Pro 11.
v1: https://lore.kernel.org/all/[email protected]/
drivers/net/wireless/ath/ath12k/core.c | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
drivers/net/wireless/ath/ath12k/core.c +32 -0
@@ -72,6 +72,35 @@ ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = { }, }; +/* +* On these machines the OS cannot control the WCN7850 hardware rfkill +* input, which reads as "radio off", so hardware rfkill must stay +* disabled. Ideally this would come from the connector node of the board +* DT, but that binding does not exist yet. +*/ +static const struct ath12k_core_broken_rfkill_table { +enum ath12k_hw_rev hw_rev; +const char *compatible; +} ath12k_core_broken_rfkill_table[] = { + {ATH12K_HW_WCN7850_HW20 ,"microsoft,denali" }, + {ATH12K_HW_WCN7850_HW20 ,"microsoft,romulus13" }, + {ATH12K_HW_WCN7850_HW20 ,"microsoft,romulus15" }, + {/* Sentinel */ } +}; + +static bool ath12k_core_rfkill_is_broken (struct ath12k_base *ab) +{ +const struct ath12k_core_broken_rfkill_table *entry; + +for (entry = ath12k_core_broken_rfkill_table; entry->compatible; entry++) { +if (ab->hw_rev == entry->hw_rev && +of_machine_is_compatible (entry->compatible)) +return true; + } + +return false; +} +static int ath12k_core_rfkill_config (struct ath12k_base *ab) {struct ath12k *ar;
@@ -83,6 +112,9 @@ static int ath12k_core_rfkill_config(struct ath12k_base *ab)if (ath12k_acpi_get_disable_rfkill (ab))return 0 ; +if (ath12k_core_rfkill_is_broken (ab)) +return 0 ; +for (i =0 ; i < ab->num_radios; i++) { ar = ab->pdevs[i].ar;
base-commit: 6474fa070f2b8013b4b87350b775b8c3be6e8aac
prerequisite-patch-id: aafe3fac38f4020441979665509928f8cc832095
Signature · 1 line
2.56.0
Quoted 92 lines · François Roux
On the Microsoft Surface Pro 11 and Surface Laptop 7 (X1E80100), the WCN7850 hardware rfkill input reads as "radio off" and the OS has no way to control it. ath12k enables hardware rfkill handling, so Wi-Fi stays hard-blocked:
iwd: Error bringing interface 4 up: Operation not possible due to RF-kill
ACPI platforms can opt out through
ath12k_acpi_get_disable_rfkill(), but DT platforms cannot. A DT property was proposed for this and rejected, because it describes what the OS should do rather than the hardware. The suggested alternative was to handle these machines in the driver until a connector binding can describe a broken rfkill line.Add a table of board compatibles and hardware revisions on which hardware rfkill is known to be unusable, and skip the rfkill setup there. Other affected machines then only need a new table entry.
Tested on a Surface Pro 11 (microsoft,denali) with next-20260929, booted with the unmodified mainline DTB: the interface is no longer blocked and connects. The Surface Laptop 7 entries (microsoft,romulus13 and microsoft,romulus15) are based on reports from Jérôme de Bretagne and Dale Whinham. I have not tested them.
Link https://lore.kernel.org/all/2ixwny6hzumlqmok5cjwutvtk7nzmx4t3dhxc44ao4l2u755pj@n6m7jyxf2o62/ open hereSuggested-by Manivannan Sadhasivam <[email protected]>Assisted-by LLMSigned-off-by François Roux <[email protected]>---
Changes in v2:
- Use a table of board compatibles and hardware revisions, as suggested by Jeff, so that other affected machines only need a new entry.
- Add the Surface Laptop 7 (microsoft,romulus13/15), which Dale and Jérôme report as affected too. These entries are untested by me; a Tested-by from someone with that machine would be welcome.
- Retested on the Surface Pro 11.v1: https://lore.kernel.org/all/[email protected]/
drivers/net/wireless/ath/ath12k/core.c | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)drivers/net/wireless/ath/ath12k/core.c +32
-0@@ -72,6 +72,35 @@ ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = { }, }; +/* +* On these machines the OS cannot control the WCN7850 hardware rfkill +* input, which reads as "radio off", so hardware rfkill must stay +* disabled. Ideally this would come from the connector node of the board +* DT, but that binding does not exist yet. +*/ +static const struct ath12k_core_broken_rfkill_table { +enum ath12k_hw_rev hw_rev; +const char *compatible; +} ath12k_core_broken_rfkill_table[] = { + {ATH12K_HW_WCN7850_HW20 ,"microsoft,denali" }, + {ATH12K_HW_WCN7850_HW20 ,"microsoft,romulus13" }, + {ATH12K_HW_WCN7850_HW20 ,"microsoft,romulus15" }, + {/* Sentinel */ } +}; + +static bool ath12k_core_rfkill_is_broken (struct ath12k_base *ab) +{ +const struct ath12k_core_broken_rfkill_table *entry; + +for (entry = ath12k_core_broken_rfkill_table; entry->compatible; entry++) { +if (ab->hw_rev == entry->hw_rev && +of_machine_is_compatible (entry->compatible)) +return true; + } + +return false; +} +static int ath12k_core_rfkill_config (struct ath12k_base *ab) {struct ath12k *ar;@@ -83,6 +112,9 @@ static int ath12k_core_rfkill_config(struct ath12k_base *ab)if (ath12k_acpi_get_disable_rfkill (ab))return 0 ; +if (ath12k_core_rfkill_is_broken (ab)) +return 0 ; +for (i =0 ; i < ab->num_radios; i++) { ar = ab->pdevs[i].ar;
Quoted 2 lines
base-commit:
6474fa070f2b8013b4b87350b775b8c3be6e8aac
prerequisite-patch-id:aafe3fac38f4020441979665509928f8cc832095
Tested successfully on Surface Pro 11 X1E/OLED/WiFi model.
Quoted 23 lines · François Roux
On the Microsoft Surface Pro 11 and Surface Laptop 7 (X1E80100), the WCN7850 hardware rfkill input reads as "radio off" and the OS has no way to control it. ath12k enables hardware rfkill handling, so Wi-Fi stays hard-blocked:
iwd: Error bringing interface 4 up: Operation not possible due to RF-kill
ACPI platforms can opt out through
ath12k_acpi_get_disable_rfkill(), but DT platforms cannot. A DT property was proposed for this and rejected, because it describes what the OS should do rather than the hardware. The suggested alternative was to handle these machines in the driver until a connector binding can describe a broken rfkill line.Add a table of board compatibles and hardware revisions on which hardware rfkill is known to be unusable, and skip the rfkill setup there. Other affected machines then only need a new table entry.
Tested on a Surface Pro 11 (microsoft,denali) with next-20260929, booted with the unmodified mainline DTB: the interface is no longer blocked and connects. The Surface Laptop 7 entries (microsoft,romulus13 and microsoft,romulus15) are based on reports from Jérôme de Bretagne and Dale Whinham. I have not tested them.
Quoted 4 lines
Link https://lore.kernel.org/all/2ixwny6hzumlqmok5cjwutvtk7nzmx4t3dhxc44ao4l2u755pj@n6m7jyxf2o62/ open hereSuggested-by Manivannan Sadhasivam <[email protected]>Assisted-by LLMSigned-off-by François Roux <[email protected]>
Jeff Johnson
AppliedQuoted 8 lines · François Roux
On the Microsoft Surface Pro 11 and Surface Laptop 7 (X1E80100), the WCN7850 hardware rfkill input reads as "radio off" and the OS has no way to control it. ath12k enables hardware rfkill handling, so Wi-Fi stays hard-blocked:
iwd: Error bringing interface 4 up: Operation not possible due to RF-kill
[...]
Applied, thanks!
[1/1] wifi: ath12k: skip hardware rfkill setup on Microsoft Surface devices
commit: 5949d1910f13c20f6ebcd26eec9e0c02cb4951aa
Best regards,
Signature · 1 line
Jeff Johnson <[email protected]>