add b43 fixes from #2677
authorFelix Fietkau <nbd@openwrt.org>
Sun, 11 Nov 2007 11:44:59 +0000 (11:44 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 11 Nov 2007 11:44:59 +0000 (11:44 +0000)
SVN-Revision: 9535

14 files changed:
package/b43/Makefile
package/b43/src/debugfs.c
package/b43/src/leds.c
package/b43/src/leds.h
package/b43/src/main.c
package/b43/src/pcmcia.c
package/b43/src/phy.c
package/b43/src/pio.c
package/b43/src/pio.h
package/b43/src/sysfs.c
package/b43/src/xmit.c
package/mac80211/Makefile
target/linux/brcm47xx/patches-2.6.23/400-b43-pci_ssb_bridge.patch [new file with mode: 0644]
target/linux/brcm47xx/profiles/105-Broadcom-b43.mk [new file with mode: 0644]

index 86b8621..756e83b 100644 (file)
@@ -3,7 +3,7 @@
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
-# 
+#
 # $Id: Makefile 7440 2007-06-02 02:22:01Z nbd $
 
 include $(TOPDIR)/rules.mk
@@ -14,12 +14,27 @@ PKG_RELEASE:=1
 
 include $(INCLUDE_DIR)/package.mk
 
+PKG_FWV4_NAME:=broadcom-wl
+PKG_FWV4_VERSION=4.80.53.0
+PKG_FWV4_OBJECT:=kmod/wl_apsta.o
+
+PKG_FWV4_SOURCE:=$(PKG_FWV4_NAME)-$(PKG_FWV4_VERSION).tar.bz2
+PKG_FWV4_SOURCE_URL:=http://downloads.openwrt.org/sources/
+PKG_FWV4_MD5SUM:=a7d8dde3ce474c361143b83e1d9890b1
+
+PKG_FWCUTTER_NAME:=b43-fwcutter
+PKG_FWCUTTER_VERSION=008
+
+PKG_FWCUTTER_SOURCE:=$(PKG_FWCUTTER_NAME)-$(PKG_FWCUTTER_VERSION).tar.bz2
+PKG_FWCUTTER_SOURCE_URL:=http://download.berlios.de/bcm43xx/
+PKG_FWCUTTER_MD5SUM:=3f7fbf4f8dcd296c6d1b0d42eab0f9ac
+
 define KernelPackage/b43
   SUBMENU:=Wireless Drivers
   TITLE:=Broadcom 43xx wireless support
-  DEPENDS:=@TARGET_brcm47xx +kmod-mac80211 @BROKEN
+  DEPENDS:=@TARGET_brcm47xx +kmod-mac80211
   FILES:=$(PKG_BUILD_DIR)/b43.$(LINUX_KMOD_SUFFIX)
-#  AUTOLOAD:=$(call AutoLoad,30,b43)
+  AUTOLOAD:=$(call AutoLoad,30,b43)
 endef
 
 define KernelPackage/b43/description
@@ -44,9 +59,20 @@ MAKE_OPTS:= \
        LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/mac80211 -I$(LINUX_DIR)/include -include linux/autoconf.h" \
        $(EXTRA_KCONFIG)
 
+$(STAMP_PREPARED): $(DL_DIR)/$(PKG_FWV4_SOURCE) $(DL_DIR)/$(PKG_FWCUTTER_SOURCE)
+
+$(DL_DIR)/$(PKG_FWV4_SOURCE):
+       $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_FWV4_SOURCE)" "$(PKG_FWV4_MD5SUM)" $(PKG_FWV4_SOURCE_URL)
+
+$(DL_DIR)/$(PKG_FWCUTTER_SOURCE):
+       $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_FWCUTTER_SOURCE)" "$(PKG_FWCUTTER_MD5SUM)" $(PKG_FWCUTTER_SOURCE_URL)
+
+
 define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
        $(CP) ./src/* $(PKG_BUILD_DIR)/
+       tar xjf "$(DL_DIR)/$(PKG_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
+       tar xjf "$(DL_DIR)/$(PKG_FWCUTTER_SOURCE)" -C "$(PKG_BUILD_DIR)"
 endef
 
 define Build/Configure
@@ -56,6 +82,16 @@ define Build/Compile
        $(MAKE) -C "$(LINUX_DIR)" \
                $(MAKE_OPTS) \
                modules
+
+       $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_FWCUTTER_NAME)-$(PKG_FWCUTTER_VERSION)"
+endef
+
+define KernelPackage/b43/install
+       $(INSTALL_DIR) $(1)/lib/firmware/
+
+       $(PKG_BUILD_DIR)/$(PKG_FWCUTTER_NAME)-$(PKG_FWCUTTER_VERSION)/b43-fwcutter \
+       -w $(1)/lib/firmware/ \
+       $(PKG_BUILD_DIR)/$(PKG_FWV4_NAME)-$(PKG_FWV4_VERSION)/$(PKG_FWV4_OBJECT)
 endef
 
 $(eval $(call KernelPackage,b43))
index b5c589e..734e70e 100644 (file)
@@ -39,7 +39,7 @@
 
 
 /* The root directory. */
