summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-05-01 20:28:35 +0000
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-05-01 20:28:35 +0000
commit374bb82f67f49829cb443fe95a11d88c83675be4 (patch)
treea4af4b9a59d3ffae404928bc156a91909a87be21 /package
parent505d82b643b326b3a63484cdce6fc07e7aa28277 (diff)
brcm47xx: add fallback sprom for pci devices without an own sprom.
If there is no sprom on an ssb based pci device on the brcm47xx architecture ssb now asks the architecture code to look into the nvram to get some sprom data for this device. Now we are able to read out pci/1/1/ foo or pci/1/3/ foo config options. This will fix some problems where the wireless devices does not got an mac address and the following message was show: ssb: WARNING: Invalid SPROM CRC (corrupt SPROM) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26801 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/broadcom-wl/patches/003-compat-2.6.35.patch6
-rw-r--r--package/broadcom-wl/patches/910-fallback-sprom.patch60
2 files changed, 30 insertions, 36 deletions
diff --git a/package/broadcom-wl/patches/003-compat-2.6.35.patch b/package/broadcom-wl/patches/003-compat-2.6.35.patch
index 3bb786c14..a51cfcdf6 100644
--- a/package/broadcom-wl/patches/003-compat-2.6.35.patch
+++ b/package/broadcom-wl/patches/003-compat-2.6.35.patch
@@ -1,19 +1,17 @@
--- a/driver/wl_linux.c
+++ b/driver/wl_linux.c
-@@ -2082,8 +2082,12 @@ static void
+@@ -2082,7 +2082,11 @@ static void
_wl_set_multicast_list(struct net_device *dev)
{
wl_info_t *wl;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34)
struct dev_mc_list *mclist;
-- int i;
+#else
+ struct netdev_hw_addr *ha;
+#endif
-+ int i = 0;
+ int i;
if (!dev)
- return;
@@ -2098,14 +2102,23 @@ _wl_set_multicast_list(struct net_device
wl->pub->allmulti = (dev->flags & IFF_ALLMULTI)? TRUE: FALSE;
diff --git a/package/broadcom-wl/patches/910-fallback-sprom.patch b/package/broadcom-wl/patches/910-fallback-sprom.patch
index 2bcd77b9a..407ec5ac1 100644
--- a/package/broadcom-wl/patches/910-fallback-sprom.patch
+++ b/package/broadcom-wl/patches/910-fallback-sprom.patch
@@ -1,72 +1,68 @@
--- a/driver/bcmsrom.c
+++ b/driver/bcmsrom.c
-@@ -39,6 +39,10 @@
+@@ -39,6 +39,11 @@
#include <sbsdpcmdev.h>
#endif
-+#ifdef CONFIG_SSB
++#if defined(CONFIG_SSB_PCIHOST) && defined(CONFIG_BOARD_BCM963XX)
+#include <linux/ssb/ssb.h>
++extern struct ssb_sprom bcm63xx_sprom;
+#endif
+
#ifdef WLTEST
#include <sbsprom.h>
#endif /* WLTEST */
-@@ -2058,6 +2062,11 @@ BCMATTACHFN(initvars_srom_pci)(si_t *sih
+@@ -2058,6 +2063,10 @@ BCMATTACHFN(initvars_srom_pci)(si_t *sih
bool flash = FALSE;
int err = 0;
-+#ifdef CONFIG_SSB
-+ struct ssb_sprom *fbrom;
++#if defined(CONFIG_SSB_PCIHOST) && defined(CONFIG_BOARD_BCM963XX)
+ char eabuf[18];
+#endif
+
/*
* Apply CRC over SROM content regardless SROM is present or not,
* and use variable <devpath>sromrev's existance in flash to decide
-@@ -2120,6 +2129,62 @@ BCMATTACHFN(initvars_srom_pci)(si_t *sih
+@@ -2120,6 +2130,58 @@ BCMATTACHFN(initvars_srom_pci)(si_t *sih
goto varscont;
}
-+#ifdef CONFIG_SSB
++#if defined(CONFIG_SSB_PCIHOST) && defined(CONFIG_BOARD_BCM963XX)
+ base = vp = MALLOC(osh, MAXSZ_NVRAM_VARS);
+
+ if( base != NULL )
+ {
+ varbuf_init(&b, base, MAXSZ_NVRAM_VARS);
+
-+ /* Try to load ssb fallback sprom */
-+ if ((fbrom = ssb_get_fallback_sprom()) != NULL)
-+ {
-+ printk("Got version %i SPROM from SSB\n", fbrom->revision);
++ printk("Got version %i SPROM from SSB\n", bcm63xx_sprom.revision);
+
-+ varbuf_append(&b, vstr_sromrev, fbrom->revision);
-+ varbuf_append(&b, vstr_boardrev, fbrom->board_rev);
++ varbuf_append(&b, vstr_sromrev, bcm63xx_sprom.revision);
++ varbuf_append(&b, vstr_boardrev, bcm63xx_sprom.board_rev);
+
-+ /* ToDo: map fbrom->country_code */
-+ varbuf_append(&b, vstr_noccode);
++ /* ToDo: map bcm63xx_sprom.country_code */
++ varbuf_append(&b, vstr_noccode);
+
-+ varbuf_append(&b, vstr_aa2g, fbrom->ant_available_bg);
++ varbuf_append(&b, vstr_aa2g, bcm63xx_sprom.ant_available_bg);
+
-+ varbuf_append(&b, vstr_pa0b[0], fbrom->pa0b0);
-+ varbuf_append(&b, vstr_pa1b[0], fbrom->pa1b0);
-+ varbuf_append(&b, vstr_pa0b[1], fbrom->pa0b1);
-+ varbuf_append(&b, vstr_pa1b[1], fbrom->pa1b1);
-+ varbuf_append(&b, vstr_pa0b[2], fbrom->pa0b2);
-+ varbuf_append(&b, vstr_pa1b[2], fbrom->pa1b2);
++ varbuf_append(&b, vstr_pa0b[0], bcm63xx_sprom.pa0b0);
++ varbuf_append(&b, vstr_pa1b[0], bcm63xx_sprom.pa1b0);
++ varbuf_append(&b, vstr_pa0b[1], bcm63xx_sprom.pa0b1);
++ varbuf_append(&b, vstr_pa1b[1], bcm63xx_sprom.pa1b1);
++ varbuf_append(&b, vstr_pa0b[2], bcm63xx_sprom.pa0b2);
++ varbuf_append(&b, vstr_pa1b[2], bcm63xx_sprom.pa1b2);
+
-+ varbuf_append(&b, vstr_pa0maxpwr, fbrom->maxpwr_bg);
-+ varbuf_append(&b, vstr_pa0itssit, fbrom->itssi_bg);
++ varbuf_append(&b, vstr_pa0maxpwr, bcm63xx_sprom.maxpwr_bg);
++ varbuf_append(&b, vstr_pa0itssit, bcm63xx_sprom.itssi_bg);
+
-+ varbuf_append(&b, vstr_boardflags, (fbrom->boardflags_hi << 16) | fbrom->boardflags_lo);
-+ varbuf_append(&b, vstr_boardflags2, (fbrom->boardflags2_hi << 16) | fbrom->boardflags2_lo);
++ varbuf_append(&b, vstr_boardflags, (bcm63xx_sprom.boardflags_hi << 16) | bcm63xx_sprom.boardflags_lo);
++ varbuf_append(&b, vstr_boardflags2, (bcm63xx_sprom.boardflags2_hi << 16) | bcm63xx_sprom.boardflags2_lo);
+
-+ snprintf(eabuf, sizeof(eabuf), "%02x:%02x:%02x:%02x:%02x:%02x",
-+ fbrom->il0mac[0], fbrom->il0mac[1], fbrom->il0mac[2],
-+ fbrom->il0mac[3], fbrom->il0mac[4], fbrom->il0mac[5]
-+ );
++ snprintf(eabuf, sizeof(eabuf), "%02x:%02x:%02x:%02x:%02x:%02x",
++ bcm63xx_sprom.il0mac[0], bcm63xx_sprom.il0mac[1], bcm63xx_sprom.il0mac[2],
++ bcm63xx_sprom.il0mac[3], bcm63xx_sprom.il0mac[4], bcm63xx_sprom.il0mac[5]
++ );
+
-+ varbuf_append(&b, vstr_macaddr, eabuf);
-+ }
++ varbuf_append(&b, vstr_macaddr, eabuf);
+
+ /* final nullbyte terminator */
+ ASSERT(b.size >= 1);