Skip to content

Commit

Permalink
Merge pull request Samsung#748 from HONGCHAEHEE/wifi-temp
Browse files Browse the repository at this point in the history
Quick fix for hang-up issue on Wi-Fi mode change
  • Loading branch information
juitem authored Sep 29, 2017
2 parents 9038d8c + 111d0b1 commit 4edab08
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions framework/src/wifi_manager/wifi_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,13 @@ static void wifi_linkdown_event_func(void)
// wifi_manager_init() creates the callback handler and deinit() joins the callback handler.
wifi_manager_cb_s *wifi_cb = g_manager_callback;

wifi_mutex_acquire(w_info_mutex, WIFI_UTILS_FOREVER);

if (g_manager_info.mode == STA_MODE) {
nvdbg("WIFI DISCONNECTED AP - STA MODE");
g_manager_info.ssid[0] = '\0';
g_manager_info.ip4_address[0] = '\0';
g_manager_info.rssi = 0;
wifi_status_set(AP_DISCONNECTED);
wifi_mutex_release(w_info_mutex);

if (wifi_cb != NULL && wifi_cb->sta_disconnected != NULL) {
wifi_cb->sta_disconnected();
Expand All @@ -225,7 +223,6 @@ static void wifi_linkdown_event_func(void)
} else if (g_manager_info.mode == SOFTAP_MODE) {
nvdbg("DISCONNECTED FROM CLIENT - SOFT AP MODE");
wifi_status_set(CLIENT_DISCONNECTED);
wifi_mutex_release(w_info_mutex);

if (wifi_cb != NULL && wifi_cb->softap_sta_left != NULL) {
wifi_cb->softap_sta_left();
Expand Down

0 comments on commit 4edab08

Please sign in to comment.