|
@@ -27,15 +27,21 @@
|
|
#include "wlan_policy_mgr_api.h"
|
|
#include "wlan_policy_mgr_api.h"
|
|
#include "wlan_p2p_ucfg_api.h"
|
|
#include "wlan_p2p_ucfg_api.h"
|
|
#include "wlan_tdls_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,
|
|
QDF_STATUS if_mgr_connect_start(struct wlan_objmgr_vdev *vdev,
|
|
struct if_mgr_event_data *event_data)
|
|
struct if_mgr_event_data *event_data)
|
|
{
|
|
{
|
|
uint8_t sta_cnt, sap_cnt;
|
|
uint8_t sta_cnt, sap_cnt;
|
|
|
|
+ struct wlan_objmgr_pdev *pdev;
|
|
struct wlan_objmgr_psoc *psoc;
|
|
struct wlan_objmgr_psoc *psoc;
|
|
enum QDF_OPMODE op_mode;
|
|
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)
|
|
if (!psoc)
|
|
return QDF_STATUS_E_FAILURE;
|
|
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,
|
|
ucfg_nan_check_and_disable_unsupported_ndi(psoc,
|
|
false);
|
|
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;
|
|
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
|
|
* Firmware doesn't support connection on one STA iface
|
|
* while roaming on other 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 {
|
|
} else {
|
|
/* notify connect failure on final failure */
|
|
/* 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
|
|
* Firmware doesn't support connection on one STA iface
|
|
* while roaming on other 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);
|
|
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)
|
|
if (!psoc)
|
|
return QDF_STATUS_E_FAILURE;
|
|
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);
|
|
RSO_INVALID_REQUESTOR);
|
|
if (status) {
|
|
if (status) {
|
|
ifmgr_err("Failed to enable roaming after p2p disconnect");
|
|
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);
|
|
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) {
|
|
if (status) {
|
|
ifmgr_err("Failed to enable roaming on connected sta");
|
|
ifmgr_err("Failed to enable roaming on connected sta");
|
|
return status;
|
|
return status;
|