qcacld-3.0: Abort any ongoing p2p scans while enabling NAN

Framework disables p2p before enabling NAN as P2P+NAN concurrency
is not supported. NAN operations happens through wifihal and p2p
operations happen through wpa_supplicant which are two different
userspace components. Wifihal call to enable NAN may come to host
driver before disabling p2p through wpa_supplicant. There are high
chances for p2p scan to be in running state while NAN enable is
received. Firmware NAN state machine goes to inconsistent state
and disables NAN as p2p scan is running in such cases.
So, stop the ongoing p2p scan before enabling NAN as P2P+NAN
concurrency is not supported currently.
Also, forward the pdev to NAN component inorder to iterate through
all P2P vdevs.

Change-Id: Ibe30a5ebe90514aee4f6721cdc5476570524cad8
CRs-Fixed: 3054576
This commit is contained in:
Srinivas Dasari
2021-10-12 20:47:42 +05:30
committed by Madan Koyyalamudi
parent c7c5e7e32e
commit 3d0e41cad1
10 changed files with 88 additions and 16 deletions

View File

@@ -611,6 +611,7 @@ struct nan_disable_req {
* @social_chan_2g_freq: Social channel in 2G band for the NAN Discovery
* @social_chan_5g_freq: Social channel in 5G band for the NAN Discovery
* @params: NAN request structure containing message for the target
* @pdev: Pointer to the pdev object
*/
struct nan_enable_req {
struct wlan_objmgr_psoc *psoc;
@@ -618,6 +619,7 @@ struct nan_enable_req {
uint32_t social_chan_5g_freq;
/* Variable length, do not add anything after this */
struct nan_msg_params params;
struct wlan_objmgr_pdev *pdev;
};
/**

View File

@@ -36,6 +36,7 @@
#include "wlan_objmgr_vdev_obj.h"
#include "qdf_platform.h"
#include "wlan_osif_request_manager.h"
#include "wlan_p2p_api.h"
QDF_STATUS nan_set_discovery_state(struct wlan_objmgr_psoc *psoc,
enum nan_disc_state new_state)
@@ -1166,10 +1167,11 @@ pre_enable_failure:
return status;
}
QDF_STATUS nan_discovery_pre_enable(struct wlan_objmgr_psoc *psoc,
QDF_STATUS nan_discovery_pre_enable(struct wlan_objmgr_pdev *pdev,
uint32_t nan_ch_freq)
{
QDF_STATUS status = QDF_STATUS_E_INVAL;
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
status = nan_set_discovery_state(psoc, NAN_DISC_ENABLE_IN_PROGRESS);
@@ -1187,6 +1189,8 @@ QDF_STATUS nan_discovery_pre_enable(struct wlan_objmgr_psoc *psoc,
goto pre_enable_failure;
}
wlan_p2p_abort_scan(pdev);
if (policy_mgr_is_hw_dbs_capable(psoc)) {
status = nan_set_hw_mode(psoc, nan_ch_freq);
if (QDF_IS_STATUS_ERROR(status))

View File

@@ -239,12 +239,12 @@ QDF_STATUS nan_set_discovery_state(struct wlan_objmgr_psoc *psoc,
/*
* nan_discovery_pre_enable: Takes steps before sending NAN Enable to Firmware
* @psoc: PSOC object
* @pdev: pdev object
* @nan_ch_freq: Primary social channel for NAN Discovery
*
* Return: status of operation
*/
QDF_STATUS nan_discovery_pre_enable(struct wlan_objmgr_psoc *psoc,
QDF_STATUS nan_discovery_pre_enable(struct wlan_objmgr_pdev *pdev,
uint32_t nan_ch_freq);
/*