int wifi_manager_is_5ghz_band_supported(wifi_manager_h wifi, bool *supported);
/**
+ * @brief Gets whether 6Ghz Wi-Fi band is supported.
+ * @since_tizen 8.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @param[in] wifi The Wi-Fi handle
+ * @param[out] supported @c true if 6Ghz Wi-Fi band is supported,
+ * otherwise @c false if 6Ghz Wi-Fi band is not supported.
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_MANAGER_ERROR_NONE Successful
+ * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed
+ * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
+ */
+int wifi_manager_is_6ghz_band_supported(wifi_manager_h wifi, bool *supported);
+
+/**
* @}
*/
return Error;
}
+int _net_dbus_get_6ghz_support(network_info_s *network_info, gboolean *supported)
+{
+ __NETWORK_FUNC_ENTER__;
+
+ net_err_e Error = NET_ERR_NONE;
+ GVariant *message = NULL;
+ GVariant *value = NULL;
+ GVariantIter *iter = NULL;
+ gchar *key = NULL;
+ gboolean is_6ghz_supported = FALSE;
+
+ message = _net_invoke_dbus_method(network_info,
+ CONNMAN_SERVICE, CONNMAN_WIFI_TECHNOLOGY_PREFIX,
+ CONNMAN_TECHNOLOGY_INTERFACE, "Get6GHzSupported",
+ NULL, &Error);
+ if (message == NULL) {
+ WIFI_LOG(WIFI_ERROR, "Failed to get technology properties");
+
+ __NETWORK_FUNC_EXIT__;
+ return Error;
+ }
+
+ g_variant_get(message, "(a{sv})", &iter);
+
+ while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
+ if (g_strcmp0(key, network_info->interface_name) == 0) {
+ is_6ghz_supported = g_variant_get_boolean(value);
+ g_variant_unref(value);
+ g_free(key);
+ break;
+ }
+ }
+
+ *supported = is_6ghz_supported;
+
+ WIFI_LOG(WIFI_INFO, "Successfully get 6GHz band supported: %d, ifname: %s",
+ *supported, network_info->interface_name);
+
+ g_variant_iter_free(iter);
+ g_variant_unref(message);
+
+ __NETWORK_FUNC_EXIT__;
+ return Error;
+}
+
int _net_dbus_get_auto_connect_mode(network_info_s *network_info,
int *connect_mode)
{
int _net_dbus_wifi_get_autoconnect(network_info_s *network_info,
const char *profile_name, gboolean *autoconnect);
int _net_dbus_get_5ghz_support(network_info_s *network_info, gboolean *supported);
+int _net_dbus_get_6ghz_support(network_info_s *network_info, gboolean *supported);
int _net_dbus_set_ip_conflict_period(network_info_s *network_info, unsigned int initial_time);
int _net_dbus_dpp_enter_peer_uri(network_info_s *network_info,
return NET_ERR_NONE;
}
+EXPORT_API int net_wifi_get_6ghz_support(network_info_s *network_info, gboolean *supported)
+{
+ __NETWORK_CAPI_FUNC_ENTER__;
+
+ net_err_e Error = NET_ERR_NONE;
+
+ if ((Error = _net_dbus_get_6ghz_support(network_info, supported)) != NET_ERR_NONE) {
+ WIFI_LOG(WIFI_ERROR,
+ "Failed to get 6 GHz band supported. Error [%s]",
+ _net_print_error(Error));
+
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return Error;
+ }
+
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return NET_ERR_NONE;
+}
+
EXPORT_API int net_wifi_get_auto_connect_mode(network_info_s *network_info,
int *connect_mode)
{
wifi_tech_state_e net_get_technology_state(network_info_s *network_info);
int net_get_service_state(network_info_s *network_info);
int net_wifi_get_5ghz_support(network_info_s *network_info, gboolean *supported);
+int net_wifi_get_6ghz_support(network_info_s *network_info, gboolean *supported);
int net_dpp_enter_peer_uri(network_info_s *network_info,
guint32 peer_id, guint32 own_id, const char *uri);
return rv;
}
+int _wifi_get_6ghz_support(wifi_manager_h wifi, bool *supported)
+{
+ int rv = NET_ERR_NONE;
+ wifi_manager_handle_s *wifi_handle = wifi;
+ gboolean is_supported = FALSE;
+
+ rv = net_wifi_get_6ghz_support(wifi_handle->network_info, &is_supported);
+ rv = __convert_to_ap_error_type(rv);
+
+ if (rv != WIFI_MANAGER_ERROR_NONE)
+ WIFI_LOG(WIFI_ERROR, "Failed to get 6 GHz band supported");
+
+ *supported = is_supported;
+ return rv;
+}
int _wifi_set_ap_auto_connect(wifi_manager_ap_h ap, bool autoconnect)
{
extern tizen_profile_t _get_tizen_profile();
int _wifi_get_service_state(wifi_manager_handle_s *wifi_handle);
int _wifi_get_5ghz_support(wifi_manager_h wifi, bool *supported);
+int _wifi_get_6ghz_support(wifi_manager_h wifi, bool *supported);
/* WIFI DPP */
return rv;
}
+EXPORT_API int wifi_manager_is_6ghz_band_supported(wifi_manager_h wifi, bool *supported)
+{
+ __NETWORK_CAPI_FUNC_ENTER__;
+
+ CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+ int rv;
+
+ RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
+
+ if (supported == 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
+ }
+
+ rv = _wifi_get_6ghz_support(wifi, supported);
+
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return rv;
+}
+
EXPORT_API int wifi_manager_is_activated(wifi_manager_h wifi, bool *activated)
{
__NETWORK_CAPI_FUNC_ENTER__;