diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-06 17:31:35 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-06 17:32:03 -0500 |
commit | 4ec3eb13634529c0bc7466658d84d0bbe3244aea (patch) | |
tree | b491daac2ccfc7b8ca88e171a43f66888463568a /drivers/net/wireless/ath | |
parent | 24056f525051a9e186af28904b396320e18bf9a0 (diff) | |
parent | 15095bb0fe779c0403091bda7adce5fb3bb9ca35 (diff) |
Merge branch 'smp' into misc
Conflicts:
arch/arm/kernel/entry-armv.S
arch/arm/mm/ioremap.c
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_hw.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_9287.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 40 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_init.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 29 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/reg.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/usb.c | 8 |
14 files changed, 91 insertions, 36 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index a0471f2e1c7a..48261b7252d0 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c | |||
@@ -410,6 +410,9 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah, | |||
410 | val &= ~(AR_WA_BIT6 | AR_WA_BIT7); | 410 | val &= ~(AR_WA_BIT6 | AR_WA_BIT7); |
411 | } | 411 | } |
412 | 412 | ||
413 | if (AR_SREV_9280(ah)) | ||
414 | val |= AR_WA_BIT22; | ||
415 | |||
413 | if (AR_SREV_9285E_20(ah)) | 416 | if (AR_SREV_9285E_20(ah)) |
414 | val |= AR_WA_BIT23; | 417 | val |= AR_WA_BIT23; |
415 | 418 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 9b8e7e3fcebd..170d44a35ccb 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -675,6 +675,7 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz) | |||
675 | } | 675 | } |
676 | 676 | ||
677 | extern struct ieee80211_ops ath9k_ops; | 677 | extern struct ieee80211_ops ath9k_ops; |
678 | extern struct pm_qos_request_list ath9k_pm_qos_req; | ||
678 | extern int modparam_nohwcrypt; | 679 | extern int modparam_nohwcrypt; |
679 | extern int led_blink; | 680 | extern int led_blink; |
680 | 681 | ||
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index 966b9496a9dd..195406db3bd8 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c | |||
@@ -37,7 +37,7 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) | |||
37 | int addr, eep_start_loc; | 37 | int addr, eep_start_loc; |
38 | eep_data = (u16 *)eep; | 38 | eep_data = (u16 *)eep; |
39 | 39 | ||
40 | if (ah->hw_version.devid == 0x7015) | 40 | if (AR9287_HTC_DEVID(ah)) |
41 | eep_start_loc = AR9287_HTC_EEP_START_LOC; | 41 | eep_start_loc = AR9287_HTC_EEP_START_LOC; |
42 | else | 42 | else |
43 | eep_start_loc = AR9287_EEP_START_LOC; | 43 | eep_start_loc = AR9287_EEP_START_LOC; |
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 6576f683dba0..dfb6560dab92 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
@@ -35,8 +35,14 @@ static struct usb_device_id ath9k_hif_usb_ids[] = { | |||
35 | { USB_DEVICE(0x07D1, 0x3A10) }, /* Dlink Wireless 150 */ | 35 | { USB_DEVICE(0x07D1, 0x3A10) }, /* Dlink Wireless 150 */ |
36 | { USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */ | 36 | { USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */ |
37 | { USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */ | 37 | { USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */ |
38 | { USB_DEVICE(0x13D3, 0x3346) }, /* IMC Networks */ | ||
39 | { USB_DEVICE(0x13D3, 0x3348) }, /* Azurewave */ | ||
40 | { USB_DEVICE(0x13D3, 0x3349) }, /* Azurewave */ | ||
41 | { USB_DEVICE(0x13D3, 0x3350) }, /* Azurewave */ | ||
38 | { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ | 42 | { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ |
39 | { USB_DEVICE(0x083A, 0xA704) }, /* SMC Networks */ | 43 | { USB_DEVICE(0x083A, 0xA704) }, /* SMC Networks */ |
44 | { USB_DEVICE(0x040D, 0x3801) }, /* VIA */ | ||
45 | { USB_DEVICE(0x1668, 0x1200) }, /* Verizon */ | ||
40 | { }, | 46 | { }, |
41 | }; | 47 | }; |
42 | 48 | ||
@@ -540,11 +546,11 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb) | |||
540 | return; | 546 | return; |
541 | } | 547 | } |
542 | 548 | ||
543 | usb_fill_int_urb(urb, hif_dev->udev, | 549 | usb_fill_bulk_urb(urb, hif_dev->udev, |
544 | usb_rcvbulkpipe(hif_dev->udev, | 550 | usb_rcvbulkpipe(hif_dev->udev, |
545 | USB_REG_IN_PIPE), | 551 | USB_REG_IN_PIPE), |
546 | nskb->data, MAX_REG_IN_BUF_SIZE, | 552 | nskb->data, MAX_REG_IN_BUF_SIZE, |
547 | ath9k_hif_usb_reg_in_cb, nskb, 1); | 553 | ath9k_hif_usb_reg_in_cb, nskb); |
548 | 554 | ||
549 | ret = usb_submit_urb(urb, GFP_ATOMIC); | 555 | ret = usb_submit_urb(urb, GFP_ATOMIC); |
550 | if (ret) { | 556 | if (ret) { |
@@ -720,11 +726,11 @@ static int ath9k_hif_usb_alloc_reg_in_urb(struct hif_device_usb *hif_dev) | |||
720 | if (!skb) | 726 | if (!skb) |
721 | goto err; | 727 | goto err; |
722 | 728 | ||
723 | usb_fill_int_urb(hif_dev->reg_in_urb, hif_dev->udev, | 729 | usb_fill_bulk_urb(hif_dev->reg_in_urb, hif_dev->udev, |
724 | usb_rcvbulkpipe(hif_dev->udev, | 730 | usb_rcvbulkpipe(hif_dev->udev, |
725 | USB_REG_IN_PIPE), | 731 | USB_REG_IN_PIPE), |
726 | skb->data, MAX_REG_IN_BUF_SIZE, | 732 | skb->data, MAX_REG_IN_BUF_SIZE, |
727 | ath9k_hif_usb_reg_in_cb, skb, 1); | 733 | ath9k_hif_usb_reg_in_cb, skb); |
728 | 734 | ||
729 | if (usb_submit_urb(hif_dev->reg_in_urb, GFP_KERNEL) != 0) | 735 | if (usb_submit_urb(hif_dev->reg_in_urb, GFP_KERNEL) != 0) |
730 | goto err; | 736 | goto err; |
@@ -805,6 +811,8 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev) | |||
805 | case 0x7010: | 811 | case 0x7010: |
806 | case 0x7015: | 812 | case 0x7015: |
807 | case 0x9018: | 813 | case 0x9018: |
814 | case 0xA704: | ||
815 | case 0x1200: | ||
808 | firm_offset = AR7010_FIRMWARE_TEXT; | 816 | firm_offset = AR7010_FIRMWARE_TEXT; |
809 | break; | 817 | break; |
810 | default: | 818 | default: |
@@ -843,14 +851,6 @@ static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev) | |||
843 | goto err_fw_req; | 851 | goto err_fw_req; |
844 | } | 852 | } |
845 | 853 | ||
846 | /* Alloc URBs */ | ||
847 | ret = ath9k_hif_usb_alloc_urbs(hif_dev); | ||
848 | if (ret) { | ||
849 | dev_err(&hif_dev->udev->dev, | ||
850 | "ath9k_htc: Unable to allocate URBs\n"); | ||
851 | goto err_urb; | ||
852 | } | ||
853 | |||
854 | /* Download firmware */ | 854 | /* Download firmware */ |
855 | ret = ath9k_hif_usb_download_fw(hif_dev); | 855 | ret = ath9k_hif_usb_download_fw(hif_dev); |
856 | if (ret) { | 856 | if (ret) { |
@@ -866,16 +866,22 @@ static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev) | |||
866 | */ | 866 | */ |
867 | for (idx = 0; idx < alt->desc.bNumEndpoints; idx++) { | 867 | for (idx = 0; idx < alt->desc.bNumEndpoints; idx++) { |
868 | endp = &alt->endpoint[idx].desc; | 868 | endp = &alt->endpoint[idx].desc; |
869 | if (((endp->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK) | 869 | if ((endp->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) |
870 | == 0x04) && | 870 | == USB_ENDPOINT_XFER_INT) { |
871 | ((endp->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) | ||
872 | == USB_ENDPOINT_XFER_INT)) { | ||
873 | endp->bmAttributes &= ~USB_ENDPOINT_XFERTYPE_MASK; | 871 | endp->bmAttributes &= ~USB_ENDPOINT_XFERTYPE_MASK; |
874 | endp->bmAttributes |= USB_ENDPOINT_XFER_BULK; | 872 | endp->bmAttributes |= USB_ENDPOINT_XFER_BULK; |
875 | endp->bInterval = 0; | 873 | endp->bInterval = 0; |
876 | } | 874 | } |
877 | } | 875 | } |
878 | 876 | ||
877 | /* Alloc URBs */ | ||
878 | ret = ath9k_hif_usb_alloc_urbs(hif_dev); | ||
879 | if (ret) { | ||
880 | dev_err(&hif_dev->udev->dev, | ||
881 | "ath9k_htc: Unable to allocate URBs\n"); | ||
882 | goto err_urb; | ||
883 | } | ||
884 | |||
879 | return 0; | 885 | return 0; |
880 | 886 | ||
881 | err_fw_download: | 887 | err_fw_download: |
@@ -929,6 +935,8 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface, | |||
929 | case 0x7010: | 935 | case 0x7010: |
930 | case 0x7015: | 936 | case 0x7015: |
931 | case 0x9018: | 937 | case 0x9018: |
938 | case 0xA704: | ||
939 | case 0x1200: | ||
932 | if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202) | 940 | if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202) |
933 | hif_dev->fw_name = FIRMWARE_AR7010_1_1; | 941 | hif_dev->fw_name = FIRMWARE_AR7010_1_1; |
934 | else | 942 | else |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 3d7b97f1b3ae..7c8a38d04561 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
@@ -249,6 +249,8 @@ static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid) | |||
249 | case 0x7010: | 249 | case 0x7010: |
250 | case 0x7015: | 250 | case 0x7015: |
251 | case 0x9018: | 251 | case 0x9018: |
252 | case 0xA704: | ||
253 | case 0x1200: | ||
252 | priv->htc->credits = 45; | 254 | priv->htc->credits = 45; |
253 | break; | 255 | break; |
254 | default: | 256 | default: |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 3d19b5bc937f..29d80ca78393 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -121,7 +121,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) | |||
121 | tx_hdr.data_type = ATH9K_HTC_NORMAL; | 121 | tx_hdr.data_type = ATH9K_HTC_NORMAL; |
122 | } | 122 | } |
123 | 123 | ||
124 | if (ieee80211_is_data(fc)) { | 124 | if (ieee80211_is_data_qos(fc)) { |
125 | qc = ieee80211_get_qos_ctl(hdr); | 125 | qc = ieee80211_get_qos_ctl(hdr); |
126 | tx_hdr.tidno = qc[0] & IEEE80211_QOS_CTL_TID_MASK; | 126 | tx_hdr.tidno = qc[0] & IEEE80211_QOS_CTL_TID_MASK; |
127 | } | 127 | } |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index cc13ee117823..6ebc68bca91f 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -484,6 +484,7 @@ static int ath9k_hw_post_init(struct ath_hw *ah) | |||
484 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 484 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, |
485 | "Failed allocating banks for " | 485 | "Failed allocating banks for " |
486 | "external radio\n"); | 486 | "external radio\n"); |
487 | ath9k_hw_rf_free_ext_banks(ah); | ||
487 | return ecode; | 488 | return ecode; |
488 | } | 489 | } |
489 | 490 | ||
@@ -952,9 +953,12 @@ static void ath9k_hw_set_operating_mode(struct ath_hw *ah, int opmode) | |||
952 | REG_SET_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION); | 953 | REG_SET_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION); |
953 | break; | 954 | break; |
954 | case NL80211_IFTYPE_STATION: | 955 | case NL80211_IFTYPE_STATION: |
955 | case NL80211_IFTYPE_MONITOR: | ||
956 | REG_WRITE(ah, AR_STA_ID1, val | AR_STA_ID1_KSRCH_MODE); | 956 | REG_WRITE(ah, AR_STA_ID1, val | AR_STA_ID1_KSRCH_MODE); |
957 | break; | 957 | break; |
958 | default: | ||
959 | if (ah->is_monitoring) | ||
960 | REG_WRITE(ah, AR_STA_ID1, val | AR_STA_ID1_KSRCH_MODE); | ||
961 | break; | ||
958 | } | 962 | } |
959 | } | 963 | } |
960 | 964 | ||
@@ -1634,7 +1638,6 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period) | |||
1634 | 1638 | ||
1635 | switch (ah->opmode) { | 1639 | switch (ah->opmode) { |
1636 | case NL80211_IFTYPE_STATION: | 1640 | case NL80211_IFTYPE_STATION: |
1637 | case NL80211_IFTYPE_MONITOR: | ||
1638 | REG_WRITE(ah, AR_NEXT_TBTT_TIMER, TU_TO_USEC(next_beacon)); | 1641 | REG_WRITE(ah, AR_NEXT_TBTT_TIMER, TU_TO_USEC(next_beacon)); |
1639 | REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, 0xffff); | 1642 | REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, 0xffff); |
1640 | REG_WRITE(ah, AR_NEXT_SWBA, 0x7ffff); | 1643 | REG_WRITE(ah, AR_NEXT_SWBA, 0x7ffff); |
@@ -1663,6 +1666,14 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period) | |||
1663 | AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN; | 1666 | AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN; |
1664 | break; | 1667 | break; |
1665 | default: | 1668 | default: |
1669 | if (ah->is_monitoring) { | ||
1670 | REG_WRITE(ah, AR_NEXT_TBTT_TIMER, | ||
1671 | TU_TO_USEC(next_beacon)); | ||
1672 | REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, 0xffff); | ||
1673 | REG_WRITE(ah, AR_NEXT_SWBA, 0x7ffff); | ||
1674 | flags |= AR_TBTT_TIMER_EN; | ||
1675 | break; | ||
1676 | } | ||
1666 | ath_print(ath9k_hw_common(ah), ATH_DBG_BEACON, | 1677 | ath_print(ath9k_hw_common(ah), ATH_DBG_BEACON, |
1667 | "%s: unsupported opmode: %d\n", | 1678 | "%s: unsupported opmode: %d\n", |
1668 | __func__, ah->opmode); | 1679 | __func__, ah->opmode); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index d032939768b0..d47d1b4b6002 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -622,6 +622,7 @@ struct ath_hw { | |||
622 | 622 | ||
623 | bool sw_mgmt_crypto; | 623 | bool sw_mgmt_crypto; |
624 | bool is_pciexpress; | 624 | bool is_pciexpress; |
625 | bool is_monitoring; | ||
625 | bool need_an_top2_fixup; | 626 | bool need_an_top2_fixup; |
626 | u16 tx_trig_level; | 627 | u16 tx_trig_level; |
627 | 628 | ||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 95b41db0d86b..92bc5c5f4876 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/pm_qos_params.h> | ||
18 | 19 | ||
19 | #include "ath9k.h" | 20 | #include "ath9k.h" |
20 | 21 | ||
@@ -179,6 +180,8 @@ static const struct ath_ops ath9k_common_ops = { | |||
179 | .write = ath9k_iowrite32, | 180 | .write = ath9k_iowrite32, |
180 | }; | 181 | }; |
181 | 182 | ||
183 | struct pm_qos_request_list ath9k_pm_qos_req; | ||
184 | |||
182 | /**************************/ | 185 | /**************************/ |
183 | /* Initialization */ | 186 | /* Initialization */ |
184 | /**************************/ | 187 | /**************************/ |
@@ -756,6 +759,9 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, | |||
756 | ath_init_leds(sc); | 759 | ath_init_leds(sc); |
757 | ath_start_rfkill_poll(sc); | 760 | ath_start_rfkill_poll(sc); |
758 | 761 | ||
762 | pm_qos_add_request(&ath9k_pm_qos_req, PM_QOS_CPU_DMA_LATENCY, | ||
763 | PM_QOS_DEFAULT_VALUE); | ||
764 | |||
759 | return 0; | 765 | return 0; |
760 | 766 | ||
761 | error_world: | 767 | error_world: |
@@ -824,6 +830,7 @@ void ath9k_deinit_device(struct ath_softc *sc) | |||
824 | } | 830 | } |
825 | 831 | ||
826 | ieee80211_unregister_hw(hw); | 832 | ieee80211_unregister_hw(hw); |
833 | pm_qos_remove_request(&ath9k_pm_qos_req); | ||
827 | ath_rx_cleanup(sc); | 834 | ath_rx_cleanup(sc); |
828 | ath_tx_cleanup(sc); | 835 | ath_tx_cleanup(sc); |
829 | ath9k_deinit_softc(sc); | 836 | ath9k_deinit_softc(sc); |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index b52f1cf8a603..25d3ef4c338e 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/nl80211.h> | 17 | #include <linux/nl80211.h> |
18 | #include <linux/pm_qos_params.h> | ||
18 | #include "ath9k.h" | 19 | #include "ath9k.h" |
19 | #include "btcoex.h" | 20 | #include "btcoex.h" |
20 | 21 | ||
@@ -93,11 +94,13 @@ void ath9k_ps_wakeup(struct ath_softc *sc) | |||
93 | { | 94 | { |
94 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 95 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
95 | unsigned long flags; | 96 | unsigned long flags; |
97 | enum ath9k_power_mode power_mode; | ||
96 | 98 | ||
97 | spin_lock_irqsave(&sc->sc_pm_lock, flags); | 99 | spin_lock_irqsave(&sc->sc_pm_lock, flags); |
98 | if (++sc->ps_usecount != 1) | 100 | if (++sc->ps_usecount != 1) |
99 | goto unlock; | 101 | goto unlock; |
100 | 102 | ||
103 | power_mode = sc->sc_ah->power_mode; | ||
101 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); | 104 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); |
102 | 105 | ||
103 | /* | 106 | /* |
@@ -105,10 +108,12 @@ void ath9k_ps_wakeup(struct ath_softc *sc) | |||
105 | * useful data. Better clear them now so that they don't mess up | 108 | * useful data. Better clear them now so that they don't mess up |
106 | * survey data results. | 109 | * survey data results. |
107 | */ | 110 | */ |
108 | spin_lock(&common->cc_lock); | 111 | if (power_mode != ATH9K_PM_AWAKE) { |
109 | ath_hw_cycle_counters_update(common); | 112 | spin_lock(&common->cc_lock); |
110 | memset(&common->cc_survey, 0, sizeof(common->cc_survey)); | 113 | ath_hw_cycle_counters_update(common); |
111 | spin_unlock(&common->cc_lock); | 114 | memset(&common->cc_survey, 0, sizeof(common->cc_survey)); |
115 | spin_unlock(&common->cc_lock); | ||
116 | } | ||
112 | 117 | ||
113 | unlock: | 118 | unlock: |
114 | spin_unlock_irqrestore(&sc->sc_pm_lock, flags); | 119 | spin_unlock_irqrestore(&sc->sc_pm_lock, flags); |
@@ -1217,6 +1222,7 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1217 | ah->imask |= ATH9K_INT_CST; | 1222 | ah->imask |= ATH9K_INT_CST; |
1218 | 1223 | ||
1219 | sc->sc_flags &= ~SC_OP_INVALID; | 1224 | sc->sc_flags &= ~SC_OP_INVALID; |
1225 | sc->sc_ah->is_monitoring = false; | ||
1220 | 1226 | ||
1221 | /* Disable BMISS interrupt when we're not associated */ | 1227 | /* Disable BMISS interrupt when we're not associated */ |
1222 | ah->imask &= ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS); | 1228 | ah->imask &= ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS); |
@@ -1238,6 +1244,8 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1238 | ath9k_btcoex_timer_resume(sc); | 1244 | ath9k_btcoex_timer_resume(sc); |
1239 | } | 1245 | } |
1240 | 1246 | ||
1247 | pm_qos_update_request(&ath9k_pm_qos_req, 55); | ||
1248 | |||
1241 | mutex_unlock: | 1249 | mutex_unlock: |
1242 | mutex_unlock(&sc->mutex); | 1250 | mutex_unlock(&sc->mutex); |
1243 | 1251 | ||
@@ -1415,6 +1423,8 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
1415 | 1423 | ||
1416 | sc->sc_flags |= SC_OP_INVALID; | 1424 | sc->sc_flags |= SC_OP_INVALID; |
1417 | 1425 | ||
1426 | pm_qos_update_request(&ath9k_pm_qos_req, PM_QOS_DEFAULT_VALUE); | ||
1427 | |||
1418 | mutex_unlock(&sc->mutex); | 1428 | mutex_unlock(&sc->mutex); |
1419 | 1429 | ||
1420 | ath_print(common, ATH_DBG_CONFIG, "Driver halt\n"); | 1430 | ath_print(common, ATH_DBG_CONFIG, "Driver halt\n"); |
@@ -1493,8 +1503,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
1493 | ath9k_hw_set_interrupts(ah, ah->imask); | 1503 | ath9k_hw_set_interrupts(ah, ah->imask); |
1494 | 1504 | ||
1495 | if (vif->type == NL80211_IFTYPE_AP || | 1505 | if (vif->type == NL80211_IFTYPE_AP || |
1496 | vif->type == NL80211_IFTYPE_ADHOC || | 1506 | vif->type == NL80211_IFTYPE_ADHOC) { |
1497 | vif->type == NL80211_IFTYPE_MONITOR) { | ||
1498 | sc->sc_flags |= SC_OP_ANI_RUN; | 1507 | sc->sc_flags |= SC_OP_ANI_RUN; |
1499 | ath_start_ani(common); | 1508 | ath_start_ani(common); |
1500 | } | 1509 | } |
@@ -1644,8 +1653,12 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
1644 | if (changed & IEEE80211_CONF_CHANGE_MONITOR) { | 1653 | if (changed & IEEE80211_CONF_CHANGE_MONITOR) { |
1645 | if (conf->flags & IEEE80211_CONF_MONITOR) { | 1654 | if (conf->flags & IEEE80211_CONF_MONITOR) { |
1646 | ath_print(common, ATH_DBG_CONFIG, | 1655 | ath_print(common, ATH_DBG_CONFIG, |
1647 | "HW opmode set to Monitor mode\n"); | 1656 | "Monitor mode is enabled\n"); |
1648 | sc->sc_ah->opmode = NL80211_IFTYPE_MONITOR; | 1657 | sc->sc_ah->is_monitoring = true; |
1658 | } else { | ||
1659 | ath_print(common, ATH_DBG_CONFIG, | ||
1660 | "Monitor mode is disabled\n"); | ||
1661 | sc->sc_ah->is_monitoring = false; | ||
1649 | } | 1662 | } |
1650 | } | 1663 | } |
1651 | 1664 | ||
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index fddb0129bb57..1a62e351ec77 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -441,7 +441,7 @@ u32 ath_calcrxfilter(struct ath_softc *sc) | |||
441 | */ | 441 | */ |
442 | if (((sc->sc_ah->opmode != NL80211_IFTYPE_AP) && | 442 | if (((sc->sc_ah->opmode != NL80211_IFTYPE_AP) && |
443 | (sc->rx.rxfilter & FIF_PROMISC_IN_BSS)) || | 443 | (sc->rx.rxfilter & FIF_PROMISC_IN_BSS)) || |
444 | (sc->sc_ah->opmode == NL80211_IFTYPE_MONITOR)) | 444 | (sc->sc_ah->is_monitoring)) |
445 | rfilt |= ATH9K_RX_FILTER_PROM; | 445 | rfilt |= ATH9K_RX_FILTER_PROM; |
446 | 446 | ||
447 | if (sc->rx.rxfilter & FIF_CONTROL) | 447 | if (sc->rx.rxfilter & FIF_CONTROL) |
@@ -518,7 +518,7 @@ bool ath_stoprecv(struct ath_softc *sc) | |||
518 | bool stopped; | 518 | bool stopped; |
519 | 519 | ||
520 | spin_lock_bh(&sc->rx.rxbuflock); | 520 | spin_lock_bh(&sc->rx.rxbuflock); |
521 | ath9k_hw_stoppcurecv(ah); | 521 | ath9k_hw_abortpcurecv(ah); |
522 | ath9k_hw_setrxfilter(ah, 0); | 522 | ath9k_hw_setrxfilter(ah, 0); |
523 | stopped = ath9k_hw_stopdmarecv(ah); | 523 | stopped = ath9k_hw_stopdmarecv(ah); |
524 | 524 | ||
@@ -897,7 +897,7 @@ static bool ath9k_rx_accept(struct ath_common *common, | |||
897 | * decryption and MIC failures. For monitor mode, | 897 | * decryption and MIC failures. For monitor mode, |
898 | * we also ignore the CRC error. | 898 | * we also ignore the CRC error. |
899 | */ | 899 | */ |
900 | if (ah->opmode == NL80211_IFTYPE_MONITOR) { | 900 | if (ah->is_monitoring) { |
901 | if (rx_stats->rs_status & | 901 | if (rx_stats->rs_status & |
902 | ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC | | 902 | ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC | |
903 | ATH9K_RXERR_CRC)) | 903 | ATH9K_RXERR_CRC)) |
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h index 42976b0a01c1..dddf579aacf1 100644 --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h | |||
@@ -703,6 +703,7 @@ | |||
703 | #define AR_WA_RESET_EN (1 << 18) /* Sw Control to enable PCI-Reset to POR (bit 15) */ | 703 | #define AR_WA_RESET_EN (1 << 18) /* Sw Control to enable PCI-Reset to POR (bit 15) */ |
704 | #define AR_WA_ANALOG_SHIFT (1 << 20) | 704 | #define AR_WA_ANALOG_SHIFT (1 << 20) |
705 | #define AR_WA_POR_SHORT (1 << 21) /* PCI-E Phy reset control */ | 705 | #define AR_WA_POR_SHORT (1 << 21) /* PCI-E Phy reset control */ |
706 | #define AR_WA_BIT22 (1 << 22) | ||
706 | #define AR9285_WA_DEFAULT 0x004a050b | 707 | #define AR9285_WA_DEFAULT 0x004a050b |
707 | #define AR9280_WA_DEFAULT 0x0040073b | 708 | #define AR9280_WA_DEFAULT 0x0040073b |
708 | #define AR_WA_DEFAULT 0x0000073f | 709 | #define AR_WA_DEFAULT 0x0000073f |
@@ -865,7 +866,13 @@ | |||
865 | #define AR_DEVID_7010(_ah) \ | 866 | #define AR_DEVID_7010(_ah) \ |
866 | (((_ah)->hw_version.devid == 0x7010) || \ | 867 | (((_ah)->hw_version.devid == 0x7010) || \ |
867 | ((_ah)->hw_version.devid == 0x7015) || \ | 868 | ((_ah)->hw_version.devid == 0x7015) || \ |
868 | ((_ah)->hw_version.devid == 0x9018)) | 869 | ((_ah)->hw_version.devid == 0x9018) || \ |
870 | ((_ah)->hw_version.devid == 0xA704) || \ | ||
871 | ((_ah)->hw_version.devid == 0x1200)) | ||
872 | |||
873 | #define AR9287_HTC_DEVID(_ah) \ | ||
874 | (((_ah)->hw_version.devid == 0x7015) || \ | ||
875 | ((_ah)->hw_version.devid == 0x1200)) | ||
869 | 876 | ||
870 | #define AR_RADIO_SREV_MAJOR 0xf0 | 877 | #define AR_RADIO_SREV_MAJOR 0xf0 |
871 | #define AR_RAD5133_SREV_MAJOR 0xc0 | 878 | #define AR_RAD5133_SREV_MAJOR 0xc0 |
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c index 980ae70ea424..a314c2c2bfbe 100644 --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c | |||
@@ -647,7 +647,7 @@ init: | |||
647 | } | 647 | } |
648 | 648 | ||
649 | unlock: | 649 | unlock: |
650 | if (err && (vif_id != -1)) { | 650 | if (err && (vif_id >= 0)) { |
651 | vif_priv->active = false; | 651 | vif_priv->active = false; |
652 | bitmap_release_region(&ar->vif_bitmap, vif_id, 0); | 652 | bitmap_release_region(&ar->vif_bitmap, vif_id, 0); |
653 | ar->vifs--; | 653 | ar->vifs--; |
diff --git a/drivers/net/wireless/ath/carl9170/usb.c b/drivers/net/wireless/ath/carl9170/usb.c index d8607f4c144d..7504ed14c725 100644 --- a/drivers/net/wireless/ath/carl9170/usb.c +++ b/drivers/net/wireless/ath/carl9170/usb.c | |||
@@ -82,9 +82,11 @@ static struct usb_device_id carl9170_usb_ids[] = { | |||
82 | { USB_DEVICE(0x07d1, 0x3c10) }, | 82 | { USB_DEVICE(0x07d1, 0x3c10) }, |
83 | /* D-Link DWA 160 A2 */ | 83 | /* D-Link DWA 160 A2 */ |
84 | { USB_DEVICE(0x07d1, 0x3a09) }, | 84 | { USB_DEVICE(0x07d1, 0x3a09) }, |
85 | /* D-Link DWA 130 D */ | ||
86 | { USB_DEVICE(0x07d1, 0x3a0f) }, | ||
85 | /* Netgear WNA1000 */ | 87 | /* Netgear WNA1000 */ |
86 | { USB_DEVICE(0x0846, 0x9040) }, | 88 | { USB_DEVICE(0x0846, 0x9040) }, |
87 | /* Netgear WNDA3100 */ | 89 | /* Netgear WNDA3100 (v1) */ |
88 | { USB_DEVICE(0x0846, 0x9010) }, | 90 | { USB_DEVICE(0x0846, 0x9010) }, |
89 | /* Netgear WN111 v2 */ | 91 | /* Netgear WN111 v2 */ |
90 | { USB_DEVICE(0x0846, 0x9001), .driver_info = CARL9170_ONE_LED }, | 92 | { USB_DEVICE(0x0846, 0x9001), .driver_info = CARL9170_ONE_LED }, |
@@ -551,12 +553,12 @@ static int carl9170_usb_flush(struct ar9170 *ar) | |||
551 | usb_free_urb(urb); | 553 | usb_free_urb(urb); |
552 | } | 554 | } |
553 | 555 | ||
554 | ret = usb_wait_anchor_empty_timeout(&ar->tx_cmd, HZ); | 556 | ret = usb_wait_anchor_empty_timeout(&ar->tx_cmd, 1000); |
555 | if (ret == 0) | 557 | if (ret == 0) |
556 | err = -ETIMEDOUT; | 558 | err = -ETIMEDOUT; |
557 | 559 | ||
558 | /* lets wait a while until the tx - queues are dried out */ | 560 | /* lets wait a while until the tx - queues are dried out */ |
559 | ret = usb_wait_anchor_empty_timeout(&ar->tx_anch, HZ); | 561 | ret = usb_wait_anchor_empty_timeout(&ar->tx_anch, 1000); |
560 | if (ret == 0) | 562 | if (ret == 0) |
561 | err = -ETIMEDOUT; | 563 | err = -ETIMEDOUT; |
562 | 564 | ||