software/drivers/sd8887/src/wlan/mlan/mlan_cfp.c
/**
 *  @brief Get non-global operaing class table according to country
 *
 *  @param pmpriv             A pointer to mlan_private structure
 *  @param arraysize          A pointer to table size
 *
 *  @return                   A pointer to oper_bw_chan
 */
@brief Get non-global operaing class table according to country
@param pmpriv             A pointer to mlan_private structure
@param arraysize          A pointer to table size

@return                   A pointer to oper_bw_chan
@brief Get non - global operaing class table according to country @param pmpriv A pointer to mlan_private structure @param arraysize A pointer to table size @return A pointer to oper_bw_chan
oper_bw_chan *
wlan_get_nonglobal_operclass_table(mlan_private *pmpriv, int *arraysize)
{
	t_u8 country_code[][COUNTRY_CODE_LEN] = { "US", "JP", "CN" };
	int country_id = 0;
	oper_bw_chan *poper_bw_chan = MNULL;
	ENTER();
	for (country_id = 0; country_id < 3; country_id++)
		if (!memcmp
		    (pmpriv->adapter, pmpriv->adapter->country_code,
		     country_code[country_id], COUNTRY_CODE_LEN - 1))
			break;
	if (country_id >= 3)
		country_id = COUNTRY_ID_US;	
	if (wlan_is_etsi_country
	    (pmpriv->adapter, pmpriv->adapter->country_code))
		country_id = COUNTRY_ID_EU;
	switch (country_id) {
	case COUNTRY_ID_US:
		poper_bw_chan = oper_bw_chan_us;
		*arraysize = sizeof(oper_bw_chan_us);
		break;
	case COUNTRY_ID_JP:
		poper_bw_chan = oper_bw_chan_jp;
		*arraysize = sizeof(oper_bw_chan_jp);
		break;
	case COUNTRY_ID_CN:
		poper_bw_chan = oper_bw_chan_cn;
		*arraysize = sizeof(oper_bw_chan_cn);
		break;
	case COUNTRY_ID_EU:
		poper_bw_chan = oper_bw_chan_eu;
		*arraysize = sizeof(oper_bw_chan_eu);
		break;
	default:
		PRINTM(MERROR, "Country not support!\n");
		break;
	}
	LEAVE();
	return poper_bw_chan;
}
oper_bw_chan * wlan_get_nonglobal_operclass_table ( mlan_private * pmpriv , int * arraysize ) { t_u8 country_code [ ] [ COUNTRY_CODE_LEN ] = { " " , " " , " " } ; int country_id = 0 ; oper_bw_chan * poper_bw_chan = MNULL ; ENTER ( ) ; for ( country_id = 0 ; country_id < 3 ; country_id ++ ) if ( ! memcmp ( pmpriv -> adapter , pmpriv -> adapter -> country_code , country_code [ country_id ] , COUNTRY_CODE_LEN - 1 ) ) break ; if ( country_id >= 3 ) country_id = COUNTRY_ID_US ; if ( wlan_is_etsi_country ( pmpriv -> adapter , pmpriv -> adapter -> country_code ) ) country_id = COUNTRY_ID_EU ; switch ( country_id ) { case COUNTRY_ID_US : poper_bw_chan = oper_bw_chan_us ; * arraysize = sizeof ( oper_bw_chan_us ) ; break ; case COUNTRY_ID_JP : poper_bw_chan = oper_bw_chan_jp ; * arraysize = sizeof ( oper_bw_chan_jp ) ; break ; case COUNTRY_ID_CN : poper_bw_chan = oper_bw_chan_cn ; * arraysize = sizeof ( oper_bw_chan_cn ) ; break ; case COUNTRY_ID_EU : poper_bw_chan = oper_bw_chan_eu ; * arraysize = sizeof ( oper_bw_chan_eu ) ; break ; default : PRINTM ( MERROR , " \n " ) ; break ; } LEAVE ( ) ; return poper_bw_chan ; }
@brief Get non-global operaing class table according to country
  @param pmpriv             A pointer to mlan_private structure
  @param arraysize          A pointer to table size
@brief Get non - global operaing class table according to country @param pmpriv A pointer to mlan_private structure @param arraysize A pointer to table size
/*Set default to US */ /** Country in EU */