Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
EXTRA_CFLAGS += -DRATE_ADAPT
EXTRA_CFLAGS += -DCONFIG_RTL8180_PM
EXTRA_CFLAGS += -DRATE_ADAPT
EXTRA_CFLAGS += -DCONFIG_RTL8180_PM
-#+YJ,080626
-EXTRA_CFLAGS += -DENABLE_DOT11D
-
#enable it for legacy power save, disable it for leisure power save
EXTRA_CFLAGS += -DENABLE_LPS
#enable it for legacy power save, disable it for leisure power save
EXTRA_CFLAGS += -DENABLE_LPS
//-----------------------------------------------------------------------------
// File:
// Dot11d.c
//-----------------------------------------------------------------------------
// File:
// Dot11d.c
EXPORT_SYMBOL(IsLegalChannel);
EXPORT_SYMBOL(ToLegalChannel);
#endif
EXPORT_SYMBOL(IsLegalChannel);
EXPORT_SYMBOL(ToLegalChannel);
#endif
#define MFIE_TYPE_RATES_EX 50
#define MFIE_TYPE_GENERIC 221
#define MFIE_TYPE_RATES_EX 50
#define MFIE_TYPE_GENERIC 221
typedef enum
{
COUNTRY_CODE_FCC = 0,
typedef enum
{
COUNTRY_CODE_FCC = 0,
COUNTRY_CODE_GLOBAL_DOMAIN = 9,
COUNTRY_CODE_WORLD_WIDE_13_INDEX = 10
}country_code_type_t;
COUNTRY_CODE_GLOBAL_DOMAIN = 9,
COUNTRY_CODE_WORLD_WIDE_13_INDEX = 10
}country_code_type_t;
struct ieee80211_info_element_hdr {
u8 id;
struct ieee80211_info_element_hdr {
u8 id;
#ifdef THOMAS_TURBO
u8 Turbo_Enable;//enable turbo mode, added by thomas
#endif
#ifdef THOMAS_TURBO
u8 Turbo_Enable;//enable turbo mode, added by thomas
#endif
u16 CountryIeLen;
u8 CountryIeBuf[MAX_IE_LEN];
u16 CountryIeLen;
u8 CountryIeBuf[MAX_IE_LEN];
};
enum ieee80211_state {
};
enum ieee80211_state {
*/
short sync_scan_hurryup;
*/
short sync_scan_hurryup;
void * pDot11dInfo;
bool bGlobalDomain;
// For Liteon Ch12~13 passive scan
u8 MinPassiveChnlNum;
u8 IbssStartChnl;
void * pDot11dInfo;
bool bGlobalDomain;
// For Liteon Ch12~13 passive scan
u8 MinPassiveChnlNum;
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 basic_rate;
int rate; /* current rate */
int basic_rate;
#include <linux/ctype.h>
#include "ieee80211.h"
#include <linux/ctype.h>
#include "ieee80211.h"
static inline void ieee80211_monitor_rx(struct ieee80211_device *ieee,
struct sk_buff *skb,
struct ieee80211_rx_stats *rx_stats)
static inline void ieee80211_monitor_rx(struct ieee80211_device *ieee,
struct sk_buff *skb,
struct ieee80211_rx_stats *rx_stats)
static inline void ieee80211_extract_country_ie(
struct ieee80211_device *ieee,
struct ieee80211_info_element *info_element,
static inline void ieee80211_extract_country_ie(
struct ieee80211_device *ieee,
struct ieee80211_info_element *info_element,
int
ieee80211_TranslateToDbm(
int
ieee80211_TranslateToDbm(
#ifdef THOMAS_TURBO
network->Turbo_Enable = 0;
#endif
#ifdef THOMAS_TURBO
network->Turbo_Enable = 0;
#endif
network->CountryIeLen = 0;
memset(network->CountryIeBuf, 0, MAX_IE_LEN);
network->CountryIeLen = 0;
memset(network->CountryIeBuf, 0, MAX_IE_LEN);
if (stats->freq == IEEE80211_52GHZ_BAND) {
/* for A band (No DS info) */
if (stats->freq == IEEE80211_52GHZ_BAND) {
/* for A band (No DS info) */
memcpy(network->rsn_ie, info_element,
network->rsn_ie_len);
break;
memcpy(network->rsn_ie, info_element,
network->rsn_ie_len);
break;
case MFIE_TYPE_COUNTRY:
IEEE80211_DEBUG_SCAN("MFIE_TYPE_COUNTRY: %d bytes\n",
info_element->len);
// printk("=====>Receive <%s> Country IE\n",network->ssid);
ieee80211_extract_country_ie(ieee, info_element, network, beacon->header.addr2);
break;
case MFIE_TYPE_COUNTRY:
IEEE80211_DEBUG_SCAN("MFIE_TYPE_COUNTRY: %d bytes\n",
info_element->len);
// printk("=====>Receive <%s> Country IE\n",network->ssid);
ieee80211_extract_country_ie(ieee, info_element, network, beacon->header.addr2);
break;
default:
IEEE80211_DEBUG_SCAN("unsupported IE %d\n",
info_element->id);
default:
IEEE80211_DEBUG_SCAN("unsupported IE %d\n",
info_element->id);
#ifdef THOMAS_TURBO
dst->Turbo_Enable = src->Turbo_Enable;
#endif
#ifdef THOMAS_TURBO
dst->Turbo_Enable = src->Turbo_Enable;
#endif
dst->CountryIeLen = src->CountryIeLen;
memcpy(dst->CountryIeBuf, src->CountryIeBuf, src->CountryIeLen);
dst->CountryIeLen = src->CountryIeLen;
memcpy(dst->CountryIeBuf, src->CountryIeBuf, src->CountryIeLen);
// For Asus EeePc request,
// (1) if wireless adapter receive get any 802.11d country code in AP beacon,
// wireless adapter should follow the country code.
// For Asus EeePc request,
// (1) if wireless adapter receive get any 802.11d country code in AP beacon,
// wireless adapter should follow the country code.
/* The network parsed correctly -- so now we scan our known networks
* to see if we can find it in our list.
*
/* The network parsed correctly -- so now we scan our known networks
* to see if we can find it in our list.
*
#include <linux/version.h>
#include <asm/uaccess.h>
#include <linux/version.h>
#include <asm/uaccess.h>
u8 rsn_authen_cipher_suite[16][4] = {
{0x00,0x0F,0xAC,0x00}, //Use group key, //Reserved
{0x00,0x0F,0xAC,0x01}, //WEP-40 //RSNA default
u8 rsn_authen_cipher_suite[16][4] = {
{0x00,0x0F,0xAC,0x00}, //Use group key, //Reserved
{0x00,0x0F,0xAC,0x01}, //WEP-40 //RSNA default
void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
{
short ch = 0;
void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
{
short ch = 0;
u8 channel_map[MAX_CHANNEL_NUMBER+1];
memcpy(channel_map, GET_DOT11D_INFO(ieee)->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);
down(&ieee->scan_sem);
// printk("==================> Sync scan\n");
down(&ieee->scan_sem);
// printk("==================> Sync scan\n");
if (ch > MAX_CHANNEL_NUMBER)
goto out; /* scan completed */
if (ch > MAX_CHANNEL_NUMBER)
goto out; /* scan completed */
}while(!channel_map[ch]);
}while(!channel_map[ch]);
-#else
- }while(!ieee->channel_map[ch]);
-#endif
/* this fuction can be called in two situations
* 1- We have switched to ad-hoc mode and we are
* performing a complete syncro scan before conclude
/* this fuction can be called in two situations
* 1- We have switched to ad-hoc mode and we are
* performing a complete syncro scan before conclude
ieee->set_chan(ieee->dev, ch);
// printk("=====>channel=%d ",ch);
ieee->set_chan(ieee->dev, ch);
// printk("=====>channel=%d ",ch);
{
// printk("====send probe request\n");
ieee80211_send_probe_requests(ieee);
{
// printk("====send probe request\n");
ieee80211_send_probe_requests(ieee);
out:
ieee->sync_scan_hurryup = 0;
up(&ieee->scan_sem);
out:
ieee->sync_scan_hurryup = 0;
up(&ieee->scan_sem);
if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee);
if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee);
}
void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee)
{
int ch;
unsigned int watch_dog = 0;
}
void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee)
{
int ch;
unsigned int watch_dog = 0;
u8 channel_map[MAX_CHANNEL_NUMBER+1];
memcpy(channel_map, GET_DOT11D_INFO(ieee)->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);
down(&ieee->scan_sem);
ch = ieee->current_network.channel;
// if(ieee->sync_scan_hurryup)
down(&ieee->scan_sem);
ch = ieee->current_network.channel;
// if(ieee->sync_scan_hurryup)
if(channel_map[ieee->current_network.channel] > 0)
if(channel_map[ieee->current_network.channel] > 0)
{
ieee->set_chan(ieee->dev, ieee->current_network.channel);
// printk("======>channel=%d ",ieee->current_network.channel);
}
{
ieee->set_chan(ieee->dev, ieee->current_network.channel);
// printk("======>channel=%d ",ieee->current_network.channel);
}
if(channel_map[ieee->current_network.channel] == 1)
if(channel_map[ieee->current_network.channel] == 1)
{
// printk("====send probe request\n");
ieee80211_send_probe_requests(ieee);
{
// printk("====send probe request\n");
ieee80211_send_probe_requests(ieee);
goto out; /* scan completed */
ieee->current_network.channel = (ieee->current_network.channel + 1)%MAX_CHANNEL_NUMBER;
goto out; /* scan completed */
ieee->current_network.channel = (ieee->current_network.channel + 1)%MAX_CHANNEL_NUMBER;
}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:
//ieee->sync_scan_hurryup = 0;
}
out:
//ieee->sync_scan_hurryup = 0;
//ieee->current_network.channel = ch;
ieee->actscanning = false;
up(&ieee->scan_sem);
//ieee->current_network.channel = ch;
ieee->actscanning = false;
up(&ieee->scan_sem);
if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee);
if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee);
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, softmac_scan_wq);
static short watchdog = 0;
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, softmac_scan_wq);
static short watchdog = 0;
u8 channel_map[MAX_CHANNEL_NUMBER+1];
memcpy(channel_map, GET_DOT11D_INFO(ieee)->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);
// printk("ieee80211_softmac_scan_wq ENABLE_IPS\n");
// printk("in %s\n",__func__);
down(&ieee->scan_sem);
// printk("ieee80211_softmac_scan_wq ENABLE_IPS\n");
// printk("in %s\n",__func__);
down(&ieee->scan_sem);
if (watchdog++ > MAX_CHANNEL_NUMBER)
goto out; /* no good chans */
if (watchdog++ > MAX_CHANNEL_NUMBER)
goto out; /* no good chans */
}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);
if (ieee->scanning == 0 )
//printk("current_network.channel:%d\n", ieee->current_network.channel);
if (ieee->scanning == 0 )
goto out;
}
ieee->set_chan(ieee->dev, ieee->current_network.channel);
goto out;
}
ieee->set_chan(ieee->dev, ieee->current_network.channel);
if(channel_map[ieee->current_network.channel] == 1)
if(channel_map[ieee->current_network.channel] == 1)
ieee80211_send_probe_requests(ieee);
queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, IEEE80211_SOFTMAC_SCAN_TIME);
ieee80211_send_probe_requests(ieee);
queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, IEEE80211_SOFTMAC_SCAN_TIME);
ieee->scanning = 0;
up(&ieee->scan_sem);
ieee->scanning = 0;
up(&ieee->scan_sem);
if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee);
if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee);
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, softmac_scan_wq);
short watchdog = 0;
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, softmac_scan_wq);
short watchdog = 0;
u8 channel_map[MAX_CHANNEL_NUMBER+1];
memcpy(channel_map, GET_DOT11D_INFO(ieee)->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);
// printk("enter scan wq,watchdog is %d\n",watchdog);
down(&ieee->scan_sem);
// printk("enter scan wq,watchdog is %d\n",watchdog);
down(&ieee->scan_sem);
if (watchdog++ > MAX_CHANNEL_NUMBER)
goto out; /* no good chans */
if (watchdog++ > MAX_CHANNEL_NUMBER)
goto out; /* no good chans */
}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);
if (ieee->scanning == 0 )
// printk("current_network.channel:%d\n", ieee->current_network.channel);
if (ieee->scanning == 0 )
goto out;
}
ieee->set_chan(ieee->dev, ieee->current_network.channel);
goto out;
}
ieee->set_chan(ieee->dev, ieee->current_network.channel);
if(channel_map[ieee->current_network.channel] == 1)
if(channel_map[ieee->current_network.channel] == 1)
ieee80211_send_probe_requests(ieee);
queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, IEEE80211_SOFTMAC_SCAN_TIME);
out:
up(&ieee->scan_sem);
ieee80211_send_probe_requests(ieee);
queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, IEEE80211_SOFTMAC_SCAN_TIME);
out:
up(&ieee->scan_sem);
if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee);
if(IS_DOT11D_ENABLE(ieee))
DOT11D_ScanComplete(ieee);
/* called with ieee->lock held */
void ieee80211_start_scan(struct ieee80211_device *ieee)
{
/* called with ieee->lock held */
void ieee80211_start_scan(struct ieee80211_device *ieee)
{
if(IS_DOT11D_ENABLE(ieee) )
{
if(IS_COUNTRY_IE_VALID(ieee))
if(IS_DOT11D_ENABLE(ieee) )
{
if(IS_COUNTRY_IE_VALID(ieee))
RESET_CIE_WATCHDOG(ieee);
}
}
RESET_CIE_WATCHDOG(ieee);
}
}
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN){
if (ieee->scanning == 0)
{
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN){
if (ieee->scanning == 0)
{
/* called with wx_sem held */
void ieee80211_start_scan_syncro(struct ieee80211_device *ieee)
{
/* called with wx_sem held */
void ieee80211_start_scan_syncro(struct ieee80211_device *ieee)
{
if(IS_DOT11D_ENABLE(ieee) )
{
if(IS_COUNTRY_IE_VALID(ieee))
if(IS_DOT11D_ENABLE(ieee) )
{
if(IS_COUNTRY_IE_VALID(ieee))
RESET_CIE_WATCHDOG(ieee);
}
}
RESET_CIE_WATCHDOG(ieee);
}
}
ieee->sync_scan_hurryup = 0;
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
ieee->sync_scan_hurryup = 0;
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
/* check if we have this cell in our network list */
ieee80211_softmac_check_all_nets(ieee);
/* check if we have this cell in our network list */
ieee80211_softmac_check_all_nets(ieee);
if(ieee->state == IEEE80211_NOLINK)
ieee->current_network.channel = 10;
if(ieee->state == IEEE80211_NOLINK)
ieee->current_network.channel = 10;
/* 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
* being very few time in managed mode (so the card have had no
/* 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
* being very few time in managed mode (so the card have had no
void ieee80211_start_bss(struct ieee80211_device *ieee)
{
unsigned long flags;
void ieee80211_start_bss(struct ieee80211_device *ieee)
{
unsigned long flags;
//
// Ref: 802.11d 11.1.3.3
// STA shall not start a BSS unless properly formed Beacon frame including a Country IE.
//
// Ref: 802.11d 11.1.3.3
// STA shall not start a BSS unless properly formed Beacon frame including a Country IE.
/* check if we have already found the net we
* are interested in (if any).
* if not (we are disassociated and we are not
/* check if we have already found the net we
* are interested in (if any).
* if not (we are disassociated and we are not
if (ieee->data_hard_stop)
ieee->data_hard_stop(ieee->dev);
if (ieee->data_hard_stop)
ieee->data_hard_stop(ieee->dev);
if(IS_DOT11D_ENABLE(ieee))
Dot11d_Reset(ieee);
if(IS_DOT11D_ENABLE(ieee))
Dot11d_Reset(ieee);
ieee->state = IEEE80211_NOLINK;
ieee->link_change(ieee->dev);
notify_wx_assoc_event(ieee);
ieee->state = IEEE80211_NOLINK;
ieee->link_change(ieee->dev);
notify_wx_assoc_event(ieee);
if (ch > MAX_CHANNEL_NUMBER)
return; /* no channel found */
if (ch > MAX_CHANNEL_NUMBER)
return; /* no channel found */
}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;
}
tasklet_init(&ieee->ps_task,
(void(*)(unsigned long)) ieee80211_sta_ps,
(unsigned long)ieee);
tasklet_init(&ieee->ps_task,
(void(*)(unsigned long)) ieee80211_sta_ps,
(unsigned long)ieee);
ieee->pDot11dInfo = kmalloc(sizeof(RT_DOT11D_INFO), GFP_ATOMIC);
ieee->pDot11dInfo = kmalloc(sizeof(RT_DOT11D_INFO), GFP_ATOMIC);
}
void ieee80211_softmac_free(struct ieee80211_device *ieee)
}
void ieee80211_softmac_free(struct ieee80211_device *ieee)
cancel_delayed_work(&ieee->GPIOChangeRFWorkItem);
destroy_workqueue(ieee->wq);
cancel_delayed_work(&ieee->GPIOChangeRFWorkItem);
destroy_workqueue(ieee->wq);
if(NULL != ieee->pDot11dInfo)
kfree(ieee->pDot11dInfo);
if(NULL != ieee->pDot11dInfo)
kfree(ieee->pDot11dInfo);
#include "r8180_pm.h"
#endif
#include "r8180_pm.h"
#endif
#include "ieee80211/dot11d.h"
#include "ieee80211/dot11d.h"
#ifdef CONFIG_RTL8185B
//#define CONFIG_RTL8180_IO_MAP
#ifdef CONFIG_RTL8185B
//#define CONFIG_RTL8180_IO_MAP
// DMESG("<----watch_dog_adaptive()\n");
}
// DMESG("<----watch_dog_adaptive()\n");
}
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
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
//Add for RF power on power off by lizhaoming 080512
void GPIOChangeRFWorkItemCallBack(struct work_struct *work);
//Add for RF power on power off by lizhaoming 080512
void GPIOChangeRFWorkItemCallBack(struct work_struct *work);
#if 0
for(i=0;i<0xFF;i++) {
if(i%16 == 0)
#if 0
for(i=0;i<0xFF;i++) {
if(i%16 == 0)
DMESG("Channel plan is %d\n",priv->channel_plan);
rtl8180_set_channel_map(priv->channel_plan, priv->ieee80211);
DMESG("Channel plan is %d\n",priv->channel_plan);
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));
#include "r8180_rtl8225.h"
#include "r8180_93cx6.h"
#include "r8180_rtl8225.h"
#include "r8180_93cx6.h"
#include "ieee80211/dot11d.h"
#include "ieee80211/dot11d.h"
rtl8185_set_anaparam2(dev, RTL8225z2_ANAPARAM2_OFF);
}
rtl8185_set_anaparam2(dev, RTL8225z2_ANAPARAM2_OFF);
}
//
// Description:
// Map dBm into Tx power index according to
//
// Description:
// Map dBm into Tx power index according to
void rtl8225z2_SetTXPowerLevel(struct net_device *dev, short ch)
{
void rtl8225z2_SetTXPowerLevel(struct net_device *dev, short ch)
{
CckTxPwrIdx, OfdmTxPwrIdx);
}
#endif
CckTxPwrIdx, OfdmTxPwrIdx);
}
#endif
if(IS_DOT11D_ENABLE(priv->ieee80211) &&
IS_DOT11D_STATE_DONE(priv->ieee80211) )
{
if(IS_DOT11D_ENABLE(priv->ieee80211) &&
IS_DOT11D_STATE_DONE(priv->ieee80211) )
{
//priv->CurrentCckTxPwrIdx = cck_power_level;
//priv->CurrentOfdmTxPwrIdx = ofdm_power_level;
//priv->CurrentCckTxPwrIdx = cck_power_level;
//priv->CurrentOfdmTxPwrIdx = ofdm_power_level;
max_cck_power_level = 15;
max_ofdm_power_level = 25; // 12 -> 25
max_cck_power_level = 15;
max_ofdm_power_level = 25; // 12 -> 25
#include "r8180_hw.h"
#include "r8180_sa2400.h"
#include "r8180_hw.h"
#include "r8180_sa2400.h"
#include "ieee80211/dot11d.h"
#include "ieee80211/dot11d.h"
//#define RATE_COUNT 4
u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000,
//#define RATE_COUNT 4
u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000,
for (i = 0, val = 0; i < 14; i++) {
// Include only legal frequencies for some countries
for (i = 0, val = 0; i < 14; i++) {
// Include only legal frequencies for some countries
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].m = ieee80211_wlan_frequencies[i] * 100000;
range->freq[val].e = 1;
range->freq[val].i = i + 1;
range->freq[val].m = ieee80211_wlan_frequencies[i] * 100000;
range->freq[val].e = 1;
// Clear old channel map
for (i=1;i<=MAX_CHANNEL_NUMBER;i++)
{
// Clear old channel map
for (i=1;i<=MAX_CHANNEL_NUMBER;i++)
{
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
for (i=1;i<=DefaultChannelPlan[*val].Len;i++)
{
}
// Set new channel map
for (i=1;i<=DefaultChannelPlan[*val].Len;i++)
{
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
#include "r8180_pm.h"
#endif
#include "r8180_pm.h"
#endif
#include "ieee80211/dot11d.h"
#include "ieee80211/dot11d.h"
// Indication of disassociation event.
//DrvIFIndicateDisassociation(Adapter, asRsn);
// Indication of disassociation event.
//DrvIFIndicateDisassociation(Adapter, asRsn);
if(IS_DOT11D_ENABLE(priv->ieee80211))
Dot11d_Reset(priv->ieee80211);
if(IS_DOT11D_ENABLE(priv->ieee80211))
Dot11d_Reset(priv->ieee80211);
// In adhoc mode, update beacon frame.
if( priv->ieee80211->state == IEEE80211_LINKED )
{
// In adhoc mode, update beacon frame.
if( priv->ieee80211->state == IEEE80211_LINKED )
{