Skip to content

Commit 22097fd

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
2 parents 1a67a57 + 54d5026 commit 22097fd

25 files changed

Lines changed: 126 additions & 94 deletions

File tree

‎drivers/bluetooth/ath3k.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int ath3k_load_firmware(struct usb_device *udev,
105105

106106
pipe = usb_sndctrlpipe(udev, 0);
107107

108-
send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
108+
send_buf = kmalloc(BULK_SIZE, GFP_KERNEL);
109109
if (!send_buf) {
110110
BT_ERR("Can't allocate memory chunk for firmware");
111111
return -ENOMEM;
@@ -176,7 +176,7 @@ static int ath3k_load_fwfile(struct usb_device *udev,
176176

177177
count = firmware->size;
178178

179-
send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
179+
send_buf = kmalloc(BULK_SIZE, GFP_KERNEL);
180180
if (!send_buf) {
181181
BT_ERR("Can't allocate memory chunk for firmware");
182182
return -ENOMEM;

‎drivers/bluetooth/bcm203x.c‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include <linux/module.h>
2626

27+
#include <linux/atomic.h>
2728
#include <linux/kernel.h>
2829
#include <linux/init.h>
2930
#include <linux/slab.h>
@@ -65,6 +66,7 @@ struct bcm203x_data {
6566
unsigned long state;
6667

6768
struct work_struct work;
69+
atomic_t shutdown;
6870

6971
struct urb *urb;
7072
unsigned char *buffer;
@@ -97,6 +99,7 @@ static void bcm203x_complete(struct urb *urb)
9799

98100
data->state = BCM203X_SELECT_MEMORY;
99101

102+
/* use workqueue to have a small delay */
100103
schedule_work(&data->work);
101104
break;
102105

@@ -155,7 +158,10 @@ static void bcm203x_work(struct work_struct *work)
155158
struct bcm203x_data *data =
156159
container_of(work, struct bcm203x_data, work);
157160

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)
159165
BT_ERR("Can't submit URB");
160166
}
161167

@@ -243,6 +249,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
243249

244250
usb_set_intfdata(intf, data);
245251

252+
/* use workqueue to have a small delay */
246253
schedule_work(&data->work);
247254

248255
return 0;
@@ -254,6 +261,9 @@ static void bcm203x_disconnect(struct usb_interface *intf)
254261

255262
BT_DBG("intf %p", intf);
256263

264+
atomic_inc(&data->shutdown);
265+
cancel_work_sync(&data->work);
266+
257267
usb_kill_urb(data->urb);
258268

259269
usb_set_intfdata(intf, NULL);

‎drivers/bluetooth/bfusb.c‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -568,22 +568,23 @@ static int bfusb_load_firmware(struct bfusb_data *data,
568568

569569
BT_INFO("BlueFRITZ! USB loading firmware");
570570

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+
571577
pipe = usb_sndctrlpipe(data->udev, 0);
572578

573579
if (usb_control_msg(data->udev, pipe, USB_REQ_SET_CONFIGURATION,
574580
0, 1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT) < 0) {
575581
BT_ERR("Can't change to loading configuration");
582+
kfree(buf);
576583
return -EBUSY;
577584
}
578585

579586
data->udev->toggle[0] = data->udev->toggle[1] = 0;
580587

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-
587588
pipe = usb_sndbulkpipe(data->udev, data->bulk_out_ep);
588589

589590
while (count) {

‎drivers/net/wireless/ath/ath9k/ar9002_calib.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -868,10 +868,6 @@ static bool ar9002_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan)
868868
/* Do PA Calibration */
869869
ar9002_hw_pa_cal(ah, true);
870870

871-
/* Do NF Calibration after DC offset and other calibrations */
872-
ath9k_hw_loadnf(ah, chan);
873-
ath9k_hw_start_nfcal(ah, true);
874-
875871
if (ah->caldata)
876872
ah->caldata->nfcal_pending = true;
877873

‎drivers/net/wireless/ath/ath9k/ar9003_calib.c‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -908,12 +908,15 @@ static bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan)
908908
int i;
909909
bool restore;
910910

911-
if (!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT) || !ah->caldata)
911+
if (!ah->caldata)
912912
return false;
913913

914914
hist = &ah->caldata->rtt_hist;
915+
if (!hist->num_readings)
916+
return false;
917+
915918
ar9003_hw_rtt_enable(ah);
916-
ar9003_hw_rtt_set_mask(ah, 0x10);
919+
ar9003_hw_rtt_set_mask(ah, 0x00);
917920
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
918921
if (!(ah->rxchainmask & (1 << i)))
919922
continue;
@@ -1070,6 +1073,7 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,
10701073
if (is_reusable && (hist->num_readings < RTT_HIST_MAX)) {
10711074
u32 *table;
10721075

1076+
hist->num_readings++;
10731077
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
10741078
if (!(ah->rxchainmask & (1 << i)))
10751079
continue;
@@ -1081,9 +1085,6 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,
10811085
ar9003_hw_rtt_disable(ah);
10821086
}
10831087

1084-
ath9k_hw_loadnf(ah, chan);
1085-
ath9k_hw_start_nfcal(ah, true);
1086-
10871088
/* Initialize list pointers */
10881089
ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;
10891090
ah->supp_cals = IQ_MISMATCH_CAL;

‎drivers/net/wireless/ath/ath9k/ar9003_phy.h‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -572,14 +572,14 @@
572572

573573
#define AR_PHY_TXGAIN_TABLE (AR_SM_BASE + 0x300)
574574

575-
#define AR_PHY_TX_IQCAL_CONTROL_0 (AR_SM_BASE + AR_SREV_9485(ah) ? \
576-
0x3c4 : 0x444)
577-
#define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + AR_SREV_9485(ah) ? \
578-
0x3c8 : 0x448)
579-
#define AR_PHY_TX_IQCAL_START (AR_SM_BASE + AR_SREV_9485(ah) ? \
580-
0x3c4 : 0x440)
581-
#define AR_PHY_TX_IQCAL_STATUS_B0 (AR_SM_BASE + AR_SREV_9485(ah) ? \
582-
0x3f0 : 0x48c)
575+
#define AR_PHY_TX_IQCAL_CONTROL_0 (AR_SM_BASE + (AR_SREV_9485(ah) ? \
576+
0x3c4 : 0x444))
577+
#define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + (AR_SREV_9485(ah) ? \
578+
0x3c8 : 0x448))
579+
#define AR_PHY_TX_IQCAL_START (AR_SM_BASE + (AR_SREV_9485(ah) ? \
580+
0x3c4 : 0x440))
581+
#define AR_PHY_TX_IQCAL_STATUS_B0 (AR_SM_BASE + (AR_SREV_9485(ah) ? \
582+
0x3f0 : 0x48c))
583583
#define AR_PHY_TX_IQCAL_CORR_COEFF_B0(_i) (AR_SM_BASE + \
584584
(AR_SREV_9485(ah) ? \
585585
0x3d0 : 0x450) + ((_i) << 2))
@@ -651,7 +651,7 @@
651651
#define AR_SWITCH_TABLE_ALL_S (0)
652652

