Message ID | 20240508173655.22191-4-quic_pradeepc@quicinc.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 70e3be54bbddc39123b8785408fb9aeb8f822ab6 |
Delegated to: | Kalle Valo |
Headers | show |
Series | bug fixes and enhancements to 6 GHz band support | expand |
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index ae9f41a17b4f..8af450cdace6 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -8031,6 +8031,17 @@ static int ath12k_mac_op_get_survey(struct ieee80211_hw *hw, int idx, if (!sband) sband = hw->wiphy->bands[NL80211_BAND_5GHZ]; + if (sband && idx >= sband->n_channels) { + idx -= sband->n_channels; + sband = NULL; + } + + if (!sband) + sband = hw->wiphy->bands[NL80211_BAND_6GHZ]; + if (!sband || idx >= sband->n_channels) { + idx -= sband->n_channels; + sband = NULL; + } if (!sband || idx >= sband->n_channels) return -ENOENT;