[PATCH 2/5] wpa_supplicant: remove unused code from %get_shared_radio_freqs_data
Ilan Peer
ilan.peer
Mon May 19 00:05:36 PDT 2014
From: Avraham Stern <avraham.stern at intel.com>
Remove the check for %get_radio_name support from
%get_shared_radio_freqs_data since %get_radio_name is no longer in use
in this function. In addition, remove the seperation between getting
the local interface frequency and other interfaces frequencies since
going over all the radio interfaces includes the local interface.
Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
wpa_supplicant/wpa_supplicant.c | 35 -----------------------------------
1 file changed, 35 deletions(-)
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index ec347be..85eb1fa 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -4679,46 +4679,11 @@ int get_shared_radio_freqs_data(struct wpa_supplicant *wpa_s,
"Determining shared radio frequencies (max len %u)", len);
os_memset(freqs_data, 0, sizeof(struct wpa_used_freq_data) * len);
- /* First add the frequency of the local interface */
- if (wpa_s->current_ssid != NULL && wpa_s->assoc_freq != 0) {
- if (wpa_s->current_ssid->mode == WPAS_MODE_AP ||
- wpa_s->current_ssid->mode == WPAS_MODE_P2P_GO)
- freqs_data[idx++].freq = wpa_s->current_ssid->frequency;
- else if (wpa_drv_get_bssid(wpa_s, bssid) == 0)
- freqs_data[idx++].freq = wpa_s->assoc_freq;
-
- if (idx) {
- if (wpa_s->current_ssid->mode == WPAS_MODE_INFRA) {
- if (wpa_s->p2p_group_interface ==
- P2P_GROUP_INTERFACE_CLIENT)
- freqs_data[0].flags =
- WPA_FREQ_USED_BY_P2P_CLIENT;
- else
- freqs_data[0].flags =
- WPA_FREQ_USED_BY_BSS;
- }
- }
- }
-
- /* If get_radio_name is not supported, use only the local freq */
- if (!wpa_driver_get_radio_name(wpa_s)) {
- freq = wpa_drv_shared_freq(wpa_s);
- if (freq > 0 && idx < len &&
- (idx == 0 || freqs_data[0].freq != freq)) {
- freqs_data[idx++].freq = freq;
- }
- dump_freq_data(wpa_s, "No get_radio_name", freqs_data, idx);
- return idx;
- }
-
dl_list_for_each(ifs, &wpa_s->radio->ifaces, struct wpa_supplicant,
radio_list) {
if (idx == len)
break;
- if (wpa_s == ifs)
- continue;
-
if (ifs->current_ssid == NULL || ifs->assoc_freq == 0)
continue;
--
1.7.10.4
More information about the Hostap
mailing list