-struct dentry *rootdir;
+static struct dentry *rootdir;
 
 struct b43_debugfs_fops {
        ssize_t (*read)(struct b43_wldev *dev, char *buf, size_t bufsize);
@@ -76,7 +76,8 @@ struct b43_dfs_file * fops_to_dfs_file(struct b43_wldev *dev,
 
 
 /* wl->irq_lock is locked */
-ssize_t tsf_read_file(struct b43_wldev *dev, char *buf, size_t bufsize)
+static ssize_t tsf_read_file(struct b43_wldev *dev,
+                            char *buf, size_t bufsize)
 {
        ssize_t count = 0;
        u64 tsf;
@@ -90,7 +91,8 @@ ssize_t tsf_read_file(struct b43_wldev *dev, char *buf, size_t bufsize)
 }
 
 /* wl->irq_lock is locked */
-int tsf_write_file(struct b43_wldev *dev, const char *buf, size_t count)
+static int tsf_write_file(struct b43_wldev *dev,
+                         const char *buf, size_t count)
 {
        u64 tsf;
 
@@ -102,7 +104,8 @@ int tsf_write_file(struct b43_wldev *dev, const char *buf, size_t count)
 }
 
 /* wl->irq_lock is locked */
-ssize_t ucode_regs_read_file(struct b43_wldev *dev, char *buf, size_t bufsize)
+static ssize_t ucode_regs_read_file(struct b43_wldev *dev,
+                                   char *buf, size_t bufsize)
 {
        ssize_t count = 0;
        int i;
@@ -116,7 +119,8 @@ ssize_t ucode_regs_read_file(struct b43_wldev *dev, char *buf, size_t bufsize)
 }
 
 /* wl->irq_lock is locked */
-ssize_t shm_read_file(struct b43_wldev *dev, char *buf, size_t bufsize)
+static ssize_t shm_read_file(struct b43_wldev *dev,
+                            char *buf, size_t bufsize)
 {
        ssize_t count = 0;
        int i;
@@ -135,7 +139,8 @@ ssize_t shm_read_file(struct b43_wldev *dev, char *buf, size_t bufsize)
        return count;
 }
 
-ssize_t txstat_read_file(struct b43_wldev *dev, char *buf, size_t bufsize)
+static ssize_t txstat_read_file(struct b43_wldev *dev,
+                               char *buf, size_t bufsize)
 {
        struct b43_txstatus_log *log = &dev->dfsentry->txstatlog;
        ssize_t count = 0;
@@ -182,7 +187,8 @@ out_unlock:
        return count;
 }
 
-ssize_t txpower_g_read_file(struct b43_wldev *dev, char *buf, size_t bufsize)
+static ssize_t txpower_g_read_file(struct b43_wldev *dev,
+                                  char *buf, size_t bufsize)
 {
        ssize_t count = 0;
 
@@ -214,7 +220,8 @@ out:
        return count;
 }
 
-int txpower_g_write_file(struct b43_wldev *dev, const char *buf, size_t count)
+static int txpower_g_write_file(struct b43_wldev *dev,
+                               const char *buf, size_t count)
 {
        unsigned long phy_flags;
 
@@ -253,7 +260,8 @@ int txpower_g_write_file(struct b43_wldev *dev, const char *buf, size_t count)
 }
 
 /* wl->irq_lock is locked */
-int restart_write_file(struct b43_wldev *dev, const char *buf, size_t count)
+static int restart_write_file(struct b43_wldev *dev,
+                             const char *buf, size_t count)
 {
        int err = 0;
 
@@ -285,7 +293,8 @@ static ssize_t append_lo_table(ssize_t count, char *buf, const size_t bufsize,
        return count;
 }
 
-ssize_t loctls_read_file(struct b43_wldev *dev, char *buf, size_t bufsize)
+static ssize_t loctls_read_file(struct b43_wldev *dev,
+                               char *buf, size_t bufsize)
 {
        ssize_t count = 0;
        struct b43_txpower_lo_control *lo;
@@ -374,6 +383,8 @@ static ssize_t b43_debugfs_read(struct file *file, char __user *userbuf,
                        err = -ENOMEM;
                        goto out_unlock;
                }
+               /* Sparse warns about the following memset, because it has a big
+                * size value. That warning is bogus, so I will ignore it. --mb */
                memset(buf, 0, bufsize);
                if (dfops->take_irqlock) {
                        spin_lock_irq(&dev->wl->irq_lock);
index 3099e62..19e5885 100644 (file)
@@ -29,6 +29,7 @@
 #include "b43.h"
 #include "leds.h"
 
+
 static void b43_led_turn_on(struct b43_wldev *dev, u8 led_index,
                            bool activelow)
 {
index 713e180..b8b1dd5 100644 (file)
@@ -23,7 +23,6 @@ struct b43_led {
        /* The unique name string for this LED device. */
        char name[B43_LED_MAX_NAME_LEN + 1];
 };
-#define b43_led_index(led)     ((int)((led) - (led)->dev->leds))
 
 #define B43_LED_BEHAVIOUR              0x7F
 #define B43_LED_ACTIVELOW              0x80
index 4146fdf..9f8175c 100644 (file)
@@ -49,7 +49,6 @@
 #include "pio.h"
 #include "sysfs.h"
 #include "xmit.h"
-#include "sysfs.h"
 #include "lo.h"
 #include "pcmcia.h"
 
@@ -107,6 +106,23 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
 
 MODULE_DEVICE_TABLE(ssb, b43_ssb_tbl);
 
+static const struct pci_device_id b43_pci_bridge_tbl[] = {
+       { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4311) },
+       { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4312) },
+       { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4318) },
+       { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4319) },
+       { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4320) },
+       { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4321) },
+       { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4324) },
+       { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4325) },
+       { 0, },
+};
+MODULE_DEVICE_TABLE(pci, b43_pci_bridge_tbl);
+
+static struct pci_driver b43_pci_bridge_driver = {
+       .name = "b43-pci-bridge",
+       .id_table = b43_pci_bridge_tbl,
+};
 /* Channel and ratetables are shared for all devices.
  * They can't be const, because ieee80211 puts some precalculated
  * data in there. This data is the same for all devices, so we don't
@@ -1045,7 +1061,7 @@ static void handle_irq_noise(struct b43_wldev *dev)
        B43_WARN_ON(!dev->noisecalc.calculation_running);
        if (dev->noisecalc.channel_at_start != phy->channel)
                goto drop_calculation;
-       *((u32 *) noise) = cpu_to_le32(b43_jssi_read(dev));
+       *((__le32 *)noise) = cpu_to_le32(b43_jssi_read(dev));
        if (noise[0] == 0x7F || noise[1] == 0x7F ||
            noise[2] == 0x7F || noise[3] == 0x7F)
                goto generate_new;
@@ -1575,8 +1591,7 @@ static int do_request_fw(struct b43_wldev *dev,
                         const char *name,
                         const struct firmware **fw)
 {
-       const size_t plen = sizeof(modparam_fwpostfix) + 32;
-       char path[plen];
+       char path[sizeof(modparam_fwpostfix) + 32];
        struct b43_fw_header *hdr;
        u32 size;
        int err;
@@ -2393,7 +2408,7 @@ out_requeue:
        if (b43_debug(dev, B43_DBG_PWORK_FAST))
                delay = msecs_to_jiffies(50);
        else
-               delay = round_jiffies(HZ * 15);
+               delay = round_jiffies_relative(HZ * 15);
        queue_delayed_work(wl->hw->workqueue, &dev->periodic_work, delay);
 out:
        mutex_unlock(&wl->mutex);
@@ -3495,7 +3510,7 @@ static int b43_start(struct ieee80211_hw *hw)
        struct b43_wl *wl = hw_to_b43_wl(hw);
        struct b43_wldev *dev = wl->current_dev;
        int did_init = 0;
-       int err;
+       int err = 0;
 
        mutex_lock(&wl->mutex);
 
@@ -3521,7 +3536,7 @@ static int b43_start(struct ieee80211_hw *hw)
        return err;
 }
 
-void b43_stop(struct ieee80211_hw *hw)
+static void b43_stop(struct ieee80211_hw *hw)
 {
        struct b43_wl *wl = hw_to_b43_wl(hw);
        struct b43_wldev *dev = wl->current_dev;
@@ -4038,6 +4053,16 @@ static struct ssb_driver b43_ssb_driver = {
        .resume         = b43_resume,
 };
 
+inline int b43_pci_ssb_bridge_init(void)
+{
+       return ssb_pcihost_register(&b43_pci_bridge_driver);
+}
+
+inline void b43_pci_ssb_bridge_exit(void)
+{
+       ssb_pcihost_unregister(&b43_pci_bridge_driver);
+}
+
 static int __init b43_init(void)
 {
        int err;
@@ -4046,12 +4071,19 @@ static int __init b43_init(void)
        err = b43_pcmcia_init();
        if (err)
                goto err_dfs_exit;
-       err = ssb_driver_register(&b43_ssb_driver);
+
+       err = b43_pci_ssb_bridge_init();
        if (err)
                goto err_pcmcia_exit;
 
+       err = ssb_driver_register(&b43_ssb_driver);
+       if (err)
+               goto err_pci_exit;
+
        return err;
 
+err_pci_exit:
+       b43_pci_ssb_bridge_exit();
 err_pcmcia_exit:
        b43_pcmcia_exit();
 err_dfs_exit:
@@ -4062,6 +4094,7 @@ err_dfs_exit:
 static void __exit b43_exit(void)
 {
        ssb_driver_unregister(&b43_ssb_driver);
+       b43_pci_ssb_bridge_exit();
        b43_pcmcia_exit();
        b43_debugfs_exit();
 }
index 3e75a8a..b242a9a 100644 (file)
@@ -21,6 +21,8 @@
 
 */
 
