You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
This commit is contained in:
@@ -7509,6 +7509,12 @@ S: Maintained
|
||||
F: Documentation/usb/acm.txt
|
||||
F: drivers/usb/class/cdc-acm.*
|
||||
|
||||
USB AR5523 WIRELESS DRIVER
|
||||
M: Pontus Fuchs <pontus.fuchs@gmail.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/wireless/ath/ar5523/
|
||||
|
||||
USB ATTACHED SCSI
|
||||
M: Matthew Wilcox <willy@linux.intel.com>
|
||||
M: Sarah Sharp <sarah.a.sharp@linux.intel.com>
|
||||
|
||||
@@ -43,8 +43,8 @@ static void early_nvram_init(void)
|
||||
#ifdef CONFIG_BCM47XX_SSB
|
||||
case BCM47XX_BUS_TYPE_SSB:
|
||||
mcore_ssb = &bcm47xx_bus.ssb.mipscore;
|
||||
base = mcore_ssb->flash_window;
|
||||
lim = mcore_ssb->flash_window_size;
|
||||
base = mcore_ssb->pflash.window;
|
||||
lim = mcore_ssb->pflash.window_size;
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_BCM47XX_BCMA
|
||||
|
||||
@@ -156,10 +156,10 @@ static int __init wgt634u_init(void)
|
||||
SSB_CHIPCO_IRQ_GPIO);
|
||||
}
|
||||
|
||||
wgt634u_flash_data.width = mcore->flash_buswidth;
|
||||
wgt634u_flash_resource.start = mcore->flash_window;
|
||||
wgt634u_flash_resource.end = mcore->flash_window
|
||||
+ mcore->flash_window_size
|
||||
wgt634u_flash_data.width = mcore->pflash.buswidth;
|
||||
wgt634u_flash_resource.start = mcore->pflash.window;
|
||||
wgt634u_flash_resource.end = mcore->pflash.window
|
||||
+ mcore->pflash.window_size
|
||||
- 1;
|
||||
return platform_add_devices(wgt634u_devices,
|
||||
ARRAY_SIZE(wgt634u_devices));
|
||||
|
||||
@@ -22,6 +22,23 @@ static inline u32 bcma_cc_write32_masked(struct bcma_drv_cc *cc, u16 offset,
|
||||
return value;
|
||||
}
|
||||
|
||||
void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc)
|
||||
{
|
||||
if (cc->early_setup_done)
|
||||
return;
|
||||
|
||||
if (cc->core->id.rev >= 11)
|
||||
cc->status = bcma_cc_read32(cc, BCMA_CC_CHIPSTAT);
|
||||
cc->capabilities = bcma_cc_read32(cc, BCMA_CC_CAP);
|
||||
if (cc->core->id.rev >= 35)
|
||||
cc->capabilities_ext = bcma_cc_read32(cc, BCMA_CC_CAP_EXT);
|
||||
|
||||
if (cc->capabilities & BCMA_CC_CAP_PMU)
|
||||
bcma_pmu_early_init(cc);
|
||||
|
||||
cc->early_setup_done = true;
|
||||
}
|
||||
|
||||
void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
|
||||
{
|
||||
u32 leddc_on = 10;
|
||||
@@ -30,11 +47,7 @@ void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
|
||||
if (cc->setup_done)
|
||||
return;
|
||||
|
||||
if (cc->core->id.rev >= 11)
|
||||
cc->status = bcma_cc_read32(cc, BCMA_CC_CHIPSTAT);
|
||||
cc->capabilities = bcma_cc_read32(cc, BCMA_CC_CAP);
|
||||
if (cc->core->id.rev >= 35)
|
||||
cc->capabilities_ext = bcma_cc_read32(cc, BCMA_CC_CAP_EXT);
|
||||
bcma_core_chipcommon_early_init(cc);
|
||||
|
||||
if (cc->core->id.rev >= 20) {
|
||||
bcma_cc_write32(cc, BCMA_CC_GPIOPULLUP, 0);
|
||||
|
||||
@@ -32,6 +32,9 @@ int bcma_nflash_init(struct bcma_drv_cc *cc)
|
||||
}
|
||||
|
||||
cc->nflash.present = true;
|
||||
if (cc->core->id.rev == 38 &&
|
||||
(cc->status & BCMA_CC_CHIPST_5357_NAND_BOOT))
|
||||
cc->nflash.boot = true;
|
||||
|
||||
/* Prepare platform device, but don't register it yet. It's too early,
|
||||
* malloc (required by device_private_init) is not available yet. */
|
||||
|
||||
@@ -144,7 +144,7 @@ static void bcma_pmu_workarounds(struct bcma_drv_cc *cc)
|
||||
}
|
||||
}
|
||||
|
||||
void bcma_pmu_init(struct bcma_drv_cc *cc)
|
||||
void bcma_pmu_early_init(struct bcma_drv_cc *cc)
|
||||
{
|
||||
u32 pmucap;
|
||||
|
||||
@@ -153,7 +153,10 @@ void bcma_pmu_init(struct bcma_drv_cc *cc)
|
||||
|
||||
bcma_debug(cc->core->bus, "Found rev %u PMU (capabilities 0x%08X)\n",
|
||||
cc->pmu.rev, pmucap);
|
||||
}
|
||||
|
||||
void bcma_pmu_init(struct bcma_drv_cc *cc)
|
||||
{
|
||||
if (cc->pmu.rev == 1)
|
||||
bcma_cc_mask32(cc, BCMA_CC_PMU_CTL,
|
||||
~BCMA_CC_PMU_CTL_NOILPONW);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
static struct resource bcma_sflash_resource = {
|
||||
.name = "bcma_sflash",
|
||||
.start = BCMA_SFLASH,
|
||||
.start = BCMA_SOC_FLASH2,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_MEM | IORESOURCE_READONLY,
|
||||
};
|
||||
@@ -31,15 +31,42 @@ struct bcma_sflash_tbl_e {
|
||||
};
|
||||
|
||||
static struct bcma_sflash_tbl_e bcma_sflash_st_tbl[] = {
|
||||
{ "", 0x14, 0x10000, 32, },
|
||||
{ "M25P20", 0x11, 0x10000, 4, },
|
||||
{ "M25P40", 0x12, 0x10000, 8, },
|
||||
|
||||
{ "M25P16", 0x14, 0x10000, 32, },
|
||||
{ "M25P32", 0x14, 0x10000, 64, },
|
||||
{ "M25P64", 0x16, 0x10000, 128, },
|
||||
{ "M25FL128", 0x17, 0x10000, 256, },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
static struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = {
|
||||
{ "SST25WF512", 1, 0x1000, 16, },
|
||||
{ "SST25VF512", 0x48, 0x1000, 16, },
|
||||
{ "SST25WF010", 2, 0x1000, 32, },
|
||||
{ "SST25VF010", 0x49, 0x1000, 32, },
|
||||
{ "SST25WF020", 3, 0x1000, 64, },
|
||||
{ "SST25VF020", 0x43, 0x1000, 64, },
|
||||
{ "SST25WF040", 4, 0x1000, 128, },
|
||||
{ "SST25VF040", 0x44, 0x1000, 128, },
|
||||
{ "SST25VF040B", 0x8d, 0x1000, 128, },
|
||||
{ "SST25WF080", 5, 0x1000, 256, },
|
||||
{ "SST25VF080B", 0x8e, 0x1000, 256, },
|
||||
{ "SST25VF016", 0x41, 0x1000, 512, },
|
||||
{ "SST25VF032", 0x4a, 0x1000, 1024, },
|
||||
{ "SST25VF064", 0x4b, 0x1000, 2048, },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
static struct bcma_sflash_tbl_e bcma_sflash_at_tbl[] = {
|
||||
{ "AT45DB011", 0xc, 256, 512, },
|
||||
{ "AT45DB021", 0x14, 256, 1024, },
|
||||
{ "AT45DB041", 0x1c, 256, 2048, },
|
||||
{ "AT45DB081", 0x24, 256, 4096, },
|
||||
{ "AT45DB161", 0x2c, 512, 4096, },
|
||||
{ "AT45DB321", 0x34, 512, 8192, },
|
||||
{ "AT45DB642", 0x3c, 1024, 8192, },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@@ -84,6 +111,8 @@ int bcma_sflash_init(struct bcma_drv_cc *cc)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0x13:
|
||||
return -ENOTSUPP;
|
||||
default:
|
||||
for (e = bcma_sflash_st_tbl; e->name; e++) {
|
||||
if (e->id == id)
|
||||
@@ -116,7 +145,7 @@ int bcma_sflash_init(struct bcma_drv_cc *cc)
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
sflash->window = BCMA_SFLASH;
|
||||
sflash->window = BCMA_SOC_FLASH2;
|
||||
sflash->blocksize = e->blocksize;
|
||||
sflash->numblocks = e->numblocks;
|
||||
sflash->size = sflash->blocksize * sflash->numblocks;
|
||||
|
||||
+31
-17
@@ -181,47 +181,66 @@ EXPORT_SYMBOL(bcma_cpu_clock);
|
||||
static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
|
||||
{
|
||||
struct bcma_bus *bus = mcore->core->bus;
|
||||
struct bcma_drv_cc *cc = &bus->drv_cc;
|
||||
|
||||
switch (bus->drv_cc.capabilities & BCMA_CC_CAP_FLASHT) {
|
||||
switch (cc->capabilities & BCMA_CC_CAP_FLASHT) {
|
||||
case BCMA_CC_FLASHT_STSER:
|
||||
case BCMA_CC_FLASHT_ATSER:
|
||||
bcma_debug(bus, "Found serial flash\n");
|
||||
bcma_sflash_init(&bus->drv_cc);
|
||||
bcma_sflash_init(cc);
|
||||
break;
|
||||
case BCMA_CC_FLASHT_PARA:
|
||||
bcma_debug(bus, "Found parallel flash\n");
|
||||
bus->drv_cc.pflash.window = 0x1c000000;
|
||||
bus->drv_cc.pflash.window_size = 0x02000000;
|
||||
cc->pflash.present = true;
|
||||
cc->pflash.window = BCMA_SOC_FLASH2;
|
||||
cc->pflash.window_size = BCMA_SOC_FLASH2_SZ;
|
||||
|
||||
if ((bcma_read32(bus->drv_cc.core, BCMA_CC_FLASH_CFG) &
|
||||
if ((bcma_read32(cc->core, BCMA_CC_FLASH_CFG) &
|
||||
BCMA_CC_FLASH_CFG_DS) == 0)
|
||||
bus->drv_cc.pflash.buswidth = 1;
|
||||
cc->pflash.buswidth = 1;
|
||||
else
|
||||
bus->drv_cc.pflash.buswidth = 2;
|
||||
cc->pflash.buswidth = 2;
|
||||
break;
|
||||
default:
|
||||
bcma_err(bus, "Flash type not supported\n");
|
||||
}
|
||||
|
||||
if (bus->drv_cc.core->id.rev == 38 ||
|
||||
if (cc->core->id.rev == 38 ||
|
||||
bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {
|
||||
if (bus->drv_cc.capabilities & BCMA_CC_CAP_NFLASH) {
|
||||
if (cc->capabilities & BCMA_CC_CAP_NFLASH) {
|
||||
bcma_debug(bus, "Found NAND flash\n");
|
||||
bcma_nflash_init(&bus->drv_cc);
|
||||
bcma_nflash_init(cc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
|
||||
{
|
||||
struct bcma_bus *bus = mcore->core->bus;
|
||||
|
||||
if (mcore->early_setup_done)
|
||||
return;
|
||||
|
||||
bcma_chipco_serial_init(&bus->drv_cc);
|
||||
bcma_core_mips_flash_detect(mcore);
|
||||
|
||||
mcore->early_setup_done = true;
|
||||
}
|
||||
|
||||
void bcma_core_mips_init(struct bcma_drv_mips *mcore)
|
||||
{
|
||||
struct bcma_bus *bus;
|
||||
struct bcma_device *core;
|
||||
bus = mcore->core->bus;
|
||||
|
||||
if (mcore->setup_done)
|
||||
return;
|
||||
|
||||
bcma_info(bus, "Initializing MIPS core...\n");
|
||||
|
||||
if (!mcore->setup_done)
|
||||
mcore->assigned_irqs = 1;
|
||||
bcma_core_mips_early_init(mcore);
|
||||
|
||||
mcore->assigned_irqs = 1;
|
||||
|
||||
/* Assign IRQs to all cores on the bus */
|
||||
list_for_each_entry(core, &bus->cores, list) {
|
||||
@@ -256,10 +275,5 @@ void bcma_core_mips_init(struct bcma_drv_mips *mcore)
|
||||
bcma_info(bus, "IRQ reconfiguration done\n");
|
||||
bcma_core_mips_dump_irq(bus);
|
||||
|
||||
if (mcore->setup_done)
|
||||
return;
|
||||
|
||||
bcma_chipco_serial_init(&bus->drv_cc);
|
||||
bcma_core_mips_flash_detect(mcore);
|
||||
mcore->setup_done = true;
|
||||
}
|
||||
|
||||
@@ -35,11 +35,6 @@ bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc)
|
||||
chipid_top != 0x5300)
|
||||
return false;
|
||||
|
||||
if (bus->sprom.boardflags_lo & BCMA_CORE_PCI_BFL_NOPCI) {
|
||||
bcma_info(bus, "This PCI core is disabled and not working\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
bcma_core_enable(pc->core, 0);
|
||||
|
||||
return !mips_busprobe32(tmp, pc->core->io_addr);
|
||||
@@ -396,6 +391,11 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
|
||||
|
||||
bcma_info(bus, "PCIEcore in host mode found\n");
|
||||
|
||||
if (bus->sprom.boardflags_lo & BCMA_CORE_PCI_BFL_NOPCI) {
|
||||
bcma_info(bus, "This PCIE core is disabled and not working\n");
|
||||
return;
|
||||
}
|
||||
|
||||
pc_host = kzalloc(sizeof(*pc_host), GFP_KERNEL);
|
||||
if (!pc_host) {
|
||||
bcma_err(bus, "can not allocate memory");
|
||||
@@ -452,6 +452,8 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
|
||||
pc_host->mem_resource.start = BCMA_SOC_PCI_MEM;
|
||||
pc_host->mem_resource.end = BCMA_SOC_PCI_MEM +
|
||||
BCMA_SOC_PCI_MEM_SZ - 1;
|
||||
pc_host->io_resource.start = 0x100;
|
||||
pc_host->io_resource.end = 0x47F;
|
||||
pci_membase_1G = BCMA_SOC_PCIE_DMA_H32;
|
||||
pcicore_write32(pc, BCMA_CORE_PCI_SBTOPCI0,
|
||||
tmp | BCMA_SOC_PCI_MEM);
|
||||
@@ -459,6 +461,8 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
|
||||
pc_host->mem_resource.start = BCMA_SOC_PCI1_MEM;
|
||||
pc_host->mem_resource.end = BCMA_SOC_PCI1_MEM +
|
||||
BCMA_SOC_PCI_MEM_SZ - 1;
|
||||
pc_host->io_resource.start = 0x480;
|
||||
pc_host->io_resource.end = 0x7FF;
|
||||
pci_membase_1G = BCMA_SOC_PCIE1_DMA_H32;
|
||||
pc_host->host_cfg_addr = BCMA_SOC_PCI1_CFG;
|
||||
pcicore_write32(pc, BCMA_CORE_PCI_SBTOPCI0,
|
||||
|
||||
@@ -238,7 +238,7 @@ static void __devexit bcma_host_pci_remove(struct pci_dev *dev)
|
||||
pci_set_drvdata(dev, NULL);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int bcma_host_pci_suspend(struct device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
@@ -261,11 +261,11 @@ static SIMPLE_DEV_PM_OPS(bcma_pm_ops, bcma_host_pci_suspend,
|
||||
bcma_host_pci_resume);
|
||||
#define BCMA_PM_OPS (&bcma_pm_ops)
|
||||
|
||||
#else /* CONFIG_PM */
|
||||
#else /* CONFIG_PM_SLEEP */
|
||||
|
||||
#define BCMA_PM_OPS NULL
|
||||
|
||||
#endif /* CONFIG_PM */
|
||||
#endif /* CONFIG_PM_SLEEP */
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x0576) },
|
||||
|
||||
+40
-14
@@ -81,6 +81,18 @@ struct bcma_device *bcma_find_core(struct bcma_bus *bus, u16 coreid)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bcma_find_core);
|
||||
|
||||
static struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid,
|
||||
u8 unit)
|
||||
{
|
||||
struct bcma_device *core;
|
||||
|
||||
list_for_each_entry(core, &bus->cores, list) {
|
||||
if (core->id.id == coreid && core->core_unit == unit)
|
||||
return core;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void bcma_release_core_dev(struct device *dev)
|
||||
{
|
||||
struct bcma_device *core = container_of(dev, struct bcma_device, dev);
|
||||
@@ -183,6 +195,20 @@ int __devinit bcma_bus_register(struct bcma_bus *bus)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Early init CC core */
|
||||
core = bcma_find_core(bus, bcma_cc_core_id(bus));
|
||||
if (core) {
|
||||
bus->drv_cc.core = core;
|
||||
bcma_core_chipcommon_early_init(&bus->drv_cc);
|
||||
}
|
||||
|
||||
/* Try to get SPROM */
|
||||
err = bcma_sprom_get(bus);
|
||||
if (err == -ENOENT) {
|
||||
bcma_err(bus, "No SPROM available\n");
|
||||
} else if (err)
|
||||
bcma_err(bus, "Failed to get SPROM: %d\n", err);
|
||||
|
||||
/* Init CC core */
|
||||
core = bcma_find_core(bus, bcma_cc_core_id(bus));
|
||||
if (core) {
|
||||
@@ -198,10 +224,17 @@ int __devinit bcma_bus_register(struct bcma_bus *bus)
|
||||
}
|
||||
|
||||
/* Init PCIE core */
|
||||
core = bcma_find_core(bus, BCMA_CORE_PCIE);
|
||||
core = bcma_find_core_unit(bus, BCMA_CORE_PCIE, 0);
|
||||
if (core) {
|
||||
bus->drv_pci.core = core;
|
||||
bcma_core_pci_init(&bus->drv_pci);
|
||||
bus->drv_pci[0].core = core;
|
||||
bcma_core_pci_init(&bus->drv_pci[0]);
|
||||
}
|
||||
|
||||
/* Init PCIE core */
|
||||
core = bcma_find_core_unit(bus, BCMA_CORE_PCIE, 1);
|
||||
if (core) {
|
||||
bus->drv_pci[1].core = core;
|
||||
bcma_core_pci_init(&bus->drv_pci[1]);
|
||||
}
|
||||
|
||||
/* Init GBIT MAC COMMON core */
|
||||
@@ -211,13 +244,6 @@ int __devinit bcma_bus_register(struct bcma_bus *bus)
|
||||
bcma_core_gmac_cmn_init(&bus->drv_gmac_cmn);
|
||||
}
|
||||
|
||||
/* Try to get SPROM */
|
||||
err = bcma_sprom_get(bus);
|
||||
if (err == -ENOENT) {
|
||||
bcma_err(bus, "No SPROM available\n");
|
||||
} else if (err)
|
||||
bcma_err(bus, "Failed to get SPROM: %d\n", err);
|
||||
|
||||
/* Register found cores */
|
||||
bcma_register_cores(bus);
|
||||
|
||||
@@ -275,18 +301,18 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Init CC core */
|
||||
/* Early init CC core */
|
||||
core = bcma_find_core(bus, bcma_cc_core_id(bus));
|
||||
if (core) {
|
||||
bus->drv_cc.core = core;
|
||||
bcma_core_chipcommon_init(&bus->drv_cc);
|
||||
bcma_core_chipcommon_early_init(&bus->drv_cc);
|
||||
}
|
||||
|
||||
/* Init MIPS core */
|
||||
/* Early init MIPS core */
|
||||
core = bcma_find_core(bus, BCMA_CORE_MIPS_74K);
|
||||
if (core) {
|
||||
bus->drv_mips.core = core;
|
||||
bcma_core_mips_init(&bus->drv_mips);
|
||||
bcma_core_mips_early_init(&bus->drv_mips);
|
||||
}
|
||||
|
||||
bcma_info(bus, "Early bus registered\n");
|
||||
|
||||
@@ -595,8 +595,11 @@ int bcma_sprom_get(struct bcma_bus *bus)
|
||||
bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true);
|
||||
|
||||
err = bcma_sprom_valid(sprom);
|
||||
if (err)
|
||||
if (err) {
|
||||
bcma_warn(bus, "invalid sprom read from the PCIe card, try to use fallback sprom\n");
|
||||
err = bcma_fill_sprom_with_fallback(bus, &bus->sprom);
|
||||
goto out;
|
||||
}
|
||||
|
||||
bcma_sprom_extract_r8(bus, sprom);
|
||||
|
||||
|
||||
@@ -492,7 +492,7 @@ done:
|
||||
static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
|
||||
{
|
||||
u16 buf_len = 0;
|
||||
int ret, buf_block_len, blksz;
|
||||
int ret, num_blocks, blksz;
|
||||
struct sk_buff *skb = NULL;
|
||||
u32 type;
|
||||
u8 *payload = NULL;
|
||||
@@ -514,18 +514,17 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
|
||||
}
|
||||
|
||||
blksz = SDIO_BLOCK_SIZE;
|
||||
buf_block_len = (buf_len + blksz - 1) / blksz;
|
||||
num_blocks = DIV_ROUND_UP(buf_len, blksz);
|
||||
|
||||
if (buf_len <= SDIO_HEADER_LEN
|
||||
|| (buf_block_len * blksz) > ALLOC_BUF_SIZE) {
|
||||
|| (num_blocks * blksz) > ALLOC_BUF_SIZE) {
|
||||
BT_ERR("invalid packet length: %d", buf_len);
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Allocate buffer */
|
||||
skb = bt_skb_alloc(buf_block_len * blksz + BTSDIO_DMA_ALIGN,
|
||||
GFP_ATOMIC);
|
||||
skb = bt_skb_alloc(num_blocks * blksz + BTSDIO_DMA_ALIGN, GFP_ATOMIC);
|
||||
if (skb == NULL) {
|
||||
BT_ERR("No free skb");
|
||||
goto exit;
|
||||
@@ -541,7 +540,7 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
|
||||
payload = skb->data;
|
||||
|
||||
ret = sdio_readsb(card->func, payload, card->ioport,
|
||||
buf_block_len * blksz);
|
||||
num_blocks * blksz);
|
||||
if (ret < 0) {
|
||||
BT_ERR("readsb failed: %d", ret);
|
||||
ret = -EIO;
|
||||
@@ -553,7 +552,16 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
|
||||
*/
|
||||
|
||||
buf_len = payload[0];
|
||||
buf_len |= (u16) payload[1] << 8;
|
||||
buf_len |= payload[1] << 8;
|
||||
buf_len |= payload[2] << 16;
|
||||
|
||||
if (buf_len > blksz * num_blocks) {
|
||||
BT_ERR("Skip incorrect packet: hdrlen %d buffer %d",
|
||||
buf_len, blksz * num_blocks);
|
||||
ret = -EIO;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
type = payload[3];
|
||||
|
||||
switch (type) {
|
||||
@@ -589,8 +597,7 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
|
||||
|
||||
default:
|
||||
BT_ERR("Unknown packet type:%d", type);
|
||||
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, payload,
|
||||
blksz * buf_block_len);
|
||||
BT_ERR("hex: %*ph", blksz * num_blocks, payload);
|
||||
|
||||
kfree_skb(skb);
|
||||
skb = NULL;
|
||||
@@ -849,8 +856,7 @@ static int btmrvl_sdio_host_to_card(struct btmrvl_private *priv,
|
||||
if (ret < 0) {
|
||||
i++;
|
||||
BT_ERR("i=%d writesb failed: %d", i, ret);
|
||||
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
|
||||
payload, nb);
|
||||
BT_ERR("hex: %*ph", nb, payload);
|
||||
ret = -EIO;
|
||||
if (i > MAX_WRITE_IOMEM_RETRY)
|
||||
goto exit;
|
||||
|
||||
@@ -452,7 +452,7 @@ static size_t gelic_wl_synthesize_ie(u8 *buf,
|
||||
if (rsn)
|
||||
*buf++ = WLAN_EID_RSN;
|
||||
else
|
||||
*buf++ = WLAN_EID_GENERIC;
|
||||
*buf++ = WLAN_EID_VENDOR_SPECIFIC;
|
||||
|
||||
/* length filed; set later */
|
||||
buf++;
|
||||
@@ -540,7 +540,7 @@ static void gelic_wl_parse_ie(u8 *data, size_t len,
|
||||
break;
|
||||
|
||||
switch (item_id) {
|
||||
case WLAN_EID_GENERIC:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if ((OUI_LEN + 1 <= item_len) &&
|
||||
!memcmp(pos, wpa_oui, OUI_LEN) &&
|
||||
pos[OUI_LEN] == 0x01) {
|
||||
|
||||
@@ -7433,7 +7433,7 @@ static inline char *airo_translate_scan(struct net_device *dev,
|
||||
num_null_ies++;
|
||||
break;
|
||||
|
||||
case WLAN_EID_GENERIC:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (ie[1] >= 4 &&
|
||||
ie[2] == 0x00 &&
|
||||
ie[3] == 0x50 &&
|
||||
|
||||
@@ -26,5 +26,6 @@ source "drivers/net/wireless/ath/ath5k/Kconfig"
|
||||
source "drivers/net/wireless/ath/ath9k/Kconfig"
|
||||
source "drivers/net/wireless/ath/carl9170/Kconfig"
|
||||
source "drivers/net/wireless/ath/ath6kl/Kconfig"
|
||||
source "drivers/net/wireless/ath/ar5523/Kconfig"
|
||||
|
||||
endif
|
||||
|
||||
@@ -2,6 +2,7 @@ obj-$(CONFIG_ATH5K) += ath5k/
|
||||
obj-$(CONFIG_ATH9K_HW) += ath9k/
|
||||
obj-$(CONFIG_CARL9170) += carl9170/
|
||||
obj-$(CONFIG_ATH6KL) += ath6kl/
|
||||
obj-$(CONFIG_AR5523) += ar5523/
|
||||
|
||||
obj-$(CONFIG_ATH_COMMON) += ath.o
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
config AR5523
|
||||
tristate "Atheros AR5523 wireless driver support"
|
||||
depends on MAC80211 && USB
|
||||
select FW_LOADER
|
||||
---help---
|
||||
This module add support for AR5523 based USB dongles such as D-Link
|
||||
DWL-G132, Netgear WPN111 and many more.
|
||||
@@ -0,0 +1 @@
|
||||
obj-$(CONFIG_AR5523) := ar5523.o
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user