|
@@ -1881,114 +1881,6 @@ wlan_sap_getstation_ie_information
|
|
|
return qdf_status;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlansap_set_wps_ie() - set WPI IE
|
|
|
- * @pCtx: Pointer to the global cds context; a handle to SAP's control block
|
|
|
- * can be extracted from its context. When MBSSID feature is enabled,
|
|
|
- * SAP context is directly passed to SAP APIs.
|
|
|
- * @pWPSIE: tSap_WPSIE structure that include WPS IEs
|
|
|
- *
|
|
|
- * This api function provides API for App/HDD to set WPS IE.
|
|
|
- *
|
|
|
- * Return: The QDF_STATUS code associated with performing the operation
|
|
|
- * QDF_STATUS_SUCCESS: Success and error code otherwise.
|
|
|
- */
|
|
|
-QDF_STATUS wlansap_set_wps_ie(void *pCtx, tSap_WPSIE *pSap_WPSIe)
|
|
|
-{
|
|
|
- ptSapContext pSapCtx = NULL;
|
|
|
- void *hHal = NULL;
|
|
|
-
|
|
|
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
|
|
|
- "%s, %d", __func__, __LINE__);
|
|
|
-
|
|
|
- pSapCtx = CDS_GET_SAP_CB(pCtx);
|
|
|
- if (NULL == pSapCtx) {
|
|
|
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
|
|
- "%s: Invalid SAP pointer from pCtx",
|
|
|
- __func__);
|
|
|
- return QDF_STATUS_E_FAULT;
|
|
|
- }
|
|
|
-
|
|
|
- hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
|
|
- if (NULL == hHal) {
|
|
|
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
|
|
- "%s: Invalid HAL pointer from p_cds_gctx",
|
|
|
- __func__);
|
|
|
- return QDF_STATUS_E_FAULT;
|
|
|
- }
|
|
|
-
|
|
|
- if (sap_acquire_global_lock(pSapCtx) == QDF_STATUS_SUCCESS) {
|
|
|
- if (pSap_WPSIe->sapWPSIECode == eSAP_WPS_BEACON_IE) {
|
|
|
- qdf_mem_copy(&pSapCtx->APWPSIEs.SirWPSBeaconIE,
|
|
|
- &pSap_WPSIe->sapwpsie.
|
|
|
- sapWPSBeaconIE,
|
|
|
- sizeof(tSap_WPSBeaconIE));
|
|
|
- } else if (pSap_WPSIe->sapWPSIECode ==
|
|
|
- eSAP_WPS_PROBE_RSP_IE) {
|
|
|
- qdf_mem_copy(&pSapCtx->APWPSIEs.
|
|
|
- SirWPSProbeRspIE,
|
|
|
- &pSap_WPSIe->sapwpsie.
|
|
|
- sapWPSProbeRspIE,
|
|
|
- sizeof(tSap_WPSProbeRspIE));
|
|
|
- } else {
|
|
|
- sap_release_global_lock(pSapCtx);
|
|
|
- return QDF_STATUS_E_FAULT;
|
|
|
- }
|
|
|
- sap_release_global_lock(pSapCtx);
|
|
|
- return QDF_STATUS_SUCCESS;
|
|
|
- } else
|
|
|
- return QDF_STATUS_E_FAULT;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * wlansap_update_wps_ie() - update WPI IE
|
|
|
- * @pCtx: Pointer to the global cds context; a handle to SAP's control block
|
|
|
- * can be extracted from its context. When MBSSID feature is enabled,
|
|
|
- * SAP context is directly passed to SAP APIs.
|
|
|
- *
|
|
|
- * This api function provides API for App/HDD to update WPS IE.
|
|
|
- *
|
|
|
- * Return: The QDF_STATUS code associated with performing the operation
|
|
|
- * QDF_STATUS_SUCCESS: Success and error code otherwise.
|
|
|
- */
|
|
|
-QDF_STATUS wlansap_update_wps_ie(void *pCtx)
|
|
|
-{
|
|
|
- QDF_STATUS qdf_status = QDF_STATUS_E_FAULT;
|
|
|
- ptSapContext pSapCtx = NULL;
|
|
|
- QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
|
|
|
- void *hHal = NULL;
|
|
|
-
|
|
|
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
|
|
- "%s, %d", __func__, __LINE__);
|
|
|
-
|
|
|
- pSapCtx = CDS_GET_SAP_CB(pCtx);
|
|
|
- if (NULL == pSapCtx) {
|
|
|
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
|
|
- "%s: Invalid SAP pointer from pCtx",
|
|
|
- __func__);
|
|
|
- return QDF_STATUS_E_FAULT;
|
|
|
- }
|
|
|
-
|
|
|
- hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
|
|
- if (NULL == hHal) {
|
|
|
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
|
|
- "%s: Invalid HAL pointer from p_cds_gctx",
|
|
|
- __func__);
|
|
|
- return QDF_STATUS_E_FAULT;
|
|
|
- }
|
|
|
-
|
|
|
- qdf_ret_status =
|
|
|
- sme_roam_update_apwpsie(hHal, pSapCtx->sessionId,
|
|
|
- &pSapCtx->APWPSIEs);
|
|
|
-
|
|
|
- if (qdf_ret_status == QDF_STATUS_SUCCESS)
|
|
|
- qdf_status = QDF_STATUS_SUCCESS;
|
|
|
- else
|
|
|
- qdf_status = QDF_STATUS_E_FAULT;
|
|
|
-
|
|
|
- return qdf_status;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* wlansap_get_wps_state() - get WPS session state
|
|
|
* @pCtx: Pointer to the global cds context; a handle to SAP's control block
|