+#include "pcmcia.h"
+
 #include <linux/ssb/ssb.h>
 
 #include <pcmcia/cs_types.h>
@@ -30,6 +32,7 @@
 #include <pcmcia/ds.h>
 #include <pcmcia/cisreg.h>
 
+
 static /*const */ struct pcmcia_device_id b43_pcmcia_tbl[] = {
        PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x448),
        PCMCIA_DEVICE_NULL,
index 5f7ffa0..3d4ed64 100644 (file)
@@ -26,6 +26,7 @@
 */
 
 #include <linux/delay.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "b43.h"
index 4ac91fd..67752a2 100644 (file)
@@ -60,7 +60,7 @@ static u16 tx_get_next_word(const u8 * txhdr,
                source = packet;
                i -= txhdr_size;
        }
-       ret = le16_to_cpu(*((u16 *) (source + i)));
+       ret = le16_to_cpu(*((__le16 *)(source + i)));
        *pos += 2;
 
        return ret;
@@ -104,7 +104,7 @@ static u16 generate_cookie(struct b43_pioqueue *queue,
                           struct b43_pio_txpacket *packet)
 {
        u16 cookie = 0x0000;
-       int packetindex;
+       u16 packetindex;
 
        /* We use the upper 4 bits for the PIO
         * controller ID and the lower 12 bits
@@ -125,7 +125,7 @@ static u16 generate_cookie(struct b43_pioqueue *queue,
        default:
                B43_WARN_ON(1);
        }
-       packetindex = pio_txpacket_getindex(packet);
+       packetindex = packet->index;
        B43_WARN_ON(packetindex & ~0x0FFF);
        cookie |= (u16) packetindex;
 
@@ -286,6 +286,7 @@ static void setup_txqueues(struct b43_pioqueue *queue)
 
                packet->queue = queue;
                INIT_LIST_HEAD(&packet->list);
+               packet->index = i;
 
                list_add(&packet->list, &queue->txfree);
        }
@@ -518,9 +519,10 @@ static void pio_rx_error(struct b43_pioqueue *queue,
 
 void b43_pio_rx(struct b43_pioqueue *queue)
 {
-       u16 preamble[21] = { 0 };
+       __le16 preamble[21] = { 0 };
        struct b43_rxhdr_fw4 *rxhdr;
-       u16 tmp, len, macstat;
+       u16 tmp, len;
+       u32 macstat;
        int i, preamble_readwords;
        struct sk_buff *skb;
 
@@ -537,7 +539,7 @@ void b43_pio_rx(struct b43_pioqueue *queue)
        }
        b43dbg(queue->dev->wl, "PIO RX timed out\n");
        return;
-      data_ready:
+data_ready:
 
        len = b43_pio_read(queue, B43_PIO_RXDATA);
        if (unlikely(len > 0x700)) {
@@ -558,7 +560,7 @@ void b43_pio_rx(struct b43_pioqueue *queue)
                preamble[i + 1] = cpu_to_le16(tmp);
        }
        rxhdr = (struct b43_rxhdr_fw4 *)preamble;
-       macstat = le16_to_cpu(rxhdr->mac_status);
+       macstat = le32_to_cpu(rxhdr->mac_status);
        if (macstat & B43_RX_MAC_FCSERR) {
                pio_rx_error(queue,
                             (queue->mmio_base == B43_MMIO_PIO1_BASE),
@@ -583,7 +585,7 @@ void b43_pio_rx(struct b43_pioqueue *queue)
        skb_put(skb, len);
        for (i = 0; i < len - 1; i += 2) {
                tmp = b43_pio_read(queue, B43_PIO_RXDATA);
-               *((u16 *) (skb->data + i)) = cpu_to_le16(tmp);
+               *((__le16 *)(skb->data + i)) = cpu_to_le16(tmp);
        }
        if (len % 2) {
                tmp = b43_pio_read(queue, B43_PIO_RXDATA);
index 46d6d2e..3488f24 100644 (file)
@@ -4,6 +4,7 @@
 #include "b43.h"
 
 #include <linux/interrupt.h>
+#include <linux/io.h>
 #include <linux/list.h>
 #include <linux/skbuff.h>
 
@@ -39,10 +40,9 @@ struct b43_pio_txpacket {
        struct sk_buff *skb;
        struct ieee80211_tx_status txstat;
        struct list_head list;
+       u16 index; /* Index in the tx_packets_cache */
 };
 
