Skip to content

Commit

Permalink
Staging: Add initial release of brcm80211 - Broadcom 802.11n wireless…
Browse files Browse the repository at this point in the history
… LAN driver.

Signed-off-by: Henry Ptasinski <henryp@broadcom.com>
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Henry Ptasinski authored and Greg Kroah-Hartman committed Sep 9, 2010
1 parent baa5251 commit a9533e7
Show file tree
Hide file tree
Showing 129 changed files with 115,478 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1392,6 +1392,14 @@ L: netdev@vger.kernel.org
S: Supported
F: drivers/net/tg3.*

BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
M: Brett Rudley <brudley@broadcom.com>
M: Henry Ptasinski <henryp@broadcom.com>
M: Nohee Ko <noheek@broadcom.com>
L: linux-wireless@vger.kernel.org
S: Supported
F: drivers/staging/brcm80211/

BROCADE BFA FC SCSI DRIVER
M: Jing Huang <huangj@brocade.com>
L: linux-scsi@vger.kernel.org
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ source "drivers/staging/echo/Kconfig"

source "drivers/staging/otus/Kconfig"

source "drivers/staging/brcm80211/Kconfig"

source "drivers/staging/rt2860/Kconfig"

source "drivers/staging/rt2870/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ obj-$(CONFIG_W35UND) += winbond/
obj-$(CONFIG_PRISM2_USB) += wlan-ng/
obj-$(CONFIG_ECHO) += echo/
obj-$(CONFIG_OTUS) += otus/
obj-$(CONFIG_BRCM80211)) += brcm80211/
obj-$(CONFIG_RT2860) += rt2860/
obj-$(CONFIG_RT2870) += rt2870/
obj-$(CONFIG_COMEDI) += comedi/
Expand Down
14 changes: 14 additions & 0 deletions drivers/staging/brcm80211/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
menuconfig BRCM80211
tristate "Broadcom 802.11 WLAN driver for bcm43xx chips"
depends on PCI && WLAN
select WIRELESS_EXT
select WEXT_PRIV
default N
help
If built as a module, it will be called brcm80211.ko.

config BRCM80211_PCI
bool "Broadcom 802.11 WLAN NIC driver"
depends on BRCM80211
default y

65 changes: 65 additions & 0 deletions drivers/staging/brcm80211/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#
# Makefile fragment for Broadcom 802.11n Networking Device Driver
#
# Copyright (c) 2010 Broadcom Corporation
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

EXTRA_CFLAGS := -DBCMDBG -DWLC_HIGH -DSTA -DWME -DWL11N -DDBAND -DBCMDMA32 -DBCMNVRAMR -Idrivers/staging/brcm80211/sys -Idrivers/staging/brcm80211/phy -Idrivers/staging/brcm80211/util -Idrivers/staging/brcm80211/include -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes

PCI_CFLAGS := -DWLC_LOW

BRCM80211_OFILES := \
util/siutils.o \
util/aiutils.o \
util/bcmotp.o \
util/bcmsrom.o \
util/bcmutils.o \
util/bcmwifi.o \
util/bcmwpa.o \
util/hndpmu.o \
util/linux_osl.o \
sys/wlc_alloc.o \
sys/wlc_antsel.o \
sys/wlc_channel.o \
sys/wlc_event.o \
sys/wlc_mac80211.o \
sys/wlc_rate.o \
sys/wlc_stf.o \
sys/wl_mac80211.o \
sys/wlc_ampdu.o

PCIFILES := \
phy/wlc_phy_cmn.o \
phy/wlc_phy_lcn.o \
phy/wlc_phy_n.o \
phy/wlc_phytbl_lcn.o \
phy/wlc_phytbl_n.o \
sys/wlc_bmac.o \
sys/wlc_phy_shim.o \
sys/wl_ucode_loader.o \
util/hnddma.o \
util/nicpci.o \
util/nvram/nvram_ro.o \
util/qmath.o

MODULEPFX := brcm80211

obj-m += $(MODULEPFX).o

# PCI driver
ifeq ($(CONFIG_BRCM80211_PCI),y)
EXTRA_CFLAGS += $(PCI_CFLAGS)
$(MODULEPFX)-objs = $(BRCM80211_OFILES) $(PCIFILES)
endif

Empty file.
94 changes: 94 additions & 0 deletions drivers/staging/brcm80211/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Broadcom Mac80211 driver

