qcacld-3.0: Modify connect start code in if mgr
Modify connect start code in interface manager by moving disable roam and tdls link teardown notify APIs from HDD to if mgr. Alongside, move tdls link teardown notify API from HDD to if mgr in start bss API. Also, move the tdls link teardown API to TDLS module from HDD module as TDLS should manage the wait logic. Change-Id: I09fa31878563a3daaa7c5fde46327475829317b3 CRs-Fixed: 2811807
This commit is contained in:

committed by
snandini

parent
c9cd665a5c
commit
370f376c02
@@ -56,8 +56,8 @@ struct bssid_search_arg {
|
||||
|
||||
/**
|
||||
* if_mgr_enable_roaming() - interface manager enable roaming
|
||||
* @vdev: vdev object
|
||||
* @pdev: pdev object
|
||||
* @vdev: vdev object
|
||||
* @requestor: RSO enable requestor
|
||||
*
|
||||
* Interface manager api to enable roaming for all other active vdev id's
|
||||
@@ -66,14 +66,14 @@ struct bssid_search_arg {
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS if_mgr_enable_roaming(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
QDF_STATUS if_mgr_enable_roaming(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
enum wlan_cm_rso_control_requestor requestor);
|
||||
|
||||
/**
|
||||
* if_mgr_disable_roaming() - interface manager disable roaming
|
||||
* @vdev: vdev object
|
||||
* @pdev: pdev object
|
||||
* @vdev: vdev object
|
||||
* @requestor: RSO disable requestor
|
||||
*
|
||||
* Interface manager api to disable roaming for all other active vdev id's
|
||||
@@ -82,15 +82,15 @@ QDF_STATUS if_mgr_enable_roaming(struct wlan_objmgr_vdev *vdev,
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS if_mgr_disable_roaming(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
QDF_STATUS if_mgr_disable_roaming(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
enum wlan_cm_rso_control_requestor requestor);
|
||||
|
||||
/**
|
||||
* if_mgr_enable_roaming_on_connected_sta() - interface manager disable roaming
|
||||
* on connected STA
|
||||
* @vdev: vdev object
|
||||
* @pdev: pdev object
|
||||
* @vdev: vdev object
|
||||
*
|
||||
* Loops through connected vdevs and disables roaming if it is STA
|
||||
*
|
||||
@@ -99,14 +99,14 @@ QDF_STATUS if_mgr_disable_roaming(struct wlan_objmgr_vdev *vdev,
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
if_mgr_enable_roaming_on_connected_sta(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_objmgr_pdev *pdev);
|
||||
if_mgr_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* if_mgr_enable_roaming_after_p2p_disconnect() - interface manager enable
|
||||
* roaming after p2p disconnect
|
||||
* @vdev: vdev object
|
||||
* @pdev: pdev object
|
||||
* @vdev: vdev object
|
||||
* @requestor: RSO enable requestor
|
||||
*
|
||||
* Disables roaming on p2p vdevs if the state is disconnected
|
||||
@@ -116,8 +116,8 @@ if_mgr_enable_roaming_on_connected_sta(struct wlan_objmgr_vdev *vdev,
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS if_mgr_enable_roaming_after_p2p_disconnect(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
enum wlan_cm_rso_control_requestor requestor);
|
||||
|
||||
/**
|
||||
|
@@ -50,8 +50,8 @@ static void if_mgr_enable_roaming_on_vdev(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
}
|
||||
|
||||
QDF_STATUS if_mgr_enable_roaming(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
QDF_STATUS if_mgr_enable_roaming(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
enum wlan_cm_rso_control_requestor requestor)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
@@ -95,8 +95,8 @@ static void if_mgr_disable_roaming_on_vdev(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
}
|
||||
|
||||
QDF_STATUS if_mgr_disable_roaming(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
QDF_STATUS if_mgr_disable_roaming(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
enum wlan_cm_rso_control_requestor requestor)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
@@ -117,8 +117,8 @@ QDF_STATUS if_mgr_disable_roaming(struct wlan_objmgr_vdev *vdev,
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
if_mgr_enable_roaming_on_connected_sta(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_objmgr_pdev *pdev)
|
||||
if_mgr_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
uint8_t vdev_id;
|
||||
@@ -140,8 +140,8 @@ if_mgr_enable_roaming_on_connected_sta(struct wlan_objmgr_vdev *vdev,
|
||||
}
|
||||
|
||||
QDF_STATUS if_mgr_enable_roaming_after_p2p_disconnect(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
enum wlan_cm_rso_control_requestor requestor)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "wlan_policy_mgr_api.h"
|
||||
#include "wlan_if_mgr_main.h"
|
||||
#include "wlan_p2p_cfg_api.h"
|
||||
#include "wlan_tdls_api.h"
|
||||
|
||||
QDF_STATUS if_mgr_ap_start_bss(struct wlan_objmgr_vdev *vdev,
|
||||
struct if_mgr_event_data *event_data)
|
||||
@@ -40,6 +41,8 @@ QDF_STATUS if_mgr_ap_start_bss(struct wlan_objmgr_vdev *vdev,
|
||||
if (!psoc)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
wlan_tdls_teardown_links_sync(psoc);
|
||||
|
||||
if (policy_mgr_is_hw_mode_change_in_progress(psoc)) {
|
||||
if (!QDF_IS_STATUS_SUCCESS(
|
||||
policy_mgr_wait_for_connection_update(psoc))) {
|
||||
@@ -50,7 +53,7 @@ QDF_STATUS if_mgr_ap_start_bss(struct wlan_objmgr_vdev *vdev,
|
||||
|
||||
if (policy_mgr_is_sta_active_connection_exists(psoc))
|
||||
/* Disable Roaming on all vdev's before starting bss */
|
||||
if_mgr_disable_roaming(vdev, pdev, RSO_START_BSS);
|
||||
if_mgr_disable_roaming(pdev, vdev, RSO_START_BSS);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -82,7 +85,7 @@ if_mgr_ap_start_bss_complete(struct wlan_objmgr_vdev *vdev,
|
||||
ifmgr_debug("p2p go mode, keep roam disabled");
|
||||
} else {
|
||||
/* Enable Roaming after start bss in case of failure/success */
|
||||
if_mgr_enable_roaming(vdev, pdev, RSO_START_BSS);
|
||||
if_mgr_enable_roaming(pdev, vdev, RSO_START_BSS);
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -119,7 +122,7 @@ if_mgr_ap_stop_bss_complete(struct wlan_objmgr_vdev *vdev,
|
||||
if (cfg_p2p_is_roam_config_disabled(psoc) &&
|
||||
wlan_vdev_mlme_get_opmode(vdev) == QDF_P2P_GO_MODE) {
|
||||
ifmgr_debug("p2p go disconnected enable roam");
|
||||
if_mgr_enable_roaming(vdev, pdev, RSO_START_BSS);
|
||||
if_mgr_enable_roaming(pdev, vdev, RSO_START_BSS);
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
@@ -27,15 +27,21 @@
|
||||
#include "wlan_policy_mgr_api.h"
|
||||
#include "wlan_p2p_ucfg_api.h"
|
||||
#include "wlan_tdls_ucfg_api.h"
|
||||
#include "wlan_tdls_api.h"
|
||||
|
||||
QDF_STATUS if_mgr_connect_start(struct wlan_objmgr_vdev *vdev,
|
||||
struct if_mgr_event_data *event_data)
|
||||
{
|
||||
uint8_t sta_cnt, sap_cnt;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
enum QDF_OPMODE op_mode;
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
pdev = wlan_vdev_get_pdev(vdev);
|
||||
if (!pdev)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
psoc = wlan_pdev_get_psoc(pdev);
|
||||
if (!psoc)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
@@ -68,6 +74,16 @@ QDF_STATUS if_mgr_connect_start(struct wlan_objmgr_vdev *vdev,
|
||||
ucfg_nan_check_and_disable_unsupported_ndi(psoc,
|
||||
false);
|
||||
|
||||
/*
|
||||
* In case of STA+STA concurrency, firmware might try to roam
|
||||
* to same AP where host is trying to do association on the other
|
||||
* STA iface. Roaming is disabled on all the ifaces to avoid
|
||||
* this scenario.
|
||||
*/
|
||||
if_mgr_disable_roaming(pdev, vdev, RSO_CONNECT_START);
|
||||
|
||||
wlan_tdls_teardown_links_sync(psoc);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -106,7 +122,7 @@ QDF_STATUS if_mgr_connect_complete(struct wlan_objmgr_vdev *vdev,
|
||||
* Firmware doesn't support connection on one STA iface
|
||||
* while roaming on other STA iface.
|
||||
*/
|
||||
if_mgr_enable_roaming(vdev, pdev, RSO_CONNECT_START);
|
||||
if_mgr_enable_roaming(pdev, vdev, RSO_CONNECT_START);
|
||||
}
|
||||
} else {
|
||||
/* notify connect failure on final failure */
|
||||
@@ -117,7 +133,7 @@ QDF_STATUS if_mgr_connect_complete(struct wlan_objmgr_vdev *vdev,
|
||||
* Firmware doesn't support connection on one STA iface
|
||||
* while roaming on other STA iface.
|
||||
*/
|
||||
if_mgr_enable_roaming(vdev, pdev, RSO_CONNECT_START);
|
||||
if_mgr_enable_roaming(pdev, vdev, RSO_CONNECT_START);
|
||||
}
|
||||
|
||||
policy_mgr_check_n_start_opportunistic_timer(psoc);
|
||||
@@ -161,7 +177,7 @@ QDF_STATUS if_mgr_disconnect_complete(struct wlan_objmgr_vdev *vdev,
|
||||
if (!psoc)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
status = if_mgr_enable_roaming_after_p2p_disconnect(vdev, pdev,
|
||||
status = if_mgr_enable_roaming_after_p2p_disconnect(pdev, vdev,
|
||||
RSO_INVALID_REQUESTOR);
|
||||
if (status) {
|
||||
ifmgr_err("Failed to enable roaming after p2p disconnect");
|
||||
@@ -170,7 +186,7 @@ QDF_STATUS if_mgr_disconnect_complete(struct wlan_objmgr_vdev *vdev,
|
||||
|
||||
policy_mgr_check_concurrent_intf_and_restart_sap(psoc);
|
||||
|
||||
status = if_mgr_enable_roaming_on_connected_sta(vdev, pdev);
|
||||
status = if_mgr_enable_roaming_on_connected_sta(pdev, vdev);
|
||||
if (status) {
|
||||
ifmgr_err("Failed to enable roaming on connected sta");
|
||||
return status;
|
||||
|
Reference in New Issue
Block a user