Skip to content

Commit 4d8b614

Browse files
committed
Merge branch 'master' of git://git.infradead.org/users/linville/wireless
Conflicts: drivers/net/wireless/iwlwifi/iwl-pci.c drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c drivers/net/wireless/rt2x00/rt2800usb.c drivers/net/wireless/wl12xx/main.c
2 parents c9df56b + 8c23516 commit 4d8b614

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+358
-279
lines changed

drivers/bcma/main.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ MODULE_LICENSE("GPL");
1515
static int bcma_bus_match(struct device *dev, struct device_driver *drv);
1616
static int bcma_device_probe(struct device *dev);
1717
static int bcma_device_remove(struct device *dev);
18+
static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env);
1819

1920
static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf)
2021
{
@@ -49,6 +50,7 @@ static struct bus_type bcma_bus_type = {
4950
.match = bcma_bus_match,
5051
.probe = bcma_device_probe,
5152
.remove = bcma_device_remove,
53+
.uevent = bcma_device_uevent,
5254
.dev_attrs = bcma_device_attrs,
5355
};
5456

@@ -295,6 +297,16 @@ static int bcma_device_remove(struct device *dev)
295297
return 0;
296298
}
297299

300+
static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env)
301+
{
302+
struct bcma_device *core = container_of(dev, struct bcma_device, dev);
303+
304+
return add_uevent_var(env,
305+
"MODALIAS=bcma:m%04Xid%04Xrev%02Xcl%02X",
306+
core->id.manuf, core->id.id,
307+
core->id.rev, core->id.class);
308+
}
309+
298310
static int __init bcma_modinit(void)
299311
{
300312
int err;

drivers/bluetooth/ath3k.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static struct usb_device_id ath3k_table[] = {
6363
/* Atheros AR3011 with sflash firmware*/
6464
{ USB_DEVICE(0x0CF3, 0x3002) },
6565
{ USB_DEVICE(0x13d3, 0x3304) },
66+
{ USB_DEVICE(0x0930, 0x0215) },
6667

6768
/* Atheros AR9285 Malbec with sflash firmware */
6869
{ USB_DEVICE(0x03F0, 0x311D) },

drivers/bluetooth/btusb.c

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,15 @@ static struct usb_device_id btusb_table[] = {
7272
/* Apple MacBookAir3,1, MacBookAir3,2 */
7373
{ USB_DEVICE(0x05ac, 0x821b) },
7474

75+
/* Apple MacBookAir4,1 */
76+
{ USB_DEVICE(0x05ac, 0x821f) },
77+
7578
/* Apple MacBookPro8,2 */
7679
{ USB_DEVICE(0x05ac, 0x821a) },
7780

81+
/* Apple MacMini5,1 */
82+
{ USB_DEVICE(0x05ac, 0x8281) },
83+
7884
/* AVM BlueFRITZ! USB v2.0 */
7985
{ USB_DEVICE(0x057c, 0x3800) },
8086

@@ -106,6 +112,7 @@ static struct usb_device_id blacklist_table[] = {
106112
/* Atheros 3011 with sflash firmware */
107113
{ USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
108114
{ USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE },
115+
{ USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE },
109116

110117
/* Atheros AR9285 Malbec with sflash firmware */
111118
{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
@@ -256,7 +263,9 @@ static void btusb_intr_complete(struct urb *urb)
256263

257264
err = usb_submit_urb(urb, GFP_ATOMIC);
258265
if (err < 0) {
259-
if (err != -EPERM)
266+
/* -EPERM: urb is being killed;
267+
* -ENODEV: device got disconnected */
268+
if (err != -EPERM && err != -ENODEV)
260269
BT_ERR("%s urb %p failed to resubmit (%d)",
261270
hdev->name, urb, -err);
262271
usb_unanchor_urb(urb);
@@ -341,7 +350,9 @@ static void btusb_bulk_complete(struct urb *urb)
341350

342351
err = usb_submit_urb(urb, GFP_ATOMIC);
343352
if (err < 0) {
344-
if (err != -EPERM)
353+
/* -EPERM: urb is being killed;
354+
* -ENODEV: device got disconnected */
355+
if (err != -EPERM && err != -ENODEV)
345356
BT_ERR("%s urb %p failed to resubmit (%d)",
346357
hdev->name, urb, -err);
347358
usb_unanchor_urb(urb);
@@ -431,7 +442,9 @@ static void btusb_isoc_complete(struct urb *urb)
431442

432443
err = usb_submit_urb(urb, GFP_ATOMIC);
433444
if (err < 0) {
434-
if (err != -EPERM)
445+
/* -EPERM: urb is being killed;
446+
* -ENODEV: device got disconnected */
447+
if (err != -EPERM && err != -ENODEV)
435448
BT_ERR("%s urb %p failed to resubmit (%d)",
436449
hdev->name, urb, -err);
437450
usb_unanchor_urb(urb);

drivers/bluetooth/btwilink.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ static long st_receive(void *priv_data, struct sk_buff *skb)
124124
/* ------- Interfaces to HCI layer ------ */
125125
/* protocol structure registered with shared transport */
126126
static struct st_proto_s ti_st_proto[MAX_BT_CHNL_IDS] = {
127+
{
128+
.chnl_id = HCI_EVENT_PKT, /* HCI Events */
129+
.hdr_len = sizeof(struct hci_event_hdr),
130+
.offset_len_in_hdr = offsetof(struct hci_event_hdr, plen),
131+
.len_size = 1, /* sizeof(plen) in struct hci_event_hdr */
132+
.reserve = 8,
133+
},
127134
{
128135
.chnl_id = HCI_ACLDATA_PKT, /* ACL */
129136
.hdr_len = sizeof(struct hci_acl_hdr),
@@ -138,13 +145,6 @@ static struct st_proto_s ti_st_proto[MAX_BT_CHNL_IDS] = {
138145
.len_size = 1, /* sizeof(dlen) in struct hci_sco_hdr */
139146
.reserve = 8,
140147
},
141-
{
142-
.chnl_id = HCI_EVENT_PKT, /* HCI Events */
143-
.hdr_len = sizeof(struct hci_event_hdr),
144-
.offset_len_in_hdr = offsetof(struct hci_event_hdr, plen),
145-
.len_size = 1, /* sizeof(plen) in struct hci_event_hdr */
146-
.reserve = 8,
147-
},
148148
};
149149

150150
/* Called from HCI core to initialize the device */
@@ -240,7 +240,7 @@ static int ti_st_close(struct hci_dev *hdev)
240240
if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
241241
return 0;
242242

243-
for (i = 0; i < MAX_BT_CHNL_IDS; i++) {
243+
for (i = MAX_BT_CHNL_IDS-1; i >= 0; i--) {
244244
err = st_unregister(&ti_st_proto[i]);
245245
if (err)
246246
BT_ERR("st_unregister(%d) failed with error %d",

drivers/net/wireless/ath/ath5k/base.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,6 +1729,8 @@ ath5k_beacon_setup(struct ath5k_hw *ah, struct ath5k_buf *bf)
17291729

17301730
if (dma_mapping_error(ah->dev, bf->skbaddr)) {
17311731
ATH5K_ERR(ah, "beacon DMA mapping failed\n");
1732+
dev_kfree_skb_any(skb);
1733+
bf->skb = NULL;
17321734
return -EIO;
17331735
}
17341736

@@ -1813,8 +1815,6 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
18131815
ath5k_txbuf_free_skb(ah, avf->bbuf);
18141816
avf->bbuf->skb = skb;
18151817
ret = ath5k_beacon_setup(ah, avf->bbuf);
1816-
if (ret)
1817-
avf->bbuf->skb = NULL;
18181818
out:
18191819
return ret;
18201820
}
@@ -1834,6 +1834,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
18341834
struct ath5k_vif *avf;
18351835
struct ath5k_buf *bf;
18361836
struct sk_buff *skb;
1837+
int err;
18371838

18381839
ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_BEACON, "in beacon_send\n");
18391840

@@ -1882,11 +1883,6 @@ ath5k_beacon_send(struct ath5k_hw *ah)
18821883

18831884
avf = (void *)vif->drv_priv;
18841885
bf = avf->bbuf;
1885-
if (unlikely(bf->skb == NULL || ah->opmode == NL80211_IFTYPE_STATION ||
1886-
ah->opmode == NL80211_IFTYPE_MONITOR)) {
1887-
ATH5K_WARN(ah, "bf=%p bf_skb=%p\n", bf, bf ? bf->skb : NULL);
1888-
return;
1889-
}
18901886

18911887
/*
18921888
* Stop any current dma and put the new frame on the queue.
@@ -1900,8 +1896,17 @@ ath5k_beacon_send(struct ath5k_hw *ah)
19001896

19011897
/* refresh the beacon for AP or MESH mode */
19021898
if (ah->opmode == NL80211_IFTYPE_AP ||
1903-
ah->opmode == NL80211_IFTYPE_MESH_POINT)
1904-
ath5k_beacon_update(ah->hw, vif);
1899+
ah->opmode == NL80211_IFTYPE_MESH_POINT) {
1900+
err = ath5k_beacon_update(ah->hw, vif);
1901+
if (err)
1902+
return;
1903+
}
1904+
1905+
if (unlikely(bf->skb == NULL || ah->opmode == NL80211_IFTYPE_STATION ||
1906+
ah->opmode == NL80211_IFTYPE_MONITOR)) {
1907+
ATH5K_WARN(ah, "bf=%p bf_skb=%p\n", bf, bf->skb);
1908+
return;
1909+
}
19051910

19061911
trace_ath5k_tx(ah, bf->skb, &ah->txqs[ah->bhalq]);
19071912

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ static bool ar9002_hw_is_cal_supported(struct ath_hw *ah,
4141
case ADC_DC_CAL:
4242
/* Run ADC Gain Cal for non-CCK & non 2GHz-HT20 only */
4343
if (!IS_CHAN_B(chan) &&
44-
!(IS_CHAN_2GHZ(chan) && IS_CHAN_HT20(chan)))
44+
!((IS_CHAN_2GHZ(chan) || IS_CHAN_A_FAST_CLOCK(ah, chan)) &&
45+
IS_CHAN_HT20(chan)))
4546
supported = true;
4647
break;
4748
}

drivers/net/wireless/ath/ath9k/ar9003_eeprom.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static int ar9003_hw_power_interpolate(int32_t x,
5050
static const struct ar9300_eeprom ar9300_default = {
5151
.eepromVersion = 2,
5252
.templateVersion = 2,
53-
.macAddr = {1, 2, 3, 4, 5, 6},
53+
.macAddr = {0, 2, 3, 4, 5, 6},
5454
.custData = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5555
0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
5656
.baseEepHeader = {
@@ -288,7 +288,7 @@ static const struct ar9300_eeprom ar9300_default = {
288288
{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
289289
{ { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } },
290290

291-
{ { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } },
291+
{ { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0) } },
292292
{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
293293
{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
294294

@@ -865,7 +865,7 @@ static const struct ar9300_eeprom ar9300_x113 = {
865865
{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
866866
{ { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } },
867867

868-
{ { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } },
868+
{ { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0) } },
869869
{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
870870
{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
871871

@@ -2021,7 +2021,7 @@ static const struct ar9300_eeprom ar9300_x112 = {
20212021
{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
20222022
{ { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } },
20232023

2024-
{ { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } },
2024+
{ { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0) } },
20252025
{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
20262026
{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
20272027

@@ -3887,7 +3887,7 @@ static void ar9003_hw_internal_regulator_apply(struct ath_hw *ah)
38873887
}
38883888
} else {
38893889
reg_pmu_set = (5 << 1) | (7 << 4) |
3890-
(1 << 8) | (2 << 14) |
3890+
(2 << 8) | (2 << 14) |
38913891
(6 << 17) | (1 << 20) |
38923892
(3 << 24) | (1 << 28);
38933893
}

drivers/net/wireless/ath/ath9k/ar9003_phy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
681681
REG_WRITE_ARRAY(&ah->iniModesAdditional,
682682
modesIndex, regWrites);
683683

684-
if (AR_SREV_9300(ah))
684+
if (AR_SREV_9330(ah))
685685
REG_WRITE_ARRAY(&ah->iniModesAdditional, 1, regWrites);
686686

687687
if (AR_SREV_9340(ah) && !ah->is_clk_25mhz)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@
898898
#define AR_PHY_TPC_19_B1_ALPHA_THERM 0xff
899899
#define AR_PHY_TPC_19_B1_ALPHA_THERM_S 0
900900
#define AR_PHY_TX_IQCAL_STATUS_B1 (AR_SM1_BASE + 0x48c)
901-
#define AR_PHY_TX_IQCAL_CORR_COEFF_B1(_i) (AR_SM_BASE + 0x450 + ((_i) << 2))
901+
#define AR_PHY_TX_IQCAL_CORR_COEFF_B1(_i) (AR_SM1_BASE + 0x450 + ((_i) << 2))
902902

903903
/* SM 1 AIC Registers */
904904

drivers/net/wireless/ath/ath9k/main.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,7 +2273,11 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class)
22732273

22742274
mutex_lock(&sc->mutex);
22752275
ah->coverage_class = coverage_class;
2276+
2277+
ath9k_ps_wakeup(sc);
22762278
ath9k_hw_init_global_settings(ah);
2279+
ath9k_ps_restore(sc);
2280+
22772281
mutex_unlock(&sc->mutex);
22782282
}
22792283

@@ -2289,6 +2293,12 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
22892293
mutex_lock(&sc->mutex);
22902294
cancel_delayed_work_sync(&sc->tx_complete_work);
22912295

2296+
if (ah->ah_flags & AH_UNPLUGGED) {
2297+
ath_dbg(common, ATH_DBG_ANY, "Device has been unplugged!\n");
2298+
mutex_unlock(&sc->mutex);
2299+
return;
2300+
}
2301+
22922302
if (sc->sc_flags & SC_OP_INVALID) {
22932303
ath_dbg(common, ATH_DBG_ANY, "Device not present\n");
22942304
mutex_unlock(&sc->mutex);

drivers/net/wireless/ath/carl9170/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,8 +1115,10 @@ static int carl9170_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
11151115
* the high througput speed in 802.11n networks.
11161116
*/
11171117

1118-
if (!is_main_vif(ar, vif))
1118+
if (!is_main_vif(ar, vif)) {
1119+
mutex_lock(&ar->mutex);
11191120
goto err_softw;
1121+
}
11201122

11211123
/*
11221124
* While the hardware supports *catch-all* key, for offloading

drivers/net/wireless/b43/dma.c

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -817,9 +817,23 @@ static u64 supported_dma_mask(struct b43_wldev *dev)
817817
u32 tmp;
818818
u16 mmio_base;
819819

820-
tmp = b43_read32(dev, SSB_TMSHIGH);
821-
if (tmp & SSB_TMSHIGH_DMA64)
822-
return DMA_BIT_MASK(64);
820+
switch (dev->dev->bus_type) {
821+
#ifdef CONFIG_B43_BCMA
822+
case B43_BUS_BCMA:
823+
tmp = bcma_aread32(dev->dev->bdev, BCMA_IOST);
824+
if (tmp & BCMA_IOST_DMA64)
825+
return DMA_BIT_MASK(64);
826+
break;
827+
#endif
828+
#ifdef CONFIG_B43_SSB
829+
case B43_BUS_SSB:
830+
tmp = ssb_read32(dev->dev->sdev, SSB_TMSHIGH);
831+
if (tmp & SSB_TMSHIGH_DMA64)
832+
return DMA_BIT_MASK(64);
833+
break;
834+
#endif
835+
}
836+
823837
mmio_base = b43_dmacontroller_base(0, 0);
824838
b43_write32(dev, mmio_base + B43_DMA32_TXCTL, B43_DMA32_TXADDREXT_MASK);
825839
tmp = b43_read32(dev, mmio_base + B43_DMA32_TXCTL);

drivers/net/wireless/b43/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,8 @@ static void handle_irq_beacon(struct b43_wldev *dev)
16371637
u32 cmd, beacon0_valid, beacon1_valid;
16381638

16391639
if (!b43_is_mode(wl, NL80211_IFTYPE_AP) &&
1640-
!b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT))
1640+
!b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT) &&
1641+
!b43_is_mode(wl, NL80211_IFTYPE_ADHOC))
16411642
return;
16421643

16431644
/* This is the bottom half of the asynchronous beacon update. */

drivers/net/wireless/ipw2x00/ipw2100.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,17 +1901,19 @@ static void ipw2100_down(struct ipw2100_priv *priv)
19011901

19021902
/* Called by register_netdev() */
19031903
static int ipw2100_net_init(struct net_device *dev)
1904+
{
1905+
struct ipw2100_priv *priv = libipw_priv(dev);
1906+
1907+
return ipw2100_up(priv, 1);
1908+
}
1909+
1910+
static int ipw2100_wdev_init(struct net_device *dev)
19041911
{
19051912
struct ipw2100_priv *priv = libipw_priv(dev);
19061913
const struct libipw_geo *geo = libipw_get_geo(priv->ieee);
19071914
struct wireless_dev *wdev = &priv->ieee->wdev;
1908-
int ret;
19091915
int i;
19101916

1911-
ret = ipw2100_up(priv, 1);
1912-
if (ret)
1913-
return ret;
1914-
19151917
memcpy(wdev->wiphy->perm_addr, priv->mac_addr, ETH_ALEN);
19161918

19171919
/* fill-out priv->ieee->bg_band */
@@ -6350,9 +6352,13 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
63506352
"Error calling register_netdev.\n");
63516353
goto fail;
63526354
}
6355+
registered = 1;
6356+
6357+
err = ipw2100_wdev_init(dev);
6358+
if (err)
6359+
goto fail;
63536360

63546361
mutex_lock(&priv->action_mutex);
6355-
registered = 1;
63566362

63576363
IPW_DEBUG_INFO("%s: Bound to %s\n", dev->name, pci_name(pci_dev));
63586364

@@ -6389,7 +6395,8 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
63896395

63906396
fail_unlock:
63916397
mutex_unlock(&priv->action_mutex);
6392-
6398+
wiphy_unregister(priv->ieee->wdev.wiphy);
6399+
kfree(priv->ieee->bg_band.channels);
63936400
fail:
63946401
if (dev) {
63956402
if (registered)

0 commit comments

Comments
 (0)