diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_hw.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9485_initvals.h | 42 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 19 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/dfs_debug.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 87 |
7 files changed, 140 insertions, 53 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c index b07f164d65cf..20e49095db2a 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c | |||
@@ -187,17 +187,17 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah) | |||
187 | INIT_INI_ARRAY(&ah->iniCckfirJapan2484, | 187 | INIT_INI_ARRAY(&ah->iniCckfirJapan2484, |
188 | ar9485_1_1_baseband_core_txfir_coeff_japan_2484); | 188 | ar9485_1_1_baseband_core_txfir_coeff_japan_2484); |
189 | 189 | ||
190 | /* Load PCIE SERDES settings from INI */ | 190 | if (ah->config.no_pll_pwrsave) { |
191 | 191 | INIT_INI_ARRAY(&ah->iniPcieSerdes, | |
192 | /* Awake Setting */ | 192 | ar9485_1_1_pcie_phy_clkreq_disable_L1); |
193 | 193 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, | |
194 | INIT_INI_ARRAY(&ah->iniPcieSerdes, | 194 | ar9485_1_1_pcie_phy_clkreq_disable_L1); |
195 | ar9485_1_1_pcie_phy_clkreq_disable_L1); | 195 | } else { |
196 | 196 | INIT_INI_ARRAY(&ah->iniPcieSerdes, | |
197 | /* Sleep Setting */ | 197 | ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1); |
198 | 198 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, | |
199 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, | 199 | ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1); |
200 | ar9485_1_1_pcie_phy_clkreq_disable_L1); | 200 | } |
201 | } else if (AR_SREV_9462_21(ah)) { | 201 | } else if (AR_SREV_9462_21(ah)) { |
202 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], | 202 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
203 | ar9462_2p1_mac_core); | 203 | ar9462_2p1_mac_core); |
diff --git a/drivers/net/wireless/ath/ath9k/ar9485_initvals.h b/drivers/net/wireless/ath/ath9k/ar9485_initvals.h index 6f899c692647..7c1845221e1c 100644 --- a/drivers/net/wireless/ath/ath9k/ar9485_initvals.h +++ b/drivers/net/wireless/ath/ath9k/ar9485_initvals.h | |||
@@ -32,13 +32,6 @@ static const u32 ar9485_1_1_mac_postamble[][5] = { | |||
32 | {0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440}, | 32 | {0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440}, |
33 | }; | 33 | }; |
34 | 34 | ||
35 | static const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_disable_L1[][2] = { | ||
36 | /* Addr allmodes */ | ||
37 | {0x00018c00, 0x18012e5e}, | ||
38 | {0x00018c04, 0x000801d8}, | ||
39 | {0x00018c08, 0x0000080c}, | ||
40 | }; | ||
41 | |||
42 | static const u32 ar9485Common_wo_xlna_rx_gain_1_1[][2] = { | 35 | static const u32 ar9485Common_wo_xlna_rx_gain_1_1[][2] = { |
43 | /* Addr allmodes */ | 36 | /* Addr allmodes */ |
44 | {0x00009e00, 0x037216a0}, | 37 | {0x00009e00, 0x037216a0}, |
@@ -1101,20 +1094,6 @@ static const u32 ar9485_common_rx_gain_1_1[][2] = { | |||
1101 | {0x0000a1fc, 0x00000296}, | 1094 | {0x0000a1fc, 0x00000296}, |
1102 | }; | 1095 | }; |
1103 | 1096 | ||
1104 | static const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_enable_L1[][2] = { | ||
1105 | /* Addr allmodes */ | ||
1106 | {0x00018c00, 0x18052e5e}, | ||
1107 | {0x00018c04, 0x000801d8}, | ||
1108 | {0x00018c08, 0x0000080c}, | ||
1109 | }; | ||
1110 | |||
1111 | static const u32 ar9485_1_1_pcie_phy_clkreq_enable_L1[][2] = { | ||
1112 | /* Addr allmodes */ | ||
1113 | {0x00018c00, 0x18053e5e}, | ||
1114 | {0x00018c04, 0x000801d8}, | ||
1115 | {0x00018c08, 0x0000080c}, | ||
1116 | }; | ||
1117 | |||
1118 | static const u32 ar9485_1_1_soc_preamble[][2] = { | 1097 | static const u32 ar9485_1_1_soc_preamble[][2] = { |
1119 | /* Addr allmodes */ | 1098 | /* Addr allmodes */ |
1120 | {0x00004014, 0xba280400}, | 1099 | {0x00004014, 0xba280400}, |
@@ -1173,13 +1152,6 @@ static const u32 ar9485_1_1_baseband_postamble[][5] = { | |||
1173 | {0x0000be18, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, | 1152 | {0x0000be18, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, |
1174 | }; | 1153 | }; |
1175 | 1154 | ||
1176 | static const u32 ar9485_1_1_pcie_phy_clkreq_disable_L1[][2] = { | ||
1177 | /* Addr allmodes */ | ||
1178 | {0x00018c00, 0x18013e5e}, | ||
1179 | {0x00018c04, 0x000801d8}, | ||
1180 | {0x00018c08, 0x0000080c}, | ||
1181 | }; | ||
1182 | |||
1183 | static const u32 ar9485_1_1_radio_postamble[][2] = { | 1155 | static const u32 ar9485_1_1_radio_postamble[][2] = { |
1184 | /* Addr allmodes */ | 1156 | /* Addr allmodes */ |
1185 | {0x0001609c, 0x0b283f31}, | 1157 | {0x0001609c, 0x0b283f31}, |
@@ -1358,4 +1330,18 @@ static const u32 ar9485_1_1_baseband_core_txfir_coeff_japan_2484[][2] = { | |||
1358 | {0x0000a3a0, 0xca9228ee}, | 1330 | {0x0000a3a0, 0xca9228ee}, |
1359 | }; | 1331 | }; |
1360 | 1332 | ||
1333 | static const u32 ar9485_1_1_pcie_phy_clkreq_disable_L1[][2] = { | ||
1334 | /* Addr allmodes */ | ||
1335 | {0x00018c00, 0x18013e5e}, | ||
1336 | {0x00018c04, 0x000801d8}, | ||
1337 | {0x00018c08, 0x0000080c}, | ||
1338 | }; | ||
1339 | |||
1340 | static const u32 ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1[][2] = { | ||
1341 | /* Addr allmodes */ | ||
1342 | {0x00018c00, 0x1801265e}, | ||
1343 | {0x00018c04, 0x000801d8}, | ||
1344 | {0x00018c08, 0x0000080c}, | ||
1345 | }; | ||
1346 | |||
1361 | #endif /* INITVALS_9485_H */ | 1347 | #endif /* INITVALS_9485_H */ |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index e7a38d844a6a..60a5da53668f 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -632,15 +632,16 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs); | |||
632 | /* Main driver core */ | 632 | /* Main driver core */ |
633 | /********************/ | 633 | /********************/ |
634 | 634 | ||
635 | #define ATH9K_PCI_CUS198 0x0001 | 635 | #define ATH9K_PCI_CUS198 0x0001 |
636 | #define ATH9K_PCI_CUS230 0x0002 | 636 | #define ATH9K_PCI_CUS230 0x0002 |
637 | #define ATH9K_PCI_CUS217 0x0004 | 637 | #define ATH9K_PCI_CUS217 0x0004 |
638 | #define ATH9K_PCI_CUS252 0x0008 | 638 | #define ATH9K_PCI_CUS252 0x0008 |
639 | #define ATH9K_PCI_WOW 0x0010 | 639 | #define ATH9K_PCI_WOW 0x0010 |
640 | #define ATH9K_PCI_BT_ANT_DIV 0x0020 | 640 | #define ATH9K_PCI_BT_ANT_DIV 0x0020 |
641 | #define ATH9K_PCI_D3_L1_WAR 0x0040 | 641 | #define ATH9K_PCI_D3_L1_WAR 0x0040 |
642 | #define ATH9K_PCI_AR9565_1ANT 0x0080 | 642 | #define ATH9K_PCI_AR9565_1ANT 0x0080 |
643 | #define ATH9K_PCI_AR9565_2ANT 0x0100 | 643 | #define ATH9K_PCI_AR9565_2ANT 0x0100 |
644 | #define ATH9K_PCI_NO_PLL_PWRSAVE 0x0200 | ||
644 | 645 | ||
645 | /* | 646 | /* |
646 | * Default cache line size, in bytes. | 647 | * Default cache line size, in bytes. |
diff --git a/drivers/net/wireless/ath/ath9k/dfs_debug.c b/drivers/net/wireless/ath/ath9k/dfs_debug.c index 90b8342d1ed4..8824610c21fb 100644 --- a/drivers/net/wireless/ath/ath9k/dfs_debug.c +++ b/drivers/net/wireless/ath/ath9k/dfs_debug.c | |||
@@ -44,14 +44,20 @@ static ssize_t read_file_dfs(struct file *file, char __user *user_buf, | |||
44 | if (buf == NULL) | 44 | if (buf == NULL) |
45 | return -ENOMEM; | 45 | return -ENOMEM; |
46 | 46 | ||
47 | if (sc->dfs_detector) | ||
48 | dfs_pool_stats = sc->dfs_detector->get_stats(sc->dfs_detector); | ||
49 | |||
50 | len += scnprintf(buf + len, size - len, "DFS support for " | 47 | len += scnprintf(buf + len, size - len, "DFS support for " |
51 | "macVersion = 0x%x, macRev = 0x%x: %s\n", | 48 | "macVersion = 0x%x, macRev = 0x%x: %s\n", |
52 | hw_ver->macVersion, hw_ver->macRev, | 49 | hw_ver->macVersion, hw_ver->macRev, |
53 | (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_DFS) ? | 50 | (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_DFS) ? |
54 | "enabled" : "disabled"); | 51 | "enabled" : "disabled"); |
52 | |||
53 | if (!sc->dfs_detector) { | ||
54 | len += scnprintf(buf + len, size - len, | ||
55 | "DFS detector not enabled\n"); | ||
56 | goto exit; | ||
57 | } | ||
58 | |||
59 | dfs_pool_stats = sc->dfs_detector->get_stats(sc->dfs_detector); | ||
60 | |||
55 | len += scnprintf(buf + len, size - len, "Pulse detector statistics:\n"); | 61 | len += scnprintf(buf + len, size - len, "Pulse detector statistics:\n"); |
56 | ATH9K_DFS_STAT("pulse events reported ", pulses_total); | 62 | ATH9K_DFS_STAT("pulse events reported ", pulses_total); |
57 | ATH9K_DFS_STAT("invalid pulse events ", pulses_no_dfs); | 63 | ATH9K_DFS_STAT("invalid pulse events ", pulses_no_dfs); |
@@ -76,6 +82,7 @@ static ssize_t read_file_dfs(struct file *file, char __user *user_buf, | |||
76 | ATH9K_DFS_POOL_STAT("Seqs. alloc error ", pseq_alloc_error); | 82 | ATH9K_DFS_POOL_STAT("Seqs. alloc error ", pseq_alloc_error); |
77 | ATH9K_DFS_POOL_STAT("Seqs. in use ", pseq_used); | 83 | ATH9K_DFS_POOL_STAT("Seqs. in use ", pseq_used); |
78 | 84 | ||
85 | exit: | ||
79 | if (len > size) | 86 | if (len > size) |
80 | len = size; | 87 | len = size; |
81 | 88 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 9ea24f1cba73..a2c9a5dbac6b 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -316,6 +316,7 @@ struct ath9k_ops_config { | |||
316 | u32 ant_ctrl_comm2g_switch_enable; | 316 | u32 ant_ctrl_comm2g_switch_enable; |
317 | bool xatten_margin_cfg; | 317 | bool xatten_margin_cfg; |
318 | bool alt_mingainidx; | 318 | bool alt_mingainidx; |
319 | bool no_pll_pwrsave; | ||
319 | }; | 320 | }; |
320 | 321 | ||
321 | enum ath9k_int { | 322 | enum ath9k_int { |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index d8643ebabd30..710192ed27ed 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -609,6 +609,11 @@ static void ath9k_init_platform(struct ath_softc *sc) | |||
609 | ah->config.pcie_waen = 0x0040473b; | 609 | ah->config.pcie_waen = 0x0040473b; |
610 | ath_info(common, "Enable WAR for ASPM D3/L1\n"); | 610 | ath_info(common, "Enable WAR for ASPM D3/L1\n"); |
611 | } | 611 | } |
612 | |||
613 | if (sc->driver_data & ATH9K_PCI_NO_PLL_PWRSAVE) { | ||
614 | ah->config.no_pll_pwrsave = true; | ||
615 | ath_info(common, "Disable PLL PowerSave\n"); | ||
616 | } | ||
612 | } | 617 | } |
613 | 618 | ||
614 | static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob, | 619 | static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob, |
@@ -863,8 +868,8 @@ static const struct ieee80211_iface_combination if_comb[] = { | |||
863 | .max_interfaces = 1, | 868 | .max_interfaces = 1, |
864 | .num_different_channels = 1, | 869 | .num_different_channels = 1, |
865 | .beacon_int_infra_match = true, | 870 | .beacon_int_infra_match = true, |
866 | .radar_detect_widths = BIT(NL80211_CHAN_NO_HT) | | 871 | .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | |
867 | BIT(NL80211_CHAN_HT20), | 872 | BIT(NL80211_CHAN_WIDTH_20), |
868 | } | 873 | } |
869 | }; | 874 | }; |
870 | 875 | ||
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 7e4c2524b630..b5656fce4ff5 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -195,6 +195,93 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = { | |||
195 | 0x3219), | 195 | 0x3219), |
196 | .driver_data = ATH9K_PCI_BT_ANT_DIV }, | 196 | .driver_data = ATH9K_PCI_BT_ANT_DIV }, |
197 | 197 | ||
198 | /* AR9485 cards with PLL power-save disabled by default. */ | ||
199 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
200 | 0x0032, | ||
201 | PCI_VENDOR_ID_AZWAVE, | ||
202 | 0x2C97), | ||
203 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
204 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
205 | 0x0032, | ||
206 | PCI_VENDOR_ID_AZWAVE, | ||
207 | 0x2100), | ||
208 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
209 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
210 | 0x0032, | ||
211 | 0x1C56, /* ASKEY */ | ||
212 | 0x4001), | ||
213 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
214 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
215 | 0x0032, | ||
216 | 0x11AD, /* LITEON */ | ||
217 | 0x6627), | ||
218 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
219 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
220 | 0x0032, | ||
221 | 0x11AD, /* LITEON */ | ||
222 | 0x6628), | ||
223 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
224 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
225 | 0x0032, | ||
226 | PCI_VENDOR_ID_FOXCONN, | ||
227 | 0xE04E), | ||
228 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
229 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
230 | 0x0032, | ||
231 | PCI_VENDOR_ID_FOXCONN, | ||
232 | 0xE04F), | ||
233 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
234 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
235 | 0x0032, | ||
236 | 0x144F, /* ASKEY */ | ||
237 | 0x7197), | ||
238 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
239 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
240 | 0x0032, | ||
241 | 0x1B9A, /* XAVI */ | ||
242 | 0x2000), | ||
243 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
244 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
245 | 0x0032, | ||
246 | 0x1B9A, /* XAVI */ | ||
247 | 0x2001), | ||
248 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
249 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
250 | 0x0032, | ||
251 | PCI_VENDOR_ID_AZWAVE, | ||
252 | 0x1186), | ||
253 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
254 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
255 | 0x0032, | ||
256 | PCI_VENDOR_ID_AZWAVE, | ||
257 | 0x1F86), | ||
258 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
259 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
260 | 0x0032, | ||
261 | PCI_VENDOR_ID_AZWAVE, | ||
262 | 0x1195), | ||
263 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
264 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
265 | 0x0032, | ||
266 | PCI_VENDOR_ID_AZWAVE, | ||
267 | 0x1F95), | ||
268 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
269 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
270 | 0x0032, | ||
271 | 0x1B9A, /* XAVI */ | ||
272 | 0x1C00), | ||
273 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
274 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
275 | 0x0032, | ||
276 | 0x1B9A, /* XAVI */ | ||
277 | 0x1C01), | ||
278 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
279 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
280 | 0x0032, | ||
281 | PCI_VENDOR_ID_ASUSTEK, | ||
282 | 0x850D), | ||
283 | .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, | ||
284 | |||
198 | { PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E AR9485 */ | 285 | { PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E AR9485 */ |
199 | { PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E AR9580 */ | 286 | { PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E AR9580 */ |
200 | 287 | ||