qcacld-3.0: Refine API wlansap_get_dfs_nol()

See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_get_dfs_nol() to use the true struct pointer type.

Change-Id: I4a430915f8e1cb5378f80e5d6cb34690e33160ea
CRs-Fixed: 2116267
This commit is contained in:
Jeff Johnson
2017-09-25 18:31:14 -07:00
committed by snandini
parent b3c4f7e460
commit b26e270d4e
2 changed files with 19 additions and 16 deletions

View File

@@ -1305,7 +1305,19 @@ QDF_STATUS wlansap_reset_sap_config_add_ie(tsap_Config_t *pConfig,
void wlansap_extend_to_acs_range(tHalHandle hal, uint8_t *startChannelNum, void wlansap_extend_to_acs_range(tHalHandle hal, uint8_t *startChannelNum,
uint8_t *endChannelNum, uint8_t *bandStartChannel, uint8_t *endChannelNum, uint8_t *bandStartChannel,
uint8_t *bandEndChannel); uint8_t *bandEndChannel);
QDF_STATUS wlansap_get_dfs_nol(void *pSapCtx, uint8_t *nol, uint32_t *nol_len);
/**
* 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 * wlansap_set_dfs_nol() - Set dfs nol

View File

@@ -2511,20 +2511,11 @@ QDF_STATUS wlan_sap_set_vendor_acs(void *ctx, bool is_vendor_acs)
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
/**
* wlansap_get_dfs_nol() - Get the DFS NOL QDF_STATUS wlansap_get_dfs_nol(struct sap_context *sap_ctx,
* @pSapCtx: SAP context uint8_t *nol, uint32_t *nol_len)
* @nol: Pointer to the NOL
* @nol_len: Length of the NOL
*
* Provides the DFS NOL
*
* Return: QDF_STATUS
*/
QDF_STATUS wlansap_get_dfs_nol(void *pSapCtx, uint8_t *nol, uint32_t *nol_len)
{ {
int i = 0, j = 0; int i = 0, j = 0;
struct sap_context *sapContext = pSapCtx;
void *hHal = NULL; void *hHal = NULL;
tpAniSirGlobal pMac = NULL; tpAniSirGlobal pMac = NULL;
uint64_t current_time, found_time, elapsed_time; uint64_t current_time, found_time, elapsed_time;
@@ -2533,15 +2524,15 @@ QDF_STATUS wlansap_get_dfs_nol(void *pSapCtx, uint8_t *nol, uint32_t *nol_len)
bool bAvailable = false; bool bAvailable = false;
*nol_len = 0; *nol_len = 0;
if (NULL == sapContext) { if (NULL == sap_ctx) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"%s: Invalid SAP pointer from p_cds_gctx", __func__); "%s: Invalid SAP pointer", __func__);
return QDF_STATUS_E_FAULT; return QDF_STATUS_E_FAULT;
} }
hHal = CDS_GET_HAL_CB(); hHal = CDS_GET_HAL_CB();
if (NULL == hHal) { if (NULL == hHal) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"%s: Invalid HAL pointer from p_cds_gctx", __func__); "%s: Invalid HAL pointer", __func__);
return QDF_STATUS_E_FAULT; return QDF_STATUS_E_FAULT;
} }
pMac = PMAC_STRUCT(hHal); pMac = PMAC_STRUCT(hHal);