qcacld-3.0: Move pre_cac start code to pre_cac component

Move pre_cac start code flow from hdd to pre_cac component.

Change-Id: Ia3bd7521bff9571dee18dbc20b28d08b76128944
CRs-Fixed: 3199948
This commit is contained in:
Dundi Raviteja
2022-05-22 13:15:45 +05:30
committed by Madan Koyyalamudi
vanhempi 2de118fa97
commit 71fc4f3fd4
17 muutettua tiedostoa jossa 588 lisäystä ja 82 poistoa

Näytä tiedosto

@@ -856,6 +856,11 @@ QDF_STATUS wlan_sap_update_next_channel(struct sap_context *sap_ctx,
enum phy_ch_width chan_bw);
#if defined(FEATURE_SAP_COND_CHAN_SWITCH) && defined(PRE_CAC_SUPPORT)
/*
* Code under PRE_CAC_COMP will be cleaned up
* once pre cac component is done
*/
#ifndef PRE_CAC_COMP
/**
* wlan_sap_set_pre_cac_status() - Set the pre cac status
* @sap_ctx: SAP context
@@ -867,6 +872,7 @@ QDF_STATUS wlan_sap_update_next_channel(struct sap_context *sap_ctx,
*/
QDF_STATUS wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx,
bool status);
#endif
/**
* wlan_sap_set_chan_freq_before_pre_cac() - Save the channel before pre cac
@@ -881,11 +887,17 @@ QDF_STATUS
wlan_sap_set_chan_freq_before_pre_cac(struct sap_context *sap_ctx,
qdf_freq_t freq_before_pre_cac);
#else
/*
* Code under PRE_CAC_COMP will be cleaned up
* once pre cac component is done
*/
#ifndef PRE_CAC_COMP
static inline QDF_STATUS
wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx, bool status)
{
return QDF_STATUS_SUCCESS;
}
#endif
static inline QDF_STATUS
wlan_sap_set_chan_freq_before_pre_cac(struct sap_context *sap_ctx,
@@ -908,6 +920,11 @@ wlan_sap_set_chan_freq_before_pre_cac(struct sap_context *sap_ctx,
QDF_STATUS wlan_sap_set_pre_cac_complete_status(struct sap_context *sap_ctx,
bool status);
/*
* Code under PRE_CAC_COMP will be cleaned up
* once pre cac component is done
*/
#ifndef PRE_CAC_COMP
/**
* wlan_sap_is_pre_cac_context() - checks if @context is for a pre-cac adapter
* @context: the SAP context to check
@@ -918,6 +935,7 @@ bool wlan_sap_is_pre_cac_context(struct sap_context *context);
bool wlan_sap_is_pre_cac_active(mac_handle_t handle);
QDF_STATUS wlan_sap_get_pre_cac_vdev_id(mac_handle_t handle, uint8_t *vdev_id);
#endif /* PRE_CAC_COMP */
#else
static inline QDF_STATUS
wlan_sap_set_pre_cac_complete_status(struct sap_context *sap_ctx,
@@ -926,6 +944,11 @@ wlan_sap_set_pre_cac_complete_status(struct sap_context *sap_ctx,
return QDF_STATUS_SUCCESS;
}
/*
* Code under PRE_CAC_COMP will be cleaned up
* once pre cac component is done
*/
#ifndef PRE_CAC_COMP
static inline bool
wlan_sap_is_pre_cac_context(struct sap_context *context)
{
@@ -937,6 +960,7 @@ static inline bool wlan_sap_is_pre_cac_active(mac_handle_t handle)
return false;
}
#endif
#endif
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
/**

Näytä tiedosto

@@ -52,6 +52,7 @@
#include "wlan_reg_services_api.h"
#include <wlan_scan_api.h>
#include <wlan_scan_utils_api.h>
#include "wlan_pre_cac_api.h"
/* IF MGR API header file */
#include "wlan_if_mgr_ucfg_api.h"
@@ -1123,12 +1124,21 @@ QDF_STATUS wlansap_roam_callback(void *ctx,
sap_ctx->chan_freq);
goto EXIT;
}
/*
* Code under PRE_CAC_COMP will be cleaned up
* once pre cac component is done
*/
#ifndef PRE_CAC_COMP
if (sap_ctx->is_pre_cac_on) {
wlan_sap_pre_cac_radar_ind(sap_ctx, mac_ctx);
break;
}
#else
if (wlan_pre_cac_get_status(mac_ctx->psoc)) {
wlan_sap_pre_cac_radar_ind(sap_ctx, mac_ctx);
break;
}
#endif
sap_debug("sapdfs: Indicate eSAP_DFS_RADAR_DETECT to HDD");
sap_signal_hdd_event(sap_ctx, NULL, eSAP_DFS_RADAR_DETECT,
(void *) eSAP_STATUS_SUCCESS);

Näytä tiedosto

@@ -60,6 +60,7 @@
#include "cfg_ucfg_api.h"
#include "wlan_mlme_vdev_mgr_interface.h"
#include "wlan_vdev_mgr_utils_api.h"
#include "wlan_pre_cac_api.h"
/*----------------------------------------------------------------------------
* Preprocessor Definitions and Constants
@@ -1475,7 +1476,15 @@ QDF_STATUS sap_set_session_param(mac_handle_t mac_handle,
int i;
sapctx->sessionId = session_id;
/*
* Code under PRE_CAC_COMP will be cleaned up
* once pre cac component is done
*/
#ifndef PRE_CAC_COMP
sapctx->is_pre_cac_on = false;
#else
wlan_pre_cac_set_status(sapctx->vdev, false);
#endif
sapctx->pre_cac_complete = false;
sapctx->freq_before_pre_cac = 0;
@@ -2762,7 +2771,15 @@ QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
* temporary interface created for pre cac and switch
* the original SAP to the pre CAC channel.
*/
/*
* Code under PRE_CAC_COMP will be cleaned up
* once pre cac component is done
*/
#ifndef PRE_CAC_COMP
if (sap_context->is_pre_cac_on) {
#else
if (wlan_pre_cac_get_status(mac->psoc)) {
#endif
qdf_status = wlansap_update_pre_cac_end(
sap_context, mac, intf);
if (QDF_IS_STATUS_ERROR(qdf_status))

Näytä tiedosto

@@ -217,7 +217,13 @@ struct sap_context {
eSapHddEvent sap_state;
eSapStatus sap_status;
uint32_t roc_ind_scan_id;
/*
* Code under PRE_CAC_COMP will be cleaned up
* once pre cac component is done
*/
#ifndef PRE_CAC_COMP
bool is_pre_cac_on;
#endif
bool pre_cac_complete;
bool vendor_acs_dfs_lte_enabled;
uint8_t dfs_vendor_channel;

Näytä tiedosto

@@ -1660,6 +1660,11 @@ QDF_STATUS wlan_sap_update_next_channel(struct sap_context *sap_ctx,
}
#if defined(FEATURE_SAP_COND_CHAN_SWITCH) && defined(PRE_CAC_SUPPORT)
/*
* Code under PRE_CAC_COMP will be cleaned up
* once pre cac component is done
*/
#ifndef PRE_CAC_COMP
QDF_STATUS wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx,
bool status)
{
@@ -1673,6 +1678,7 @@ QDF_STATUS wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx,
return QDF_STATUS_SUCCESS;
}
#endif
QDF_STATUS
wlan_sap_set_chan_freq_before_pre_cac(struct sap_context *sap_ctx,
@@ -1705,6 +1711,11 @@ QDF_STATUS wlan_sap_set_pre_cac_complete_status(struct sap_context *sap_ctx,
return QDF_STATUS_SUCCESS;
}
/*
* Code under PRE_CAC_COMP will be cleaned up
* once pre cac component is done
*/
#ifndef PRE_CAC_COMP
bool wlan_sap_is_pre_cac_context(struct sap_context *context)
{
return context && context->is_pre_cac_on;
@@ -1769,7 +1780,8 @@ QDF_STATUS wlan_sap_get_pre_cac_vdev_id(mac_handle_t handle, uint8_t *vdev_id)
}
return QDF_STATUS_E_FAILURE;
}
#endif
#endif /* PRE_CAC_COMP */
#endif /* PRE_CAC_SUPPORT */
void wlansap_get_sec_channel(uint8_t sec_ch_offset,
uint32_t op_chan_freq,