Skip to content

Commit 4519fb9

Browse files
Pradeep Kumar Chitrapugregkh
authored andcommitted
ath11k: fix packet drops due to incorrect 6 GHz freq value in rx status
[ Upstream commit 9d6ae1f ] Frequency in rx status is being filled incorrectly in the 6 GHz band as channel number received is invalid in this case which is causing packet drops. So fix that. Fixes: 5dcf42f ("ath11k: Use freq instead of channel number in rx path") Signed-off-by: Pradeep Kumar Chitrapu <[email protected]> Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent b6a46ec commit 4519fb9

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

drivers/net/wireless/ath/ath11k/dp_rx.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,8 +2303,10 @@ static void ath11k_dp_rx_h_ppdu(struct ath11k *ar, struct hal_rx_desc *rx_desc,
23032303
channel_num = ath11k_dp_rx_h_msdu_start_freq(rx_desc);
23042304
center_freq = ath11k_dp_rx_h_msdu_start_freq(rx_desc) >> 16;
23052305

2306-
if (center_freq >= 5935 && center_freq <= 7105) {
2306+
if (center_freq >= ATH11K_MIN_6G_FREQ &&
2307+
center_freq <= ATH11K_MAX_6G_FREQ) {
23072308
rx_status->band = NL80211_BAND_6GHZ;
2309+
rx_status->freq = center_freq;
23082310
} else if (channel_num >= 1 && channel_num <= 14) {
23092311
rx_status->band = NL80211_BAND_2GHZ;
23102312
} else if (channel_num >= 36 && channel_num <= 173) {
@@ -2322,8 +2324,9 @@ static void ath11k_dp_rx_h_ppdu(struct ath11k *ar, struct hal_rx_desc *rx_desc,
23222324
rx_desc, sizeof(struct hal_rx_desc));
23232325
}
23242326

2325-
rx_status->freq = ieee80211_channel_to_frequency(channel_num,
2326-
rx_status->band);
2327+
if (rx_status->band != NL80211_BAND_6GHZ)
2328+
rx_status->freq = ieee80211_channel_to_frequency(channel_num,
2329+
rx_status->band);
23272330

23282331
ath11k_dp_rx_h_rate(ar, rx_desc, rx_status);
23292332
}

drivers/net/wireless/ath/ath11k/wmi.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5668,8 +5668,10 @@ static void ath11k_mgmt_rx_event(struct ath11k_base *ab, struct sk_buff *skb)
56685668
if (rx_ev.status & WMI_RX_STATUS_ERR_MIC)
56695669
status->flag |= RX_FLAG_MMIC_ERROR;
56705670

5671-
if (rx_ev.chan_freq >= ATH11K_MIN_6G_FREQ) {
5671+
if (rx_ev.chan_freq >= ATH11K_MIN_6G_FREQ &&
5672+
rx_ev.chan_freq <= ATH11K_MAX_6G_FREQ) {
56725673
status->band = NL80211_BAND_6GHZ;
5674+
status->freq = rx_ev.chan_freq;
56735675
} else if (rx_ev.channel >= 1 && rx_ev.channel <= 14) {
56745676
status->band = NL80211_BAND_2GHZ;
56755677
} else if (rx_ev.channel >= 36 && rx_ev.channel <= ATH11K_MAX_5G_CHAN) {
@@ -5690,8 +5692,10 @@ static void ath11k_mgmt_rx_event(struct ath11k_base *ab, struct sk_buff *skb)
56905692

56915693
sband = &ar->mac.sbands[status->band];
56925694

5693-
status->freq = ieee80211_channel_to_frequency(rx_ev.channel,
5694-
status->band);
5695+
if (status->band != NL80211_BAND_6GHZ)
5696+
status->freq = ieee80211_channel_to_frequency(rx_ev.channel,
5697+
status->band);
5698+
56955699
status->signal = rx_ev.snr + ATH11K_DEFAULT_NOISE_FLOOR;
56965700
status->rate_idx = ath11k_mac_bitrate_to_idx(sband, rx_ev.rate / 100);
56975701

0 commit comments

Comments
 (0)