Beispiel #1
0
/*
* rtw_set_channel_plan - 
* @adapter: pointer to _adapter structure
* @channel_plan: 
* 
* Return _SUCCESS or _FAIL
*/
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
	return rtw_set_chplan_cmd(adapter, channel_plan, 1);
}
Beispiel #2
0
/*
* rtw_set_country -
* @adapter: pointer to struct adapter structure
* @country_code: string of country code
*
* Return _SUCCESS or _FAIL
*/
int rtw_set_country(struct adapter *adapter, const char *country_code)
{
	int i;
	int channel_plan = RT_CHANNEL_DOMAIN_WORLD_WIDE_5G;

	DBG_88E("%s country_code:%s\n", __func__, country_code);
	for (i = 0; i < ARRAY_SIZE(channel_table); i++) {
		if (0 == strcmp(channel_table[i].name, country_code)) {
			channel_plan = channel_table[i].channel_plan;
			break;
		}
	}

	if (i == ARRAY_SIZE(channel_table))
		DBG_88E("%s unknown country_code:%s\n", __func__, country_code);

	return rtw_set_chplan_cmd(adapter, channel_plan, 1);
}