Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/linville/wireless-next into for-davem
  • Loading branch information
linvjw committed Jul 20, 2012
2 parents 769162e + 36eb22e commit 90b90f6
Show file tree
Hide file tree
Showing 163 changed files with 5,129 additions and 2,905 deletions.
1 change: 0 additions & 1 deletion Documentation/DocBook/80211.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@
!Finclude/net/mac80211.h ieee80211_get_tkip_p1k
!Finclude/net/mac80211.h ieee80211_get_tkip_p1k_iv
!Finclude/net/mac80211.h ieee80211_get_tkip_p2k
!Finclude/net/mac80211.h ieee80211_key_removed
</chapter>

<chapter id="powersave">
Expand Down
19 changes: 19 additions & 0 deletions drivers/bcma/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@ config BCMA_DRIVER_MIPS

If unsure, say N

config BCMA_SFLASH
bool
depends on BCMA_DRIVER_MIPS && BROKEN
default y

config BCMA_NFLASH
bool
depends on BCMA_DRIVER_MIPS && BROKEN
default y

config BCMA_DRIVER_GMAC_CMN
bool "BCMA Broadcom GBIT MAC COMMON core driver"
depends on BCMA
help
Driver for the Broadcom GBIT MAC COMMON core attached to Broadcom
specific Advanced Microcontroller Bus.

If unsure, say N

config BCMA_DEBUG
bool "BCMA debugging"
depends on BCMA
Expand Down
3 changes: 3 additions & 0 deletions drivers/bcma/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
bcma-y += main.o scan.o core.o sprom.o
bcma-y += driver_chipcommon.o driver_chipcommon_pmu.o
bcma-$(CONFIG_BCMA_SFLASH) += driver_chipcommon_sflash.o
bcma-$(CONFIG_BCMA_NFLASH) += driver_chipcommon_nflash.o
bcma-y += driver_pci.o
bcma-$(CONFIG_BCMA_DRIVER_PCI_HOSTMODE) += driver_pci_host.o
bcma-$(CONFIG_BCMA_DRIVER_MIPS) += driver_mips.o
bcma-$(CONFIG_BCMA_DRIVER_GMAC_CMN) += driver_gmac_cmn.o
bcma-$(CONFIG_BCMA_HOST_PCI) += host_pci.o
bcma-$(CONFIG_BCMA_HOST_SOC) += host_soc.o
obj-$(CONFIG_BCMA) += bcma.o
Expand Down
22 changes: 22 additions & 0 deletions drivers/bcma/bcma_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,28 @@ void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
u32 bcma_pmu_alp_clock(struct bcma_drv_cc *cc);
u32 bcma_pmu_get_clockcpu(struct bcma_drv_cc *cc);

#ifdef CONFIG_BCMA_SFLASH
/* driver_chipcommon_sflash.c */
int bcma_sflash_init(struct bcma_drv_cc *cc);
#else
static inline int bcma_sflash_init(struct bcma_drv_cc *cc)
{
bcma_err(cc->core->bus, "Serial flash not supported\n");
return 0;
}
#endif /* CONFIG_BCMA_SFLASH */

#ifdef CONFIG_BCMA_NFLASH
/* driver_chipcommon_nflash.c */
int bcma_nflash_init(struct bcma_drv_cc *cc);
#else
static inline int bcma_nflash_init(struct bcma_drv_cc *cc)
{
bcma_err(cc->core->bus, "NAND flash not supported\n");
return 0;
}
#endif /* CONFIG_BCMA_NFLASH */

#ifdef CONFIG_BCMA_HOST_PCI
/* host_pci.c */
extern int __init bcma_host_pci_init(void);
Expand Down
19 changes: 19 additions & 0 deletions drivers/bcma/driver_chipcommon_nflash.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Broadcom specific AMBA
* ChipCommon NAND flash interface
*
* Licensed under the GNU/GPL. See COPYING for details.
*/

#include <linux/bcma/bcma.h>
#include <linux/bcma/bcma_driver_chipcommon.h>
#include <linux/delay.h>

#include "bcma_private.h"

