Description : This can be used by application in case AP is denying association with status code
Change-Id: I195492be4320032b460b708034f044eec03b71dd
Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
void (*debug) (const char *str);
void (*disconnect_reasoncode)(GSupplicantInterface *interface,
int reasoncode);
+ void (*assoc_status_code)(GSupplicantInterface *interface,
+ int reasoncode);
};
typedef struct _GSupplicantCallbacks GSupplicantCallbacks;
reason_code);
}
+static void callback_assoc_status_code(GSupplicantInterface *interface,
+ int status_code)
+{
+ if (!callbacks_pointer)
+ return;
+
+ if (!callbacks_pointer->assoc_status_code)
+ return;
+
+ callbacks_pointer->assoc_status_code(interface, status_code);
+
+}
+
static void remove_group(gpointer data)
{
GSupplicantGroup *group = data;
dbus_message_iter_get_basic(iter, &reason_code);
callback_disconnect_reason_code(interface, reason_code);
}
+ } else if (g_strcmp0(key, "AssocStatusCode") == 0) {
+ int status_code;
+ if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_INVALID) {
+ dbus_message_iter_get_basic(iter, &status_code);
+ callback_assoc_status_code(interface, status_code);
+ }
} else
SUPPLICANT_DBG("key %s type %c",
key, dbus_message_iter_get_arg_type(iter));
#define P2P_LISTEN_PERIOD 500
#define P2P_LISTEN_INTERVAL 2000
+
static struct connman_technology *wifi_technology = NULL;
static struct connman_technology *p2p_technology = NULL;
bool allow_full_scan;
#endif
int disconnect_code;
+ int assoc_code;
};
#if defined TIZEN_EXT
connman_network_set_connected(network, true);
wifi->disconnect_code = 0;
+ wifi->assoc_code = 0;
break;
case G_SUPPLICANT_STATE_DISCONNECTED:
int reasoncode)
{
struct wifi_data *wifi = g_supplicant_interface_get_data(interface);
-
if (wifi != NULL) {
wifi->disconnect_code = reasoncode;
}
}
+static void assoc_status_code(GSupplicantInterface *interface, int status_code)
+{
+ struct wifi_data *wifi = g_supplicant_interface_get_data(interface);
+
+#if defined TIZEN_EXT
+ struct connman_network *network;
+#endif
+
+ if (wifi != NULL) {
+ wifi->assoc_code = status_code;
+
+#if defined TIZEN_EXT
+ network = wifi->network;
+ connman_network_set_assoc_status_code(network,status_code);
+#endif
+
+ }
+}
static const GSupplicantCallbacks callbacks = {
.system_ready = system_ready,
.network_merged = network_merged,
#endif
.disconnect_reasoncode = disconnect_reasoncode,
+ .assoc_status_code = assoc_status_code,
.debug = debug,
};
char *keymgmt_type;
bool rsn_mode;
int disconnect_reason;
+ int assoc_status_code;
void *wifi_vsie;
unsigned int wifi_vsie_len;
#endif
return network->wifi.disconnect_reason;
}
+
+int connman_network_set_assoc_status_code(struct connman_network *network,
+ int assoc_status_code)
+{
+
+ if (network == NULL)
+ return 0;
+
+ network->wifi.assoc_status_code = assoc_status_code;
+ return 0;
+}
+
+int connman_network_get_assoc_status_code(struct connman_network *network)
+{
+ if (network == NULL)
+ return 0;
+
+ return network->wifi.assoc_status_code;
+}
+
#endif
int connman_network_set_nameservers(struct connman_network *network,
*/
char *keymgmt_type;
int disconnect_reason;
+ int assoc_status_code;
#endif
#ifdef TIZEN_EXT
enum connman_dnsconfig_method dns_config_method_ipv4;
case CONNMAN_SERVICE_STATE_FAILURE:
#if defined TIZEN_EXT
+
+ service->assoc_status_code = connman_network_get_assoc_status_code(service->network);
+
if (service->type == CONNMAN_SERVICE_TYPE_WIFI)
service->order = 5;
__connman_service_auto_connect(CONNMAN_SERVICE_CONNECT_REASON_AUTO);