software/drivers/sd8887/src/wlan/mlinux/moal_ioctl.c
/**
 *  @brief This function converts region string to region code
 *
 *  @param region_string    Region string
 *
 *  @return                 Region code
 */
@brief This function converts region string to region code
@param region_string    Region string

@return                 Region code
@brief This function converts region string to region code @param region_string Region string @return Region code
t_u8
region_string_2_region_code(char *region_string)
{
	t_u8 i;
	ENTER();
	for (i = 0; i < ARRAY_SIZE(region_code_mapping); i++) {
		if (!memcmp(region_string,
			    region_code_mapping[i].region,
			    strlen(region_string))) {
			LEAVE();
			return region_code_mapping[i].code;
		}
	}
	for (i = 0; i < ARRAY_SIZE(eu_country_code_table); i++) {
		if (!memcmp(region_string, eu_country_code_table[i],
			    COUNTRY_CODE_LEN - 1)) {
			PRINTM(MIOCTL, "found region code=%d in EU table\n",
			       EU_REGION_CODE);
			LEAVE();
			return EU_REGION_CODE;
		}
	}
	LEAVE();
	return region_code_mapping[0].code;
}
t_u8 region_string_2_region_code ( char * region_string ) { t_u8 i ; ENTER ( ) ; for ( i = 0 ; i < ARRAY_SIZE ( region_code_mapping ) ; i ++ ) { if ( ! memcmp ( region_string , region_code_mapping [ i ] . region , strlen ( region_string ) ) ) { LEAVE ( ) ; return region_code_mapping [ i ] . code ; } } for ( i = 0 ; i < ARRAY_SIZE ( eu_country_code_table ) ; i ++ ) { if ( ! memcmp ( region_string , eu_country_code_table [ i ] , COUNTRY_CODE_LEN - 1 ) ) { PRINTM ( MIOCTL , " \n " , EU_REGION_CODE ) ; LEAVE ( ) ; return EU_REGION_CODE ; } } LEAVE ( ) ; return region_code_mapping [ 0 ] . code ; }
@brief This function converts region string to region code
  @param region_string    Region string
@brief This function converts region string to region code @param region_string Region string
/* If still not found, look for code in EU country code table */ /* Default is US */