software/drivers/sd8887/src/wlan/mlinux/moal_ioctl.c
/**
 *  @brief Get WPA enable
 *
 *  @param priv             A pointer to moal_private structure
 *  @param wait_option      Wait option
 *  @param enable           A pointer to wpa enable status
 *
 *  @return                     MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail
 */
@brief Get WPA enable
@param priv             A pointer to moal_private structure
@param wait_option      Wait option
@param enable           A pointer to wpa enable status


@brief Get WPA enable @param priv A pointer to moal_private structure @param wait_option Wait option @param enable A pointer to wpa enable status
mlan_status
woal_get_wpa_enable(moal_private *priv, t_u8 wait_option, t_u32 *enable)
{
	int ret = 0;
	mlan_ioctl_req *req = NULL;
	mlan_ds_sec_cfg *sec = NULL;
	mlan_status status = MLAN_STATUS_SUCCESS;
	ENTER();
	req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
	if (req == NULL) {
		ret = -ENOMEM;
		goto done;
	}
	sec = (mlan_ds_sec_cfg *)req->pbuf;
	sec->sub_command = MLAN_OID_SEC_CFG_WPA_ENABLED;
	req->req_id = MLAN_IOCTL_SEC_CFG;
	req->action = MLAN_ACT_GET;
	status = woal_request_ioctl(priv, req, wait_option);
	if (status == MLAN_STATUS_SUCCESS && enable)
		*enable = sec->param.wpa_enabled;
done:
	if (status != MLAN_STATUS_PENDING)
		kfree(req);
	LEAVE();
	return status;
}
mlan_status woal_get_wpa_enable ( moal_private * priv , t_u8 wait_option , t_u32 * enable ) { int ret = 0 ; mlan_ioctl_req * req = NULL ; mlan_ds_sec_cfg * sec = NULL ; mlan_status status = MLAN_STATUS_SUCCESS ; ENTER ( ) ; req = woal_alloc_mlan_ioctl_req ( sizeof ( mlan_ds_sec_cfg ) ) ; if ( req == NULL ) { ret = - ENOMEM ; goto done ; } sec = ( mlan_ds_sec_cfg * ) req -> pbuf ; sec -> sub_command = MLAN_OID_SEC_CFG_WPA_ENABLED ; req -> req_id = MLAN_IOCTL_SEC_CFG ; req -> action = MLAN_ACT_GET ; status = woal_request_ioctl ( priv , req , wait_option ) ; if ( status == MLAN_STATUS_SUCCESS && enable ) * enable = sec -> param . wpa_enabled ; done : if ( status != MLAN_STATUS_PENDING ) kfree ( req ) ; LEAVE ( ) ; return status ; }
@brief Get WPA enable
  @param priv             A pointer to moal_private structure
  @param wait_option      Wait option
  @param enable           A pointer to wpa enable status
@brief Get WPA enable @param priv A pointer to moal_private structure @param wait_option Wait option @param enable A pointer to wpa enable status
/* Allocate an IOCTL request buffer */ /* Fill request buffer */ /* Send IOCTL request to MLAN */