diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-03-18 09:39:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-03-18 09:39:21 -0400 |
commit | 49c87cd1eac1f798c5bad7f7eb809e6df36b6c56 (patch) | |
tree | 8d6905466a05d6539e06d189cf88b71095ac0a79 /drivers/net/wireless | |
parent | 4969b41798e512689bba57c8c44d873216eba814 (diff) | |
parent | 9437a248e7cac427c898bdb11bd1ac6844a1ead4 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
net/nfc/llcp/llcp.c
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/common.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_sdio.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/join.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/pcie.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/Kconfig | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 89 |
11 files changed, 75 insertions, 80 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common.h b/drivers/net/wireless/ath/ath9k/common.h index eca95a0c3890..6102476a65de 100644 --- a/drivers/net/wireless/ath/ath9k/common.h +++ b/drivers/net/wireless/ath/ath9k/common.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #define WME_MAX_BA WME_BA_BMP_SIZE | 27 | #define WME_MAX_BA WME_BA_BMP_SIZE |
28 | #define ATH_TID_MAX_BUFS (2 * WME_MAX_BA) | 28 | #define ATH_TID_MAX_BUFS (2 * WME_MAX_BA) |
29 | 29 | ||
30 | #define ATH_RSSI_DUMMY_MARKER 0x127 | 30 | #define ATH_RSSI_DUMMY_MARKER 127 |
31 | #define ATH_RSSI_LPF_LEN 10 | 31 | #define ATH_RSSI_LPF_LEN 10 |
32 | #define RSSI_LPF_THRESHOLD -20 | 32 | #define RSSI_LPF_THRESHOLD -20 |
33 | #define ATH_RSSI_EP_MULTIPLIER (1<<7) | 33 | #define ATH_RSSI_EP_MULTIPLIER (1<<7) |
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 96bfb18078fa..d3b099d7898b 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/firmware.h> | 22 | #include <linux/firmware.h> |
23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
24 | #include <linux/netdevice.h> | 24 | #include <linux/netdevice.h> |
25 | #include <linux/etherdevice.h> | ||
25 | #include <linux/leds.h> | 26 | #include <linux/leds.h> |
26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
27 | #include <net/mac80211.h> | 28 | #include <net/mac80211.h> |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 3ad1fd05c5e7..bd8251c1c749 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -1067,15 +1067,19 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv, | |||
1067 | 1067 | ||
1068 | last_rssi = priv->rx.last_rssi; | 1068 | last_rssi = priv->rx.last_rssi; |
1069 | 1069 | ||
1070 | if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) | 1070 | if (ieee80211_is_beacon(hdr->frame_control) && |
1071 | rxbuf->rxstatus.rs_rssi = ATH_EP_RND(last_rssi, | 1071 | !is_zero_ether_addr(common->curbssid) && |
1072 | ATH_RSSI_EP_MULTIPLIER); | 1072 | ether_addr_equal(hdr->addr3, common->curbssid)) { |
1073 | s8 rssi = rxbuf->rxstatus.rs_rssi; | ||
1073 | 1074 | ||
1074 | if (rxbuf->rxstatus.rs_rssi < 0) | 1075 | if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) |
1075 | rxbuf->rxstatus.rs_rssi = 0; | 1076 | rssi = ATH_EP_RND(last_rssi, ATH_RSSI_EP_MULTIPLIER); |
1076 | 1077 | ||
1077 | if (ieee80211_is_beacon(fc)) | 1078 | if (rssi < 0) |
1078 | priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi; | 1079 | rssi = 0; |
1080 | |||
1081 | priv->ah->stats.avgbrssi = rssi; | ||
1082 | } | ||
1079 | 1083 | ||
1080 | rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp); | 1084 | rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp); |
1081 | rx_status->band = hw->conf.channel->band; | 1085 | rx_status->band = hw->conf.channel->band; |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 767222f2ba5c..4fa2bb167050 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1463,7 +1463,9 @@ static bool ath9k_hw_chip_reset(struct ath_hw *ah, | |||
1463 | reset_type = ATH9K_RESET_POWER_ON; | 1463 | reset_type = ATH9K_RESET_POWER_ON; |
1464 | else | 1464 | else |
1465 | reset_type = ATH9K_RESET_COLD; | 1465 | reset_type = ATH9K_RESET_COLD; |
1466 | } | 1466 | } else if (ah->chip_fullsleep || REG_READ(ah, AR_Q_TXE) || |
1467 | (REG_READ(ah, AR_CR) & AR_CR_RXE)) | ||
1468 | reset_type = ATH9K_RESET_COLD; | ||
1467 | 1469 | ||
1468 | if (!ath9k_hw_set_reset_reg(ah, reset_type)) | 1470 | if (!ath9k_hw_set_reset_reg(ah, reset_type)) |
1469 | return false; | 1471 | return false; |
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index 739309e70d8b..45578335e420 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c | |||
@@ -825,6 +825,11 @@ static void if_sdio_finish_power_on(struct if_sdio_card *card) | |||
825 | 825 | ||
826 | sdio_release_host(func); | 826 | sdio_release_host(func); |
827 | 827 | ||
828 | /* Set fw_ready before queuing any commands so that | ||
829 | * lbs_thread won't block from sending them to firmware. | ||
830 | */ | ||
831 | priv->fw_ready = 1; | ||
832 | |||
828 | /* | 833 | /* |
829 | * FUNC_INIT is required for SD8688 WLAN/BT multiple functions | 834 | * FUNC_INIT is required for SD8688 WLAN/BT multiple functions |
830 | */ | 835 | */ |
@@ -839,7 +844,6 @@ static void if_sdio_finish_power_on(struct if_sdio_card *card) | |||
839 | netdev_alert(priv->dev, "CMD_FUNC_INIT cmd failed\n"); | 844 | netdev_alert(priv->dev, "CMD_FUNC_INIT cmd failed\n"); |
840 | } | 845 | } |
841 | 846 | ||
842 | priv->fw_ready = 1; | ||
843 | wake_up(&card->pwron_waitq); | 847 | wake_up(&card->pwron_waitq); |
844 | 848 | ||
845 | if (!card->started) { | 849 | if (!card->started) { |
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c index 246aa62a4817..2fe0ceba4400 100644 --- a/drivers/net/wireless/mwifiex/join.c +++ b/drivers/net/wireless/mwifiex/join.c | |||
@@ -1117,10 +1117,9 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv, | |||
1117 | adhoc_join->bss_descriptor.bssid, | 1117 | adhoc_join->bss_descriptor.bssid, |
1118 | adhoc_join->bss_descriptor.ssid); | 1118 | adhoc_join->bss_descriptor.ssid); |
1119 | 1119 | ||
1120 | for (i = 0; bss_desc->supported_rates[i] && | 1120 | for (i = 0; i < MWIFIEX_SUPPORTED_RATES && |
1121 | i < MWIFIEX_SUPPORTED_RATES; | 1121 | bss_desc->supported_rates[i]; i++) |
1122 | i++) | 1122 | ; |
1123 | ; | ||
1124 | rates_size = i; | 1123 | rates_size = i; |
1125 | 1124 | ||
1126 | /* Copy Data Rates from the Rates recorded in scan response */ | 1125 | /* Copy Data Rates from the Rates recorded in scan response */ |
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index b813a27ee613..6283294398bf 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c | |||
@@ -302,7 +302,7 @@ static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter) | |||
302 | i++; | 302 | i++; |
303 | usleep_range(10, 20); | 303 | usleep_range(10, 20); |
304 | /* 50ms max wait */ | 304 | /* 50ms max wait */ |
305 | if (i == 50000) | 305 | if (i == 5000) |
306 | break; | 306 | break; |
307 | } | 307 | } |
308 | 308 | ||
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig index 44d6ead43341..2bf4efa33186 100644 --- a/drivers/net/wireless/rt2x00/Kconfig +++ b/drivers/net/wireless/rt2x00/Kconfig | |||
@@ -55,10 +55,10 @@ config RT61PCI | |||
55 | 55 | ||
56 | config RT2800PCI | 56 | config RT2800PCI |
57 | tristate "Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support" | 57 | tristate "Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support" |
58 | depends on PCI || RALINK_RT288X || RALINK_RT305X | 58 | depends on PCI || SOC_RT288X || SOC_RT305X |
59 | select RT2800_LIB | 59 | select RT2800_LIB |
60 | select RT2X00_LIB_PCI if PCI | 60 | select RT2X00_LIB_PCI if PCI |
61 | select RT2X00_LIB_SOC if RALINK_RT288X || RALINK_RT305X | 61 | select RT2X00_LIB_SOC if SOC_RT288X || SOC_RT305X |
62 | select RT2X00_LIB_FIRMWARE | 62 | select RT2X00_LIB_FIRMWARE |
63 | select RT2X00_LIB_CRYPTO | 63 | select RT2X00_LIB_CRYPTO |
64 | select CRC_CCITT | 64 | select CRC_CCITT |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 48a01aa21f1c..ded73da4de0b 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -89,7 +89,7 @@ static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token) | |||
89 | rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0); | 89 | rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0); |
90 | } | 90 | } |
91 | 91 | ||
92 | #if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X) | 92 | #if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X) |
93 | static int rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev) | 93 | static int rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev) |
94 | { | 94 | { |
95 | void __iomem *base_addr = ioremap(0x1F040000, EEPROM_SIZE); | 95 | void __iomem *base_addr = ioremap(0x1F040000, EEPROM_SIZE); |
@@ -107,7 +107,7 @@ static inline int rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev) | |||
107 | { | 107 | { |
108 | return -ENOMEM; | 108 | return -ENOMEM; |
109 | } | 109 | } |
110 | #endif /* CONFIG_RALINK_RT288X || CONFIG_RALINK_RT305X */ | 110 | #endif /* CONFIG_SOC_RT288X || CONFIG_SOC_RT305X */ |
111 | 111 | ||
112 | #ifdef CONFIG_PCI | 112 | #ifdef CONFIG_PCI |
113 | static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom) | 113 | static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom) |
@@ -1177,7 +1177,7 @@ MODULE_DEVICE_TABLE(pci, rt2800pci_device_table); | |||
1177 | #endif /* CONFIG_PCI */ | 1177 | #endif /* CONFIG_PCI */ |
1178 | MODULE_LICENSE("GPL"); | 1178 | MODULE_LICENSE("GPL"); |
1179 | 1179 | ||
1180 | #if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X) | 1180 | #if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X) |
1181 | static int rt2800soc_probe(struct platform_device *pdev) | 1181 | static int rt2800soc_probe(struct platform_device *pdev) |
1182 | { | 1182 | { |
1183 | return rt2x00soc_probe(pdev, &rt2800pci_ops); | 1183 | return rt2x00soc_probe(pdev, &rt2800pci_ops); |
@@ -1194,7 +1194,7 @@ static struct platform_driver rt2800soc_driver = { | |||
1194 | .suspend = rt2x00soc_suspend, | 1194 | .suspend = rt2x00soc_suspend, |
1195 | .resume = rt2x00soc_resume, | 1195 | .resume = rt2x00soc_resume, |
1196 | }; | 1196 | }; |
1197 | #endif /* CONFIG_RALINK_RT288X || CONFIG_RALINK_RT305X */ | 1197 | #endif /* CONFIG_SOC_RT288X || CONFIG_SOC_RT305X */ |
1198 | 1198 | ||
1199 | #ifdef CONFIG_PCI | 1199 | #ifdef CONFIG_PCI |
1200 | static int rt2800pci_probe(struct pci_dev *pci_dev, | 1200 | static int rt2800pci_probe(struct pci_dev *pci_dev, |
@@ -1217,7 +1217,7 @@ static int __init rt2800pci_init(void) | |||
1217 | { | 1217 | { |
1218 | int ret = 0; | 1218 | int ret = 0; |
1219 | 1219 | ||
1220 | #if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X) | 1220 | #if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X) |
1221 | ret = platform_driver_register(&rt2800soc_driver); | 1221 | ret = platform_driver_register(&rt2800soc_driver); |
1222 | if (ret) | 1222 | if (ret) |
1223 | return ret; | 1223 | return ret; |
@@ -1225,7 +1225,7 @@ static int __init rt2800pci_init(void) | |||
1225 | #ifdef CONFIG_PCI | 1225 | #ifdef CONFIG_PCI |
1226 | ret = pci_register_driver(&rt2800pci_driver); | 1226 | ret = pci_register_driver(&rt2800pci_driver); |
1227 | if (ret) { | 1227 | if (ret) { |
1228 | #if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X) | 1228 | #if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X) |
1229 | platform_driver_unregister(&rt2800soc_driver); | 1229 | platform_driver_unregister(&rt2800soc_driver); |
1230 | #endif | 1230 | #endif |
1231 | return ret; | 1231 | return ret; |
@@ -1240,7 +1240,7 @@ static void __exit rt2800pci_exit(void) | |||
1240 | #ifdef CONFIG_PCI | 1240 | #ifdef CONFIG_PCI |
1241 | pci_unregister_driver(&rt2800pci_driver); | 1241 | pci_unregister_driver(&rt2800pci_driver); |
1242 | #endif | 1242 | #endif |
1243 | #if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X) | 1243 | #if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X) |
1244 | platform_driver_unregister(&rt2800soc_driver); | 1244 | platform_driver_unregister(&rt2800soc_driver); |
1245 | #endif | 1245 | #endif |
1246 | } | 1246 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 1031db66474a..189744db65e0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -1236,8 +1236,10 @@ static inline void rt2x00lib_set_if_combinations(struct rt2x00_dev *rt2x00dev) | |||
1236 | */ | 1236 | */ |
1237 | if_limit = &rt2x00dev->if_limits_ap; | 1237 | if_limit = &rt2x00dev->if_limits_ap; |
1238 | if_limit->max = rt2x00dev->ops->max_ap_intf; | 1238 | if_limit->max = rt2x00dev->ops->max_ap_intf; |
1239 | if_limit->types = BIT(NL80211_IFTYPE_AP) | | 1239 | if_limit->types = BIT(NL80211_IFTYPE_AP); |
1240 | BIT(NL80211_IFTYPE_MESH_POINT); | 1240 | #ifdef CONFIG_MAC80211_MESH |
1241 | if_limit->types |= BIT(NL80211_IFTYPE_MESH_POINT); | ||
1242 | #endif | ||
1241 | 1243 | ||
1242 | /* | 1244 | /* |
1243 | * Build up AP interface combinations structure. | 1245 | * Build up AP interface combinations structure. |
@@ -1309,7 +1311,9 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) | |||
1309 | rt2x00dev->hw->wiphy->interface_modes |= | 1311 | rt2x00dev->hw->wiphy->interface_modes |= |
1310 | BIT(NL80211_IFTYPE_ADHOC) | | 1312 | BIT(NL80211_IFTYPE_ADHOC) | |
1311 | BIT(NL80211_IFTYPE_AP) | | 1313 | BIT(NL80211_IFTYPE_AP) | |
1314 | #ifdef CONFIG_MAC80211_MESH | ||
1312 | BIT(NL80211_IFTYPE_MESH_POINT) | | 1315 | BIT(NL80211_IFTYPE_MESH_POINT) | |
1316 | #endif | ||
1313 | BIT(NL80211_IFTYPE_WDS); | 1317 | BIT(NL80211_IFTYPE_WDS); |
1314 | 1318 | ||
1315 | rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; | 1319 | rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c index b1ccff474c79..c08d0f4c5f3d 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | |||
@@ -1377,74 +1377,57 @@ void rtl92cu_card_disable(struct ieee80211_hw *hw) | |||
1377 | 1377 | ||
1378 | void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) | 1378 | void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) |
1379 | { | 1379 | { |
1380 | /* dummy routine needed for callback from rtl_op_configure_filter() */ | ||
1381 | } | ||
1382 | |||
1383 | /*========================================================================== */ | ||
1384 | |||
1385 | static void _rtl92cu_set_check_bssid(struct ieee80211_hw *hw, | ||
1386 | enum nl80211_iftype type) | ||
1387 | { | ||
1388 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 1380 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
1389 | u32 reg_rcr = rtl_read_dword(rtlpriv, REG_RCR); | ||
1390 | struct rtl_hal *rtlhal = rtl_hal(rtlpriv); | 1381 | struct rtl_hal *rtlhal = rtl_hal(rtlpriv); |
1391 | struct rtl_phy *rtlphy = &(rtlpriv->phy); | 1382 | u32 reg_rcr = rtl_read_dword(rtlpriv, REG_RCR); |
1392 | u8 filterout_non_associated_bssid = false; | ||
1393 | 1383 | ||
1394 | switch (type) { | 1384 | if (rtlpriv->psc.rfpwr_state != ERFON) |
1395 | case NL80211_IFTYPE_ADHOC: | 1385 | return; |
1396 | case NL80211_IFTYPE_STATION: | 1386 | |
1397 | filterout_non_associated_bssid = true; | 1387 | if (check_bssid) { |
1398 | break; | 1388 | u8 tmp; |
1399 | case NL80211_IFTYPE_UNSPECIFIED: | ||
1400 | case NL80211_IFTYPE_AP: | ||
1401 | default: | ||
1402 | break; | ||
1403 | } | ||
1404 | if (filterout_non_associated_bssid) { | ||
1405 | if (IS_NORMAL_CHIP(rtlhal->version)) { | 1389 | if (IS_NORMAL_CHIP(rtlhal->version)) { |
1406 | switch (rtlphy->current_io_type) { | 1390 | reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); |
1407 | case IO_CMD_RESUME_DM_BY_SCAN: | 1391 | tmp = BIT(4); |
1408 | reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); | ||
1409 | rtlpriv->cfg->ops->set_hw_reg(hw, | ||
1410 | HW_VAR_RCR, (u8 *)(®_rcr)); | ||
1411 | /* enable update TSF */ | ||
1412 | _rtl92cu_set_bcn_ctrl_reg(hw, 0, BIT(4)); | ||
1413 | break; | ||
1414 | case IO_CMD_PAUSE_DM_BY_SCAN: | ||
1415 | reg_rcr &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN); | ||
1416 | rtlpriv->cfg->ops->set_hw_reg(hw, | ||
1417 | HW_VAR_RCR, (u8 *)(®_rcr)); | ||
1418 | /* disable update TSF */ | ||
1419 | _rtl92cu_set_bcn_ctrl_reg(hw, BIT(4), 0); | ||
1420 | break; | ||
1421 | } | ||
1422 | } else { | 1392 | } else { |
1423 | reg_rcr |= (RCR_CBSSID); | 1393 | reg_rcr |= RCR_CBSSID; |
1424 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, | 1394 | tmp = BIT(4) | BIT(5); |
1425 | (u8 *)(®_rcr)); | ||
1426 | _rtl92cu_set_bcn_ctrl_reg(hw, 0, (BIT(4)|BIT(5))); | ||
1427 | } | 1395 | } |
1428 | } else if (filterout_non_associated_bssid == false) { | 1396 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, |
1397 | (u8 *) (®_rcr)); | ||
1398 | _rtl92cu_set_bcn_ctrl_reg(hw, 0, tmp); | ||
1399 | } else { | ||
1400 | u8 tmp; | ||
1429 | if (IS_NORMAL_CHIP(rtlhal->version)) { | 1401 | if (IS_NORMAL_CHIP(rtlhal->version)) { |
1430 | reg_rcr &= (~(RCR_CBSSID_DATA | RCR_CBSSID_BCN)); | 1402 | reg_rcr &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN); |
1431 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, | 1403 | tmp = BIT(4); |
1432 | (u8 *)(®_rcr)); | ||
1433 | _rtl92cu_set_bcn_ctrl_reg(hw, BIT(4), 0); | ||
1434 | } else { | 1404 | } else { |
1435 | reg_rcr &= (~RCR_CBSSID); | 1405 | reg_rcr &= ~RCR_CBSSID; |
1436 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, | 1406 | tmp = BIT(4) | BIT(5); |
1437 | (u8 *)(®_rcr)); | ||
1438 | _rtl92cu_set_bcn_ctrl_reg(hw, (BIT(4)|BIT(5)), 0); | ||
1439 | } | 1407 | } |
1408 | reg_rcr &= (~(RCR_CBSSID_DATA | RCR_CBSSID_BCN)); | ||
1409 | rtlpriv->cfg->ops->set_hw_reg(hw, | ||
1410 | HW_VAR_RCR, (u8 *) (®_rcr)); | ||
1411 | _rtl92cu_set_bcn_ctrl_reg(hw, tmp, 0); | ||
1440 | } | 1412 | } |
1441 | } | 1413 | } |
1442 | 1414 | ||
1415 | /*========================================================================== */ | ||
1416 | |||
1443 | int rtl92cu_set_network_type(struct ieee80211_hw *hw, enum nl80211_iftype type) | 1417 | int rtl92cu_set_network_type(struct ieee80211_hw *hw, enum nl80211_iftype type) |
1444 | { | 1418 | { |
1419 | struct rtl_priv *rtlpriv = rtl_priv(hw); | ||
1420 | |||
1445 | if (_rtl92cu_set_media_status(hw, type)) | 1421 | if (_rtl92cu_set_media_status(hw, type)) |
1446 | return -EOPNOTSUPP; | 1422 | return -EOPNOTSUPP; |
1447 | _rtl92cu_set_check_bssid(hw, type); | 1423 | |
1424 | if (rtlpriv->mac80211.link_state == MAC80211_LINKED) { | ||
1425 | if (type != NL80211_IFTYPE_AP) | ||
1426 | rtl92cu_set_check_bssid(hw, true); | ||
1427 | } else { | ||
1428 | rtl92cu_set_check_bssid(hw, false); | ||
1429 | } | ||
1430 | |||
1448 | return 0; | 1431 | return 0; |
1449 | } | 1432 | } |
1450 | 1433 | ||
@@ -2058,8 +2041,6 @@ void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw, | |||
2058 | (shortgi_rate << 4) | (shortgi_rate); | 2041 | (shortgi_rate << 4) | (shortgi_rate); |
2059 | } | 2042 | } |
2060 | rtl_write_dword(rtlpriv, REG_ARFR0 + ratr_index * 4, ratr_value); | 2043 | rtl_write_dword(rtlpriv, REG_ARFR0 + ratr_index * 4, ratr_value); |
2061 | RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, "%x\n", | ||
2062 | rtl_read_dword(rtlpriv, REG_ARFR0)); | ||
2063 | } | 2044 | } |
2064 | 2045 | ||
2065 | void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) | 2046 | void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) |