Fix get_shared_radio_freqs_data() used-by flags setting

Fix an iteration bug in get_shared_radio_freqs_data when building
freqs_data array. Only the last used-by flag was maintained instead of
making this a bitfield of all found uses.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
Andrei Otcheretianski 2015-09-08 12:46:08 +03:00 committed by Jouni Malinen
parent 241c33335b
commit 22264b3c61

View file

@ -5568,7 +5568,7 @@ int get_shared_radio_freqs_data(struct wpa_supplicant *wpa_s,
freqs_data[idx++].freq = freq; freqs_data[idx++].freq = freq;
if (ifs->current_ssid->mode == WPAS_MODE_INFRA) { if (ifs->current_ssid->mode == WPAS_MODE_INFRA) {
freqs_data[i].flags = ifs->current_ssid->p2p_group ? freqs_data[i].flags |= ifs->current_ssid->p2p_group ?
WPA_FREQ_USED_BY_P2P_CLIENT : WPA_FREQ_USED_BY_P2P_CLIENT :
WPA_FREQ_USED_BY_INFRA_STATION; WPA_FREQ_USED_BY_INFRA_STATION;
} }