software/drivers/sd8887/src/wlan/mlinux/moal_cfg80211.c
/**
 *  @brief Sets up the CFG802.11 specific HT capability fields
 *  with default values
 *
 *  @param ht_info      A pointer to ieee80211_sta_ht_cap structure
 *  @param dev_cap      Device capability informations
 *  @param mcs_set      Device MCS sets
 *
 *  @return             N/A
 */
@brief Sets up the CFG802.11 specific HT capability fields
with default values

@param ht_info      A pointer to ieee80211_sta_ht_cap structure
@param dev_cap      Device capability informations
@param mcs_set      Device MCS sets

@return             N/A
@brief Sets up the CFG802 . 11 specific HT capability fields with default values @param ht_info A pointer to ieee80211_sta_ht_cap structure @param dev_cap Device capability informations @param mcs_set Device MCS sets @return N / A
void
woal_cfg80211_setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info,
			   t_u32 dev_cap, t_u8 *mcs_set)
{
	ENTER();
	ht_info->ht_supported = true;
	ht_info->ampdu_factor = 0x3;
	ht_info->ampdu_density = 0;
	memset(&ht_info->mcs, 0, sizeof(ht_info->mcs));
	ht_info->cap = 0;
	if (mcs_set)
		memcpy(ht_info->mcs.rx_mask, mcs_set,
		       sizeof(ht_info->mcs.rx_mask));
	if (dev_cap & MBIT(8))	
		ht_info->cap |= IEEE80211_HT_CAP_40MHZ_INTOLERANT;
	if (dev_cap & MBIT(17))	
		ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
	if ((dev_cap >> 20) & 0x03)	
		ht_info->cap |= IEEE80211_HT_CAP_DELAY_BA;
	if (dev_cap & MBIT(22))	
		ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING;
	if (dev_cap & MBIT(23))	
		ht_info->cap |= IEEE80211_HT_CAP_SGI_20;
	if (dev_cap & MBIT(24))	
		ht_info->cap |= IEEE80211_HT_CAP_SGI_40;
	if (dev_cap & MBIT(25))	
		ht_info->cap |= IEEE80211_HT_CAP_TX_STBC;
	if (dev_cap & MBIT(26))	
		ht_info->cap |= IEEE80211_HT_CAP_RX_STBC;
	if (dev_cap & MBIT(27))	
		ht_info->cap |= 0;	
	else			
		ht_info->cap |= IEEE80211_HT_CAP_SM_PS;
	if (dev_cap & MBIT(29))	
		ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD;
	if (dev_cap & MBIT(31))	
		ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU;
	ht_info->cap |= IEEE80211_HT_CAP_DSSSCCK40;
	ht_info->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
	LEAVE();
}
void woal_cfg80211_setup_ht_cap ( struct ieee80211_sta_ht_cap * ht_info , t_u32 dev_cap , t_u8 * mcs_set ) { ENTER ( ) ; ht_info -> ht_supported = true ; ht_info -> ampdu_factor = 0x3 ; ht_info -> ampdu_density = 0 ; memset ( & ht_info -> mcs , 0 , sizeof ( ht_info -> mcs ) ) ; ht_info -> cap = 0 ; if ( mcs_set ) memcpy ( ht_info -> mcs . rx_mask , mcs_set , sizeof ( ht_info -> mcs . rx_mask ) ) ; if ( dev_cap & MBIT ( 8 ) ) ht_info -> cap |= IEEE80211_HT_CAP_40MHZ_INTOLERANT ; if ( dev_cap & MBIT ( 17 ) ) ht_info -> cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40 ; if ( ( dev_cap >> 20 ) & 0x03 ) ht_info -> cap |= IEEE80211_HT_CAP_DELAY_BA ; if ( dev_cap & MBIT ( 22 ) ) ht_info -> cap |= IEEE80211_HT_CAP_LDPC_CODING ; if ( dev_cap & MBIT ( 23 ) ) ht_info -> cap |= IEEE80211_HT_CAP_SGI_20 ; if ( dev_cap & MBIT ( 24 ) ) ht_info -> cap |= IEEE80211_HT_CAP_SGI_40 ; if ( dev_cap & MBIT ( 25 ) ) ht_info -> cap |= IEEE80211_HT_CAP_TX_STBC ; if ( dev_cap & MBIT ( 26 ) ) ht_info -> cap |= IEEE80211_HT_CAP_RX_STBC ; if ( dev_cap & MBIT ( 27 ) ) ht_info -> cap |= 0 ; else ht_info -> cap |= IEEE80211_HT_CAP_SM_PS ; if ( dev_cap & MBIT ( 29 ) ) ht_info -> cap |= IEEE80211_HT_CAP_GRN_FLD ; if ( dev_cap & MBIT ( 31 ) ) ht_info -> cap |= IEEE80211_HT_CAP_MAX_AMSDU ; ht_info -> cap |= IEEE80211_HT_CAP_DSSSCCK40 ; ht_info -> mcs . tx_params = IEEE80211_HT_MCS_TX_DEFINED ; LEAVE ( ) ; }
@brief Sets up the CFG802.11 specific HT capability fields
  with default values
@brief Sets up the CFG802 . 11 specific HT capability fields with default values
/* 40Mhz intolarance enabled */ /* Channel width 20/40Mhz support */ /* Delayed ACK supported */ /* Rx LDPC supported */ /* Short GI @ 20Mhz supported */ /* Short GI @ 40Mhz supported */ /* Tx STBC supported */ /* Rx STBC supported */ /* MIMO PS supported */ /* WLAN_HT_CAP_SM_PS_STATIC */ /* Disable HT SM PS */ /* Green field supported */ /* MAX AMSDU supported */ /* DSSS/CCK in 40Mhz supported */