Skip to content

Commit 8df706f

Browse files
MilanoPipomiaoqing-quic
authored andcommitted
FROMLIST: wifi: ath12k: fix incorrect channel survey index
A wrong channel survey index was introduced in ath12k_mac_op_get_survey by [1], which can cause ACS to fail. The index is decremented before being used, resulting in an incorrect value when accessing the channel survey data. Fix the index handling to ensure the correct survey entry is used and avoid ACS failures. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3 Fixes: 4f242b1 ("wifi: ath12k: support get_survey mac op for single wiphy") # [1] Signed-off-by: Yingying Tang <yingying.tang@oss.qualcomm.com> Signed-off-by: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com> Link: https://lore.kernel.org/linux-wireless/20260210024440.3422264-1-yingying.tang@oss.qualcomm.com/
1 parent 9fe9139 commit 8df706f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/net/wireless/ath/ath12k

drivers/net/wireless/ath/ath12k/mac.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13162,6 +13162,7 @@ int ath12k_mac_op_get_survey(struct ieee80211_hw *hw, int idx,
1316213162
struct ath12k *ar;
1316313163
struct ieee80211_supported_band *sband;
1316413164
struct survey_info *ar_survey;
13165+
int orig_idx = idx;
1316513166

1316613167
lockdep_assert_wiphy(hw->wiphy);
1316713168

@@ -13196,7 +13197,7 @@ int ath12k_mac_op_get_survey(struct ieee80211_hw *hw, int idx,
1319613197
return -ENOENT;
1319713198
}
1319813199

13199-
ar_survey = &ar->survey[idx];
13200+
ar_survey = &ar->survey[orig_idx];
1320013201

1320113202
ath12k_mac_update_bss_chan_survey(ar, &sband->channels[idx]);
1320213203

0 commit comments

Comments
 (0)