Merge "qcacld-3.0: Add start/stop bss changes in interface mgr" into wlan-cld3.driver.lnx.2.0

This commit is contained in:
CNSS_WLAN Service 2020-09-09 18:53:21 -07:00 • committed by Gerrit - the friendly Code Review server
commit a754b31818
5 changed files with 187 additions and 18 deletions

View file

@ -29,14 +29,34 @@
/**
* if_mgr_enable_roaming() - interface manager enable roaming
*
* Interface manager emable roaming
*
* @vdev: vdev object
* @pdev: pdev object
* @requestor: RSO disable requestor
*
* Interface manager api to enable roaming for all other active vdev id's
*
* Context: It should run in thread context
*
* Return: QDF_STATUS
*/
QDF_STATUS if_mgr_enable_roaming(struct wlan_objmgr_vdev *vdev,
struct wlan_objmgr_pdev *pdev);
struct wlan_objmgr_pdev *pdev,
enum wlan_cm_rso_control_requestor requestor);
/**
* if_mgr_disable_roaming() - interface manager disable roaming
* @vdev: vdev object
* @pdev: pdev object
* @requestor: RSO disable requestor
*
* Interface manager api to disable roaming for all other active vdev id's
*
* Context: It should run in thread context
*
* Return: QDF_STATUS
*/
QDF_STATUS if_mgr_disable_roaming(struct wlan_objmgr_vdev *vdev,
struct wlan_objmgr_pdev *pdev,
enum wlan_cm_rso_control_requestor requestor);
#endif

View file

@ -22,9 +22,20 @@
#include "wlan_objmgr_vdev_obj.h"
#include "wlan_policy_mgr_api.h"
#include "wlan_if_mgr_roam.h"
#include "wlan_cm_roam_api.h"
#include "wlan_if_mgr_main.h"
#include "wlan_p2p_ucfg_api.h"
QDF_STATUS if_mgr_enable_roaming(struct wlan_objmgr_vdev *vdev,
struct wlan_objmgr_pdev *pdev)
struct wlan_objmgr_pdev *pdev,
enum wlan_cm_rso_control_requestor requestor)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS if_mgr_disable_roaming(struct wlan_objmgr_vdev *vdev,
struct wlan_objmgr_pdev *pdev,
enum wlan_cm_rso_control_requestor requestor)
{
return QDF_STATUS_SUCCESS;
}

View file

@ -21,9 +21,105 @@
#include "wlan_objmgr_vdev_obj.h"
#include "wlan_if_mgr_public_struct.h"
#include "wlan_if_mgr_ap.h"
#include "wlan_if_mgr_roam.h"
#include "wlan_policy_mgr_api.h"
#include "wlan_if_mgr_main.h"
#include "wlan_p2p_cfg_api.h"
QDF_STATUS wlan_process_ap_start_bss(struct wlan_objmgr_vdev *vdev,
struct if_mgr_event_data *event_data)
QDF_STATUS if_mgr_ap_start_bss(struct wlan_objmgr_vdev *vdev,
struct if_mgr_event_data *event_data)
{
struct wlan_objmgr_psoc *psoc;
struct wlan_objmgr_pdev *pdev;
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;
if (policy_mgr_is_hw_mode_change_in_progress(psoc)) {
if (!QDF_IS_STATUS_SUCCESS(
policy_mgr_wait_for_connection_update(psoc))) {
ifmgr_err("qdf wait for event failed!!");
return QDF_STATUS_E_FAILURE;
}
}
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);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
if_mgr_ap_start_bss_complete(struct wlan_objmgr_vdev *vdev,
struct if_mgr_event_data *event_data)
{
struct wlan_objmgr_psoc *psoc;
struct wlan_objmgr_pdev *pdev;
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;
/*
* 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 (cfg_p2p_is_roam_config_disabled(psoc) &&
wlan_vdev_mlme_get_opmode(vdev) == QDF_P2P_GO_MODE) {
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);
}
return QDF_STATUS_SUCCESS;
}
QDF_STATUS if_mgr_ap_stop_bss(struct wlan_objmgr_vdev *vdev,
struct if_mgr_event_data *event_data)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
if_mgr_ap_stop_bss_complete(struct wlan_objmgr_vdev *vdev,
struct if_mgr_event_data *event_data)
{
struct wlan_objmgr_psoc *psoc;
struct wlan_objmgr_pdev *pdev;
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;
/*
* 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 (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);
}
return QDF_STATUS_SUCCESS;
}

View file

@ -24,8 +24,8 @@
#include "nan_ucfg_api.h"
#include "wlan_policy_mgr_api.h"
QDF_STATUS wlan_process_connect_start(struct wlan_objmgr_vdev *vdev,
struct if_mgr_event_data *event_data)
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_psoc *psoc;
@ -67,8 +67,8 @@ QDF_STATUS wlan_process_connect_start(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_process_connect_complete(struct wlan_objmgr_vdev *vdev,
struct if_mgr_event_data *event_data)
QDF_STATUS if_mgr_connect_complete(struct wlan_objmgr_vdev *vdev,
struct if_mgr_event_data *event_data)
{
return QDF_STATUS_SUCCESS;
}

View file

@ -94,6 +94,10 @@
#include "wlan_hdd_sta_info.h"
#include "ftm_time_sync_ucfg_api.h"
#include <wlan_hdd_dcs.h>
#ifdef WLAN_FEATURE_INTERFACE_MGR
#include "wlan_if_mgr_ucfg_api.h"
#include "wlan_if_mgr_public_struct.h"
#endif
#define ACS_SCAN_EXPIRY_TIMEOUT_S 4
@ -5115,7 +5119,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
int32_t i;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
uint8_t mcc_to_scc_switch = 0, conc_rule1 = 0;
struct sme_config_params *sme_config;
struct sme_config_params *sme_config = NULL;
bool mfp_capable = false;
bool mfp_required = false;
uint16_t prev_rsn_length = 0;
@ -5139,6 +5143,19 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
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);
if (!QDF_IS_STATUS_SUCCESS(status)) {
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);
@ -5147,7 +5164,9 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
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.
@ -5169,9 +5188,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
mac_handle = hdd_ctx->mac_handle;
/* Disable Roaming on all adapters before starting bss */
wlan_hdd_disable_roaming(adapter, RSO_START_BSS);
sme_config = qdf_mem_malloc(sizeof(*sme_config));
if (!sme_config) {
hdd_err("failed to allocate memory");
@ -5803,6 +5819,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
policy_mgr_incr_active_session(hdd_ctx->psoc,
adapter->device_mode,
adapter->vdev_id);
hdd_green_ap_start_state_mc(hdd_ctx, adapter->device_mode,
true);
}
@ -5822,7 +5839,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
goto free;
error:
/* Revert the indoor to passive marking if START BSS fails */
if (indoor_chnl_marking && adapter->device_mode == QDF_SAP_MODE) {
hdd_update_indoor_channel(hdd_ctx, false);
@ -5833,6 +5849,19 @@ 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);
if (!QDF_IS_STATUS_SUCCESS(status)) {
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
@ -5847,6 +5876,7 @@ free:
/* 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;
}
@ -5996,7 +6026,19 @@ 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);
if (!QDF_IS_STATUS_SUCCESS(status)) {
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
@ -6009,7 +6051,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
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;