Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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...

Signed-off-by: John W. Linville <linville@tuxdriver.com>

+128 -147
+26 -23
drivers/bcma/driver_pci.c
··· 210 210 } 211 211 } 212 212 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 - 232 213 /************************************************** 233 214 * Init. 234 215 **************************************************/ ··· 235 254 if (!pc->hostmode) 236 255 bcma_core_pci_clientmode_init(pc); 237 256 } 257 + 258 + void bcma_core_pci_power_save(struct bcma_bus *bus, bool up) 259 + { 260 + struct bcma_drv_pci *pc; 261 + u16 data; 262 + 263 + if (bus->hosttype != BCMA_HOSTTYPE_PCI) 264 + return; 265 + 266 + pc = &bus->drv_pci[0]; 267 + 268 + if (pc->core->id.rev >= 15 && pc->core->id.rev <= 20) { 269 + data = up ? 0x74 : 0x7C; 270 + bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1, 271 + BCMA_CORE_PCI_MDIO_BLK1_MGMT1, 0x7F64); 272 + bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1, 273 + BCMA_CORE_PCI_MDIO_BLK1_MGMT3, data); 274 + } else if (pc->core->id.rev >= 21 && pc->core->id.rev <= 22) { 275 + data = up ? 0x75 : 0x7D; 276 + bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1, 277 + BCMA_CORE_PCI_MDIO_BLK1_MGMT1, 0x7E65); 278 + bcma_pcie_mdio_writeread(pc, BCMA_CORE_PCI_MDIO_BLK1, 279 + BCMA_CORE_PCI_MDIO_BLK1_MGMT3, data); 280 + } 281 + } 282 + EXPORT_SYMBOL_GPL(bcma_core_pci_power_save); 238 283 239 284 int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core, 240 285 bool enable) ··· 317 310 318 311 pc = &bus->drv_pci[0]; 319 312 320 - bcma_core_pci_power_save(pc, true); 321 - 322 313 bcma_core_pci_extend_L1timer(pc, true); 323 314 } 324 315 EXPORT_SYMBOL_GPL(bcma_core_pci_up); ··· 331 326 pc = &bus->drv_pci[0]; 332 327 333 328 bcma_core_pci_extend_L1timer(pc, false); 334 - 335 - bcma_core_pci_power_save(pc, false); 336 329 } 337 330 EXPORT_SYMBOL_GPL(bcma_core_pci_down);
+2
drivers/bluetooth/ath3k.c
··· 85 85 { USB_DEVICE(0x04CA, 0x3008) }, 86 86 { USB_DEVICE(0x13d3, 0x3362) }, 87 87 { USB_DEVICE(0x0CF3, 0xE004) }, 88 + { USB_DEVICE(0x0CF3, 0xE005) }, 88 89 { USB_DEVICE(0x0930, 0x0219) }, 89 90 { USB_DEVICE(0x0489, 0xe057) }, 90 91 { USB_DEVICE(0x13d3, 0x3393) }, ··· 127 126 { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, 128 127 { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, 129 128 { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, 129 + { USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 }, 130 130 { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, 131 131 { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 }, 132 132 { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
+5
drivers/bluetooth/btusb.c
··· 102 102 103 103 /* Broadcom BCM20702A0 */ 104 104 { USB_DEVICE(0x0b05, 0x17b5) }, 105 + { USB_DEVICE(0x0b05, 0x17cb) }, 105 106 { USB_DEVICE(0x04ca, 0x2003) }, 106 107 { USB_DEVICE(0x0489, 0xe042) }, 107 108 { USB_DEVICE(0x413c, 0x8197) }, ··· 112 111 113 112 /*Broadcom devices with vendor specific id */ 114 113 { USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01) }, 114 + 115 + /* Belkin F8065bf - Broadcom based */ 116 + { USB_VENDOR_AND_INTERFACE_INFO(0x050d, 0xff, 0x01, 0x01) }, 115 117 116 118 { } /* Terminating entry */ 117 119 }; ··· 152 148 { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, 153 149 { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, 154 150 { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, 151 + { USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 }, 155 152 { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, 156 153 { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 }, 157 154 { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
-7
drivers/net/wireless/ath/ath9k/recv.c
··· 1270 1270 return; 1271 1271 1272 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 - 1279 - /* 1280 1273 * Change the default rx antenna if rx diversity 1281 1274 * chooses the other antenna 3 times in a row. 1282 1275 */
+14 -3
drivers/net/wireless/ath/ath9k/xmit.c
··· 399 399 tbf->bf_buf_addr = bf->bf_buf_addr; 400 400 memcpy(tbf->bf_desc, bf->bf_desc, sc->sc_ah->caps.tx_desc_len); 401 401 tbf->bf_state = bf->bf_state; 402 + tbf->bf_state.stale = false; 402 403 403 404 return tbf; 404 405 } ··· 1390 1389 u16 tid, u16 *ssn) 1391 1390 { 1392 1391 struct ath_atx_tid *txtid; 1392 + struct ath_txq *txq; 1393 1393 struct ath_node *an; 1394 1394 u8 density; 1395 1395 1396 1396 an = (struct ath_node *)sta->drv_priv; 1397 1397 txtid = ATH_AN_2_TID(an, tid); 1398 + txq = txtid->ac->txq; 1399 + 1400 + ath_txq_lock(sc, txq); 1398 1401 1399 1402 /* update ampdu factor/density, they may have changed. This may happen 1400 1403 * in HT IBSS when a beacon with HT-info is received after the station ··· 1421 1416 1422 1417 memset(txtid->tx_buf, 0, sizeof(txtid->tx_buf)); 1423 1418 txtid->baw_head = txtid->baw_tail = 0; 1419 + 1420 + ath_txq_unlock_complete(sc, txq); 1424 1421 1425 1422 return 0; 1426 1423 } ··· 1562 1555 __skb_unlink(bf->bf_mpdu, tid_q); 1563 1556 list_add_tail(&bf->list, &bf_q); 1564 1557 ath_set_rates(tid->an->vif, tid->an->sta, bf); 1565 - ath_tx_addto_baw(sc, tid, bf); 1566 - bf->bf_state.bf_type &= ~BUF_AGGR; 1558 + if (bf_isampdu(bf)) { 1559 + ath_tx_addto_baw(sc, tid, bf); 1560 + bf->bf_state.bf_type &= ~BUF_AGGR; 1561 + } 1567 1562 if (bf_tail) 1568 1563 bf_tail->bf_next = bf; 1569 1564 ··· 1959 1950 if (bf_is_ampdu_not_probing(bf)) 1960 1951 txq->axq_ampdu_depth++; 1961 1952 1962 - bf = bf->bf_lastbf->bf_next; 1953 + bf_last = bf->bf_lastbf; 1954 + bf = bf_last->bf_next; 1955 + bf_last->bf_next = NULL; 1963 1956 } 1964 1957 } 1965 1958 }
+13 -15
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
··· 464 464 465 465 static int brcmf_sdio_pd_probe(struct platform_device *pdev) 466 466 { 467 - int ret; 468 - 469 467 brcmf_dbg(SDIO, "Enter\n"); 470 468 471 469 brcmfmac_sdio_pdata = pdev->dev.platform_data; ··· 471 473 if (brcmfmac_sdio_pdata->power_on) 472 474 brcmfmac_sdio_pdata->power_on(); 473 475 474 - ret = sdio_register_driver(&brcmf_sdmmc_driver); 475 - if (ret) 476 - brcmf_err("sdio_register_driver failed: %d\n", ret); 477 - 478 - return ret; 476 + return 0; 479 477 } 480 478 481 479 static int brcmf_sdio_pd_remove(struct platform_device *pdev) ··· 494 500 } 495 501 }; 496 502 503 + void brcmf_sdio_register(void) 504 + { 505 + int ret; 506 + 507 + ret = sdio_register_driver(&brcmf_sdmmc_driver); 508 + if (ret) 509 + brcmf_err("sdio_register_driver failed: %d\n", ret); 510 + } 511 + 497 512 void brcmf_sdio_exit(void) 498 513 { 499 514 brcmf_dbg(SDIO, "Enter\n"); ··· 513 510 sdio_unregister_driver(&brcmf_sdmmc_driver); 514 511 } 515 512 516 - void brcmf_sdio_init(void) 513 + void __init brcmf_sdio_init(void) 517 514 { 518 515 int ret; 519 516 520 517 brcmf_dbg(SDIO, "Enter\n"); 521 518 522 519 ret = platform_driver_probe(&brcmf_sdio_pd, brcmf_sdio_pd_probe); 523 - if (ret == -ENODEV) { 524 - brcmf_dbg(SDIO, "No platform data available, registering without.\n"); 525 - ret = sdio_register_driver(&brcmf_sdmmc_driver); 526 - } 527 - 528 - if (ret) 529 - brcmf_err("driver registration failed: %d\n", ret); 520 + if (ret == -ENODEV) 521 + brcmf_dbg(SDIO, "No platform data available.\n"); 530 522 }
+2 -1
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
··· 156 156 #ifdef CONFIG_BRCMFMAC_SDIO 157 157 extern void brcmf_sdio_exit(void); 158 158 extern void brcmf_sdio_init(void); 159 + extern void brcmf_sdio_register(void); 159 160 #endif 160 161 #ifdef CONFIG_BRCMFMAC_USB 161 162 extern void brcmf_usb_exit(void); 162 - extern void brcmf_usb_init(void); 163 + extern void brcmf_usb_register(void); 163 164 #endif 164 165 165 166 #endif /* _BRCMF_BUS_H_ */
+8 -6
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
··· 1231 1231 return bus->chip << 4 | bus->chiprev; 1232 1232 } 1233 1233 1234 - static void brcmf_driver_init(struct work_struct *work) 1234 + static void brcmf_driver_register(struct work_struct *work) 1235 1235 { 1236 - brcmf_debugfs_init(); 1237 - 1238 1236 #ifdef CONFIG_BRCMFMAC_SDIO 1239 - brcmf_sdio_init(); 1237 + brcmf_sdio_register(); 1240 1238 #endif 1241 1239 #ifdef CONFIG_BRCMFMAC_USB 1242 - brcmf_usb_init(); 1240 + brcmf_usb_register(); 1243 1241 #endif 1244 1242 } 1245 - static DECLARE_WORK(brcmf_driver_work, brcmf_driver_init); 1243 + static DECLARE_WORK(brcmf_driver_work, brcmf_driver_register); 1246 1244 1247 1245 static int __init brcmfmac_module_init(void) 1248 1246 { 1247 + brcmf_debugfs_init(); 1248 + #ifdef CONFIG_BRCMFMAC_SDIO 1249 + brcmf_sdio_init(); 1250 + #endif 1249 1251 if (!schedule_work(&brcmf_driver_work)) 1250 1252 return -EBUSY; 1251 1253
+1 -1
drivers/net/wireless/brcm80211/brcmfmac/usb.c
··· 1539 1539 brcmf_release_fw(&fw_image_list); 1540 1540 } 1541 1541 1542 - void brcmf_usb_init(void) 1542 + void brcmf_usb_register(void) 1543 1543 { 1544 1544 brcmf_dbg(USB, "Enter\n"); 1545 1545 INIT_LIST_HEAD(&fw_image_list);
+4
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
··· 457 457 if (err != 0) 458 458 brcms_err(wl->wlc->hw->d11core, "%s: brcms_up() returned %d\n", 459 459 __func__, err); 460 + 461 + bcma_core_pci_power_save(wl->wlc->hw->d11core->bus, true); 460 462 return err; 461 463 } 462 464 ··· 480 478 "wl: brcms_ops_stop: chipmatch failed\n"); 481 479 return; 482 480 } 481 + 482 + bcma_core_pci_power_save(wl->wlc->hw->d11core->bus, false); 483 483 484 484 /* put driver in down state */ 485 485 spin_lock_bh(&wl->lock);
+7 -19
drivers/net/wireless/cw1200/cw1200_spi.c
··· 42 42 spinlock_t lock; /* Serialize all bus operations */ 43 43 wait_queue_head_t wq; 44 44 int claimed; 45 - int irq_disabled; 46 45 }; 47 46 48 47 #define SDIO_TO_SPI_ADDR(addr) ((addr & 0x1f)>>2) ··· 237 238 struct hwbus_priv *self = dev_id; 238 239 239 240 if (self->core) { 240 - disable_irq_nosync(self->func->irq); 241 - self->irq_disabled = 1; 242 241 cw1200_irq_handler(self->core); 243 242 return IRQ_HANDLED; 244 243 } else { ··· 250 253 251 254 pr_debug("SW IRQ subscribe\n"); 252 255 253 - ret = request_any_context_irq(self->func->irq, cw1200_spi_irq_handler, 254 - IRQF_TRIGGER_HIGH, 255 - "cw1200_wlan_irq", self); 256 + ret = request_threaded_irq(self->func->irq, NULL, 257 + cw1200_spi_irq_handler, 258 + IRQF_TRIGGER_HIGH | IRQF_ONESHOT, 259 + "cw1200_wlan_irq", self); 256 260 if (WARN_ON(ret < 0)) 257 261 goto exit; 258 262 ··· 271 273 272 274 static int cw1200_spi_irq_unsubscribe(struct hwbus_priv *self) 273 275 { 276 + int ret = 0; 277 + 274 278 pr_debug("SW IRQ unsubscribe\n"); 275 279 disable_irq_wake(self->func->irq); 276 280 free_irq(self->func->irq, self); 277 281 278 - return 0; 279 - } 280 - 281 - static int cw1200_spi_irq_enable(struct hwbus_priv *self, int enable) 282 - { 283 - /* Disables are handled by the interrupt handler */ 284 - if (enable && self->irq_disabled) { 285 - enable_irq(self->func->irq); 286 - self->irq_disabled = 0; 287 - } 288 - 289 - return 0; 282 + return ret; 290 283 } 291 284 292 285 static int cw1200_spi_off(const struct cw1200_platform_data_spi *pdata) ··· 357 368 .unlock = cw1200_spi_unlock, 358 369 .align_size = cw1200_spi_align_size, 359 370 .power_mgmt = cw1200_spi_pm, 360 - .irq_enable = cw1200_spi_irq_enable, 361 371 }; 362 372 363 373 /* Probe Function to be called by SPI stack when device is discovered */
+1 -1
drivers/net/wireless/cw1200/fwio.c
··· 485 485 486 486 /* Enable interrupt signalling */ 487 487 priv->hwbus_ops->lock(priv->hwbus_priv); 488 - ret = __cw1200_irq_enable(priv, 2); 488 + ret = __cw1200_irq_enable(priv, 1); 489 489 priv->hwbus_ops->unlock(priv->hwbus_priv); 490 490 if (ret < 0) 491 491 goto unsubscribe;
-1
drivers/net/wireless/cw1200/hwbus.h
··· 28 28 void (*unlock)(struct hwbus_priv *self); 29 29 size_t (*align_size)(struct hwbus_priv *self, size_t size); 30 30 int (*power_mgmt)(struct hwbus_priv *self, bool suspend); 31 - int (*irq_enable)(struct hwbus_priv *self, int enable); 32 31 }; 33 32 34 33 #endif /* CW1200_HWBUS_H */
-15
drivers/net/wireless/cw1200/hwio.c
··· 273 273 u16 val16; 274 274 int ret; 275 275 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 - 291 276 if (HIF_8601_SILICON == priv->hw_type) { 292 277 ret = __cw1200_reg_read_32(priv, ST90TDS_CONFIG_REG_ID, &val32); 293 278 if (ret < 0) {
+2 -1
drivers/net/wireless/mwifiex/11n_aggr.c
··· 150 150 */ 151 151 int 152 152 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, 154 154 int ptrindex, unsigned long ra_list_flags) 155 155 __releases(&priv->wmm.ra_list_spinlock) 156 156 { ··· 160 160 int pad = 0, ret; 161 161 struct mwifiex_tx_param tx_param; 162 162 struct txpd *ptx_pd = NULL; 163 + int headroom = adapter->iface_type == MWIFIEX_USB ? 0 : INTF_HEADER_LEN; 163 164 164 165 skb_src = skb_peek(&pra_list->skb_head); 165 166 if (!skb_src) {
+1 -1
drivers/net/wireless/mwifiex/11n_aggr.h
··· 26 26 int mwifiex_11n_deaggregate_pkt(struct mwifiex_private *priv, 27 27 struct sk_buff *skb); 28 28 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, 30 30 int ptr_index, unsigned long flags) 31 31 __releases(&priv->wmm.ra_list_spinlock); 32 32
+2 -3
drivers/net/wireless/mwifiex/cmdevt.c
··· 1155 1155 uint32_t conditions = le32_to_cpu(phs_cfg->params.hs_config.conditions); 1156 1156 1157 1157 if (phs_cfg->action == cpu_to_le16(HS_ACTIVATE) && 1158 - adapter->iface_type == MWIFIEX_SDIO) { 1158 + adapter->iface_type != MWIFIEX_USB) { 1159 1159 mwifiex_hs_activated_event(priv, true); 1160 1160 return 0; 1161 1161 } else { ··· 1167 1167 } 1168 1168 if (conditions != HS_CFG_CANCEL) { 1169 1169 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) 1172 1171 mwifiex_hs_activated_event(priv, true); 1173 1172 } else { 1174 1173 adapter->is_hs_configured = false;
-7
drivers/net/wireless/mwifiex/usb.c
··· 447 447 */ 448 448 adapter->is_suspended = true; 449 449 450 - for (i = 0; i < adapter->priv_num; i++) 451 - netif_carrier_off(adapter->priv[i]->netdev); 452 - 453 450 if (atomic_read(&card->rx_cmd_urb_pending) && card->rx_cmd.urb) 454 451 usb_kill_urb(card->rx_cmd.urb); 455 452 ··· 505 508 mwifiex_usb_submit_rx_urb(&card->rx_cmd, 506 509 MWIFIEX_RX_CMD_BUF_SIZE); 507 510 } 508 - 509 - for (i = 0; i < adapter->priv_num; i++) 510 - if (adapter->priv[i]->media_connected) 511 - netif_carrier_on(adapter->priv[i]->netdev); 512 511 513 512 /* Disable Host Sleep */ 514 513 if (adapter->hs_activated)
+1 -2
drivers/net/wireless/mwifiex/wmm.c
··· 1239 1239 if (enable_tx_amsdu && mwifiex_is_amsdu_allowed(priv, tid) && 1240 1240 mwifiex_is_11n_aggragation_possible(priv, ptr, 1241 1241 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); 1244 1243 /* ra_list_spinlock has been freed in 1245 1244 mwifiex_11n_aggregate_pkt() */ 1246 1245 else
+2
drivers/net/wireless/p54/p54usb.c
··· 83 83 {USB_DEVICE(0x06a9, 0x000e)}, /* Westell 802.11g USB (A90-211WG-01) */ 84 84 {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */ 85 85 {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */ 86 + {USB_DEVICE(0x07aa, 0x0020)}, /* Corega WLUSB2GTST USB */ 86 87 {USB_DEVICE(0x0803, 0x4310)}, /* Zoom 4410a */ 87 88 {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */ 88 89 {USB_DEVICE(0x083a, 0x4531)}, /* T-Com Sinus 154 data II */ ··· 980 979 if (err) { 981 980 dev_err(&priv->udev->dev, "(p54usb) cannot load firmware %s " 982 981 "(%d)!\n", p54u_fwlist[i].fw, err); 982 + usb_put_dev(udev); 983 983 } 984 984 985 985 return err;
+1 -1
drivers/net/wireless/rtlwifi/wifi.h
··· 2057 2057 that it points to the data allocated 2058 2058 beyond this structure like: 2059 2059 rtl_pci_priv or rtl_usb_priv */ 2060 - u8 priv[0]; 2060 + u8 priv[0] __aligned(sizeof(void *)); 2061 2061 }; 2062 2062 2063 2063 #define rtl_priv(hw) (((struct rtl_priv *)(hw)->priv))
+1
include/linux/bcma/bcma_driver_pci.h
··· 242 242 struct bcma_device *core, bool enable); 243 243 extern void bcma_core_pci_up(struct bcma_bus *bus); 244 244 extern void bcma_core_pci_down(struct bcma_bus *bus); 245 + extern void bcma_core_pci_power_save(struct bcma_bus *bus, bool up); 245 246 246 247 extern int bcma_core_pci_pcibios_map_irq(const struct pci_dev *dev); 247 248 extern int bcma_core_pci_plat_dev_init(struct pci_dev *dev);
+1
include/net/bluetooth/hci.h
··· 104 104 enum { 105 105 HCI_SETUP, 106 106 HCI_AUTO_OFF, 107 + HCI_RFKILLED, 107 108 HCI_MGMT, 108 109 HCI_PAIRABLE, 109 110 HCI_SERVICE_CACHE,
+20 -6
net/bluetooth/hci_core.c
··· 1146 1146 goto done; 1147 1147 } 1148 1148 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)) { 1150 1154 ret = -ERFKILL; 1151 1155 goto done; 1152 1156 } ··· 1570 1566 1571 1567 BT_DBG("%p name %s blocked %d", hdev, hdev->name, blocked); 1572 1568 1573 - if (!blocked) 1574 - return 0; 1575 - 1576 - hci_dev_do_close(hdev); 1569 + if (blocked) { 1570 + set_bit(HCI_RFKILLED, &hdev->dev_flags); 1571 + if (!test_bit(HCI_SETUP, &hdev->dev_flags)) 1572 + hci_dev_do_close(hdev); 1573 + } else { 1574 + clear_bit(HCI_RFKILLED, &hdev->dev_flags); 1575 + } 1577 1576 1578 1577 return 0; 1579 1578 } ··· 1598 1591 return; 1599 1592 } 1600 1593 1601 - if (test_bit(HCI_AUTO_OFF, &hdev->dev_flags)) 1594 + if (test_bit(HCI_RFKILLED, &hdev->dev_flags)) { 1595 + clear_bit(HCI_AUTO_OFF, &hdev->dev_flags); 1596 + hci_dev_do_close(hdev); 1597 + } else if (test_bit(HCI_AUTO_OFF, &hdev->dev_flags)) { 1602 1598 queue_delayed_work(hdev->req_workqueue, &hdev->power_off, 1603 1599 HCI_AUTO_OFF_TIMEOUT); 1600 + } 1604 1601 1605 1602 if (test_and_clear_bit(HCI_SETUP, &hdev->dev_flags)) 1606 1603 mgmt_index_added(hdev); ··· 2219 2208 hdev->rfkill = NULL; 2220 2209 } 2221 2210 } 2211 + 2212 + if (hdev->rfkill && rfkill_blocked(hdev->rfkill)) 2213 + set_bit(HCI_RFKILLED, &hdev->dev_flags); 2222 2214 2223 2215 set_bit(HCI_SETUP, &hdev->dev_flags); 2224 2216
+5 -1
net/bluetooth/hci_event.c
··· 3557 3557 cp.handle = cpu_to_le16(conn->handle); 3558 3558 3559 3559 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; 3561 3565 3562 3566 hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp); 3563 3567
+7
net/bluetooth/l2cap_core.c
··· 3755 3755 3756 3756 sk = chan->sk; 3757 3757 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 + 3758 3765 bacpy(&bt_sk(sk)->src, conn->src); 3759 3766 bacpy(&bt_sk(sk)->dst, conn->dst); 3760 3767 chan->psm = psm;
+2 -33
net/bluetooth/rfcomm/tty.c
··· 569 569 static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err) 570 570 { 571 571 struct rfcomm_dev *dev = dlc->owner; 572 - struct tty_struct *tty; 573 572 if (!dev) 574 573 return; 575 574 ··· 580 581 DPM_ORDER_DEV_AFTER_PARENT); 581 582 582 583 wake_up_interruptible(&dev->port.open_wait); 583 - } else if (dlc->state == BT_CLOSED) { 584 - tty = tty_port_tty_get(&dev->port); 585 - if (!tty) { 586 - if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) { 587 - /* Drop DLC lock here to avoid deadlock 588 - * 1. rfcomm_dev_get will take rfcomm_dev_lock 589 - * but in rfcomm_dev_add there's lock order: 590 - * rfcomm_dev_lock -> dlc lock 591 - * 2. tty_port_put will deadlock if it's 592 - * the last reference 593 - * 594 - * FIXME: when we release the lock anything 595 - * could happen to dev, even its destruction 596 - */ 597 - rfcomm_dlc_unlock(dlc); 598 - if (rfcomm_dev_get(dev->id) == NULL) { 599 - rfcomm_dlc_lock(dlc); 600 - return; 601 - } 602 - 603 - if (!test_and_set_bit(RFCOMM_TTY_RELEASED, 604 - &dev->flags)) 605 - tty_port_put(&dev->port); 606 - 607 - tty_port_put(&dev->port); 608 - rfcomm_dlc_lock(dlc); 609 - } 610 - } else { 611 - tty_hangup(tty); 612 - tty_kref_put(tty); 613 - } 614 - } 584 + } else if (dlc->state == BT_CLOSED) 585 + tty_port_tty_hangup(&dev->port, false); 615 586 } 616 587 617 588 static void rfcomm_dev_modem_status(struct rfcomm_dlc *dlc, u8 v24_sig)