From 22264b3c619420276cabd74283d9791c0df880ab Mon Sep 17 00:00:00 2001 From: Andrei Otcheretianski Date: Tue, 8 Sep 2015 12:46:08 +0300 Subject: [PATCH] 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 --- wpa_supplicant/wpa_supplicant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 4805f8391..ef55fdcf7 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -5568,7 +5568,7 @@ int get_shared_radio_freqs_data(struct wpa_supplicant *wpa_s, freqs_data[idx++].freq = freq; 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_INFRA_STATION; }