aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-02-20 13:46:10 +0200
committerHamad Kadmany <hkadmany@codeaurora.org>2016-04-15 01:48:14 +0300
commitfd3fc234c3c3cf9798805ae3441beb9234253797 (patch)
tree0261dff9f237a53e5a75942d62032da63474636d
parentdf4e7609f7ca30db5a9df9da073a7f2f02b827f4 (diff)
downloadandroid_external_wpa_supplicant_8-fd3fc234c3c3cf9798805ae3441beb9234253797.tar.gz
android_external_wpa_supplicant_8-fd3fc234c3c3cf9798805ae3441beb9234253797.tar.bz2
android_external_wpa_supplicant_8-fd3fc234c3c3cf9798805ae3441beb9234253797.zip
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. Change-Id: I2bea4838f852395d9df0d1c2ad2db51060722f1e Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Git-commit: 2b6e9f91df7acf19998f967fcc6c5f4bb911d1d8 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 985990
-rw-r--r--src/common/defs.h6
-rw-r--r--wpa_supplicant/wpa_supplicant.c5
-rw-r--r--wpa_supplicant/wpa_supplicant_i.h8
3 files changed, 11 insertions, 8 deletions
diff --git a/src/common/defs.h b/src/common/defs.h
index eb080ea8..2e313794 100644
--- a/src/common/defs.h
+++ b/src/common/defs.h
@@ -334,4 +334,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 */
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index cd75e566..7ed09305 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -3896,7 +3896,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;
@@ -3906,8 +3906,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;
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 59f25ff7..3b7a6994 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -307,11 +307,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
@@ -357,6 +352,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
*/