} wifi_manager_disconnect_reason_e;
+/**
+ * @brief Enumeration for Wi-Fi Association Status code, provided by the supplicant.
+ * @details The Wi-Fi Standard Reference : Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23).
+ * @since_tizen 5.0
+ */
+typedef enum {
+ /**
+ * Successful
+ */
+ WLAN_STATUS_SUCCESS = 0,
+
+ /**
+ * Unspecified failure
+ */
+ WLAN_STATUS_UNSPECIFIED_FAILURE = 1,
+
+ /**
+ * Responding STA does not support the specified authentication
+ * algorithm
+ */
+ WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13,
+
+ /**
+ * Association denied because AP is unable to handle additional
+ * associated STAs
+ */
+ WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17,
+
+ /**
+ * Association denied because the requesting STA does not support
+ * HT feature
+ */
+ WLAN_STATUS_ASSOC_DENIED_NO_HT = 27,
+
+ /**
+ * Association request rejected temporarily
+ */
+ WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY = 30,
+
+ /**
+ * Robust management frame policy violation
+ */
+ WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31,
+
+ /**
+ * Invalid element
+ */
+ WLAN_STATUS_INVALID_IE = 40,
+
+ /**
+ * Invalid group cipher
+ */
+ WLAN_STATUS_GROUP_CIPHER_NOT_VALID = 41,
+
+ /**
+ * Invalid pairwise cipher
+ */
+ WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID = 42,
+
+ /**
+ * Invalid AKMP
+ */
+ WLAN_STATUS_AKMP_NOT_VALID = 43,
+
+ /**
+ * Cipher suite rejected because of security policy
+ */
+ WLAN_STATUS_CIPHER_REJECTED_PER_POLICY = 46,
+
+ /**
+ * Association denied because the Listen interval is too large
+ */
+ WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE = 51,
+
+ /**
+ * Invalid pairwise master key identifier (PKMID)
+ */
+ WLAN_STATUS_INVALID_PMKID = 53,
+
+ /**
+ * Invalid MDE
+ */
+ WLAN_STATUS_INVALID_MDIE = 54,
+
+ /**
+ * Invalid FTE
+ */
+ WLAN_STATUS_INVALID_FTIE = 55,
+
+ /**
+ * Association denied because the requesting STA does not support
+ * VHT feature
+ */
+ WLAN_STATUS_ASSOC_DENIED_NO_VHT = 104,
+} wifi_manager_assoc_status_code_e;
/**
* @}
*/
int wifi_manager_ap_get_disconnect_reason(wifi_manager_ap_h ap,
wifi_manager_disconnect_reason_e *disconnect_reason);
-
/**
* @brief Gets the DNS config type.
* @since_tizen 4.0
*/
int wifi_manager_ap_get_error_state(wifi_manager_ap_h ap, wifi_manager_error_e *error_state);
+/**
+ * @brief Gets the Wi-Fi Association Status Code from the supplicant.
+ * @since_tizen 5.0
+ * @param[in] ap The access point handle
+ * @param[out] status_code The supplicant Wi-Fi association status code
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_MANAGER_ERROR_NONE Successful
+ * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
+ */
+
+int wifi_manager_ap_get_assoc_status_code(wifi_manager_ap_h ap,
+ wifi_manager_assoc_status_code_e *status_code);
/**
* @}
} else if (g_strcmp0(key, "DisconnectReason") == 0) {
ProfInfo->disconnect_reason = g_variant_get_int32(var);
+ } else if (g_strcmp0(key, "AssocStatusCode") == 0) {
+ ProfInfo->assoc_status_code = g_variant_get_int32(var);
+
} else if (g_strcmp0(key, "EAP") == 0) {
value = g_variant_get_string(var, NULL);
ProfInfo->security_info.enc_mode = 0;
ProfInfo->security_info.wps_support = FALSE;
ProfInfo->disconnect_reason = 0;
-
+ ProfInfo->assoc_status_code = 0;
net_info = &(ProfInfo->net_info);
net_info->DnsCount = 0;
return WIFI_MANAGER_ERROR_NONE;
}
+EXPORT_API int wifi_manager_ap_get_assoc_status_code(wifi_manager_ap_h ap,
+ wifi_manager_assoc_status_code_e *status_code)
+{
+ __NETWORK_CAPI_FUNC_ENTER__;
+
+ CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+ if (_wifi_check_ap_validity(ap) == false || status_code == NULL) {
+ WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+ __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+ }
+
+ net_profile_info_s *profile_info = ap;
+ *status_code = (int)profile_info->assoc_status_code;
+
+ WIFI_LOG(WIFI_INFO, "Association Status Code %d\n",
+ *status_code);
+
+ __NETWORK_CAPI_FUNC_EXIT__;
+
+ return WIFI_MANAGER_ERROR_NONE;
+}
+
EXPORT_API int wifi_manager_ap_foreach_ipv6_address(wifi_manager_ap_h ap,
wifi_manager_ap_ipv6_address_cb callback, void *user_data)
{
bool bool_value;
char *ap_name_part = (char*)user_data;
wifi_manager_disconnect_reason_e disconnect_reason;
+ wifi_manager_assoc_status_code_e status_code;
wifi_manager_rssi_level_e rssi_level;
char *vsie;
int length;
else
printf("Fail to get disconnect reason\n");
+ if (wifi_manager_ap_get_assoc_status_code(ap, &status_code)
+ == WIFI_MANAGER_ERROR_NONE)
+ printf("Association Status Code : %d\n", status_code);
+ else
+ printf("Fail to get association status code\n");
+
if (wifi_manager_ap_get_error_state(ap, &int_value) == WIFI_MANAGER_ERROR_NONE)
printf("error state of AP : %s\n", __test_convert_error_to_string(int_value));
else