diff options
author | Maneesh Jain <maneesh.jain@samsung.com> | 2017-02-16 17:04:14 +0530 |
---|---|---|
committer | Maneesh Jain <maneesh.jain@samsung.com> | 2017-02-16 17:04:14 +0530 |
commit | 2e8645c8115381bd1b76876f8a4a7b31640cc239 (patch) | |
tree | 2f59433b3ad209449cc5180e7f1782d4e3d646fa /plugins | |
parent | 732b356621f0b54de4608696e7e9d23416eb2bc6 (diff) | |
download | connman-2e8645c8115381bd1b76876f8a4a7b31640cc239.tar.gz connman-2e8645c8115381bd1b76876f8a4a7b31640cc239.tar.bz2 connman-2e8645c8115381bd1b76876f8a4a7b31640cc239.zip |
[tizen 4.0]: Add support of Disconnect Reason Event Handler
Description: Merged the following upstream patch and modified the
connMan accordingly.
http://git.kernel.org/cgit/network/connman/connman.git/commit/?id=6245582d0dc9a3f47a6880dabf437ee7c351caef
Change-Id: Id90b6d83849c62c2842c038aec516354a2b74060
Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/wifi.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index 84d07088..7b416fcf 100755 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -134,7 +134,6 @@ struct wifi_data { bool allow_full_scan; #endif int disconnect_code; - }; #if defined TIZEN_EXT @@ -2638,6 +2637,7 @@ static void interface_state(GSupplicantInterface *interface) break; connman_network_set_connected(network, true); + wifi->disconnect_code = 0; break; case G_SUPPLICANT_STATE_DISCONNECTED: @@ -2663,10 +2663,6 @@ static void interface_state(GSupplicantInterface *interface) network, wifi)) break; -#if defined TIZEN_EXT - wifi->disconnect_code = g_supplicant_interface_get_disconnect_reason(wifi->interface); - DBG("Disconnect Reason code %d", wifi->disconnect_code); -#endif /* See table 8-36 Reason codes in IEEE Std 802.11 */ switch (wifi->disconnect_code) { case 1: /* Unspecified reason */ @@ -3402,6 +3398,17 @@ static void debug(const char *str) connman_debug("%s", str); } +static void disconnect_reasoncode(GSupplicantInterface *interface, + int reasoncode) +{ + struct wifi_data *wifi = g_supplicant_interface_get_data(interface); + + if (wifi != NULL) { + wifi->disconnect_code = reasoncode; + } +} + + static const GSupplicantCallbacks callbacks = { .system_ready = system_ready, .system_killed = system_killed, @@ -3424,6 +3431,7 @@ static const GSupplicantCallbacks callbacks = { .system_power_off = system_power_off, .network_merged = network_merged, #endif + .disconnect_reasoncode = disconnect_reasoncode, .debug = debug, }; |