wpa_supplicant: Expose wpas_get_bands() and related API
authorLior David <qca_liord@qca.qualcomm.com>
Sat, 20 Feb 2016 11:46:10 +0000 (13:46 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 3 Mar 2016 13:10:50 +0000 (15:10 +0200)
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>
src/common/defs.h
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant_i.h

index b3ac4e8..6ef929c 100644 (file)
@@ -335,4 +335,10 @@ enum set_band {
        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 */
index 6b9c957..136cb58 100644 (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)
                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,
-                                  const int *freqs)
+unsigned int wpas_get_bands(struct wpa_supplicant *wpa_s, const int *freqs)
 {
        int i;
        unsigned int band = 0;
index 1ec2cd8..1b16d28 100644 (file)
@@ -308,11 +308,6 @@ struct wpa_radio {
 
 #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
@@ -358,6 +353,9 @@ struct wpa_external_work {
        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
  */