mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
wifi: ath10k: filter non-UTF testmode events
When UTF monitor is enabled, ath10k forwards WMI events to nl80211 testmode. Non-UTF events can therefore be delivered to userspace and confuse FTM tools which expect only UTF responses. Only forward known UTF event IDs from WMI event namespaces that route events through ath10k_tm_event_wmi(), and drop other WMI events while UTF monitor is active. READY events are still handled by the normal WMI receive path. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.3.7.c5-00093.2-QCAHLSWMTPL-1 Signed-off-by: Linghui Wu <linghui.wu@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260730023226.707008-1-linghui.wu@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
parent
1e33f8acd8
commit
35a3da9fe1
|
|
@ -156,6 +156,14 @@ static void ath10k_tm_event_segmented(struct ath10k *ar, u32 cmd_id, struct sk_b
|
|||
cfg80211_testmode_event(nl_skb, GFP_ATOMIC);
|
||||
}
|
||||
|
||||
static bool ath10k_tm_is_utf_event(u32 cmd_id)
|
||||
{
|
||||
return cmd_id == WMI_10X_PDEV_UTF_EVENTID ||
|
||||
cmd_id == WMI_10_2_PDEV_UTF_EVENTID ||
|
||||
cmd_id == WMI_10_4_PDEV_UTF_EVENTID ||
|
||||
cmd_id == WMI_TLV_PDEV_UTF_EVENTID;
|
||||
}
|
||||
|
||||
/* Returns true if callee consumes the skb and the skb should be discarded.
|
||||
* Returns false if skb is not used. Does not sleep.
|
||||
*/
|
||||
|
|
@ -182,6 +190,12 @@ bool ath10k_tm_event_wmi(struct ath10k *ar, u32 cmd_id, struct sk_buff *skb)
|
|||
*/
|
||||
consumed = true;
|
||||
|
||||
if (!ath10k_tm_is_utf_event(cmd_id)) {
|
||||
ath10k_dbg(ar, ATH10K_DBG_TESTMODE,
|
||||
"testmode drop non-utf event cmd_id %u\n", cmd_id);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ar->testmode.expected_seq != ATH10K_FTM_SEG_NONE)
|
||||
ath10k_tm_event_segmented(ar, cmd_id, skb);
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user