hostap: Fix channel comparison

Due to a typo, channel and frequency were compared causing the
connection to fail for any combination.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This commit is contained in:
Chaitanya Tata 2024-01-26 02:44:31 +05:30 committed by Alberto Escolar
parent b3a6f8c2db
commit 675346705f

View file

@ -241,7 +241,7 @@ static int wpa_supp_band_chan_compat(struct wpa_supplicant *wpa_s, uint8_t band,
}
for (i = 0; i < mode->num_channels; i++) {
if (mode->channels[i].freq == channel) {
if (mode->channels[i].chan == channel) {
return mode->channels[i].freq;
}
}