diff options
author | Manfred Kober <manfred.kober@gmx.de> | 2012-02-01 16:02:52 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-02-04 01:32:35 +0100 |
commit | 192346e7da9f7da9b5e525e86af5e6615630edbe (patch) | |
tree | 07639b308359e206524ca92f2629c517ae87d110 /plugins | |
parent | 52aab9919519dc94ae891efb22e8d92d32e242de (diff) | |
download | connman-192346e7da9f7da9b5e525e86af5e6615630edbe.tar.gz connman-192346e7da9f7da9b5e525e86af5e6615630edbe.tar.bz2 connman-192346e7da9f7da9b5e525e86af5e6615630edbe.zip |
wifi: Write Wifi Mode to network properties
Currently adhoc networks are shown in the service list, although
connecting to those is not supported. Filtering in network.c fails
because the WiFi.Mode was not set so far.
Fixes BMC#24737
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/wifi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index aeeb912e..f89222da 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -1111,7 +1111,7 @@ static void network_added(GSupplicantNetwork *supplicant_network) struct connman_network *network; GSupplicantInterface *interface; struct wifi_data *wifi; - const char *name, *identifier, *security, *group; + const char *name, *identifier, *security, *group, *mode; const unsigned char *ssid; unsigned int ssid_len; connman_bool_t wps; @@ -1125,6 +1125,7 @@ static void network_added(GSupplicantNetwork *supplicant_network) security = g_supplicant_network_get_security(supplicant_network); group = g_supplicant_network_get_identifier(supplicant_network); wps = g_supplicant_network_get_wps(supplicant_network); + mode = g_supplicant_network_get_mode(supplicant_network); if (wifi == NULL) return; @@ -1163,6 +1164,7 @@ static void network_added(GSupplicantNetwork *supplicant_network) g_supplicant_network_get_frequency(supplicant_network)); connman_network_set_available(network, TRUE); + connman_network_set_string(network, "WiFi.Mode", mode); if (ssid != NULL) connman_network_set_group(network, group); |