OSDN Git Service

nl80211: Prolong HANGED message to the wifi manager
authorDmitry Shmidt <dimitrysh@google.com>
Wed, 7 Sep 2011 23:13:16 +0000 (16:13 -0700)
committerDmitry Shmidt <dimitrysh@google.com>
Wed, 7 Sep 2011 23:13:16 +0000 (16:13 -0700)
BUG: b/5167816

Change-Id: I6598304ed9634fc859d2970b0d86213b1dae3696
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
src/drivers/driver_nl80211.c

index 7b7e3fa..8481469 100644 (file)
@@ -43,6 +43,9 @@
 #if defined(ANDROID_BRCM_P2P_PATCH) && !defined(HOSTAPD)
 #include "wpa_supplicant_i.h"
 #endif
+#ifdef ANDROID
+#define WPA_EVENT_DRIVER_STATE         "CTRL-EVENT-DRIVER-STATE "
+#endif
 #ifdef CONFIG_LIBNL20
 /* libnl 2.0 compatibility code */
 #define nl_handle nl_sock
@@ -1496,9 +1499,15 @@ static int process_event(struct nl_msg *msg, void *arg)
                }
                drv->associated = 0;
                os_memset(&data, 0, sizeof(data));
-               if (tb[NL80211_ATTR_REASON_CODE])
+               if (tb[NL80211_ATTR_REASON_CODE]) {
                        data.disassoc_info.reason_code =
                                nla_get_u16(tb[NL80211_ATTR_REASON_CODE]);
+#ifdef ANDROID
+                       if (data.disassoc_info.reason_code == WLAN_REASON_UNSPECIFIED)
+                               wpa_msg(drv->ctx, MSG_INFO,
+                                       WPA_EVENT_DRIVER_STATE "HANGED");
+#endif
+               }
                wpa_supplicant_event(drv->ctx, EVENT_DISASSOC, &data);
                break;
        case NL80211_CMD_MICHAEL_MIC_FAILURE: