]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath12k: enhance the WMI_PEER_STA_KICKOUT event with reasons and RSSI reporting
authorMaharaja Kennadyrajan <maharaja.kennadyrajan@oss.qualcomm.com>
Tue, 12 Aug 2025 11:17:06 +0000 (16:47 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 18 Sep 2025 23:43:49 +0000 (16:43 -0700)
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@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250812111708.3686-2-maharaja.kennadyrajan@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/wmi.c
drivers/net/wireless/ath/ath12k/wmi.h

index b20b0335e24ae04be35c61ce522414bc482118bb..95819ca97212603f8bb62ed5cd4969823a742c15 100644 (file)
@@ -6467,6 +6467,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;
@@ -7339,8 +7341,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",
+                  arg.mac_addr, arg.reason, arg.rssi);
 
        ieee80211_report_low_ack(sta, 10);
 
index 4ae9a58f944a9cf999a52e6eca08e9c8807ea23e..a8c3190e8ad95582534789bfe74d18a6bba22936 100644 (file)
@@ -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)