]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: P2P group idle
authorJouni Malinen <j@w1.fi>
Thu, 9 Aug 2012 19:40:05 +0000 (22:40 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 9 Aug 2012 20:18:32 +0000 (23:18 +0300)
wpa_supplicant/p2p_supplicant.c

index 0be698f5d3420be4b3be8c0980f584271a65d217..68b3c9b750b0682fbb45f3ca43af762a20581413 100644 (file)
  * How many seconds to try to reconnect to the GO when connection in P2P client
  * role has been lost.
  */
+#ifdef ANDROID_P2P
+#define P2P_MAX_CLIENT_IDLE 20
+#else
 #define P2P_MAX_CLIENT_IDLE 10
+#endif /* ANDROID_P2P */
 #endif /* P2P_MAX_CLIENT_IDLE */
 
 #ifdef ANDROID_P2P
@@ -3405,8 +3409,10 @@ static void wpas_p2p_idle_update(void *ctx, int idle)
        if (!wpa_s->ap_iface)
                return;
        wpa_printf(MSG_DEBUG, "P2P: GO - group %sidle", idle ? "" : "not ");
-       if (idle)
+       if (idle) {
+               wpa_printf(MSG_DEBUG,"Calling set group idle time out from idle_update");
                wpas_p2p_set_group_idle_timeout(wpa_s);
+       }
        else
                eloop_cancel_timeout(wpas_p2p_group_idle_timeout, wpa_s, NULL);
 }
@@ -3930,8 +3936,8 @@ static void wpas_p2p_group_idle_timeout(void *eloop_ctx, void *timeout_ctx)
                return;
        }
 
-       wpa_printf(MSG_DEBUG, "P2P: Group idle timeout reached - terminate "
-                  "group");
+       wpa_printf(MSG_DEBUG, "P2P: Group idle timeout reached - terminate %d"
+                  "group",wpa_s->conf->p2p_group_idle);
        wpa_s->removal_reason = P2P_GROUP_REMOVAL_IDLE_TIMEOUT;
        wpas_p2p_group_delete(wpa_s);
 }
@@ -4205,7 +4211,10 @@ void wpas_p2p_notif_disconnected(struct wpa_supplicant *wpa_s)
        if (!wpa_s->ap_iface &&
            !eloop_is_timeout_registered(wpas_p2p_group_idle_timeout,
                                         wpa_s, NULL))
+       {
+               wpa_printf(MSG_DEBUG,"Calling set grouple idle_timeout from notif_disconnected");
                wpas_p2p_set_group_idle_timeout(wpa_s);
+       }
 }