software/drivers/sd8887/src/wlan/mlinux/moal_priv.c
/**
 *  @brief Set user scan ext -- Async mode, without wait
 *
 *  @param priv     A pointer to moal_private structure
 *  @param wrq      A pointer to iwreq structure
 *
 *  @return         0 -- success, otherwise fail
 */
@brief Set user scan ext -- Async mode, without wait
@param priv     A pointer to moal_private structure
@param wrq      A pointer to iwreq structure

@return         0 -- success, otherwise fail
@brief Set user scan ext -- Async mode without wait @param priv A pointer to moal_private structure @param wrq A pointer to iwreq structure @return 0 -- success otherwise fail
static int
woal_set_user_scan_ext_ioctl(moal_private *priv, struct iwreq *wrq)
{
	int ret = 0;
	wlan_user_scan_cfg scan_req;
	ENTER();
	memset(&scan_req, 0x00, sizeof(scan_req));
	if (copy_from_user
	    (&scan_req, wrq->u.data.pointer,
	     MIN(wrq->u.data.length, sizeof(scan_req)))) {
		PRINTM(MINFO, "Copy from user failed\n");
		LEAVE();
		return -EFAULT;
	}
	if (MLAN_STATUS_FAILURE == woal_do_scan(priv, &scan_req))
		ret = -EFAULT;
	LEAVE();
	return ret;
}
static int woal_set_user_scan_ext_ioctl ( moal_private * priv , struct iwreq * wrq ) { int ret = 0 ; wlan_user_scan_cfg scan_req ; ENTER ( ) ; memset ( & scan_req , 0x00 , sizeof ( scan_req ) ) ; if ( copy_from_user ( & scan_req , wrq -> u . data . pointer , MIN ( wrq -> u . data . length , sizeof ( scan_req ) ) ) ) { PRINTM ( MINFO , " \n " ) ; LEAVE ( ) ; return - EFAULT ; } if ( MLAN_STATUS_FAILURE == woal_do_scan ( priv , & scan_req ) ) ret = - EFAULT ; LEAVE ( ) ; return ret ; }
@brief Set user scan ext -- Async mode, without wait
  @param priv     A pointer to moal_private structure
  @param wrq      A pointer to iwreq structure
@brief Set user scan ext -- Async mode without wait @param priv A pointer to moal_private structure @param wrq A pointer to iwreq structure