diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-12-02 15:46:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-02 15:46:37 -0500 |
commit | 09f921f83faa49cdea25abfb98c439c01526b89d (patch) | |
tree | 1e8ee5c8f14e0e57965eca81bc6725288fd3597b /drivers | |
parent | 4cebb34caa5122216a1e2451eae9e0fc47ec2589 (diff) | |
parent | d89197c7f34934fbb0f96d938a0d6cfe0b8bcb1c (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 315 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom.h | 27 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_def.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/reg.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/fw.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/main.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/tx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_sdio.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_spi.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/main.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/scan.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/scan.h | 1 |
19 files changed, 228 insertions, 211 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 4aecc10cb3a6..872b1a3b21c6 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -57,8 +57,11 @@ | |||
57 | #define SUB_NUM_CTL_MODES_AT_5G_40 2 /* excluding HT40, EXT-OFDM */ | 57 | #define SUB_NUM_CTL_MODES_AT_5G_40 2 /* excluding HT40, EXT-OFDM */ |
58 | #define SUB_NUM_CTL_MODES_AT_2G_40 3 /* excluding HT40, EXT-OFDM, EXT-CCK */ | 58 | #define SUB_NUM_CTL_MODES_AT_2G_40 3 /* excluding HT40, EXT-OFDM, EXT-CCK */ |
59 | 59 | ||
60 | #define CTL(_tpower, _flag) ((_tpower) | ((_flag) << 6)) | ||
61 | |||
60 | static int ar9003_hw_power_interpolate(int32_t x, | 62 | static int ar9003_hw_power_interpolate(int32_t x, |
61 | int32_t *px, int32_t *py, u_int16_t np); | 63 | int32_t *px, int32_t *py, u_int16_t np); |
64 | |||
62 | static const struct ar9300_eeprom ar9300_default = { | 65 | static const struct ar9300_eeprom ar9300_default = { |
63 | .eepromVersion = 2, | 66 | .eepromVersion = 2, |
64 | .templateVersion = 2, | 67 | .templateVersion = 2, |
@@ -296,21 +299,21 @@ static const struct ar9300_eeprom ar9300_default = { | |||
296 | } | 299 | } |
297 | }, | 300 | }, |
298 | .ctlPowerData_2G = { | 301 | .ctlPowerData_2G = { |
299 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 302 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
300 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 303 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
301 | { { {60, 1}, {60, 0}, {60, 0}, {60, 1} } }, | 304 | { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } }, |
302 | 305 | ||
303 | { { {60, 1}, {60, 0}, {0, 0}, {0, 0} } }, | 306 | { { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } }, |
304 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 307 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
305 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 308 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
306 | 309 | ||
307 | { { {60, 0}, {60, 1}, {60, 1}, {60, 0} } }, | 310 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0) } }, |
308 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 311 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
309 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 312 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
310 | 313 | ||
311 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 314 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
312 | { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } }, | 315 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } }, |
313 | { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } }, | 316 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } }, |
314 | }, | 317 | }, |
315 | .modalHeader5G = { | 318 | .modalHeader5G = { |
316 | /* 4 idle,t1,t2,b (4 bits per setting) */ | 319 | /* 4 idle,t1,t2,b (4 bits per setting) */ |
@@ -582,56 +585,56 @@ static const struct ar9300_eeprom ar9300_default = { | |||
582 | .ctlPowerData_5G = { | 585 | .ctlPowerData_5G = { |
583 | { | 586 | { |
584 | { | 587 | { |
585 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 588 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
586 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 589 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
587 | } | 590 | } |
588 | }, | 591 | }, |
589 | { | 592 | { |
590 | { | 593 | { |
591 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 594 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
592 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 595 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
593 | } | 596 | } |
594 | }, | 597 | }, |
595 | { | 598 | { |
596 | { | 599 | { |
597 | {60, 0}, {60, 1}, {60, 0}, {60, 1}, | 600 | CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
598 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 601 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
599 | } | 602 | } |
600 | }, | 603 | }, |
601 | { | 604 | { |
602 | { | 605 | { |
603 | {60, 0}, {60, 1}, {60, 1}, {60, 0}, | 606 | CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
604 | {60, 1}, {60, 0}, {60, 0}, {60, 0}, | 607 | CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
605 | } | 608 | } |
606 | }, | 609 | }, |
607 | { | 610 | { |
608 | { | 611 | { |
609 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 612 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
610 | {60, 0}, {60, 0}, {60, 0}, {60, 0}, | 613 | CTL(60, 0), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
611 | } | 614 | } |
612 | }, | 615 | }, |
613 | { | 616 | { |
614 | { | 617 | { |
615 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 618 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
616 | {60, 1}, {60, 0}, {60, 0}, {60, 0}, | 619 | CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
617 | } | 620 | } |
618 | }, | 621 | }, |
619 | { | 622 | { |
620 | { | 623 | { |
621 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 624 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
622 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 625 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
623 | } | 626 | } |
624 | }, | 627 | }, |
625 | { | 628 | { |
626 | { | 629 | { |
627 | {60, 1}, {60, 1}, {60, 0}, {60, 1}, | 630 | CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
628 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 631 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
629 | } | 632 | } |
630 | }, | 633 | }, |
631 | { | 634 | { |
632 | { | 635 | { |
633 | {60, 1}, {60, 0}, {60, 1}, {60, 1}, | 636 | CTL(60, 1), CTL(60, 0), CTL(60, 1), CTL(60, 1), |
634 | {60, 1}, {60, 1}, {60, 0}, {60, 1}, | 637 | CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
635 | } | 638 | } |
636 | }, | 639 | }, |
637 | } | 640 | } |
@@ -873,21 +876,21 @@ static const struct ar9300_eeprom ar9300_x113 = { | |||
873 | } | 876 | } |
874 | }, | 877 | }, |
875 | .ctlPowerData_2G = { | 878 | .ctlPowerData_2G = { |
876 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 879 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
877 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 880 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
878 | { { {60, 1}, {60, 0}, {60, 0}, {60, 1} } }, | 881 | { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } }, |
879 | 882 | ||
880 | { { {60, 1}, {60, 0}, {0, 0}, {0, 0} } }, | 883 | { { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } }, |
881 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 884 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
882 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 885 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
883 | 886 | ||
884 | { { {60, 0}, {60, 1}, {60, 1}, {60, 0} } }, | 887 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0) } }, |
885 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 888 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
886 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 889 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
887 | 890 | ||
888 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 891 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
889 | { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } }, | 892 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } }, |
890 | { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } }, | 893 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } }, |
891 | }, | 894 | }, |
892 | .modalHeader5G = { | 895 | .modalHeader5G = { |
893 | /* 4 idle,t1,t2,b (4 bits per setting) */ | 896 | /* 4 idle,t1,t2,b (4 bits per setting) */ |
@@ -1159,56 +1162,56 @@ static const struct ar9300_eeprom ar9300_x113 = { | |||
1159 | .ctlPowerData_5G = { | 1162 | .ctlPowerData_5G = { |
1160 | { | 1163 | { |
1161 | { | 1164 | { |
1162 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1165 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1163 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 1166 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
1164 | } | 1167 | } |
1165 | }, | 1168 | }, |
1166 | { | 1169 | { |
1167 | { | 1170 | { |
1168 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1171 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1169 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 1172 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
1170 | } | 1173 | } |
1171 | }, | 1174 | }, |
1172 | { | 1175 | { |
1173 | { | 1176 | { |
1174 | {60, 0}, {60, 1}, {60, 0}, {60, 1}, | 1177 | CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
1175 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1178 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1176 | } | 1179 | } |
1177 | }, | 1180 | }, |
1178 | { | 1181 | { |
1179 | { | 1182 | { |
1180 | {60, 0}, {60, 1}, {60, 1}, {60, 0}, | 1183 | CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
1181 | {60, 1}, {60, 0}, {60, 0}, {60, 0}, | 1184 | CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
1182 | } | 1185 | } |
1183 | }, | 1186 | }, |
1184 | { | 1187 | { |
1185 | { | 1188 | { |
1186 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 1189 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
1187 | {60, 0}, {60, 0}, {60, 0}, {60, 0}, | 1190 | CTL(60, 0), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
1188 | } | 1191 | } |
1189 | }, | 1192 | }, |
1190 | { | 1193 | { |
1191 | { | 1194 | { |
1192 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1195 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1193 | {60, 1}, {60, 0}, {60, 0}, {60, 0}, | 1196 | CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
1194 | } | 1197 | } |
1195 | }, | 1198 | }, |
1196 | { | 1199 | { |
1197 | { | 1200 | { |
1198 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1201 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1199 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1202 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1200 | } | 1203 | } |
1201 | }, | 1204 | }, |
1202 | { | 1205 | { |
1203 | { | 1206 | { |
1204 | {60, 1}, {60, 1}, {60, 0}, {60, 1}, | 1207 | CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
1205 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 1208 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
1206 | } | 1209 | } |
1207 | }, | 1210 | }, |
1208 | { | 1211 | { |
1209 | { | 1212 | { |
1210 | {60, 1}, {60, 0}, {60, 1}, {60, 1}, | 1213 | CTL(60, 1), CTL(60, 0), CTL(60, 1), CTL(60, 1), |
1211 | {60, 1}, {60, 1}, {60, 0}, {60, 1}, | 1214 | CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
1212 | } | 1215 | } |
1213 | }, | 1216 | }, |
1214 | } | 1217 | } |
@@ -1451,21 +1454,21 @@ static const struct ar9300_eeprom ar9300_h112 = { | |||
1451 | } | 1454 | } |
1452 | }, | 1455 | }, |
1453 | .ctlPowerData_2G = { | 1456 | .ctlPowerData_2G = { |
1454 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 1457 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
1455 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 1458 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
1456 | { { {60, 1}, {60, 0}, {60, 0}, {60, 1} } }, | 1459 | { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } }, |
1457 | 1460 | ||
1458 | { { {60, 1}, {60, 0}, {0, 0}, {0, 0} } }, | 1461 | { { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } }, |
1459 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 1462 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
1460 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 1463 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
1461 | 1464 | ||
1462 | { { {60, 0}, {60, 1}, {60, 1}, {60, 0} } }, | 1465 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0) } }, |
1463 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 1466 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
1464 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 1467 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
1465 | 1468 | ||
1466 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 1469 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
1467 | { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } }, | 1470 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } }, |
1468 | { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } }, | 1471 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } }, |
1469 | }, | 1472 | }, |
1470 | .modalHeader5G = { | 1473 | .modalHeader5G = { |
1471 | /* 4 idle,t1,t2,b (4 bits per setting) */ | 1474 | /* 4 idle,t1,t2,b (4 bits per setting) */ |
@@ -1737,56 +1740,56 @@ static const struct ar9300_eeprom ar9300_h112 = { | |||
1737 | .ctlPowerData_5G = { | 1740 | .ctlPowerData_5G = { |
1738 | { | 1741 | { |
1739 | { | 1742 | { |
1740 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1743 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1741 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 1744 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
1742 | } | 1745 | } |
1743 | }, | 1746 | }, |
1744 | { | 1747 | { |
1745 | { | 1748 | { |
1746 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1749 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1747 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 1750 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
1748 | } | 1751 | } |
1749 | }, | 1752 | }, |
1750 | { | 1753 | { |
1751 | { | 1754 | { |
1752 | {60, 0}, {60, 1}, {60, 0}, {60, 1}, | 1755 | CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
1753 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1756 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1754 | } | 1757 | } |
1755 | }, | 1758 | }, |
1756 | { | 1759 | { |
1757 | { | 1760 | { |
1758 | {60, 0}, {60, 1}, {60, 1}, {60, 0}, | 1761 | CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
1759 | {60, 1}, {60, 0}, {60, 0}, {60, 0}, | 1762 | CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
1760 | } | 1763 | } |
1761 | }, | 1764 | }, |
1762 | { | 1765 | { |
1763 | { | 1766 | { |
1764 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 1767 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
1765 | {60, 0}, {60, 0}, {60, 0}, {60, 0}, | 1768 | CTL(60, 0), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
1766 | } | 1769 | } |
1767 | }, | 1770 | }, |
1768 | { | 1771 | { |
1769 | { | 1772 | { |
1770 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1773 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1771 | {60, 1}, {60, 0}, {60, 0}, {60, 0}, | 1774 | CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
1772 | } | 1775 | } |
1773 | }, | 1776 | }, |
1774 | { | 1777 | { |
1775 | { | 1778 | { |
1776 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1779 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1777 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 1780 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
1778 | } | 1781 | } |
1779 | }, | 1782 | }, |
1780 | { | 1783 | { |
1781 | { | 1784 | { |
1782 | {60, 1}, {60, 1}, {60, 0}, {60, 1}, | 1785 | CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
1783 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 1786 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
1784 | } | 1787 | } |
1785 | }, | 1788 | }, |
1786 | { | 1789 | { |
1787 | { | 1790 | { |
1788 | {60, 1}, {60, 0}, {60, 1}, {60, 1}, | 1791 | CTL(60, 1), CTL(60, 0), CTL(60, 1), CTL(60, 1), |
1789 | {60, 1}, {60, 1}, {60, 0}, {60, 1}, | 1792 | CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
1790 | } | 1793 | } |
1791 | }, | 1794 | }, |
1792 | } | 1795 | } |
@@ -2029,21 +2032,21 @@ static const struct ar9300_eeprom ar9300_x112 = { | |||
2029 | } | 2032 | } |
2030 | }, | 2033 | }, |
2031 | .ctlPowerData_2G = { | 2034 | .ctlPowerData_2G = { |
2032 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2035 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2033 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2036 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2034 | { { {60, 1}, {60, 0}, {60, 0}, {60, 1} } }, | 2037 | { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } }, |
2035 | 2038 | ||
2036 | { { {60, 1}, {60, 0}, {0, 0}, {0, 0} } }, | 2039 | { { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } }, |
2037 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2040 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2038 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2041 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2039 | 2042 | ||
2040 | { { {60, 0}, {60, 1}, {60, 1}, {60, 0} } }, | 2043 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0) } }, |
2041 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2044 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2042 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2045 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2043 | 2046 | ||
2044 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2047 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2045 | { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } }, | 2048 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } }, |
2046 | { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } }, | 2049 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } }, |
2047 | }, | 2050 | }, |
2048 | .modalHeader5G = { | 2051 | .modalHeader5G = { |
2049 | /* 4 idle,t1,t2,b (4 bits per setting) */ | 2052 | /* 4 idle,t1,t2,b (4 bits per setting) */ |
@@ -2315,56 +2318,56 @@ static const struct ar9300_eeprom ar9300_x112 = { | |||
2315 | .ctlPowerData_5G = { | 2318 | .ctlPowerData_5G = { |
2316 | { | 2319 | { |
2317 | { | 2320 | { |
2318 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2321 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2319 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 2322 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
2320 | } | 2323 | } |
2321 | }, | 2324 | }, |
2322 | { | 2325 | { |
2323 | { | 2326 | { |
2324 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2327 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2325 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 2328 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
2326 | } | 2329 | } |
2327 | }, | 2330 | }, |
2328 | { | 2331 | { |
2329 | { | 2332 | { |
2330 | {60, 0}, {60, 1}, {60, 0}, {60, 1}, | 2333 | CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
2331 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2334 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2332 | } | 2335 | } |
2333 | }, | 2336 | }, |
2334 | { | 2337 | { |
2335 | { | 2338 | { |
2336 | {60, 0}, {60, 1}, {60, 1}, {60, 0}, | 2339 | CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
2337 | {60, 1}, {60, 0}, {60, 0}, {60, 0}, | 2340 | CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
2338 | } | 2341 | } |
2339 | }, | 2342 | }, |
2340 | { | 2343 | { |
2341 | { | 2344 | { |
2342 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 2345 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
2343 | {60, 0}, {60, 0}, {60, 0}, {60, 0}, | 2346 | CTL(60, 0), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
2344 | } | 2347 | } |
2345 | }, | 2348 | }, |
2346 | { | 2349 | { |
2347 | { | 2350 | { |
2348 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2351 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2349 | {60, 1}, {60, 0}, {60, 0}, {60, 0}, | 2352 | CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
2350 | } | 2353 | } |
2351 | }, | 2354 | }, |
2352 | { | 2355 | { |
2353 | { | 2356 | { |
2354 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2357 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2355 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2358 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2356 | } | 2359 | } |
2357 | }, | 2360 | }, |
2358 | { | 2361 | { |
2359 | { | 2362 | { |
2360 | {60, 1}, {60, 1}, {60, 0}, {60, 1}, | 2363 | CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
2361 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 2364 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
2362 | } | 2365 | } |
2363 | }, | 2366 | }, |
2364 | { | 2367 | { |
2365 | { | 2368 | { |
2366 | {60, 1}, {60, 0}, {60, 1}, {60, 1}, | 2369 | CTL(60, 1), CTL(60, 0), CTL(60, 1), CTL(60, 1), |
2367 | {60, 1}, {60, 1}, {60, 0}, {60, 1}, | 2370 | CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
2368 | } | 2371 | } |
2369 | }, | 2372 | }, |
2370 | } | 2373 | } |
@@ -2606,21 +2609,21 @@ static const struct ar9300_eeprom ar9300_h116 = { | |||
2606 | } | 2609 | } |
2607 | }, | 2610 | }, |
2608 | .ctlPowerData_2G = { | 2611 | .ctlPowerData_2G = { |
2609 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2612 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2610 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2613 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2611 | { { {60, 1}, {60, 0}, {60, 0}, {60, 1} } }, | 2614 | { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } }, |
2612 | 2615 | ||
2613 | { { {60, 1}, {60, 0}, {0, 0}, {0, 0} } }, | 2616 | { { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } }, |
2614 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2617 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2615 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2618 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2616 | 2619 | ||
2617 | { { {60, 0}, {60, 1}, {60, 1}, {60, 0} } }, | 2620 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0) } }, |
2618 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2621 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2619 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2622 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2620 | 2623 | ||
2621 | { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } }, | 2624 | { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, |
2622 | { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } }, | 2625 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } }, |
2623 | { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } }, | 2626 | { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } }, |
2624 | }, | 2627 | }, |
2625 | .modalHeader5G = { | 2628 | .modalHeader5G = { |
2626 | /* 4 idle,t1,t2,b (4 bits per setting) */ | 2629 | /* 4 idle,t1,t2,b (4 bits per setting) */ |
@@ -2892,56 +2895,56 @@ static const struct ar9300_eeprom ar9300_h116 = { | |||
2892 | .ctlPowerData_5G = { | 2895 | .ctlPowerData_5G = { |
2893 | { | 2896 | { |
2894 | { | 2897 | { |
2895 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2898 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2896 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 2899 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
2897 | } | 2900 | } |
2898 | }, | 2901 | }, |
2899 | { | 2902 | { |
2900 | { | 2903 | { |
2901 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2904 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2902 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 2905 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
2903 | } | 2906 | } |
2904 | }, | 2907 | }, |
2905 | { | 2908 | { |
2906 | { | 2909 | { |
2907 | {60, 0}, {60, 1}, {60, 0}, {60, 1}, | 2910 | CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
2908 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2911 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2909 | } | 2912 | } |
2910 | }, | 2913 | }, |
2911 | { | 2914 | { |
2912 | { | 2915 | { |
2913 | {60, 0}, {60, 1}, {60, 1}, {60, 0}, | 2916 | CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
2914 | {60, 1}, {60, 0}, {60, 0}, {60, 0}, | 2917 | CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
2915 | } | 2918 | } |
2916 | }, | 2919 | }, |
2917 | { | 2920 | { |
2918 | { | 2921 | { |
2919 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 2922 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
2920 | {60, 0}, {60, 0}, {60, 0}, {60, 0}, | 2923 | CTL(60, 0), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
2921 | } | 2924 | } |
2922 | }, | 2925 | }, |
2923 | { | 2926 | { |
2924 | { | 2927 | { |
2925 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2928 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2926 | {60, 1}, {60, 0}, {60, 0}, {60, 0}, | 2929 | CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0), |
2927 | } | 2930 | } |
2928 | }, | 2931 | }, |
2929 | { | 2932 | { |
2930 | { | 2933 | { |
2931 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2934 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2932 | {60, 1}, {60, 1}, {60, 1}, {60, 1}, | 2935 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1), |
2933 | } | 2936 | } |
2934 | }, | 2937 | }, |
2935 | { | 2938 | { |
2936 | { | 2939 | { |
2937 | {60, 1}, {60, 1}, {60, 0}, {60, 1}, | 2940 | CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
2938 | {60, 1}, {60, 1}, {60, 1}, {60, 0}, | 2941 | CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0), |
2939 | } | 2942 | } |
2940 | }, | 2943 | }, |
2941 | { | 2944 | { |
2942 | { | 2945 | { |
2943 | {60, 1}, {60, 0}, {60, 1}, {60, 1}, | 2946 | CTL(60, 1), CTL(60, 0), CTL(60, 1), CTL(60, 1), |
2944 | {60, 1}, {60, 1}, {60, 0}, {60, 1}, | 2947 | CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1), |
2945 | } | 2948 | } |
2946 | }, | 2949 | }, |
2947 | } | 2950 | } |
@@ -4365,9 +4368,9 @@ static u16 ar9003_hw_get_direct_edge_power(struct ar9300_eeprom *eep, | |||
4365 | struct cal_ctl_data_5g *ctl_5g = eep->ctlPowerData_5G; | 4368 | struct cal_ctl_data_5g *ctl_5g = eep->ctlPowerData_5G; |
4366 | 4369 | ||
4367 | if (is2GHz) | 4370 | if (is2GHz) |
4368 | return ctl_2g[idx].ctlEdges[edge].tPower; | 4371 | return CTL_EDGE_TPOWER(ctl_2g[idx].ctlEdges[edge]); |
4369 | else | 4372 | else |
4370 | return ctl_5g[idx].ctlEdges[edge].tPower; | 4373 | return CTL_EDGE_TPOWER(ctl_5g[idx].ctlEdges[edge]); |
4371 | } | 4374 | } |
4372 | 4375 | ||
4373 | static u16 ar9003_hw_get_indirect_edge_power(struct ar9300_eeprom *eep, | 4376 | static u16 ar9003_hw_get_indirect_edge_power(struct ar9300_eeprom *eep, |
@@ -4385,12 +4388,12 @@ static u16 ar9003_hw_get_indirect_edge_power(struct ar9300_eeprom *eep, | |||
4385 | 4388 | ||
4386 | if (is2GHz) { | 4389 | if (is2GHz) { |
4387 | if (ath9k_hw_fbin2freq(ctl_freqbin[edge - 1], 1) < freq && | 4390 | if (ath9k_hw_fbin2freq(ctl_freqbin[edge - 1], 1) < freq && |
4388 | ctl_2g[idx].ctlEdges[edge - 1].flag) | 4391 | CTL_EDGE_FLAGS(ctl_2g[idx].ctlEdges[edge - 1])) |
4389 | return ctl_2g[idx].ctlEdges[edge - 1].tPower; | 4392 | return CTL_EDGE_TPOWER(ctl_2g[idx].ctlEdges[edge - 1]); |
4390 | } else { | 4393 | } else { |
4391 | if (ath9k_hw_fbin2freq(ctl_freqbin[edge - 1], 0) < freq && | 4394 | if (ath9k_hw_fbin2freq(ctl_freqbin[edge - 1], 0) < freq && |
4392 | ctl_5g[idx].ctlEdges[edge - 1].flag) | 4395 | CTL_EDGE_FLAGS(ctl_5g[idx].ctlEdges[edge - 1])) |
4393 | return ctl_5g[idx].ctlEdges[edge - 1].tPower; | 4396 | return CTL_EDGE_TPOWER(ctl_5g[idx].ctlEdges[edge - 1]); |
4394 | } | 4397 | } |
4395 | 4398 | ||
4396 | return AR9300_MAX_RATE_POWER; | 4399 | return AR9300_MAX_RATE_POWER; |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h index 57f64dbbcd89..9c1463307f0c 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | |||
@@ -270,17 +270,12 @@ struct cal_tgt_pow_ht { | |||
270 | u8 tPow2x[14]; | 270 | u8 tPow2x[14]; |
271 | } __packed; | 271 | } __packed; |
272 | 272 | ||
273 | struct cal_ctl_edge_pwr { | ||
274 | u8 tPower:6, | ||
275 | flag:2; | ||
276 | } __packed; | ||
277 | |||
278 | struct cal_ctl_data_2g { | 273 | struct cal_ctl_data_2g { |
279 | struct cal_ctl_edge_pwr ctlEdges[AR9300_NUM_BAND_EDGES_2G]; | 274 | u8 ctlEdges[AR9300_NUM_BAND_EDGES_2G]; |
280 | } __packed; | 275 | } __packed; |
281 | 276 | ||
282 | struct cal_ctl_data_5g { | 277 | struct cal_ctl_data_5g { |
283 | struct cal_ctl_edge_pwr ctlEdges[AR9300_NUM_BAND_EDGES_5G]; | 278 | u8 ctlEdges[AR9300_NUM_BAND_EDGES_5G]; |
284 | } __packed; | 279 | } __packed; |
285 | 280 | ||
286 | struct ar9300_BaseExtension_1 { | 281 | struct ar9300_BaseExtension_1 { |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index efba413561a4..4210a9306955 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/leds.h> | 22 | #include <linux/leds.h> |
23 | #include <linux/completion.h> | 23 | #include <linux/completion.h> |
24 | #include <linux/pm_qos_params.h> | ||
24 | 25 | ||
25 | #include "debug.h" | 26 | #include "debug.h" |
26 | #include "common.h" | 27 | #include "common.h" |
@@ -629,6 +630,8 @@ struct ath_softc { | |||
629 | struct ath_descdma txsdma; | 630 | struct ath_descdma txsdma; |
630 | 631 | ||
631 | struct ath_ant_comb ant_comb; | 632 | struct ath_ant_comb ant_comb; |
633 | |||
634 | struct pm_qos_request_list pm_qos_req; | ||
632 | }; | 635 | }; |
633 | 636 | ||
634 | struct ath_wiphy { | 637 | struct ath_wiphy { |
@@ -658,7 +661,6 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz) | |||
658 | } | 661 | } |
659 | 662 | ||
660 | extern struct ieee80211_ops ath9k_ops; | 663 | extern struct ieee80211_ops ath9k_ops; |
661 | extern struct pm_qos_request_list ath9k_pm_qos_req; | ||
662 | extern int modparam_nohwcrypt; | 664 | extern int modparam_nohwcrypt; |
663 | extern int led_blink; | 665 | extern int led_blink; |
664 | 666 | ||
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c index 1266333f586d..2bbf94d0191e 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.c +++ b/drivers/net/wireless/ath/ath9k/eeprom.c | |||
@@ -240,16 +240,16 @@ u16 ath9k_hw_get_max_edge_power(u16 freq, struct cal_ctl_edges *pRdEdgesPower, | |||
240 | for (i = 0; (i < num_band_edges) && | 240 | for (i = 0; (i < num_band_edges) && |
241 | (pRdEdgesPower[i].bChannel != AR5416_BCHAN_UNUSED); i++) { | 241 | (pRdEdgesPower[i].bChannel != AR5416_BCHAN_UNUSED); i++) { |
242 | if (freq == ath9k_hw_fbin2freq(pRdEdgesPower[i].bChannel, is2GHz)) { | 242 | if (freq == ath9k_hw_fbin2freq(pRdEdgesPower[i].bChannel, is2GHz)) { |
243 | twiceMaxEdgePower = pRdEdgesPower[i].tPower; | 243 | twiceMaxEdgePower = CTL_EDGE_TPOWER(pRdEdgesPower[i].ctl); |
244 | break; | 244 | break; |
245 | } else if ((i > 0) && | 245 | } else if ((i > 0) && |
246 | (freq < ath9k_hw_fbin2freq(pRdEdgesPower[i].bChannel, | 246 | (freq < ath9k_hw_fbin2freq(pRdEdgesPower[i].bChannel, |
247 | is2GHz))) { | 247 | is2GHz))) { |
248 | if (ath9k_hw_fbin2freq(pRdEdgesPower[i - 1].bChannel, | 248 | if (ath9k_hw_fbin2freq(pRdEdgesPower[i - 1].bChannel, |
249 | is2GHz) < freq && | 249 | is2GHz) < freq && |
250 | pRdEdgesPower[i - 1].flag) { | 250 | CTL_EDGE_FLAGS(pRdEdgesPower[i - 1].ctl)) { |
251 | twiceMaxEdgePower = | 251 | twiceMaxEdgePower = |
252 | pRdEdgesPower[i - 1].tPower; | 252 | CTL_EDGE_TPOWER(pRdEdgesPower[i - 1].ctl); |
253 | } | 253 | } |
254 | break; | 254 | break; |
255 | } | 255 | } |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h index 7755fb996caa..8b9885b5243f 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.h +++ b/drivers/net/wireless/ath/ath9k/eeprom.h | |||
@@ -233,6 +233,18 @@ | |||
233 | 233 | ||
234 | #define AR9287_CHECKSUM_LOCATION (AR9287_EEP_START_LOC + 1) | 234 | #define AR9287_CHECKSUM_LOCATION (AR9287_EEP_START_LOC + 1) |
235 | 235 | ||
236 | #define CTL_EDGE_TPOWER(_ctl) ((_ctl) & 0x3f) | ||
237 | #define CTL_EDGE_FLAGS(_ctl) (((_ctl) >> 6) & 0x03) | ||
238 | |||
239 | #define LNA_CTL_BUF_MODE BIT(0) | ||
240 | #define LNA_CTL_ISEL_LO BIT(1) | ||
241 | #define LNA_CTL_ISEL_HI BIT(2) | ||
242 | #define LNA_CTL_BUF_IN BIT(3) | ||
243 | #define LNA_CTL_FEM_BAND BIT(4) | ||
244 | #define LNA_CTL_LOCAL_BIAS BIT(5) | ||
245 | #define LNA_CTL_FORCE_XPA BIT(6) | ||
246 | #define LNA_CTL_USE_ANT1 BIT(7) | ||
247 | |||
236 | enum eeprom_param { | 248 | enum eeprom_param { |
237 | EEP_NFTHRESH_5, | 249 | EEP_NFTHRESH_5, |
238 | EEP_NFTHRESH_2, | 250 | EEP_NFTHRESH_2, |
@@ -379,10 +391,7 @@ struct modal_eep_header { | |||
379 | u8 xatten2Margin[AR5416_MAX_CHAINS]; | 391 | u8 xatten2Margin[AR5416_MAX_CHAINS]; |
380 | u8 ob_ch1; | 392 | u8 ob_ch1; |
381 | u8 db_ch1; | 393 | u8 db_ch1; |
382 | u8 useAnt1:1, | 394 | u8 lna_ctl; |
383 | force_xpaon:1, | ||
384 | local_bias:1, | ||
385 | femBandSelectUsed:1, xlnabufin:1, xlnaisel:2, xlnabufmode:1; | ||
386 | u8 miscBits; | 395 | u8 miscBits; |
387 | u16 xpaBiasLvlFreq[3]; | 396 | u16 xpaBiasLvlFreq[3]; |
388 | u8 futureModal[6]; | 397 | u8 futureModal[6]; |
@@ -536,18 +545,10 @@ struct cal_target_power_ht { | |||
536 | u8 tPow2x[8]; | 545 | u8 tPow2x[8]; |
537 | } __packed; | 546 | } __packed; |
538 | 547 | ||
539 | |||
540 | #ifdef __BIG_ENDIAN_BITFIELD | ||
541 | struct cal_ctl_edges { | ||
542 | u8 bChannel; | ||
543 | u8 flag:2, tPower:6; | ||
544 | } __packed; | ||
545 | #else | ||
546 | struct cal_ctl_edges { | 548 | struct cal_ctl_edges { |
547 | u8 bChannel; | 549 | u8 bChannel; |
548 | u8 tPower:6, flag:2; | 550 | u8 ctl; |
549 | } __packed; | 551 | } __packed; |
550 | #endif | ||
551 | 552 | ||
552 | struct cal_data_op_loop_ar9287 { | 553 | struct cal_data_op_loop_ar9287 { |
553 | u8 pwrPdg[2][5]; | 554 | u8 pwrPdg[2][5]; |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index e94216e1e107..45f70b2404a1 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c | |||
@@ -451,9 +451,10 @@ static void ath9k_hw_def_set_board_values(struct ath_hw *ah, | |||
451 | ath9k_hw_analog_shift_rmw(ah, AR_AN_TOP2, | 451 | ath9k_hw_analog_shift_rmw(ah, AR_AN_TOP2, |
452 | AR_AN_TOP2_LOCALBIAS, | 452 | AR_AN_TOP2_LOCALBIAS, |
453 | AR_AN_TOP2_LOCALBIAS_S, | 453 | AR_AN_TOP2_LOCALBIAS_S, |
454 | pModal->local_bias); | 454 | !!(pModal->lna_ctl & |
455 | LNA_CTL_LOCAL_BIAS)); | ||
455 | REG_RMW_FIELD(ah, AR_PHY_XPA_CFG, AR_PHY_FORCE_XPA_CFG, | 456 | REG_RMW_FIELD(ah, AR_PHY_XPA_CFG, AR_PHY_FORCE_XPA_CFG, |
456 | pModal->force_xpaon); | 457 | !!(pModal->lna_ctl & LNA_CTL_FORCE_XPA)); |
457 | } | 458 | } |
458 | 459 | ||
459 | REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, | 460 | REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, |
@@ -1435,9 +1436,9 @@ static u8 ath9k_hw_def_get_num_ant_config(struct ath_hw *ah, | |||
1435 | 1436 | ||
1436 | num_ant_config = 1; | 1437 | num_ant_config = 1; |
1437 | 1438 | ||
1438 | if (pBase->version >= 0x0E0D) | 1439 | if (pBase->version >= 0x0E0D && |
1439 | if (pModal->useAnt1) | 1440 | (pModal->lna_ctl & LNA_CTL_USE_ANT1)) |
1440 | num_ant_config += 1; | 1441 | num_ant_config += 1; |
1441 | 1442 | ||
1442 | return num_ant_config; | 1443 | return num_ant_config; |
1443 | } | 1444 | } |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index b4396a9578e5..9b1ee7fc05c1 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -2051,7 +2051,8 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah, u32 gpio) | |||
2051 | val = REG_READ(ah, AR7010_GPIO_IN); | 2051 | val = REG_READ(ah, AR7010_GPIO_IN); |
2052 | return (MS(val, AR7010_GPIO_IN_VAL) & AR_GPIO_BIT(gpio)) == 0; | 2052 | return (MS(val, AR7010_GPIO_IN_VAL) & AR_GPIO_BIT(gpio)) == 0; |
2053 | } else if (AR_SREV_9300_20_OR_LATER(ah)) | 2053 | } else if (AR_SREV_9300_20_OR_LATER(ah)) |
2054 | return MS_REG_READ(AR9300, gpio) != 0; | 2054 | return (MS(REG_READ(ah, AR_GPIO_IN), AR9300_GPIO_IN_VAL) & |
2055 | AR_GPIO_BIT(gpio)) != 0; | ||
2055 | else if (AR_SREV_9271(ah)) | 2056 | else if (AR_SREV_9271(ah)) |
2056 | return MS_REG_READ(AR9271, gpio) != 0; | 2057 | return MS_REG_READ(AR9271, gpio) != 0; |
2057 | else if (AR_SREV_9287_11_OR_LATER(ah)) | 2058 | else if (AR_SREV_9287_11_OR_LATER(ah)) |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index ef39a4551bd5..918308a28410 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -15,7 +15,6 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/pm_qos_params.h> | ||
19 | 18 | ||
20 | #include "ath9k.h" | 19 | #include "ath9k.h" |
21 | 20 | ||
@@ -184,8 +183,6 @@ static const struct ath_ops ath9k_common_ops = { | |||
184 | .write = ath9k_iowrite32, | 183 | .write = ath9k_iowrite32, |
185 | }; | 184 | }; |
186 | 185 | ||
187 | struct pm_qos_request_list ath9k_pm_qos_req; | ||
188 | |||
189 | /**************************/ | 186 | /**************************/ |
190 | /* Initialization */ | 187 | /* Initialization */ |
191 | /**************************/ | 188 | /**************************/ |
@@ -653,6 +650,8 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
653 | hw->flags |= IEEE80211_HW_MFP_CAPABLE; | 650 | hw->flags |= IEEE80211_HW_MFP_CAPABLE; |
654 | 651 | ||
655 | hw->wiphy->interface_modes = | 652 | hw->wiphy->interface_modes = |
653 | BIT(NL80211_IFTYPE_P2P_GO) | | ||
654 | BIT(NL80211_IFTYPE_P2P_CLIENT) | | ||
656 | BIT(NL80211_IFTYPE_AP) | | 655 | BIT(NL80211_IFTYPE_AP) | |
657 | BIT(NL80211_IFTYPE_WDS) | | 656 | BIT(NL80211_IFTYPE_WDS) | |
658 | BIT(NL80211_IFTYPE_STATION) | | 657 | BIT(NL80211_IFTYPE_STATION) | |
@@ -759,7 +758,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, | |||
759 | ath_init_leds(sc); | 758 | ath_init_leds(sc); |
760 | ath_start_rfkill_poll(sc); | 759 | ath_start_rfkill_poll(sc); |
761 | 760 | ||
762 | pm_qos_add_request(&ath9k_pm_qos_req, PM_QOS_CPU_DMA_LATENCY, | 761 | pm_qos_add_request(&sc->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, |
763 | PM_QOS_DEFAULT_VALUE); | 762 | PM_QOS_DEFAULT_VALUE); |
764 | 763 | ||
765 | return 0; | 764 | return 0; |
@@ -829,7 +828,7 @@ void ath9k_deinit_device(struct ath_softc *sc) | |||
829 | } | 828 | } |
830 | 829 | ||
831 | ieee80211_unregister_hw(hw); | 830 | ieee80211_unregister_hw(hw); |
832 | pm_qos_remove_request(&ath9k_pm_qos_req); | 831 | pm_qos_remove_request(&sc->pm_qos_req); |
833 | ath_rx_cleanup(sc); | 832 | ath_rx_cleanup(sc); |
834 | ath_tx_cleanup(sc); | 833 | ath_tx_cleanup(sc); |
835 | ath9k_deinit_softc(sc); | 834 | ath9k_deinit_softc(sc); |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index df1bfcfeb734..f026a031713b 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -15,7 +15,6 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/nl80211.h> | 17 | #include <linux/nl80211.h> |
18 | #include <linux/pm_qos_params.h> | ||
19 | #include "ath9k.h" | 18 | #include "ath9k.h" |
20 | #include "btcoex.h" | 19 | #include "btcoex.h" |
21 | 20 | ||
@@ -1187,7 +1186,7 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1187 | ath9k_btcoex_timer_resume(sc); | 1186 | ath9k_btcoex_timer_resume(sc); |
1188 | } | 1187 | } |
1189 | 1188 | ||
1190 | pm_qos_update_request(&ath9k_pm_qos_req, 55); | 1189 | pm_qos_update_request(&sc->pm_qos_req, 55); |
1191 | 1190 | ||
1192 | mutex_unlock: | 1191 | mutex_unlock: |
1193 | mutex_unlock(&sc->mutex); | 1192 | mutex_unlock(&sc->mutex); |
@@ -1342,7 +1341,7 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
1342 | 1341 | ||
1343 | sc->sc_flags |= SC_OP_INVALID; | 1342 | sc->sc_flags |= SC_OP_INVALID; |
1344 | 1343 | ||
1345 | pm_qos_update_request(&ath9k_pm_qos_req, PM_QOS_DEFAULT_VALUE); | 1344 | pm_qos_update_request(&sc->pm_qos_req, PM_QOS_DEFAULT_VALUE); |
1346 | 1345 | ||
1347 | mutex_unlock(&sc->mutex); | 1346 | mutex_unlock(&sc->mutex); |
1348 | 1347 | ||
@@ -1439,6 +1438,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
1439 | struct ath_softc *sc = aphy->sc; | 1438 | struct ath_softc *sc = aphy->sc; |
1440 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 1439 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
1441 | struct ath_vif *avp = (void *)vif->drv_priv; | 1440 | struct ath_vif *avp = (void *)vif->drv_priv; |
1441 | bool bs_valid = false; | ||
1442 | int i; | 1442 | int i; |
1443 | 1443 | ||
1444 | ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n"); | 1444 | ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n"); |
@@ -1467,7 +1467,15 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
1467 | "slot\n", __func__); | 1467 | "slot\n", __func__); |
1468 | sc->beacon.bslot[i] = NULL; | 1468 | sc->beacon.bslot[i] = NULL; |
1469 | sc->beacon.bslot_aphy[i] = NULL; | 1469 | sc->beacon.bslot_aphy[i] = NULL; |
1470 | } | 1470 | } else if (sc->beacon.bslot[i]) |
1471 | bs_valid = true; | ||
1472 | } | ||
1473 | if (!bs_valid && (sc->sc_ah->imask & ATH9K_INT_SWBA)) { | ||
1474 | /* Disable SWBA interrupt */ | ||
1475 | sc->sc_ah->imask &= ~ATH9K_INT_SWBA; | ||
1476 | ath9k_ps_wakeup(sc); | ||
1477 | ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_ah->imask); | ||
1478 | ath9k_ps_restore(sc); | ||
1471 | } | 1479 | } |
1472 | 1480 | ||
1473 | sc->nvifs--; | 1481 | sc->nvifs--; |
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h index a597cc8d8644..c2472edab5e0 100644 --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h | |||
@@ -976,11 +976,13 @@ enum { | |||
976 | #define AR9287_GPIO_IN_VAL_S 11 | 976 | #define AR9287_GPIO_IN_VAL_S 11 |
977 | #define AR9271_GPIO_IN_VAL 0xFFFF0000 | 977 | #define AR9271_GPIO_IN_VAL 0xFFFF0000 |
978 | #define AR9271_GPIO_IN_VAL_S 16 | 978 | #define AR9271_GPIO_IN_VAL_S 16 |
979 | #define AR9300_GPIO_IN_VAL 0x0001FFFF | ||
980 | #define AR9300_GPIO_IN_VAL_S 0 | ||
981 | #define AR7010_GPIO_IN_VAL 0x0000FFFF | 979 | #define AR7010_GPIO_IN_VAL 0x0000FFFF |
982 | #define AR7010_GPIO_IN_VAL_S 0 | 980 | #define AR7010_GPIO_IN_VAL_S 0 |
983 | 981 | ||
982 | #define AR_GPIO_IN 0x404c | ||
983 | #define AR9300_GPIO_IN_VAL 0x0001FFFF | ||
984 | #define AR9300_GPIO_IN_VAL_S 0 | ||
985 | |||
984 | #define AR_GPIO_OE_OUT (AR_SREV_9300_20_OR_LATER(ah) ? 0x4050 : 0x404c) | 986 | #define AR_GPIO_OE_OUT (AR_SREV_9300_20_OR_LATER(ah) ? 0x4050 : 0x404c) |
985 | #define AR_GPIO_OE_OUT_DRV 0x3 | 987 | #define AR_GPIO_OE_OUT_DRV 0x3 |
986 | #define AR_GPIO_OE_OUT_DRV_NO 0x0 | 988 | #define AR_GPIO_OE_OUT_DRV_NO 0x0 |
diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c index ae6c006bbc56..546b4e4ec5ea 100644 --- a/drivers/net/wireless/ath/carl9170/fw.c +++ b/drivers/net/wireless/ath/carl9170/fw.c | |||
@@ -291,7 +291,8 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len) | |||
291 | 291 | ||
292 | if (SUPP(CARL9170FW_WLANTX_CAB)) { | 292 | if (SUPP(CARL9170FW_WLANTX_CAB)) { |
293 | ar->hw->wiphy->interface_modes |= | 293 | ar->hw->wiphy->interface_modes |= |
294 | BIT(NL80211_IFTYPE_AP); | 294 | BIT(NL80211_IFTYPE_AP) | |
295 | BIT(NL80211_IFTYPE_P2P_GO); | ||
295 | } | 296 | } |
296 | } | 297 | } |
297 | 298 | ||
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c index 511dbe3caf58..870df8c42622 100644 --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c | |||
@@ -1648,7 +1648,8 @@ void *carl9170_alloc(size_t priv_size) | |||
1648 | * supports these modes. The code which will add the | 1648 | * supports these modes. The code which will add the |
1649 | * additional interface_modes is in fw.c. | 1649 | * additional interface_modes is in fw.c. |
1650 | */ | 1650 | */ |
1651 | hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); | 1651 | hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | |
1652 | BIT(NL80211_IFTYPE_P2P_CLIENT); | ||
1652 | 1653 | ||
1653 | hw->flags |= IEEE80211_HW_RX_INCLUDES_FCS | | 1654 | hw->flags |= IEEE80211_HW_RX_INCLUDES_FCS | |
1654 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | | 1655 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | |
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c index aee5c9d89a14..6cc58e052d10 100644 --- a/drivers/net/wireless/ath/carl9170/tx.c +++ b/drivers/net/wireless/ath/carl9170/tx.c | |||
@@ -867,7 +867,7 @@ static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb) | |||
867 | 867 | ||
868 | mac_tmp = cpu_to_le16(AR9170_TX_MAC_HW_DURATION | | 868 | mac_tmp = cpu_to_le16(AR9170_TX_MAC_HW_DURATION | |
869 | AR9170_TX_MAC_BACKOFF); | 869 | AR9170_TX_MAC_BACKOFF); |
870 | mac_tmp |= cpu_to_le16((hw_queue << AR9170_TX_MAC_QOS_S) && | 870 | mac_tmp |= cpu_to_le16((hw_queue << AR9170_TX_MAC_QOS_S) & |
871 | AR9170_TX_MAC_QOS); | 871 | AR9170_TX_MAC_QOS); |
872 | 872 | ||
873 | no_ack = !!(info->flags & IEEE80211_TX_CTL_NO_ACK); | 873 | no_ack = !!(info->flags & IEEE80211_TX_CTL_NO_ACK); |
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index e5685dc317a8..b4de0ca10feb 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c | |||
@@ -1170,7 +1170,6 @@ static void if_sdio_remove(struct sdio_func *func) | |||
1170 | lbs_deb_sdio("call remove card\n"); | 1170 | lbs_deb_sdio("call remove card\n"); |
1171 | lbs_stop_card(card->priv); | 1171 | lbs_stop_card(card->priv); |
1172 | lbs_remove_card(card->priv); | 1172 | lbs_remove_card(card->priv); |
1173 | card->priv->surpriseremoved = 1; | ||
1174 | 1173 | ||
1175 | flush_workqueue(card->workqueue); | 1174 | flush_workqueue(card->workqueue); |
1176 | destroy_workqueue(card->workqueue); | 1175 | destroy_workqueue(card->workqueue); |
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c index 79bcb4e5d2ca..ecd4d04b2c3c 100644 --- a/drivers/net/wireless/libertas/if_spi.c +++ b/drivers/net/wireless/libertas/if_spi.c | |||
@@ -1055,7 +1055,6 @@ static int __devexit libertas_spi_remove(struct spi_device *spi) | |||
1055 | lbs_stop_card(priv); | 1055 | lbs_stop_card(priv); |
1056 | lbs_remove_card(priv); /* will call free_netdev */ | 1056 | lbs_remove_card(priv); /* will call free_netdev */ |
1057 | 1057 | ||
1058 | priv->surpriseremoved = 1; | ||
1059 | free_irq(spi->irq, card); | 1058 | free_irq(spi->irq, card); |
1060 | if_spi_terminate_spi_thread(card); | 1059 | if_spi_terminate_spi_thread(card); |
1061 | if (card->pdata->teardown) | 1060 | if (card->pdata->teardown) |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 143473c59393..6836a6dd9853 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -916,8 +916,6 @@ void lbs_remove_card(struct lbs_private *priv) | |||
916 | 916 | ||
917 | lbs_free_adapter(priv); | 917 | lbs_free_adapter(priv); |
918 | lbs_cfg_free(priv); | 918 | lbs_cfg_free(priv); |
919 | |||
920 | priv->dev = NULL; | ||
921 | free_netdev(dev); | 919 | free_netdev(dev); |
922 | 920 | ||
923 | lbs_deb_leave(LBS_DEB_MAIN); | 921 | lbs_deb_leave(LBS_DEB_MAIN); |
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index e8e2d0f4763d..fa0cf744958f 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
@@ -1392,10 +1392,9 @@ static void orinoco_process_scan_results(struct work_struct *work) | |||
1392 | orinoco_add_hostscan_results(priv, buf, len); | 1392 | orinoco_add_hostscan_results(priv, buf, len); |
1393 | 1393 | ||
1394 | kfree(buf); | 1394 | kfree(buf); |
1395 | } else if (priv->scan_request) { | 1395 | } else { |
1396 | /* Either abort or complete the scan */ | 1396 | /* Either abort or complete the scan */ |
1397 | cfg80211_scan_done(priv->scan_request, (len < 0)); | 1397 | orinoco_scan_done(priv, (len < 0)); |
1398 | priv->scan_request = NULL; | ||
1399 | } | 1398 | } |
1400 | 1399 | ||
1401 | spin_lock_irqsave(&priv->scan_lock, flags); | 1400 | spin_lock_irqsave(&priv->scan_lock, flags); |
@@ -1684,6 +1683,8 @@ static int __orinoco_down(struct orinoco_private *priv) | |||
1684 | hermes_write_regn(hw, EVACK, 0xffff); | 1683 | hermes_write_regn(hw, EVACK, 0xffff); |
1685 | } | 1684 | } |
1686 | 1685 | ||
1686 | orinoco_scan_done(priv, true); | ||
1687 | |||
1687 | /* firmware will have to reassociate */ | 1688 | /* firmware will have to reassociate */ |
1688 | netif_carrier_off(dev); | 1689 | netif_carrier_off(dev); |
1689 | priv->last_linkstatus = 0xffff; | 1690 | priv->last_linkstatus = 0xffff; |
@@ -1762,10 +1763,7 @@ void orinoco_reset(struct work_struct *work) | |||
1762 | orinoco_unlock(priv, &flags); | 1763 | orinoco_unlock(priv, &flags); |
1763 | 1764 | ||
1764 | /* Scanning support: Notify scan cancellation */ | 1765 | /* Scanning support: Notify scan cancellation */ |
1765 | if (priv->scan_request) { | 1766 | orinoco_scan_done(priv, true); |
1766 | cfg80211_scan_done(priv->scan_request, 1); | ||
1767 | priv->scan_request = NULL; | ||
1768 | } | ||
1769 | 1767 | ||
1770 | if (priv->hard_reset) { | 1768 | if (priv->hard_reset) { |
1771 | err = (*priv->hard_reset)(priv); | 1769 | err = (*priv->hard_reset)(priv); |
diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c index 4300d9db7d8c..86cb54c842e7 100644 --- a/drivers/net/wireless/orinoco/scan.c +++ b/drivers/net/wireless/orinoco/scan.c | |||
@@ -229,3 +229,11 @@ void orinoco_add_hostscan_results(struct orinoco_private *priv, | |||
229 | priv->scan_request = NULL; | 229 | priv->scan_request = NULL; |
230 | } | 230 | } |
231 | } | 231 | } |
232 | |||
233 | void orinoco_scan_done(struct orinoco_private *priv, bool abort) | ||
234 | { | ||
235 | if (priv->scan_request) { | ||
236 | cfg80211_scan_done(priv->scan_request, abort); | ||
237 | priv->scan_request = NULL; | ||
238 | } | ||
239 | } | ||
diff --git a/drivers/net/wireless/orinoco/scan.h b/drivers/net/wireless/orinoco/scan.h index 2dc4e046dbdb..27281fb0a6dc 100644 --- a/drivers/net/wireless/orinoco/scan.h +++ b/drivers/net/wireless/orinoco/scan.h | |||
@@ -16,5 +16,6 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, | |||
16 | void orinoco_add_hostscan_results(struct orinoco_private *dev, | 16 | void orinoco_add_hostscan_results(struct orinoco_private *dev, |
17 | unsigned char *buf, | 17 | unsigned char *buf, |
18 | size_t len); | 18 | size_t len); |
19 | void orinoco_scan_done(struct orinoco_private *priv, bool abort); | ||
19 | 20 | ||
20 | #endif /* _ORINOCO_SCAN_H_ */ | 21 | #endif /* _ORINOCO_SCAN_H_ */ |