software/drivers/sd8887/src/wlan/mlinux/moal_priv.c
/**
 *  @brief Deauthenticate
 *
 *  @param priv         A pointer to moal_private structure
 *  @param wrq          A pointer to iwreq structure
 *
 *  @return             0 --success, otherwise fail
 */
@brief Deauthenticate
@param priv         A pointer to moal_private structure
@param wrq          A pointer to iwreq structure

@return             0 --success, otherwise fail
@brief Deauthenticate @param priv A pointer to moal_private structure @param wrq A pointer to iwreq structure @return 0 -- success otherwise fail
static int
woal_deauth(moal_private *priv, struct iwreq *wrq)
{
	int ret = 0;
	struct sockaddr saddr;
	ENTER();
	if (wrq->u.data.length) {
		if (copy_from_user(&saddr, wrq->u.data.pointer, sizeof(saddr))) {
			PRINTM(MERROR, "Copy from user failed\n");
			ret = -EFAULT;
			goto done;
		}
		if (MLAN_STATUS_SUCCESS !=
		    woal_disconnect(priv, MOAL_IOCTL_WAIT,
				    (t_u8 *)saddr.sa_data,
				    DEF_DEAUTH_REASON_CODE)) {
			ret = -EFAULT;
			goto done;
		}
	} else {
		if (MLAN_STATUS_SUCCESS !=
		    woal_disconnect(priv, MOAL_IOCTL_WAIT, NULL,
				    DEF_DEAUTH_REASON_CODE))
			ret = -EFAULT;
	}
done:
	LEAVE();
	return ret;
}
static int woal_deauth ( moal_private * priv , struct iwreq * wrq ) { int ret = 0 ; struct sockaddr saddr ; ENTER ( ) ; if ( wrq -> u . data . length ) { if ( copy_from_user ( & saddr , wrq -> u . data . pointer , sizeof ( saddr ) ) ) { PRINTM ( MERROR , " \n " ) ; ret = - EFAULT ; goto done ; } if ( MLAN_STATUS_SUCCESS != woal_disconnect ( priv , MOAL_IOCTL_WAIT , ( t_u8 * ) saddr . sa_data , DEF_DEAUTH_REASON_CODE ) ) { ret = - EFAULT ; goto done ; } } else { if ( MLAN_STATUS_SUCCESS != woal_disconnect ( priv , MOAL_IOCTL_WAIT , NULL , DEF_DEAUTH_REASON_CODE ) ) ret = - EFAULT ; } done : LEAVE ( ) ; return ret ; }
@brief Deauthenticate
  @param priv         A pointer to moal_private structure
  @param wrq          A pointer to iwreq structure
@brief Deauthenticate @param priv A pointer to moal_private structure @param wrq A pointer to iwreq structure
/* Deauth mentioned BSSID */