[PATCH ath-next 1/3] wifi: ath12k: enhance the WMI_PEER_STA_KICKOUT event with reasons and RSSI reporting
Baochen Qiang
baochen.qiang at oss.qualcomm.com
Thu Sep 18 00:30:56 PDT 2025
On 8/12/2025 7:17 PM, Maharaja Kennadyrajan wrote:
> Enhance the WMI_PEER_STA_KICKOUT event by adding support for reporting the
> kickout reason and RSSI value. The reason code will be used in the
> following patches when the beacon miss handling is added.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath12k/wmi.c | 7 +++++--
> drivers/net/wireless/ath/ath12k/wmi.h | 15 +++++++++++++++
> 2 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
> index da85c28ec355..cb686c68987a 100644
> --- a/drivers/net/wireless/ath/ath12k/wmi.c
> +++ b/drivers/net/wireless/ath/ath12k/wmi.c
> @@ -6461,6 +6461,8 @@ static int ath12k_pull_peer_sta_kickout_ev(struct ath12k_base *ab, struct sk_buf
> }
>
> arg->mac_addr = ev->peer_macaddr.addr;
> + arg->reason = le32_to_cpu(ev->reason);
> + arg->rssi = le32_to_cpu(ev->rssi);
>
> kfree(tb);
> return 0;
> @@ -7333,8 +7335,9 @@ static void ath12k_peer_sta_kickout_event(struct ath12k_base *ab, struct sk_buff
> goto exit;
> }
>
> - ath12k_dbg(ab, ATH12K_DBG_WMI, "peer sta kickout event %pM",
> - arg.mac_addr);
> + ath12k_dbg(ab, ATH12K_DBG_WMI,
> + "peer sta kickout event %pM reason: %d rssi: %d\n",
nit:
no ':' needed for a debug print?
> + arg.mac_addr, arg.reason, arg.rssi);
>
> ieee80211_report_low_ack(sta, 10);
>
> diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
> index f3b0a6f57ec2..211812c62f91 100644
> --- a/drivers/net/wireless/ath/ath12k/wmi.h
> +++ b/drivers/net/wireless/ath/ath12k/wmi.h
> @@ -4548,12 +4548,27 @@ struct wmi_scan_event {
> __le32 tsf_timestamp;
> } __packed;
>
> +enum wmi_peer_sta_kickout_reason {
> + WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0,
> + WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
> + WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
> + WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
> + WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4,
> + WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
> + WMI_PEER_STA_KICKOUT_REASON_ROAMING_EVENT = 6,
> + WMI_PEER_STA_KICKOUT_REASON_PMF_ERROR = 7,
> +};
> +
> struct wmi_peer_sta_kickout_arg {
> const u8 *mac_addr;
> + enum wmi_peer_sta_kickout_reason reason;
> + u32 rssi;
> };
>
> struct wmi_peer_sta_kickout_event {
> struct ath12k_wmi_mac_addr_params peer_macaddr;
> + __le32 reason;
> + __le32 rssi;
> } __packed;
>
> #define WMI_ROAM_REASON_MASK GENMASK(3, 0)
More information about the ath12k
mailing list