This is a driver in progress. It has features still to be implemented well as
bugs in current code.


What's here and not here
=======================
- Completely open source host driver, no binary object files
- Features Broadcom's OneDriver architecture (single source base for
supported chips and architectures)
- On-chip firmware loaded using standard request_firmware()
- Support for BCM43224, BCM43225, BCM4313 (PCIe NIC)
- Framework for supporting new chips, including mac80211-aware embedded chips
- Does not support older PCI/PCIe chips with SSB backplane
- Driver includes BMAC interface for transparent dongle support
- Uses minstrel_ht rate algorithm
- HW based encryption not enabled yet


What's done
==========
- Integration with mac80211 stack
- A-MPDU single & dual stream rates
- BCM43224: Dualband, Dual stream, 20MHz channels
Throughput (in chamber): ~85-90 Mbits/sec (in both 2.4 & 5 GHz bands)
- BCM43225: 2.4 GHz, Dual Stream, 20MHz channels
Throughput (in chamber): ~85-90 Mbits/sec
- BCM4313: 2.4 GHz, Single Stream
Throughput (in chamber): ~40 Mbits/sec


Things To Be Done
=================
See the TODO file


Firmware installation
======================
Firmware is available from the Linux firmware repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git
http://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git
https://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git

For all chips, copy brcm/bcm43xx-0-610-809-0.fw and
brcm/bcm43xx_hdr-0-610-809-0.fw to /lib/firmware/brcm (or wherever firmware is
normally installed on the system). In the /lib/firmware/brcm directory, then
create the following symlinks:

ln -s bcm43xx-0-610-809-0.fw bcm43xx-0.fw
ln -s bcm43xx_hdr-0-610-809-0.fw bcm43xx_hdr-0.fw


Currently supported chips
==============
PCI
Name Device ID
BCM4313 0x4727
BCM43224 0x4353
BCM43225 0x4357


Bugs/Problems
==============
- Driver can get confused while scanning during high throughput, can cause
burping, hanging, and possible crashing.
- Occasional hangs & burps with BCM43224 on 2.4 GHz with dual stream rates.
- Occasional crashes with BCM43224 on multicore machines.


Note on Regulatory Implementation
================================
This generation of chips contain additional regulatory support independent of
the driver. The devices use a single worldwide regulatory domain, with channels
12-14 (2.4 GHz band) and channels 52-64 and 100-140 (5 GHz band) restricted to
passive operation. Transmission on those channels is suppressed until
appropriate other traffic is observed on those channels.

Within the driver, we use the ficticious country code "X2" to represent this
worldwide regulatory domain. There is currently no interface to configure a
different domain.

The driver reads the SROM country code from the chip and hands it up to
mac80211 as the regulatory hint, however this information is otherwise unused
with the driver.


Contact Info:
=============
Brett Rudley brudley@broadcom.com
Henry Ptasinski henryp@broadcom.com
Nohee Ko noheek@broadcom.com

42 changes: 42 additions & 0 deletions drivers/staging/brcm80211/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
To Do List for Broadcom Mac80211 driver

Features to be added
=====================
- 40 MHz channels
- Power Save
- AP
- IBSS
- HW-based encryption
- LED support
- RFKILL
- Debugfs and debugability

Code cleanup
============
- Use proper kernel coding standards
- Remove overlap with system header files. (ie much of include/proto/*.h should
be removed)
- Purge unused variables/data structs/functions BUT keep code related to
features that are being added (ie AP mode, 40 Mhz channels, IBSS etc).
- Replace proprietary utility functions with public kernel versions.

Bugs
====
- Various occasional asserts/hangs
- Scanning during data transfer sometimes causes major slowdowns. Sometimes
revcovers when scan is done, other times not.
- Driver does not handle missing firmware gracefully.
- Mac80211 API not completely implemented (ie ops_bss_info_changed,
ops_get_stats, etc)

Other
=====
- wlc_mac80211.[ch], wl_mac80211.[ch] and linux_osl.c all need to be refactored
and combined.
- Replace driver's proprietary ssb interface with generic kernel ssb module
(only used when compiling for SDIO).
- PCI and SDIO support are currently #ifdef'ed exclusive of each other, which
leads to a separate wl.ko for each. This should be changed to runtime
handling of different interfaces so that a single binary driver can be built.
- Add support for new chips (obviously an ongoing item).

Loading

0 comments on commit a9533e7

Please sign in to comment.