Message ID | 20210722102054.43419-3-jouni@codeaurora.org (mailing list archive) |
---|---|
State | Accepted |
Commit | b6b142f644d2d88e2ceabe0aa4479e0a09ba1ea9 |
Delegated to: | Kalle Valo |
Headers | show |
Series | [1/3] ath11k: add channel 2 into 6 GHz channel list | expand |
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 56120407bfdd..133ecb351365 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -7073,7 +7073,13 @@ static int ath11k_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) { ret = -ENOENT; goto exit;