ath10k: skip sending quiet mode cmd for WCN3990
PATCH v2 1/1 ath10k: skip sending quiet mode cmd for WCN3990
From: Rakesh Pillai <[email protected]>
HL2.0 firmware does not support setting quiet mode. If the host driver sends the quiet mode setting command to the HL2.0 firmware, it crashes with the below signature.
fatal error received: err_qdi.c:456:EX:wlan_process:1:WLAN RT:207a:PC=b001b4f0
The quiet mode command support is exposed by the firmware via thermal throttle wmi service. Enable ath10k thermal support if thermal throttle wmi service bit is set. 10.x firmware versions support this feature by default, but unfortunately do not advertise the support via service flags, hence have to manually set the service flag in ath10k_core_compat_services().
Compile tested only.
---
v2:
* refactor service bit set to ath10k_core_compat_services() and check for wmi_op_version
* do service check in thermal.c
drivers/net/wireless/ath/ath10k/core.c | 28 ++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/debug.c | 5 +++-- drivers/net/wireless/ath/ath10k/thermal.c | 9 +++++++++ drivers/net/wireless/ath/ath10k/wmi-tlv.h | 3 +++ drivers/net/wireless/ath/ath10k/wmi.h | 1 + 5 files changed, 44 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +28 -0
@@ -2422,6 +2422,28 @@ static int ath10k_core_reset_rx_filter(struct ath10k *ar)return 0 ; } +static int ath10k_core_compat_services (struct ath10k *ar) +{ +struct ath10k_fw_file *fw_file = &ar->normal_mode_fw.fw_file; + +/* all 10.x firmware versions support thermal throttling but don't +* advertise the support via service flags so we have to hardcode +* it here +*/ +switch (fw_file->wmi_op_version) { +case ATH10K_FW_WMI_OP_VERSION_10_1 : +case ATH10K_FW_WMI_OP_VERSION_10_2 : +case ATH10K_FW_WMI_OP_VERSION_10_2_4 : +case ATH10K_FW_WMI_OP_VERSION_10_4 : +set_bit (WMI_SERVICE_THERM_THROT , ar->wmi.svc_map); +break ; +default : +break ; + } + +return 0 ; +} +int ath10k_core_start (struct ath10k *ar,enum ath10k_firmware_mode mode,const struct ath10k_fw_components *fw) {
@@ -2621,6 +2643,12 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode, goto err_hif_stop; } + status =ath10k_core_compat_services (ar); +if (status) { +ath10k_err (ar,"compat services failed: %d\n" , status); + goto err_hif_stop; + } +/* Some firmware revisions do not properly set up hardware rx filter * registers. *
drivers/net/wireless/ath/ath10k/debug.c +3 -2
@@ -2578,8 +2578,9 @@ int ath10k_debug_register(struct ath10k *ar)debugfs_create_file ("pktlog_filter" ,0644 , ar->debug.debugfs_phy, ar, &fops_pktlog_filter); -debugfs_create_file ("quiet_period" ,0644 , ar->debug.debugfs_phy, ar, - &fops_quiet_period); +if (test_bit (WMI_SERVICE_THERM_THROT , ar->wmi.svc_map)) +debugfs_create_file ("quiet_period" ,0644 , ar->debug.debugfs_phy, ar, + &fops_quiet_period);debugfs_create_file ("tpc_stats" ,0400 , ar->debug.debugfs_phy, ar, &fops_tpc_stats);
drivers/net/wireless/ath/ath10k/thermal.c +9 -0
@@ -140,6 +140,9 @@ void ath10k_thermal_set_throttling(struct ath10k *ar)lockdep_assert_held (&ar->conf_mutex); +if (!test_bit (WMI_SERVICE_THERM_THROT , ar->wmi.svc_map)) +return ; +if (!ar->wmi.ops->gen_pdev_set_quiet_mode)return ;
@@ -165,6 +168,9 @@ int ath10k_thermal_register(struct ath10k *ar)struct device *hwmon_dev;int ret; +if (!test_bit (WMI_SERVICE_THERM_THROT , ar->wmi.svc_map)) +return 0 ; + cdev =thermal_cooling_device_register ("ath10k_thermal" , ar, &ath10k_thermal_ops);
@@ -216,6 +222,9 @@ int ath10k_thermal_register(struct ath10k *ar)void ath10k_thermal_unregister (struct ath10k *ar) { +if (!test_bit (WMI_SERVICE_THERM_THROT , ar->wmi.svc_map)) +return ; +sysfs_remove_link (&ar->dev->kobj,"cooling_device" );thermal_cooling_device_unregister (ar->thermal.cdev); }
drivers/net/wireless/ath/ath10k/wmi-tlv.h +3 -0
@@ -1564,6 +1564,9 @@ wmi_tlv_svc_map_ext(const __le32 *in, unsigned long *out, size_t len)SVCMAP (WMI_TLV_SERVICE_SPOOF_MAC_SUPPORT ,WMI_SERVICE_SPOOF_MAC_SUPPORT ,WMI_TLV_MAX_SERVICE ); +SVCMAP (WMI_TLV_SERVICE_THERM_THROT , +WMI_SERVICE_THERM_THROT , +WMI_TLV_MAX_SERVICE ); }#undef SVCMAP
drivers/net/wireless/ath/ath10k/wmi.h +1 -0
@@ -205,6 +205,7 @@ enum wmi_service {WMI_SERVICE_SPOOF_MAC_SUPPORT ,WMI_SERVICE_TX_DATA_ACK_RSSI ,WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT , +WMI_SERVICE_THERM_THROT ,/* keep last */ WMI_SERVICE_MAX,
Signature · 1 line
2.7.4
Quoted 8 lines · Kalle Valo
From: Rakesh Pillai <[email protected]>
HL2.0 firmware does not support setting quiet mode. If the host driver sends the quiet mode setting command to the HL2.0 firmware, it crashes with the below signature.
fatal error received: err_qdi.c:456:EX:wlan_process:1:WLAN RT:207a:PC=b001b4f0
Quoted 7 lines
The quiet mode command support is exposed by the firmware via thermal throttle wmi service. Enable ath10k thermal support if thermal throttle wmi service bit is set. 10.x firmware versions support this feature by default, but unfortunately do not advertise the support via service flags, hence have to manually set the service flag in
ath10k_core_compat_services().Compile tested only.
I'm planning to queue this for 4.20 as wcn3990 support won't work otherwise. But I wasn't able to test this so can someone help, please?
Signature · 1 line
Kalle Valo
Hi Kalle,
I tested this patch on WCN3990 and did basic STA mode sanity. I do not see any crash with this fix.
Thanks,
Rakesh Pillai.
Quoted 20 lines · Kalle Valo
Quoted 8 lines · Kalle Valo
From: Rakesh Pillai <[email protected]>
HL2.0 firmware does not support setting quiet mode. If the host driver sends the quiet mode setting command to the HL2.0 firmware, it crashes with the below signature.
fatal error received: err_qdi.c:456:EX:wlan_process:1:WLAN RT:207a:PC=b001b4f0
Quoted 7 lines
The quiet mode command support is exposed by the firmware via thermal throttle wmi service. Enable ath10k thermal support if thermal throttle wmi service bit is set. 10.x firmware versions support this feature by default, but unfortunately do not advertise the support via service flags, hence have to manually set the service flag in
ath10k_core_compat_services().Compile tested only.
I'm planning to queue this for 4.20 as wcn3990 support won't work otherwise. But I wasn't able to test this so can someone help, please?
(fixing top posting, PLEASE do not top post)
Quoted 23 lines · Rakesh Pillai
Quoted 22 lines · Kalle Valo
Quoted 20 lines · Kalle Valo
From: Rakesh Pillai <[email protected]>
HL2.0 firmware does not support setting quiet mode. If the host driver sends
the quiet mode setting command to the HL2.0 firmware, it crashes with the below
signature.fatal error received: err_qdi.c:456:EX:wlan_process:1:WLAN RT:207a:PC=b001b4f0
The quiet mode command support is exposed by the firmware via thermal throttle
wmi service. Enable ath10k thermal support if thermal throttle wmi service bit
is set. 10.x firmware versions support this feature by default, but unfortunately do not advertise the support via service flags, hence have to
manually set the service flag inath10k_core_compat_services().
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Compile tested only.
I'm planning to queue this for 4.20 as wcn3990 support won't work otherwise. But I wasn't able to test this so can someone help, please?
I tested this patch on WCN3990 and did basic STA mode sanity. I do not see any crash with this fix.
Thanks. I now tested this with firmware 10.2.4.70.9-2 on QC988X. I'll update the commit log accordingly.
Signature · 1 line
Kalle Valo
Quoted 14 lines · Kalle Valo
From: Rakesh Pillai <[email protected]>
HL2.0 firmware does not support setting quiet mode. If the host driver sends the quiet mode setting command to the HL2.0 firmware, it crashes with the below signature.
fatal error received: err_qdi.c:456:EX:wlan_process:1:WLAN RT:207a:PC=b001b4f0
The quiet mode command support is exposed by the firmware via thermal throttle wmi service. Enable ath10k thermal support if thermal throttle wmi service bit is set. 10.x firmware versions support this feature by default, but unfortunately do not advertise the support via service flags, hence have to manually set the service flag in
ath10k_core_compat_services().
Quoted 7 lines
Tested on QCA988X with 10.2.4.70.9-2. Also tested on WCN3990.
Co-developed-by Govind Singh <[email protected]>Co-developed-by Kalle Valo <[email protected]>Signed-off-by Rakesh Pillai <[email protected]>Signed-off-by Govind Singh <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to wireless-drivers.git, thanks.
53884577fbce ath10k: skip sending quiet mode cmd for WCN3990
Signature · 3 lines
https://patchwork.kernel.org/patch/10730831/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 14 lines · Kalle Valo
From: Rakesh Pillai <[email protected]>
HL2.0 firmware does not support setting quiet mode. If the host driver sends the quiet mode setting command to the HL2.0 firmware, it crashes with the below signature.
fatal error received: err_qdi.c:456:EX:wlan_process:1:WLAN RT:207a:PC=b001b4f0
The quiet mode command support is exposed by the firmware via thermal throttle wmi service. Enable ath10k thermal support if thermal throttle wmi service bit is set. 10.x firmware versions support this feature by default, but unfortunately do not advertise the support via service flags, hence have to manually set the service flag in
ath10k_core_compat_services().
Quoted 7 lines
Tested on QCA988X with 10.2.4.70.9-2. Also tested on WCN3990.
Co-developed-by Govind Singh <[email protected]>Co-developed-by Kalle Valo <[email protected]>Signed-off-by Rakesh Pillai <[email protected]>Signed-off-by Govind Singh <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to wireless-drivers.git, thanks.
53884577fbce ath10k: skip sending quiet mode cmd for WCN3990
Signature · 9 lines
https://patchwork.kernel.org/patch/10730831/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k