/* Initialize NAND flash access */
int bcma_nflash_init(struct bcma_drv_cc *cc)
{
bcma_err(cc->core->bus, "NAND flash support is broken\n");
return 0;
}
19 changes: 19 additions & 0 deletions drivers/bcma/driver_chipcommon_sflash.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Broadcom specific AMBA
* ChipCommon serial flash interface
*
* Licensed under the GNU/GPL. See COPYING for details.
*/

#include <linux/bcma/bcma.h>
#include <linux/bcma/bcma_driver_chipcommon.h>
#include <linux/delay.h>

#include "bcma_private.h"

/* Initialize serial flash access */
int bcma_sflash_init(struct bcma_drv_cc *cc)
{
bcma_err(cc->core->bus, "Serial flash support is broken\n");
return 0;
}
14 changes: 14 additions & 0 deletions drivers/bcma/driver_gmac_cmn.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Broadcom specific AMBA
* GBIT MAC COMMON Core
*
* Licensed under the GNU/GPL. See COPYING for details.
*/

#include "bcma_private.h"
#include <linux/bcma/bcma.h>

void __devinit bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc)
{
mutex_init(&gc->phy_mutex);
}
15 changes: 12 additions & 3 deletions drivers/bcma/driver_mips.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,11 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
switch (bus->drv_cc.capabilities & BCMA_CC_CAP_FLASHT) {
case BCMA_CC_FLASHT_STSER:
case BCMA_CC_FLASHT_ATSER:
bcma_err(bus, "Serial flash not supported.\n");
bcma_debug(bus, "Found serial flash\n");
bcma_sflash_init(&bus->drv_cc);
break;
case BCMA_CC_FLASHT_PARA:
bcma_info(bus, "found parallel flash.\n");
bcma_debug(bus, "Found parallel flash\n");
bus->drv_cc.pflash.window = 0x1c000000;
bus->drv_cc.pflash.window_size = 0x02000000;

Expand All @@ -199,7 +200,15 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
bus->drv_cc.pflash.buswidth = 2;
break;
default:
bcma_err(bus, "flash not supported.\n");
bcma_err(bus, "Flash type not supported\n");
}

if (bus->drv_cc.core->id.rev == 38 ||
bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {
if (bus->drv_cc.capabilities & BCMA_CC_CAP_NFLASH) {
bcma_debug(bus, "Found NAND flash\n");
bcma_nflash_init(&bus->drv_cc);
}
}
}

Expand Down
25 changes: 20 additions & 5 deletions drivers/bcma/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ static struct bus_type bcma_bus_type = {
.dev_attrs = bcma_device_attrs,
};

static u16 bcma_cc_core_id(struct bcma_bus *bus)
{
if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706)
return BCMA_CORE_4706_CHIPCOMMON;
return BCMA_CORE_CHIPCOMMON;
}

