Commit 5212499a authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rtl8187se: remove ENABLE_DOT11D ifdefs

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0bd2f8ef
...@@ -17,9 +17,6 @@ EXTRA_CFLAGS += -DSW_DIG ...@@ -17,9 +17,6 @@ EXTRA_CFLAGS += -DSW_DIG
EXTRA_CFLAGS += -DRATE_ADAPT EXTRA_CFLAGS += -DRATE_ADAPT
EXTRA_CFLAGS += -DCONFIG_RTL8180_PM EXTRA_CFLAGS += -DCONFIG_RTL8180_PM
#+YJ,080626
EXTRA_CFLAGS += -DENABLE_DOT11D
#enable it for legacy power save, disable it for leisure power save #enable it for legacy power save, disable it for leisure power save
EXTRA_CFLAGS += -DENABLE_LPS EXTRA_CFLAGS += -DENABLE_LPS
......
#ifdef ENABLE_DOT11D
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// File: // File:
// Dot11d.c // Dot11d.c
...@@ -233,4 +232,3 @@ EXPORT_SYMBOL(DOT11D_ScanComplete); ...@@ -233,4 +232,3 @@ EXPORT_SYMBOL(DOT11D_ScanComplete);
EXPORT_SYMBOL(IsLegalChannel); EXPORT_SYMBOL(IsLegalChannel);
EXPORT_SYMBOL(ToLegalChannel); EXPORT_SYMBOL(ToLegalChannel);
#endif #endif
#endif
...@@ -694,7 +694,6 @@ struct ieee80211_header_data { ...@@ -694,7 +694,6 @@ struct ieee80211_header_data {
#define MFIE_TYPE_RATES_EX 50 #define MFIE_TYPE_RATES_EX 50
#define MFIE_TYPE_GENERIC 221 #define MFIE_TYPE_GENERIC 221
#ifdef ENABLE_DOT11D
typedef enum typedef enum
{ {
COUNTRY_CODE_FCC = 0, COUNTRY_CODE_FCC = 0,
...@@ -709,7 +708,6 @@ typedef enum ...@@ -709,7 +708,6 @@ typedef enum
COUNTRY_CODE_GLOBAL_DOMAIN = 9, COUNTRY_CODE_GLOBAL_DOMAIN = 9,
COUNTRY_CODE_WORLD_WIDE_13_INDEX = 10 COUNTRY_CODE_WORLD_WIDE_13_INDEX = 10
}country_code_type_t; }country_code_type_t;
#endif
struct ieee80211_info_element_hdr { struct ieee80211_info_element_hdr {
u8 id; u8 id;
...@@ -961,10 +959,8 @@ struct ieee80211_network { ...@@ -961,10 +959,8 @@ struct ieee80211_network {
#ifdef THOMAS_TURBO #ifdef THOMAS_TURBO
u8 Turbo_Enable;//enable turbo mode, added by thomas u8 Turbo_Enable;//enable turbo mode, added by thomas
#endif #endif
#ifdef ENABLE_DOT11D
u16 CountryIeLen; u16 CountryIeLen;
u8 CountryIeBuf[MAX_IE_LEN]; u8 CountryIeBuf[MAX_IE_LEN];
#endif
}; };
enum ieee80211_state { enum ieee80211_state {
...@@ -1105,18 +1101,12 @@ struct ieee80211_device { ...@@ -1105,18 +1101,12 @@ struct ieee80211_device {
*/ */
short sync_scan_hurryup; short sync_scan_hurryup;
#ifdef ENABLE_DOT11D
void * pDot11dInfo; void * pDot11dInfo;
bool bGlobalDomain; bool bGlobalDomain;
// For Liteon Ch12~13 passive scan // For Liteon Ch12~13 passive scan
u8 MinPassiveChnlNum; u8 MinPassiveChnlNum;
u8 IbssStartChnl; u8 IbssStartChnl;
#else
/* map of allowed channels. 0 is dummy */
// FIXME: remeber to default to a basic channel plan depending of the PHY type
int channel_map[MAX_CHANNEL_NUMBER+1];
#endif
int rate; /* current rate */ int rate; /* current rate */
int basic_rate; int basic_rate;
......
...@@ -44,9 +44,7 @@ ...@@ -44,9 +44,7 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include "ieee80211.h" #include "ieee80211.h"
#ifdef ENABLE_DOT11D
#include "dot11d.h" #include "dot11d.h"
#endif
static inline void ieee80211_monitor_rx(struct ieee80211_device *ieee, static inline void ieee80211_monitor_rx(struct ieee80211_device *ieee,
struct sk_buff *skb, struct sk_buff *skb,
struct ieee80211_rx_stats *rx_stats) struct ieee80211_rx_stats *rx_stats)
...@@ -1072,7 +1070,6 @@ static inline int ieee80211_SignalStrengthTranslate( ...@@ -1072,7 +1070,6 @@ static inline int ieee80211_SignalStrengthTranslate(
return RetSS; return RetSS;
} }
#ifdef ENABLE_DOT11D
static inline void ieee80211_extract_country_ie( static inline void ieee80211_extract_country_ie(
struct ieee80211_device *ieee, struct ieee80211_device *ieee,
struct ieee80211_info_element *info_element, struct ieee80211_info_element *info_element,
...@@ -1114,7 +1111,6 @@ static inline void ieee80211_extract_country_ie( ...@@ -1114,7 +1111,6 @@ static inline void ieee80211_extract_country_ie(
} }
} }
#endif
int int
ieee80211_TranslateToDbm( ieee80211_TranslateToDbm(
...@@ -1166,10 +1162,8 @@ inline int ieee80211_network_init( ...@@ -1166,10 +1162,8 @@ inline int ieee80211_network_init(
#ifdef THOMAS_TURBO #ifdef THOMAS_TURBO
network->Turbo_Enable = 0; network->Turbo_Enable = 0;
#endif #endif
#ifdef ENABLE_DOT11D
network->CountryIeLen = 0; network->CountryIeLen = 0;
memset(network->CountryIeBuf, 0, MAX_IE_LEN); memset(network->CountryIeBuf, 0, MAX_IE_LEN);
#endif
if (stats->freq == IEEE80211_52GHZ_BAND) { if (stats->freq == IEEE80211_52GHZ_BAND) {
/* for A band (No DS info) */ /* for A band (No DS info) */
...@@ -1394,14 +1388,12 @@ inline int ieee80211_network_init( ...@@ -1394,14 +1388,12 @@ inline int ieee80211_network_init(
memcpy(network->rsn_ie, info_element, memcpy(network->rsn_ie, info_element,
network->rsn_ie_len); network->rsn_ie_len);
break; break;
#ifdef ENABLE_DOT11D
case MFIE_TYPE_COUNTRY: case MFIE_TYPE_COUNTRY:
IEEE80211_DEBUG_SCAN("MFIE_TYPE_COUNTRY: %d bytes\n", IEEE80211_DEBUG_SCAN("MFIE_TYPE_COUNTRY: %d bytes\n",
info_element->len); info_element->len);
// printk("=====>Receive <%s> Country IE\n",network->ssid); // printk("=====>Receive <%s> Country IE\n",network->ssid);
ieee80211_extract_country_ie(ieee, info_element, network, beacon->header.addr2); ieee80211_extract_country_ie(ieee, info_element, network, beacon->header.addr2);
break; break;
#endif
default: default:
IEEE80211_DEBUG_SCAN("unsupported IE %d\n", IEEE80211_DEBUG_SCAN("unsupported IE %d\n",
info_element->id); info_element->id);
...@@ -1552,10 +1544,8 @@ inline void update_network(struct ieee80211_network *dst, ...@@ -1552,10 +1544,8 @@ inline void update_network(struct ieee80211_network *dst,
#ifdef THOMAS_TURBO #ifdef THOMAS_TURBO
dst->Turbo_Enable = src->Turbo_Enable; dst->Turbo_Enable = src->Turbo_Enable;
#endif #endif
#ifdef ENABLE_DOT11D
dst->CountryIeLen = src->CountryIeLen; dst->CountryIeLen = src->CountryIeLen;
memcpy(dst->CountryIeBuf, src->CountryIeBuf, src->CountryIeLen); memcpy(dst->CountryIeBuf, src->CountryIeBuf, src->CountryIeLen);
#endif
} }
...@@ -1623,7 +1613,6 @@ inline void ieee80211_process_probe_response( ...@@ -1623,7 +1613,6 @@ inline void ieee80211_process_probe_response(
return; return;
} }
#ifdef ENABLE_DOT11D
// For Asus EeePc request, // For Asus EeePc request,
// (1) if wireless adapter receive get any 802.11d country code in AP beacon, // (1) if wireless adapter receive get any 802.11d country code in AP beacon,
// wireless adapter should follow the country code. // wireless adapter should follow the country code.
...@@ -1677,7 +1666,6 @@ inline void ieee80211_process_probe_response( ...@@ -1677,7 +1666,6 @@ inline void ieee80211_process_probe_response(
} }
} }
} }
#endif
/* The network parsed correctly -- so now we scan our known networks /* The network parsed correctly -- so now we scan our known networks
* to see if we can find it in our list. * to see if we can find it in our list.
* *
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
#include <linux/version.h> #include <linux/version.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#ifdef ENABLE_DOT11D
#include "dot11d.h" #include "dot11d.h"
#endif
u8 rsn_authen_cipher_suite[16][4] = { u8 rsn_authen_cipher_suite[16][4] = {
{0x00,0x0F,0xAC,0x00}, //Use group key, //Reserved {0x00,0x0F,0xAC,0x00}, //Use group key, //Reserved
{0x00,0x0F,0xAC,0x01}, //WEP-40 //RSNA default {0x00,0x0F,0xAC,0x01}, //WEP-40 //RSNA default
...@@ -443,10 +441,8 @@ void ieee80211_send_probe_requests(struct ieee80211_device *ieee) ...@@ -443,10 +441,8 @@ void ieee80211_send_probe_requests(struct ieee80211_device *ieee)
void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
{ {
short ch = 0; short ch = 0;
#ifdef ENABLE_DOT11D
u8 channel_map[MAX_CHANNEL_NUMBER+1]; u8 channel_map[MAX_CHANNEL_NUMBER+1];
memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1); memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1);
#endif
down(&ieee->scan_sem); down(&ieee->scan_sem);
// printk("==================> Sync scan\n"); // printk("==================> Sync scan\n");
...@@ -458,11 +454,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) ...@@ -458,11 +454,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
if (ch > MAX_CHANNEL_NUMBER) if (ch > MAX_CHANNEL_NUMBER)
goto out; /* scan completed */ goto out; /* scan completed */
#ifdef ENABLE_DOT11D
}while(!channel_map[ch]); }while(!channel_map[ch]);
#else
}while(!ieee->channel_map[ch]);
#endif
/* this fuction can be called in two situations /* this fuction can be called in two situations
* 1- We have switched to ad-hoc mode and we are * 1- We have switched to ad-hoc mode and we are
* performing a complete syncro scan before conclude * performing a complete syncro scan before conclude
...@@ -487,9 +479,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) ...@@ -487,9 +479,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
ieee->set_chan(ieee->dev, ch); ieee->set_chan(ieee->dev, ch);
// printk("=====>channel=%d ",ch); // printk("=====>channel=%d ",ch);
#ifdef ENABLE_DOT11D
if(channel_map[ch] == 1) if(channel_map[ch] == 1)
#endif
{ {
// printk("====send probe request\n"); // printk("====send probe request\n");
ieee80211_send_probe_requests(ieee); ieee80211_send_probe_requests(ieee);
...@@ -507,20 +497,16 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) ...@@ -507,20 +497,16 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
out: out:
ieee->sync_scan_hurryup = 0; ieee->sync_scan_hurryup = 0;
up(&ieee->scan_sem); up(&ieee->scan_sem);
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(ieee)) if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee); DOT11D_ScanComplete(ieee);
#endif
} }
void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee) void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee)
{ {
int ch; int ch;
unsigned int watch_dog = 0; unsigned int watch_dog = 0;
#ifdef ENABLE_DOT11D
u8 channel_map[MAX_CHANNEL_NUMBER+1]; u8 channel_map[MAX_CHANNEL_NUMBER+1];
memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1); memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1);
#endif
down(&ieee->scan_sem); down(&ieee->scan_sem);
ch = ieee->current_network.channel; ch = ieee->current_network.channel;
// if(ieee->sync_scan_hurryup) // if(ieee->sync_scan_hurryup)
...@@ -554,16 +540,12 @@ void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee) ...@@ -554,16 +540,12 @@ void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee)
{ {
goto out; goto out;
} }
#ifdef ENABLE_DOT11D
if(channel_map[ieee->current_network.channel] > 0) if(channel_map[ieee->current_network.channel] > 0)
#endif
{ {
ieee->set_chan(ieee->dev, ieee->current_network.channel); ieee->set_chan(ieee->dev, ieee->current_network.channel);
// printk("======>channel=%d ",ieee->current_network.channel); // printk("======>channel=%d ",ieee->current_network.channel);
} }
#ifdef ENABLE_DOT11D
if(channel_map[ieee->current_network.channel] == 1) if(channel_map[ieee->current_network.channel] == 1)
#endif
{ {
// printk("====send probe request\n"); // printk("====send probe request\n");
ieee80211_send_probe_requests(ieee); ieee80211_send_probe_requests(ieee);
...@@ -582,11 +564,7 @@ void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee) ...@@ -582,11 +564,7 @@ void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee)
goto out; /* scan completed */ goto out; /* scan completed */
ieee->current_network.channel = (ieee->current_network.channel + 1)%MAX_CHANNEL_NUMBER; ieee->current_network.channel = (ieee->current_network.channel + 1)%MAX_CHANNEL_NUMBER;
#ifdef ENABLE_DOT11D
}while(!channel_map[ieee->current_network.channel]); }while(!channel_map[ieee->current_network.channel]);
#else
}while(!ieee->channel_map[ieee->current_network.channel]);
#endif
} }
out: out:
//ieee->sync_scan_hurryup = 0; //ieee->sync_scan_hurryup = 0;
...@@ -594,10 +572,8 @@ void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee) ...@@ -594,10 +572,8 @@ void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee)
//ieee->current_network.channel = ch; //ieee->current_network.channel = ch;
ieee->actscanning = false; ieee->actscanning = false;
up(&ieee->scan_sem); up(&ieee->scan_sem);
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(ieee)) if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee); DOT11D_ScanComplete(ieee);
#endif
} }
...@@ -625,10 +601,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -625,10 +601,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
struct delayed_work *dwork = to_delayed_work(work); struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, softmac_scan_wq); struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, softmac_scan_wq);
static short watchdog = 0; static short watchdog = 0;
#ifdef ENABLE_DOT11D
u8 channel_map[MAX_CHANNEL_NUMBER+1]; u8 channel_map[MAX_CHANNEL_NUMBER+1];
memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1); memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1);
#endif
// printk("ieee80211_softmac_scan_wq ENABLE_IPS\n"); // printk("ieee80211_softmac_scan_wq ENABLE_IPS\n");
// printk("in %s\n",__func__); // printk("in %s\n",__func__);
down(&ieee->scan_sem); down(&ieee->scan_sem);
...@@ -639,11 +613,7 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -639,11 +613,7 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
if (watchdog++ > MAX_CHANNEL_NUMBER) if (watchdog++ > MAX_CHANNEL_NUMBER)
goto out; /* no good chans */ goto out; /* no good chans */
#ifdef ENABLE_DOT11D
}while(!channel_map[ieee->current_network.channel]); }while(!channel_map[ieee->current_network.channel]);
#else
}while(!ieee->channel_map[ieee->current_network.channel]);
#endif
//printk("current_network.channel:%d\n", ieee->current_network.channel); //printk("current_network.channel:%d\n", ieee->current_network.channel);
if (ieee->scanning == 0 ) if (ieee->scanning == 0 )
...@@ -652,9 +622,7 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -652,9 +622,7 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
goto out; goto out;
} }
ieee->set_chan(ieee->dev, ieee->current_network.channel); ieee->set_chan(ieee->dev, ieee->current_network.channel);
#ifdef ENABLE_DOT11D
if(channel_map[ieee->current_network.channel] == 1) if(channel_map[ieee->current_network.channel] == 1)
#endif
ieee80211_send_probe_requests(ieee); ieee80211_send_probe_requests(ieee);
queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, IEEE80211_SOFTMAC_SCAN_TIME); queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, IEEE80211_SOFTMAC_SCAN_TIME);
...@@ -666,10 +634,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -666,10 +634,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
ieee->scanning = 0; ieee->scanning = 0;
up(&ieee->scan_sem); up(&ieee->scan_sem);
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(ieee)) if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee); DOT11D_ScanComplete(ieee);
#endif
return; return;
} }
#else #else
...@@ -678,10 +644,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -678,10 +644,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
struct delayed_work *dwork = to_delayed_work(work); struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, softmac_scan_wq); struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, softmac_scan_wq);
short watchdog = 0; short watchdog = 0;
#ifdef ENABLE_DOT11D
u8 channel_map[MAX_CHANNEL_NUMBER+1]; u8 channel_map[MAX_CHANNEL_NUMBER+1];
memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1); memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1);
#endif
// printk("enter scan wq,watchdog is %d\n",watchdog); // printk("enter scan wq,watchdog is %d\n",watchdog);
down(&ieee->scan_sem); down(&ieee->scan_sem);
...@@ -691,11 +655,7 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -691,11 +655,7 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
if (watchdog++ > MAX_CHANNEL_NUMBER) if (watchdog++ > MAX_CHANNEL_NUMBER)
goto out; /* no good chans */ goto out; /* no good chans */
#ifdef ENABLE_DOT11D
}while(!channel_map[ieee->current_network.channel]); }while(!channel_map[ieee->current_network.channel]);
#else
}while(!ieee->channel_map[ieee->current_network.channel]);
#endif
// printk("current_network.channel:%d\n", ieee->current_network.channel); // printk("current_network.channel:%d\n", ieee->current_network.channel);
if (ieee->scanning == 0 ) if (ieee->scanning == 0 )
...@@ -704,18 +664,14 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -704,18 +664,14 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
goto out; goto out;
} }
ieee->set_chan(ieee->dev, ieee->current_network.channel); ieee->set_chan(ieee->dev, ieee->current_network.channel);
#ifdef ENABLE_DOT11D
if(channel_map[ieee->current_network.channel] == 1) if(channel_map[ieee->current_network.channel] == 1)
#endif
ieee80211_send_probe_requests(ieee); ieee80211_send_probe_requests(ieee);
queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, IEEE80211_SOFTMAC_SCAN_TIME); queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, IEEE80211_SOFTMAC_SCAN_TIME);
out: out:
up(&ieee->scan_sem); up(&ieee->scan_sem);
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(ieee)) if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee); DOT11D_ScanComplete(ieee);
#endif
} }
#endif #endif
...@@ -794,7 +750,6 @@ void ieee80211_stop_scan(struct ieee80211_device *ieee) ...@@ -794,7 +750,6 @@ void ieee80211_stop_scan(struct ieee80211_device *ieee)
/* called with ieee->lock held */ /* called with ieee->lock held */
void ieee80211_start_scan(struct ieee80211_device *ieee) void ieee80211_start_scan(struct ieee80211_device *ieee)
{ {
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(ieee) ) if(IS_DOT11D_ENABLE(ieee) )
{ {
if(IS_COUNTRY_IE_VALID(ieee)) if(IS_COUNTRY_IE_VALID(ieee))
...@@ -802,7 +757,6 @@ void ieee80211_start_scan(struct ieee80211_device *ieee) ...@@ -802,7 +757,6 @@ void ieee80211_start_scan(struct ieee80211_device *ieee)
RESET_CIE_WATCHDOG(ieee); RESET_CIE_WATCHDOG(ieee);
} }
} }
#endif
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN){ if (ieee->softmac_features & IEEE_SOFTMAC_SCAN){
if (ieee->scanning == 0) if (ieee->scanning == 0)
{ {
...@@ -822,7 +776,6 @@ void ieee80211_start_scan(struct ieee80211_device *ieee) ...@@ -822,7 +776,6 @@ void ieee80211_start_scan(struct ieee80211_device *ieee)
/* called with wx_sem held */ /* called with wx_sem held */
void ieee80211_start_scan_syncro(struct ieee80211_device *ieee) void ieee80211_start_scan_syncro(struct ieee80211_device *ieee)
{ {
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(ieee) ) if(IS_DOT11D_ENABLE(ieee) )
{ {
if(IS_COUNTRY_IE_VALID(ieee)) if(IS_COUNTRY_IE_VALID(ieee))
...@@ -830,7 +783,6 @@ void ieee80211_start_scan_syncro(struct ieee80211_device *ieee) ...@@ -830,7 +783,6 @@ void ieee80211_start_scan_syncro(struct ieee80211_device *ieee)
RESET_CIE_WATCHDOG(ieee); RESET_CIE_WATCHDOG(ieee);
} }
} }
#endif
ieee->sync_scan_hurryup = 0; ieee->sync_scan_hurryup = 0;
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN) if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
...@@ -2534,10 +2486,8 @@ void ieee80211_start_ibss_wq(struct work_struct *work) ...@@ -2534,10 +2486,8 @@ void ieee80211_start_ibss_wq(struct work_struct *work)
/* check if we have this cell in our network list */ /* check if we have this cell in our network list */
ieee80211_softmac_check_all_nets(ieee); ieee80211_softmac_check_all_nets(ieee);
#ifdef ENABLE_DOT11D
if(ieee->state == IEEE80211_NOLINK) if(ieee->state == IEEE80211_NOLINK)
ieee->current_network.channel = 10; ieee->current_network.channel = 10;
#endif
/* if not then the state is not linked. Maybe the user swithced to /* if not then the state is not linked. Maybe the user swithced to
* ad-hoc mode just after being in monitor mode, or just after * ad-hoc mode just after being in monitor mode, or just after
* being very few time in managed mode (so the card have had no * being very few time in managed mode (so the card have had no
...@@ -2626,7 +2576,6 @@ inline void ieee80211_start_ibss(struct ieee80211_device *ieee) ...@@ -2626,7 +2576,6 @@ inline void ieee80211_start_ibss(struct ieee80211_device *ieee)
void ieee80211_start_bss(struct ieee80211_device *ieee) void ieee80211_start_bss(struct ieee80211_device *ieee)
{ {
unsigned long flags; unsigned long flags;
#ifdef ENABLE_DOT11D
// //
// Ref: 802.11d 11.1.3.3 // Ref: 802.11d 11.1.3.3
// STA shall not start a BSS unless properly formed Beacon frame including a Country IE. // STA shall not start a BSS unless properly formed Beacon frame including a Country IE.
...@@ -2638,7 +2587,6 @@ void ieee80211_start_bss(struct ieee80211_device *ieee) ...@@ -2638,7 +2587,6 @@ void ieee80211_start_bss(struct ieee80211_device *ieee)
return; return;
} }
} }
#endif
/* check if we have already found the net we /* check if we have already found the net we
* are interested in (if any). * are interested in (if any).
* if not (we are disassociated and we are not * if not (we are disassociated and we are not
...@@ -2677,10 +2625,8 @@ void ieee80211_disassociate(struct ieee80211_device *ieee) ...@@ -2677,10 +2625,8 @@ void ieee80211_disassociate(struct ieee80211_device *ieee)
if (ieee->data_hard_stop) if (ieee->data_hard_stop)
ieee->data_hard_stop(ieee->dev); ieee->data_hard_stop(ieee->dev);
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(ieee)) if(IS_DOT11D_ENABLE(ieee))
Dot11d_Reset(ieee); Dot11d_Reset(ieee);
#endif
ieee->state = IEEE80211_NOLINK; ieee->state = IEEE80211_NOLINK;
ieee->link_change(ieee->dev); ieee->link_change(ieee->dev);
notify_wx_assoc_event(ieee); notify_wx_assoc_event(ieee);
...@@ -2822,11 +2768,7 @@ void ieee80211_start_protocol(struct ieee80211_device *ieee) ...@@ -2822,11 +2768,7 @@ void ieee80211_start_protocol(struct ieee80211_device *ieee)
if (ch > MAX_CHANNEL_NUMBER) if (ch > MAX_CHANNEL_NUMBER)
return; /* no channel found */ return; /* no channel found */
#ifdef ENABLE_DOT11D
}while(!GET_DOT11D_INFO(ieee)->channel_map[ch]); }while(!GET_DOT11D_INFO(ieee)->channel_map[ch]);
#else
}while(!ieee->channel_map[ch]);
#endif
ieee->current_network.channel = ch; ieee->current_network.channel = ch;
} }
...@@ -2954,9 +2896,7 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) ...@@ -2954,9 +2896,7 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
tasklet_init(&ieee->ps_task, tasklet_init(&ieee->ps_task,
(void(*)(unsigned long)) ieee80211_sta_ps, (void(*)(unsigned long)) ieee80211_sta_ps,
(unsigned long)ieee); (unsigned long)ieee);
#ifdef ENABLE_DOT11D
ieee->pDot11dInfo = kmalloc(sizeof(RT_DOT11D_INFO), GFP_ATOMIC); ieee->pDot11dInfo = kmalloc(sizeof(RT_DOT11D_INFO), GFP_ATOMIC);
#endif
} }
void ieee80211_softmac_free(struct ieee80211_device *ieee) void ieee80211_softmac_free(struct ieee80211_device *ieee)
...@@ -2971,10 +2911,8 @@ void ieee80211_softmac_free(struct ieee80211_device *ieee) ...@@ -2971,10 +2911,8 @@ void ieee80211_softmac_free(struct ieee80211_device *ieee)
cancel_delayed_work(&ieee->GPIOChangeRFWorkItem); cancel_delayed_work(&ieee->GPIOChangeRFWorkItem);
destroy_workqueue(ieee->wq); destroy_workqueue(ieee->wq);
#ifdef ENABLE_DOT11D
if(NULL != ieee->pDot11dInfo) if(NULL != ieee->pDot11dInfo)
kfree(ieee->pDot11dInfo); kfree(ieee->pDot11dInfo);
#endif
up(&ieee->wx_sem); up(&ieee->wx_sem);
} }
......
...@@ -78,9 +78,7 @@ double __extendsfdf2(float a) {return a;} ...@@ -78,9 +78,7 @@ double __extendsfdf2(float a) {return a;}
#include "r8180_pm.h" #include "r8180_pm.h"
#endif #endif
#ifdef ENABLE_DOT11D
#include "ieee80211/dot11d.h" #include "ieee80211/dot11d.h"
#endif
#ifdef CONFIG_RTL8185B #ifdef CONFIG_RTL8185B
//#define CONFIG_RTL8180_IO_MAP //#define CONFIG_RTL8180_IO_MAP
...@@ -3899,7 +3897,6 @@ void watch_dog_adaptive(unsigned long data) ...@@ -3899,7 +3897,6 @@ void watch_dog_adaptive(unsigned long data)
// DMESG("<----watch_dog_adaptive()\n"); // DMESG("<----watch_dog_adaptive()\n");
} }
#ifdef ENABLE_DOT11D
static CHANNEL_LIST ChannelPlan[] = { static CHANNEL_LIST ChannelPlan[] = {
{{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64},19}, //FCC {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64},19}, //FCC
...@@ -3975,7 +3972,6 @@ static void rtl8180_set_channel_map(u8 channel_plan, struct ieee80211_device *ie ...@@ -3975,7 +3972,6 @@ static void rtl8180_set_channel_map(u8 channel_plan, struct ieee80211_device *ie
} }
} }
} }
#endif
//Add for RF power on power off by lizhaoming 080512 //Add for RF power on power off by lizhaoming 080512
void GPIOChangeRFWorkItemCallBack(struct work_struct *work); void GPIOChangeRFWorkItemCallBack(struct work_struct *work);
...@@ -4003,7 +3999,6 @@ short rtl8180_init(struct net_device *dev) ...@@ -4003,7 +3999,6 @@ short rtl8180_init(struct net_device *dev)
u16 tmpu16; u16 tmpu16;
int i, j; int i, j;
#ifdef ENABLE_DOT11D
#if 0 #if 0
for(i=0;i<0xFF;i++) { for(i=0;i<0xFF;i++) {
if(i%16 == 0) if(i%16 == 0)
...@@ -4020,21 +4015,6 @@ short rtl8180_init(struct net_device *dev) ...@@ -4020,21 +4015,6 @@ short rtl8180_init(struct net_device *dev)
DMESG("Channel plan is %d\n",priv->channel_plan); DMESG("Channel plan is %d\n",priv->channel_plan);
rtl8180_set_channel_map(priv->channel_plan, priv->ieee80211); rtl8180_set_channel_map(priv->channel_plan, priv->ieee80211);
#else
int ch;
//Set Default Channel Plan
if(!channels){
DMESG("No channels, aborting");
return -1;
}
ch=channels;
priv->channel_plan = 0;//hikaru
// set channels 1..14 allowed in given locale
for (i=1; i<=14; i++) {
(priv->ieee80211->channel_map)[i] = (u8)(ch & 0x01);
ch >>= 1;
}
#endif
//memcpy(priv->stats,0,sizeof(struct Stats)); //memcpy(priv->stats,0,sizeof(struct Stats));
......
...@@ -14,9 +14,7 @@ ...@@ -14,9 +14,7 @@
#include "r8180_rtl8225.h" #include "r8180_rtl8225.h"
#include "r8180_93cx6.h" #include "r8180_93cx6.h"
#ifdef ENABLE_DOT11D
#include "ieee80211/dot11d.h" #include "ieee80211/dot11d.h"
#endif
#ifdef CONFIG_RTL8185B #ifdef CONFIG_RTL8185B
...@@ -431,7 +429,6 @@ void rtl8225z2_rf_close(struct net_device *dev) ...@@ -431,7 +429,6 @@ void rtl8225z2_rf_close(struct net_device *dev)
rtl8185_set_anaparam2(dev, RTL8225z2_ANAPARAM2_OFF); rtl8185_set_anaparam2(dev, RTL8225z2_ANAPARAM2_OFF);
} }
#ifdef ENABLE_DOT11D
// //
// Description: // Description:
// Map dBm into Tx power index according to // Map dBm into Tx power index according to
...@@ -502,7 +499,6 @@ DbmToTxPwrIdx( ...@@ -502,7 +499,6 @@ DbmToTxPwrIdx(
return TxPwrIdx; return TxPwrIdx;
} }
#endif
void rtl8225z2_SetTXPowerLevel(struct net_device *dev, short ch) void rtl8225z2_SetTXPowerLevel(struct net_device *dev, short ch)
{ {
...@@ -554,7 +550,6 @@ void rtl8225z2_SetTXPowerLevel(struct net_device *dev, short ch) ...@@ -554,7 +550,6 @@ void rtl8225z2_SetTXPowerLevel(struct net_device *dev, short ch)
CckTxPwrIdx, OfdmTxPwrIdx); CckTxPwrIdx, OfdmTxPwrIdx);
} }
#endif #endif
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(priv->ieee80211) && if(IS_DOT11D_ENABLE(priv->ieee80211) &&
IS_DOT11D_STATE_DONE(priv->ieee80211) ) IS_DOT11D_STATE_DONE(priv->ieee80211) )
{ {
...@@ -576,7 +571,6 @@ void rtl8225z2_SetTXPowerLevel(struct net_device *dev, short ch) ...@@ -576,7 +571,6 @@ void rtl8225z2_SetTXPowerLevel(struct net_device *dev, short ch)
//priv->CurrentCckTxPwrIdx = cck_power_level; //priv->CurrentCckTxPwrIdx = cck_power_level;
//priv->CurrentOfdmTxPwrIdx = ofdm_power_level; //priv->CurrentOfdmTxPwrIdx = ofdm_power_level;
#endif
max_cck_power_level = 15; max_cck_power_level = 15;
max_ofdm_power_level = 25; // 12 -> 25 max_ofdm_power_level = 25; // 12 -> 25
......
...@@ -22,9 +22,7 @@ ...@@ -22,9 +22,7 @@
#include "r8180_hw.h" #include "r8180_hw.h"
#include "r8180_sa2400.h" #include "r8180_sa2400.h"
#ifdef ENABLE_DOT11D
#include "ieee80211/dot11d.h" #include "ieee80211/dot11d.h"
#endif
//#define RATE_COUNT 4 //#define RATE_COUNT 4
u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000, u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000,
...@@ -313,11 +311,7 @@ static int rtl8180_wx_get_range(struct net_device *dev, ...@@ -313,11 +311,7 @@ static int rtl8180_wx_get_range(struct net_device *dev,
for (i = 0, val = 0; i < 14; i++) { for (i = 0, val = 0; i < 14; i++) {
// Include only legal frequencies for some countries // Include only legal frequencies for some countries
#ifdef ENABLE_DOT11D
if ((GET_DOT11D_INFO(priv->ieee80211)->channel_map)[i+1]) { if ((GET_DOT11D_INFO(priv->ieee80211)->channel_map)[i+1]) {
#else
if ((priv->ieee80211->channel_map)[i+1]) {
#endif
range->freq[val].i = i + 1; range->freq[val].i = i + 1;
range->freq[val].m = ieee80211_wlan_frequencies[i] * 100000; range->freq[val].m = ieee80211_wlan_frequencies[i] * 100000;
range->freq[val].e = 1; range->freq[val].e = 1;
...@@ -1189,20 +1183,12 @@ static int r8180_wx_set_channelplan(struct net_device *dev, ...@@ -1189,20 +1183,12 @@ static int r8180_wx_set_channelplan(struct net_device *dev,
// Clear old channel map // Clear old channel map
for (i=1;i<=MAX_CHANNEL_NUMBER;i++) for (i=1;i<=MAX_CHANNEL_NUMBER;i++)
{ {
#ifdef ENABLE_DOT11D
GET_DOT11D_INFO(priv->ieee80211)->channel_map[i] = 0; GET_DOT11D_INFO(priv->ieee80211)->channel_map[i] = 0;
#else
priv->ieee80211->channel_map[i] = 0;
#endif
} }
// Set new channel map // Set new channel map
for (i=1;i<=DefaultChannelPlan[*val].Len;i++) for (i=1;i<=DefaultChannelPlan[*val].Len;i++)
{ {
#ifdef ENABLE_DOT11D
GET_DOT11D_INFO(priv->ieee80211)->channel_map[DefaultChannelPlan[*val].Channel[i-1]] = 1; GET_DOT11D_INFO(priv->ieee80211)->channel_map[DefaultChannelPlan[*val].Channel[i-1]] = 1;
#else
priv->ieee80211->channel_map[DefaultChannelPlan[*val].Channel[i-1]] = 1;
#endif
} }
} }
up(&priv->wx_sem); up(&priv->wx_sem);
......
...@@ -34,9 +34,7 @@ Major Change History: ...@@ -34,9 +34,7 @@ Major Change History:
#include "r8180_pm.h" #include "r8180_pm.h"
#endif #endif
#ifdef ENABLE_DOT11D
#include "ieee80211/dot11d.h" #include "ieee80211/dot11d.h"
#endif
#ifdef CONFIG_RTL8185B #ifdef CONFIG_RTL8185B
...@@ -2576,10 +2574,8 @@ MgntDisconnect( ...@@ -2576,10 +2574,8 @@ MgntDisconnect(
// Indication of disassociation event. // Indication of disassociation event.
//DrvIFIndicateDisassociation(Adapter, asRsn); //DrvIFIndicateDisassociation(Adapter, asRsn);
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(priv->ieee80211)) if(IS_DOT11D_ENABLE(priv->ieee80211))
Dot11d_Reset(priv->ieee80211); Dot11d_Reset(priv->ieee80211);
#endif
// In adhoc mode, update beacon frame. // In adhoc mode, update beacon frame.
if( priv->ieee80211->state == IEEE80211_LINKED ) if( priv->ieee80211->state == IEEE80211_LINKED )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment