diff options
author | David S. Miller <davem@davemloft.net> | 2011-11-04 17:14:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-04 17:14:34 -0400 |
commit | 39b02648d251dbfa27b576d55eeab4cc62228d86 (patch) | |
tree | c442c1edb4242667d65340c20adee7da7afb66c2 /drivers | |
parent | 1583171492eb514e267c7b51e96846b38de0f544 (diff) | |
parent | 22097fd297c85ec6c2e700d506f231f7cae442e1 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/bluetooth/ath3k.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/bcm203x.c | 12 | ||||
-rw-r--r-- | drivers/bluetooth/bfusb.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_calib.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_calib.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.h | 34 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9485_initvals.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/tx.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/b43/xmit.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-pci.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cfg.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cfg.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 6 |
16 files changed, 89 insertions, 76 deletions
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index db7cb8111fbe..106beb194f3c 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c | |||
@@ -105,7 +105,7 @@ static int ath3k_load_firmware(struct usb_device *udev, | |||
105 | 105 | ||
106 | pipe = usb_sndctrlpipe(udev, 0); | 106 | pipe = usb_sndctrlpipe(udev, 0); |
107 | 107 | ||
108 | send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC); | 108 | send_buf = kmalloc(BULK_SIZE, GFP_KERNEL); |
109 | if (!send_buf) { | 109 | if (!send_buf) { |
110 | BT_ERR("Can't allocate memory chunk for firmware"); | 110 | BT_ERR("Can't allocate memory chunk for firmware"); |
111 | return -ENOMEM; | 111 | return -ENOMEM; |
@@ -176,7 +176,7 @@ static int ath3k_load_fwfile(struct usb_device *udev, | |||
176 | 176 | ||
177 | count = firmware->size; | 177 | count = firmware->size; |
178 | 178 | ||
179 | send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC); | 179 | send_buf = kmalloc(BULK_SIZE, GFP_KERNEL); |
180 | if (!send_buf) { | 180 | if (!send_buf) { |
181 | BT_ERR("Can't allocate memory chunk for firmware"); | 181 | BT_ERR("Can't allocate memory chunk for firmware"); |
182 | return -ENOMEM; | 182 | return -ENOMEM; |
diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c index 8b1b643a519b..54952ab800b8 100644 --- a/drivers/bluetooth/bcm203x.c +++ b/drivers/bluetooth/bcm203x.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | 26 | ||
27 | #include <linux/atomic.h> | ||
27 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
@@ -65,6 +66,7 @@ struct bcm203x_data { | |||
65 | unsigned long state; | 66 | unsigned long state; |
66 | 67 | ||
67 | struct work_struct work; | 68 | struct work_struct work; |
69 | atomic_t shutdown; | ||
68 | 70 | ||
69 | struct urb *urb; | 71 | struct urb *urb; |
70 | unsigned char *buffer; | 72 | unsigned char *buffer; |
@@ -97,6 +99,7 @@ static void bcm203x_complete(struct urb *urb) | |||
97 | 99 | ||
98 | data->state = BCM203X_SELECT_MEMORY; | 100 | data->state = BCM203X_SELECT_MEMORY; |
99 | 101 | ||
102 | /* use workqueue to have a small delay */ | ||
100 | schedule_work(&data->work); | 103 | schedule_work(&data->work); |
101 | break; | 104 | break; |
102 | 105 | ||
@@ -155,7 +158,10 @@ static void bcm203x_work(struct work_struct *work) | |||
155 | struct bcm203x_data *data = | 158 | struct bcm203x_data *data = |
156 | container_of(work, struct bcm203x_data, work); | 159 | container_of(work, struct bcm203x_data, work); |
157 | 160 | ||
158 | if (usb_submit_urb(data->urb, GFP_ATOMIC) < 0) | 161 | if (atomic_read(&data->shutdown)) |
162 | return; | ||
163 | |||
164 | if (usb_submit_urb(data->urb, GFP_KERNEL) < 0) | ||
159 | BT_ERR("Can't submit URB"); | 165 | BT_ERR("Can't submit URB"); |
160 | } | 166 | } |
161 | 167 | ||
@@ -243,6 +249,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id | |||
243 | 249 | ||
244 | usb_set_intfdata(intf, data); | 250 | usb_set_intfdata(intf, data); |
245 | 251 | ||
252 | /* use workqueue to have a small delay */ | ||
246 | schedule_work(&data->work); | 253 | schedule_work(&data->work); |
247 | 254 | ||
248 | return 0; | 255 | return 0; |
@@ -254,6 +261,9 @@ static void bcm203x_disconnect(struct usb_interface *intf) | |||
254 | 261 | ||
255 | BT_DBG("intf %p", intf); | 262 | BT_DBG("intf %p", intf); |
256 | 263 | ||
264 | atomic_inc(&data->shutdown); | ||
265 | cancel_work_sync(&data->work); | ||
266 | |||
257 | usb_kill_urb(data->urb); | 267 | usb_kill_urb(data->urb); |
258 | 268 | ||
259 | usb_set_intfdata(intf, NULL); | 269 | usb_set_intfdata(intf, NULL); |
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index 005919ab043c..61b591470a90 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c | |||
@@ -568,22 +568,23 @@ static int bfusb_load_firmware(struct bfusb_data *data, | |||
568 | 568 | ||
569 | BT_INFO("BlueFRITZ! USB loading firmware"); | 569 | BT_INFO("BlueFRITZ! USB loading firmware"); |
570 | 570 | ||
571 | buf = kmalloc(BFUSB_MAX_BLOCK_SIZE + 3, GFP_KERNEL); | ||
572 | if (!buf) { | ||
573 | BT_ERR("Can't allocate memory chunk for firmware"); | ||
574 | return -ENOMEM; | ||
575 | } | ||
576 | |||
571 | pipe = usb_sndctrlpipe(data->udev, 0); | 577 | pipe = usb_sndctrlpipe(data->udev, 0); |
572 | 578 | ||
573 | if (usb_control_msg(data->udev, pipe, USB_REQ_SET_CONFIGURATION, | 579 | if (usb_control_msg(data->udev, pipe, USB_REQ_SET_CONFIGURATION, |
574 | 0, 1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT) < 0) { | 580 | 0, 1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT) < 0) { |
575 | BT_ERR("Can't change to loading configuration"); | 581 | BT_ERR("Can't change to loading configuration"); |
582 | kfree(buf); | ||
576 | return -EBUSY; | 583 | return -EBUSY; |
577 | } | 584 | } |
578 | 585 | ||
579 | data->udev->toggle[0] = data->udev->toggle[1] = 0; | 586 | data->udev->toggle[0] = data->udev->toggle[1] = 0; |
580 | 587 | ||
581 | buf = kmalloc(BFUSB_MAX_BLOCK_SIZE + 3, GFP_ATOMIC); | ||
582 | if (!buf) { | ||
583 | BT_ERR("Can't allocate memory chunk for firmware"); | ||
584 | return -ENOMEM; | ||
585 | } | ||
586 | |||
587 | pipe = usb_sndbulkpipe(data->udev, data->bulk_out_ep); | 588 | pipe = usb_sndbulkpipe(data->udev, data->bulk_out_ep); |
588 | 589 | ||
589 | while (count) { | 590 | while (count) { |
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c index e0ab0657cc3a..88279e325dca 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c | |||
@@ -868,10 +868,6 @@ static bool ar9002_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan) | |||
868 | /* Do PA Calibration */ | 868 | /* Do PA Calibration */ |
869 | ar9002_hw_pa_cal(ah, true); | 869 | ar9002_hw_pa_cal(ah, true); |
870 | 870 | ||
871 | /* Do NF Calibration after DC offset and other calibrations */ | ||
872 | ath9k_hw_loadnf(ah, chan); | ||
873 | ath9k_hw_start_nfcal(ah, true); | ||
874 | |||
875 | if (ah->caldata) | 871 | if (ah->caldata) |
876 | ah->caldata->nfcal_pending = true; | 872 | ah->caldata->nfcal_pending = true; |
877 | 873 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c index 16851cb109a6..12a730dcb500 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c | |||
@@ -908,12 +908,15 @@ static bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan) | |||
908 | int i; | 908 | int i; |
909 | bool restore; | 909 | bool restore; |
910 | 910 | ||
911 | if (!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT) || !ah->caldata) | 911 | if (!ah->caldata) |
912 | return false; | 912 | return false; |
913 | 913 | ||
914 | hist = &ah->caldata->rtt_hist; | 914 | hist = &ah->caldata->rtt_hist; |
915 | if (!hist->num_readings) | ||
916 | return false; | ||
917 | |||
915 | ar9003_hw_rtt_enable(ah); | 918 | ar9003_hw_rtt_enable(ah); |
916 | ar9003_hw_rtt_set_mask(ah, 0x10); | 919 | ar9003_hw_rtt_set_mask(ah, 0x00); |
917 | for (i = 0; i < AR9300_MAX_CHAINS; i++) { | 920 | for (i = 0; i < AR9300_MAX_CHAINS; i++) { |
918 | if (!(ah->rxchainmask & (1 << i))) | 921 | if (!(ah->rxchainmask & (1 << i))) |
919 | continue; | 922 | continue; |
@@ -1070,6 +1073,7 @@ skip_tx_iqcal: | |||
1070 | if (is_reusable && (hist->num_readings < RTT_HIST_MAX)) { | 1073 | if (is_reusable && (hist->num_readings < RTT_HIST_MAX)) { |
1071 | u32 *table; | 1074 | u32 *table; |
1072 | 1075 | ||
1076 | hist->num_readings++; | ||
1073 | for (i = 0; i < AR9300_MAX_CHAINS; i++) { | 1077 | for (i = 0; i < AR9300_MAX_CHAINS; i++) { |
1074 | if (!(ah->rxchainmask & (1 << i))) | 1078 | if (!(ah->rxchainmask & (1 << i))) |
1075 | continue; | 1079 | continue; |
@@ -1081,9 +1085,6 @@ skip_tx_iqcal: | |||
1081 | ar9003_hw_rtt_disable(ah); | 1085 | ar9003_hw_rtt_disable(ah); |
1082 | } | 1086 | } |
1083 | 1087 | ||
1084 | ath9k_hw_loadnf(ah, chan); | ||
1085 | ath9k_hw_start_nfcal(ah, true); | ||
1086 | |||
1087 | /* Initialize list pointers */ | 1088 | /* Initialize list pointers */ |
1088 | ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL; | 1089 | ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL; |
1089 | ah->supp_cals = IQ_MISMATCH_CAL; | 1090 | ah->supp_cals = IQ_MISMATCH_CAL; |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h index 2f4023e66081..4114fe752c6b 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h | |||
@@ -572,14 +572,14 @@ | |||
572 | 572 | ||
573 | #define AR_PHY_TXGAIN_TABLE (AR_SM_BASE + 0x300) | 573 | #define AR_PHY_TXGAIN_TABLE (AR_SM_BASE + 0x300) |
574 | 574 | ||
575 | #define AR_PHY_TX_IQCAL_CONTROL_0 (AR_SM_BASE + AR_SREV_9485(ah) ? \ | 575 | #define AR_PHY_TX_IQCAL_CONTROL_0 (AR_SM_BASE + (AR_SREV_9485(ah) ? \ |
576 | 0x3c4 : 0x444) | 576 | 0x3c4 : 0x444)) |
577 | #define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + AR_SREV_9485(ah) ? \ | 577 | #define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + (AR_SREV_9485(ah) ? \ |
578 | 0x3c8 : 0x448) | 578 | 0x3c8 : 0x448)) |
579 | #define AR_PHY_TX_IQCAL_START (AR_SM_BASE + AR_SREV_9485(ah) ? \ | 579 | #define AR_PHY_TX_IQCAL_START (AR_SM_BASE + (AR_SREV_9485(ah) ? \ |
580 | 0x3c4 : 0x440) | 580 | 0x3c4 : 0x440)) |
581 | #define AR_PHY_TX_IQCAL_STATUS_B0 (AR_SM_BASE + AR_SREV_9485(ah) ? \ | 581 | #define AR_PHY_TX_IQCAL_STATUS_B0 (AR_SM_BASE + (AR_SREV_9485(ah) ? \ |
582 | 0x3f0 : 0x48c) | 582 | 0x3f0 : 0x48c)) |
583 | #define AR_PHY_TX_IQCAL_CORR_COEFF_B0(_i) (AR_SM_BASE + \ | 583 | #define AR_PHY_TX_IQCAL_CORR_COEFF_B0(_i) (AR_SM_BASE + \ |
584 | (AR_SREV_9485(ah) ? \ | 584 | (AR_SREV_9485(ah) ? \ |
585 | 0x3d0 : 0x450) + ((_i) << 2)) | 585 | 0x3d0 : 0x450) + ((_i) << 2)) |
@@ -651,7 +651,7 @@ | |||
651 | #define AR_SWITCH_TABLE_ALL_S (0) | 651 | #define AR_SWITCH_TABLE_ALL_S (0) |
652 | 652 | ||
653 | #define AR_PHY_65NM_CH0_THERM (AR_SREV_9300(ah) ? 0x16290 :\ | 653 | #define AR_PHY_65NM_CH0_THERM (AR_SREV_9300(ah) ? 0x16290 :\ |
654 | (AR_SREV_9485(ah) ? 0x1628c : 0x16294)) | 654 | (AR_SREV_9462(ah) ? 0x16294 : 0x1628c)) |
655 | 655 | ||
656 | #define AR_PHY_65NM_CH0_THERM_LOCAL 0x80000000 | 656 | #define AR_PHY_65NM_CH0_THERM_LOCAL 0x80000000 |
657 | #define AR_PHY_65NM_CH0_THERM_LOCAL_S 31 | 657 | #define AR_PHY_65NM_CH0_THERM_LOCAL_S 31 |
@@ -668,12 +668,12 @@ | |||
668 | #define AR_PHY_65NM_CH2_RXTX2 0x16904 | 668 | #define AR_PHY_65NM_CH2_RXTX2 0x16904 |
669 | 669 | ||
670 | #define AR_CH0_TOP2 (AR_SREV_9300(ah) ? 0x1628c : \ | 670 | #define AR_CH0_TOP2 (AR_SREV_9300(ah) ? 0x1628c : \ |
671 | (AR_SREV_9485(ah) ? 0x16284 : 0x16290)) | 671 | (AR_SREV_9462(ah) ? 0x16290 : 0x16284)) |
672 | #define AR_CH0_TOP2_XPABIASLVL 0xf000 | 672 | #define AR_CH0_TOP2_XPABIASLVL 0xf000 |
673 | #define AR_CH0_TOP2_XPABIASLVL_S 12 | 673 | #define AR_CH0_TOP2_XPABIASLVL_S 12 |
674 | 674 | ||
675 | #define AR_CH0_XTAL (AR_SREV_9300(ah) ? 0x16294 : \ | 675 | #define AR_CH0_XTAL (AR_SREV_9300(ah) ? 0x16294 : \ |
676 | (AR_SREV_9485(ah) ? 0x16290 : 0x16298)) | 676 | (AR_SREV_9462(ah) ? 0x16298 : 0x16290)) |
677 | #define AR_CH0_XTAL_CAPINDAC 0x7f000000 | 677 | #define AR_CH0_XTAL_CAPINDAC 0x7f000000 |
678 | #define AR_CH0_XTAL_CAPINDAC_S 24 | 678 | #define AR_CH0_XTAL_CAPINDAC_S 24 |
679 | #define AR_CH0_XTAL_CAPOUTDAC 0x00fe0000 | 679 | #define AR_CH0_XTAL_CAPOUTDAC 0x00fe0000 |
@@ -908,8 +908,8 @@ | |||
908 | #define AR_PHY_TPC_5_B1 (AR_SM1_BASE + 0x208) | 908 | #define AR_PHY_TPC_5_B1 (AR_SM1_BASE + 0x208) |
909 | #define AR_PHY_TPC_6_B1 (AR_SM1_BASE + 0x20c) | 909 | #define AR_PHY_TPC_6_B1 (AR_SM1_BASE + 0x20c) |
910 | #define AR_PHY_TPC_11_B1 (AR_SM1_BASE + 0x220) | 910 | #define AR_PHY_TPC_11_B1 (AR_SM1_BASE + 0x220) |
911 | #define AR_PHY_PDADC_TAB_1 (AR_SM1_BASE + (AR_SREV_AR9300(ah) ? \ | 911 | #define AR_PHY_PDADC_TAB_1 (AR_SM1_BASE + (AR_SREV_AR9462(ah) ? \ |
912 | 0x240 : 0x280)) | 912 | 0x280 : 0x240)) |
913 | #define AR_PHY_TPC_19_B1 (AR_SM1_BASE + 0x240) | 913 | #define AR_PHY_TPC_19_B1 (AR_SM1_BASE + 0x240) |
914 | #define AR_PHY_TPC_19_B1_ALPHA_THERM 0xff | 914 | #define AR_PHY_TPC_19_B1_ALPHA_THERM 0xff |
915 | #define AR_PHY_TPC_19_B1_ALPHA_THERM_S 0 | 915 | #define AR_PHY_TPC_19_B1_ALPHA_THERM_S 0 |
@@ -931,10 +931,10 @@ | |||
931 | #define AR_PHY_AIC_SRAM_ADDR_B1 (AR_SM1_BASE + 0x5f0) | 931 | #define AR_PHY_AIC_SRAM_ADDR_B1 (AR_SM1_BASE + 0x5f0) |
932 | #define AR_PHY_AIC_SRAM_DATA_B1 (AR_SM1_BASE + 0x5f4) | 932 | #define AR_PHY_AIC_SRAM_DATA_B1 (AR_SM1_BASE + 0x5f4) |
933 | 933 | ||
934 | #define AR_PHY_RTT_TABLE_SW_INTF_B(i) (0x384 + (i) ? \ | 934 | #define AR_PHY_RTT_TABLE_SW_INTF_B(i) (0x384 + ((i) ? \ |
935 | AR_SM1_BASE : AR_SM_BASE) | 935 | AR_SM1_BASE : AR_SM_BASE)) |
936 | #define AR_PHY_RTT_TABLE_SW_INTF_1_B(i) (0x388 + (i) ? \ | 936 | #define AR_PHY_RTT_TABLE_SW_INTF_1_B(i) (0x388 + ((i) ? \ |
937 | AR_SM1_BASE : AR_SM_BASE) | 937 | AR_SM1_BASE : AR_SM_BASE)) |
938 | /* | 938 | /* |
939 | * Channel 2 Register Map | 939 | * Channel 2 Register Map |
940 | */ | 940 | */ |
diff --git a/drivers/net/wireless/ath/ath9k/ar9485_initvals.h b/drivers/net/wireless/ath/ath9k/ar9485_initvals.h index 611ea6ce8508..d16d029f81a9 100644 --- a/drivers/net/wireless/ath/ath9k/ar9485_initvals.h +++ b/drivers/net/wireless/ath/ath9k/ar9485_initvals.h | |||
@@ -521,7 +521,7 @@ static const u32 ar9485_1_1_radio_postamble[][2] = { | |||
521 | {0x000160ac, 0x24611800}, | 521 | {0x000160ac, 0x24611800}, |
522 | {0x000160b0, 0x03284f3e}, | 522 | {0x000160b0, 0x03284f3e}, |
523 | {0x0001610c, 0x00170000}, | 523 | {0x0001610c, 0x00170000}, |
524 | {0x00016140, 0x10804008}, | 524 | {0x00016140, 0x50804008}, |
525 | }; | 525 | }; |
526 | 526 | ||
527 | static const u32 ar9485_1_1_mac_postamble[][5] = { | 527 | static const u32 ar9485_1_1_mac_postamble[][5] = { |
@@ -603,7 +603,7 @@ static const u32 ar9485_1_1_radio_core[][2] = { | |||
603 | 603 | ||
604 | static const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_enable_L1[][2] = { | 604 | static const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_enable_L1[][2] = { |
605 | /* Addr allmodes */ | 605 | /* Addr allmodes */ |
606 | {0x00018c00, 0x10052e5e}, | 606 | {0x00018c00, 0x18052e5e}, |
607 | {0x00018c04, 0x000801d8}, | 607 | {0x00018c04, 0x000801d8}, |
608 | {0x00018c08, 0x0000080c}, | 608 | {0x00018c08, 0x0000080c}, |
609 | }; | 609 | }; |
@@ -776,7 +776,7 @@ static const u32 ar9485_modes_green_ob_db_tx_gain_1_1[][5] = { | |||
776 | 776 | ||
777 | static const u32 ar9485_1_1_pcie_phy_clkreq_disable_L1[][2] = { | 777 | static const u32 ar9485_1_1_pcie_phy_clkreq_disable_L1[][2] = { |
778 | /* Addr allmodes */ | 778 | /* Addr allmodes */ |
779 | {0x00018c00, 0x10013e5e}, | 779 | {0x00018c00, 0x18013e5e}, |
780 | {0x00018c04, 0x000801d8}, | 780 | {0x00018c04, 0x000801d8}, |
781 | {0x00018c08, 0x0000080c}, | 781 | {0x00018c08, 0x0000080c}, |
782 | }; | 782 | }; |
@@ -882,7 +882,7 @@ static const u32 ar9485_fast_clock_1_1_baseband_postamble[][3] = { | |||
882 | 882 | ||
883 | static const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_disable_L1[][2] = { | 883 | static const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_disable_L1[][2] = { |
884 | /* Addr allmodes */ | 884 | /* Addr allmodes */ |
885 | {0x00018c00, 0x10012e5e}, | 885 | {0x00018c00, 0x18012e5e}, |
886 | {0x00018c04, 0x000801d8}, | 886 | {0x00018c04, 0x000801d8}, |
887 | {0x00018c08, 0x0000080c}, | 887 | {0x00018c08, 0x0000080c}, |
888 | }; | 888 | }; |
@@ -1021,7 +1021,7 @@ static const u32 ar9485_common_rx_gain_1_1[][2] = { | |||
1021 | 1021 | ||
1022 | static const u32 ar9485_1_1_pcie_phy_clkreq_enable_L1[][2] = { | 1022 | static const u32 ar9485_1_1_pcie_phy_clkreq_enable_L1[][2] = { |
1023 | /* Addr allmodes */ | 1023 | /* Addr allmodes */ |
1024 | {0x00018c00, 0x10053e5e}, | 1024 | {0x00018c00, 0x18053e5e}, |
1025 | {0x00018c04, 0x000801d8}, | 1025 | {0x00018c04, 0x000801d8}, |
1026 | {0x00018c08, 0x0000080c}, | 1026 | {0x00018c08, 0x0000080c}, |
1027 | }; | 1027 | }; |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index f16d2033081f..b479160dc262 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1724,6 +1724,9 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1724 | if (!ath9k_hw_init_cal(ah, chan)) | 1724 | if (!ath9k_hw_init_cal(ah, chan)) |
1725 | return -EIO; | 1725 | return -EIO; |
1726 | 1726 | ||
1727 | ath9k_hw_loadnf(ah, chan); | ||
1728 | ath9k_hw_start_nfcal(ah, true); | ||
1729 | |||
1727 | ENABLE_REGWRITE_BUFFER(ah); | 1730 | ENABLE_REGWRITE_BUFFER(ah); |
1728 | 1731 | ||
1729 | ath9k_hw_restore_chainmask(ah); | 1732 | ath9k_hw_restore_chainmask(ah); |
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c index d20946939cd8..59472e1605cd 100644 --- a/drivers/net/wireless/ath/carl9170/tx.c +++ b/drivers/net/wireless/ath/carl9170/tx.c | |||
@@ -296,7 +296,8 @@ static void carl9170_tx_release(struct kref *ref) | |||
296 | super = (void *)skb->data; | 296 | super = (void *)skb->data; |
297 | txinfo->status.ampdu_len = super->s.rix; | 297 | txinfo->status.ampdu_len = super->s.rix; |
298 | txinfo->status.ampdu_ack_len = super->s.cnt; | 298 | txinfo->status.ampdu_ack_len = super->s.cnt; |
299 | } else if (txinfo->flags & IEEE80211_TX_STAT_ACK) { | 299 | } else if ((txinfo->flags & IEEE80211_TX_STAT_ACK) && |
300 | !(txinfo->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) { | ||
300 | /* | 301 | /* |
301 | * drop redundant tx_status reports: | 302 | * drop redundant tx_status reports: |
302 | * | 303 | * |
@@ -308,15 +309,17 @@ static void carl9170_tx_release(struct kref *ref) | |||
308 | * | 309 | * |
309 | * 3. minstrel_ht is picky, it only accepts | 310 | * 3. minstrel_ht is picky, it only accepts |
310 | * reports of frames with the TX_STATUS_AMPDU flag. | 311 | * reports of frames with the TX_STATUS_AMPDU flag. |
312 | * | ||
313 | * 4. mac80211 is not particularly interested in | ||
314 | * feedback either [CTL_REQ_TX_STATUS not set] | ||
311 | */ | 315 | */ |
312 | 316 | ||
313 | dev_kfree_skb_any(skb); | 317 | dev_kfree_skb_any(skb); |
314 | return; | 318 | return; |
315 | } else { | 319 | } else { |
316 | /* | 320 | /* |
317 | * Frame has failed, but we want to keep it in | 321 | * Either the frame transmission has failed or |
318 | * case it was lost due to a power-state | 322 | * mac80211 requested tx status. |
319 | * transition. | ||
320 | */ | 323 | */ |
321 | } | 324 | } |
322 | } | 325 | } |
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index c73e8600d218..58ea0e5fabfd 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c | |||
@@ -827,7 +827,6 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) | |||
827 | #endif | 827 | #endif |
828 | return; | 828 | return; |
829 | drop: | 829 | drop: |
830 | b43dbg(dev->wl, "RX: Packet dropped\n"); | ||
831 | dev_kfree_skb_any(skb); | 830 | dev_kfree_skb_any(skb); |
832 | } | 831 | } |
833 | 832 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index b247a56d5135..001fdf140abb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1755,16 +1755,6 @@ static inline int iwl_check_stuck_queue(struct iwl_priv *priv, int txq) | |||
1755 | { | 1755 | { |
1756 | if (iwl_trans_check_stuck_queue(trans(priv), txq)) { | 1756 | if (iwl_trans_check_stuck_queue(trans(priv), txq)) { |
1757 | int ret; | 1757 | int ret; |
1758 | if (txq == priv->shrd->cmd_queue) { | ||
1759 | /* | ||
1760 | * validate command queue still working | ||
1761 | * by sending "ECHO" command | ||
1762 | */ | ||
1763 | if (!iwl_cmd_echo_test(priv)) | ||
1764 | return 0; | ||
1765 | else | ||
1766 | IWL_DEBUG_HC(priv, "echo testing fail\n"); | ||
1767 | } | ||
1768 | ret = iwl_force_reset(priv, IWL_FW_RESET, false); | 1758 | ret = iwl_force_reset(priv, IWL_FW_RESET, false); |
1769 | return (ret == -EAGAIN) ? 0 : 1; | 1759 | return (ret == -EAGAIN) ? 0 : 1; |
1770 | } | 1760 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c index 3b6cc66365e5..19cc6a81da57 100644 --- a/drivers/net/wireless/iwlwifi/iwl-pci.c +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c | |||
@@ -445,10 +445,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
445 | pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00); | 445 | pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00); |
446 | 446 | ||
447 | err = pci_enable_msi(pdev); | 447 | err = pci_enable_msi(pdev); |
448 | if (err) { | 448 | if (err) |
449 | dev_printk(KERN_ERR, &pdev->dev, "pci_enable_msi failed"); | 449 | dev_printk(KERN_ERR, &pdev->dev, |
450 | goto out_iounmap; | 450 | "pci_enable_msi failed(0X%x)", err); |
451 | } | ||
452 | 451 | ||
453 | /* TODO: Move this away, not needed if not MSI */ | 452 | /* TODO: Move this away, not needed if not MSI */ |
454 | /* enable rfkill interrupt: hw bug w/a */ | 453 | /* enable rfkill interrupt: hw bug w/a */ |
@@ -469,7 +468,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
469 | 468 | ||
470 | out_disable_msi: | 469 | out_disable_msi: |
471 | pci_disable_msi(pdev); | 470 | pci_disable_msi(pdev); |
472 | out_iounmap: | ||
473 | pci_iounmap(pdev, pci_bus->hw_base); | 471 | pci_iounmap(pdev, pci_bus->hw_base); |
474 | out_pci_release_regions: | 472 | out_pci_release_regions: |
475 | pci_set_drvdata(pdev, NULL); | 473 | pci_set_drvdata(pdev, NULL); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index 8e8c75c997ee..da3411057afc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | |||
@@ -407,6 +407,7 @@ static void iwl_tx_queue_unmap(struct iwl_trans *trans, int txq_id) | |||
407 | struct iwl_queue *q = &txq->q; | 407 | struct iwl_queue *q = &txq->q; |
408 | enum dma_data_direction dma_dir; | 408 | enum dma_data_direction dma_dir; |
409 | unsigned long flags; | 409 | unsigned long flags; |
410 | spinlock_t *lock; | ||
410 | 411 | ||
411 | if (!q->n_bd) | 412 | if (!q->n_bd) |
412 | return; | 413 | return; |
@@ -414,19 +415,22 @@ static void iwl_tx_queue_unmap(struct iwl_trans *trans, int txq_id) | |||
414 | /* In the command queue, all the TBs are mapped as BIDI | 415 | /* In the command queue, all the TBs are mapped as BIDI |
415 | * so unmap them as such. | 416 | * so unmap them as such. |
416 | */ | 417 | */ |
417 | if (txq_id == trans->shrd->cmd_queue) | 418 | if (txq_id == trans->shrd->cmd_queue) { |
418 | dma_dir = DMA_BIDIRECTIONAL; | 419 | dma_dir = DMA_BIDIRECTIONAL; |
419 | else | 420 | lock = &trans->hcmd_lock; |
421 | } else { | ||
420 | dma_dir = DMA_TO_DEVICE; | 422 | dma_dir = DMA_TO_DEVICE; |
423 | lock = &trans->shrd->sta_lock; | ||
424 | } | ||
421 | 425 | ||
422 | spin_lock_irqsave(&trans->shrd->sta_lock, flags); | 426 | spin_lock_irqsave(lock, flags); |
423 | while (q->write_ptr != q->read_ptr) { | 427 | while (q->write_ptr != q->read_ptr) { |
424 | /* The read_ptr needs to bound by q->n_window */ | 428 | /* The read_ptr needs to bound by q->n_window */ |
425 | iwlagn_txq_free_tfd(trans, txq, get_cmd_index(q, q->read_ptr), | 429 | iwlagn_txq_free_tfd(trans, txq, get_cmd_index(q, q->read_ptr), |
426 | dma_dir); | 430 | dma_dir); |
427 | q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd); | 431 | q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd); |
428 | } | 432 | } |
429 | spin_unlock_irqrestore(&trans->shrd->sta_lock, flags); | 433 | spin_unlock_irqrestore(lock, flags); |
430 | } | 434 | } |
431 | 435 | ||
432 | /** | 436 | /** |
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index ff6378276ff0..4fcd653bddc4 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
@@ -728,15 +728,9 @@ static void lbs_scan_worker(struct work_struct *work) | |||
728 | le16_to_cpu(scan_cmd->hdr.size), | 728 | le16_to_cpu(scan_cmd->hdr.size), |
729 | lbs_ret_scan, 0); | 729 | lbs_ret_scan, 0); |
730 | 730 | ||
731 | if (priv->scan_channel >= priv->scan_req->n_channels) { | 731 | if (priv->scan_channel >= priv->scan_req->n_channels) |
732 | /* Mark scan done */ | 732 | /* Mark scan done */ |
733 | if (priv->internal_scan) | 733 | lbs_scan_done(priv); |
734 | kfree(priv->scan_req); | ||
735 | else | ||
736 | cfg80211_scan_done(priv->scan_req, false); | ||
737 | |||
738 | priv->scan_req = NULL; | ||
739 | } | ||
740 | 734 | ||
741 | /* Restart network */ | 735 | /* Restart network */ |
742 | if (carrier) | 736 | if (carrier) |
@@ -774,6 +768,21 @@ static void _internal_start_scan(struct lbs_private *priv, bool internal, | |||
774 | lbs_deb_leave(LBS_DEB_CFG80211); | 768 | lbs_deb_leave(LBS_DEB_CFG80211); |
775 | } | 769 | } |
776 | 770 | ||
771 | /* | ||
772 | * Clean up priv->scan_req. Should be used to handle the allocation details. | ||
773 | */ | ||
774 | void lbs_scan_done(struct lbs_private *priv) | ||
775 | { | ||
776 | WARN_ON(!priv->scan_req); | ||
777 | |||
778 | if (priv->internal_scan) | ||
779 | kfree(priv->scan_req); | ||
780 | else | ||
781 | cfg80211_scan_done(priv->scan_req, false); | ||
782 | |||
783 | priv->scan_req = NULL; | ||
784 | } | ||
785 | |||
777 | static int lbs_cfg_scan(struct wiphy *wiphy, | 786 | static int lbs_cfg_scan(struct wiphy *wiphy, |
778 | struct net_device *dev, | 787 | struct net_device *dev, |
779 | struct cfg80211_scan_request *request) | 788 | struct cfg80211_scan_request *request) |
diff --git a/drivers/net/wireless/libertas/cfg.h b/drivers/net/wireless/libertas/cfg.h index a02ee151710e..558168ce634d 100644 --- a/drivers/net/wireless/libertas/cfg.h +++ b/drivers/net/wireless/libertas/cfg.h | |||
@@ -16,6 +16,7 @@ int lbs_reg_notifier(struct wiphy *wiphy, | |||
16 | void lbs_send_disconnect_notification(struct lbs_private *priv); | 16 | void lbs_send_disconnect_notification(struct lbs_private *priv); |
17 | void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event); | 17 | void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event); |
18 | 18 | ||
19 | void lbs_scan_done(struct lbs_private *priv); | ||
19 | void lbs_scan_deinit(struct lbs_private *priv); | 20 | void lbs_scan_deinit(struct lbs_private *priv); |
20 | int lbs_disconnect(struct lbs_private *priv, u16 reason); | 21 | int lbs_disconnect(struct lbs_private *priv, u16 reason); |
21 | 22 | ||
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index b03779bcd547..39a6a7a40244 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -255,10 +255,8 @@ static int lbs_eth_stop(struct net_device *dev) | |||
255 | 255 | ||
256 | lbs_update_mcast(priv); | 256 | lbs_update_mcast(priv); |
257 | cancel_delayed_work_sync(&priv->scan_work); | 257 | cancel_delayed_work_sync(&priv->scan_work); |
258 | if (priv->scan_req) { | 258 | if (priv->scan_req) |
259 | cfg80211_scan_done(priv->scan_req, false); | 259 | lbs_scan_done(priv); |
260 | priv->scan_req = NULL; | ||
261 | } | ||
262 | 260 | ||
263 | netif_carrier_off(priv->dev); | 261 | netif_carrier_off(priv->dev); |
264 | 262 | ||