struct bcma_device *bcma_find_core(struct bcma_bus *bus, u16 coreid)
{
struct bcma_device *core;
Expand Down Expand Up @@ -91,10 +98,12 @@ static int bcma_register_cores(struct bcma_bus *bus)
list_for_each_entry(core, &bus->cores, list) {
/* We support that cores ourself */
switch (core->id.id) {
case BCMA_CORE_4706_CHIPCOMMON:
case BCMA_CORE_CHIPCOMMON:
case BCMA_CORE_PCI:
case BCMA_CORE_PCIE:
case BCMA_CORE_MIPS_74K:
case BCMA_CORE_4706_MAC_GBIT_COMMON:
continue;
}

Expand Down Expand Up @@ -157,7 +166,7 @@ int __devinit bcma_bus_register(struct bcma_bus *bus)
}

/* Init CC core */
core = bcma_find_core(bus, BCMA_CORE_CHIPCOMMON);
core = bcma_find_core(bus, bcma_cc_core_id(bus));
if (core) {
bus->drv_cc.core = core;
bcma_core_chipcommon_init(&bus->drv_cc);
Expand All @@ -177,6 +186,13 @@ int __devinit bcma_bus_register(struct bcma_bus *bus)
bcma_core_pci_init(&bus->drv_pci);
}

/* Init GBIT MAC COMMON core */
core = bcma_find_core(bus, BCMA_CORE_4706_MAC_GBIT_COMMON);
if (core) {
bus->drv_gmac_cmn.core = core;
bcma_core_gmac_cmn_init(&bus->drv_gmac_cmn);
}

/* Try to get SPROM */
err = bcma_sprom_get(bus);
if (err == -ENOENT) {
Expand Down Expand Up @@ -208,7 +224,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
bcma_init_bus(bus);

match.manuf = BCMA_MANUF_BCM;
match.id = BCMA_CORE_CHIPCOMMON;
match.id = bcma_cc_core_id(bus);
match.class = BCMA_CL_SIM;
match.rev = BCMA_ANY_REV;

Expand All @@ -232,7 +248,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
}

/* Init CC core */
core = bcma_find_core(bus, BCMA_CORE_CHIPCOMMON);
core = bcma_find_core(bus, bcma_cc_core_id(bus));
if (core) {
bus->drv_cc.core = core;
bcma_core_chipcommon_init(&bus->drv_cc);
Expand Down Expand Up @@ -271,8 +287,7 @@ int bcma_bus_resume(struct bcma_bus *bus)
struct bcma_device *core;

/* Init CC core */
core = bcma_find_core(bus, BCMA_CORE_CHIPCOMMON);
if (core) {
if (bus->drv_cc.core) {
bus->drv_cc.setup_done = false;
bcma_core_chipcommon_init(&bus->drv_cc);
}
Expand Down
20 changes: 12 additions & 8 deletions drivers/bcma/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ struct bcma_device_id_name {
};

static const struct bcma_device_id_name bcma_arm_device_names[] = {
{ BCMA_CORE_4706_MAC_GBIT_COMMON, "BCM4706 GBit MAC Common" },
{ BCMA_CORE_ARM_1176, "ARM 1176" },
{ BCMA_CORE_ARM_7TDMI, "ARM 7TDMI" },
{ BCMA_CORE_ARM_CM3, "ARM CM3" },
Expand All @@ -33,7 +34,6 @@ static const struct bcma_device_id_name bcma_bcm_device_names[] = {
{ BCMA_CORE_4706_MAC_GBIT, "BCM4706 GBit MAC" },
{ BCMA_CORE_AMEMC, "AMEMC (DDR)" },
{ BCMA_CORE_ALTA, "ALTA (I2S)" },
{ BCMA_CORE_4706_MAC_GBIT_COMMON, "BCM4706 GBit MAC Common" },
{ BCMA_CORE_INVALID, "Invalid" },
{ BCMA_CORE_CHIPCOMMON, "ChipCommon" },
{ BCMA_CORE_ILINE20, "ILine 20" },
Expand Down Expand Up @@ -295,11 +295,15 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,

/* check if component is a core at all */
if (wrappers[0] + wrappers[1] == 0) {
/* we could save addrl of the router
if (cid == BCMA_CORE_OOB_ROUTER)
*/
bcma_erom_skip_component(bus, eromptr);
return -ENXIO;
/* Some specific cores don't need wrappers */
switch (core->id.id) {
case BCMA_CORE_4706_MAC_GBIT_COMMON:
/* Not used yet: case BCMA_CORE_OOB_ROUTER: */
break;
default:
bcma_erom_skip_component(bus, eromptr);
return -ENXIO;
}
}

if (bcma_erom_is_bridge(bus, eromptr)) {
Expand Down Expand Up @@ -487,7 +491,7 @@ int bcma_bus_scan(struct bcma_bus *bus)
core->id.manuf, core->id.id, core->id.rev,
core->id.class);

list_add(&core->list, &bus->cores);
list_add_tail(&core->list, &bus->cores);
}

if (bus->hosttype == BCMA_HOSTTYPE_SOC)
Expand Down Expand Up @@ -542,7 +546,7 @@ int __init bcma_bus_scan_early(struct bcma_bus *bus,
core->id.manuf, core->id.id, core->id.rev,
core->id.class);

list_add(&core->list, &bus->cores);
list_add_tail(&core->list, &bus->cores);
err = 0;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/bcma/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define SCAN_CIB_NMW 0x0007C000
#define SCAN_CIB_NMW_SHIFT 14
#define SCAN_CIB_NSW 0x00F80000
#define SCAN_CIB_NSW_SHIFT 17
#define SCAN_CIB_NSW_SHIFT 19
#define SCAN_CIB_REV 0xFF000000
#define SCAN_CIB_REV_SHIFT 24

Expand Down
12 changes: 12 additions & 0 deletions drivers/bluetooth/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ config BT_HCIUART_LL

Say Y here to compile support for HCILL protocol.

config BT_HCIUART_3WIRE
bool "Three-wire UART (H5) protocol support"
depends on BT_HCIUART
help
The HCI Three-wire UART Transport Layer makes it possible to
user the Bluetooth HCI over a serial port interface. The HCI
Three-wire UART Transport Layer assumes that the UART
communication may have bit errors, overrun errors or burst
errors and thereby making CTS/RTS lines unnecessary.

Say Y here to compile support for Three-wire UART protocol.

config BT_HCIBCM203X
tristate "HCI BCM203x USB driver"
depends on USB
Expand Down
1 change: 1 addition & 0 deletions drivers/bluetooth/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ hci_uart-$(CONFIG_BT_HCIUART_H4) += hci_h4.o
hci_uart-$(CONFIG_BT_HCIUART_BCSP) += hci_bcsp.o
hci_uart-$(CONFIG_BT_HCIUART_LL) += hci_ll.o
hci_uart-$(CONFIG_BT_HCIUART_ATH3K) += hci_ath.o
hci_uart-$(CONFIG_BT_HCIUART_3WIRE) += hci_h5.o
hci_uart-objs := $(hci_uart-y)
6 changes: 4 additions & 2 deletions drivers/bluetooth/bluecard_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@ static int bluecard_hci_flush(struct hci_dev *hdev)
static int bluecard_hci_open(struct hci_dev *hdev)
{
bluecard_info_t *info = hci_get_drvdata(hdev);
unsigned int iobase = info->p_dev->resource[0]->start;

if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE);
Expand All @@ -630,6 +629,8 @@ static int bluecard_hci_open(struct hci_dev *hdev)
return 0;

if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
unsigned int iobase = info->p_dev->resource[0]->start;

/* Enable LED */
outb(0x08 | 0x20, iobase + 0x30);
}
Expand All @@ -641,14 +642,15 @@ static int bluecard_hci_open(struct hci_dev *hdev)
static int bluecard_hci_close(struct hci_dev *hdev)
{
bluecard_info_t *info = hci_get_drvdata(hdev);
unsigned int iobase = info->p_dev->resource[0]->start;

if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags)))
return 0;

bluecard_hci_flush(hdev);

if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
unsigned int iobase = info->p_dev->resource[0]->start;

/* Disable LED */
outb(0x00, iobase + 0x30);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/bt3c_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ static int bt3c_check_config(struct pcmcia_device *p_dev, void *priv_data)
{
int *try = priv_data;

if (try == 0)
if (!try)
p_dev->io_lines = 16;

if ((p_dev->resource[0]->end != 8) || (p_dev->resource[0]->start == 0))
Expand Down
8 changes: 5 additions & 3 deletions drivers/bluetooth/btmrvl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ EXPORT_SYMBOL_GPL(btmrvl_interrupt);
bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
{
struct hci_event_hdr *hdr = (void *) skb->data;
struct hci_ev_cmd_complete *ec;
u16 opcode, ocf, ogf;

if (hdr->evt == HCI_EV_CMD_COMPLETE) {
struct hci_ev_cmd_complete *ec;
u16 opcode, ocf, ogf;

ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
opcode = __le16_to_cpu(ec->opcode);
ocf = hci_opcode_ocf(opcode);
Expand All @@ -64,7 +65,8 @@ bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
}

if (ogf == OGF) {
BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf);
BT_DBG("vendor event skipped: ogf 0x%4.4x ocf 0x%4.4x",
ogf, ocf);
kfree_skb(skb);
return false;
}
Expand Down
Loading

0 comments on commit 90b90f6

Please sign in to comment.