summaryrefslogtreecommitdiff
path: root/gsupplicant
diff options
context:
space:
mode:
Diffstat (limited to 'gsupplicant')
-rw-r--r--gsupplicant/gsupplicant.h1
-rw-r--r--gsupplicant/supplicant.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index c39d5966..8262ad05 100644
--- a/gsupplicant/gsupplicant.h
+++ b/gsupplicant/gsupplicant.h
@@ -196,6 +196,7 @@ const void *g_supplicant_network_get_ssid(GSupplicantNetwork *network,
const char *g_supplicant_network_get_mode(GSupplicantNetwork *network);
const char *g_supplicant_network_get_security(GSupplicantNetwork *network);
dbus_int16_t g_supplicant_network_get_signal(GSupplicantNetwork *network);
+dbus_uint16_t g_supplicant_network_get_frequency(GSupplicantNetwork *network);
dbus_bool_t g_supplicant_network_get_wps(GSupplicantNetwork *network);
struct _GSupplicantCallbacks {
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 30bdd811..dda2c923 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -197,6 +197,7 @@ struct _GSupplicantNetwork {
unsigned char ssid[32];
unsigned int ssid_len;
dbus_int16_t signal;
+ dbus_uint16_t frequency;
struct g_supplicant_bss *best_bss;
GSupplicantMode mode;
GSupplicantSecurity security;
@@ -795,6 +796,14 @@ dbus_int16_t g_supplicant_network_get_signal(GSupplicantNetwork *network)
return network->signal;
}
+dbus_uint16_t g_supplicant_network_get_frequency(GSupplicantNetwork *network)
+{
+ if (network == NULL)
+ return 0;
+
+ return network->frequency;
+}
+
dbus_bool_t g_supplicant_network_get_wps(GSupplicantNetwork *network)
{
if (network == NULL)
@@ -1019,6 +1028,7 @@ static void add_bss_to_network(struct g_supplicant_bss *bss)
network->ssid_len = bss->ssid_len;
memcpy(network->ssid, bss->ssid, bss->ssid_len);
network->signal = bss->signal;
+ network->frequency = bss->frequency;
network->best_bss = bss;
network->wps = FALSE;