qcacld-3.0: Simplify pre-cac flush prevention
Change I875c2f14ffd54272fc9ea0df1cecc6dd1171e310 introduced an elaborate workaround to prevent the pre-cac work from flushing itself during stop adapter. Introduce a less complicated work around by simply checking if the current adapter is the pre-cac adapter before flushing the pre-cac work. Change-Id: Ib3e0716f8d088d124e960dcd724f579fb39a3d74 CRs-Fixed: 2387173
Esse commit está contido em:
@@ -643,15 +643,15 @@ typedef struct sSapDfsInfo {
|
||||
uint16_t reduced_beacon_interval;
|
||||
} tSapDfsInfo;
|
||||
|
||||
typedef struct tagSapCtxList {
|
||||
struct sap_ctx_list {
|
||||
void *sap_context;
|
||||
enum QDF_OPMODE sapPersona;
|
||||
} tSapCtxList, tpSapCtxList;
|
||||
};
|
||||
|
||||
typedef struct tagSapStruct {
|
||||
/* Information Required for SAP DFS Master mode */
|
||||
tSapDfsInfo SapDfsInfo;
|
||||
tSapCtxList sapCtxList[SAP_MAX_NUM_SESSION];
|
||||
struct sap_ctx_list sapCtxList[SAP_MAX_NUM_SESSION];
|
||||
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
|
||||
bool sap_channel_avoidance;
|
||||
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
|
||||
@@ -882,6 +882,14 @@ QDF_STATUS wlan_sap_set_chan_before_pre_cac(struct sap_context *sap_ctx,
|
||||
QDF_STATUS wlan_sap_set_pre_cac_complete_status(struct sap_context *sap_ctx,
|
||||
bool status);
|
||||
|
||||
/**
|
||||
* wlan_sap_is_pre_cac_context() - checks if @context is for a pre-cac adapter
|
||||
* @context: the SAP context to check
|
||||
*
|
||||
* Return: true if @context is for a pre-cac adapter
|
||||
*/
|
||||
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);
|
||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
|
@@ -1518,6 +1518,11 @@ QDF_STATUS wlan_sap_set_pre_cac_complete_status(struct sap_context *sap_ctx,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool wlan_sap_is_pre_cac_context(struct sap_context *context)
|
||||
{
|
||||
return context && context->is_pre_cac_on;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_sap_is_pre_cac_active() - Checks if pre cac in in progress
|
||||
* @handle: Global MAC handle
|
||||
@@ -1529,6 +1534,7 @@ QDF_STATUS wlan_sap_set_pre_cac_complete_status(struct sap_context *sap_ctx,
|
||||
bool wlan_sap_is_pre_cac_active(mac_handle_t handle)
|
||||
{
|
||||
struct mac_context *mac = NULL;
|
||||
struct sap_ctx_list *ctx_list;
|
||||
int i;
|
||||
|
||||
mac = MAC_CONTEXT(handle);
|
||||
@@ -1538,12 +1544,12 @@ bool wlan_sap_is_pre_cac_active(mac_handle_t handle)
|
||||
return false;
|
||||
}
|
||||
|
||||
ctx_list = mac->sap.sapCtxList;
|
||||
for (i = 0; i < SAP_MAX_NUM_SESSION; i++) {
|
||||
struct sap_context *context =
|
||||
mac->sap.sapCtxList[i].sap_context;
|
||||
if (context && context->is_pre_cac_on)
|
||||
if (wlan_sap_is_pre_cac_context(ctx_list[i].sap_context))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Referência em uma nova issue
Block a user