return _wifi_update_ap_info(profile_info);
}
+
+EXPORT_API int wifi_ap_get_disconnect_reason(wifi_ap_h ap,
+ wifi_disconnect_reason_e *disconnect_reason)
+{
+
+ CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+ int rv = NET_ERR_NONE;
+
+ if (_wifi_libnet_check_ap_validity(ap) == false || disconnect_reason == NULL) {
+ WIFI_LOG(WIFI_ERROR,"[App<--TizenMW] Wrong Parameter Passed\n");
+ return WIFI_ERROR_INVALID_PARAMETER;
+ }
+
+ net_profile_info_t *profile_info = ap;
+ net_profile_info_t ap_info_local;
+
+ rv = net_get_profile_info(profile_info->ProfileName, &ap_info_local);
+ if (rv == NET_ERR_ACCESS_DENIED) {
+ WIFI_LOG(WIFI_ERROR, "Access denied");
+ return WIFI_ERROR_PERMISSION_DENIED;
+ } else if (rv != NET_ERR_NONE) {
+ WIFI_LOG(WIFI_ERROR, "Failed to Get profile_info");
+ return WIFI_ERROR_OPERATION_FAILED;
+ }
+
+ *disconnect_reason = ap_info_local.ProfileInfo.Wlan.disconnect_reason;
+
+ WIFI_LOG(WIFI_INFO, "[App<--TizenMW]disconnect_reason %d\n",
+ *disconnect_reason);
+
+ return WIFI_ERROR_NONE;
+}
#endif /* #if defined TIZEN_TV */
wifi_encryption_type_e enc_type;
wifi_eap_type_e eap_type;
wifi_eap_auth_type_e eap_auth_type;
+#if defined TIZEN_TV
+ wifi_disconnect_reason_e disconnect_reason;
+#endif
bool bool_value;
char *ap_name_part = (char*)user_data;
#if defined TIZEN_TV
printf("WPS supported : %s\n", bool_value ? "TRUE" : "FALSE");
else
printf("Fail to get WPS supported\n");
-
+#if defined TIZEN_TV
+ if (wifi_ap_get_disconnect_reason(ap, &disconnect_reason) == WIFI_ERROR_NONE)
+ printf("Disconnect Reason of AP : %d\n", disconnect_reason);
+ else
+ printf("Fail to get Disconnect Reason\n");
+#endif
if (sec_type != WIFI_SECURITY_TYPE_EAP) {
g_free(ap_name);
return false;