]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: ath12k: fix handling of CSA offsets in beacon template command
authorAditya Kumar Singh <quic_adisi@quicinc.com>
Fri, 24 Jan 2025 06:16:36 +0000 (11:46 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 3 Feb 2025 22:43:28 +0000 (14:43 -0800)
commitf9c88d65e805ca06f26806ac99f569a3dfac2229
tree39bcd4917033ea395f1d9e13ac58deea3f8a7416
parent4094445969740028f9b637977781b73b64c5bc7c
wifi: ath12k: fix handling of CSA offsets in beacon template command

The driver is informed of the counter offsets in the beacon during CSA
through the ieee80211_mutable_offsets structure. According to the
documentation for the cntdwn_counter_offs member, "This array can contain
zero values which should be ignored." However, the current implementation
uses these values unconditionally, without checking for zeros.

Whenever CSA is active, these offsets are guaranteed to be set. Therefore,
add a check for CSA active status before setting the CSA switch count
offsets. This ensures that the offsets are only set when CSA is active,
preventing incorrect configurations.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Link: https://patch.msgid.link/20250124-ath12k_mlo_csa-v2-2-420c42fcfecf@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath12k/mac.h
drivers/net/wireless/ath/ath12k/wmi.c