Commit 622d5018 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rtl8192su: remove ENABLE_DOT11D ifdefs

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent fe4f699c
...@@ -7,7 +7,6 @@ EXTRA_CFLAGS += -mhard-float -DCONFIG_FORCE_HARD_FLOAT=y ...@@ -7,7 +7,6 @@ EXTRA_CFLAGS += -mhard-float -DCONFIG_FORCE_HARD_FLOAT=y
EXTRA_CFLAGS += -DJACKSON_NEW_RX EXTRA_CFLAGS += -DJACKSON_NEW_RX
EXTRA_CFLAGS += -DTHOMAS_BEACON -DTHOMAS_TURBO EXTRA_CFLAGS += -DTHOMAS_BEACON -DTHOMAS_TURBO
#EXTRA_CFLAGS += -DUSE_ONE_PIPE #EXTRA_CFLAGS += -DUSE_ONE_PIPE
EXTRA_CFLAGS += -DENABLE_DOT11D
EXTRA_CFLAGS += -DRTL8192SU EXTRA_CFLAGS += -DRTL8192SU
EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1 EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
......
...@@ -5,8 +5,7 @@ EXTRA_CFLAGS += -DRTL8192S_DISABLE_FW_DM=0 ...@@ -5,8 +5,7 @@ EXTRA_CFLAGS += -DRTL8192S_DISABLE_FW_DM=0
EXTRA_CFLAGS += -DRTL8192SU EXTRA_CFLAGS += -DRTL8192SU
#EXTRA_CFLAGS += -DJOHN_NOCPY #EXTRA_CFLAGS += -DJOHN_NOCPY
EXTRA_CFLAGS += -DTHOMAS_TURBO EXTRA_CFLAGS += -DTHOMAS_TURBO
#flags to enable or disble 80211D feature
EXTRA_CFLAGS += -DENABLE_DOT11D
ieee80211-rsl-objs := ieee80211_rx.o \ ieee80211-rsl-objs := ieee80211_rx.o \
ieee80211_softmac.o \ ieee80211_softmac.o \
ieee80211_tx.o \ ieee80211_tx.o \
......
#ifdef ENABLE_DOT11D
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// File: // File:
// Dot11d.c // Dot11d.c
...@@ -227,4 +226,3 @@ EXPORT_SYMBOL(DOT11D_ScanComplete); ...@@ -227,4 +226,3 @@ EXPORT_SYMBOL(DOT11D_ScanComplete);
EXPORT_SYMBOL(IsLegalChannel); EXPORT_SYMBOL(IsLegalChannel);
EXPORT_SYMBOL(ToLegalChannel); EXPORT_SYMBOL(ToLegalChannel);
#endif
#ifndef __INC_DOT11D_H #ifndef __INC_DOT11D_H
#define __INC_DOT11D_H #define __INC_DOT11D_H
#ifdef ENABLE_DOT11D
#include "ieee80211.h" #include "ieee80211.h"
//#define ENABLE_DOT11D
//#define DOT11D_MAX_CHNL_NUM 83 //#define DOT11D_MAX_CHNL_NUM 83
typedef struct _CHNL_TXPOWER_TRIPLE { typedef struct _CHNL_TXPOWER_TRIPLE {
...@@ -98,5 +95,4 @@ int ToLegalChannel( ...@@ -98,5 +95,4 @@ int ToLegalChannel(
struct ieee80211_device * dev, struct ieee80211_device * dev,
u8 channel u8 channel
); );
#endif //ENABLE_DOT11D
#endif // #ifndef __INC_DOT11D_H #endif // #ifndef __INC_DOT11D_H
...@@ -1446,10 +1446,8 @@ struct ieee80211_network { ...@@ -1446,10 +1446,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
// HT Related, by amy, 2008.04.29 // HT Related, by amy, 2008.04.29
BSS_HT bssht; BSS_HT bssht;
// Add to handle broadcom AP management frame CCK rate. // Add to handle broadcom AP management frame CCK rate.
...@@ -1674,7 +1672,6 @@ typedef u32 RT_RF_CHANGE_SOURCE; ...@@ -1674,7 +1672,6 @@ typedef u32 RT_RF_CHANGE_SOURCE;
#define RF_CHANGE_BY_IPS BIT28 #define RF_CHANGE_BY_IPS BIT28
#define RF_CHANGE_BY_INIT 0 // Do not change the RFOff reason. Defined by Bruce, 2008-01-17. #define RF_CHANGE_BY_INIT 0 // Do not change the RFOff reason. Defined by Bruce, 2008-01-17.
#ifdef ENABLE_DOT11D
typedef enum typedef enum
{ {
COUNTRY_CODE_FCC = 0, COUNTRY_CODE_FCC = 0,
...@@ -1689,7 +1686,6 @@ typedef enum ...@@ -1689,7 +1686,6 @@ typedef enum
COUNTRY_CODE_MIC, COUNTRY_CODE_MIC,
COUNTRY_CODE_GLOBAL_DOMAIN COUNTRY_CODE_GLOBAL_DOMAIN
}country_code_type_t; }country_code_type_t;
#endif
// Firmware realted CMD IO. // Firmware realted CMD IO.
typedef enum _FW_CMD_IO_TYPE{ typedef enum _FW_CMD_IO_TYPE{
FW_CMD_DIG_ENABLE = 0, // For DIG DM FW_CMD_DIG_ENABLE = 0, // For DIG DM
...@@ -1898,12 +1894,8 @@ struct ieee80211_device { ...@@ -1898,12 +1894,8 @@ struct ieee80211_device {
/* map of allowed channels. 0 is dummy */ /* map of allowed channels. 0 is dummy */
// FIXME: remeber to default to a basic channel plan depending of the PHY type // FIXME: remeber to default to a basic channel plan depending of the PHY type
#ifdef ENABLE_DOT11D
void* pDot11dInfo; void* pDot11dInfo;
bool bGlobalDomain; bool bGlobalDomain;
#else
int channel_map[MAX_CHANNEL_NUMBER+1];
#endif
int rate; /* current rate */ int rate; /* current rate */
int basic_rate; int basic_rate;
//FIXME: pleace callback, see if redundant with softmac_features //FIXME: pleace callback, see if redundant with softmac_features
......
...@@ -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)
...@@ -1652,7 +1650,6 @@ static const char *get_info_element_string(u16 id) ...@@ -1652,7 +1650,6 @@ static const char *get_info_element_string(u16 id)
} }
#endif #endif
#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,
...@@ -1685,7 +1682,6 @@ static inline void ieee80211_extract_country_ie( ...@@ -1685,7 +1682,6 @@ static inline void ieee80211_extract_country_ie(
} }
} }
#endif
int ieee80211_parse_info_param(struct ieee80211_device *ieee, int ieee80211_parse_info_param(struct ieee80211_device *ieee,
struct ieee80211_info_element *info_element, struct ieee80211_info_element *info_element,
...@@ -2176,14 +2172,12 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee, ...@@ -2176,14 +2172,12 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
"QoS Error need to parse QOS_PARAMETER IE\n"); "QoS Error need to parse QOS_PARAMETER IE\n");
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, network->bssid);//addr2 is same as addr3 when from an AP ieee80211_extract_country_ie(ieee, info_element, network, network->bssid);//addr2 is same as addr3 when from an AP
break; break;
#endif
/* TODO */ /* TODO */
#if 0 #if 0
/* 802.11h */ /* 802.11h */
...@@ -2359,10 +2353,8 @@ static inline int ieee80211_network_init( ...@@ -2359,10 +2353,8 @@ static 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
//Initialize HT parameters //Initialize HT parameters
//ieee80211_ht_initialize(&network->bssht); //ieee80211_ht_initialize(&network->bssht);
HTInitializeBssDesc(&network->bssht); HTInitializeBssDesc(&network->bssht);
...@@ -2540,10 +2532,8 @@ static inline void update_network(struct ieee80211_network *dst, ...@@ -2540,10 +2532,8 @@ static inline void update_network(struct ieee80211_network *dst,
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
//added by amy for LEAP //added by amy for LEAP
dst->bWithAironetIE = src->bWithAironetIE; dst->bWithAironetIE = src->bWithAironetIE;
...@@ -2611,7 +2601,6 @@ static inline void ieee80211_process_probe_response( ...@@ -2611,7 +2601,6 @@ static 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.
...@@ -2668,7 +2657,6 @@ static inline void ieee80211_process_probe_response( ...@@ -2668,7 +2657,6 @@ static 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.
......
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#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
...@@ -435,10 +433,8 @@ void ieee80211_send_probe_requests(struct ieee80211_device *ieee) ...@@ -435,10 +433,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
ieee->be_scan_inprogress = true; ieee->be_scan_inprogress = true;
down(&ieee->scan_sem); down(&ieee->scan_sem);
...@@ -449,11 +445,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) ...@@ -449,11 +445,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
ch++; ch++;
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
...@@ -477,9 +469,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) ...@@ -477,9 +469,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
if (ieee->state == IEEE80211_LINKED) if (ieee->state == IEEE80211_LINKED)
goto out; goto out;
ieee->set_chan(ieee->dev, ch); ieee->set_chan(ieee->dev, ch);
#ifdef ENABLE_DOT11D
if(channel_map[ch] == 1) if(channel_map[ch] == 1)
#endif
ieee80211_send_probe_requests(ieee); ieee80211_send_probe_requests(ieee);
/* this prevent excessive time wait when we /* this prevent excessive time wait when we
...@@ -503,10 +493,8 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) ...@@ -503,10 +493,8 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
} }
else{ else{
ieee->sync_scan_hurryup = 0; ieee->sync_scan_hurryup = 0;
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(ieee)) if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee); DOT11D_ScanComplete(ieee);
#endif
up(&ieee->scan_sem); up(&ieee->scan_sem);
ieee->be_scan_inprogress = false; ieee->be_scan_inprogress = false;
} }
...@@ -517,10 +505,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -517,10 +505,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
struct delayed_work *dwork = container_of(work, struct delayed_work, work); struct delayed_work *dwork = container_of(work, struct 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);
u8 last_channel = ieee->current_network.channel; //recored init channel inorder not change current channel when comming out the scan unexpectedly. WB. u8 last_channel = ieee->current_network.channel; //recored init channel inorder not change current channel when comming out the scan unexpectedly. WB.
#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
if(!ieee->ieee_up) if(!ieee->ieee_up)
return; return;
down(&ieee->scan_sem); down(&ieee->scan_sem);
...@@ -530,25 +516,15 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -530,25 +516,15 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
if (ieee->scan_watch_dog++ > MAX_CHANNEL_NUMBER) if (ieee->scan_watch_dog++ > MAX_CHANNEL_NUMBER)
{ {
//if current channel is not in channel map, set to default channel. //if current channel is not in channel map, set to default channel.
#ifdef ENABLE_DOT11D
if (!channel_map[ieee->current_network.channel]); if (!channel_map[ieee->current_network.channel]);
#else
if (!ieee->channel_map[ieee->current_network.channel]);
#endif
ieee->current_network.channel = 6; ieee->current_network.channel = 6;
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
if (ieee->scanning == 0 ) if (ieee->scanning == 0 )
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);
...@@ -556,10 +532,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) ...@@ -556,10 +532,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
up(&ieee->scan_sem); up(&ieee->scan_sem);
return; return;
out: out:
#ifdef ENABLE_DOT11D
if(IS_DOT11D_ENABLE(ieee)) if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee); DOT11D_ScanComplete(ieee);
#endif
ieee->current_network.channel = last_channel; ieee->current_network.channel = last_channel;
ieee->actscanning = false; ieee->actscanning = false;
ieee->scan_watch_dog = 0; ieee->scan_watch_dog = 0;
...@@ -640,7 +614,6 @@ void ieee80211_stop_scan(struct ieee80211_device *ieee) ...@@ -640,7 +614,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))
...@@ -648,7 +621,6 @@ void ieee80211_start_scan(struct ieee80211_device *ieee) ...@@ -648,7 +621,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){
ieee->scanning = 1; ieee->scanning = 1;
...@@ -662,7 +634,6 @@ void ieee80211_start_scan(struct ieee80211_device *ieee) ...@@ -662,7 +634,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))
...@@ -670,7 +641,6 @@ void ieee80211_start_scan_syncro(struct ieee80211_device *ieee) ...@@ -670,7 +641,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)
ieee80211_softmac_scan_syncro(ieee); ieee80211_softmac_scan_syncro(ieee);
...@@ -2499,11 +2469,9 @@ void ieee80211_start_ibss_wq(struct work_struct *work) ...@@ -2499,11 +2469,9 @@ void ieee80211_start_ibss_wq(struct work_struct *work)
ieee80211_softmac_check_all_nets(ieee); ieee80211_softmac_check_all_nets(ieee);
#ifdef ENABLE_DOT11D //if creating an ad-hoc, set its channel to 10 temporarily--this is the requirement for ASUS, not 11D, so disable 11d.
// if((IS_DOT11D_ENABLE(ieee)) && (ieee->state == IEEE80211_NOLINK)) // if((IS_DOT11D_ENABLE(ieee)) && (ieee->state == IEEE80211_NOLINK))
if (ieee->state == IEEE80211_NOLINK) if (ieee->state == IEEE80211_NOLINK)
ieee->current_network.channel = 6; ieee->current_network.channel = 6;
#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
...@@ -2593,7 +2561,6 @@ inline void ieee80211_start_ibss(struct ieee80211_device *ieee) ...@@ -2593,7 +2561,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.
...@@ -2605,7 +2572,6 @@ void ieee80211_start_bss(struct ieee80211_device *ieee) ...@@ -2605,7 +2572,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
...@@ -2647,10 +2613,8 @@ void ieee80211_disassociate(struct ieee80211_device *ieee) ...@@ -2647,10 +2613,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->is_set_key = false; ieee->is_set_key = false;
...@@ -2796,11 +2760,7 @@ void ieee80211_start_protocol(struct ieee80211_device *ieee) ...@@ -2796,11 +2760,7 @@ void ieee80211_start_protocol(struct ieee80211_device *ieee)
ch++; ch++;
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;
} }
...@@ -2848,12 +2808,10 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) ...@@ -2848,12 +2808,10 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
for(i = 0; i < 5; i++) { for(i = 0; i < 5; i++) {
ieee->seq_ctrl[i] = 0; ieee->seq_ctrl[i] = 0;
} }
#ifdef ENABLE_DOT11D
ieee->pDot11dInfo = kmalloc(sizeof(RT_DOT11D_INFO), GFP_ATOMIC); ieee->pDot11dInfo = kmalloc(sizeof(RT_DOT11D_INFO), GFP_ATOMIC);
if (!ieee->pDot11dInfo) if (!ieee->pDot11dInfo)
IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for DOT11D\n"); IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for DOT11D\n");
memset(ieee->pDot11dInfo, 0, sizeof(RT_DOT11D_INFO)); memset(ieee->pDot11dInfo, 0, sizeof(RT_DOT11D_INFO));
#endif
//added for AP roaming //added for AP roaming
ieee->LinkDetectInfo.SlotNum = 2; ieee->LinkDetectInfo.SlotNum = 2;
ieee->LinkDetectInfo.NumRecvBcnInPeriod=0; ieee->LinkDetectInfo.NumRecvBcnInPeriod=0;
...@@ -2924,13 +2882,11 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) ...@@ -2924,13 +2882,11 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
void ieee80211_softmac_free(struct ieee80211_device *ieee) void ieee80211_softmac_free(struct ieee80211_device *ieee)
{ {
down(&ieee->wx_sem); down(&ieee->wx_sem);
#ifdef ENABLE_DOT11D
if(NULL != ieee->pDot11dInfo) if(NULL != ieee->pDot11dInfo)
{ {
kfree(ieee->pDot11dInfo); kfree(ieee->pDot11dInfo);
ieee->pDot11dInfo = NULL; ieee->pDot11dInfo = NULL;
} }
#endif
del_timer_sync(&ieee->associate_timer); del_timer_sync(&ieee->associate_timer);
cancel_delayed_work(&ieee->associate_retry_wq); cancel_delayed_work(&ieee->associate_retry_wq);
......
...@@ -15,9 +15,7 @@ ...@@ -15,9 +15,7 @@
#include "ieee80211.h" #include "ieee80211.h"
#ifdef ENABLE_DOT11D
#include "dot11d.h" #include "dot11d.h"
#endif
/* FIXME: add A freqs */ /* FIXME: add A freqs */
const long ieee80211_wlan_frequencies[] = { const long ieee80211_wlan_frequencies[] = {
...@@ -63,12 +61,10 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info ...@@ -63,12 +61,10 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info
}else { /* Set the channel */ }else { /* Set the channel */
#ifdef ENABLE_DOT11D
if (!(GET_DOT11D_INFO(ieee)->channel_map)[fwrq->m]) { if (!(GET_DOT11D_INFO(ieee)->channel_map)[fwrq->m]) {
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
#endif
ieee->current_network.channel = fwrq->m; ieee->current_network.channel = fwrq->m;
ieee->set_chan(ieee->dev, ieee->current_network.channel); ieee->set_chan(ieee->dev, ieee->current_network.channel);
......
...@@ -47,9 +47,7 @@ ...@@ -47,9 +47,7 @@
#include "r819xU_phyreg.h" #include "r819xU_phyreg.h"
#endif #endif
#ifdef ENABLE_DOT11D
#include "ieee80211/dot11d.h" #include "ieee80211/dot11d.h"
#endif
/*---------------------------Define Local Constant---------------------------*/ /*---------------------------Define Local Constant---------------------------*/
/* Channel switch:The size of command tables for switch channel*/ /* Channel switch:The size of command tables for switch channel*/
...@@ -3691,13 +3689,11 @@ phy_SwChnlStepByStep( ...@@ -3691,13 +3689,11 @@ phy_SwChnlStepByStep(
//RT_ASSERT(IsLegalChannel(dev, channel), ("illegal channel: %d\n", channel)); //RT_ASSERT(IsLegalChannel(dev, channel), ("illegal channel: %d\n", channel));
RT_TRACE(COMP_CH, "===========>%s(), channel:%d, stage:%d, step:%d\n", __FUNCTION__, channel, *stage, *step); RT_TRACE(COMP_CH, "===========>%s(), channel:%d, stage:%d, step:%d\n", __FUNCTION__, channel, *stage, *step);
//RT_ASSERT((pHalData != NULL), ("pHalData should not be NULL\n")); //RT_ASSERT((pHalData != NULL), ("pHalData should not be NULL\n"));
#ifdef ENABLE_DOT11D
if (!IsLegalChannel(priv->ieee80211, channel)) if (!IsLegalChannel(priv->ieee80211, channel))
{ {
RT_TRACE(COMP_ERR, "=============>set to illegal channel:%d\n", channel); RT_TRACE(COMP_ERR, "=============>set to illegal channel:%d\n", channel);
return true; //return true to tell upper caller function this channel setting is finished! Or it will in while loop. return true; //return true to tell upper caller function this channel setting is finished! Or it will in while loop.
} }
#endif
//pChnlAccessSetting = &Adapter->MgntInfo.Info8185.ChannelAccessSetting; //pChnlAccessSetting = &Adapter->MgntInfo.Info8185.ChannelAccessSetting;
//RT_ASSERT((pChnlAccessSetting != NULL), ("pChnlAccessSetting should not be NULL\n")); //RT_ASSERT((pChnlAccessSetting != NULL), ("pChnlAccessSetting should not be NULL\n"));
......
...@@ -80,9 +80,7 @@ double __extendsfdf2(float a) {return a;} ...@@ -80,9 +80,7 @@ double __extendsfdf2(float a) {return a;}
#include "r8192U_pm.h" #include "r8192U_pm.h"
#endif #endif
#ifdef ENABLE_DOT11D
#include "ieee80211/dot11d.h" #include "ieee80211/dot11d.h"
#endif
#else #else
...@@ -103,9 +101,7 @@ double __extendsfdf2(float a) {return a;} ...@@ -103,9 +101,7 @@ double __extendsfdf2(float a) {return a;}
#include "r8192U_pm.h" #include "r8192U_pm.h"
#endif #endif
#ifdef ENABLE_DOT11D
#include "ieee80211/dot11d.h" #include "ieee80211/dot11d.h"
#endif
#endif #endif
...@@ -286,7 +282,6 @@ struct rtl819x_ops rtl8192u_ops = { ...@@ -286,7 +282,6 @@ struct rtl819x_ops rtl8192u_ops = {
}; };
#endif #endif
#ifdef ENABLE_DOT11D
typedef struct _CHANNEL_LIST typedef struct _CHANNEL_LIST
{ {
...@@ -362,7 +357,6 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv* priv) ...@@ -362,7 +357,6 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv* priv)
} }
return; return;
} }
#endif
#define eqMacAddr(a,b) ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 ) #define eqMacAddr(a,b) ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 )
...@@ -6850,7 +6844,6 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) ...@@ -6850,7 +6844,6 @@ static void rtl8192_read_eeprom_info(struct net_device* dev)
short rtl8192_get_channel_map(struct net_device * dev) short rtl8192_get_channel_map(struct net_device * dev)
{ {
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
#ifdef ENABLE_DOT11D
if(priv->ChannelPlan > COUNTRY_CODE_GLOBAL_DOMAIN){ if(priv->ChannelPlan > COUNTRY_CODE_GLOBAL_DOMAIN){
printk("rtl8180_init:Error channel plan! Set to default.\n"); printk("rtl8180_init:Error channel plan! Set to default.\n");
priv->ChannelPlan= 0; priv->ChannelPlan= 0;
...@@ -6858,21 +6851,6 @@ short rtl8192_get_channel_map(struct net_device * dev) ...@@ -6858,21 +6851,6 @@ short rtl8192_get_channel_map(struct net_device * dev)
RT_TRACE(COMP_INIT, "Channel plan is %d\n",priv->ChannelPlan); RT_TRACE(COMP_INIT, "Channel plan is %d\n",priv->ChannelPlan);
rtl819x_set_channel_map(priv->ChannelPlan, priv); rtl819x_set_channel_map(priv->ChannelPlan, priv);
#else
int ch,i;
//Set Default Channel Plan
if(!channels){
DMESG("No channels, aborting");
return -1;
}
ch=channels;
priv->ChannelPlan= 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
return 0; return 0;
} }
......
...@@ -27,9 +27,7 @@ ...@@ -27,9 +27,7 @@
#include "r8192U_hw.h" #include "r8192U_hw.h"
#endif #endif
#ifdef ENABLE_DOT11D
#include "ieee80211/dot11d.h" #include "ieee80211/dot11d.h"
#endif
#define RATE_COUNT 12 #define RATE_COUNT 12
u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000, u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000,
...@@ -529,11 +527,7 @@ static int rtl8180_wx_get_range(struct net_device *dev, ...@@ -529,11 +527,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;
......
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
#include "r8192U_dm.h" #include "r8192U_dm.h"
#include "r819xU_firmware_img.h" #include "r819xU_firmware_img.h"
#ifdef ENABLE_DOT11D
#include "ieee80211/dot11d.h" #include "ieee80211/dot11d.h"
#endif
static u32 RF_CHANNEL_TABLE_ZEBRA[] = { static u32 RF_CHANNEL_TABLE_ZEBRA[] = {
0, 0,
0x085c, //2412 1 0x085c, //2412 1
...@@ -1279,13 +1277,11 @@ u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8* stage, u ...@@ -1279,13 +1277,11 @@ u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8* stage, u
RT_TRACE(COMP_CH, "====>%s()====stage:%d, step:%d, channel:%d\n", __FUNCTION__, *stage, *step, channel); RT_TRACE(COMP_CH, "====>%s()====stage:%d, step:%d, channel:%d\n", __FUNCTION__, *stage, *step, channel);
// RT_ASSERT(IsLegalChannel(Adapter, channel), ("illegal channel: %d\n", channel)); // RT_ASSERT(IsLegalChannel(Adapter, channel), ("illegal channel: %d\n", channel));
#ifdef ENABLE_DOT11D
if (!IsLegalChannel(priv->ieee80211, channel)) if (!IsLegalChannel(priv->ieee80211, channel))
{ {
RT_TRACE(COMP_ERR, "=============>set to illegal channel:%d\n", channel); RT_TRACE(COMP_ERR, "=============>set to illegal channel:%d\n", channel);
return true; //return true to tell upper caller function this channel setting is finished! Or it will in while loop. return true; //return true to tell upper caller function this channel setting is finished! Or it will in while loop.
} }
#endif
//FIXME:need to check whether channel is legal or not here.WB //FIXME:need to check whether channel is legal or not here.WB
......
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