653653
#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))
655655

656656
#define AR_PHY_65NM_CH0_THERM_LOCAL 0x80000000
657657
#define AR_PHY_65NM_CH0_THERM_LOCAL_S 31
@@ -668,12 +668,12 @@
668668
#define AR_PHY_65NM_CH2_RXTX2 0x16904
669669

670670
#define AR_CH0_TOP2 (AR_SREV_9300(ah) ? 0x1628c : \
671-
(AR_SREV_9485(ah) ? 0x16284 : 0x16290))
671+
(AR_SREV_9462(ah) ? 0x16290 : 0x16284))
672672
#define AR_CH0_TOP2_XPABIASLVL 0xf000
673673
#define AR_CH0_TOP2_XPABIASLVL_S 12
674674

675675
#define AR_CH0_XTAL (AR_SREV_9300(ah) ? 0x16294 : \
676-
(AR_SREV_9485(ah) ? 0x16290 : 0x16298))
676+
(AR_SREV_9462(ah) ? 0x16298 : 0x16290))
677677
#define AR_CH0_XTAL_CAPINDAC 0x7f000000
678678
#define AR_CH0_XTAL_CAPINDAC_S 24
679679
#define AR_CH0_XTAL_CAPOUTDAC 0x00fe0000
@@ -908,8 +908,8 @@
908908
#define AR_PHY_TPC_5_B1 (AR_SM1_BASE + 0x208)
909909
#define AR_PHY_TPC_6_B1 (AR_SM1_BASE + 0x20c)
910910
#define AR_PHY_TPC_11_B1 (AR_SM1_BASE + 0x220)
911-
#define AR_PHY_PDADC_TAB_1 (AR_SM1_BASE + (AR_SREV_AR9300(ah) ? \
912-
0x240 : 0x280))
911+
#define AR_PHY_PDADC_TAB_1 (AR_SM1_BASE + (AR_SREV_AR9462(ah) ? \
912+
0x280 : 0x240))
913913
#define AR_PHY_TPC_19_B1 (AR_SM1_BASE + 0x240)
914914
#define AR_PHY_TPC_19_B1_ALPHA_THERM 0xff
915915
#define AR_PHY_TPC_19_B1_ALPHA_THERM_S 0
@@ -931,10 +931,10 @@
931931
#define AR_PHY_AIC_SRAM_ADDR_B1 (AR_SM1_BASE + 0x5f0)
932932
#define AR_PHY_AIC_SRAM_DATA_B1 (AR_SM1_BASE + 0x5f4)
933933