-#define pio_txpacket_getindex(packet) ((int)((packet) - (packet)->queue->tx_packets_cache))
-
 struct b43_pioqueue {
        struct b43_wldev *dev;
        u16 mmio_base;
index fcb7773..f4faff6 100644 (file)
 
 */
 
+#include <linux/capability.h>
+#include <linux/io.h>
+
 #include "b43.h"
 #include "sysfs.h"
 #include "main.h"
 #include "phy.h"
 
-#include <linux/capability.h>
-
 #define GENERIC_FILESIZE       64
 
 static int get_integer(const char *buf, size_t count)
index e6174b6..0bd6f8a 100644 (file)
@@ -121,10 +121,12 @@ void b43_generate_plcp_hdr(struct b43_plcp_hdr4 *plcp,
        __u8 *raw = plcp->raw;
 
        if (b43_is_ofdm_rate(bitrate)) {
-               *data = b43_plcp_get_ratecode_ofdm(bitrate);
+               u32 d;
+
+               d = b43_plcp_get_ratecode_ofdm(bitrate);
                B43_WARN_ON(octets & 0xF000);
-               *data |= (octets << 5);
-               *data = cpu_to_le32(*data);
+               d |= (octets << 5);
+               *data = cpu_to_le32(d);
        } else {
                u32 plen;
 
index e288354..476160d 100644 (file)
@@ -17,7 +17,7 @@ include $(INCLUDE_DIR)/package.mk
 define KernelPackage/mac80211
   SUBMENU:=Wireless Drivers
   TITLE:=Linux 802.11 Wireless Networking Stack
-  DEPENDS:=@LINUX_2_6_23 +kmod-crypto-arc4 +kmod-crypto-aes
+  DEPENDS:=@LINUX_2_6_23 +kmod-crypto-arc4 +kmod-crypto-aes +wireless-tools
   FILES:= \
        $(PKG_BUILD_DIR)/mac80211/mac80211.$(LINUX_KMOD_SUFFIX) \
        $(PKG_BUILD_DIR)/mac80211/rc80211_simple.$(LINUX_KMOD_SUFFIX) \
diff --git a/target/linux/brcm47xx/patches-2.6.23/400-b43-pci_ssb_bridge.patch b/target/linux/brcm47xx/patches-2.6.23/400-b43-pci_ssb_bridge.patch
new file mode 100644 (file)
index 0000000..6a7eabe
--- /dev/null
@@ -0,0 +1,111 @@
+diff -Naur linux-2.6.23.1.orig/drivers/ssb/b43_pci_bridge.c linux-2.6.23.1/drivers/ssb/b43_pci_bridge.c
+--- linux-2.6.23.1.orig/drivers/ssb/b43_pci_bridge.c   2007-11-09 16:48:55.000000000 +0100
++++ linux-2.6.23.1/drivers/ssb/b43_pci_bridge.c        1970-01-01 01:00:00.000000000 +0100
+@@ -1,48 +0,0 @@
+-/*
+- * Broadcom 43xx PCI-SSB bridge module
+- *
+- * This technically is a seperate PCI driver module, but
+- * because of its small size we include it in the SSB core
+- * instead of creating a standalone module.
+- *
+- * Copyright 2007  Michael Buesch <mb@bu3sch.de>
+- *
+- * Licensed under the GNU/GPL. See COPYING for details.
+- */
+-
+-#include <linux/pci.h>
+-#include <linux/ssb/ssb.h>
+-
+-#include "ssb_private.h"
+-
+-
+-static const struct pci_device_id b43_pci_bridge_tbl[] = {
+-      { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4301) },
+-      { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4307) },
+-      { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4311) },
+-      { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4312) },
+-      { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4318) },
+-      { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4319) },
+-      { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4320) },
+-      { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4321) },
+-      { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4324) },
+-      { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4325) },
+-      { 0, },
+-};
+-MODULE_DEVICE_TABLE(pci, b43_pci_bridge_tbl);
+-
+-static struct pci_driver b43_pci_bridge_driver = {
+-      .name = "b43-pci-bridge",
+-      .id_table = b43_pci_bridge_tbl,
+-};
+-
+-
+-int __init b43_pci_ssb_bridge_init(void)
+-{
+-      return ssb_pcihost_register(&b43_pci_bridge_driver);
+-}
+-
+-void __exit b43_pci_ssb_bridge_exit(void)
+-{
+-      ssb_pcihost_unregister(&b43_pci_bridge_driver);
+-}
+diff -Naur linux-2.6.23.1.orig/drivers/ssb/main.c linux-2.6.23.1/drivers/ssb/main.c
+--- linux-2.6.23.1.orig/drivers/ssb/main.c     2007-11-09 16:48:55.000000000 +0100
++++ linux-2.6.23.1/drivers/ssb/main.c  2007-11-09 22:11:32.000000000 +0100
+@@ -1142,21 +1142,12 @@
+       if (err)
+               bus_unregister(&ssb_bustype);
+-      err = b43_pci_ssb_bridge_init();
+-      if (err) {
+-              ssb_printk(KERN_ERR "Broadcom 43xx PCI-SSB-bridge "
+-                         "initialization failed");
+-              /* don't fail SSB init because of this */
+-              err = 0;
+-      }
+-
+       return err;
+ }
+ subsys_initcall(ssb_modinit);
+ static void __exit ssb_modexit(void)
+ {
+-      b43_pci_ssb_bridge_exit();
+       bus_unregister(&ssb_bustype);
+ }
+ module_exit(ssb_modexit)
+diff -Naur linux-2.6.23.1.orig/drivers/ssb/Makefile linux-2.6.23.1/drivers/ssb/Makefile
+--- linux-2.6.23.1.orig/drivers/ssb/Makefile   2007-11-09 16:48:55.000000000 +0100
++++ linux-2.6.23.1/drivers/ssb/Makefile        2007-11-09 22:30:32.000000000 +0100
+@@ -11,8 +11,4 @@
+ ssb-$(CONFIG_SSB_DRIVER_EXTIF)                += driver_extif.o
+ ssb-$(CONFIG_SSB_DRIVER_PCICORE)      += driver_pcicore.o
+-# b43 pci-ssb-bridge driver
+-# Not strictly a part of SSB, but kept here for convenience
+-ssb-$(CONFIG_SSB_PCIHOST)             += b43_pci_bridge.o
+-
+ obj-$(CONFIG_SSB)                     += ssb.o
+diff -Naur linux-2.6.23.1.orig/drivers/ssb/ssb_private.h linux-2.6.23.1/drivers/ssb/ssb_private.h
+--- linux-2.6.23.1.orig/drivers/ssb/ssb_private.h      2007-11-09 16:48:55.000000000 +0100
++++ linux-2.6.23.1/drivers/ssb/ssb_private.h   2007-11-09 22:11:11.000000000 +0100
+@@ -119,18 +119,4 @@
+ extern int ssb_devices_thaw(struct ssb_bus *bus);
+ extern struct ssb_bus *ssb_pci_dev_to_bus(struct pci_dev *pdev);
+-/* b43_pci_bridge.c */
+-#ifdef CONFIG_SSB_PCIHOST
+-extern int __init b43_pci_ssb_bridge_init(void);
+-extern void __exit b43_pci_ssb_bridge_exit(void);
+-#else /* CONFIG_SSB_PCIHOST */
+-static inline int b43_pci_ssb_bridge_init(void)
+-{
+-      return 0;
+-}
+-static inline void b43_pci_ssb_bridge_exit(void)
+-{
+-}
+-#endif /* CONFIG_SSB_PCIHOST */
+-
+ #endif /* LINUX_SSB_PRIVATE_H_ */
diff --git a/target/linux/brcm47xx/profiles/105-Broadcom-b43.mk b/target/linux/brcm47xx/profiles/105-Broadcom-b43.mk
new file mode 100644 (file)
index 0000000..56712a5
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Broadcom-b43
+  NAME:=Broadcom BCM43xx WiFi
+  PACKAGES:=kmod-b43
+endef
+
+define Profile/Broadcom-b43/Description
+       Package set compatible with hardware using Broadcom BCM43xx cards
+endef
+$(eval $(call Profile,Broadcom-b43))
+