software/drivers/sd8887/src/wlan/mlinux/moal_cfg80211.c
/**
 * @brief set bss role
 *
 * @param priv              A pointer to moal private structure
 * @param action            Action: set or get
 * @param role              A pointer to bss role
 *
 * @return                  0 -- success, otherwise fail
 */
@brief set bss role
@param priv              A pointer to moal private structure
@param action            Action: set or get
@param role              A pointer to bss role

@return                  0 -- success, otherwise fail
@brief set bss role @param priv A pointer to moal private structure @param action Action : set or get @param role A pointer to bss role @return 0 -- success otherwise fail
int
woal_cfg80211_bss_role_cfg(moal_private *priv, t_u16 action, t_u8 *bss_role)
{
	int ret = 0;
	ENTER();
	if (action == MLAN_ACT_SET) {
		woal_reset_intf(priv, MOAL_IOCTL_WAIT, MFALSE);
	}
	if (MLAN_STATUS_SUCCESS !=
	    woal_bss_role_cfg(priv, action, MOAL_IOCTL_WAIT, bss_role)) {
		ret = -EFAULT;
		goto done;
	}
	if (action == MLAN_ACT_SET) {
		woal_request_set_mac_address(priv, MOAL_IOCTL_WAIT);
		woal_clear_all_mgmt_ies(priv, MOAL_IOCTL_WAIT);
		woal_init_priv(priv, MOAL_IOCTL_WAIT);
		netif_device_attach(priv->netdev);
		woal_start_queue(priv->netdev);
	}
done:
	LEAVE();
	return ret;
}
int woal_cfg80211_bss_role_cfg ( moal_private * priv , t_u16 action , t_u8 * bss_role ) { int ret = 0 ; ENTER ( ) ; if ( action == MLAN_ACT_SET ) { woal_reset_intf ( priv , MOAL_IOCTL_WAIT , MFALSE ) ; } if ( MLAN_STATUS_SUCCESS != woal_bss_role_cfg ( priv , action , MOAL_IOCTL_WAIT , bss_role ) ) { ret = - EFAULT ; goto done ; } if ( action == MLAN_ACT_SET ) { woal_request_set_mac_address ( priv , MOAL_IOCTL_WAIT ) ; woal_clear_all_mgmt_ies ( priv , MOAL_IOCTL_WAIT ) ; woal_init_priv ( priv , MOAL_IOCTL_WAIT ) ; netif_device_attach ( priv -> netdev ) ; woal_start_queue ( priv -> netdev ) ; } done : LEAVE ( ) ; return ret ; }
@brief set bss role
 @param priv              A pointer to moal private structure
 @param action            Action: set or get
 @param role              A pointer to bss role
@brief set bss role @param priv A pointer to moal private structure @param action Action : set or get @param role A pointer to bss role
/* Reset interface */ /* set back the mac address */ /* clear the mgmt ies */ /* Initialize private structures */ /* Enable interfaces */