Skip to content

Commit

Permalink
Merge tag 'master-2014-11-20' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/linville/wireless-next

John W. Linville says:

====================
pull request: wireless-next 2014-11-21

Please pull this batch of updates intended for the 3.19 stream...

For the mac80211 bits, Johannes says:

"It has been a while since my last pull request, so we accumulated
another relatively large set of changes:
 * TDLS off-channel support set from Arik/Liad, with some support
   patches I did
 * custom regulatory fixes from Arik
 * minstrel VHT fix (and a small optimisation) from Felix
 * add back radiotap vendor namespace support (myself)
 * random MAC address scanning for cfg80211/mac80211/hwsim (myself)
 * CSA improvements (Luca)
 * WoWLAN Net Detect (wake on network found) support (Luca)
 * and lots of other smaller changes from many people"

For the Bluetooth bits, Johan says:

"Here's another set of patches for 3.19. Most of it is again fixes and
cleanups to ieee802154 related code from Alexander Aring. We've also got
better handling of hardware error events along with a proper API for HCI
drivers to notify the HCI core of such situations. There's also a minor
fix for mgmt events as well as a sparse warning fix. The code for
sending HCI commands synchronously also gets a fix where we might loose
the completion event in the case of very fast HW (particularly easily
reproducible with an emulated HCI device)."

And...

"Here's another bluetooth-next pull request for 3.19. We've got:

 - Various fixes, cleanups and improvements to ieee802154/mac802154
 - Support for a Broadcom BCM20702A1 variant
 - Lots of lockdep fixes
 - Fixed handling of LE CoC errors that should trigger SMP"

For the Atheros bits, Kalle says:

"One ath6kl patch and rest for ath10k, but nothing really major which
stands out. Most notable:

o fix resume (Bartosz)

o firmware restart is now faster and more reliable (Michal)

o it's now possible to test hardware restart functionality without
  crashing the firmware using hw-restart parameter with
  simulate_fw_crash debugfs file (Michal)"

On top of that...both ath9k and mwifiex get their usual level of
updates.  Of note is the ath9k spectral scan work from Oleksij Rempel.

I also pulled from the wireless tree in order to avoid some merge issues.

Please let me know if there are problems!
====================

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Nov 21, 2014
2 parents b48c5ec + 9e6f3f4 commit 53b15ef
Show file tree
Hide file tree
Showing 185 changed files with 7,784 additions and 2,190 deletions.
21 changes: 21 additions & 0 deletions Documentation/devicetree/bindings/bus/bcma.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Required properties:

The cores on the AXI bus are automatically detected by bcma with the
memory ranges they are using and they get registered afterwards.
Automatic detection of the IRQ number is not working on
BCM47xx/BCM53xx ARM SoCs. To assign IRQ numbers to the cores, provide
them manually through device tree. Use an interrupt-map to specify the
IRQ used by the devices on the bus. The first address is just an index,
because we do not have any special register.

The top-level axi bus may contain children representing attached cores
(devices). This is needed since some hardware details can't be auto
Expand All @@ -22,6 +27,22 @@ Example:
ranges = <0x00000000 0x18000000 0x00100000>;
#address-cells = <1>;
#size-cells = <1>;
#interrupt-cells = <1>;
interrupt-map-mask = <0x000fffff 0xffff>;
interrupt-map =
/* Ethernet Controller 0 */
<0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,

/* Ethernet Controller 1 */
<0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;

/* PCIe Controller 0 */
<0x00012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
<0x00012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
<0x00012000 2 &gic GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
<0x00012000 3 &gic GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
<0x00012000 4 &gic GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
<0x00012000 5 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;

chipcommon {
reg = <0x00000000 0x1000>;
Expand Down
2 changes: 1 addition & 1 deletion drivers/bcma/driver_chipcommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
return;
}

irq = bcma_core_irq(cc->core);
irq = bcma_core_irq(cc->core, 0);

/* Determine the registers of the UARTs */
cc->nr_serial_ports = (cc->capabilities & BCMA_CC_CAP_NRUART);
Expand Down
4 changes: 2 additions & 2 deletions drivers/bcma/driver_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static int bcma_gpio_irq_domain_init(struct bcma_drv_cc *cc)
handle_simple_irq);
}

hwirq = bcma_core_irq(cc->core);
hwirq = bcma_core_irq(cc->core, 0);
err = request_irq(hwirq, bcma_gpio_irq_handler, IRQF_SHARED, "gpio",
cc);
if (err)
Expand Down Expand Up @@ -183,7 +183,7 @@ static void bcma_gpio_irq_domain_exit(struct bcma_drv_cc *cc)
return;

