staging: rtl8192e: Remove ifdefs that depend on ENABLE_DOT11D
This configuration parameter is selected in the Makefile, thus the conditional code can be removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
5b774ec296
commit
2b259bd38f
|
@ -2,7 +2,6 @@ ccflags-y += -DEEPROM_OLD_FORMAT_SUPPORT=1
|
|||
ccflags-y += -DUSE_FW_SOURCE_IMG_FILE
|
||||
ccflags-y += -DCONFIG_PM_RTL
|
||||
ccflags-y += -DCONFIG_PM
|
||||
ccflags-y += -DENABLE_DOT11D
|
||||
ccflags-y += -DHAVE_NET_DEVICE_OPS
|
||||
ccflags-y += -DENABLE_DOT11D
|
||||
|
||||
|
|
|
@ -609,9 +609,7 @@ static void rtl8192_read_eeprom_info(struct net_device* dev)
|
|||
|
||||
if (priv->ChannelPlan > CHANNEL_PLAN_LEN - 1)
|
||||
priv->ChannelPlan = 0;
|
||||
#ifdef ENABLE_DOT11D
|
||||
priv->ChannelPlan = COUNTRY_CODE_WORLD_WIDE_13;
|
||||
#endif
|
||||
|
||||
if ( priv->eeprom_vid == 0x1186 && priv->eeprom_did == 0x3304)
|
||||
priv->rtllib->bSupportRemoteWakeUp = true;
|
||||
|
|
|
@ -23,9 +23,7 @@
|
|||
#include "r8190P_rtl8256.h"
|
||||
#include "r8192E_phy.h"
|
||||
#include "rtl_dm.h"
|
||||
#ifdef ENABLE_DOT11D
|
||||
#include "dot11d.h"
|
||||
#endif
|
||||
|
||||
#include "r8192E_hwimg.h"
|
||||
|
||||
|
@ -871,13 +869,11 @@ u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8* stage, u
|
|||
|
||||
RT_TRACE(COMP_TRACE, "====>%s()====stage:%d, step:%d, channel:%d\n", __func__, *stage, *step, channel);
|
||||
|
||||
#ifdef ENABLE_DOT11D
|
||||
if (!IsLegalChannel(priv->rtllib, channel))
|
||||
{
|
||||
RT_TRACE(COMP_ERR, "=============>set to illegal channel:%d\n", channel);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
PreCommonCmdCnt = 0;
|
||||
|
|
|
@ -1347,7 +1347,6 @@ short rtl8192_get_channel_map(struct net_device * dev)
|
|||
{
|
||||
int i;
|
||||
|
||||
#ifdef ENABLE_DOT11D
|
||||
struct r8192_priv *priv = rtllib_priv(dev);
|
||||
if ((priv->rf_chip != RF_8225) && (priv->rf_chip != RF_8256)
|
||||
&& (priv->rf_chip != RF_6052)) {
|
||||
|
@ -1363,23 +1362,6 @@ short rtl8192_get_channel_map(struct net_device * dev)
|
|||
Dot11d_Init(priv->rtllib);
|
||||
#ifndef CONFIG_CRDA
|
||||
Dot11d_Channelmap(priv->ChannelPlan, priv->rtllib);
|
||||
#endif
|
||||
#else
|
||||
struct r8192_priv *priv = rtllib_priv(dev);
|
||||
int ch;
|
||||
if (!channels){
|
||||
DMESG("No channels, aborting");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ch = channels;
|
||||
priv->ChannelPlan = 0;
|
||||
for (i = 1; i <= 14; i++) {
|
||||
(priv->rtllib->channel_map)[i] = (u8)(ch & 0x01);
|
||||
ch >>= 1;
|
||||
}
|
||||
priv->rtllib->IbssStartChnl= 10;
|
||||
priv->rtllib->ibss_maxjoin_chal = 11;
|
||||
#endif
|
||||
for (i = 1; i <= 11; i++) {
|
||||
(priv->rtllib->active_channel_map)[i] = 1;
|
||||
|
|
|
@ -48,9 +48,7 @@
|
|||
#include <asm/io.h>
|
||||
#include "rtllib.h"
|
||||
|
||||
#ifdef ENABLE_DOT11D
|
||||
#include "dot11d.h"
|
||||
#endif
|
||||
|
||||
#include "r8192E_firmware.h"
|
||||
#include "r8192E_hw.h"
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
|
||||
#include <linux/string.h>
|
||||
#include "rtl_core.h"
|
||||
#ifdef ENABLE_DOT11D
|
||||
#include "dot11d.h"
|
||||
#endif
|
||||
|
||||
#define RATE_COUNT 12
|
||||
u32 rtl8192_rates[] = {1000000,2000000,5500000,11000000,
|
||||
|
|
|
@ -1741,10 +1741,8 @@ struct rtllib_network {
|
|||
u8 wmm_info;
|
||||
struct rtllib_wmm_ac_param wmm_param[4];
|
||||
u8 Turbo_Enable;
|
||||
#ifdef ENABLE_DOT11D
|
||||
u16 CountryIeLen;
|
||||
u8 CountryIeBuf[MAX_IE_LEN];
|
||||
#endif
|
||||
BSS_HT bssht;
|
||||
bool broadcom_cap_exist;
|
||||
bool realtek_cap_exit;
|
||||
|
@ -2485,12 +2483,8 @@ struct rtllib_device {
|
|||
u16 prev_seq_ctl; /* used to drop duplicate frames */
|
||||
|
||||
/* map of allowed channels. 0 is dummy */
|
||||
#ifdef ENABLE_DOT11D
|
||||
void* pDot11dInfo;
|
||||
bool bGlobalDomain;
|
||||
#else
|
||||
u8 channel_map[MAX_CHANNEL_NUMBER+1];
|
||||
#endif
|
||||
u8 active_channel_map[MAX_CHANNEL_NUMBER+1];
|
||||
|
||||
u8 IbssStartChnl;
|
||||
|
|
|
@ -43,9 +43,7 @@
|
|||
#include <linux/ctype.h>
|
||||
|
||||
#include "rtllib.h"
|
||||
#ifdef ENABLE_DOT11D
|
||||
#include "dot11d.h"
|
||||
#endif
|
||||
|
||||
#if defined CONFIG_CFG_80211
|
||||
#include <linux/crc32.h>
|
||||
|
@ -2074,7 +2072,6 @@ static const char *get_info_element_string(u16 id)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DOT11D
|
||||
static inline void rtllib_extract_country_ie(
|
||||
struct rtllib_device *ieee,
|
||||
struct rtllib_info_element *info_element,
|
||||
|
@ -2100,7 +2097,6 @@ static inline void rtllib_extract_country_ie(
|
|||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
int rtllib_parse_info_param(struct rtllib_device *ieee,
|
||||
struct rtllib_info_element *info_element,
|
||||
|
@ -2574,13 +2570,11 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
|
|||
"QoS Error need to parse QOS_PARAMETER IE\n");
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_DOT11D
|
||||
case MFIE_TYPE_COUNTRY:
|
||||
RTLLIB_DEBUG_SCAN("MFIE_TYPE_COUNTRY: %d bytes\n",
|
||||
info_element->len);
|
||||
rtllib_extract_country_ie(ieee, info_element, network, network->bssid);
|
||||
break;
|
||||
#endif
|
||||
/* TODO */
|
||||
default:
|
||||
RTLLIB_DEBUG_MGMT
|
||||
|
@ -2717,10 +2711,8 @@ static inline int rtllib_network_init(
|
|||
network->Turbo_Enable = 0;
|
||||
network->SignalStrength = stats->SignalStrength;
|
||||
network->RSSI = stats->SignalStrength;
|
||||
#ifdef ENABLE_DOT11D
|
||||
network->CountryIeLen = 0;
|
||||
memset(network->CountryIeBuf, 0, MAX_IE_LEN);
|
||||
#endif
|
||||
HTInitializeBssDesc(&network->bssht);
|
||||
if (stats->freq == RTLLIB_52GHZ_BAND) {
|
||||
/* for A band (No DS info) */
|
||||
|
@ -2898,10 +2890,8 @@ static inline void update_network(struct rtllib_network *dst,
|
|||
dst->RSSI = src->RSSI;
|
||||
dst->Turbo_Enable = src->Turbo_Enable;
|
||||
|
||||
#ifdef ENABLE_DOT11D
|
||||
dst->CountryIeLen = src->CountryIeLen;
|
||||
memcpy(dst->CountryIeBuf, src->CountryIeBuf, src->CountryIeLen);
|
||||
#endif
|
||||
|
||||
dst->bWithAironetIE = src->bWithAironetIE;
|
||||
dst->bCkipSupported = src->bCkipSupported;
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/version.h>
|
||||
#include <asm/uaccess.h>
|
||||
#ifdef ENABLE_DOT11D
|
||||
#include "dot11d.h"
|
||||
#endif
|
||||
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
#include <linux/usb_setting.h>
|
||||
|
@ -549,11 +547,7 @@ void rtllib_softmac_hint11d_wq(void *data)
|
|||
|
||||
void rtllib_update_active_chan_map(struct rtllib_device *ieee)
|
||||
{
|
||||
#ifdef ENABLE_DOT11D
|
||||
memcpy(ieee->active_channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1);
|
||||
#else
|
||||
memcpy(ieee->active_channel_map, ieee->channel_map, MAX_CHANNEL_NUMBER+1);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* this performs syncro scan blocking the caller until all channels
|
||||
|
@ -618,10 +612,8 @@ out:
|
|||
ieee->sync_scan_hurryup = 0;
|
||||
|
||||
if (ieee->state >= RTLLIB_LINKED){
|
||||
#ifdef ENABLE_DOT11D
|
||||
if (IS_DOT11D_ENABLE(ieee))
|
||||
DOT11D_ScanComplete(ieee);
|
||||
#endif
|
||||
}
|
||||
up(&ieee->scan_sem);
|
||||
|
||||
|
@ -681,10 +673,8 @@ void rtllib_softmac_scan_wq(void *data)
|
|||
return;
|
||||
|
||||
out:
|
||||
#ifdef ENABLE_DOT11D
|
||||
if (IS_DOT11D_ENABLE(ieee))
|
||||
DOT11D_ScanComplete(ieee);
|
||||
#endif
|
||||
ieee->current_network.channel = last_channel;
|
||||
|
||||
out1:
|
||||
|
@ -794,7 +784,6 @@ void rtllib_start_scan(struct rtllib_device *ieee)
|
|||
ieee->rtllib_ips_leave_wq(ieee->dev);
|
||||
|
||||
|
||||
#ifdef ENABLE_DOT11D
|
||||
if (IS_DOT11D_ENABLE(ieee) )
|
||||
{
|
||||
if (IS_COUNTRY_IE_VALID(ieee))
|
||||
|
@ -802,7 +791,6 @@ void rtllib_start_scan(struct rtllib_device *ieee)
|
|||
RESET_CIE_WATCHDOG(ieee);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN) {
|
||||
if (ieee->scanning_continue == 0) {
|
||||
ieee->actscanning = true;
|
||||
|
@ -819,7 +807,6 @@ void rtllib_start_scan(struct rtllib_device *ieee)
|
|||
/* called with wx_sem held */
|
||||
void rtllib_start_scan_syncro(struct rtllib_device *ieee, u8 is_mesh)
|
||||
{
|
||||
#ifdef ENABLE_DOT11D
|
||||
if (IS_DOT11D_ENABLE(ieee) )
|
||||
{
|
||||
if (IS_COUNTRY_IE_VALID(ieee))
|
||||
|
@ -827,7 +814,6 @@ void rtllib_start_scan_syncro(struct rtllib_device *ieee, u8 is_mesh)
|
|||
RESET_CIE_WATCHDOG(ieee);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ieee->sync_scan_hurryup = 0;
|
||||
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN){
|
||||
rtllib_softmac_scan_syncro(ieee, is_mesh);
|
||||
|
@ -2935,7 +2921,6 @@ inline void rtllib_start_ibss(struct rtllib_device *ieee)
|
|||
void rtllib_start_bss(struct rtllib_device *ieee)
|
||||
{
|
||||
unsigned long flags;
|
||||
#ifdef ENABLE_DOT11D
|
||||
if (IS_DOT11D_ENABLE(ieee) && !IS_COUNTRY_IE_VALID(ieee))
|
||||
{
|
||||
if (! ieee->bGlobalDomain)
|
||||
|
@ -2943,7 +2928,6 @@ void rtllib_start_bss(struct rtllib_device *ieee)
|
|||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* check if we have already found the net we
|
||||
* are interested in (if any).
|
||||
* if not (we are disassociated and we are not
|
||||
|
@ -2980,10 +2964,8 @@ void rtllib_disassociate(struct rtllib_device *ieee)
|
|||
|
||||
if (ieee->data_hard_stop)
|
||||
ieee->data_hard_stop(ieee->dev);
|
||||
#ifdef ENABLE_DOT11D
|
||||
if (IS_DOT11D_ENABLE(ieee))
|
||||
Dot11d_Reset(ieee);
|
||||
#endif
|
||||
ieee->state = RTLLIB_NOLINK;
|
||||
ieee->is_set_key = false;
|
||||
ieee->wap_set = 0;
|
||||
|
@ -3200,12 +3182,10 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
|
|||
for (i = 0; i < 5; i++) {
|
||||
ieee->seq_ctrl[i] = 0;
|
||||
}
|
||||
#ifdef ENABLE_DOT11D
|
||||
ieee->pDot11dInfo = kmalloc(sizeof(struct rt_dot11d_info), GFP_ATOMIC);
|
||||
if (!ieee->pDot11dInfo)
|
||||
RTLLIB_DEBUG(RTLLIB_DL_ERR, "can't alloc memory for DOT11D\n");
|
||||
memset(ieee->pDot11dInfo, 0, sizeof(struct rt_dot11d_info));
|
||||
#endif
|
||||
ieee->LinkDetectInfo.SlotIndex = 0;
|
||||
ieee->LinkDetectInfo.SlotNum = 2;
|
||||
ieee->LinkDetectInfo.NumRecvBcnInPeriod=0;
|
||||
|
@ -3285,13 +3265,11 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
|
|||
void rtllib_softmac_free(struct rtllib_device *ieee)
|
||||
{
|
||||
down(&ieee->wx_sem);
|
||||
#ifdef ENABLE_DOT11D
|
||||
if (NULL != ieee->pDot11dInfo)
|
||||
{
|
||||
kfree(ieee->pDot11dInfo);
|
||||
ieee->pDot11dInfo = NULL;
|
||||
}
|
||||
#endif
|
||||
del_timer_sync(&ieee->associate_timer);
|
||||
|
||||
cancel_delayed_work(&ieee->associate_retry_wq);
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
#include "rtllib.h"
|
||||
#include "rtl_core.h"
|
||||
#ifdef ENABLE_DOT11D
|
||||
#include "dot11d.h"
|
||||
#endif
|
||||
/* FIXME: add A freqs */
|
||||
|
||||
const long rtllib_wlan_frequencies[] = {
|
||||
|
@ -64,12 +62,10 @@ int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
|
|||
|
||||
}else { /* Set the channel */
|
||||
|
||||
#ifdef ENABLE_DOT11D
|
||||
if (ieee->active_channel_map[fwrq->m] != 1) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
ieee->current_network.channel = fwrq->m;
|
||||
ieee->set_chan(ieee->dev, ieee->current_network.channel);
|
||||
|
||||
|
|
Loading…
Reference in a new issue