aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-02-18 13:47:13 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-18 13:47:13 -0500
commit98d5fac2330779e6eea6431a90b44c7476260dcc (patch)
tree99870656d835fc6c12093bc67517956cc7b3d6ec /drivers/net/wireless/rtlwifi
parent4153577a8d318ae02b3791341e10e78416de402f (diff)
parent9e97d14b4923da524d202f2e005d5d30b70db9d6 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts: drivers/net/wireless/iwlwifi/dvm/tx.c drivers/net/wireless/ti/wlcore/sdio.c drivers/net/wireless/ti/wlcore/spi.c
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r--drivers/net/wireless/rtlwifi/Kconfig50
-rw-r--r--drivers/net/wireless/rtlwifi/base.c7
-rw-r--r--drivers/net/wireless/rtlwifi/rc.c12
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192ce/hw.c6
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192ce/trx.c5
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192cu/mac.c2
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192cu/sw.c9
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/hw.c3
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/trx.c3
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192se/hw.c3
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192se/trx.c3
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/hw.c3
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/trx.c3
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c5
-rw-r--r--drivers/net/wireless/rtlwifi/usb.h3
15 files changed, 62 insertions, 55 deletions
diff --git a/drivers/net/wireless/rtlwifi/Kconfig b/drivers/net/wireless/rtlwifi/Kconfig
index b80bc4612581..b6aa0c40658f 100644
--- a/drivers/net/wireless/rtlwifi/Kconfig
+++ b/drivers/net/wireless/rtlwifi/Kconfig
@@ -1,8 +1,26 @@
1config RTLWIFI
2 tristate "Realtek wireless card support"
3 depends on MAC80211
4 select FW_LOADER
5 ---help---
6 This is common code for RTL8192CE/RTL8192CU/RTL8192SE/RTL8723AE
7 drivers. This module does nothing by itself - the various front-end
8 drivers need to be enabled to support any desired devices.
9
10 If you choose to build as a module, it'll be called rtlwifi.
11
12config RTLWIFI_DEBUG
13 bool "Debugging output for rtlwifi driver family"
14 depends on RTLWIFI
15 default y
16 ---help---
17 To use the module option that sets the dynamic-debugging level for,
18 the front-end driver, this parameter must be "Y". For memory-limited
19 systems, choose "N". If in doubt, choose "Y".
20
1config RTL8192CE 21config RTL8192CE
2 tristate "Realtek RTL8192CE/RTL8188CE Wireless Network Adapter" 22 tristate "Realtek RTL8192CE/RTL8188CE Wireless Network Adapter"
3 depends on MAC80211 && PCI 23 depends on RTLWIFI && PCI
4 select FW_LOADER
5 select RTLWIFI
6 select RTL8192C_COMMON 24 select RTL8192C_COMMON
7 ---help--- 25 ---help---
8 This is the driver for Realtek RTL8192CE/RTL8188CE 802.11n PCIe 26 This is the driver for Realtek RTL8192CE/RTL8188CE 802.11n PCIe
@@ -12,9 +30,7 @@ config RTL8192CE
12 30
13config RTL8192SE 31config RTL8192SE
14 tristate "Realtek RTL8192SE/RTL8191SE PCIe Wireless Network Adapter" 32 tristate "Realtek RTL8192SE/RTL8191SE PCIe Wireless Network Adapter"
15 depends on MAC80211 && PCI 33 depends on RTLWIFI && PCI
16 select FW_LOADER
17 select RTLWIFI
18 ---help--- 34 ---help---
19 This is the driver for Realtek RTL8192SE/RTL8191SE 802.11n PCIe 35 This is the driver for Realtek RTL8192SE/RTL8191SE 802.11n PCIe
20 wireless network adapters. 36 wireless network adapters.
@@ -23,9 +39,7 @@ config RTL8192SE
23 39
24config RTL8192DE 40config RTL8192DE
25 tristate "Realtek RTL8192DE/RTL8188DE PCIe Wireless Network Adapter" 41 tristate "Realtek RTL8192DE/RTL8188DE PCIe Wireless Network Adapter"
26 depends on MAC80211 && PCI 42 depends on RTLWIFI && PCI
27 select FW_LOADER
28 select RTLWIFI
29 ---help--- 43 ---help---
30 This is the driver for Realtek RTL8192DE/RTL8188DE 802.11n PCIe 44 This is the driver for Realtek RTL8192DE/RTL8188DE 802.11n PCIe
31 wireless network adapters. 45 wireless network adapters.
@@ -34,9 +48,7 @@ config RTL8192DE
34 48
35config RTL8723AE 49config RTL8723AE
36 tristate "Realtek RTL8723AE PCIe Wireless Network Adapter" 50 tristate "Realtek RTL8723AE PCIe Wireless Network Adapter"
37 depends on MAC80211 && PCI && EXPERIMENTAL 51 depends on RTLWIFI && PCI
38 select FW_LOADER
39 select RTLWIFI
40 ---help--- 52 ---help---
41 This is the driver for Realtek RTL8723AE 802.11n PCIe 53 This is the driver for Realtek RTL8723AE 802.11n PCIe
42 wireless network adapters. 54 wireless network adapters.
@@ -45,9 +57,7 @@ config RTL8723AE
45 57
46config RTL8192CU 58config RTL8192CU
47 tristate "Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter" 59 tristate "Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter"
48 depends on MAC80211 && USB 60 depends on RTLWIFI && USB
49 select FW_LOADER
50 select RTLWIFI
51 select RTL8192C_COMMON 61 select RTL8192C_COMMON
52 ---help--- 62 ---help---
53 This is the driver for Realtek RTL8192CU/RTL8188CU 802.11n USB 63 This is the driver for Realtek RTL8192CU/RTL8188CU 802.11n USB
@@ -55,16 +65,6 @@ config RTL8192CU
55 65
56 If you choose to build it as a module, it will be called rtl8192cu 66 If you choose to build it as a module, it will be called rtl8192cu
57 67
58config RTLWIFI
59 tristate
60 depends on RTL8192CE || RTL8192CU || RTL8192SE || RTL8192DE || RTL8723AE
61 default m
62
63config RTLWIFI_DEBUG
64 bool "Additional debugging output"
65 depends on RTL8192CE || RTL8192CU || RTL8192SE || RTL8192DE || RTL8723AE
66 default y
67
68config RTL8192C_COMMON 68config RTL8192C_COMMON
69 tristate 69 tristate
70 depends on RTL8192CE || RTL8192CU 70 depends on RTL8192CE || RTL8192CU
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 0f8b05185eda..99c5cea3fe21 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -523,8 +523,8 @@ static void _rtl_query_shortgi(struct ieee80211_hw *hw,
523 if (mac->opmode == NL80211_IFTYPE_STATION) 523 if (mac->opmode == NL80211_IFTYPE_STATION)
524 bw_40 = mac->bw_40; 524 bw_40 = mac->bw_40;
525 else if (mac->opmode == NL80211_IFTYPE_AP || 525 else if (mac->opmode == NL80211_IFTYPE_AP ||
526 mac->opmode == NL80211_IFTYPE_ADHOC) 526 mac->opmode == NL80211_IFTYPE_ADHOC)
527 bw_40 = sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40; 527 bw_40 = sta->bandwidth >= IEEE80211_STA_RX_BW_40;
528 528
529 if (bw_40 && sgi_40) 529 if (bw_40 && sgi_40)
530 tcb_desc->use_shortgi = true; 530 tcb_desc->use_shortgi = true;
@@ -634,8 +634,7 @@ static void _rtl_query_bandwidth_mode(struct ieee80211_hw *hw,
634 return; 634 return;
635 if (mac->opmode == NL80211_IFTYPE_AP || 635 if (mac->opmode == NL80211_IFTYPE_AP ||
636 mac->opmode == NL80211_IFTYPE_ADHOC) { 636 mac->opmode == NL80211_IFTYPE_ADHOC) {
637 if (!(sta->ht_cap.ht_supported) || 637 if (sta->bandwidth == IEEE80211_STA_RX_BW_20)
638 !(sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40))
639 return; 638 return;
640 } else if (mac->opmode == NL80211_IFTYPE_STATION) { 639 } else if (mac->opmode == NL80211_IFTYPE_STATION) {
641 if (!mac->bw_40 || !(sta->ht_cap.ht_supported)) 640 if (!mac->bw_40 || !(sta->ht_cap.ht_supported))
diff --git a/drivers/net/wireless/rtlwifi/rc.c b/drivers/net/wireless/rtlwifi/rc.c
index 204f46c4510d..f9f059dadb73 100644
--- a/drivers/net/wireless/rtlwifi/rc.c
+++ b/drivers/net/wireless/rtlwifi/rc.c
@@ -116,9 +116,8 @@ static void _rtl_rc_rate_set_series(struct rtl_priv *rtlpriv,
116 if (txrc->short_preamble) 116 if (txrc->short_preamble)
117 rate->flags |= IEEE80211_TX_RC_USE_SHORT_PREAMBLE; 117 rate->flags |= IEEE80211_TX_RC_USE_SHORT_PREAMBLE;
118 if (mac->opmode == NL80211_IFTYPE_AP || 118 if (mac->opmode == NL80211_IFTYPE_AP ||
119 mac->opmode == NL80211_IFTYPE_ADHOC) { 119 mac->opmode == NL80211_IFTYPE_ADHOC) {
120 if (sta && (sta->ht_cap.cap & 120 if (sta && (sta->bandwidth >= IEEE80211_STA_RX_BW_40))
121 IEEE80211_HT_CAP_SUP_WIDTH_20_40))
122 rate->flags |= IEEE80211_TX_RC_40_MHZ_WIDTH; 121 rate->flags |= IEEE80211_TX_RC_40_MHZ_WIDTH;
123 } else { 122 } else {
124 if (mac->bw_40) 123 if (mac->bw_40)
@@ -217,6 +216,12 @@ static void rtl_tx_status(void *ppriv,
217 } 216 }
218} 217}
219 218
219static void rtl_rate_init(void *ppriv,
220 struct ieee80211_supported_band *sband,
221 struct ieee80211_sta *sta, void *priv_sta)
222{
223}
224
220static void *rtl_rate_alloc(struct ieee80211_hw *hw, 225static void *rtl_rate_alloc(struct ieee80211_hw *hw,
221 struct dentry *debugfsdir) 226 struct dentry *debugfsdir)
222{ 227{
@@ -261,6 +266,7 @@ static struct rate_control_ops rtl_rate_ops = {
261 .free = rtl_rate_free, 266 .free = rtl_rate_free,
262 .alloc_sta = rtl_rate_alloc_sta, 267 .alloc_sta = rtl_rate_alloc_sta,
263 .free_sta = rtl_rate_free_sta, 268 .free_sta = rtl_rate_free_sta,
269 .rate_init = rtl_rate_init,
264 .tx_status = rtl_tx_status, 270 .tx_status = rtl_tx_status,
265 .get_rate = rtl_get_rate, 271 .get_rate = rtl_get_rate,
266}; 272};
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
index d1f34f6ffbdf..1b65db7fd651 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
@@ -1846,9 +1846,9 @@ static void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw,
1846 struct rtl_sta_info *sta_entry = NULL; 1846 struct rtl_sta_info *sta_entry = NULL;
1847 u32 ratr_bitmap; 1847 u32 ratr_bitmap;
1848 u8 ratr_index; 1848 u8 ratr_index;
1849 u8 curtxbw_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) 1849 u8 curtxbw_40mhz = (sta->bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0;
1850 ? 1 : 0; 1850 u8 curshortgi_40mhz = curtxbw_40mhz &&
1851 u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? 1851 (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
1852 1 : 0; 1852 1 : 0;
1853 u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? 1853 u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ?
1854 1 : 0; 1854 1 : 0;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
index c31795e379f7..b9b1a6e0b16e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
@@ -488,7 +488,7 @@ static void _rtl92ce_translate_rx_signal_stuff(struct ieee80211_hw *hw,
488 u8 *praddr; 488 u8 *praddr;
489 __le16 fc; 489 __le16 fc;
490 u16 type, c_fc; 490 u16 type, c_fc;
491 bool packet_matchbssid, packet_toself, packet_beacon; 491 bool packet_matchbssid, packet_toself, packet_beacon = false;
492 492
493 tmp_buf = skb->data + pstats->rx_drvinfo_size + pstats->rx_bufshift; 493 tmp_buf = skb->data + pstats->rx_drvinfo_size + pstats->rx_bufshift;
494 494
@@ -626,8 +626,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
626 } else if (mac->opmode == NL80211_IFTYPE_AP || 626 } else if (mac->opmode == NL80211_IFTYPE_AP ||
627 mac->opmode == NL80211_IFTYPE_ADHOC) { 627 mac->opmode == NL80211_IFTYPE_ADHOC) {
628 if (sta) 628 if (sta)
629 bw_40 = sta->ht_cap.cap & 629 bw_40 = sta->bandwidth >= IEEE80211_STA_RX_BW_40;
630 IEEE80211_HT_CAP_SUP_WIDTH_20_40;
631 } 630 }
632 631
633 seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; 632 seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c b/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
index 32ff959a0251..85b6bdb163c0 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
@@ -1084,7 +1084,7 @@ void rtl92c_translate_rx_signal_stuff(struct ieee80211_hw *hw,
1084 u8 *praddr; 1084 u8 *praddr;
1085 __le16 fc; 1085 __le16 fc;
1086 u16 type, cpu_fc; 1086 u16 type, cpu_fc;
1087 bool packet_matchbssid, packet_toself, packet_beacon; 1087 bool packet_matchbssid, packet_toself, packet_beacon = false;
1088 1088
1089 tmp_buf = skb->data + pstats->rx_drvinfo_size + pstats->rx_bufshift; 1089 tmp_buf = skb->data + pstats->rx_drvinfo_size + pstats->rx_bufshift;
1090 hdr = (struct ieee80211_hdr *)tmp_buf; 1090 hdr = (struct ieee80211_hdr *)tmp_buf;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
index d9e659f92767..a73a17bc56dd 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
@@ -285,6 +285,7 @@ static struct usb_device_id rtl8192c_usb_ids[] = {
285 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817f, rtl92cu_hal_cfg)}, 285 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817f, rtl92cu_hal_cfg)},
286 /* RTL8188CUS-VL */ 286 /* RTL8188CUS-VL */
287 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x818a, rtl92cu_hal_cfg)}, 287 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x818a, rtl92cu_hal_cfg)},
288 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x819a, rtl92cu_hal_cfg)},
288 /* 8188 Combo for BC4 */ 289 /* 8188 Combo for BC4 */
289 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8754, rtl92cu_hal_cfg)}, 290 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8754, rtl92cu_hal_cfg)},
290 291
@@ -363,9 +364,15 @@ static struct usb_device_id rtl8192c_usb_ids[] = {
363 364
364MODULE_DEVICE_TABLE(usb, rtl8192c_usb_ids); 365MODULE_DEVICE_TABLE(usb, rtl8192c_usb_ids);
365 366
367static int rtl8192cu_probe(struct usb_interface *intf,
368 const struct usb_device_id *id)
369{
370 return rtl_usb_probe(intf, id, &rtl92cu_hal_cfg);
371}
372
366static struct usb_driver rtl8192cu_driver = { 373static struct usb_driver rtl8192cu_driver = {
367 .name = "rtl8192cu", 374 .name = "rtl8192cu",
368 .probe = rtl_usb_probe, 375 .probe = rtl8192cu_probe,
369 .disconnect = rtl_usb_disconnect, 376 .disconnect = rtl_usb_disconnect,
370 .id_table = rtl8192c_usb_ids, 377 .id_table = rtl8192c_usb_ids,
371 378
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
index f4051f4f0390..aa5b42521bb4 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
@@ -1970,8 +1970,7 @@ static void rtl92de_update_hal_rate_mask(struct ieee80211_hw *hw,
1970 struct rtl_sta_info *sta_entry = NULL; 1970 struct rtl_sta_info *sta_entry = NULL;
1971 u32 ratr_bitmap; 1971 u32 ratr_bitmap;
1972 u8 ratr_index; 1972 u8 ratr_index;
1973 u8 curtxbw_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) 1973 u8 curtxbw_40mhz = (sta->bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0;
1974 ? 1 : 0;
1975 u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? 1974 u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
1976 1 : 0; 1975 1 : 0;
1977 u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? 1976 u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ?
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
index cdb570ffb4b5..941080e03c06 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
@@ -574,8 +574,7 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
574 } else if (mac->opmode == NL80211_IFTYPE_AP || 574 } else if (mac->opmode == NL80211_IFTYPE_AP ||
575 mac->opmode == NL80211_IFTYPE_ADHOC) { 575 mac->opmode == NL80211_IFTYPE_ADHOC) {
576 if (sta) 576 if (sta)
577 bw_40 = sta->ht_cap.cap & 577 bw_40 = sta->bandwidth >= IEEE80211_STA_RX_BW_40;
578 IEEE80211_HT_CAP_SUP_WIDTH_20_40;
579 } 578 }
580 seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; 579 seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
581 rtl_get_tcb_desc(hw, info, sta, skb, ptcb_desc); 580 rtl_get_tcb_desc(hw, info, sta, skb, ptcb_desc);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
index 28526a7361f5..084e7773bce2 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
@@ -2085,8 +2085,7 @@ static void rtl92se_update_hal_rate_mask(struct ieee80211_hw *hw,
2085 struct rtl_sta_info *sta_entry = NULL; 2085 struct rtl_sta_info *sta_entry = NULL;
2086 u32 ratr_bitmap; 2086 u32 ratr_bitmap;
2087 u8 ratr_index = 0; 2087 u8 ratr_index = 0;
2088 u8 curtxbw_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) 2088 u8 curtxbw_40mhz = (sta->bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0;
2089 ? 1 : 0;
2090 u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? 2089 u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
2091 1 : 0; 2090 1 : 0;
2092 u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? 2091 u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ?
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
index f8431a3c2c9d..7b0a2e75b8b8 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
@@ -621,8 +621,7 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
621 } else if (mac->opmode == NL80211_IFTYPE_AP || 621 } else if (mac->opmode == NL80211_IFTYPE_AP ||
622 mac->opmode == NL80211_IFTYPE_ADHOC) { 622 mac->opmode == NL80211_IFTYPE_ADHOC) {
623 if (sta) 623 if (sta)
624 bw_40 = sta->ht_cap.cap & 624 bw_40 = sta->bandwidth >= IEEE80211_STA_RX_BW_40;
625 IEEE80211_HT_CAP_SUP_WIDTH_20_40;
626 } 625 }
627 626
628 seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; 627 seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
index 149804816ac4..9a0c71c2e15e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
@@ -1866,8 +1866,7 @@ static void rtl8723ae_update_hal_rate_mask(struct ieee80211_hw *hw,
1866 struct rtl_sta_info *sta_entry = NULL; 1866 struct rtl_sta_info *sta_entry = NULL;
1867 u32 ratr_bitmap; 1867 u32 ratr_bitmap;
1868 u8 ratr_index; 1868 u8 ratr_index;
1869 u8 curtxbw_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) 1869 u8 curtxbw_40mhz = (sta->bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0;
1870 ? 1 : 0;
1871 u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? 1870 u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
1872 1 : 0; 1871 1 : 0;
1873 u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? 1872 u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ?
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
index b1fd2b328abf..ac081297db50 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
@@ -395,8 +395,7 @@ void rtl8723ae_tx_fill_desc(struct ieee80211_hw *hw,
395 } else if (mac->opmode == NL80211_IFTYPE_AP || 395 } else if (mac->opmode == NL80211_IFTYPE_AP ||
396 mac->opmode == NL80211_IFTYPE_ADHOC) { 396 mac->opmode == NL80211_IFTYPE_ADHOC) {
397 if (sta) 397 if (sta)
398 bw_40 = sta->ht_cap.cap & 398 bw_40 = sta->bandwidth >= IEEE80211_STA_RX_BW_40;
399 IEEE80211_HT_CAP_SUP_WIDTH_20_40;
400 } 399 }
401 400
402 seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; 401 seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index d42bbe21ba6e..476eaef5e4a9 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -937,7 +937,8 @@ static struct rtl_intf_ops rtl_usb_ops = {
937}; 937};
938 938
939int rtl_usb_probe(struct usb_interface *intf, 939int rtl_usb_probe(struct usb_interface *intf,
940 const struct usb_device_id *id) 940 const struct usb_device_id *id,
941 struct rtl_hal_cfg *rtl_hal_cfg)
941{ 942{
942 int err; 943 int err;
943 struct ieee80211_hw *hw = NULL; 944 struct ieee80211_hw *hw = NULL;
@@ -972,7 +973,7 @@ int rtl_usb_probe(struct usb_interface *intf,
972 usb_set_intfdata(intf, hw); 973 usb_set_intfdata(intf, hw);
973 /* init cfg & intf_ops */ 974 /* init cfg & intf_ops */
974 rtlpriv->rtlhal.interface = INTF_USB; 975 rtlpriv->rtlhal.interface = INTF_USB;
975 rtlpriv->cfg = (struct rtl_hal_cfg *)(id->driver_info); 976 rtlpriv->cfg = rtl_hal_cfg;
976 rtlpriv->intf_ops = &rtl_usb_ops; 977 rtlpriv->intf_ops = &rtl_usb_ops;
977 rtl_dbgp_flag_init(hw); 978 rtl_dbgp_flag_init(hw);
978 /* Init IO handler */ 979 /* Init IO handler */
diff --git a/drivers/net/wireless/rtlwifi/usb.h b/drivers/net/wireless/rtlwifi/usb.h
index 5235136f6dd2..fb986f98d1df 100644
--- a/drivers/net/wireless/rtlwifi/usb.h
+++ b/drivers/net/wireless/rtlwifi/usb.h
@@ -157,7 +157,8 @@ struct rtl_usb_priv {
157 157
158 158
159int rtl_usb_probe(struct usb_interface *intf, 159int rtl_usb_probe(struct usb_interface *intf,
160 const struct usb_device_id *id); 160 const struct usb_device_id *id,
161 struct rtl_hal_cfg *rtl92cu_hal_cfg);
161void rtl_usb_disconnect(struct usb_interface *intf); 162void rtl_usb_disconnect(struct usb_interface *intf);
162int rtl_usb_suspend(struct usb_interface *pusb_intf, pm_message_t message); 163int rtl_usb_suspend(struct usb_interface *pusb_intf, pm_message_t message);
163int rtl_usb_resume(struct usb_interface *pusb_intf); 164int rtl_usb_resume(struct usb_interface *pusb_intf);