diff options
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r-- | drivers/staging/rtl8192u/Makefile | 1 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/dot11d.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/Makefile | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/dot11d.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/dot11d.h | 3 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211.h | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 12 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 47 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 27 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_wx.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/r819xU_phy.c | 6 |
13 files changed, 8 insertions, 114 deletions
diff --git a/drivers/staging/rtl8192u/Makefile b/drivers/staging/rtl8192u/Makefile index 206d924a707..eefc657ce99 100644 --- a/drivers/staging/rtl8192u/Makefile +++ b/drivers/staging/rtl8192u/Makefile | |||
@@ -9,7 +9,6 @@ ccflags-y += -DTHOMAS_BEACON -DTHOMAS_TASKLET -DTHOMAS_SKB -DTHOMAS_TURBO | |||
9 | #ccflags-y += -DUSB_TX_DRIVER_AGGREGATION_ENABLE | 9 | #ccflags-y += -DUSB_TX_DRIVER_AGGREGATION_ENABLE |
10 | #ccflags-y += -DUSB_RX_AGGREGATION_SUPPORT | 10 | #ccflags-y += -DUSB_RX_AGGREGATION_SUPPORT |
11 | ccflags-y += -DUSE_ONE_PIPE | 11 | ccflags-y += -DUSE_ONE_PIPE |
12 | ccflags-y += -DENABLE_DOT11D | ||
13 | ccflags-y += -Idrivers/staging/rtl8192u/ieee80211 | 12 | ccflags-y += -Idrivers/staging/rtl8192u/ieee80211 |
14 | 13 | ||
15 | r8192u_usb-y := r8192U_core.o r8180_93cx6.o r8192U_wx.o \ | 14 | r8192u_usb-y := r8192U_core.o r8180_93cx6.o r8192U_wx.o \ |
diff --git a/drivers/staging/rtl8192u/dot11d.h b/drivers/staging/rtl8192u/dot11d.h index d99cc030ec7..92e7a00f3ee 100644 --- a/drivers/staging/rtl8192u/dot11d.h +++ b/drivers/staging/rtl8192u/dot11d.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __INC_DOT11D_H | 1 | #ifndef __INC_DOT11D_H |
2 | #define __INC_DOT11D_H | 2 | #define __INC_DOT11D_H |
3 | 3 | ||
4 | #ifdef ENABLE_DOT11D | ||
5 | #include "ieee80211/ieee80211.h" | 4 | #include "ieee80211/ieee80211.h" |
6 | 5 | ||
7 | 6 | ||
@@ -98,5 +97,4 @@ int ToLegalChannel( | |||
98 | struct ieee80211_device *dev, | 97 | struct ieee80211_device *dev, |
99 | u8 channel | 98 | u8 channel |
100 | ); | 99 | ); |
101 | #endif /* ENABLE_DOT11D */ | ||
102 | #endif /* #ifndef __INC_DOT11D_H */ | 100 | #endif /* #ifndef __INC_DOT11D_H */ |
diff --git a/drivers/staging/rtl8192u/ieee80211/Makefile b/drivers/staging/rtl8192u/ieee80211/Makefile index 45704f85ef0..0775c5599d6 100644 --- a/drivers/staging/rtl8192u/ieee80211/Makefile +++ b/drivers/staging/rtl8192u/ieee80211/Makefile | |||
@@ -20,7 +20,6 @@ ifeq ($(NIC_SELECT),RTL8192U) | |||
20 | endif | 20 | endif |
21 | #ccflags-y := -DJOHN_NOCPY | 21 | #ccflags-y := -DJOHN_NOCPY |
22 | #flags to enable or disble 80211D feature | 22 | #flags to enable or disble 80211D feature |
23 | ccflags-y += -DENABLE_DOT11D | ||
24 | ieee80211-rsl-objs := ieee80211_rx.o \ | 23 | ieee80211-rsl-objs := ieee80211_rx.o \ |
25 | ieee80211_softmac.o \ | 24 | ieee80211_softmac.o \ |
26 | ieee80211_tx.o \ | 25 | ieee80211_tx.o \ |
@@ -75,7 +74,6 @@ CFLAGS += -I$(KSRC)/include -I. | |||
75 | CFLAGS += -DMODVERSIONS -DEXPORT_SYMTAB -include $(KSRC)/include/linux/modversions.h | 74 | CFLAGS += -DMODVERSIONS -DEXPORT_SYMTAB -include $(KSRC)/include/linux/modversions.h |
76 | #Kernel 2.4.20 | 75 | #Kernel 2.4.20 |
77 | #CFLAGS += -D__NO_VERSION__ -DEXPORT_SYMTAB | 76 | #CFLAGS += -D__NO_VERSION__ -DEXPORT_SYMTAB |
78 | #CFLAGS += -DENABLE_DOT11D | ||
79 | SMP := $(shell $(CC) $(MODCFLAGS) -E -dM $(CONFIG_FILE) | \ | 77 | SMP := $(shell $(CC) $(MODCFLAGS) -E -dM $(CONFIG_FILE) | \ |
80 | grep CONFIG_SMP | awk '{print $$3}') | 78 | grep CONFIG_SMP | awk '{print $$3}') |
81 | ifneq ($(SMP),1) | 79 | ifneq ($(SMP),1) |
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c index b91cbfcfa71..ce63fc341c6 100644 --- a/drivers/staging/rtl8192u/ieee80211/dot11d.c +++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #ifdef ENABLE_DOT11D | ||
2 | //----------------------------------------------------------------------------- | 1 | //----------------------------------------------------------------------------- |
3 | // File: | 2 | // File: |
4 | // Dot11d.c | 3 | // Dot11d.c |
@@ -220,4 +219,3 @@ EXPORT_SYMBOL(DOT11D_ScanComplete); | |||
220 | EXPORT_SYMBOL(IsLegalChannel); | 219 | EXPORT_SYMBOL(IsLegalChannel); |
221 | EXPORT_SYMBOL(ToLegalChannel); | 220 | EXPORT_SYMBOL(ToLegalChannel); |
222 | 221 | ||
223 | #endif | ||
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h index 15b7a4ba37b..54f2b4c434f 100644 --- a/drivers/staging/rtl8192u/ieee80211/dot11d.h +++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h | |||
@@ -1,10 +1,8 @@ | |||
1 | #ifndef __INC_DOT11D_H | 1 | #ifndef __INC_DOT11D_H |
2 | #define __INC_DOT11D_H | 2 | #define __INC_DOT11D_H |
3 | 3 | ||
4 | #ifdef ENABLE_DOT11D | ||
5 | #include "ieee80211.h" | 4 | #include "ieee80211.h" |
6 | 5 | ||
7 | //#define ENABLE_DOT11D | ||
8 | 6 | ||
9 | //#define DOT11D_MAX_CHNL_NUM 83 | 7 | //#define DOT11D_MAX_CHNL_NUM 83 |
10 | 8 | ||
@@ -98,5 +96,4 @@ int ToLegalChannel( | |||
98 | struct ieee80211_device * dev, | 96 | struct ieee80211_device * dev, |
99 | u8 channel | 97 | u8 channel |
100 | ); | 98 | ); |
101 | #endif //ENABLE_DOT11D | ||
102 | #endif // #ifndef __INC_DOT11D_H | 99 | #endif // #ifndef __INC_DOT11D_H |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index e1216b70495..c0b844d75c0 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h | |||
@@ -1572,10 +1572,8 @@ struct ieee80211_network { | |||
1572 | #ifdef THOMAS_TURBO | 1572 | #ifdef THOMAS_TURBO |
1573 | u8 Turbo_Enable;//enable turbo mode, added by thomas | 1573 | u8 Turbo_Enable;//enable turbo mode, added by thomas |
1574 | #endif | 1574 | #endif |
1575 | #ifdef ENABLE_DOT11D | ||
1576 | u16 CountryIeLen; | 1575 | u16 CountryIeLen; |
1577 | u8 CountryIeBuf[MAX_IE_LEN]; | 1576 | u8 CountryIeBuf[MAX_IE_LEN]; |
1578 | #endif | ||
1579 | // HT Related, by amy, 2008.04.29 | 1577 | // HT Related, by amy, 2008.04.29 |
1580 | BSS_HT bssht; | 1578 | BSS_HT bssht; |
1581 | // Add to handle broadcom AP management frame CCK rate. | 1579 | // Add to handle broadcom AP management frame CCK rate. |
@@ -1769,7 +1767,6 @@ typedef u32 RT_RF_CHANGE_SOURCE; | |||
1769 | #define RF_CHANGE_BY_IPS BIT28 | 1767 | #define RF_CHANGE_BY_IPS BIT28 |
1770 | #define RF_CHANGE_BY_INIT 0 // Do not change the RFOff reason. Defined by Bruce, 2008-01-17. | 1768 | #define RF_CHANGE_BY_INIT 0 // Do not change the RFOff reason. Defined by Bruce, 2008-01-17. |
1771 | 1769 | ||
1772 | #ifdef ENABLE_DOT11D | ||
1773 | typedef enum | 1770 | typedef enum |
1774 | { | 1771 | { |
1775 | COUNTRY_CODE_FCC = 0, | 1772 | COUNTRY_CODE_FCC = 0, |
@@ -1784,7 +1781,6 @@ typedef enum | |||
1784 | COUNTRY_CODE_MIC, | 1781 | COUNTRY_CODE_MIC, |
1785 | COUNTRY_CODE_GLOBAL_DOMAIN | 1782 | COUNTRY_CODE_GLOBAL_DOMAIN |
1786 | }country_code_type_t; | 1783 | }country_code_type_t; |
1787 | #endif | ||
1788 | 1784 | ||
1789 | #define RT_MAX_LD_SLOT_NUM 10 | 1785 | #define RT_MAX_LD_SLOT_NUM 10 |
1790 | typedef struct _RT_LINK_DETECT_T{ | 1786 | typedef struct _RT_LINK_DETECT_T{ |
@@ -1970,12 +1966,8 @@ struct ieee80211_device { | |||
1970 | 1966 | ||
1971 | /* map of allowed channels. 0 is dummy */ | 1967 | /* map of allowed channels. 0 is dummy */ |
1972 | // FIXME: remeber to default to a basic channel plan depending of the PHY type | 1968 | // FIXME: remeber to default to a basic channel plan depending of the PHY type |
1973 | #ifdef ENABLE_DOT11D | ||
1974 | void* pDot11dInfo; | 1969 | void* pDot11dInfo; |
1975 | bool bGlobalDomain; | 1970 | bool bGlobalDomain; |
1976 | #else | ||
1977 | int channel_map[MAX_CHANNEL_NUMBER+1]; | ||
1978 | #endif | ||
1979 | int rate; /* current rate */ | 1971 | int rate; /* current rate */ |
1980 | int basic_rate; | 1972 | int basic_rate; |
1981 | //FIXME: pleace callback, see if redundant with softmac_features | 1973 | //FIXME: pleace callback, see if redundant with softmac_features |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c index c8ca9d8ed5d..1ea8da3655e 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | |||
@@ -44,9 +44,7 @@ | |||
44 | #include <linux/ctype.h> | 44 | #include <linux/ctype.h> |
45 | 45 | ||
46 | #include "ieee80211.h" | 46 | #include "ieee80211.h" |
47 | #ifdef ENABLE_DOT11D | ||
48 | #include "dot11d.h" | 47 | #include "dot11d.h" |
49 | #endif | ||
50 | static inline void ieee80211_monitor_rx(struct ieee80211_device *ieee, | 48 | static inline void ieee80211_monitor_rx(struct ieee80211_device *ieee, |
51 | struct sk_buff *skb, | 49 | struct sk_buff *skb, |
52 | struct ieee80211_rx_stats *rx_stats) | 50 | struct ieee80211_rx_stats *rx_stats) |
@@ -1599,7 +1597,6 @@ static const char *get_info_element_string(u16 id) | |||
1599 | } | 1597 | } |
1600 | #endif | 1598 | #endif |
1601 | 1599 | ||
1602 | #ifdef ENABLE_DOT11D | ||
1603 | static inline void ieee80211_extract_country_ie( | 1600 | static inline void ieee80211_extract_country_ie( |
1604 | struct ieee80211_device *ieee, | 1601 | struct ieee80211_device *ieee, |
1605 | struct ieee80211_info_element *info_element, | 1602 | struct ieee80211_info_element *info_element, |
@@ -1632,7 +1629,6 @@ static inline void ieee80211_extract_country_ie( | |||
1632 | } | 1629 | } |
1633 | 1630 | ||
1634 | } | 1631 | } |
1635 | #endif | ||
1636 | 1632 | ||
1637 | int ieee80211_parse_info_param(struct ieee80211_device *ieee, | 1633 | int ieee80211_parse_info_param(struct ieee80211_device *ieee, |
1638 | struct ieee80211_info_element *info_element, | 1634 | struct ieee80211_info_element *info_element, |
@@ -2086,14 +2082,12 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee, | |||
2086 | "QoS Error need to parse QOS_PARAMETER IE\n"); | 2082 | "QoS Error need to parse QOS_PARAMETER IE\n"); |
2087 | break; | 2083 | break; |
2088 | 2084 | ||
2089 | #ifdef ENABLE_DOT11D | ||
2090 | case MFIE_TYPE_COUNTRY: | 2085 | case MFIE_TYPE_COUNTRY: |
2091 | IEEE80211_DEBUG_SCAN("MFIE_TYPE_COUNTRY: %d bytes\n", | 2086 | IEEE80211_DEBUG_SCAN("MFIE_TYPE_COUNTRY: %d bytes\n", |
2092 | info_element->len); | 2087 | info_element->len); |
2093 | //printk("=====>Receive <%s> Country IE\n",network->ssid); | 2088 | //printk("=====>Receive <%s> Country IE\n",network->ssid); |
2094 | ieee80211_extract_country_ie(ieee, info_element, network, network->bssid);//addr2 is same as addr3 when from an AP | 2089 | ieee80211_extract_country_ie(ieee, info_element, network, network->bssid);//addr2 is same as addr3 when from an AP |
2095 | break; | 2090 | break; |
2096 | #endif | ||
2097 | /* TODO */ | 2091 | /* TODO */ |
2098 | default: | 2092 | default: |
2099 | IEEE80211_DEBUG_MGMT | 2093 | IEEE80211_DEBUG_MGMT |
@@ -2229,10 +2223,8 @@ static inline int ieee80211_network_init( | |||
2229 | #ifdef THOMAS_TURBO | 2223 | #ifdef THOMAS_TURBO |
2230 | network->Turbo_Enable = 0; | 2224 | network->Turbo_Enable = 0; |
2231 | #endif | 2225 | #endif |
2232 | #ifdef ENABLE_DOT11D | ||
2233 | network->CountryIeLen = 0; | 2226 | network->CountryIeLen = 0; |
2234 | memset(network->CountryIeBuf, 0, MAX_IE_LEN); | 2227 | memset(network->CountryIeBuf, 0, MAX_IE_LEN); |
2235 | #endif | ||
2236 | //Initialize HT parameters | 2228 | //Initialize HT parameters |
2237 | //ieee80211_ht_initialize(&network->bssht); | 2229 | //ieee80211_ht_initialize(&network->bssht); |
2238 | HTInitializeBssDesc(&network->bssht); | 2230 | HTInitializeBssDesc(&network->bssht); |
@@ -2399,10 +2391,8 @@ static inline void update_network(struct ieee80211_network *dst, | |||
2399 | dst->Turbo_Enable = src->Turbo_Enable; | 2391 | dst->Turbo_Enable = src->Turbo_Enable; |
2400 | #endif | 2392 | #endif |
2401 | 2393 | ||
2402 | #ifdef ENABLE_DOT11D | ||
2403 | dst->CountryIeLen = src->CountryIeLen; | 2394 | dst->CountryIeLen = src->CountryIeLen; |
2404 | memcpy(dst->CountryIeBuf, src->CountryIeBuf, src->CountryIeLen); | 2395 | memcpy(dst->CountryIeBuf, src->CountryIeBuf, src->CountryIeLen); |
2405 | #endif | ||
2406 | 2396 | ||
2407 | //added by amy for LEAP | 2397 | //added by amy for LEAP |
2408 | dst->bWithAironetIE = src->bWithAironetIE; | 2398 | dst->bWithAironetIE = src->bWithAironetIE; |
@@ -2470,7 +2460,6 @@ static inline void ieee80211_process_probe_response( | |||
2470 | return; | 2460 | return; |
2471 | } | 2461 | } |
2472 | 2462 | ||
2473 | #ifdef ENABLE_DOT11D | ||
2474 | // For Asus EeePc request, | 2463 | // For Asus EeePc request, |
2475 | // (1) if wireless adapter receive get any 802.11d country code in AP beacon, | 2464 | // (1) if wireless adapter receive get any 802.11d country code in AP beacon, |
2476 | // wireless adapter should follow the country code. | 2465 | // wireless adapter should follow the country code. |
@@ -2527,7 +2516,6 @@ static inline void ieee80211_process_probe_response( | |||
2527 | } | 2516 | } |
2528 | } | 2517 | } |
2529 | } | 2518 | } |
2530 | #endif | ||
2531 | 2519 | ||
2532 | /* The network parsed correctly -- so now we scan our known networks | 2520 | /* The network parsed correctly -- so now we scan our known networks |
2533 | * to see if we can find it in our list. | 2521 | * to see if we can find it in our list. |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index bc8c4253369..20f8c347cae 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | |||
@@ -21,9 +21,7 @@ | |||
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/version.h> | 22 | #include <linux/version.h> |
23 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
24 | #ifdef ENABLE_DOT11D | ||
25 | #include "dot11d.h" | 24 | #include "dot11d.h" |
26 | #endif | ||
27 | 25 | ||
28 | u8 rsn_authen_cipher_suite[16][4] = { | 26 | u8 rsn_authen_cipher_suite[16][4] = { |
29 | {0x00,0x0F,0xAC,0x00}, //Use group key, //Reserved | 27 | {0x00,0x0F,0xAC,0x00}, //Use group key, //Reserved |
@@ -430,10 +428,8 @@ void ieee80211_send_probe_requests(struct ieee80211_device *ieee) | |||
430 | void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) | 428 | void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) |
431 | { | 429 | { |
432 | short ch = 0; | 430 | short ch = 0; |
433 | #ifdef ENABLE_DOT11D | ||
434 | u8 channel_map[MAX_CHANNEL_NUMBER+1]; | 431 | u8 channel_map[MAX_CHANNEL_NUMBER+1]; |
435 | memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1); | 432 | memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1); |
436 | #endif | ||
437 | down(&ieee->scan_sem); | 433 | down(&ieee->scan_sem); |
438 | 434 | ||
439 | while(1) | 435 | while(1) |
@@ -443,11 +439,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) | |||
443 | ch++; | 439 | ch++; |
444 | if (ch > MAX_CHANNEL_NUMBER) | 440 | if (ch > MAX_CHANNEL_NUMBER) |
445 | goto out; /* scan completed */ | 441 | goto out; /* scan completed */ |
446 | #ifdef ENABLE_DOT11D | ||
447 | }while(!channel_map[ch]); | 442 | }while(!channel_map[ch]); |
448 | #else | ||
449 | }while(!ieee->channel_map[ch]); | ||
450 | #endif | ||
451 | 443 | ||
452 | /* this function can be called in two situations | 444 | /* this function can be called in two situations |
453 | * 1- We have switched to ad-hoc mode and we are | 445 | * 1- We have switched to ad-hoc mode and we are |
@@ -471,9 +463,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) | |||
471 | if (ieee->state == IEEE80211_LINKED) | 463 | if (ieee->state == IEEE80211_LINKED) |
472 | goto out; | 464 | goto out; |
473 | ieee->set_chan(ieee->dev, ch); | 465 | ieee->set_chan(ieee->dev, ch); |
474 | #ifdef ENABLE_DOT11D | ||
475 | if(channel_map[ch] == 1) | 466 | if(channel_map[ch] == 1) |
476 | #endif | ||
477 | ieee80211_send_probe_requests(ieee); | 467 | ieee80211_send_probe_requests(ieee); |
478 | 468 | ||
479 | /* this prevent excessive time wait when we | 469 | /* this prevent excessive time wait when we |
@@ -496,10 +486,8 @@ out: | |||
496 | } | 486 | } |
497 | else{ | 487 | else{ |
498 | ieee->sync_scan_hurryup = 0; | 488 | ieee->sync_scan_hurryup = 0; |
499 | #ifdef ENABLE_DOT11D | ||
500 | if(IS_DOT11D_ENABLE(ieee)) | 489 | if(IS_DOT11D_ENABLE(ieee)) |
501 | DOT11D_ScanComplete(ieee); | 490 | DOT11D_ScanComplete(ieee); |
502 | #endif | ||
503 | up(&ieee->scan_sem); | 491 | up(&ieee->scan_sem); |
504 | } | 492 | } |
505 | } | 493 | } |
@@ -510,10 +498,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) | |||
510 | struct delayed_work *dwork = container_of(work, struct delayed_work, work); | 498 | struct delayed_work *dwork = container_of(work, struct delayed_work, work); |
511 | struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, softmac_scan_wq); | 499 | struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, softmac_scan_wq); |
512 | static short watchdog = 0; | 500 | static short watchdog = 0; |
513 | #ifdef ENABLE_DOT11D | ||
514 | u8 channel_map[MAX_CHANNEL_NUMBER+1]; | 501 | u8 channel_map[MAX_CHANNEL_NUMBER+1]; |
515 | memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1); | 502 | memcpy(channel_map, GET_DOT11D_INFO(ieee)->channel_map, MAX_CHANNEL_NUMBER+1); |
516 | #endif | ||
517 | if(!ieee->ieee_up) | 503 | if(!ieee->ieee_up) |
518 | return; | 504 | return; |
519 | down(&ieee->scan_sem); | 505 | down(&ieee->scan_sem); |
@@ -523,25 +509,16 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) | |||
523 | if (watchdog++ > MAX_CHANNEL_NUMBER) | 509 | if (watchdog++ > MAX_CHANNEL_NUMBER) |
524 | { | 510 | { |
525 | //if current channel is not in channel map, set to default channel. | 511 | //if current channel is not in channel map, set to default channel. |
526 | #ifdef ENABLE_DOT11D | 512 | if (!channel_map[ieee->current_network.channel]) { |
527 | if (!channel_map[ieee->current_network.channel]); | ||
528 | #else | ||
529 | if (!ieee->channel_map[ieee->current_network.channel]); | ||
530 | #endif | ||
531 | ieee->current_network.channel = 6; | 513 | ieee->current_network.channel = 6; |
532 | goto out; /* no good chans */ | 514 | goto out; /* no good chans */ |
515 | } | ||
533 | } | 516 | } |
534 | #ifdef ENABLE_DOT11D | ||
535 | }while(!channel_map[ieee->current_network.channel]); | 517 | }while(!channel_map[ieee->current_network.channel]); |
536 | #else | ||
537 | }while(!ieee->channel_map[ieee->current_network.channel]); | ||
538 | #endif | ||
539 | if (ieee->scanning == 0 ) | 518 | if (ieee->scanning == 0 ) |
540 | goto out; | 519 | goto out; |
541 | ieee->set_chan(ieee->dev, ieee->current_network.channel); | 520 | ieee->set_chan(ieee->dev, ieee->current_network.channel); |
542 | #ifdef ENABLE_DOT11D | ||
543 | if(channel_map[ieee->current_network.channel] == 1) | 521 | if(channel_map[ieee->current_network.channel] == 1) |
544 | #endif | ||
545 | ieee80211_send_probe_requests(ieee); | 522 | ieee80211_send_probe_requests(ieee); |
546 | 523 | ||
547 | 524 | ||
@@ -550,10 +527,8 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) | |||
550 | up(&ieee->scan_sem); | 527 | up(&ieee->scan_sem); |
551 | return; | 528 | return; |
552 | out: | 529 | out: |
553 | #ifdef ENABLE_DOT11D | ||
554 | if(IS_DOT11D_ENABLE(ieee)) | 530 | if(IS_DOT11D_ENABLE(ieee)) |
555 | DOT11D_ScanComplete(ieee); | 531 | DOT11D_ScanComplete(ieee); |
556 | #endif | ||
557 | ieee->actscanning = false; | 532 | ieee->actscanning = false; |
558 | watchdog = 0; | 533 | watchdog = 0; |
559 | ieee->scanning = 0; | 534 | ieee->scanning = 0; |
@@ -635,7 +610,6 @@ void ieee80211_stop_scan(struct ieee80211_device *ieee) | |||
635 | /* called with ieee->lock held */ | 610 | /* called with ieee->lock held */ |
636 | void ieee80211_start_scan(struct ieee80211_device *ieee) | 611 | void ieee80211_start_scan(struct ieee80211_device *ieee) |
637 | { | 612 | { |
638 | #ifdef ENABLE_DOT11D | ||
639 | if(IS_DOT11D_ENABLE(ieee) ) | 613 | if(IS_DOT11D_ENABLE(ieee) ) |
640 | { | 614 | { |
641 | if(IS_COUNTRY_IE_VALID(ieee)) | 615 | if(IS_COUNTRY_IE_VALID(ieee)) |
@@ -643,7 +617,6 @@ void ieee80211_start_scan(struct ieee80211_device *ieee) | |||
643 | RESET_CIE_WATCHDOG(ieee); | 617 | RESET_CIE_WATCHDOG(ieee); |
644 | } | 618 | } |
645 | } | 619 | } |
646 | #endif | ||
647 | if (ieee->softmac_features & IEEE_SOFTMAC_SCAN){ | 620 | if (ieee->softmac_features & IEEE_SOFTMAC_SCAN){ |
648 | if (ieee->scanning == 0){ | 621 | if (ieee->scanning == 0){ |
649 | ieee->scanning = 1; | 622 | ieee->scanning = 1; |
@@ -657,7 +630,6 @@ void ieee80211_start_scan(struct ieee80211_device *ieee) | |||
657 | /* called with wx_sem held */ | 630 | /* called with wx_sem held */ |
658 | void ieee80211_start_scan_syncro(struct ieee80211_device *ieee) | 631 | void ieee80211_start_scan_syncro(struct ieee80211_device *ieee) |
659 | { | 632 | { |
660 | #ifdef ENABLE_DOT11D | ||
661 | if(IS_DOT11D_ENABLE(ieee) ) | 633 | if(IS_DOT11D_ENABLE(ieee) ) |
662 | { | 634 | { |
663 | if(IS_COUNTRY_IE_VALID(ieee)) | 635 | if(IS_COUNTRY_IE_VALID(ieee)) |
@@ -665,7 +637,6 @@ void ieee80211_start_scan_syncro(struct ieee80211_device *ieee) | |||
665 | RESET_CIE_WATCHDOG(ieee); | 637 | RESET_CIE_WATCHDOG(ieee); |
666 | } | 638 | } |
667 | } | 639 | } |
668 | #endif | ||
669 | ieee->sync_scan_hurryup = 0; | 640 | ieee->sync_scan_hurryup = 0; |
670 | if (ieee->softmac_features & IEEE_SOFTMAC_SCAN) | 641 | if (ieee->softmac_features & IEEE_SOFTMAC_SCAN) |
671 | ieee80211_softmac_scan_syncro(ieee); | 642 | ieee80211_softmac_scan_syncro(ieee); |
@@ -2390,11 +2361,9 @@ void ieee80211_start_ibss_wq(struct work_struct *work) | |||
2390 | ieee80211_softmac_check_all_nets(ieee); | 2361 | ieee80211_softmac_check_all_nets(ieee); |
2391 | 2362 | ||
2392 | 2363 | ||
2393 | #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. | ||
2394 | // if((IS_DOT11D_ENABLE(ieee)) && (ieee->state == IEEE80211_NOLINK)) | 2364 | // if((IS_DOT11D_ENABLE(ieee)) && (ieee->state == IEEE80211_NOLINK)) |
2395 | if (ieee->state == IEEE80211_NOLINK) | 2365 | if (ieee->state == IEEE80211_NOLINK) |
2396 | ieee->current_network.channel = 6; | 2366 | ieee->current_network.channel = 6; |
2397 | #endif | ||
2398 | /* if not then the state is not linked. Maybe the user swithced to | 2367 | /* if not then the state is not linked. Maybe the user swithced to |
2399 | * ad-hoc mode just after being in monitor mode, or just after | 2368 | * ad-hoc mode just after being in monitor mode, or just after |
2400 | * being very few time in managed mode (so the card have had no | 2369 | * being very few time in managed mode (so the card have had no |
@@ -2483,7 +2452,6 @@ inline void ieee80211_start_ibss(struct ieee80211_device *ieee) | |||
2483 | void ieee80211_start_bss(struct ieee80211_device *ieee) | 2452 | void ieee80211_start_bss(struct ieee80211_device *ieee) |
2484 | { | 2453 | { |
2485 | unsigned long flags; | 2454 | unsigned long flags; |
2486 | #ifdef ENABLE_DOT11D | ||
2487 | // | 2455 | // |
2488 | // Ref: 802.11d 11.1.3.3 | 2456 | // Ref: 802.11d 11.1.3.3 |
2489 | // STA shall not start a BSS unless properly formed Beacon frame including a Country IE. | 2457 | // STA shall not start a BSS unless properly formed Beacon frame including a Country IE. |
@@ -2495,7 +2463,6 @@ void ieee80211_start_bss(struct ieee80211_device *ieee) | |||
2495 | return; | 2463 | return; |
2496 | } | 2464 | } |
2497 | } | 2465 | } |
2498 | #endif | ||
2499 | /* check if we have already found the net we | 2466 | /* check if we have already found the net we |
2500 | * are interested in (if any). | 2467 | * are interested in (if any). |
2501 | * if not (we are disassociated and we are not | 2468 | * if not (we are disassociated and we are not |
@@ -2530,10 +2497,8 @@ void ieee80211_disassociate(struct ieee80211_device *ieee) | |||
2530 | 2497 | ||
2531 | if (ieee->data_hard_stop) | 2498 | if (ieee->data_hard_stop) |
2532 | ieee->data_hard_stop(ieee->dev); | 2499 | ieee->data_hard_stop(ieee->dev); |
2533 | #ifdef ENABLE_DOT11D | ||
2534 | if(IS_DOT11D_ENABLE(ieee)) | 2500 | if(IS_DOT11D_ENABLE(ieee)) |
2535 | Dot11d_Reset(ieee); | 2501 | Dot11d_Reset(ieee); |
2536 | #endif | ||
2537 | ieee->state = IEEE80211_NOLINK; | 2502 | ieee->state = IEEE80211_NOLINK; |
2538 | ieee->is_set_key = false; | 2503 | ieee->is_set_key = false; |
2539 | ieee->link_change(ieee->dev); | 2504 | ieee->link_change(ieee->dev); |
@@ -2669,11 +2634,7 @@ void ieee80211_start_protocol(struct ieee80211_device *ieee) | |||
2669 | ch++; | 2634 | ch++; |
2670 | if (ch > MAX_CHANNEL_NUMBER) | 2635 | if (ch > MAX_CHANNEL_NUMBER) |
2671 | return; /* no channel found */ | 2636 | return; /* no channel found */ |
2672 | #ifdef ENABLE_DOT11D | ||
2673 | }while(!GET_DOT11D_INFO(ieee)->channel_map[ch]); | 2637 | }while(!GET_DOT11D_INFO(ieee)->channel_map[ch]); |
2674 | #else | ||
2675 | }while(!ieee->channel_map[ch]); | ||
2676 | #endif | ||
2677 | ieee->current_network.channel = ch; | 2638 | ieee->current_network.channel = ch; |
2678 | } | 2639 | } |
2679 | 2640 | ||
@@ -2721,11 +2682,9 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) | |||
2721 | for(i = 0; i < 5; i++) { | 2682 | for(i = 0; i < 5; i++) { |
2722 | ieee->seq_ctrl[i] = 0; | 2683 | ieee->seq_ctrl[i] = 0; |
2723 | } | 2684 | } |
2724 | #ifdef ENABLE_DOT11D | ||
2725 | ieee->pDot11dInfo = kzalloc(sizeof(RT_DOT11D_INFO), GFP_ATOMIC); | 2685 | ieee->pDot11dInfo = kzalloc(sizeof(RT_DOT11D_INFO), GFP_ATOMIC); |
2726 | if (!ieee->pDot11dInfo) | 2686 | if (!ieee->pDot11dInfo) |
2727 | IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for DOT11D\n"); | 2687 | IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for DOT11D\n"); |
2728 | #endif | ||
2729 | //added for AP roaming | 2688 | //added for AP roaming |
2730 | ieee->LinkDetectInfo.SlotNum = 2; | 2689 | ieee->LinkDetectInfo.SlotNum = 2; |
2731 | ieee->LinkDetectInfo.NumRecvBcnInPeriod=0; | 2690 | ieee->LinkDetectInfo.NumRecvBcnInPeriod=0; |
@@ -2796,13 +2755,11 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) | |||
2796 | void ieee80211_softmac_free(struct ieee80211_device *ieee) | 2755 | void ieee80211_softmac_free(struct ieee80211_device *ieee) |
2797 | { | 2756 | { |
2798 | down(&ieee->wx_sem); | 2757 | down(&ieee->wx_sem); |
2799 | #ifdef ENABLE_DOT11D | ||
2800 | if(NULL != ieee->pDot11dInfo) | 2758 | if(NULL != ieee->pDot11dInfo) |
2801 | { | 2759 | { |
2802 | kfree(ieee->pDot11dInfo); | 2760 | kfree(ieee->pDot11dInfo); |
2803 | ieee->pDot11dInfo = NULL; | 2761 | ieee->pDot11dInfo = NULL; |
2804 | } | 2762 | } |
2805 | #endif | ||
2806 | del_timer_sync(&ieee->associate_timer); | 2763 | del_timer_sync(&ieee->associate_timer); |
2807 | 2764 | ||
2808 | cancel_delayed_work(&ieee->associate_retry_wq); | 2765 | cancel_delayed_work(&ieee->associate_retry_wq); |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c index f335c258ba8..cb5a3c32974 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | |||
@@ -15,9 +15,7 @@ | |||
15 | 15 | ||
16 | 16 | ||
17 | #include "ieee80211.h" | 17 | #include "ieee80211.h" |
18 | #ifdef ENABLE_DOT11D | ||
19 | #include "dot11d.h" | 18 | #include "dot11d.h" |
20 | #endif | ||
21 | /* FIXME: add A freqs */ | 19 | /* FIXME: add A freqs */ |
22 | 20 | ||
23 | const long ieee80211_wlan_frequencies[] = { | 21 | const long ieee80211_wlan_frequencies[] = { |
@@ -63,12 +61,10 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info | |||
63 | 61 | ||
64 | }else { /* Set the channel */ | 62 | }else { /* Set the channel */ |
65 | 63 | ||
66 | #ifdef ENABLE_DOT11D | ||
67 | if (!(GET_DOT11D_INFO(ieee)->channel_map)[fwrq->m]) { | 64 | if (!(GET_DOT11D_INFO(ieee)->channel_map)[fwrq->m]) { |
68 | ret = -EINVAL; | 65 | ret = -EINVAL; |
69 | goto out; | 66 | goto out; |
70 | } | 67 | } |
71 | #endif | ||
72 | ieee->current_network.channel = fwrq->m; | 68 | ieee->current_network.channel = fwrq->m; |
73 | ieee->set_chan(ieee->dev, ieee->current_network.channel); | 69 | ieee->set_chan(ieee->dev, ieee->current_network.channel); |
74 | 70 | ||
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c index 81aa2ed226a..ec7845ecdb7 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | |||
@@ -754,7 +754,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) | |||
754 | { | 754 | { |
755 | txb->queue_index = UP2AC(skb->priority); | 755 | txb->queue_index = UP2AC(skb->priority); |
756 | } else { | 756 | } else { |
757 | txb->queue_index = WME_AC_BK;; | 757 | txb->queue_index = WME_AC_BK; |
758 | } | 758 | } |
759 | 759 | ||
760 | 760 | ||
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 494f180acc2..ae4f2b9d9e8 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c | |||
@@ -77,9 +77,7 @@ double __extendsfdf2(float a) {return a;} | |||
77 | #include "r8192_pm.h" | 77 | #include "r8192_pm.h" |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #ifdef ENABLE_DOT11D | ||
81 | #include "dot11d.h" | 80 | #include "dot11d.h" |
82 | #endif | ||
83 | //set here to open your trace code. //WB | 81 | //set here to open your trace code. //WB |
84 | u32 rt_global_debug_component = \ | 82 | u32 rt_global_debug_component = \ |
85 | // COMP_INIT | | 83 | // COMP_INIT | |
@@ -166,7 +164,6 @@ static struct usb_driver rtl8192_usb_driver = { | |||
166 | #endif | 164 | #endif |
167 | }; | 165 | }; |
168 | 166 | ||
169 | #ifdef ENABLE_DOT11D | ||
170 | 167 | ||
171 | typedef struct _CHANNEL_LIST | 168 | typedef struct _CHANNEL_LIST |
172 | { | 169 | { |
@@ -242,9 +239,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv* priv) | |||
242 | } | 239 | } |
243 | return; | 240 | return; |
244 | } | 241 | } |
245 | #endif | ||
246 | 242 | ||
247 | #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 ) | ||
248 | 243 | ||
249 | #define rx_hal_is_cck_rate(_pdrvinfo)\ | 244 | #define rx_hal_is_cck_rate(_pdrvinfo)\ |
250 | (_pdrvinfo->RxRate == DESC90_RATE1M ||\ | 245 | (_pdrvinfo->RxRate == DESC90_RATE1M ||\ |
@@ -1507,7 +1502,7 @@ static void rtl8192_tx_isr(struct urb *tx_urb) | |||
1507 | { | 1502 | { |
1508 | // | 1503 | // |
1509 | // Handle HW Beacon: | 1504 | // Handle HW Beacon: |
1510 | // We had transfer our beacon frame to host controler at this moment. | 1505 | // We had transfer our beacon frame to host controller at this moment. |
1511 | // | 1506 | // |
1512 | // | 1507 | // |
1513 | // Caution: | 1508 | // Caution: |
@@ -2203,6 +2198,8 @@ short rtl8192_usb_initendpoints(struct net_device *dev) | |||
2203 | 2198 | ||
2204 | priv->rx_urb = kmalloc(sizeof(struct urb *) * (MAX_RX_URB+1), | 2199 | priv->rx_urb = kmalloc(sizeof(struct urb *) * (MAX_RX_URB+1), |
2205 | GFP_KERNEL); | 2200 | GFP_KERNEL); |
2201 | if (priv->rx_urb == NULL) | ||
2202 | return -ENOMEM; | ||
2206 | 2203 | ||
2207 | #ifndef JACKSON_NEW_RX | 2204 | #ifndef JACKSON_NEW_RX |
2208 | for(i=0;i<(MAX_RX_URB+1);i++){ | 2205 | for(i=0;i<(MAX_RX_URB+1);i++){ |
@@ -3155,7 +3152,6 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) | |||
3155 | short rtl8192_get_channel_map(struct net_device * dev) | 3152 | short rtl8192_get_channel_map(struct net_device * dev) |
3156 | { | 3153 | { |
3157 | struct r8192_priv *priv = ieee80211_priv(dev); | 3154 | struct r8192_priv *priv = ieee80211_priv(dev); |
3158 | #ifdef ENABLE_DOT11D | ||
3159 | if(priv->ChannelPlan > COUNTRY_CODE_GLOBAL_DOMAIN){ | 3155 | if(priv->ChannelPlan > COUNTRY_CODE_GLOBAL_DOMAIN){ |
3160 | printk("rtl8180_init:Error channel plan! Set to default.\n"); | 3156 | printk("rtl8180_init:Error channel plan! Set to default.\n"); |
3161 | priv->ChannelPlan= 0; | 3157 | priv->ChannelPlan= 0; |
@@ -3163,21 +3159,6 @@ short rtl8192_get_channel_map(struct net_device * dev) | |||
3163 | RT_TRACE(COMP_INIT, "Channel plan is %d\n",priv->ChannelPlan); | 3159 | RT_TRACE(COMP_INIT, "Channel plan is %d\n",priv->ChannelPlan); |
3164 | 3160 | ||
3165 | rtl819x_set_channel_map(priv->ChannelPlan, priv); | 3161 | rtl819x_set_channel_map(priv->ChannelPlan, priv); |
3166 | #else | ||
3167 | int ch,i; | ||
3168 | //Set Default Channel Plan | ||
3169 | if(!channels){ | ||
3170 | DMESG("No channels, aborting"); | ||
3171 | return -1; | ||
3172 | } | ||
3173 | ch=channels; | ||
3174 | priv->ChannelPlan= 0;//hikaru | ||
3175 | // set channels 1..14 allowed in given locale | ||
3176 | for (i=1; i<=14; i++) { | ||
3177 | (priv->ieee80211->channel_map)[i] = (u8)(ch & 0x01); | ||
3178 | ch >>= 1; | ||
3179 | } | ||
3180 | #endif | ||
3181 | return 0; | 3162 | return 0; |
3182 | } | 3163 | } |
3183 | 3164 | ||
@@ -5085,7 +5066,7 @@ static void rtl8192_query_rxphystatus( | |||
5085 | //Get Rx snr value in DB | 5066 | //Get Rx snr value in DB |
5086 | tmp_rxsnr = pofdm_buf->rxsnr_X[i]; | 5067 | tmp_rxsnr = pofdm_buf->rxsnr_X[i]; |
5087 | rx_snrX = (char)(tmp_rxsnr); | 5068 | rx_snrX = (char)(tmp_rxsnr); |
5088 | //rx_snrX >>= 1;; | 5069 | //rx_snrX >>= 1; |
5089 | rx_snrX /= 2; | 5070 | rx_snrX /= 2; |
5090 | priv->stats.rxSNRdB[i] = (long)rx_snrX; | 5071 | priv->stats.rxSNRdB[i] = (long)rx_snrX; |
5091 | 5072 | ||
diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c index 25d5c870b0f..f6408f98ede 100644 --- a/drivers/staging/rtl8192u/r8192U_wx.c +++ b/drivers/staging/rtl8192u/r8192U_wx.c | |||
@@ -21,9 +21,7 @@ | |||
21 | #include "r8192U.h" | 21 | #include "r8192U.h" |
22 | #include "r8192U_hw.h" | 22 | #include "r8192U_hw.h" |
23 | 23 | ||
24 | #ifdef ENABLE_DOT11D | ||
25 | #include "dot11d.h" | 24 | #include "dot11d.h" |
26 | #endif | ||
27 | 25 | ||
28 | #define RATE_COUNT 12 | 26 | #define RATE_COUNT 12 |
29 | u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000, | 27 | u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000, |
@@ -458,11 +456,7 @@ static int rtl8180_wx_get_range(struct net_device *dev, | |||
458 | for (i = 0, val = 0; i < 14; i++) { | 456 | for (i = 0, val = 0; i < 14; i++) { |
459 | 457 | ||
460 | // Include only legal frequencies for some countries | 458 | // Include only legal frequencies for some countries |
461 | #ifdef ENABLE_DOT11D | ||
462 | if ((GET_DOT11D_INFO(priv->ieee80211)->channel_map)[i+1]) { | 459 | if ((GET_DOT11D_INFO(priv->ieee80211)->channel_map)[i+1]) { |
463 | #else | ||
464 | if ((priv->ieee80211->channel_map)[i+1]) { | ||
465 | #endif | ||
466 | range->freq[val].i = i + 1; | 460 | range->freq[val].i = i + 1; |
467 | range->freq[val].m = ieee80211_wlan_frequencies[i] * 100000; | 461 | range->freq[val].m = ieee80211_wlan_frequencies[i] * 100000; |
468 | range->freq[val].e = 1; | 462 | range->freq[val].e = 1; |
diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index a3adaedece9..41684e8fcf4 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c | |||
@@ -6,9 +6,7 @@ | |||
6 | #include "r8192U_dm.h" | 6 | #include "r8192U_dm.h" |
7 | #include "r819xU_firmware_img.h" | 7 | #include "r819xU_firmware_img.h" |
8 | 8 | ||
9 | #ifdef ENABLE_DOT11D | ||
10 | #include "dot11d.h" | 9 | #include "dot11d.h" |
11 | #endif | ||
12 | static u32 RF_CHANNEL_TABLE_ZEBRA[] = { | 10 | static u32 RF_CHANNEL_TABLE_ZEBRA[] = { |
13 | 0, | 11 | 0, |
14 | 0x085c, //2412 1 | 12 | 0x085c, //2412 1 |
@@ -1011,7 +1009,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device* dev, RF90_RADIO_PATH_E | |||
1011 | break; | 1009 | break; |
1012 | } | 1010 | } |
1013 | 1011 | ||
1014 | return ret;; | 1012 | return ret; |
1015 | 1013 | ||
1016 | } | 1014 | } |
1017 | /****************************************************************************** | 1015 | /****************************************************************************** |
@@ -1257,13 +1255,11 @@ u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8* stage, u | |||
1257 | 1255 | ||
1258 | RT_TRACE(COMP_CH, "====>%s()====stage:%d, step:%d, channel:%d\n", __FUNCTION__, *stage, *step, channel); | 1256 | RT_TRACE(COMP_CH, "====>%s()====stage:%d, step:%d, channel:%d\n", __FUNCTION__, *stage, *step, channel); |
1259 | // RT_ASSERT(IsLegalChannel(Adapter, channel), ("illegal channel: %d\n", channel)); | 1257 | // RT_ASSERT(IsLegalChannel(Adapter, channel), ("illegal channel: %d\n", channel)); |
1260 | #ifdef ENABLE_DOT11D | ||
1261 | if (!IsLegalChannel(priv->ieee80211, channel)) | 1258 | if (!IsLegalChannel(priv->ieee80211, channel)) |
1262 | { | 1259 | { |
1263 | RT_TRACE(COMP_ERR, "=============>set to illegal channel:%d\n", channel); | 1260 | RT_TRACE(COMP_ERR, "=============>set to illegal channel:%d\n", channel); |
1264 | return true; //return true to tell upper caller function this channel setting is finished! Or it will in while loop. | 1261 | return true; //return true to tell upper caller function this channel setting is finished! Or it will in while loop. |
1265 | } | 1262 | } |
1266 | #endif | ||
1267 | //FIXME:need to check whether channel is legal or not here.WB | 1263 | //FIXME:need to check whether channel is legal or not here.WB |
1268 | 1264 | ||
1269 | 1265 | ||