e6f9ac9e4c0aab3016fdbea7f1128c210bc28e14
[openwrt/staging/ansuel.git] /
1 From 72c8caf904aed2caed5d6e75233294b6159ddb5d Mon Sep 17 00:00:00 2001
2 From: Aditya Kumar Singh <quic_adisi@quicinc.com>
3 Date: Wed, 26 Jul 2023 10:16:24 +0530
4 Subject: [PATCH 1/5] wifi: ath11k: fix band selection for ppdu received in
5 channel 177 of 5 GHz
6
7 5 GHz band channel 177 support was added with the commit e5e94d10c856 ("wifi:
8 ath11k: add channel 177 into 5 GHz channel list"). However, during processing
9 for the received ppdu in ath11k_dp_rx_h_ppdu(), channel number is checked only
10 till 173. This leads to driver code checking for channel and then fetching the
11 band from it which is extra effort since firmware has already given the channel
12 number in the metadata.
13
14 Fix this issue by checking the channel number till 177 since we support
15 it now.
16
17 Found via code review. Compile tested only.
18
19 Fixes: e5e94d10c856 ("wifi: ath11k: add channel 177 into 5 GHz channel list")
20 Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
21 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
22 Link: https://lore.kernel.org/r/20230726044624.20507-1-quic_adisi@quicinc.com
23 ---
24 drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c
28 +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
29 @@ -2408,7 +2408,7 @@ static void ath11k_dp_rx_h_ppdu(struct a
30 rx_status->freq = center_freq;
31 } else if (channel_num >= 1 && channel_num <= 14) {
32 rx_status->band = NL80211_BAND_2GHZ;
33 - } else if (channel_num >= 36 && channel_num <= 173) {
34 + } else if (channel_num >= 36 && channel_num <= 177) {
35 rx_status->band = NL80211_BAND_5GHZ;
36 } else {
37 spin_lock_bh(&ar->data_lock);