From: Samuel Ortiz Date: Thu, 9 Dec 2010 00:37:02 +0000 (+0100) Subject: wifi: Regulatory domain setting implementation X-Git-Tag: 2.0_alpha~1995 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e4c6043f7b7ff1e98990905daf210304c06d8cd;p=framework%2Fconnectivity%2Fconnman.git wifi: Regulatory domain setting implementation --- diff --git a/plugins/wifi.c b/plugins/wifi.c index b12aa06..2b43deb 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -53,6 +53,8 @@ #define CLEANUP_TIMEOUT 8 /* in seconds */ #define INACTIVE_TIMEOUT 12 /* in seconds */ +struct connman_technology *wifi_technology = NULL; + struct wifi_data { char *identifier; struct connman_device *device; @@ -635,16 +637,31 @@ static struct connman_network_driver network_driver = { static int tech_probe(struct connman_technology *technology) { + wifi_technology = technology; + return 0; } static void tech_remove(struct connman_technology *technology) { + wifi_technology = NULL; +} + +static void regdom_callback(void *user_data) +{ + char *alpha2 = user_data; + + DBG(""); + + if (wifi_technology == NULL) + return; + + connman_technology_regdom_notify(wifi_technology, alpha2); } static int tech_set_regdom(struct connman_technology *technology, const char *alpha2) { - return 0; + return g_supplicant_set_country(alpha2, regdom_callback, alpha2); } static struct connman_technology_driver tech_driver = {