History

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem

Also fixed-up a badly indented closing brace...

John W. Linville committed 13 years ago

Commit 0a878742 parents f875691 c7515d227 files · +128 −147Browse files

Unified · Split

27 files
  1. drivers/bcma/driver_pci.c +26 −23
  2. drivers/bluetooth/ath3k.c +2 −0
  3. drivers/bluetooth/btusb.c +5 −0
  4. drivers/net/wireless/ath/ath9k/recv.c +0 −7
  5. drivers/net/wireless/ath/ath9k/xmit.c +14 −3
  6. drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +13 −15
  7. drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h +2 −1
  8. drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +8 −6
  9. drivers/net/wireless/brcm80211/brcmfmac/usb.c +1 −1
  10. drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +4 −0
  11. drivers/net/wireless/cw1200/cw1200_spi.c +7 −19
  12. drivers/net/wireless/cw1200/fwio.c +1 −1
  13. drivers/net/wireless/cw1200/hwbus.h +0 −1
  14. drivers/net/wireless/cw1200/hwio.c +0 −15
  15. drivers/net/wireless/mwifiex/11n_aggr.c +2 −1
  16. drivers/net/wireless/mwifiex/11n_aggr.h +1 −1
  17. drivers/net/wireless/mwifiex/cmdevt.c +2 −3
  18. drivers/net/wireless/mwifiex/usb.c +0 −7
  19. drivers/net/wireless/mwifiex/wmm.c +1 −2
  20. drivers/net/wireless/p54/p54usb.c +2 −0
  21. drivers/net/wireless/rtlwifi/wifi.h +1 −1
  22. include/linux/bcma/bcma_driver_pci.h +1 −0
  23. include/net/bluetooth/hci.h +1 −0
  24. net/bluetooth/hci_core.c +20 −6
  25. net/bluetooth/hci_event.c +5 −1
  26. net/bluetooth/l2cap_core.c +7 −0
  27. net/bluetooth/rfcomm/tty.c +2 −33
