When the wiphy supports multiple bands and reports different capability
values between 5 GHz and 6 GHz channels, the 6 GHz mesh interface is
unable to correctly map the channel width in function
ibss_mesh_setup_freq(). This issue arises because the modes of 5 GHz and
6 GHz interfaces are the same (HOSTAPD_MODE_IEEE80211A) in supported
modes.
To address this, use function get_mode() to determine the appropriate
mode during mesh setup. This will iterates through all the hw_features
sets and ensures compatibility with the band of the channel supported in
hw_features set.
Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
enum hostapd_hw_mode hw_mode;
struct hostapd_hw_modes *mode = NULL;
- int i, obss_scan = 1;
+ int obss_scan = 1;
u8 channel;
bool is_6ghz, is_24ghz;
}
hw_mode = ieee80211_freq_to_chan(freq->freq, &channel);
- for (i = 0; wpa_s->hw.modes && i < wpa_s->hw.num_modes; i++) {
- if (wpa_s->hw.modes[i].mode == hw_mode &&
- hw_mode_get_channel(&wpa_s->hw.modes[i], freq->freq,
- NULL) != NULL) {
- mode = &wpa_s->hw.modes[i];
- break;
- }
- }
+ mode = get_mode(wpa_s->hw.modes, wpa_s->hw.num_modes,
+ hw_mode, is_6ghz_freq(ssid->frequency));
if (!mode)
return;