934-
#define AR_PHY_RTT_TABLE_SW_INTF_B(i) (0x384 + (i) ? \
935-
AR_SM1_BASE : AR_SM_BASE)
936-
#define AR_PHY_RTT_TABLE_SW_INTF_1_B(i) (0x388 + (i) ? \
937-
AR_SM1_BASE : AR_SM_BASE)
934+
#define AR_PHY_RTT_TABLE_SW_INTF_B(i) (0x384 + ((i) ? \
935+
AR_SM1_BASE : AR_SM_BASE))
936+
#define AR_PHY_RTT_TABLE_SW_INTF_1_B(i) (0x388 + ((i) ? \
937+
AR_SM1_BASE : AR_SM_BASE))
938938
/*
939939
* Channel 2 Register Map
940940
*/

‎drivers/net/wireless/ath/ath9k/ar9485_initvals.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ static const u32 ar9485_1_1_radio_postamble[][2] = {
521521
{0x000160ac, 0x24611800},
522522
{0x000160b0, 0x03284f3e},
523523
{0x0001610c, 0x00170000},
524-
{0x00016140, 0x10804008},
524+
{0x00016140, 0x50804008},
525525
};
526526

527527
static const u32 ar9485_1_1_mac_postamble[][5] = {
@@ -603,7 +603,7 @@ static const u32 ar9485_1_1_radio_core[][2] = {
603603

604604
static const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_enable_L1[][2] = {
605605
/* Addr allmodes */
606-
{0x00018c00, 0x10052e5e},
606+
{0x00018c00, 0x18052e5e},
607607
{0x00018c04, 0x000801d8},
608608
{0x00018c08, 0x0000080c},
609609
};
@@ -776,7 +776,7 @@ static const u32 ar9485_modes_green_ob_db_tx_gain_1_1[][5] = {
776776

777777
static const u32 ar9485_1_1_pcie_phy_clkreq_disable_L1[][2] = {
778778
/* Addr allmodes */
779-
{0x00018c00, 0x10013e5e},
779+
{0x00018c00, 0x18013e5e},
780780
{0x00018c04, 0x000801d8},
781781
{0x00018c08, 0x0000080c},
782782
};
@@ -882,7 +882,7 @@ static const u32 ar9485_fast_clock_1_1_baseband_postamble[][3] = {
882882

883883
static const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_disable_L1[][2] = {
884884
/* Addr allmodes */
885-
{0x00018c00, 0x10012e5e},
885+
{0x00018c00, 0x18012e5e},
886886
{0x00018c04, 0x000801d8},
887887
{0x00018c08, 0x0000080c},
888888
};
@@ -1021,7 +1021,7 @@ static const u32 ar9485_common_rx_gain_1_1[][2] = {
10211021

10221022
static const u32 ar9485_1_1_pcie_phy_clkreq_enable_L1[][2] = {
10231023
/* Addr allmodes */
1024-
{0x00018c00, 0x10053e5e},
1024+
{0x00018c00, 0x18053e5e},
10251025
{0x00018c04, 0x000801d8},
10261026
{0x00018c08, 0x0000080c},
10271027
};

‎drivers/net/wireless/ath/ath9k/hw.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,6 +1724,9 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
17241724
if (!ath9k_hw_init_cal(ah, chan))
17251725
return -EIO;
17261726

1727+
ath9k_hw_loadnf(ah, chan);
1728+
ath9k_hw_start_nfcal(ah, true);
1729+
17271730
ENABLE_REGWRITE_BUFFER(ah);
17281731

17291732
ath9k_hw_restore_chainmask(ah);

‎drivers/net/wireless/ath/carl9170/tx.c‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ static void carl9170_tx_release(struct kref *ref)
296296
super = (void *)skb->data;
297297
txinfo->status.ampdu_len = super->s.rix;
298298
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)) {
300301
/*
301302
* drop redundant tx_status reports:
302303
*
@@ -308,15 +309,17 @@ static void carl9170_tx_release(struct kref *ref)
308309
*
309310
* 3. minstrel_ht is picky, it only accepts
310311
* 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]
311315
*/
312316

313317
dev_kfree_skb_any(skb);
314318
return;
315319
} else {
316320
/*
317-
* Frame has failed, but we want to keep it in
318-
* case it was lost due to a power-state
319-
* transition.
321+
* Either the frame transmission has failed or
322+
* mac80211 requested tx status.
320323
*/
321324
}
322325
}

‎drivers/net/wireless/b43/xmit.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,6 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
827827
#endif
828828
return;
829829
drop:
830-
b43dbg(dev->wl, "RX: Packet dropped\n");
831830
dev_kfree_skb_any(skb);
832831
}
833832

0 commit comments

Comments
 (0)