static guint network_connected_popup_timer_id = 0;
static gboolean block_network_connected_popup = FALSE;
+static const char *_convert_wifi_service_state_to_string(wifi_service_state_e wifi_service_state_type)
+{
+ switch (wifi_service_state_type) {
+ case NETCONFIG_WIFI_UNKNOWN:
+ return "unknown";
+ case NETCONFIG_WIFI_IDLE:
+ return "idle";
+ case NETCONFIG_WIFI_ASSOCIATION:
+ return "association";
+ case NETCONFIG_WIFI_CONFIGURATION:
+ return "configuration";
+ case NETCONFIG_WIFI_CONNECTED:
+ return "connected";
+ case NETCONFIG_WIFI_FAILURE:
+ return "failure";
+ default:
+ ERR("Invalid wifi_service_state_e parameter");
+ break;
+ }
+
+ return "Invalid parameter";
+}
+
+static const char *_convert_wifi_technology_state_to_string(wifi_tech_state_e wifi_tech_state_type)
+{
+ switch (wifi_tech_state_type) {
+ case NETCONFIG_WIFI_TECH_UNKNOWN:
+ return "unknown";
+ case NETCONFIG_WIFI_TECH_OFF:
+ return "off";
+ case NETCONFIG_WIFI_TECH_WPS_ONLY:
+ return "wps only";
+ case NETCONFIG_WIFI_TECH_POWERED:
+ return "powered";
+ case NETCONFIG_WIFI_TECH_CONNECTED:
+ return "connected";
+ case NETCONFIG_WIFI_TECH_TETHERED:
+ return "tethered";
+ default:
+ ERR("Invalid wifi_tech_state_e parameter");
+ break;
+ }
+
+ return "Invalid parameter";
+}
+
static gboolean _block_network_connection_popup(gpointer data)
{
block_network_connected_popup = FALSE;
return;
g_service_state = new_state;
- DBG("Wi-Fi state %d ==> %d", old_state, new_state);
+ DBG("Wi-Fi service state, old state[%s] ==> new state[%s]",
+ _convert_wifi_service_state_to_string(old_state), _convert_wifi_service_state_to_string(new_state));
/* During DHCP, temporarily disable Wi-Fi power saving */
if ((old_state < NETCONFIG_WIFI_ASSOCIATION || old_state == NETCONFIG_WIFI_FAILURE) && new_state == NETCONFIG_WIFI_CONFIGURATION) {
g_tech_state = new_state;
- DBG("Wi-Fi technology state %d ==> %d", old_state, new_state);
+ DBG("Wi-Fi technology state, old state[%s] ==> new state[%s]",
+ _convert_wifi_technology_state_to_string(old_state), _convert_wifi_technology_state_to_string(new_state));
}
wifi_tech_state_e wifi_state_get_technology_state(void)