rtl8188eu: Change C90 comments to kernel form for files in core/

This commit also includes some sparse fixes for endian issues.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-09 17:38:46 -05:00
parent fb786d0283
commit d2c90ee304
24 changed files with 4667 additions and 5077 deletions

View file

@ -62,7 +62,7 @@ _func_enter_;
for (i = 0; i < ssid->SsidLength; i++)
{
//wifi, printable ascii code must be supported
/* wifi, printable ascii code must be supported */
if (!( (ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e) )){
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid has nonprintabl ascii\n"));
ret= false;
@ -108,8 +108,8 @@ _func_enter_;
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
//when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empty
//we try to issue sitesurvey firstly
/* when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empty */
/* we try to issue sitesurvey firstly */
if (pmlmepriv->LinkDetectInfo.bBusyTraffic==false
#ifdef CONFIG_LAYER2_ROAMING
@ -118,7 +118,7 @@ _func_enter_;
)
{
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_do_join(): site survey if scanned_queue is empty\n."));
// submit site_survey_cmd
/* submit site_survey_cmd */
if (_SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ) {
pmlmepriv->to_join = false;
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_do_join(): site survey return error\n."));
@ -145,9 +145,9 @@ _func_enter_;
{
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true)
{
// submit createbss_cmd to change to a ADHOC_MASTER
/* submit createbss_cmd to change to a ADHOC_MASTER */
//pmlmepriv->lock has been acquired by caller...
/* pmlmepriv->lock has been acquired by caller... */
WLAN_BSSID_EX *pdev_network = &(padapter->registrypriv.dev_network);
pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
@ -175,11 +175,11 @@ _func_enter_;
}
else
{
// can't associate ; reset under-linking
/* can't associate ; reset under-linking */
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
//when set_ssid/set_bssid for rtw_do_join(), but there are no desired bss in scanning queue
//we try to issue sitesurvey firstly
/* when set_ssid/set_bssid for rtw_do_join(), but there are no desired bss in scanning queue */
/* we try to issue sitesurvey firstly */
if (pmlmepriv->LinkDetectInfo.bBusyTraffic==false
#ifdef CONFIG_LAYER2_ROAMING
|| pmlmepriv->to_roaming >0
@ -234,7 +234,6 @@ u8 rtw_pnp_set_power_sleep(_adapter* padapter)
_func_enter_;
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("==>rtw_pnp_set_power_sleep!!!\n"));
//DbgPrint("+rtw_pnp_set_power_sleep\n");
res = rtw_setstandby_cmd(padapter, 1);
@ -256,12 +255,11 @@ _func_enter_;
break;
}
// SecClearAllKeys(Adapter);
// 8711 CAM was not for En/Decrypt only
// so, we can't clear all keys.
// should we disable WPAcfg (ox0088) bit 1-2, instead of clear all CAM
/* 8711 CAM was not for En/Decrypt only */
/* so, we can't clear all keys. */
/* should we disable WPAcfg (ox0088) bit 1-2, instead of clear all CAM */
//TO DO...
/* TO DO... */
_func_exit_;
@ -341,7 +339,7 @@ _func_enter_;
if (_rtw_memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, ETH_ALEN) == true)
{
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false)
goto release_mlme_lock;//it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again.
goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */
} else {
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("Set BSSID not the same bssid\n"));
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_bssid=%pM\n", (bssid) ));
@ -362,7 +360,7 @@ _func_enter_;
}
handle_tkip_countermeasure:
//should we add something here...?
/* should we add something here...? */
#ifdef PLATFORM_LINUX
if (padapter->securitypriv.btkip_countermeasure == true) {
@ -449,7 +447,7 @@ _func_enter_;
if (rtw_is_same_ibss(padapter, pnetwork) == false)
{
//if in WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE, create bss or rejoin again
/* if in WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE, create bss or rejoin again */
rtw_disassoc_cmd(padapter, 0, true);
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
@ -464,7 +462,7 @@ _func_enter_;
}
else
{
goto release_mlme_lock;//it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again.
goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */
}
}
#ifdef CONFIG_LPS
@ -501,19 +499,19 @@ handle_tkip_countermeasure:
u32 diff_time,cur_time ;
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:padapter->securitypriv.btkip_countermeasure==true\n"));
NdisGetCurrentSystemTime(&sys_time);
cur_time=(u32)(sys_time.QuadPart/10); // In micro-second.
cur_time=(u32)(sys_time.QuadPart/10); /* In micro-second. */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:cur_time=0x%x\n",cur_time));
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:psecuritypriv->last_mic_err_time=0x%x\n",padapter->securitypriv.btkip_countermeasure_time));
diff_time = cur_time -padapter->securitypriv.btkip_countermeasure_time; // In micro-second.
diff_time = cur_time -padapter->securitypriv.btkip_countermeasure_time; /* In micro-second. */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:diff_time=0x%x\n",diff_time));
if (diff_time > 60000000) {
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid(): countermeasure time >60s.\n"));
padapter->securitypriv.btkip_countermeasure=false;
// Update MIC error time.
/* Update MIC error time. */
padapter->securitypriv.btkip_countermeasure_time=0;
} else {
// can't join in 60 seconds.
/* can't join in 60 seconds. */
status = _FAIL;
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid(): countermeasure time <60s.\n"));
goto release_mlme_lock;
@ -587,11 +585,11 @@ _func_enter_;
_enter_critical_bh(&pmlmepriv->lock, &irqL);
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,(" change mode!"));
//DBG_88E("change mode, old_mode=%d, new_mode=%d, fw_state=0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv));
/* DBG_88E("change mode, old_mode=%d, new_mode=%d, fw_state=0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv)); */
if (*pold_state==Ndis802_11APMode)
{
//change to other mode from Ndis802_11APMode
/* change to other mode from Ndis802_11APMode */
cur_network->join_res = -1;
#ifdef CONFIG_NATIVEAP_MLME
@ -610,7 +608,7 @@ _func_enter_;
{
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
{
rtw_indicate_disconnect(padapter); //will clr Linked_state; before this function, we must have chked whether issue dis-assoc_cmd or not
rtw_indicate_disconnect(padapter); /* will clr Linked_state; before this function, we must have chked whether issue dis-assoc_cmd or not */
}
}
@ -632,7 +630,6 @@ _func_enter_;
set_fwstate(pmlmepriv, WIFI_AP_STATE);
#ifdef CONFIG_NATIVEAP_MLME
start_ap_mode(padapter);
//rtw_indicate_connect(padapter);
#endif
break;
@ -641,12 +638,6 @@ _func_enter_;
case Ndis802_11InfrastructureMax:
break;
}
//SecClearAllKeys(adapter);
//RT_TRACE(COMP_OID_SET, DBG_LOUD, ("set_infrastructure: fw_state:%x after changing mode\n",
// get_fwstate(pmlmepriv) ));
_exit_critical_bh(&pmlmepriv->lock, &irqL);
}
@ -705,7 +696,7 @@ _func_enter_;
if ((check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true) ||
(pmlmepriv->LinkDetectInfo.bBusyTraffic == true))
{
// Scan or linking is in progress, do nothing.
/* Scan or linking is in progress, do nothing. */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_set_802_11_bssid_list_scan fail since fw_state = %x\n", get_fwstate(pmlmepriv)));
res = true;
@ -876,15 +867,15 @@ u8 rtw_set_802_11_add_key(_adapter* padapter, NDIS_802_11_KEY *key){
u8 * pbssid;
struct sta_info *stainfo;
u8 bgroup = false;
u8 bgrouptkey = false;//can be remove later
u8 bgrouptkey = false;/* can be remove later */
u8 ret=_SUCCESS;
_func_enter_;
if (((key->KeyIndex & 0x80000000) == 0) && ((key->KeyIndex & 0x40000000) > 0)){
// It is invalid to clear bit 31 and set bit 30. If the miniport driver encounters this combination,
// it must fail the request and return NDIS_STATUS_INVALID_DATA.
/* It is invalid to clear bit 31 and set bit 30. If the miniport driver encounters this combination, */
/* it must fail the request and return NDIS_STATUS_INVALID_DATA. */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_add_key: ((key->KeyIndex & 0x80000000) == 0)[=%d] ",(int)(key->KeyIndex & 0x80000000) == 0));
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_add_key:((key->KeyIndex & 0x40000000) > 0)[=%d]" , (int)(key->KeyIndex & 0x40000000) > 0));
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_add_key: key->KeyIndex=%d\n" ,(int)key->KeyIndex));
@ -894,7 +885,7 @@ _func_enter_;
if (key->KeyIndex & 0x40000000)
{
// Pairwise key
/* Pairwise key */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ Pairwise key +++++\n"));
@ -919,15 +910,15 @@ _func_enter_;
}
if (key->KeyIndex & 0x000000FF){
// The key index is specified in the lower 8 bits by values of zero to 255.
// The key index should be set to zero for a Pairwise key, and the driver should fail with
// NDIS_STATUS_INVALID_DATA if the lower 8 bits is not zero
/* The key index is specified in the lower 8 bits by values of zero to 255. */
/* The key index should be set to zero for a Pairwise key, and the driver should fail with */
/* NDIS_STATUS_INVALID_DATA if the lower 8 bits is not zero */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,(" key->KeyIndex & 0x000000FF.\n"));
ret= _FAIL;
goto exit;
}
// check BSSID
/* check BSSID */
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == true){
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MacAddr_isBcst(key->BSSID)\n"));
@ -935,8 +926,7 @@ _func_enter_;
goto exit;
}
// Check key length for TKIP.
//if (encryptionAlgorithm == RT_ENC_TKIP_ENCRYPTION && key->KeyLength != 32)
/* Check key length for TKIP. */
if ((encryptionalgo== _TKIP_)&& (key->KeyLength != 32)){
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("TKIP KeyLength:0x%x != 32\n", key->KeyLength));
ret=_FAIL;
@ -944,9 +934,9 @@ _func_enter_;
}
// Check key length for AES.
/* Check key length for AES. */
if ((encryptionalgo== _AES_)&& (key->KeyLength != 16)) {
// For our supplicant, EAPPkt9x.vxd, cannot differentiate TKIP and AES case.
/* For our supplicant, EAPPkt9x.vxd, cannot differentiate TKIP and AES case. */
if (key->KeyLength == 32) {
key->KeyLength = 16;
} else {
@ -955,7 +945,7 @@ _func_enter_;
}
}
// Check key length for WEP. For NDTEST, 2005.01.27, by rcnjko.
/* Check key length for WEP. For NDTEST, 2005.01.27, by rcnjko. */
if ( (encryptionalgo== _WEP40_|| encryptionalgo== _WEP104_) && (key->KeyLength != 5 || key->KeyLength != 13)) {
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("WEP KeyLength:0x%x != 5 or 13\n", key->KeyLength));
ret=_FAIL;
@ -964,7 +954,7 @@ _func_enter_;
bgroup = false;
// Check the pairwise key. Added by Annie, 2005-07-06.
/* Check the pairwise key. Added by Annie, 2005-07-06. */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n"));
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("[Pairwise Key set]\n"));
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("------------------------------------------\n"));
@ -975,11 +965,11 @@ _func_enter_;
}
else
{
// Group key - KeyIndex(BIT30==0)
/* Group key - KeyIndex(BIT30==0) */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ Group key +++++\n"));
// when add wep key through add key and didn't assigned encryption type before
/* when add wep key through add key and didn't assigned encryption type before */
if ((padapter->securitypriv.ndisauthtype<=3)&&(padapter->securitypriv.dot118021XGrpPrivacy==0))
{
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("keylen=%d( Adapter->securitypriv.dot11PrivacyAlgrthm=%x )padapter->securitypriv.dot118021XGrpPrivacy(%x)\n", key->KeyLength,padapter->securitypriv.dot11PrivacyAlgrthm,padapter->securitypriv.dot118021XGrpPrivacy));
@ -1018,7 +1008,7 @@ _func_enter_;
goto exit;
}
// Check key length for TKIP
/* Check key length for TKIP */
if ((encryptionalgo== _TKIP_) && (key->KeyLength != 32)) {
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,(" TKIP GTK KeyLength:%u != 32\n", key->KeyLength));
@ -1027,20 +1017,20 @@ _func_enter_;
} else if (encryptionalgo== _AES_ && (key->KeyLength != 16 && key->KeyLength != 32) ) {
// Check key length for AES
// For NDTEST, we allow keylen=32 in this case. 2005.01.27, by rcnjko.
/* Check key length for AES */
/* For NDTEST, we allow keylen=32 in this case. 2005.01.27, by rcnjko. */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("<=== SetInfo, OID_802_11_ADD_KEY: AES GTK KeyLength:%u != 16 or 32\n", key->KeyLength));
ret= _FAIL;
goto exit;
}
// Change the key length for EAPPkt9x.vxd. Added by Annie, 2005-11-03.
/* Change the key length for EAPPkt9x.vxd. Added by Annie, 2005-11-03. */
if ((encryptionalgo== _AES_) && (key->KeyLength == 32) ) {
key->KeyLength = 16;
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("AES key length changed: %u\n", key->KeyLength) );
}
if (key->KeyIndex & 0x8000000) {//error ??? 0x8000_0000
if (key->KeyIndex & 0x8000000) {/* error ??? 0x8000_0000 */
bgrouptkey = true;
}
@ -1060,7 +1050,7 @@ _func_enter_;
}
// If WEP encryption algorithm, just call rtw_set_802_11_add_wep().
/* If WEP encryption algorithm, just call rtw_set_802_11_add_wep(). */
if ((padapter->securitypriv.dot11AuthAlgrthm !=dot11AuthAlgrthm_8021X)&&(encryptionalgo== _WEP40_ || encryptionalgo== _WEP104_))
{
u32 keyindex;
@ -1089,7 +1079,7 @@ _func_enter_;
}
if (key->KeyIndex & 0x20000000){
// SetRSC
/* SetRSC */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ SetRSC+++++\n"));
if (bgroup == true)
{
@ -1104,9 +1094,9 @@ _func_enter_;
}
// Indicate this key idx is used for TX
// Save the key in KeyMaterial
if (bgroup == true) // Group transmit key
/* Indicate this key idx is used for TX */
/* Save the key in KeyMaterial */
if (bgroup == true) /* Group transmit key */
{
int res;
@ -1151,7 +1141,7 @@ _func_enter_;
}
//set group key by index
/* set group key by index */
_rtw_memcpy(&padapter->securitypriv.dot118021XGrpKey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial, key->KeyLength);
key->KeyIndex=key->KeyIndex & 0x03;
@ -1170,7 +1160,7 @@ _func_enter_;
goto exit;
}
else // Pairwise Key
else /* Pairwise Key */
{
u8 res;
@ -1179,7 +1169,7 @@ _func_enter_;
if (stainfo!=NULL)
{
_rtw_memset( &stainfo->dot118021x_UncstKey, 0, 16);// clear keybuffer
_rtw_memset( &stainfo->dot118021x_UncstKey, 0, 16);/* clear keybuffer */
_rtw_memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16);
@ -1187,11 +1177,11 @@ _func_enter_;
{
padapter->securitypriv.busetkipkey=false;
//_set_timer(&padapter->securitypriv.tkip_timer, 50);
/* _set_timer(&padapter->securitypriv.tkip_timer, 50); */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n ==========_set_timer\n"));
// if TKIP, save the Receive/Transmit MIC key in KeyMaterial[128-255]
/* if TKIP, save the Receive/Transmit MIC key in KeyMaterial[128-255] */
if ((key->KeyIndex & 0x10000000)){
_rtw_memcpy(&stainfo->dot11tkiptxmickey, key->KeyMaterial + 16, 8);
_rtw_memcpy(&stainfo->dot11tkiprxmickey, key->KeyMaterial + 24, 8);
@ -1209,8 +1199,8 @@ _func_enter_;
}
//Set key to CAM through H2C command
if (bgrouptkey)//never go to here
/* Set key to CAM through H2C command */
if (bgrouptkey)/* never go to here */
{
res=rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, false);
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(group)\n"));
@ -1250,21 +1240,19 @@ _func_enter_;
}
if (bgroup == true) {
// clear group key by index
//NdisZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[keyIndex], MAX_WEP_KEY_LEN);
//Adapter->MgntInfo.SecurityInfo.KeyLen[keyIndex] = 0;
/* clear group key by index */
_rtw_memset(&padapter->securitypriv.dot118021XGrpKey[keyIndex], 0, 16);
//! \todo Send a H2C Command to Firmware for removing this Key in CAM Entry.
/* \todo Send a H2C Command to Firmware for removing this Key in CAM Entry. */
} else {
pbssid=get_bssid(&padapter->mlmepriv);
stainfo=rtw_get_stainfo(&padapter->stapriv , pbssid );
if (stainfo) {
// clear key by BSSID
/* clear key by BSSID */
_rtw_memset(&stainfo->dot118021x_UncstKey, 0, 16);
//! \todo Send a H2C Command to Firmware for disable this Key in CAM Entry.
/* \todo Send a H2C Command to Firmware for disable this Key in CAM Entry. */
} else {
ret= _FAIL;
goto exit;
@ -1321,11 +1309,9 @@ u16 rtw_get_cur_max_rate(_adapter *adapter)
_rtw_memcpy(&mcs_rate , pht_capie->supp_mcs_set, 2);
//bw_40MHz = (pht_capie->cap_info&IEEE80211_HT_CAP_SUP_WIDTH) ? 1:0;
//cur_bwmod is updated by beacon, pmlmeinfo is updated by association response
/* cur_bwmod is updated by beacon, pmlmeinfo is updated by association response */
bw_40MHz = (pmlmeext->cur_bwmode && (HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH & pmlmeinfo->HT_info.infos[0])) ? 1:0;
//short_GI = (pht_capie->cap_info&(IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40)) ? 1:0;
short_GI_20 = (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info)&IEEE80211_HT_CAP_SGI_20) ? 1:0;
short_GI_40 = (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info)&IEEE80211_HT_CAP_SGI_40) ? 1:0;
@ -1340,7 +1326,7 @@ u16 rtw_get_cur_max_rate(_adapter *adapter)
}
}
else
#endif //CONFIG_80211N_HT
#endif /* CONFIG_80211N_HT */
{
while ( (pcur_bss->SupportedRates[i]!=0) && (pcur_bss->SupportedRates[i]!=0xFF))
{
@ -1385,7 +1371,7 @@ int rtw_set_channel_plan(_adapter *adapter, u8 channel_plan)
struct registry_priv *pregistrypriv = &adapter->registrypriv;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
//handle by cmd_thread to sync with scan operation
/* handle by cmd_thread to sync with scan operation */
return rtw_set_chplan_cmd(adapter, channel_plan, 1);
}
@ -1402,8 +1388,8 @@ int rtw_set_country(_adapter *adapter, const char *country_code)
DBG_88E("%s country_code:%s\n", __func__, country_code);
//TODO: should have a table to match country code and RT_CHANNEL_DOMAIN
//TODO: should consider 2-character and 3-character country code
/* TODO: should have a table to match country code and RT_CHANNEL_DOMAIN */
/* TODO: should consider 2-character and 3-character country code */
if (0 == strcmp(country_code, "US"))
channel_plan = RT_CHANNEL_DOMAIN_FCC;
else if (0 == strcmp(country_code, "EU"))