DA: Standard error for customer self-diagnosis 29/283629/1
authorJaehyun Kim <jeik01.kim@samsung.com>
Mon, 31 Oct 2022 13:28:44 +0000 (22:28 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Mon, 31 Oct 2022 13:28:44 +0000 (22:28 +0900)
Change-Id: Ie222bb43c0128362324db57554fb9bba3fa7f140
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
plugins/wifi.c
src/network.c
src/service.c

index 46a886a..065d818 100755 (executable)
 static struct connman_technology *wifi_technology = NULL;
 static struct connman_technology *p2p_technology = NULL;
 
+#if defined TIZEN_EXT
+static GSupplicantState assoc_last_state = G_SUPPLICANT_STATE_UNKNOWN;
+#endif
+
 enum wifi_ap_capability{
        WIFI_AP_UNKNOWN         = 0,
        WIFI_AP_SUPPORTED       = 1,
@@ -4616,6 +4620,9 @@ static bool handle_wifi_assoc_retry(struct connman_network *network,
                return false;
        }
 
+       if (wifi->state > assoc_last_state)
+               assoc_last_state = wifi->state;
+
        if (++wifi->assoc_retry_count >= TIZEN_ASSOC_RETRY_COUNT) {
                wifi->assoc_retry_count = 0;
 
@@ -4623,7 +4630,7 @@ static bool handle_wifi_assoc_retry(struct connman_network *network,
                 * however QA team recommends that the invalid-key error
                 * might be better to display for user experience.
                 */
-               switch (wifi->state) {
+               switch (assoc_last_state) {
                case G_SUPPLICANT_STATE_AUTHENTICATING:
                        connman_network_set_error(network, CONNMAN_NETWORK_ERROR_AUTHENTICATE_FAIL);
                        break;
@@ -4909,6 +4916,9 @@ static void interface_state(GSupplicantInterface *interface)
                }
 
 #if defined TIZEN_EXT
+               if (wifi->assoc_retry_count == 0)
+                       assoc_last_state = G_SUPPLICANT_STATE_UNKNOWN;
+
                /* Some of Wi-Fi networks are not comply Wi-Fi specification.
                 * Retry association until its retry count is expired */
                if (handle_wifi_assoc_retry(network, wifi) == true) {
index abf88eb..e5c654e 100755 (executable)
@@ -1827,6 +1827,10 @@ static void set_authenticate_error(struct connman_network *network)
        if (!service)
                return;
 
+       if (connman_service_get_favorite(service)) {
+               __connman_service_set_ignore(service, true);
+       }
+
        __connman_service_indicate_error(service,
                                        CONNMAN_SERVICE_ERROR_AUTH_FAILED);
 }
index ef86e27..efc4143 100755 (executable)
@@ -6348,8 +6348,10 @@ static void set_error(struct connman_service *service,
 {
        const char *str;
 
+#if !defined TIZEN_EXT
        if (service->error == error)
                return;
+#endif
 
        service->error = error;