bcma_cc_mask32(cc, BCMA_CC_IRQMASK, ~BCMA_CC_IRQ_GPIO);
free_irq(bcma_core_irq(cc->core), cc);
free_irq(bcma_core_irq(cc->core, 0), cc);
for (gpio = 0; gpio < chip->ngpio; gpio++) {
int irq = irq_find_mapping(cc->irq_domain, gpio);

Expand Down
11 changes: 2 additions & 9 deletions drivers/bcma/driver_mips.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static u32 bcma_core_mips_irqflag(struct bcma_device *dev)
* If disabled, 5 is returned.
* If not supported, 6 is returned.
*/
static unsigned int bcma_core_mips_irq(struct bcma_device *dev)
unsigned int bcma_core_mips_irq(struct bcma_device *dev)
{
struct bcma_device *mdev = dev->bus->drv_mips.core;
u32 irqflag;
Expand All @@ -133,13 +133,6 @@ static unsigned int bcma_core_mips_irq(struct bcma_device *dev)
return 5;
}

unsigned int bcma_core_irq(struct bcma_device *dev)
{
unsigned int mips_irq = bcma_core_mips_irq(dev);
return mips_irq <= 4 ? mips_irq + 2 : 0;
}
EXPORT_SYMBOL(bcma_core_irq);

static void bcma_core_mips_set_irq(struct bcma_device *dev, unsigned int irq)
{
unsigned int oldirq = bcma_core_mips_irq(dev);
Expand Down Expand Up @@ -423,7 +416,7 @@ void bcma_core_mips_init(struct bcma_drv_mips *mcore)
break;
default:
list_for_each_entry(core, &bus->cores, list) {
core->irq = bcma_core_irq(core);
core->irq = bcma_core_irq(core, 0);
}
bcma_err(bus,
"Unknown device (0x%x) found, can not configure IRQs\n",
Expand Down
4 changes: 2 additions & 2 deletions drivers/bcma/driver_pci_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ int bcma_core_pci_plat_dev_init(struct pci_dev *dev)
pr_info("PCI: Fixing up device %s\n", pci_name(dev));

/* Fix up interrupt lines */
dev->irq = bcma_core_irq(pc_host->pdev->core);
dev->irq = bcma_core_irq(pc_host->pdev->core, 0);
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);

readrq = pcie_get_readrq(dev);
Expand All @@ -617,6 +617,6 @@ int bcma_core_pci_pcibios_map_irq(const struct pci_dev *dev)

pc_host = container_of(dev->bus->ops, struct bcma_drv_pci_host,
pci_ops);
return bcma_core_irq(pc_host->pdev->core);
return bcma_core_irq(pc_host->pdev->core, 0);
}
EXPORT_SYMBOL(bcma_core_pci_pcibios_map_irq);
72 changes: 72 additions & 0 deletions drivers/bcma/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/bcma/bcma.h>
#include <linux/slab.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>

MODULE_DESCRIPTION("Broadcom's specific AMBA driver");
MODULE_LICENSE("GPL");
Expand Down Expand Up @@ -153,6 +154,46 @@ static struct device_node *bcma_of_find_child_device(struct platform_device *par
return NULL;
}

static int bcma_of_irq_parse(struct platform_device *parent,
struct bcma_device *core,
struct of_phandle_args *out_irq, int num)
{
__be32 laddr[1];
int rc;

if (core->dev.of_node) {
rc = of_irq_parse_one(core->dev.of_node, num, out_irq);
if (!rc)
return rc;
}

out_irq->np = parent->dev.of_node;
out_irq->args_count = 1;
out_irq->args[0] = num;

laddr[0] = cpu_to_be32(core->addr);
return of_irq_parse_raw(laddr, out_irq);
}

static unsigned int bcma_of_get_irq(struct platform_device *parent,
struct bcma_device *core, int num)
{
struct of_phandle_args out_irq;
int ret;

if (!parent || !parent->dev.of_node)
return 0;

ret = bcma_of_irq_parse(parent, core, &out_irq, num);
if (ret) {
bcma_debug(core->bus, "bcma_of_get_irq() failed with rc=%d\n",
ret);
return 0;
}

return irq_create_of_mapping(&out_irq);
}

static void bcma_of_fill_device(struct platform_device *parent,
struct bcma_device *core)
{
Expand All @@ -161,14 +202,45 @@ static void bcma_of_fill_device(struct platform_device *parent,
node = bcma_of_find_child_device(parent, core);
if (node)
core->dev.of_node = node;

core->irq = bcma_of_get_irq(parent, core, 0);
}
#else
static void bcma_of_fill_device(struct platform_device *parent,
struct bcma_device *core)
{
}
static inline unsigned int bcma_of_get_irq(struct platform_device *parent,
struct bcma_device *core, int num)
{
return 0;
}
#endif /* CONFIG_OF */

unsigned int bcma_core_irq(struct bcma_device *core, int num)
{
struct bcma_bus *bus = core->bus;
unsigned int mips_irq;

switch (bus->hosttype) {
case BCMA_HOSTTYPE_PCI:
return bus->host_pci->irq;
case BCMA_HOSTTYPE_SOC:
if (bus->drv_mips.core && num == 0) {
mips_irq = bcma_core_mips_irq(core);
return mips_irq <= 4 ? mips_irq + 2 : 0;
}
if (bus->host_pdev)
return bcma_of_get_irq(bus->host_pdev, core, num);
return 0;
case BCMA_HOSTTYPE_SDIO:
return 0;
}

return 0;
}
EXPORT_SYMBOL(bcma_core_irq);

void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core)
{
core->dev.release = bcma_release_core_dev;
Expand Down
9 changes: 8 additions & 1 deletion drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ static const struct usb_device_id btusb_table[] = {
{ USB_DEVICE(0x0b05, 0x17b5) },
{ USB_DEVICE(0x0b05, 0x17cb) },
{ USB_DEVICE(0x413c, 0x8197) },
{ USB_DEVICE(0x13d3, 0x3404),
.driver_info = BTUSB_BCM_PATCHRAM },

/* Foxconn - Hon Hai */
{ USB_VENDOR_AND_INTERFACE_INFO(0x0489, 0xff, 0x01, 0x01) },
Expand Down Expand Up @@ -299,6 +301,8 @@ struct btusb_data {
unsigned int sco_num;
int isoc_altsetting;
int suspend_count;

int (*recv_bulk)(struct btusb_data *data, void *buffer, int count);
};

static inline void btusb_free_frags(struct btusb_data *data)
Expand Down Expand Up @@ -590,7 +594,7 @@ static void btusb_bulk_complete(struct urb *urb)
if (urb->status == 0) {
hdev->stat.byte_rx += urb->actual_length;

if (btusb_recv_bulk(data, urb->transfer_buffer,
if (data->recv_bulk(data, urb->transfer_buffer,
urb->actual_length) < 0) {
BT_ERR("%s corrupted ACL packet", hdev->name);
hdev->stat.err_rx++;
Expand Down Expand Up @@ -2012,6 +2016,8 @@ static int btusb_probe(struct usb_interface *intf,
init_usb_anchor(&data->isoc_anchor);
spin_lock_init(&data->rxlock);

data->recv_bulk = btusb_recv_bulk;

hdev = hci_alloc_dev();
if (!hdev)
return -ENOMEM;
Expand All @@ -2035,6 +2041,7 @@ static int btusb_probe(struct usb_interface *intf,
if (id->driver_info & BTUSB_BCM_PATCHRAM) {
hdev->setup = btusb_setup_bcm_patchram;
hdev->set_bdaddr = btusb_set_bdaddr_bcm;
set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
}

if (id->driver_info & BTUSB_INTEL) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_ath.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static int ath_wakeup_ar3k(struct tty_struct *tty)

status = tty->driver->ops->tiocmget(tty);

/* Disable Automatic RTSCTS */
/* Enable Automatic RTSCTS */
ktermios.c_cflag |= CRTSCTS;
status = tty_set_termios(tty, &ktermios);

Expand Down
13 changes: 2 additions & 11 deletions drivers/bluetooth/hci_h5.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ static void h5_timed_event(unsigned long arg)
static void h5_peer_reset(struct hci_uart *hu)
{
struct h5 *h5 = hu->priv;
struct sk_buff *skb;
const unsigned char hard_err[] = { 0x10, 0x01, 0x00 };

BT_ERR("Peer device has reset");

Expand All @@ -187,15 +185,8 @@ static void h5_peer_reset(struct hci_uart *hu)
h5->tx_seq = 0;
h5->tx_ack = 0;

skb = bt_skb_alloc(3, GFP_ATOMIC);
if (!skb)
return;

bt_cb(skb)->pkt_type = HCI_EVENT_PKT;
memcpy(skb_put(skb, 3), hard_err, 3);

/* Send Hardware Error to upper stack */
hci_recv_frame(hu->hdev, skb);
/* Send reset request to upper stack */
hci_reset_dev(hu->hdev);
}

static int h5_open(struct hci_uart *hu)
Expand Down
Loading

0 comments on commit 53b15ef

Please sign in to comment.