diff options
author | Lingbo Kong <quic_lingbok@quicinc.com> | 2023-09-06 19:04:12 +0800 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2023-09-28 17:59:41 +0300 |
commit | 004ccbc0dd49c63576a4c60a663a38dd3cb6bee5 (patch) | |
tree | 41258de962d78502f685e913c2ba586cea39bcab /drivers/net/wireless/ath/ath12k/core.h | |
parent | 458f66c30df2b8495790cf6fca76ebad44046921 (diff) |
wifi: ath12k: add support for hardware rfkill for WCN7850
When hardware rfkill is enabled in the firmware, it will report the
capability using WMI_SYS_CAP_INFO_RFKILL bit in the WMI_SERVICE_READY event
to the host. Currently ath12k does not process this service capability. In
order to support this, update ath12k to check if the capability is enabled,
if so, send the GPIO information to firmware. When the firmware detects
hardware rfkill is enabled by the user, it will report it using
WMI_RFKILL_STATE_CHANGE_EVENTID. When ath12k receive the event, it will set
the value of rfkill_radio_on based on whether radio_state is equal to
WMI_RFKILL_RADIO_STATE_ON, then send WMI_PDEV_PARAM_RFKILL_ENABLE to
firmware.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Lingbo Kong <quic_lingbok@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230906110412.182176-1-quic_lingbok@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath/ath12k/core.h')
-rw-r--r-- | drivers/net/wireless/ath/ath12k/core.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index d873b573dac6..3f5f0471f640 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -771,6 +771,10 @@ struct ath12k_base { u64 fw_soc_drop_count; bool static_window_map; + struct work_struct rfkill_work; + /* true means radio is on */ + bool rfkill_radio_on; + /* must be last */ u8 drv_priv[] __aligned(sizeof(void *)); }; |