wpa_supplicant: Expose wpas_get_bands() and related API

Expose the functions wpas_get_bands() and wpas_freq_to_band() and the
enum wpa_radio_work_band, since they will be needed outside
wpa_supplicant.c.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
This commit is contained in:
Lior David 2016-02-20 13:46:10 +02:00 committed by Jouni Malinen
parent 94ad3c3389
commit 2b6e9f91df
3 changed files with 11 additions and 8 deletions

View file

@ -335,4 +335,10 @@ enum set_band {
WPA_SETBAND_2G WPA_SETBAND_2G
}; };
enum wpa_radio_work_band {
BAND_2_4_GHZ = BIT(0),
BAND_5_GHZ = BIT(1),
BAND_60_GHZ = BIT(2),
};
#endif /* DEFS_H */ #endif /* DEFS_H */

View file

@ -4022,7 +4022,7 @@ static int wpas_set_wowlan_triggers(struct wpa_supplicant *wpa_s,
} }
static enum wpa_radio_work_band wpas_freq_to_band(int freq) enum wpa_radio_work_band wpas_freq_to_band(int freq)
{ {
if (freq < 3000) if (freq < 3000)
return BAND_2_4_GHZ; return BAND_2_4_GHZ;
@ -4032,8 +4032,7 @@ static enum wpa_radio_work_band wpas_freq_to_band(int freq)
} }
static unsigned int wpas_get_bands(struct wpa_supplicant *wpa_s, unsigned int wpas_get_bands(struct wpa_supplicant *wpa_s, const int *freqs)
const int *freqs)
{ {
int i; int i;
unsigned int band = 0; unsigned int band = 0;

View file

@ -308,11 +308,6 @@ struct wpa_radio {
#define MAX_ACTIVE_WORKS 2 #define MAX_ACTIVE_WORKS 2
enum wpa_radio_work_band {
BAND_2_4_GHZ = BIT(0),
BAND_5_GHZ = BIT(1),
BAND_60_GHZ = BIT(2),
};
/** /**
* struct wpa_radio_work - Radio work item * struct wpa_radio_work - Radio work item
@ -358,6 +353,9 @@ struct wpa_external_work {
unsigned int timeout; unsigned int timeout;
}; };
enum wpa_radio_work_band wpas_freq_to_band(int freq);
unsigned int wpas_get_bands(struct wpa_supplicant *wpa_s, const int *freqs);
/** /**
* offchannel_send_action_result - Result of offchannel send Action frame * offchannel_send_action_result - Result of offchannel send Action frame
*/ */