drivers/bcma/driver_pci.c+26−23
@@ -210,25 +210,6 @@ static void bcma_core_pci_config_fixup(struct bcma_drv_pci *pc) · 209 unmodified lines
210210 }
211211 }
212212
213−static void bcma_core_pci_power_save(struct bcma_drv_pci *pc, bool up)
214−{
215− u16 data;
216−
217− if (pc->core->id.rev >= 15 && pc->core->id.rev <= 20) {
218− data = up ? 0x74 : 0x7C;
219− bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1,
220− BCMA_CORE_PCI_MDIO_BLK1_MGMT1, 0x7F64);
221− bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1,
222− BCMA_CORE_PCI_MDIO_BLK1_MGMT3, data);
223− } else if (pc->core->id.rev >= 21 && pc->core->id.rev <= 22) {
224− data = up ? 0x75 : 0x7D;
225− bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1,
226− BCMA_CORE_PCI_MDIO_BLK1_MGMT1, 0x7E65);
227− bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1,
228− BCMA_CORE_PCI_MDIO_BLK1_MGMT3, data);
229− }
230−}
231−
232213 /**************************************************
233214 * Init.
234215 **************************************************/
@@ -255,6 +236,32 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc) · 20 unmodified lines
255236 bcma_core_pci_clientmode_init(pc);
256237 }
257238
239+void bcma_core_pci_power_save(struct bcma_bus *bus, bool up)
240+{
241+ struct bcma_drv_pci *pc;
242+ u16 data;
243+
244+ if (bus->hosttype != BCMA_HOSTTYPE_PCI)
245+ return;
246+
247+ pc = &bus->drv_pci[0];
248+
249+ if (pc->core->id.rev >= 15 && pc->core->id.rev <= 20) {
250+ data = up ? 0x74 : 0x7C;
251+ bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1,
252+ BCMA_CORE_PCI_MDIO_BLK1_MGMT1, 0x7F64);
253+ bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1,
254+ BCMA_CORE_PCI_MDIO_BLK1_MGMT3, data);
255+ } else if (pc->core->id.rev >= 21 && pc->core->id.rev <= 22) {
256+ data = up ? 0x75 : 0x7D;
257+ bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1,
258+ BCMA_CORE_PCI_MDIO_BLK1_MGMT1, 0x7E65);
259+ bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1,
260+ BCMA_CORE_PCI_MDIO_BLK1_MGMT3, data);
261+ }
262+}
263+EXPORT_SYMBOL_GPL(bcma_core_pci_power_save);
264+
258265 int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core,
259266 bool enable)
260267 {
@@ -310,8 +317,6 @@ void bcma_core_pci_up(struct bcma_bus *bus) · 49 unmodified lines
310317
311318 pc = &bus->drv_pci[0];
312319
313− bcma_core_pci_power_save(pc, true);
314−
315320 bcma_core_pci_extend_L1timer(pc, true);
316321 }
317322 EXPORT_SYMBOL_GPL(bcma_core_pci_up);
@@ -326,7 +331,5 @@ void bcma_core_pci_down(struct bcma_bus *bus) · 8 unmodified lines
326331 pc = &bus->drv_pci[0];
327332
328333 bcma_core_pci_extend_L1timer(pc, false);
329−
330− bcma_core_pci_power_save(pc, false);
331334 }
332335 EXPORT_SYMBOL_GPL(bcma_core_pci_down);
drivers/bluetooth/ath3k.c+2−0
@@ -85,6 +85,7 @@ static struct usb_device_id ath3k_table[] = { · 84 unmodified lines
8585 { USB_DEVICE(0x04CA, 0x3008) },
8686 { USB_DEVICE(0x13d3, 0x3362) },
8787 { USB_DEVICE(0x0CF3, 0xE004) },
88+ { USB_DEVICE(0x0CF3, 0xE005) },
8889 { USB_DEVICE(0x0930, 0x0219) },
8990 { USB_DEVICE(0x0489, 0xe057) },
9091 { USB_DEVICE(0x13d3, 0x3393) },
@@ -126,6 +127,7 @@ static struct usb_device_id ath3k_blist_tbl[] = { · 35 unmodified lines
126127 { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },
127128 { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
128129 { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
130+ { USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 },
129131 { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
130132 { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
131133 { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
drivers/bluetooth/btusb.c+5−0
@@ -102,6 +102,7 @@ static struct usb_device_id btusb_table[] = { · 101 unmodified lines
102102
103103 /* Broadcom BCM20702A0 */
104104 { USB_DEVICE(0x0b05, 0x17b5) },
105+ { USB_DEVICE(0x0b05, 0x17cb) },
105106 { USB_DEVICE(0x04ca, 0x2003) },
106107 { USB_DEVICE(0x0489, 0xe042) },
107108 { USB_DEVICE(0x413c, 0x8197) },
@@ -112,6 +113,9 @@ static struct usb_device_id btusb_table[] = { · 4 unmodified lines
112113 /*Broadcom devices with vendor specific id */
113114 { USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01) },
114115
116+ /* Belkin F8065bf - Broadcom based */
117+ { USB_VENDOR_AND_INTERFACE_INFO(0x050d, 0xff, 0x01, 0x01) },
118+
115119 { } /* Terminating entry */
116120 };
117121
@@ -148,6 +152,7 @@ static struct usb_device_id blacklist_table[] = { · 30 unmodified lines
148152 { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },
149153 { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
150154 { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
155+ { USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 },
151156 { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
152157 { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
153158 { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
drivers/net/wireless/ath/ath9k/recv.c+0−7
@@ -1269,13 +1269,6 @@ static void ath9k_antenna_check(struct ath_softc *sc, · 1268 unmodified lines
12691269 if (!(ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB))
12701270 return;
12711271
1272− /*
1273− * All MPDUs in an aggregate will use the same LNA
1274− * as the first MPDU.
1275− */
1276− if (rs->rs_isaggr && !rs->rs_firstaggr)
1277− return;
1278−
12791272 /*
12801273 * Change the default rx antenna if rx diversity
12811274 * chooses the other antenna 3 times in a row.
drivers/net/wireless/ath/ath9k/xmit.c+14−3
@@ -399,6 +399,7 @@ static struct ath_buf* ath_clone_txbuf(struct ath_softc *sc, struct ath_buf *bf) · 398 unmodified lines
399399 tbf->bf_buf_addr = bf->bf_buf_addr;
400400 memcpy(tbf->bf_desc, bf->bf_desc, sc->sc_ah->caps.tx_desc_len);
401401 tbf->bf_state = bf->bf_state;
402+ tbf->bf_state.stale = false;
402403
403404 return tbf;
404405 }
@@ -1389,11 +1390,15 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, · 984 unmodified lines
13891390 u16 tid, u16 *ssn)
13901391 {
13911392 struct ath_atx_tid *txtid;
1393+ struct ath_txq *txq;
13921394 struct ath_node *an;
13931395 u8 density;
13941396
13951397 an = (struct ath_node *)sta->drv_priv;
13961398 txtid = ATH_AN_2_TID(an, tid);
1399+ txq = txtid->ac->txq;
1400+
1401+ ath_txq_lock(sc, txq);
13971402
13981403 /* update ampdu factor/density, they may have changed. This may happen
13991404 * in HT IBSS when a beacon with HT-info is received after the station
@@ -1417,6 +1422,8 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, · 17 unmodified lines
14171422 memset(txtid->tx_buf, 0, sizeof(txtid->tx_buf));
14181423 txtid->baw_head = txtid->baw_tail = 0;
14191424
1425+ ath_txq_unlock_complete(sc, txq);
1426+
14201427 return 0;
14211428 }
14221429
@@ -1555,8 +1562,10 @@ void ath9k_release_buffered_frames(struct ieee80211_hw *hw, · 132 unmodified lines
15551562 __skb_unlink(bf->bf_mpdu, tid_q);
15561563 list_add_tail(&bf->list, &bf_q);
15571564 ath_set_rates(tid->an->vif, tid->an->sta, bf);
1558− ath_tx_addto_baw(sc, tid, bf);
1559− bf->bf_state.bf_type &= ~BUF_AGGR;
1565+ if (bf_isampdu(bf)) {
1566+ ath_tx_addto_baw(sc, tid, bf);
1567+ bf->bf_state.bf_type &= ~BUF_AGGR;
1568+ }
15601569 if (bf_tail)
15611570 bf_tail->bf_next = bf;
15621571
@@ -1950,7 +1959,9 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq, · 387 unmodified lines
19501959 if (bf_is_ampdu_not_probing(bf))
19511960 txq->axq_ampdu_depth++;
19521961
1953− bf = bf->bf_lastbf->bf_next;
1962+ bf_last = bf->bf_lastbf;
1963+ bf = bf_last->bf_next;
1964+ bf_last->bf_next = NULL;
19541965 }
19551966 }
19561967 }
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c+13−15
@@ -464,8 +464,6 @@ static struct sdio_driver brcmf_sdmmc_driver = { · 463 unmodified lines
464464
465465 static int brcmf_sdio_pd_probe(struct platform_device *pdev)
466466 {
467− int ret;
468−
469467 brcmf_dbg(SDIO, "Enter\n");
470468
471469 brcmfmac_sdio_pdata = pdev->dev.platform_data;
@@ -473,11 +471,7 @@ static int brcmf_sdio_pd_probe(struct platform_device *pdev) · 1 unmodified line
473471 if (brcmfmac_sdio_pdata->power_on)
474472 brcmfmac_sdio_pdata->power_on();
475473
476− ret = sdio_register_driver(&brcmf_sdmmc_driver);
477− if (ret)
478− brcmf_err("sdio_register_driver failed: %d\n", ret);
479−
480− return ret;
474+ return 0;
481475 }
482476
483477 static int brcmf_sdio_pd_remove(struct platform_device *pdev)
@@ -500,6 +494,15 @@ static struct platform_driver brcmf_sdio_pd = { · 16 unmodified lines
500494 }
501495 };
502496
497+void brcmf_sdio_register(void)
498+{
499+ int ret;
500+
501+ ret = sdio_register_driver(&brcmf_sdmmc_driver);
502+ if (ret)
503+ brcmf_err("sdio_register_driver failed: %d\n", ret);
504+}
505+
503506 void brcmf_sdio_exit(void)
504507 {
505508 brcmf_dbg(SDIO, "Enter\n");
@@ -510,18 +513,13 @@ void brcmf_sdio_exit(void) · 4 unmodified lines
510513 sdio_unregister_driver(&brcmf_sdmmc_driver);
511514 }
512515
513−void brcmf_sdio_init(void)
516+void __init brcmf_sdio_init(void)
514517 {
515518 int ret;
516519
517520 brcmf_dbg(SDIO, "Enter\n");
518521
519522 ret = platform_driver_probe(&brcmf_sdio_pd, brcmf_sdio_pd_probe);
520− if (ret == -ENODEV) {
521− brcmf_dbg(SDIO, "No platform data available, registering without.\n");
522− ret = sdio_register_driver(&brcmf_sdmmc_driver);
523− }
524−
525− if (ret)
526− brcmf_err("driver registration failed: %d\n", ret);
523+ if (ret == -ENODEV)
524+ brcmf_dbg(SDIO, "No platform data available.\n");
527525 }
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h+2−1
@@ -156,10 +156,11 @@ extern int brcmf_bus_start(struct device *dev); · 155 unmodified lines
156156 #ifdef CONFIG_BRCMFMAC_SDIO
157157 extern void brcmf_sdio_exit(void);
158158 extern void brcmf_sdio_init(void);
159+extern void brcmf_sdio_register(void);
159160 #endif
160161 #ifdef CONFIG_BRCMFMAC_USB
161162 extern void brcmf_usb_exit(void);
162−extern void brcmf_usb_init(void);
163+extern void brcmf_usb_register(void);
163164 #endif
164165
165166 #endif /* _BRCMF_BUS_H_ */
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c+8−6
@@ -1231,21 +1231,23 @@ u32 brcmf_get_chip_info(struct brcmf_if *ifp) · 1230 unmodified lines
12311231 return bus->chip << 4 | bus->chiprev;
12321232 }
12331233
1234−static void brcmf_driver_init(struct work_struct *work)
1234+static void brcmf_driver_register(struct work_struct *work)
12351235 {
1236− brcmf_debugfs_init();
1237−
12381236 #ifdef CONFIG_BRCMFMAC_SDIO
1239− brcmf_sdio_init();
1237+ brcmf_sdio_register();
12401238 #endif
12411239 #ifdef CONFIG_BRCMFMAC_USB
1242− brcmf_usb_init();
1240+ brcmf_usb_register();
12431241 #endif
12441242 }
1245−static DECLARE_WORK(brcmf_driver_work, brcmf_driver_init);
1243+static DECLARE_WORK(brcmf_driver_work, brcmf_driver_register);
12461244
12471245 static int __init brcmfmac_module_init(void)
12481246 {
1247+ brcmf_debugfs_init();
1248+#ifdef CONFIG_BRCMFMAC_SDIO
1249+ brcmf_sdio_init();
1250+#endif
12491251 if (!schedule_work(&brcmf_driver_work))
12501252 return -EBUSY;
12511253
drivers/net/wireless/brcm80211/brcmfmac/usb.c+1−1
@@ -1539,7 +1539,7 @@ void brcmf_usb_exit(void) · 1538 unmodified lines
15391539 brcmf_release_fw(&fw_image_list);
15401540 }
15411541
1542−void brcmf_usb_init(void)
1542+void brcmf_usb_register(void)
15431543 {
15441544 brcmf_dbg(USB, "Enter\n");
15451545 INIT_LIST_HEAD(&fw_image_list);
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c+4−0
@@ -457,6 +457,8 @@ static int brcms_ops_start(struct ieee80211_hw *hw) · 456 unmodified lines
457457 if (err != 0)
458458 brcms_err(wl->wlc->hw->d11core, "%s: brcms_up() returned %d\n",
459459 __func__, err);
460+
461+ bcma_core_pci_power_save(wl->wlc->hw->d11core->bus, true);
460462 return err;
461463 }
462464
@@ -479,6 +481,8 @@ static void brcms_ops_stop(struct ieee80211_hw *hw) · 16 unmodified lines
479481 return;
480482 }
481483
484+ bcma_core_pci_power_save(wl->wlc->hw->d11core->bus, false);
485+
482486 /* put driver in down state */
483487 spin_lock_bh(&wl->lock);
484488 brcms_down(wl);
drivers/net/wireless/cw1200/cw1200_spi.c+7−19
@@ -42,7 +42,6 @@ struct hwbus_priv { · 41 unmodified lines
4242 spinlock_t lock; /* Serialize all bus operations */
4343 wait_queue_head_t wq;
4444 int claimed;
45− int irq_disabled;
4645 };
4746
4847 #define SDIO_TO_SPI_ADDR(addr) ((addr & 0x1f)>>2)
@@ -238,8 +237,6 @@ static irqreturn_t cw1200_spi_irq_handler(int irq, void *dev_id) · 189 unmodified lines
238237 struct hwbus_priv *self = dev_id;
239238
240239 if (self->core) {
241− disable_irq_nosync(self->func->irq);
242− self->irq_disabled = 1;
243240 cw1200_irq_handler(self->core);
244241 return IRQ_HANDLED;
245242 } else {
@@ -253,9 +250,10 @@ static int cw1200_spi_irq_subscribe(struct hwbus_priv *self) · 7 unmodified lines
253250
254251 pr_debug("SW IRQ subscribe\n");
255252
256− ret = request_any_context_irq(self->func->irq, cw1200_spi_irq_handler,
257− IRQF_TRIGGER_HIGH,
258− "cw1200_wlan_irq", self);
253+ ret = request_threaded_irq(self->func->irq, NULL,
254+ cw1200_spi_irq_handler,
255+ IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
256+ "cw1200_wlan_irq", self);
259257 if (WARN_ON(ret < 0))
260258 goto exit;
261259
@@ -273,22 +271,13 @@ exit: · 11 unmodified lines
273271
274272 static int cw1200_spi_irq_unsubscribe(struct hwbus_priv *self)
275273 {
274+ int ret = 0;
275+
276276 pr_debug("SW IRQ unsubscribe\n");
277277 disable_irq_wake(self->func->irq);
278278 free_irq(self->func->irq, self);
279279
280− return 0;
281−}
282−
283−static int cw1200_spi_irq_enable(struct hwbus_priv *self, int enable)
284−{
285− /* Disables are handled by the interrupt handler */
286− if (enable && self->irq_disabled) {
287− enable_irq(self->func->irq);
288− self->irq_disabled = 0;
289− }
290−
291− return 0;
280+ return ret;
292281 }
293282
294283 static int cw1200_spi_off(const struct cw1200_platform_data_spi *pdata)
@@ -368,7 +357,6 @@ static struct hwbus_ops cw1200_spi_hwbus_ops = { · 73 unmodified lines
368357 .unlock = cw1200_spi_unlock,
369358 .align_size = cw1200_spi_align_size,
370359 .power_mgmt = cw1200_spi_pm,
371− .irq_enable = cw1200_spi_irq_enable,
372360 };
373361
374362 /* Probe Function to be called by SPI stack when device is discovered */
drivers/net/wireless/cw1200/fwio.c+1−1
@@ -485,7 +485,7 @@ int cw1200_load_firmware(struct cw1200_common *priv) · 484 unmodified lines
485485
486486 /* Enable interrupt signalling */
487487 priv->hwbus_ops->lock(priv->hwbus_priv);
488− ret = __cw1200_irq_enable(priv, 2);
488+ ret = __cw1200_irq_enable(priv, 1);
489489 priv->hwbus_ops->unlock(priv->hwbus_priv);
490490 if (ret < 0)
491491 goto unsubscribe;
drivers/net/wireless/cw1200/hwbus.h+0−1
@@ -28,7 +28,6 @@ struct hwbus_ops { · 27 unmodified lines
2828 void (*unlock)(struct hwbus_priv *self);
2929 size_t (*align_size)(struct hwbus_priv *self, size_t size);
3030 int (*power_mgmt)(struct hwbus_priv *self, bool suspend);
31− int (*irq_enable)(struct hwbus_priv *self, int enable);
3231 };
3332
3433 #endif /* CW1200_HWBUS_H */
drivers/net/wireless/cw1200/hwio.c+0−15
@@ -273,21 +273,6 @@ int __cw1200_irq_enable(struct cw1200_common *priv, int enable) · 272 unmodified lines
273273 u16 val16;
274274 int ret;
275275
276− /* We need to do this hack because the SPI layer can sleep on I/O
277− and the general path involves I/O to the device in interrupt
278− context.
279−
280− However, the initial enable call needs to go to the hardware.
281−
282− We don't worry about shutdown because we do a full reset which
283− clears the interrupt enabled bits.
284− */
285− if (priv->hwbus_ops->irq_enable) {
286− ret = priv->hwbus_ops->irq_enable(priv->hwbus_priv, enable);
287− if (ret || enable < 2)
288− return ret;
289− }
290−
291276 if (HIF_8601_SILICON == priv->hw_type) {
292277 ret = __cw1200_reg_read_32(priv, ST90TDS_CONFIG_REG_ID, &val32);
293278 if (ret < 0) {
drivers/net/wireless/mwifiex/11n_aggr.c+2−1
@@ -150,7 +150,7 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv, · 149 unmodified lines
150150 */
151151 int
152152 mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
153− struct mwifiex_ra_list_tbl *pra_list, int headroom,
153+ struct mwifiex_ra_list_tbl *pra_list,
154154 int ptrindex, unsigned long ra_list_flags)
155155 __releases(&priv->wmm.ra_list_spinlock)
156156 {
@@ -160,6 +160,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv, · 3 unmodified lines
160160 int pad = 0, ret;
161161 struct mwifiex_tx_param tx_param;
162162 struct txpd *ptx_pd = NULL;
163+ int headroom = adapter->iface_type == MWIFIEX_USB ? 0 : INTF_HEADER_LEN;
163164
164165 skb_src = skb_peek(&pra_list->skb_head);
165166 if (!skb_src) {
drivers/net/wireless/mwifiex/11n_aggr.h+1−1
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 int mwifiex_11n_deaggregate_pkt(struct mwifiex_private *priv,
2727 struct sk_buff *skb);
2828 int mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
29− struct mwifiex_ra_list_tbl *ptr, int headroom,
29+ struct mwifiex_ra_list_tbl *ptr,
3030 int ptr_index, unsigned long flags)
3131 __releases(&priv->wmm.ra_list_spinlock);
3232
drivers/net/wireless/mwifiex/cmdevt.c+2−3
@@ -1155,7 +1155,7 @@ int mwifiex_ret_802_11_hs_cfg(struct mwifiex_private *priv, · 1154 unmodified lines
11551155 uint32_t conditions = le32_to_cpu(phs_cfg->params.hs_config.conditions);
11561156
11571157 if (phs_cfg->action == cpu_to_le16(HS_ACTIVATE) &&
1158− adapter->iface_type == MWIFIEX_SDIO) {
1158+ adapter->iface_type != MWIFIEX_USB) {
11591159 mwifiex_hs_activated_event(priv, true);
11601160 return 0;
11611161 } else {
@@ -1167,8 +1167,7 @@ int mwifiex_ret_802_11_hs_cfg(struct mwifiex_private *priv, · 5 unmodified lines
11671167 }
11681168 if (conditions != HS_CFG_CANCEL) {
11691169 adapter->is_hs_configured = true;
1170− if (adapter->iface_type == MWIFIEX_USB ||
1171− adapter->iface_type == MWIFIEX_PCIE)
1170+ if (adapter->iface_type == MWIFIEX_USB)
11721171 mwifiex_hs_activated_event(priv, true);
11731172 } else {
11741173 adapter->is_hs_configured = false;
drivers/net/wireless/mwifiex/usb.c+0−7
@@ -447,9 +447,6 @@ static int mwifiex_usb_suspend(struct usb_interface *intf, pm_message_t message) · 446 unmodified lines
447447 */
448448 adapter->is_suspended = true;
449449
450− for (i = 0; i < adapter->priv_num; i++)
451− netif_carrier_off(adapter->priv[i]->netdev);
452−
453450 if (atomic_read(&card->rx_cmd_urb_pending) && card->rx_cmd.urb)
454451 usb_kill_urb(card->rx_cmd.urb);
455452
@@ -509,10 +506,6 @@ static int mwifiex_usb_resume(struct usb_interface *intf) · 53 unmodified lines
509506 MWIFIEX_RX_CMD_BUF_SIZE);
510507 }
511508
512− for (i = 0; i < adapter->priv_num; i++)
513− if (adapter->priv[i]->media_connected)
514− netif_carrier_on(adapter->priv[i]->netdev);
515−
516509 /* Disable Host Sleep */
517510 if (adapter->hs_activated)
518511 mwifiex_cancel_hs(mwifiex_get_priv(adapter,
drivers/net/wireless/mwifiex/wmm.c+1−2
@@ -1239,8 +1239,7 @@ mwifiex_dequeue_tx_packet(struct mwifiex_adapter *adapter) · 1238 unmodified lines
12391239 if (enable_tx_amsdu && mwifiex_is_amsdu_allowed(priv, tid) &&
12401240 mwifiex_is_11n_aggragation_possible(priv, ptr,
12411241 adapter->tx_buf_size))
1242− mwifiex_11n_aggregate_pkt(priv, ptr, INTF_HEADER_LEN,
1243− ptr_index, flags);
1242+ mwifiex_11n_aggregate_pkt(priv, ptr, ptr_index, flags);
12441243 /* ra_list_spinlock has been freed in
12451244 mwifiex_11n_aggregate_pkt() */
12461245 else
drivers/net/wireless/p54/p54usb.c+2−0
@@ -83,6 +83,7 @@ static struct usb_device_id p54u_table[] = { · 82 unmodified lines
8383 {USB_DEVICE(0x06a9, 0x000e)}, /* Westell 802.11g USB (A90-211WG-01) */
8484 {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */
8585 {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */
86+ {USB_DEVICE(0x07aa, 0x0020)}, /* Corega WLUSB2GTST USB */
8687 {USB_DEVICE(0x0803, 0x4310)}, /* Zoom 4410a */
8788 {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */
8889 {USB_DEVICE(0x083a, 0x4531)}, /* T-Com Sinus 154 data II */
@@ -979,6 +980,7 @@ static int p54u_load_firmware(struct ieee80211_hw *dev, · 890 unmodified lines
979980 if (err) {
980981 dev_err(&priv->udev->dev, "(p54usb) cannot load firmware %s "
981982 "(%d)!\n", p54u_fwlist[i].fw, err);
983+ usb_put_dev(udev);
982984 }
983985
984986 return err;
drivers/net/wireless/rtlwifi/wifi.h+1−1
@@ -2057,7 +2057,7 @@ struct rtl_priv { · 2056 unmodified lines
20572057 that it points to the data allocated
20582058 beyond this structure like:
20592059 rtl_pci_priv or rtl_usb_priv */
2060− u8 priv[0];
2060+ u8 priv[0] __aligned(sizeof(void *));
20612061 };
20622062
20632063 #define rtl_priv(hw) (((struct rtl_priv *)(hw)->priv))
include/linux/bcma/bcma_driver_pci.h+1−0
@@ -242,6 +242,7 @@ extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, · 241 unmodified lines
242242 struct bcma_device *core, bool enable);
243243 extern void bcma_core_pci_up(struct bcma_bus *bus);
244244 extern void bcma_core_pci_down(struct bcma_bus *bus);
245+extern void bcma_core_pci_power_save(struct bcma_bus *bus, bool up);
245246
246247 extern int bcma_core_pci_pcibios_map_irq(const struct pci_dev *dev);
247248 extern int bcma_core_pci_plat_dev_init(struct pci_dev *dev);
include/net/bluetooth/hci.h+1−0
@@ -104,6 +104,7 @@ enum { · 103 unmodified lines
104104 enum {
105105 HCI_SETUP,
106106 HCI_AUTO_OFF,
107+ HCI_RFKILLED,
107108 HCI_MGMT,
108109 HCI_PAIRABLE,
109110 HCI_SERVICE_CACHE,
net/bluetooth/hci_core.c+20−6
@@ -1146,7 +1146,11 @@ int hci_dev_open(__u16 dev) · 1145 unmodified lines
11461146 goto done;
11471147 }
11481148
1149− if (hdev->rfkill && rfkill_blocked(hdev->rfkill)) {
1149+ /* Check for rfkill but allow the HCI setup stage to proceed
1150+ * (which in itself doesn't cause any RF activity).
1151+ */
1152+ if (test_bit(HCI_RFKILLED, &hdev->dev_flags) &&
1153+ !test_bit(HCI_SETUP, &hdev->dev_flags)) {
11501154 ret = -ERFKILL;
11511155 goto done;
11521156 }
@@ -1566,10 +1570,13 @@ static int hci_rfkill_set_block(void *data, bool blocked) · 413 unmodified lines
15661570
15671571 BT_DBG("%p name %s blocked %d", hdev, hdev->name, blocked);
15681572
1569− if (!blocked)
1570− return 0;
1571−
1572− hci_dev_do_close(hdev);
1573+ if (blocked) {
1574+ set_bit(HCI_RFKILLED, &hdev->dev_flags);
1575+ if (!test_bit(HCI_SETUP, &hdev->dev_flags))
1576+ hci_dev_do_close(hdev);
1577+ } else {
1578+ clear_bit(HCI_RFKILLED, &hdev->dev_flags);
1579+ }
15731580
15741581 return 0;
15751582 }
@@ -1591,9 +1598,13 @@ static void hci_power_on(struct work_struct *work) · 15 unmodified lines
15911598 return;
15921599 }
15931600
1594− if (test_bit(HCI_AUTO_OFF, &hdev->dev_flags))
1601+ if (test_bit(HCI_RFKILLED, &hdev->dev_flags)) {
1602+ clear_bit(HCI_AUTO_OFF, &hdev->dev_flags);
1603+ hci_dev_do_close(hdev);
1604+ } else if (test_bit(HCI_AUTO_OFF, &hdev->dev_flags)) {
15951605 queue_delayed_work(hdev->req_workqueue, &hdev->power_off,
15961606 HCI_AUTO_OFF_TIMEOUT);
1607+ }
15971608
15981609 if (test_and_clear_bit(HCI_SETUP, &hdev->dev_flags))
15991610 mgmt_index_added(hdev);
@@ -2209,6 +2220,9 @@ int hci_register_dev(struct hci_dev *hdev) · 609 unmodified lines
22092220 }
22102221 }
22112222
2223+ if (hdev->rfkill && rfkill_blocked(hdev->rfkill))
2224+ set_bit(HCI_RFKILLED, &hdev->dev_flags);
2225+
22122226 set_bit(HCI_SETUP, &hdev->dev_flags);
22132227
22142228 if (hdev->dev_type != HCI_AMP)
net/bluetooth/hci_event.c+5−1
@@ -3557,7 +3557,11 @@ static void hci_le_ltk_request_evt(struct hci_dev *hdev, struct sk_buff *skb) · 3556 unmodified lines
35573557 cp.handle = cpu_to_le16(conn->handle);
35583558
35593559 if (ltk->authenticated)
3560− conn->sec_level = BT_SECURITY_HIGH;
3560+ conn->pending_sec_level = BT_SECURITY_HIGH;
3561+ else
3562+ conn->pending_sec_level = BT_SECURITY_MEDIUM;
3563+
3564+ conn->enc_key_size = ltk->enc_size;
35613565
35623566 hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp);
35633567
net/bluetooth/l2cap_core.c+7−0
@@ -3755,6 +3755,13 @@ static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn, · 3754 unmodified lines
37553755
37563756 sk = chan->sk;
37573757
3758+ /* For certain devices (ex: HID mouse), support for authentication,
3759+ * pairing and bonding is optional. For such devices, inorder to avoid
3760+ * the ACL alive for too long after L2CAP disconnection, reset the ACL
3761+ * disc_timeout back to HCI_DISCONN_TIMEOUT during L2CAP connect.
3762+ */
3763+ conn->hcon->disc_timeout = HCI_DISCONN_TIMEOUT;
3764+
37583765 bacpy(&bt_sk(sk)->src, conn->src);
37593766 bacpy(&bt_sk(sk)->dst, conn->dst);
37603767 chan->psm = psm;
net/bluetooth/rfcomm/tty.c+2−33
@@ -569,7 +569,6 @@ static void rfcomm_dev_data_ready(struct rfcomm_dlc *dlc, struct sk_buff *skb) · 568 unmodified lines
569569 static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err)
570570 {
571571 struct rfcomm_dev *dev = dlc->owner;
572− struct tty_struct *tty;
573572 if (!dev)
574573 return;
575574
@@ -581,38 +580,8 @@ static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err) · 5 unmodified lines
581580 DPM_ORDER_DEV_AFTER_PARENT);
582581
583582 wake_up_interruptible(&dev->port.open_wait);
584− } else if (dlc->state == BT_CLOSED) {
585− tty = tty_port_tty_get(&dev->port);
586− if (!tty) {
587− if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) {
588− /* Drop DLC lock here to avoid deadlock
589− * 1. rfcomm_dev_get will take rfcomm_dev_lock
590− * but in rfcomm_dev_add there's lock order:
591− * rfcomm_dev_lock -> dlc lock
592− * 2. tty_port_put will deadlock if it's
593− * the last reference
594− *
595− * FIXME: when we release the lock anything
596− * could happen to dev, even its destruction
597− */
598− rfcomm_dlc_unlock(dlc);
599− if (rfcomm_dev_get(dev->id) == NULL) {
600− rfcomm_dlc_lock(dlc);
601− return;
602− }
603−
604− if (!test_and_set_bit(RFCOMM_TTY_RELEASED,
605− &dev->flags))
606− tty_port_put(&dev->port);
607−
608− tty_port_put(&dev->port);
609− rfcomm_dlc_lock(dlc);
610− }
611− } else {
612− tty_hangup(tty);
613− tty_kref_put(tty);
614− }
615− }
583+ } else if (dlc->state == BT_CLOSED)
584+ tty_port_tty_hangup(&dev->port, false);
616585 }
617586
618587 static void rfcomm_dev_modem_status(struct rfcomm_dlc *dlc, u8 v24_sig)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t