software/drivers/sd8887/src/wlan/mlinux/moal_ioctl.c
/**
 *  @brief ioctl function get BSS type
 *
 *  @param dev      A pointer to net_device structure
 *  @param req      A pointer to ifreq structure
 *  @return         0 --success, otherwise fail
 */
@brief ioctl function get BSS type
@param dev      A pointer to net_device structure
@param req      A pointer to ifreq structure
@return         0 --success, otherwise fail
@brief ioctl function get BSS type @param dev A pointer to net_device structure @param req A pointer to ifreq structure @return 0 -- success otherwise fail
int
woal_get_bss_type(struct net_device *dev, struct ifreq *req)
{
	int ret = 0;
	moal_private *priv = (moal_private *)netdev_priv(dev);
	int bss_type;
	ENTER();
	bss_type = (int)priv->bss_type;
	if (copy_to_user(req->ifr_data, &bss_type, sizeof(int))) {
		PRINTM(MINFO, "Copy to user failed!\n");
		ret = -EFAULT;
	}
	LEAVE();
	return ret;
}
int woal_get_bss_type ( struct net_device * dev , struct ifreq * req ) { int ret = 0 ; moal_private * priv = ( moal_private * ) netdev_priv ( dev ) ; int bss_type ; ENTER ( ) ; bss_type = ( int ) priv -> bss_type ; if ( copy_to_user ( req -> ifr_data , & bss_type , sizeof ( int ) ) ) { PRINTM ( MINFO , " \n " ) ; ret = - EFAULT ; } LEAVE ( ) ; return ret ; }
@brief ioctl function get BSS type
  @param dev      A pointer to net_device structure
  @param req      A pointer to ifreq structure
  @return         0 --success, otherwise fail
@brief ioctl function get BSS type @param dev A pointer to net_device structure @param req A pointer to ifreq structure @return 0 -- success otherwise fail