Here's a patch - I'm working on a slightly old tree (I need to work with 2.6.15), but with luck it'll more or less apply. It:
* Adds defines for the PCIE and new chipcommon cores * Adds PCI device ID 0x4312 to the supported list * Assumes that a new chipcommon core behaves like an old one with a core revision of 4 or greater * Assumes that the PCIE core behaves like a PCI core of revision 6 or greater * Accepts G Phys of revision 8 and assumes that their MAC address is in et1macaddr * Disables the PCI mmio region check - it seems to be 16k on this card, rather than 8. I'm not sure what the right thing to do there is. With this patch, I can associate, DHCP and transmit and receive data. Signed-off-by: Matthew Garrett <[EMAIL PROTECTED]> -- Matthew Garrett | [EMAIL PROTECTED]
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx.h b/drivers/net/wireless/bcm43xx/bcm43xx.h index a185224..a6a3ef6 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx.h @@ -198,6 +198,8 @@ #define BCM43xx_COREID_USB20_HOST 0x819 #define BCM43xx_COREID_USB20_DEV 0x81a #define BCM43xx_COREID_SDIO_HOST 0x81b +#define BCM43xx_COREID_PCIE 0x820 +#define BCM43xx_COREID_CHIPCOMMON_NEW 0x900 /* Core Information Registers */ #define BCM43xx_CIR_BASE 0xf00 diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index c168d37..680c8c4 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c @@ -128,6 +128,8 @@ MODULE_PARM_DESC(fwpostfix, "Postfix for { PCI_VENDOR_ID_BROADCOM, 0x4301, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Broadcom 4307 802.11b */ { PCI_VENDOR_ID_BROADCOM, 0x4307, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, + /* Broadcom 4312 80211a/b/g */ + { PCI_VENDOR_ID_BROADCOM, 0x4312, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, /* Broadcom 4318 802.11b/g */ { PCI_VENDOR_ID_BROADCOM, 0x4318, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Broadcom 4306 802.11b/g */ @@ -2546,7 +2548,8 @@ static int bcm43xx_probe_cores(struct bc core_vendor = (sb_id_hi & 0xFFFF0000) >> 16; /* if present, chipcommon is always core 0; read the chipid from it */ - if (core_id == BCM43xx_COREID_CHIPCOMMON) { + if (core_id == BCM43xx_COREID_CHIPCOMMON || + core_id == BCM43xx_COREID_CHIPCOMMON_NEW) { chip_id_32 = bcm43xx_read32(bcm, 0); chip_id_16 = chip_id_32 & 0xFFFF; bcm->core_chipcommon.flags |= BCM43xx_COREFLAG_AVAILABLE; @@ -2580,7 +2583,8 @@ static int bcm43xx_probe_cores(struct bc /* ChipCommon with Core Rev >=4 encodes number of cores, * otherwise consult hardcoded table */ - if ((core_id == BCM43xx_COREID_CHIPCOMMON) && (core_rev >= 4)) { + if (((core_id == BCM43xx_COREID_CHIPCOMMON) && (core_rev >= 4)) || + core_id == BCM43xx_COREID_CHIPCOMMON_NEW) { core_count = (chip_id_32 & 0x0F000000) >> 24; } else { switch (chip_id_16) { @@ -2650,6 +2654,7 @@ static int bcm43xx_probe_cores(struct bc core = NULL; switch (core_id) { case BCM43xx_COREID_PCI: + case BCM43xx_COREID_PCIE: core = &bcm->core_pci; if (core->flags & BCM43xx_COREFLAG_AVAILABLE) { printk(KERN_WARNING PFX "Multiple PCI cores found.\n"); @@ -2708,6 +2713,7 @@ static int bcm43xx_probe_cores(struct bc case 6: case 7: case 9: + case 10: break; default: printk(KERN_ERR PFX "Error: Unsupported 80211 core revision %u\n", @@ -3002,7 +3008,7 @@ static int bcm43xx_setup_backplane_pci_c if (err) goto out; - if (bcm->core_pci.rev < 6) { + if (bcm->core_pci.rev < 6 && bcm->core_pci.id != BCM43xx_COREID_PCIE) { value = bcm43xx_read32(bcm, BCM43xx_CIR_SBINTVEC); value |= (1 << backplane_flag_nr); bcm43xx_write32(bcm, BCM43xx_CIR_SBINTVEC, value); @@ -3024,7 +3030,7 @@ static int bcm43xx_setup_backplane_pci_c value |= BCM43xx_SBTOPCI2_PREFETCH | BCM43xx_SBTOPCI2_BURST; bcm43xx_write32(bcm, BCM43xx_PCICORE_SBTOPCI2, value); - if (bcm->core_pci.rev < 5) { + if (bcm->core_pci.rev < 5 && bcm->core_pci.id != BCM43xx_COREID_PCIE) { value = bcm43xx_read32(bcm, BCM43xx_CIR_SBIMCONFIGLOW); value |= (2 << BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_SHIFT) & BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK; @@ -3350,7 +3356,7 @@ static int bcm43xx_read_phyinfo(struct b bcm->ieee->freq_band = IEEE80211_24GHZ_BAND; break; case BCM43xx_PHYTYPE_G: - if (phy_rev > 7) + if (phy_rev > 8) phy_rev_ok = 0; bcm->ieee->modulation = IEEE80211_OFDM_MODULATION | IEEE80211_CCK_MODULATION; @@ -3414,13 +3420,13 @@ static int bcm43xx_attach_board(struct b } //FIXME: Why is this check disabled for BCM947XX? What is the IO_SIZE there? #ifndef CONFIG_BCM947XX - if (mmio_len != BCM43xx_IO_SIZE) { +/* if (mmio_len != BCM43xx_IO_SIZE) { printk(KERN_ERR PFX "%s: invalid PCI mem region size(s), aborting\n", pci_name(pci_dev)); err = -ENODEV; goto err_pci_disable; - } + } */ #endif err = pci_request_regions(pci_dev, __stringify(KBUILD_MODNAME)); @@ -3515,7 +3521,9 @@ static int bcm43xx_attach_board(struct b bcm43xx_pctl_set_crystal(bcm, 0); /* Set the MAC address in the networking subsystem */ - if (bcm->current_core->phy->type == BCM43xx_PHYTYPE_A) + if (bcm->current_core->phy->type == BCM43xx_PHYTYPE_A || + (bcm->current_core->phy->type == BCM43xx_PHYTYPE_G && + bcm->current_core->phy->rev == 8)) memcpy(bcm->net_dev->dev_addr, bcm->sprom.et1macaddr, 6); else memcpy(bcm->net_dev->dev_addr, bcm->sprom.il0macaddr, 6);