qcacld-3.0: Do not get nol since channel status of nol is disabled
Currently there is no need to get nol when removing nol from candidate channel list, because status of nol is set to CHANNEL_STATE_DISABLE in regulatory. Remove channels whose status are CHANNEL_STATE_DISABLE when trying to remove nol from candidate channel list. Change-Id: I90722116814e837fca456de1b2ef88d8519e9aff CRs-Fixed: 2180752
This commit is contained in:
@@ -1330,19 +1330,6 @@ void wlansap_extend_to_acs_range(tHalHandle hal, uint8_t *startChannelNum,
|
||||
uint8_t *endChannelNum, uint8_t *bandStartChannel,
|
||||
uint8_t *bandEndChannel);
|
||||
|
||||
/**
|
||||
* wlansap_get_dfs_nol() - Get the DFS NOL
|
||||
* @sap_ctx: SAP context
|
||||
* @nol: Pointer to the NOL
|
||||
* @nol_len: Length of the NOL
|
||||
*
|
||||
* Provides the DFS NOL
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlansap_get_dfs_nol(struct sap_context *sap_ctx,
|
||||
uint8_t *nol, uint32_t *nol_len);
|
||||
|
||||
/**
|
||||
* wlansap_set_dfs_nol() - Set dfs nol
|
||||
* @sap_ctx: SAP context
|
||||
|
@@ -2344,92 +2344,6 @@ QDF_STATUS wlan_sap_set_vendor_acs(struct sap_context *sap_context,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS wlansap_get_dfs_nol(struct sap_context *sap_ctx,
|
||||
uint8_t *nol, uint32_t *nol_len)
|
||||
{
|
||||
int i = 0, j = 0;
|
||||
void *hHal = NULL;
|
||||
tpAniSirGlobal pMac = NULL;
|
||||
uint64_t current_time, found_time, elapsed_time;
|
||||
unsigned long left_time;
|
||||
tSapDfsNolInfo *dfs_nol = NULL;
|
||||
bool bAvailable = false;
|
||||
*nol_len = 0;
|
||||
|
||||
if (NULL == sap_ctx) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer", __func__);
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB();
|
||||
if (NULL == hHal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer", __func__);
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
pMac = PMAC_STRUCT(hHal);
|
||||
|
||||
if (!pMac->sap.SapDfsInfo.numCurrentRegDomainDfsChannels) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
|
||||
"%s: DFS NOL is empty", __func__);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
dfs_nol = pMac->sap.SapDfsInfo.sapDfsChannelNolList;
|
||||
|
||||
if (!dfs_nol) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
|
||||
"%s: DFS NOL context is null", __func__);
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
for (i = 0; i < pMac->sap.SapDfsInfo.numCurrentRegDomainDfsChannels;
|
||||
i++) {
|
||||
if (!dfs_nol[i].dfs_channel_number)
|
||||
continue;
|
||||
|
||||
current_time = cds_get_monotonic_boottime();
|
||||
found_time = dfs_nol[i].radar_found_timestamp;
|
||||
|
||||
elapsed_time = current_time - found_time;
|
||||
|
||||
/* check if channel is available
|
||||
* if either channel is usable or available, or timer expired 30mins
|
||||
*/
|
||||
bAvailable =
|
||||
((dfs_nol[i].radar_status_flag ==
|
||||
eSAP_DFS_CHANNEL_AVAILABLE)
|
||||
|| (dfs_nol[i].radar_status_flag ==
|
||||
eSAP_DFS_CHANNEL_USABLE)
|
||||
|| (elapsed_time >= SAP_DFS_NON_OCCUPANCY_PERIOD));
|
||||
|
||||
if (bAvailable) {
|
||||
dfs_nol[i].radar_status_flag =
|
||||
eSAP_DFS_CHANNEL_AVAILABLE;
|
||||
dfs_nol[i].radar_found_timestamp = 0;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Channel[%d] is AVAILABLE",
|
||||
__func__, dfs_nol[i].dfs_channel_number);
|
||||
} else {
|
||||
|
||||
/* the time left in min */
|
||||
left_time = SAP_DFS_NON_OCCUPANCY_PERIOD - elapsed_time;
|
||||
left_time = left_time / (60 * 1000 * 1000);
|
||||
|
||||
nol[j++] = dfs_nol[i].dfs_channel_number;
|
||||
(*nol_len)++;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Channel[%d] is UNAVAILABLE [%lu min left]",
|
||||
__func__,
|
||||
dfs_nol[i].dfs_channel_number, left_time);
|
||||
}
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS wlansap_set_dfs_nol(struct sap_context *sap_ctx,
|
||||
eSapDfsNolType conf)
|
||||
{
|
||||
|
Reference in New Issue
Block a user