software/drivers/sd8887/src/wlan/mlinux/moal_uap_cfg80211.c
/**
 * @brief Register the device with cfg80211
 *
 * @param dev       A pointer to net_device structure
 * @param bss_type  BSS type
 *
 * @return          MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
 */
@brief Register the device with cfg80211
@param dev       A pointer to net_device structure
@param bss_type  BSS type


@brief Register the device with cfg80211 @param dev A pointer to net_device structure @param bss_type BSS type
mlan_status
woal_register_uap_cfg80211(struct net_device *dev, t_u8 bss_type)
{
	mlan_status ret = MLAN_STATUS_SUCCESS;
	moal_private *priv = (moal_private *)netdev_priv(dev);
	struct wireless_dev *wdev = NULL;
	ENTER();
	wdev = (struct wireless_dev *)&priv->w_dev;
	memset(wdev, 0, sizeof(struct wireless_dev));
	wdev->wiphy = priv->phandle->wiphy;
	if (!wdev->wiphy) {
		LEAVE();
		return MLAN_STATUS_FAILURE;
	}
	if (bss_type == MLAN_BSS_TYPE_UAP)
		wdev->iftype = NL80211_IFTYPE_AP;
	dev_net_set(dev, wiphy_net(wdev->wiphy));
	dev->ieee80211_ptr = wdev;
	SET_NETDEV_DEV(dev, wiphy_dev(wdev->wiphy));
	priv->wdev = wdev;
	LEAVE();
	return ret;
}
mlan_status woal_register_uap_cfg80211 ( struct net_device * dev , t_u8 bss_type ) { mlan_status ret = MLAN_STATUS_SUCCESS ; moal_private * priv = ( moal_private * ) netdev_priv ( dev ) ; struct wireless_dev * wdev = NULL ; ENTER ( ) ; wdev = ( struct wireless_dev * ) & priv -> w_dev ; memset ( wdev , 0 , sizeof ( struct wireless_dev ) ) ; wdev -> wiphy = priv -> phandle -> wiphy ; if ( ! wdev -> wiphy ) { LEAVE ( ) ; return MLAN_STATUS_FAILURE ; } if ( bss_type == MLAN_BSS_TYPE_UAP ) wdev -> iftype = NL80211_IFTYPE_AP ; dev_net_set ( dev , wiphy_net ( wdev -> wiphy ) ) ; dev -> ieee80211_ptr = wdev ; SET_NETDEV_DEV ( dev , wiphy_dev ( wdev -> wiphy ) ) ; priv -> wdev = wdev ; LEAVE ( ) ; return ret ; }
@brief Register the device with cfg80211
 @param dev       A pointer to net_device structure
 @param bss_type  BSS type
@brief Register the device with cfg80211 @param dev A pointer to net_device structure @param bss_type BSS type