diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 068e11cceb..8f21685c8a 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -77,11 +77,8 @@ #include #include "wlan_pkt_capture_ucfg_api.h" - -#ifdef WLAN_FEATURE_INTERFACE_MGR #include "wlan_if_mgr_ucfg_api.h" #include "wlan_if_mgr_public_struct.h" -#endif #include "wlan_cm_public_struct.h" #include "osif_cm_util.h" #include "wlan_hdd_cm_api.h" @@ -1801,25 +1798,6 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, /* indicate 'disconnect' status to wpa_supplicant... */ hdd_send_association_event(dev, roam_info); - /* - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifndef WLAN_FEATURE_INTERFACE_MGR - /* - * Due to audio share glitch with P2P clients due - * to roam scan on concurrent interface, disable - * roaming if "p2p_disable_roam" ini is enabled. - * Re-enable roaming again once the p2p client - * gets disconnected. - */ - if (ucfg_p2p_is_roam_config_disabled(hdd_ctx->psoc) && - adapter->device_mode == QDF_P2P_CLIENT_MODE) { - hdd_debug("P2P client disconnected, enable roam"); - wlan_hdd_enable_roaming(adapter, RSO_CONNECT_START); - } -#endif - /* indicate disconnected event to nl80211 */ /* * Only send indication to kernel if not initiated @@ -1885,19 +1863,6 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, hdd_conn_set_connection_state(adapter, eConnectionState_NotConnected); - /* - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifndef WLAN_FEATURE_INTERFACE_MGR - policy_mgr_check_concurrent_intf_and_restart_sap(hdd_ctx->psoc); -#endif - - /* - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifdef WLAN_FEATURE_INTERFACE_MGR vdev = hdd_objmgr_get_vdev_by_user(adapter, WLAN_OSIF_ID); if (vdev) { ucfg_if_mgr_deliver_event(vdev, @@ -1905,17 +1870,6 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, NULL); hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID); } -#else - if (policy_mgr_is_sta_active_connection_exists(hdd_ctx->psoc) && - QDF_STA_MODE == adapter->device_mode) { - if (mac_handle) - sme_enable_roaming_on_connected_sta( - mac_handle, - adapter->vdev_id); - policy_mgr_set_pcl_for_connected_vdev(hdd_ctx->psoc, - adapter->vdev_id, true); - } -#endif __hdd_cm_disconnect_handler_post_user_update(adapter); /* Unblock anyone waiting for disconnect to complete */ @@ -2691,9 +2645,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, mac_handle_t mac_handle; uint32_t conn_info_freq; void *soc = cds_get_context(QDF_MODULE_ID_SOC); -#ifdef WLAN_FEATURE_INTERFACE_MGR struct if_mgr_event_data *connect_complete; -#endif if (!hdd_ctx) { hdd_err("HDD context is NULL"); @@ -2741,38 +2693,6 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, hdd_conn_set_connection_state(adapter, eConnectionState_Associated); } - /* - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifndef WLAN_FEATURE_INTERFACE_MGR - /* - * Due to audio share glitch with P2P clients caused - * by roam scan on concurrent interface, disable - * roaming if "p2p_disable_roam" ini is enabled. - * Donot re-enable roaming again on other STA interface - * if p2p client connection is active on any vdev. - */ - if (ucfg_p2p_is_roam_config_disabled(hdd_ctx->psoc) && - adapter->device_mode == QDF_P2P_CLIENT_MODE) { - hdd_debug("p2p cli active keep roam disabled"); - } else { - /* - * On successful association. set the vdev PCL for the - * already existing STA which was connected first - */ - policy_mgr_set_pcl_for_connected_vdev(hdd_ctx->psoc, - adapter->vdev_id, - false); - - /* - * Enable roaming on other STA iface except this one. - * Firmware dosent support connection on one STA iface - * while roaming on other STA iface - */ - wlan_hdd_enable_roaming(adapter, RSO_CONNECT_START); - } -#endif /* Save the connection info from CSR... */ hdd_conn_save_connect_info(adapter, roam_info, eCSR_BSS_TYPE_INFRASTRUCTURE); @@ -3226,7 +3146,6 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, * Following code will be cleaned once the interface manager * module is enabled. */ -#ifdef WLAN_FEATURE_INTERFACE_MGR connect_complete = qdf_mem_malloc(sizeof(*connect_complete)); if (!connect_complete) return QDF_STATUS_E_NOMEM; @@ -3238,12 +3157,6 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, WLAN_IF_MGR_EV_CONNECT_COMPLETE, connect_complete); qdf_mem_free(connect_complete); -#else - policy_mgr_check_n_start_opportunistic_timer(hdd_ctx->psoc); - hdd_debug("check for SAP restart"); - policy_mgr_check_concurrent_intf_and_restart_sap( - hdd_ctx->psoc); -#endif } else { bool connect_timeout = false; if (roam_info && roam_info->is_fils_connection && @@ -3440,11 +3353,6 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, if (roam_status == eCSR_ROAM_ASSOCIATION_FAILURE || roam_status == eCSR_ROAM_CANCELLED) { - /* - * Following code will be cleaned once the interface - * manager module is enabled. - */ -#ifdef WLAN_FEATURE_INTERFACE_MGR connect_complete = qdf_mem_malloc(sizeof(*connect_complete)); if (!connect_complete) @@ -3459,23 +3367,6 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, connect_complete); qdf_mem_free(connect_complete); } -#else - /* notify connect failure on final failure */ - ucfg_tdls_notify_connect_failure(hdd_ctx->psoc); - /* do we need to change the HW mode on final failure */ - policy_mgr_check_n_start_opportunistic_timer( - hdd_ctx->psoc); - - /* - * Enable roaming on other STA iface except this one. - * Firmware dosent support connection on one STA iface - * while roaming on other STA iface - */ - wlan_hdd_enable_roaming(adapter, RSO_CONNECT_START); - } - - policy_mgr_check_concurrent_intf_and_restart_sap(hdd_ctx->psoc); -#endif } hdd_periodic_sta_stats_start(adapter); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 3cf41a7e73..1d91c9423c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -161,11 +161,8 @@ #include "wlan_hdd_twt.h" #include "wlan_hdd_gpio.h" #include "wlan_hdd_medium_assess.h" - -#ifdef WLAN_FEATURE_INTERFACE_MGR #include "wlan_if_mgr_ucfg_api.h" #include "wlan_if_mgr_public_struct.h" -#endif #include "wlan_wfa_ucfg_api.h" #include #include @@ -18805,11 +18802,6 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter, goto ret_status; } - /** - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifdef WLAN_FEATURE_INTERFACE_MGR vdev = hdd_objmgr_get_vdev_by_user(adapter, WLAN_OSIF_ID); if (!vdev) return -EINVAL; @@ -18817,12 +18809,6 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter, ucfg_if_mgr_deliver_event(vdev, WLAN_IF_MGR_EV_CONNECT_START, NULL); hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID); -#else - /* Disable roaming on all other adapters before connect start */ - wlan_hdd_disable_roaming(adapter, RSO_CONNECT_START); - - ucfg_tdls_teardown_links_sync(hdd_ctx->psoc); -#endif qdf_mem_zero(&hdd_sta_ctx->conn_info.conn_flag, sizeof(hdd_sta_ctx->conn_info.conn_flag)); @@ -20563,14 +20549,8 @@ static void wlan_hdd_wait_for_roaming(mac_handle_t mac_handle, if (sta_ctx->conn_info.conn_state != eConnectionState_Associated) return; - /* - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifdef WLAN_FEATURE_INTERFACE_MGR ucfg_if_mgr_deliver_event(adapter->vdev, WLAN_IF_MGR_EV_DISCONNECT_START, NULL); -#endif /* * If firmware has already started roaming process, driver * needs to wait for processing of this disconnect request. @@ -20791,15 +20771,6 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy, int status; uint32_t ch_freq; const u8 *bssid = NULL; - /* - * Following code will be cleaned up once the interface manager - * module is enabled - */ -#ifndef WLAN_FEATURE_INTERFACE_MGR - uint32_t sap_cnt, sta_cnt; - uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS], i; - bool disable_nan = true; -#endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) const u8 *bssid_hint = req->bssid_hint; @@ -20857,42 +20828,6 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy, hdd_dump_connect_req(adapter, ndev, req); - /* - * Following code will be cleaned up once the interface manager - * module is enabled - */ -#ifndef WLAN_FEATURE_INTERFACE_MGR - /* - * Disable NAN Discovery if incoming connection is P2P or if a STA - * connection already exists and if this is a case of STA+STA - * or SAP+STA concurrency - */ - sta_cnt = policy_mgr_get_mode_specific_conn_info(hdd_ctx->psoc, NULL, - vdev_id_list, - PM_STA_MODE); - sap_cnt = policy_mgr_get_mode_specific_conn_info(hdd_ctx->psoc, NULL, - &vdev_id_list[sta_cnt], - PM_SAP_MODE); - - if (adapter->device_mode == QDF_P2P_CLIENT_MODE || sap_cnt || sta_cnt) { - hdd_debug("Invalid NAN concurrency. SAP: %d STA: %d P2P: %d", - sap_cnt, sta_cnt, - (adapter->device_mode == QDF_P2P_CLIENT_MODE)); - for (i = 0; i < sta_cnt + sap_cnt; i++) - if (vdev_id_list[i] == vdev_id) - disable_nan = false; - if (disable_nan) - ucfg_nan_disable_concurrency(hdd_ctx->psoc); - } - /* - * STA+NDI concurrency gets preference over NDI+NDI. Disable - * first NDI in case an NDI+NDI concurrency exists if FW does - * not support 4 port concurrency of two NDI + NAN with STA. - */ - if (!ucfg_nan_is_sta_nan_ndi_4_port_allowed(hdd_ctx->psoc)) - ucfg_nan_check_and_disable_unsupported_ndi(hdd_ctx->psoc, - false); -#endif /* * In STA + STA roaming scenario, connection to same ssid but different * bssid is allowed on both vdevs. So there could be a race where the diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 474456d137..7d8cae3bd6 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -95,10 +95,8 @@ #include "ftm_time_sync_ucfg_api.h" #include #include "wlan_tdls_ucfg_api.h" -#ifdef WLAN_FEATURE_INTERFACE_MGR #include "wlan_if_mgr_ucfg_api.h" #include "wlan_if_mgr_public_struct.h" -#endif #include "wlan_hdd_bootup_marker.h" #define ACS_SCAN_EXPIRY_TIMEOUT_S 4 @@ -5181,23 +5179,11 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, if (policy_mgr_is_sta_mon_concurrency(hdd_ctx->psoc)) return -EINVAL; - /** - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifndef WLAN_FEATURE_INTERFACE_MGR - ucfg_tdls_teardown_links_sync(hdd_ctx->psoc); -#endif ucfg_mlme_get_sap_force_11n_for_11ac(hdd_ctx->psoc, &sap_force_11n_for_11ac); ucfg_mlme_get_go_force_11n_for_11ac(hdd_ctx->psoc, &go_force_11n_for_11ac); - /* - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifdef WLAN_FEATURE_INTERFACE_MGR status = ucfg_if_mgr_deliver_event(adapter->vdev, WLAN_IF_MGR_EV_AP_START_BSS, NULL); @@ -5205,18 +5191,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, hdd_err("start bss failed!!"); return -EINVAL; } -#else - if (policy_mgr_is_hw_mode_change_in_progress(hdd_ctx->psoc)) { - status = policy_mgr_wait_for_connection_update( - hdd_ctx->psoc); - if (!QDF_IS_STATUS_SUCCESS(status)) { - hdd_err("qdf wait for event failed!!"); - return -EINVAL; - } - } - /* Disable Roaming on all adapters before starting bss */ - wlan_hdd_disable_roaming(adapter, RSO_START_BSS); -#endif /* * For STA+SAP concurrency support from GUI, first STA connection gets * triggered and while it is in progress, SAP start also comes up. @@ -5898,11 +5872,6 @@ error: wlansap_reset_sap_config_add_ie(config, eUPDATE_IE_ALL); free: - /* - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifdef WLAN_FEATURE_INTERFACE_MGR status = ucfg_if_mgr_deliver_event(adapter->vdev, WLAN_IF_MGR_EV_AP_START_BSS_COMPLETE, NULL); @@ -5910,22 +5879,6 @@ free: hdd_err("start bss complete failed!!"); ret = -EINVAL; } -#else - /* - * Due to audio share glitch with P2P GO due - * to roam scan on concurrent interface, disable - * roaming if "p2p_disable_roam" ini is enabled. - * Donot re-enable roaming again on other STA interface - * if p2p GO is active on any vdev. - */ - if (ucfg_p2p_is_roam_config_disabled(hdd_ctx->psoc) && - adapter->device_mode == QDF_P2P_GO_MODE) { - hdd_debug("p2p go mode, keep roam disabled"); - } else { - /* Enable Roaming after start bss in case of failure/success */ - wlan_hdd_enable_roaming(adapter, RSO_START_BSS); - } -#endif qdf_mem_free(sme_config); return ret; } @@ -6076,11 +6029,6 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, adapter->vdev_id); hdd_green_ap_start_state_mc(hdd_ctx, adapter->device_mode, false); - /* - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifdef WLAN_FEATURE_INTERFACE_MGR status = ucfg_if_mgr_deliver_event(adapter->vdev, WLAN_IF_MGR_EV_AP_STOP_BSS_COMPLETE, NULL); @@ -6088,20 +6036,6 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, hdd_err("Stopping the BSS failed"); goto exit; } -#else - /* - * Due to audio share glitch with P2P GO due - * to roam scan on concurrent interface, disable - * roaming if "p2p_disable_roam" ini is enabled. - * Re-enable roaming on other STA interface if p2p GO - * is active on any vdev. - */ - if (ucfg_p2p_is_roam_config_disabled(hdd_ctx->psoc) && - adapter->device_mode == QDF_P2P_GO_MODE) { - hdd_debug("p2p go disconnected enable roam"); - wlan_hdd_enable_roaming(adapter, RSO_START_BSS); - } -#endif if (adapter->session.ap.beacon) { qdf_mem_free(adapter->session.ap.beacon); adapter->session.ap.beacon = NULL; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index b8b41b521b..cd3bc245db 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -74,11 +74,8 @@ #include "wlan_pkt_capture_ucfg_api.h" #include "wlan_psoc_mlme_api.h" #include "wlan_cm_roam_api.h" - -#ifdef WLAN_FEATURE_INTERFACE_MGR #include "wlan_if_mgr_public_struct.h" #include "wlan_if_mgr_ucfg_api.h" -#endif #define RSN_AUTH_KEY_MGMT_SAE WLAN_RSN_SEL(WLAN_AKM_SAE) #define MAX_PWR_FCC_CHAN_12 8 @@ -5225,13 +5222,8 @@ static bool csr_roam_select_bss(struct mac_context *mac_ctx, enum QDF_OPMODE op_mode; struct wlan_objmgr_vdev *vdev; QDF_STATUS qdf_status; -#ifdef WLAN_FEATURE_INTERFACE_MGR struct if_mgr_event_data event_data; struct validate_bss_data candidate_info; -#else - uint32_t temp_vdev_id; - enum policy_mgr_con_mode mode; -#endif vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac_ctx->pdev, vdev_id, @@ -5256,11 +5248,6 @@ static bool csr_roam_select_bss(struct mac_context *mac_ctx, result = &scan_result->Result; chan_freq = result->BssDescriptor.chan_freq; - /* - * Following code will be cleaned once the interface manager - * module is enabled. - */ -#ifdef WLAN_FEATURE_INTERFACE_MGR qdf_mem_copy(candidate_info.peer_addr.bytes, result->BssDescriptor.bssId, sizeof(tSirMacAddr)); @@ -5278,61 +5265,6 @@ static bool csr_roam_select_bss(struct mac_context *mac_ctx, LL_ACCESS_LOCK); continue; } -#else - /* - * Ignore the BSS if any other vdev is already connected - * to it. - */ - qdf_status = csr_roam_get_session_id_from_bssid(mac_ctx, - (struct qdf_mac_addr *) - &result->BssDescriptor.bssId, &temp_vdev_id); - if (QDF_IS_STATUS_SUCCESS(qdf_status)) { - sme_debug("vdev_id %d already connected to "QDF_MAC_ADDR_FMT". select next bss for vdev_id %d", - temp_vdev_id, - QDF_MAC_ADDR_REF(result->BssDescriptor.bssId), - vdev_id); - *roam_state = eCsrStopRoamingDueToConcurrency; - status = true; - *roam_bss_entry = csr_ll_next(&bss_list->List, - *roam_bss_entry, - LL_ACCESS_LOCK); - continue; - } - - mode = policy_mgr_convert_device_mode_to_qdf_type(op_mode); - /* If concurrency is not allowed select next bss */ - if (!policy_mgr_is_concurrency_allowed(mac_ctx->psoc, - mode, - chan_freq, - HW_MODE_20_MHZ)) { - sme_err("Concurrency not allowed for this channel freq %d bssid "QDF_MAC_ADDR_FMT", selecting next", - chan_freq, - QDF_MAC_ADDR_REF(result->BssDescriptor.bssId)); - *roam_state = eCsrStopRoamingDueToConcurrency; - status = true; - *roam_bss_entry = csr_ll_next(&bss_list->List, - *roam_bss_entry, - LL_ACCESS_LOCK); - continue; - } - - /* - * check if channel is allowed for current hw mode, if not fetch - * next BSS. - */ - if (!policy_mgr_is_hwmode_set_for_given_chnl( - mac_ctx->psoc, result->BssDescriptor.chan_freq)) { - sme_err("HW mode isn't properly set, freq %d BSSID "QDF_MAC_ADDR_FMT, - result->BssDescriptor.chan_freq, - QDF_MAC_ADDR_REF(result->BssDescriptor.bssId)); - *roam_state = eCsrStopRoamingDueToConcurrency; - status = true; - *roam_bss_entry = csr_ll_next(&bss_list->List, - *roam_bss_entry, - LL_ACCESS_LOCK); - continue; - } -#endif if (policy_mgr_concurrent_open_sessions_running(mac_ctx->psoc) && !csr_is_valid_mc_concurrent_session(mac_ctx, vdev_id, &result->BssDescriptor)) {