History log of /drivers/net/wireless/b43/main.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dbdedbdf4fbff3d4962a0786f37aa86dfdc48a7e 26-Apr-2012 Seth Forshee <seth.forshee@canonical.com> b43: only reload config after successful initialization

Commit 2a19032 (b43: reload phy and bss settings after core restarts)
introduced an unconditional call to b43_op_config() at the end of
b43_op_start(). When firmware fails to load this can wedge the system.
There's no need to reload the configuration after a failed
initialization anyway, so only make the call if initialization was
successful.

BugLink: http://bugs.launchpad.net/bugs/950295
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6b6fa5868eec26bdc6a83543cebb8cf832a2645a 09-Mar-2012 Larry Finger <Larry.Finger@lwfinger.net> b43: Load firmware from a work queue and not from the probe routine

Recent changes in udev are causing problems for drivers that load firmware
from the probe routine. As b43 has such a structure, it must be changed.
As this driver loads more than 1 firmware file, changing to the asynchronous routine
request_firmware_nowait() would be complicated. In this implementation, the probe
routine starts a queue that calls the firmware loading routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
5809802180b2b638762465cbad3f51a9ac8ff0b3 28-Feb-2012 Hauke Mehrtens <hauke@hauke-m.de> b43: prevent firmware on bcm5354 from taking over wrong GPIO pins

When using the bcm5354 (Soc with integrated LP-PHY Wifi) with a recent
firmware >= 478.104 it runs out of memory after a very short time in
OpenWrt after doing an active scan or any thing else where packages are
send. This was cased by a gpio misconfiguration, the firmware triggered
the GPIO pins used for buttons on some devices and that caused an other
driver (OpenWrt diag) listening for these buttons irqs to send many
messages to the user space.
This patch fixes the bug for my devices (Asus WL-520GU) and makes it
work with firmware 666.2. Now the firmware just uses LED GPIO pin
number 1 and not the button pins any more.

This is the GPIO Pin layout used on my device, see [0].
GPIO pin layout:
pin# name type
0 power led
1 wlan led
2 reset button
3 ses buttom

This is the nvram configuration output of "nvram show |grep gpio"

related nvram configuration:
wl0gpio2=11
wl0gpio3=11
wl0gpio0=11
wl0gpio1=0x02
reset_gpio=2

[0]: https://dev.openwrt.org/browser/trunk/package/broadcom-diag/src/diag.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
874239f51f8759f3955630fa5da5cf13cd6567d5 01-Feb-2012 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
5056635c10151970d87ae256b7f52f056291799e 02-Jan-2012 Rafał Miłecki <zajec5@gmail.com> b43: add maskset helpers

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
4f3d09de38d234ce7ffba5ec5a7e6704f983d375 11-Jan-2012 John W. Linville <linville@tuxdriver.com> b43: add option to avoid duplicating device support with brcmsmac

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
ccde8a45cbd3ea9a6e785e4393d3a1f6b4e6b495 06-Jan-2012 Guennadi Liakhovetski <g.liakhovetski@gmx.de> wireless: b43: fix Oops on card eject during transfer

An Oops has once been observed, when the SDIO card had been ejected during
IO. The PC value shows, that the dev pointer in b43_op_stop() was NULL.

(I moved the NULL check before the lock, based upon a suggestion from
Julian Calaby <julian.calaby@gmail.com>. -- JWL)

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
57adc1fcbae2c13104ce291b40f23e40a414fa87 03-Jan-2012 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem

Conflicts:
drivers/net/wireless/b43/dma.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
3db1cd5c05f35fb43eb134df6f321de4e63141f2 19-Dec-2011 Rusty Russell <rusty@rustcorp.com.au> net: fix assignment of 0/1 to bool variables.

DaveM said:
Please, this kind of stuff rots forever and not using bool properly
drives me crazy.

Joe Perches <joe@perches.com> gave me the spatch script:

@@
bool b;
@@
-b = 0
+b = false
@@
bool b;
@@
-b = 1
+b = true

I merely installed coccinelle, read the documentation and took credit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
bad6919469662b7c92bc6353642aaaa777b36bac 16-Dec-2011 francesco.gringoli@ing.unibs.it <francesco.gringoli@ing.unibs.it> b43: avoid packet losses in the dma worker code.

Following Rafal request, we verified that on "modern" CPUs using one
or more workers is equivalent. Here is patch V3 that addresses the
packet loss bug in the dma engine using only one worker.

-------

This patch addresses a bug in the dma worker code that keeps draining
packets even when the hardware queues are full. In such cases packets
can not be passed down to the device and are erroneusly dropped by the
code.

This problem was already discussed here

http://www.mail-archive.com/b43-dev@lists.infradead.org/msg01413.html

and acknowledged by Michael.

Number of hardware queues is now defined in b43.h (B43_QOS_QUEUE_NUM).

Acknowledgements to Riccardo Paolillo <riccardo.paolillo@gmail.com> and
Michele Orru <michele.orru@hotmail.it>

Signed-off-by: Francesco Gringoli <francesco.gringoli@ing.unibs.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
ac5c24e9e613df556f054f1fa811fca0c24fe500 30-Aug-2011 Paul Gortmaker <paul.gortmaker@windriver.com> drivers/net: change moduleparam.h to module.h as required.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
/drivers/net/wireless/b43/main.c
8a3a3c85e44d58f5af0adac74a0b866ba89a1978 02-Oct-2011 Eliad Peller <eliad@wizery.com> mac80211: pass vif param to conf_tx() callback

tx params should be configured per interface.
add ieee80211_vif param to the conf_tx callback,
and change all the drivers that use this callback.

The following spatch was used:
@rule1@
struct ieee80211_ops ops;
identifier conf_tx_op;
@@
ops.conf_tx = conf_tx_op;

@rule2@
identifier rule1.conf_tx_op;
identifier hw, queue, params;
@@
conf_tx_op (
- struct ieee80211_hw *hw,
+ struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u16 queue,
const struct ieee80211_tx_queue_params *params) {...}

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
93dbd82808d4c53869aaf5e2db73b646f8d6f15e 21-Sep-2011 Rafał Miłecki <zajec5@gmail.com> b43: update dummy transmission

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
7955d87f5ce94bb19554892b5dee963f276fd265 21-Sep-2011 Rafał Miłecki <zajec5@gmail.com> b43: add missing MMIO defines

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
37a41b4affa33bb237d3692bf51f1b5ebcaf29d8 21-Sep-2011 Eliad Peller <eliad@wizery.com> mac80211: add ieee80211_vif param to tsf functions

TSF can be kept per vif.
Add ieee80211_vif param to set/get/reset_tsf, and move
the debugfs entries to the per-vif directory.

Update all the drivers that implement these callbacks.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
4d8b61490c14a36efdee4a8bf523e26809df05ac 20-Sep-2011 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.infradead.org/users/linville/wireless

Conflicts:
drivers/net/wireless/iwlwifi/iwl-pci.c
drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
drivers/net/wireless/rt2x00/rt2800usb.c
drivers/net/wireless/wl12xx/main.c
8c23516fbb209ccf8f8c36268311c721faff29ee 19-Sep-2011 Manual Munz <freifunk@somakoma.de> b43: Fix beacon problem in ad-hoc mode

In ad-hoc mode, driver b43 does not issue beacons.

Signed-off-by: Manual Munz <freifunk@somakoma.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
108f4f3c4afff207486f9bc0ba9af2bdd4b19793 03-Sep-2011 Rafał Miłecki <zajec5@gmail.com> b43: add my copyrights and myself as the module author

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
0b4ff45d8e0f0f34e18823bd4e144bc324cae4ba 31-Aug-2011 Rafał Miłecki <zajec5@gmail.com> b43: LCN-PHY: minor fixes

The biggest change is reversing order of reading 32-bit table value.
MMIO dumps has shown it's done that way for LCN-PHY.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
9a53bf54b8149bc1372f50a83b769f42772083ea 27-Aug-2011 Larry Finger <Larry.Finger@lwfinger.net> b43: Fix swatch warning

Swatch reports the following warning for main.c:

CHECK drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.c +4115 b43_wireless_core_stop(7) warn: variable dereferenced before check 'dev'

After analysis, this is not a bug, but a false warning. Nonetheless,
a cleanup is in order to prevent some future janitor proposing
the wrong fix, as I did in my original patch.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
df766267c8d8d71acb0b23575250cac718c6b711 16-Aug-2011 Rafał Miłecki <zajec5@gmail.com> b43: drop Kconfig option of forcing PIO mode

We have module param called use_pio which is much easier to use.

Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
8b0be90c4d3770b0c31489fc3ae33e5d8ba9edf8 21-Aug-2011 Michael Büsch <m@bues.ch> b43/legacy: Remove firmware IDs

This removes the "FWxx" ID strings from the b43 and b43legacy
drivers. They were once used to match a specific driver revision
to a set of firmware files. However, this is hardly useful today.
Additionally, the IDs are not updated and maintained properly, so
they might mislead users.

Signed-off-by: Michael Buesch <m@bues.ch>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
cbe1e82a543dae06ffdba9bc108a1a22dc55cde3 16-Aug-2011 Rafał Miłecki <zajec5@gmail.com> b43: warn when forcing PIO mode

We have resolved all the known issues with DMA mode, however some users
(or distros) are still forcing PIO mode by config files. Without
debugging enabled it's not noticable at all. Add the warning for them.

Cc: Gregory Bellier <gregory.bellier@gmail.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6a461c23e7051d090751a2030e5febf6356c8d57 12-Aug-2011 Rafał Miłecki <zajec5@gmail.com> b43: include HT-PHY in some common code

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
5d852905561a979dfb4d8a68f7313dcb8f055bec 11-Aug-2011 Rafał Miłecki <zajec5@gmail.com> b43: support new TX header, noticed to be used by 598.314+ fw

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
efe0249b0fd1e9a32a7e6a5dc9c751d4d97b0adf 11-Aug-2011 Rafał Miłecki <zajec5@gmail.com> b43: use enum for firmware header format

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
2a190322d4390bbd5184a2fd4f97bbef9f1f5b4e 10-Aug-2011 Felix Fietkau <nbd@openwrt.org> b43: reload phy and bss settings after core restarts

b43_op_config and b43_op_bss_info_changed apply many settings by directly
writing to hardware registers. These settings are lost as soon as the core
is restarted and the initvals are reloaded. This was discovered because
restarting hostapd led to the beacon interval getting set to ~33s (see
https://dev.openwrt.org/ticket/8033 for more information).

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c027ed4ceaf779388275911bb6efd507c2e87ef4 23-Jul-2011 Hauke Mehrtens <hauke@hauke-m.de> b43: add core rev 17 used on bcma SoC.

This ieee80211 core was found on a Netgear wndr3400.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
9a5a133df35bc76191c1e3532369b2c39cf88a5b 13-Jul-2011 Johannes Berg <johannes.berg@intel.com> b43: remove wireless extensions inclusions

linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
b49179c071b89423e1f6c50f6fa3d48d8158bc35 28-Jul-2011 David S. Miller <davem@davemloft.net> Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
e5036c2575b244851637a81efc4104c076c4fa21 26-Jul-2011 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
e61b52d1309df08b86a35e54a61f0cc932b28291 23-Jul-2011 Pavel Roskin <proski@gnu.org> b43: fix invalid memory access in b43_ssb_remove()

wldev is freed in b43_one_core_detach() and should not be accessed after
that call. Keep wldev->dev in a local variable.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d3ec4844d449cf7af9e749f73ba2052fb7b72fc2 25-Jul-2011 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
fs: Merge split strings
treewide: fix potentially dangerous trailing ';' in #defined values/expressions
uwb: Fix misspelling of neighbourhood in comment
net, netfilter: Remove redundant goto in ebt_ulog_packet
trivial: don't touch files that are removed in the staging tree
lib/vsprintf: replace link to Draft by final RFC number
doc: Kconfig: `to be' -> `be'
doc: Kconfig: Typo: square -> squared
doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
drivers/net: static should be at beginning of declaration
drivers/media: static should be at beginning of declaration
drivers/i2c: static should be at beginning of declaration
XTENSA: static should be at beginning of declaration
SH: static should be at beginning of declaration
MIPS: static should be at beginning of declaration
ARM: static should be at beginning of declaration
rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
Update my e-mail address
PCIe ASPM: forcedly -> forcibly
gma500: push through device driver tree
...

Fix up trivial conflicts:
- arch/arm/mach-ep93xx/dma-m2p.c (deleted)
- drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
- drivers/net/r8169.c (just context changes)
41bf37117b47fc5ce2aae91f6a108e7e42e0b046 22-Jul-2011 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
24aad3f4c8a5c0a7514733fb9fa70994e24a5707 20-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: (un)initialize driver on the BCMA bus

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
491735929b63cb665b2215e3183b960e66f221f3 17-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: bcma: implement full core reset

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
2729df25550f041940f23c11ee8252094a6bd44b 18-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: correctly display longer chipsets ids

Some of the newer Broadcom chipsets have longe names like BCM43224,
BCM43225, etc. However Broadcom decided to keep using u16 for storing
them. Use %X or %d depending on chip_id value to avoid BCMA8D8, etc.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
40c6226967c8b27eb21f6894abff1e145861c6e1 18-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: bcma: read info about supported bands

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
36677874100edb610b22720f90859ee0f41330e2 16-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: use agent R/W ops for BCMA_IOCTL

BCMA_IOCTL is register in agent (AKA wrapper) core, we need to use
special R/W ops for it.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
95a943c162d74b20d869917bdf5df11293c35b63 15-Jul-2011 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem

Conflicts:
net/bluetooth/l2cap_core.c
cae561473e87fd01b07d980c643acd51c07e1f64 07-Jul-2011 Sebastian Andrzej Siewior <bigeasy@linutronix.de> net/b43: don't return IRQ_HANDLED if nothing was done

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
8b9bda759e5b7c042c2b3ae852aaa332c0ee4495 07-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: define firmwares for HT and LCN PHYs

We were uploading different firmwares to the hardware until finding
responding one.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
1d738e64f3d957d56c1b51e64ebdef986a8760e3 07-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: LCN-PHY add place for new PHY support

LCN-PHY was found in 14e4:4727 card. It uses LCN/1 and 0x2064/1 radio.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
544e5d8bcd7ab305494e57cfa388b2d06a43c520 06-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: read radio ID on new cores

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3fd48508d0d3d8e5423cab6b52a3b818085b6245 06-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: use radio ID reading code to older cores only

Newer ones need separated way

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6ff1e5cf70abbe04b261b4ccd9696e1ab6785086 06-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: change selecting ucode for newer cores

Older cores had unique PHY. This is not true anymore for newer ones.
For example core rev 16 can be LP, SSLPN or N (PHY).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
74abacb6b5b91141eb8963faa2f22b3f1bd7c68d 06-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: bus: add helpers for getting/setting wldev from/in bus core

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
42c9a458965da2b74e772054fdc4bcdec0351da8 06-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: handle BCMA in bus switches

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6cbab0d9139246405b2449ffebecc8c48d927a6e 06-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: use switches for SSB specific code

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
397915c30731340ee3f348d1be597b22467acbdf 06-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: implement BCMA bus ops

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d1507051bf6004c8ff0cf823fc5e115fc0a740b3 05-Jul-2011 Rafał Miłecki <zajec5@gmail.com> b43: make b43_wireless_init bus generic

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
eb032b9837a958e21ca000358a5bde5e17192ddb 04-Jul-2011 Michael Büsch <m@bues.ch> Update my e-mail address

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
/drivers/net/wireless/b43/main.c
36099365c7cc64e5184b66b6eb094950a13f540c 24-Jun-2011 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem

Conflicts:
drivers/net/wireless/rtlwifi/pci.c
include/linux/netlink.h
aec7ffdf4ff24df1fe85ed5bc9e050c4dd77617b 14-Jun-2011 Rafał Miłecki <zajec5@gmail.com> b43: add Kconfig option for compiling SSB driver

It is always "y" for now, b43 will not compile without CONFIG_SSB yet.
This is just a first step of dropping SSB dependency.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d7520b1d2a9ffae94323ffac9dc37d92f656051f 13-Jun-2011 Rafał Miłecki <zajec5@gmail.com> b43: HT-PHY: add place for writing HT PHY support

This is totally broken plus we do not have specs for HT PHY yet. Just
introduce place for writing driver if we discover anything.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
5b49b35a671e59c16c33611ea2d5650438388663 09-Jun-2011 Dan Carpenter <error27@gmail.com> b43: check for allocation failures

Add some error handling if the allocation fails.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c0c33addcba2ce753b4e2746db99feaae2f82a85 08-Jun-2011 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
6403eab143205a45a5493166ff8bf7e3646f4a77 03-Jun-2011 Joe Perches <joe@perches.com> drivers/net: Remove unnecessary semicolons

Semicolons are not necessary after switch/while/for/if braces
so remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
3c65ab62c5869a9d6ce5d9c28f7042b0e7e57891 02-Jun-2011 Rafał Miłecki <zajec5@gmail.com> b43: add an option to register BROKEN bcma driver

It does nothing useful yet, so it is matched as BROKEN.
For now this is just an option for b43, in future we may want to make
b43 support SSB or BCMA (note: or, not xor).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
4da909e7b572b561d8150f9d41b04bcfff386222 02-Jun-2011 Rafał Miłecki <zajec5@gmail.com> b43: do not use SSB specific flags when calling core reset function

Luckily the only flag we use when calling core reset is GMODE one.
Thanks to that we can just switch to single bool and make function calls
bus generic.

Tested on my BCM4312 (LP-PHY) and early tested with BCM43224.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
505fb019d4924e425bb1024eb603a7bc7fe7fe63 19-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: bus: add helpers for checking host type

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d48ae5c826f9af7d8b39867887d48e2a6f47af1f 19-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: use new pointers path to access ssb_device in SSB specific places

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
24ca39d67968c42d377abc122f6dca635ebcdb79 18-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: bus: abstract bus and core operations

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c244e08c7aa30abea3c29ff17a40f4b0a58a7913 18-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: bus: abstract chip info

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
a18c715e63505850edd2b69ded5373d6d464cd80 18-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: bus: abstract device structs and irq

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
0581483afe1a6f90f828b36111b05a70c162137d 18-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: bus: abstract SPROM

SPROM is another frequently used struct. We decided to share SPROM
struct between ssb na bcma as long as we will not need any hacks.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
21d889d433eb962b70ad88d554a4a7658067596f 18-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: bus: abstract 80211 core info

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
482f05386218a028309a71ad36066ee64b7a820d 18-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: add bus device abstraction layer

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
aa63418aa72e4468838eea457a123057b1c7cd11 18-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: rename ssb_device variable in ssb specific functions

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
31ec97d9cebac804814de298592648f7c18d8281 24-May-2011 John W. Linville <linville@tuxdriver.com> Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
755173291a86c6e77414e1eaf22279fde88ccd86 17-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: read PHY info only when needed (for PHY-A)

We risk reading TMSHIGH register twice, but PHY-A are really rare and we
do not support them at the moment.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
1495298ddd496131b8226a837ab10bdd5acb3480 17-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: separate ssb core reset

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c4a2a08165dd5a58e24eb342902839dca78887b8 17-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: add helper for finding GPIO device

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
0355a3452fe218b2bc61a7a571064ee86dd6bf4e 17-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: make b43_wireless_init less bus specific

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e00cf3b9eb7839b952e434a75bff6b99e47337ac 16-May-2011 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem

Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn-tx.c
net/mac80211/sta_info.h
dedb1eb977d75f301b17190cc4b6e7d17dbf17db 14-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: rename b43_wldev's field with ssb_device to sdev

We free name "dev" for something generic (like dev abstraction layer).
Additionaly code is cleaner now, especially magic dev->dev-dev chains.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
0fd82eafe3aa70937905b7e19e256409ae48477e 11-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: implement timeouts workaround

Documented in: <4DCA7E40.9070709@lwfinger.net>

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
858a16529cb4c6434d863740283e0dfeb93cd599 10-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: move MAC PHY clock controling function

This is not N-PHY specific function, we partially duplicate code.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
5ee9c6afcb72eb41c3607e424c3b969f8c56031b 09-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: trivial: include ssb word in ssb specific functions

This can be helpful when we decide to add support for other buses.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
25ea0dd9ffb7459f3b2948430f75d99b46ca1870 08-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: drop ssb-duplicated workaround for dangling cores

Remove the code to detect inactive 802.11 cores, as that function is now done
in ssb.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
fc2b1e0cfe9b4cabde8afeacc2bb81a95bf83afb 05-May-2011 Rafał Miłecki <zajec5@gmail.com> b43: drop invalid IMCFGLO workaround

We were performing it on wrong core, it was outdated and is already
implemented in ssb.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
badb02953aac4af9993163e2a87be60f10700db9 02-May-2011 David S. Miller <davem@davemloft.net> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
f61583941667c96d61fc6991b9f23307f9bfa87e 19-Apr-2011 Rafał Miłecki <zajec5@gmail.com> b43: trivial: update module info about ucode16_mimo firmware

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
/drivers/net/wireless/b43/main.c
7bb4568372856688bc070917265bce0b88bb7d4d 24-Feb-2011 Johannes Berg <johannes.berg@intel.com> mac80211: make tx() operation return void

The return value of the tx operation is commonly
misused by drivers, leading to errors. All drivers
will drop frames if they fail to TX the frame, and
they must also properly manage the queues (if they
didn't, mac80211 would already warn).

Removing the ability for drivers to return a BUSY
value also allows significant cleanups of the TX
TX handling code in mac80211.

Note that this also fixes a bug in ath9k_htc, the
old "return -1" there was wrong.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k]
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00]
Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi]
Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
ab72efdf107e5b0e0a05efb8f24cc6c598ae31ea 21-Dec-2010 Rafał Miłecki <zajec5@gmail.com> b43: N-PHY: enable support for PHYs rev 3 and higher

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e41596a118a5cb15a045ef773dc117b2596e6a86 21-Dec-2010 Rafał Miłecki <zajec5@gmail.com> b43: use correct firmware for newer cores

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
42ab135fe78025910bed8ff56e00a375f2b04db1 09-Dec-2010 Rafał Miłecki <zajec5@gmail.com> b43: rename TMS defines, drop useless condition from core reset

As discussed we do not know band width at core reset time and it is not a good
idea to reset whole just to change band. So just set unconditionally 20 MHz
band width as default during core reset.

As for defines PHY clock changed to band width in specs and it makes much more
sens to call defines by band width which is self-explainable. Updated specs do
not mention 0 value, but comparing to old ones you can notice lineral relation
between PHY clock speed and band width. So it makes sense for 0x0 value to be
10 MHz band width.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
692d2c0fb36c02ad07d54641c26f48e644b27fbd 07-Dec-2010 Rafał Miłecki <zajec5@gmail.com> b43: rename config option for N-PHY, drop BROKEN

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
82a52043c7801f83c7387deb45bf9323af04644b 07-Dec-2010 Rafał Miłecki <zajec5@gmail.com> b43: fix split of N-PHY devices into supported and not (based on PHY rev)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
abc1f7cd531f80a8468ab654f1dfd35d58bd2490 07-Dec-2010 Rafał Miłecki <zajec5@gmail.com> b43: set TMS to work with current band width for N-PHY

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
5b736d42bc51fe893fd7d4ceac34c727d23135e1 10-Nov-2010 Joe Perches <joe@perches.com> drivers/net/wireless/b43/main.c: Use printf extension %pV

Using %pV reduces the number of printk calls and
eliminates any possible message interleaving from
other printk calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
97359d1235eaf634fe706c9faa6e40181cc95fb8 10-Aug-2010 Johannes Berg <johannes.berg@intel.com> mac80211: use cipher suite selectors

Currently, mac80211 translates the cfg80211
cipher suite selectors into ALG_* values.
That isn't all too useful, and some drivers
benefit from the distinction between WEP40
and WEP104 as well. Therefore, convert it
all to use the cipher suite selectors.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
84c164a34ffe67908a932a2d641ec1a80c2d5435 06-Aug-2010 John W. Linville <linville@tuxdriver.com> b43: move hwrng registration driver to wireless core initialization

...and unregistration to core shutdown. Previously, the driver
remained registered even when the hardware was shutdown. That
causes the driver to return -ENODEV if the b43 device is IFF_DOWN.
This change causes the driver to disappear in that case, allowing
/dev/hwrng to still function if another hwrng device is available.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
652caa5b67b096b13c34f299db238e1daeab1f67 29-Jul-2010 John W. Linville <linville@tuxdriver.com> b43: update hw/fw version info in wiphy struct

This makes the information available through ethtool...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
41950bdfb5c530ba9b67037cc4c836677e750b6e 21-Jul-2010 John W. Linville <linville@tuxdriver.com> b43: silence most sparse warnings

CHECK drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.c:111:5: warning: symbol 'b43_modparam_pio' was not declared. Should it be static?
CHECK drivers/net/wireless/b43/phy_g.c
drivers/net/wireless/b43/phy_g.c:975:56: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
CHECK drivers/net/wireless/b43/phy_lp.c
drivers/net/wireless/b43/phy_lp.c:2701:6: warning: symbol 'b43_lpphy_op_switch_analog' was not declared. Should it be static?
drivers/net/wireless/b43/phy_lp.c:1148:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
drivers/net/wireless/b43/phy_lp.c:1525:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
drivers/net/wireless/b43/phy_lp.c:1529:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
CHECK drivers/net/wireless/b43/wa.c
drivers/net/wireless/b43/wa.c:385:60: warning: cast truncates bits from constant value (ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:403:55: warning: cast truncates bits from constant value (ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:405:55: warning: cast truncates bits from constant value (ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:415:71: warning: cast truncates bits from constant value (ffff0fff becomes fff)

AFAICT, none of these amount to real bugs. But this reduces warning
spam from sparse w/o significantly affecting readability of the code (IMHO).

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
bb64d95e539fe09230d42b4634ac712ca5cb700b 19-Jun-2010 Larry Finger <Larry.Finger@lwfinger.net> b43: Clarify logged message after fatal DMA error and switch to PIO mode

The message following fatal DMA errors fails to indicate properly that the
driver has switched to PIO mode.

Signed-off-by: Larry Finger <Larry.Finger@wfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
83163244f845c296a118ce85c653872dbff6abfe 05-May-2010 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem

Conflicts:
drivers/net/wireless/libertas_tf/cmd.c
drivers/net/wireless/libertas_tf/main.c
354b4f04f2aa9d9652ecd5a4cdace784c7cfcca8 29-Apr-2010 John W. Linville <linville@tuxdriver.com> b43: Added get_survey callback in order to get channel noise

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
f5c044e53a6b319776c7140b22fee9be3bc1f758 30-Apr-2010 John W. Linville <linville@tuxdriver.com> mac80211: remove deprecated noise field from ieee80211_rx_status

Also remove associated IEEE80211_HW_NOISE_DBM from ieee80211_hw_flags.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
871039f02f8ec4ab2e5e9010718caa8e085786f1 11-Apr-2010 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/stmmac/stmmac_main.c
drivers/net/wireless/wl12xx/wl1271_cmd.c
drivers/net/wireless/wl12xx/wl1271_main.c
drivers/net/wireless/wl12xx/wl1271_spi.c
net/core/ethtool.c
net/mac80211/scan.c
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
/drivers/net/wireless/b43/main.c
c5a079f46aabff026b2acaba0a2579a74c3c3731 22-Mar-2010 Daniel Ngu <daniel.dy.ngu@gmail.com> drivers/net/wireless/b43/main.c:4351: Fixed coding style

WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Daniel Ngu <daniel.dy.ngu@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
ce300c7ffa61165f9bfd16e511ee0cd4114977ab 27-Feb-2010 David S. Miller <davem@davemloft.net> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
9e3bd9190800e8209b4a3e1d724c35f0738dcad2 26-Feb-2010 Linus Torvalds <torvalds@linux-foundation.org> b43: fall back gracefully to PIO mode after fatal DMA errors

This makes the b43 driver just automatically fall back to PIO mode when
DMA doesn't work.

The driver already told the user to do it, so rather than have the user
reload the module with a new flag, just make the driver do it
automatically. We keep the message as an indication that something is
wrong, but now just automatically fall back to the hopefully working PIO
case.

(Some post-2.6.33 merge fixups by Larry Finger <Larry.Finger@lwfinger.net>
and yours truly... -- JWL)

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
f6f223039c0d0683bdea1eabd35b309e10311a60 15-Feb-2010 David S. Miller <davem@davemloft.net> Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
3b27521a5be8b700451d54d4fa670f754e7f9720 07-Feb-2010 Kalle Valo <kalle.valo@iki.fi> b43: remove get_tx_stats() mac80211 op

get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
0866b03c7d7dee8a34ffa527ecda426c0f405518 03-Feb-2010 Larry Finger <Larry.Finger@lwfinger.net> b43/b43legacy: Wake queues in wireless_core_start

If b43 or b43legacy are deauthenticated or disconnected, there is a
possibility that a reconnection is tried with the queues stopped in
mac80211. To prevent this, start the queues before setting
STAT_INITIALIZED.

In b43, a similar change has been in place (twice) in the
wireless_core_init() routine. Remove the duplicate and add similar
code to b43legacy.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org> [2.6.32]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6e7e6213e4956828927c30e3ef5a42812d00c650 08-Feb-2010 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

Conflicts:
net/mac80211/scan.c
10be7eb36b93364b98688831ee7d26f58402bb96 04-Feb-2010 David S. Miller <davem@davemloft.net> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
b6c3f5be7c6ac3375f44de4545c1ffe216b34022 02-Feb-2010 Larry Finger <Larry.Finger@lwfinger.net> b43: Fix throughput regression

Commit c7ab5ef9bcd281135c21b4732c9be779585181be entitled "b43: implement
short slot and basic rate handling" reduced the transmit throughput for
my BCM4311 device from 18 Mb/s to 0.7 Mb/s. The basic rate handling
portion is OK, the problem is in the short slot handling.

Prior to this change, the short slot enable/disable routines were never
called. Experimentation showed that the critical part was changing the
value at offset 0x0010 in the shared memory. This is supposed to contain
the 802.11 Slot Time in usec, but if it is changed from its initial value
of zero, performance is destroyed. On the other hand, changing the value
in the MMIO register corresponding to the Interframe Slot Time increased
performance from 18 to 22 Mb/s. A BCM4306/3 also shows dramatic
improvement of the transmit rate from 5.3 to 19.0 Mb/s.

Other changes in the patch include removal of the magic number for the
MMIO register, and allowing the slot time to be set for any PHY operating
in the 2.4 GHz band. Previously, the routine was executed only for G PHYs.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org> [Any stable version back through 2.6.28]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
96869a39399269a776a94812e9fff3d38b47d838 24-Jan-2010 Michael Buesch <mb@bu3sch.de> b43: Workaround circular locking in hw-tkip key update callback

The TKIP key update callback is called from the RX path, where the driver
mutex is already locked. This results in a circular locking bug.
Avoid this by removing the lock.

Johannes noted that there is a separate bug: The callback still breaks on SDIO
hardware, because SDIO hardware access needs to sleep, but we are not allowed
to sleep in the callback due to mac80211's RCU locking.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: kecsa@kutfo.hit.bme.hu
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
aa4c7b2a2547db95388f795f092ea286fbdd98a1 22-Jan-2010 Rafał Miłecki <zajec5@gmail.com> b43: check band width

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
b3fbdcf49f940d0703c356441e0daf045e64e076 21-Jan-2010 Johannes Berg <johannes@sipsolutions.net> mac80211: pass vif and station to update_tkip_key

When a TKIP key is updated, we should pass the station
pointer instead of just the address, since drivers can
use that to store their own data. We also need to pass
the virtual interface pointer.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6373464288cab09bc641be301d8d30fc9f64ba71 19-Jan-2010 David S. Miller <davem@davemloft.net> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-core.h
003d6d2792bebb2b66966ce5f1da11849e855180 15-Jan-2010 Rafał Miłecki <zajec5@gmail.com> b43: add new SSB's core id for BCM4328

Following line shows my BCM4328 detected on SSB. We didn't include 0x0C rev.
ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0C, vendor 0x4243)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6021e08db47386507108a475e6c820a7006a4632 07-Jan-2010 Tim Gardner <tim.gardner@canonical.com> b43: Declare at least one real firmware file using MODULE_FIRMWARE.

BugLink: http://bugs.launchpad.net/bugs/488636

Enhances module information with the names of the firmware files
that could be used by this driver. This helps tools like Jockey to
correctly detect and/or install the firmware files relevant to
this driver.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3a999e6eb5d277cd6a321dcda3fc43c3d9e4e4b8 30-Dec-2009 David S. Miller <davem@davemloft.net> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
1ed32e4fc8cfc9656cc1101e7f9617d485fcbe7b 23-Dec-2009 Johannes Berg <johannes@sipsolutions.net> mac80211: remove struct ieee80211_if_init_conf

All its members (vif, mac_addr, type) are now available
in the vif struct directly, so we can pass that instead
of the conf struct. I generated this patch (except the
mac80211 and header file changes) with this semantic
patch:

@@
identifier conf, fn, hw;
type tp;
@@
tp fn(struct ieee80211_hw *hw,
-struct ieee80211_if_init_conf *conf)
+struct ieee80211_vif *vif)
{
<...
(
-conf->type
+vif->type
|
-conf->mac_addr
+vif->addr
|
-conf->vif
+vif
)
...>
}

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
b02914af4d7020828ce921a572589dd793517c09 11-Dec-2009 Larry Finger <Larry.Finger@lwfinger.net> b43: Allow PIO mode to be selected at module load

If userencounter the "Fatal DMA Problem" with a BCM43XX device, and
still wish to use b43 as the driver, their only option is to rebuild
the kernel with CONFIG_B43_FORCE_PIO. This patch removes this option and
allows PIO mode to be selected with a load-time parameter for the module.
Note that the configuration variable CONFIG_B43_PIO is also removed.

Once the DMA problem with the BCM4312 devices is solved, this patch will
likely be reverted.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
501706565b2d4d2d40d0d301d5411ede099b8a6f 12-Dec-2009 David S. Miller <davem@davemloft.net> Merge branch 'master' of /home/davem/src/GIT/linux-2.6/

Conflicts:
include/net/tcp.h
214ac9a4ead6cb254451c09d9c8234a76693feb1 09-Dec-2009 Larry Finger <Larry.Finger@lwfinger.net> b43: Remove reset after fatal DMA error

As shown in Kernel Bugzilla #14761, doing a controller restart after a
fatal DMA error does not accomplish anything other than consume the CPU
on an affected system. Accordingly, substitute a meaningful message for
the restart.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [2.6.32]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
4ef58d4e2ad1fa2a3e5bbf41af2284671fca8cf8 10-Dec-2009 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
tree-wide: fix misspelling of "definition" in comments
reiserfs: fix misspelling of "journaled"
doc: Fix a typo in slub.txt.
inotify: remove superfluous return code check
hdlc: spelling fix in find_pvc() comment
doc: fix regulator docs cut-and-pasteism
mtd: Fix comment in Kconfig
doc: Fix IRQ chip docs
tree-wide: fix assorted typos all over the place
drivers/ata/libata-sff.c: comment spelling fixes
fix typos/grammos in Documentation/edac.txt
sysctl: add missing comments
fs/debugfs/inode.c: fix comment typos
sgivwfb: Make use of ARRAY_SIZE.
sky2: fix sky2_link_down copy/paste comment error
tree-wide: fix typos "couter" -> "counter"
tree-wide: fix typos "offest" -> "offset"
fix kerneldoc for set_irq_msi()
spidev: fix double "of of" in comment
comment typo fix: sybsystem -> subsystem
...
d014d043869cdc591f3a33243d3481fa4479c2d0 07-Dec-2009 Jiri Kosina <jkosina@suse.cz> Merge branch 'for-next' into for-linus

Conflicts:

kernel/irq/chip.c
2071a0084a0323697b7d6fd5a98982194bd6929f 11-Nov-2009 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-core.h
8f611288c8db0c89447856c4c8970bb7ee535448 07-Nov-2009 Felix Fietkau <nbd@openwrt.org> b43: work around a locking issue in ->set_tim()

ops->set_tim() must be atomic, so b43 trying to acquire a mutex leads
to a kernel crash. This patch trades an easy to trigger crash in AP
mode for an unlikely race condition. According to Michael, the real
fix would be to allow set_tim() to sleep, since b43 is not the only
driver that needs to sleep in all callbacks.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
21ae2956ce289f61f11863cc67080f9a28101ae0 07-Oct-2009 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> tree-wide: fix typos "aquire" -> "acquire", "cumsumed" -> "consumed"

This patch was generated by

git grep -E -i -l '[Aa]quire' | xargs -r perl -p -i -e 's/([Aa])quire/$1cquire/'

and the cumsumed was found by checking the diff for aquire.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
/drivers/net/wireless/b43/main.c
0869aea0eb711982cd2b8bebf41b3c0191c89cde 28-Oct-2009 Johannes Berg <johannes@sipsolutions.net> mac80211: remove RX_FLAG_RADIOTAP

While there may be a case for a driver adding its
own bits of radiotap information, none currently
does. Also, drivers would have to copy the code
to generate the radiotap bits that now mac80211
generates. If some driver in the future needs to
add some driver-specific information I'd expect
that to be in a radiotap vendor namespace and we
can add a different way of passing such data up
and having mac80211 include it.

Additionally, rename IEEE80211_CONF_RADIOTAP to
IEEE80211_CONF_MONITOR since it's still used by
b43(legacy) to obtain per-frame timestamps.

The purpose of this patch is to simplify the RX
code in mac80211 to make it easier to add paged
skb support.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
0519d83d83ed485b5a1f9222ff69d7d6c9bb8a01 30-Oct-2009 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
899110fe4e1b26f7a13e639c57e2a047d21bffa2 09-Oct-2009 Michael Buesch <mb@bu3sch.de> b43/legacy: Fix usage of host_pci pointer

We must check the bustype before using the host_pci pointer.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d50bae33d1358b909ade05ae121d83d3a60ab63f 16-Oct-2009 Larry Finger <Larry.Finger@lwfinger.net> b43: Fix Bugzilla #14181 and the bug from the previous 'fix'

"b43: Fix PPC crash in rfkill polling on unload" fixed the bug reported
in Bugzilla No. 14181; however, it introduced a new bug. Whenever the
radio switch was turned off, it was necessary to unload and reload
the driver for it to recognize the switch again.

This patch fixes both the original bug in #14181 and the bug introduced by
the previous patch. It must be stated, however, that if there is a BCM4306/3
with an rfkill switch (not yet proven), then the driver will need an
unload/reload cycle to turn the device back on.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
f5b4da21ba293220001b5fd36be75c859b18afc1 02-Oct-2009 Larry Finger <Larry.Finger@lwfinger.net> b43: Fix PPC crash in rfkill polling on unload

In Bugzilla No. 14181, a PowerMac G4 crashes on ifdown or
module unload because the rfkill polling has not been stopped.
For the x86 architectures, the attempt to reach a now unmapped
register is not fatal as it is on PPC.

(Includes "b43: Fix locking problem when stopping rfkill polling". -- JWL)

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
49d965c8f7fcbf06da373468e091eb7d205f0bec 03-Oct-2009 Michael Buesch <mb@bu3sch.de> b43: Protect sanity check against physical device removal

Fix IRQ mask sanity check for physically pulled device.

Tested-by: Andrew Price <andy@andrewprice.me.uk>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
727c988593271599c9e5943699426afcce1a62d6 01-Oct-2009 Michael Buesch <mb@bu3sch.de> b43: Don't use struct wldev after detach.

Don't use struct wldev after detach. This fixes an oops on access.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
139d6065c83071d5f66cd013a274a43699f8e2c1 24-Sep-2009 David S. Miller <davem@davemloft.net> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-rx.c
82905ace22614fe220875fc5748b1afbac868a76 16-Sep-2009 Albert Herranz <albert_herranz@yahoo.es> b43: fix build error if !CONFIG_B43_LEDS

Fix the following build error when CONFIG_B43_LEDS is not selected:

drivers/net/wireless/b43/main.c: In function 'b43_remove':
drivers/net/wireless/b43/main.c:4990: error: 'struct b43_leds' has no member named 'stop'
drivers/net/wireless/b43/main.c:4991: error: 'struct b43_leds' has no member named 'work'
make[4]: *** [drivers/net/wireless/b43/main.o] Error 1

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e899a3f232125c393cdf7f7bf6533501ef8808fb 14-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Don't abuse wl->current_dev in the led work

Don't abuse wl->current_dev in the LED work for checking whether we're
going down. Add an explicit variable.
This fixes a crash on rmmod dereferencing the wl->current_dev NULL pointer
in various other places of the driver.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
09ebe2f94373e95952ed6340b0a5d21739eb99da 12-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Disable PMQ mechanism

This reduces IRQ pressure by about one third on a saturated link
by disabling the PMQ mechanism. We currently don't use that mechanism.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
990b86f4f9c54f83085d4136498ac44719b17654 12-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Add optional verbose runtime statistics

This adds support for verbose runtime statistics.
It defaults to off and must be enabled in debugfs, if desired.
The first measurement may be incorrect, because statistics are not cleared
after they got enabled through debugfs.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
176e9f6a4cf4b1bf66d18243ede0938a35c81541 11-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Fix IRQ sync for SDIO

synchronize_irq is meaningless for SDIO. sdio_release_irq will
sync the IRQ thread for us.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
a8696c800b8154e27b359866f7b837079cdb513a 11-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Fix SDIO interrupt handler deadlock

We need to release the SDIO host before locking the driver mutex.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3dbba8e281552da640080f08a0f127d48456669f 10-Sep-2009 Albert Herranz <albert_herranz@yahoo.es> b43: Add Soft-MAC SDIO device support

This adds support for Soft-MAC SDIO devices to b43.
The driver still lacks some fixes for SDIO devices, so it's currently
marked as BROKEN.

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
a78b3bb2f3ab9afcf78dbcff18fd7bf900c7c27e 11-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Rewrite suspend/resume code

This removes most of the b43 suspend/resume code (it's handled by mac80211)
and moves the registration of devices to the attachment phase. This is
required, because we must not register/unregister devices on suspend/resume.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
91d372c0afc55faf44c1b763693f089b5dad31ec 11-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Fix resume failure

This fixes a resume failure where a signal is pending on resume
so the firmware upload fails.
This removes the interruptible sleep, because we don't really need it.
In the worst case (with broken firmware) the sleep loop will take 1 second.
In the common case (working firmware), it will only take a few milliseconds.
So we don't really need to be interruptible.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
5ab9549a64c77b6975b079b27e95fc2c115f613b 10-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Force-wake queues on init

Force wake the mac80211 queues on init.
Under rare circumstances they may be stopped, if a DMA error or
something else causes a device reset while a queue was stopped.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e175e99646f21602d844ce85a727c83ba644ab87 11-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Fix resume failure

This fixes a resume failure where a signal is pending on resume
so the firmware upload fails.
This removes the interruptible sleep, because we don't really need it.
In the worst case (with broken firmware) the sleep loop will take 1 second.
In the common case (working firmware), it will only take a few milliseconds.
So we don't really need to be interruptible.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
32f6afd82c1c4e9415db9f8d18e3fd6fc65cfd46 10-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Force-wake queues on init

Force wake the mac80211 queues on init.
Under rare circumstances they may be stopped, if a DMA error or
something else causes a device reset while a queue was stopped.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
98a1e2a9260d30ad691fbd1ed778a05e38fe655b 08-Sep-2009 Michael Buesch <mb@bu3sch.de> b44/b43/b43legacy: Fix switch warnings introduced by SSB-SDIO

This fixes some gcc warnings for switch statements.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
b0544eb6019a33e836141156a8fbe74a9f8367b4 06-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Really disable QoS, if requested

Currently, when QoS-disable is requested, we would leave QoS enabled
in firmware, but only queue frames on one queue.
Change that and also tell firmware about disabled QoS, so it
completely ignores all the QoS parameters. Also don't upload the parameters,
if QoS is disabled.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
69eddc8a37a33479205ac3a3d8575fad1466da90 04-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: remove SHM spinlock

This removes the SHM spinlock.
SHM is protected by wl->mutex.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
77ca07ffe1797a0f2f41aa4997c9a5ae433a0be8 04-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Remove PIO RX workqueue

This removes the PIO RX work. It's not needed anymore, because
we can sleep in the threaded interrupt handler.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
f5d40eedb32aa9a0e226d468e1f89fb676824694 04-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Remove TX spinlock

This removes the TX spinlock and defers TX to a workqueue to allow
locking wl->mutex instead and to allow sleeping for register accesses.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
36dbd9548e92268127b0c31b0e121e63e9207108 04-Sep-2009 Michael Buesch <mb@bu3sch.de> b43: Use a threaded IRQ handler

Use a threaded IRQ handler to allow locking the mutex and
sleeping while executing an interrupt.
This removes usage of the irq_lock spinlock, but introduces
a new hardirq_lock, which is _only_ used for the PCI/SSB lowlevel
hard-irq handler. Sleeping busses (SDIO) will use mutex instead.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c71dbd3316d9ae8bc49d90b5a0b2915cd5089cff 28-Aug-2009 Gábor Stefanik <netrolller.3d@gmail.com> b43: Fix typo in modparam_btcoex description

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
0136e51edbdae7f82aa1c32ad5cd6a49ec917c9c 28-Aug-2009 Gábor Stefanik <netrolller.3d@gmail.com> b43: Add myself to module authors & to LP-PHY file copyright notices

Also mark the LP-PHY driver "802.11a/g" instead of "802.11g",
as LP-PHY is capable of both 2GHz and 5GHz operation.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
64e368bf9c3690eebd4b3a5cc243f39e902ecdd1 27-Aug-2009 Gábor Stefanik <netrolller.3d@gmail.com> b43: Implement antenna diversity support for LP-PHY

The A/G-PHY changes are fallout fixes from the enum change,
which in turn allows the LP-PHY code to be much simpler.
The antenna_to_phyctl change is a fix for a potential
existing bug that this patch may otherwise trigger.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
035d0243ebbdbd5f8f07d6ce378c9a9b36415bc9 19-Aug-2009 gregor kowski <gregor.kowski@gmail.com> b43: add hardware tkip

This add hardware tkip for b43.

Signed-off-by: Gregor Kowski <gregor.kowski@gmail.com>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3ac64beecd27400d12cc7afb4108eef26c499f6a 17-Aug-2009 Johannes Berg <johannes@sipsolutions.net> mac80211: allow configure_filter callback to sleep

Over time, a whole bunch of drivers have come up
with their own scheme to delay the configure_filter
operation to a workqueue. To be able to simplify
things, allow configure_filter to sleep, and add
a new prepare_multicast callback that drivers that
need the multicast address list implement. This new
callback must be atomic, but most drivers either
don't care or just calculate a hash which can be
done atomically and then uploaded to the hardware
non-atomically.

A cursory look suggests that at76c50x-usb, ar9170,
mwl8k (which is actually very broken now), rt2x00,
wl1251, wl1271 and zd1211 should make use of this
new capability.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
86b2892a22a433e56e39e33bf353adc6cc4eabb2 16-Aug-2009 Gábor Stefanik <netrolller.3d@gmail.com> b43: LP-PHY: Remove BROKEN from B43_PHY_LP

Larry has reported success getting scan data with an LP-PHY device,
so it's probably time to release LP-PHY support for testing.

Also disable 802.11a support for now, as 802.11a currently causes
the driver to panic on startup (NULL pointer dereference).

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
9d86a2d531c722feb0046e5a0b81809efb10422a 14-Aug-2009 Gábor Stefanik <netrolller.3d@gmail.com> b43: Make LP-PHY testable

-Enable rate memory init for LP-PHY (same as G and N-PHY).
-Mark rev.2 LP-PHYs with the B2063 radio as supported.
-Allow using the 5GHz band on LP-PHYs.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
759b973bb2d24adecaa526957435eabb00f02725 14-Aug-2009 Gábor Stefanik <netrolller.3d@gmail.com> b43: Add LP-PHY firmware loading support

Add support for loading LP-PHY firmware to b43_try_request_fw.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
2f19c287fecb958eb68b1c2199b4dd6e00ba4276 13-Aug-2009 Gábor Stefanik <netrolller.3d@gmail.com> b43: Update dummy transmission to match V4 specs

The V4 dummy transmission has two extra bools in its prototype,
so update all callers with the 2 bools.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
66d2d089c394c7e31020947d682523f77a93244b 06-Aug-2009 Michael Buesch <mb@bu3sch.de> b43: Fix hardware key index handling

This fixes the hardware encryption keys index and array size handling.

Thanks to Gregor Kowski for reporting this issue.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c45fa8c50c2149eec260a55c84e76339a2a761dd 05-Aug-2009 gregor kowski <gregor.kowski@gmail.com> b43: remove wrong probe_resp_plcp write

The tkip hw support uncovered a bug in b43_write_probe_resp_template : it is
writing at the wrong shm offset, it is in the B43_SHM_SH_TKIPTSCTTAK
zone. Remove b43_write_probe_resp_template, b43_write_probe_resp_plcp
and b43_write_probe_resp_plcp because the probe response offload is
currently not supported by mac80211.

Signed-off-by: Gregor Kowski <gregor.kowski@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
92ca8d437fdbb482752534885d86af264897da85 31-Jul-2009 gregor kowski <gregor.kowski@gmail.com> b43: remove wrong probe_resp_plcp write

The tkip hw support uncovered a bug in b43_write_probe_resp_template : it is
writing at the wrong shm offset, it is in the B43_SHM_SH_TKIPTSCTTAK zone. This
patch comments these writes.

Signed-off-by: Gregor Kowski <gregor.kowski@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
f62ae6cd887a184d6923037d588b5b2466aa2a97 31-Jul-2009 Michael Buesch <mb@bu3sch.de> b43: Fix unaligned 32bit SHM-shared access

This fixes unaligned 32bit SHM-shared read/write access.
The low and high 16 bits were swapped.
It also adds a testcase for this to the chipaccess validation.

(Thanks to Albert Herranz for tracking down this bug.)

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
42935ecaf4e784d0815afa9a7e5fe7e141157ca3 30-Jul-2009 Luis R. Rodriguez <lrodriguez@atheros.com> mac80211: redefine usage of the mac80211 workqueue

The mac80211 workqueue exists to enable mac80211 and drivers
to queue their own work on a single threaded workqueue. mac80211
takes care to flush the workqueue during suspend but we never
really had requirements on drivers for how they should use
the workqueue in consideration for suspend.

We extend mac80211 to document how the mac80211 workqueue should
be used, how it should not be used and finally move raw access to
the workqueue to mac80211 only. Drivers and mac80211 use helpers
to queue work onto the mac80211 workqueue:

* ieee80211_queue_work()
* ieee80211_queue_delayed_work()

These helpers will now warn if mac80211 already completed its
suspend cycle and someone is trying to queue work. mac80211
flushes the mac80211 workqueue prior to suspend a few times,
but we haven't taken the care to ensure drivers won't add more
work after suspend. To help with this we add a warning when
someone tries to add work and mac80211 already completed the
suspend cycle.

Drivers should ensure they cancel any work or delayed work
in the mac80211 stop() callback.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e91d83346ad9b30f44469c92b982206dcd7dcaf0 15-Jul-2009 Johannes Berg <johannes@sipsolutions.net> wireless: remove print_mac uses

Use %pM instead, and also remove stray variables
declared with DECLARE_MAC_BUF.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
fd4973c56f8d9baac8d269791a90e5119ce30a0e 20-Jun-2009 Larry Finger <Larry.Finger@lwfinger.net> b43/b43legacy: fix radio LED initialization

Fix condition in which radio LED did not initialize correctly, and remove
4 compilation warnings.

After the recent changes in rfkill, the radio LED used by b43/b43legacy
did not always initialize correctly.

Both b43 and b43legacy used the deprecated variable radio_enabled in
struct ieee80211_conf.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
403a3a136122457165321e90b7569a321cc9ac12 08-Jun-2009 Michael Buesch <mb@bu3sch.de> b43: Add fw capabilities

Add automagic feature flags, so the firmware can tell the driver
about supported features and the driver can switch features on/off as
needed.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
f41f3f373dd72344c65d801d6381fe83ef3a2c54 07-Jun-2009 Johannes Berg <johannes@sipsolutions.net> b43/legacy: port to cfg80211 rfkill

This ports the b43/legacy rfkill code to the new API offered
by cfg80211 and thus removes a lot of useless stuff.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
19d337dff95cbf76edd3ad95c0cee2732c3e1ec5 02-Jun-2009 Johannes Berg <johannes@sipsolutions.net> rfkill: rewrite

This patch completely rewrites the rfkill core to address
the following deficiencies:

* all rfkill drivers need to implement polling where necessary
rather than having one central implementation

* updating the rfkill state cannot be done from arbitrary
contexts, forcing drivers to use schedule_work and requiring
lots of code

* rfkill drivers need to keep track of soft/hard blocked
internally -- the core should do this

* the rfkill API has many unexpected quirks, for example being
asymmetric wrt. alloc/free and register/unregister

* rfkill can call back into a driver from within a function the
driver called -- this is prone to deadlocks and generally
should be avoided

* rfkill-input pointlessly is a separate module

* drivers need to #ifdef rfkill functions (unless they want to
depend on or select RFKILL) -- rfkill should provide inlines
that do nothing if it isn't compiled in

* the rfkill structure is not opaque -- drivers need to initialise
it correctly (lots of sanity checking code required) -- instead
force drivers to pass the right variables to rfkill_alloc()

* the documentation is hard to read because it always assumes the
reader is completely clueless and contains way TOO MANY CAPS

* the rfkill code needlessly uses a lot of locks and atomic
operations in locked sections

* fix LED trigger to actually change the LED when the radio state
changes -- this wasn't done before

Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e31a16d6f64ef0e324c6f54d5112703c3f13a9c4 21-May-2009 Zhu Yi <yi.zhu@intel.com> wireless: move some utility functions from mac80211 to cfg80211

The patch moves some utility functions from mac80211 to cfg80211.
Because these functions are doing generic 802.11 operations so they
are not mac80211 specific. The moving allows some fullmac drivers
to be also benefit from these utility functions.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3f0d843b5c94be824c2027f01348f360958e5542 18-May-2009 Johannes Berg <johannes@sipsolutions.net> b43/legacy: fix beacon change processing

Process beacon change even if the BSSID doesn't
change at the same time. Also fix what I think
is a small locking error in b43legacy, there's
a spin_unlock_irqrestore that looks out of place.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
2d0ddec5b2b859f06116f631fc0ffe94fbceb556 23-Apr-2009 Johannes Berg <johannes@sipsolutions.net> mac80211: unify config_interface and bss_info_changed

The config_interface method is a little strange, it contains the
BSSID and beacon updates, while bss_info_changed contains most
other BSS information for each interface. This patch removes
config_interface and rolls all the information it previously
passed to drivers into bss_info_changed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
57c4d7b4c4986037be51476b8e3025d5ba18d8b8 23-Apr-2009 Johannes Berg <johannes@sipsolutions.net> mac80211: clean up beacon interval settings

We currently have two beacon interval configuration knobs:
hw.conf.beacon_int and vif.bss_info.beacon_int. This is
rather confusing, even though the former is used when we
beacon ourselves and the latter when we are associated to
an AP.

This just deprecates the hw.conf.beacon_int setting in favour
of always using vif.bss_info.beacon_int. Since it touches all
the beaconing IBSS code anyway, we can also add support for
the cfg80211 IBSS beacon interval configuration easily.

NOTE: The hw.conf.beacon_int setting is retained for now due
to drivers still using it -- I couldn't untangle all
drivers, some are updated in this patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
137907287789607f2a2586ad625e7b8c646b3425 08-Apr-2009 Michael Buesch <mb@bu3sch.de> b43: Remove unnecessary MMIO in interrupt hotpath

This removes unnecessary MMIO accesses in the interrupt hotpath.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
616de35da94df8748771a014ef898360d5f4d0c8 29-Mar-2009 Michael Buesch <mb@bu3sch.de> b43: Do not "select" HW_RANDOM

Auto-depend on HW_RANDOM, rather than "select"ing it.
This way the user has the choice to enable or disable HWRNG support.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
591f3dc200abb2100c473248a121ce14bfeeabd6 31-Mar-2009 Michael Buesch <mb@bu3sch.de> b43: Do radio lock assertion in software

The assertion of the lock-bit in the hardware register is unreliable,
because there are devices with quirks that will randomly set the bit.

Do the assertion in software, only.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3e3ccb3d9b8d5a1b65b34e1be2decf213ba3bebb 19-Mar-2009 Michael Buesch <mb@bu3sch.de> b43: Mask PHY TX error interrupt, if not debugging

This masks the PHY TX error interrupt, if debugging is disabled.

Currently we have a bug somewhere which triggers this interrupt once
in a while. (Depends on the network noise/quality). While this is nonfatal,
it scares the hell out of users and we frequently receive bugreports
that incorrectly identify this error message as the reason.

There's another problem with this. The PHY TX error interrupt is protected
with a watchdog that will restart the device if it keeps triggering very often.
This is used to fix interrupt storms from completely broken devices.

However, this watchdog might trigger in completely normal operation.
If the TX capacity of the card is saturated, the likeliness of the watchdog
triggering increases, as more TX errors occur. The current threshold
for the watchdog is 1000 errors in 15 seconds.

This patch adds a workaround for the issue by just enabling the interrupt
if debugging is disabled (by Kconfig or by modparam).

This has the downside that real fatal PHY TX errors are not caught anymore.
But this is nonfatal due to the following reasons:
* If the card is not able to transmit anymore, MLME will notice anyway.
* I did _never_ see a real fatal PHY TX error in a mainline b43 driver.
* It does _not_ result in interrupt storms or something like that.
It will simply result in a stalled card. It can be debugged by enabling
the debugging module parameter.

Signed-off-by: Michael Buesch <mb@bu3sch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
1a77733ccb9654716160fdfb3f1f2a9e1759de19 04-Mar-2009 Michael Buesch <mb@bu3sch.de> b43: Fix compilation for devices without PCI core

This fixes compilation, if the PCI core is disabled.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
99da185a72ba685a5aaf49dff6a5fe83885112e4 24-Feb-2009 John Daiker <daikerjohn@gmail.com> b43: checkpatch.pl cleanups

Keeping this one simple.

Changing a few "foo * bar" to "foo *bar"

Removes 22 checkpatch.pl errors, with no introduced warnings.

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
25d3ef59a2112d50e145500e1bc764f9e8fd4896 20-Feb-2009 Michael Buesch <mb@bu3sch.de> b43: Implement sw scan callbacks

This implements the new sw scan callbacks in b43.
They are currently used to turn CFP update in the microcode off while scanning.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
8821905cfb65504f64e6beb014133bd2a998f5dc 20-Feb-2009 Michael Buesch <mb@bu3sch.de> b43: Enable PCI slow clock workaround, if needed.

Enable the PCI slow clock workaround, if we're running a PCI core rev <= 10.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
1cc8f476f1260758a364b68d299796a9edb9ac41 20-Feb-2009 Michael Buesch <mb@bu3sch.de> b43: Honor the no-slow-clock boardflag

Do not turn off the crystal, if the boardflags tell us so.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
969d15cfab52c0af40c617fcbcc54cad6eaa4b32 20-Feb-2009 Michael Buesch <mb@bu3sch.de> b43: Fix radio host flags

This fixes initialization of some radio related hostflags.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
fc68ed4fd7fdfafbefb270cf44194096156c7943 14-Feb-2009 Hannes Eder <hannes@hanneseder.net> drivers/net/wireless/b43: fix warning: format not a string literal and no ...

Fix this compilation warning:
drivers/net/wireless/b43/main.c: In function 'b43_print_fw_helptext':
drivers/net/wireless/b43/main.c:1971: warning: format not a string literal and no format arguments
drivers/net/wireless/b43/main.c:1973: warning: format not a string literal and no format arguments

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
060210f938d8aa0b9d795588a2274cd67ba9d6a4 25-Jan-2009 Michael Buesch <mb@bu3sch.de> b43: Dynamically control log verbosity

Dynamically control the log verbosity with a module parameter.
This enables us to dynamically enable debugging messages (or disable
info, warn, error messages) via module parameter or /sys/module/b43/parameters/verbose.

This increases the module size by about 3k. But in practice it reduces the
module size for the user, because some distributions ship the b43 module
with CONFIG_B43_DEBUG set, which increases the module by about 15k.

So with this patch applied, distributions should really _disable_ CONFIG_B43_DEBUG.
There is no reason to keep it in a production-release kernel.
So we have a net reduction in size by about 12k.

This patch also adds a printk of the wireless core revision, so people
don't have to enable SSB debugging to get the wireless core revision.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
08e87a833f5e77ff33b64c9ac27cb7fb9ecd4a48 25-Jan-2009 Alina Friedrichsen <x-alina@gmx.net> b43: Accessing the TSF via mac80211

This allows the mac80211 high level code to access the TSF. This is e.g. needed for BSSID merges in the IBSS mode.

The second version adds locking and removes the now unnecessary debugfs entries.

Thanks to Michael Buesch! :)

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
1a9f509368ceb24fc66be961be15c69966f5eb5d 23-Jan-2009 Michael Buesch <mb@bu3sch.de> b43: Automatically probe for opensource firmware

First probe for proprietary firmware and then probe for opensource firmware.
This way around it's a win-win situation.
1) If proprietary fw is available, it will work.
2) If opensource firmware is available, but no proprietary (Distros can only ship open fw)
it might work.
3) If both open and proprietary are available, it will work, because it selects
the proprietary. We currently don't prefer the open fw in this case, because it doesn't
work on all devices. It would introduce a regression otherwise.

The remaining FIXMEs in this patch are harmless, because they only matter on multiband
devices, which are not implemented yet anyway.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
881d948c23442173a011f1adcfe4c95bf7f27515 21-Jan-2009 Johannes Berg <johannes@sipsolutions.net> wireless: restrict to 32 legacy rates

Since the standards only define 12 legacy rates, 32 is certainly
a sane upper limit and we don't need to use u64 everywhere. Add
sanity checking that no more than 32 rates are registered and
change the variables to u32 throughout.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
a1d88210955e56f7a0d54ac72747075b683b0850 14-Jan-2009 Larry Finger <Larry.Finger@lwfinger.net> b43: Eliminate compilation warning in b43_op_set_key

A recent pull from wireless testing generates the following warning:

CC [M] drivers/net/wireless/b43/main.o
drivers/net/wireless/b43/main.c: In function ‘b43_op_set_key’:
drivers/net/wireless/b43/main.c:3636: warning: pointer type mismatch
in conditional expression

This fix was suggested by Johannes Berg <johannes@sipsolutions.net>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
dc822b5db479dc0178d5c04cbb656dad0b6564fb 29-Dec-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: clean up set_key callback

The set_key callback now seems rather odd, passing a MAC address
instead of a station struct, and a local address instead of a
vif struct. Change that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Bob Copeland <me@bobcopeland.com> [ath5k]
Acked-by: Ivo van Doorn <ivdoorn@gmail.com> [rt2x00]
Acked-by: Christian Lamparter <chunkeey@web.de> [p54]
Tested-by: Kalle Valo <kalle.valo@nokia.com> [iwl3945]
Tested-by: Samuel Ortiz <samuel@sortiz.org> [iwl3945]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c557289cb8ea063bd09db88f8a687a841556e291 27-Dec-2008 Michael Buesch <mb@bu3sch.de> b43: Change schedule for old-fw support removal

The scheduled date for the removal of old fw support was in July 2008.
However, we're not going to remove the support unless it causes a major
headache. So change the schedule from "July 2008" to "when it causes headaches".

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6b1c7c67603efdf0b39f6056989b0f8194cdc1f3 25-Dec-2008 Michael Buesch <mb@bu3sch.de> b43/ssb: Add SPROM8 extraction and LP-PHY detection

This adds detection code for the LP-PHY and SPROM
extraction code for version 8, which is needed by the LP-PHY and
newer N-PHY.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
bb519bee07eed4fac9921ad658fb1f7ed78defb5 24-Dec-2008 Johannes Berg <johannes@sipsolutions.net> b43: detect N PHY revision/radio

Does nothing unless you enable the hidden N PHY config.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
92d6128e1766bb7a7b6dc58f012fdf772fdf1100 24-Dec-2008 Johannes Berg <johannes@sipsolutions.net> ssb/b43: add new N PHY device

This is used on my macbook. N PHY, obviously nothing works
yet, but we can detect the chip with this patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3ebbbb56a162b8f9b9a77bc7810b9d4e0868e039 19-Dec-2008 Michael Buesch <mb@bu3sch.de> b43: Use 64bit atomic register access for TSF

On modern b43 devices with core rev >=3, the hardware guarantees us an
atomic 64bit read/write of the TSF, if we access the lower 32bits first.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e808e586b77a10949e209f8a00cb8bf27e51df12 19-Dec-2008 Michael Buesch <mb@bu3sch.de> b43: Fixup set_key handling

This fixes the key handling for mac80211's new key->flags.
It also adds TX locking to the set_key handler and adds a comment why this is required.
This doesn't fix any known bugs.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
922d8a0b6d82fb40ffb561576e3800c3784ff43d 12-Jan-2009 John W. Linville <linville@tuxdriver.com> b43: fix "‘gmode’ may be used uninitialized" warning

drivers/net/wireless/b43/main.c: In function ‘b43_op_config’:
drivers/net/wireless/b43/main.c:3264: warning: ‘gmode’ may be used uninitialized

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
9cf7f247bd0cd21e475c71a4e018bb612ef02aab 19-Dec-2008 Michael Buesch <mb@bu3sch.de> b43: Add key memory dumping

This adds an option to dump all crypto related memory to
the kernel log.
Obviously, it should not be enabled on productive systems. ;)

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d10d0e5707fb7b8afa7e68a14d69e752604ee294 18-Dec-2008 Michael Buesch <mb@bu3sch.de> b43: Fix some MAC locking

This fixes some locking w.r.t. the lower MAC (firmware).
It also removes a lot of ancient IRQ-locking that's not needed anymore.
We simply suspend the MAC. That's easier and causes less trouble.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c7ab5ef9bcd281135c21b4732c9be779585181be 29-Oct-2008 Johannes Berg <johannes@sipsolutions.net> b43: implement short slot and basic rate handling

This implements proper short slot handling and adds code to
program the hardware for the correct response rates derived
from the basic rate set for the current BSS.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
71c11fb57b924c160297ccd9e1761db598d00ac2 28-Oct-2008 Johannes Berg <johannes@sipsolutions.net> b43/legacy: remove SSID code

The SSID programmed into the device is used by the ucode only
to reply to probe requests, a functionality we disable anyway
because it doesn't fit with the mac80211/hostapd programming
model. Therefore, it isn't useful to program the SSID into
device.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e6a9854b05c1a6af1308fe2b8c68f35abf28a3ee 21-Oct-2008 Johannes Berg <johannes@sipsolutions.net> mac80211/drivers: rewrite the rate control API

So after the previous changes we were still unhappy with how
convoluted the API is and decided to make things simpler for
everybody. This completely changes the rate control API, now
taking into account 802.11n with MCS rates and more control,
most drivers don't support that though.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
9124b07740c51cbc6e358dd0c4abc6ee8ded084d 14-Oct-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: make retry limits part of hw config

Instead of having a separate callback, use the HW config callback
with a new flag to change retry limits.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e8975581f63870be42ff4662b293d1b0c8c21350 09-Oct-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: introduce hw config change flags

This makes mac80211 notify the driver which configuration
actually changed, e.g. channel etc.

No driver changes, this is just plumbing, driver authors are
expected to act on this if they want to.

Also remove the HW CONFIG debug printk, it's incorrect, often
we configure something else.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
0f4ac38b5999c3d51adad52d61c56c1b99c247ec 09-Oct-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: kill hw.conf.antenna_sel_{rx,tx}

Never actually used.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e174961ca1a0b28f7abf0be47973ad57cb74e5f0 27-Oct-2008 Johannes Berg <johannes@sipsolutions.net> net: convert print_mac to %pM

This converts pretty much everything to print_mac. There were
a few things that had conflicts which I have just dropped for
now, no harm done.

I've built an allyesconfig with this and looked at the files
that weren't built very carefully, but it's a huge patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
870abdf67170daa9f1022e55a35c469239fcc74c 05-Oct-2008 Felix Fietkau <nbd@openwrt.org> mac80211: add multi-rate retry support

This patch adjusts the rate control API to allow multi-rate retry
if supported by the driver. The ieee80211_hw struct specifies how
many alternate rate selections the driver supports.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
1d280ddcfd6666a45915ccc3a76dee033a6b917b 29-Sep-2008 Larry Finger <Larry.Finger@lwfinger.net> b43: Increase loop tries in do_dummy_tx

One of the spin-on-condition loops in routine do_dummy_tx always exits before
the condition is satisfied. The hardware might be left in an inconsistent
state that might be the cause of the PHY transmission errors seen by some
users.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
570bdfb17dfc92061f7e26f6320b309c1df00997 26-Sep-2008 Larry Finger <Larry.Finger@lwfinger.net> b43: Fix Bluetooth Coexistence SPROM programming error for HP 12f8 version of BCM4306

Yet another BCM4306 card with the Bluetooth Coexistence SPROM programming
error has been found.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3bb91bff8165223aa14f015a6c9150a536b40d9b 19-Sep-2008 Larry Finger <Larry.Finger@lwfinger.net> b43: Fix Bluetooth coexistence SPROM coding error for Motorola 7010 variant of BCM4306

An additional BCM4306 has been found with the Bluetooth coexistence
SPROM coding error.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
17741cdc264e4d768167766a252210e201c1519a 11-Sep-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: share STA information with driver

This patch changes mac80211 to share some more data about
stations with drivers. Should help iwlwifi and ath9k when
they get around to updating, and might also help with
implementing rate control algorithms without internals.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
05c914fe330fa8e1cc67870dc0d3809dfd96c107 11-Sep-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: use nl80211 interface types

There's really no reason for mac80211 to be using its
own interface type defines. Use the nl80211 types and
simplify the configuration code a bit: there's no need
to translate them any more now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
5a5f3b406a167cb5befa2110c6d9943898070aaf 06-Sep-2008 Michael Buesch <mb@bu3sch.de> b43: Remove QoS update workqueue

We don't need the workqueue anymore, as we can now sleep in the callback.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c40c1129106ab20c90b0f1516e79d7b5e7e29904 06-Sep-2008 Michael Buesch <mb@bu3sch.de> b43: Fix QoS defaults

This fixes the initialization of the default QoS parameters.
This got broken by "wireless: fix warnings from QoS patch".

Reported-by: Lorenzo Nava
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
0b7dcd9652c8d6b2a0dd04f3a3e6ca0574560042 03-Sep-2008 Michael Buesch <mb@bu3sch.de> b43: Replace hardcoded Analog switch

Replace a hardcoded Analog switch (which breaks on N-PHY) by a call to
the switch_analog PHY operation.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
cb24f57fe6f94a445fad8fab6ebdde7c51857895 03-Sep-2008 Michael Buesch <mb@bu3sch.de> b43: Move Analog switching into phy code

This moves the Analog switching code into the PHY files.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
fb11137af83b7b66c7aab8dbc5f09d2c95684fed 02-Sep-2008 Michael Buesch <mb@bu3sch.de> b43: Split PHY alloc and init

This splits the PHY allocation from the PHY init.
This is needed in order to properly support Analog handling.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3d0da7516441d41dbfcc2b2667d9b792d580e50b 30-Aug-2008 Michael Buesch <mb@bu3sch.de> b43: Move code from nphy.* to phy_n.*

Sourcecode files for PHY code are named by phy_XXX.{c,h}
where XXX is the PHY type.
Move the N-PHY code to match the other files.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
f59ac0481660e66cec67f1d6b024e78b9dc715fe 30-Aug-2008 Luis R. Rodriguez <lrodriguez@atheros.com> cfg80211: keep track of supported interface modes

It is obviously good for userspace to know up front which
interface modes a given piece of hardware might support (even
if adding such an interface might fail later because of
concurrency issues), so let's make cfg80211 aware of that.
For good measure, disallow adding interfaces in all other
modes so drivers don't forget to announce support for one mode
when they add it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Stephen Blackheath <tramp.enshrine.stephen@blacksapphire.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
18c8adeb0244f823ba78a51e23f813fe68bc3c54 28-Aug-2008 Michael Buesch <mb@bu3sch.de> b43: Rewrite TX power adjustment

This patch rewrites the TX power recalculation algorithms to scale better
with changed enviromnent. If there's low
TX traffic, the power will be checked against the desired values
every 60 seconds.
If there is high TX traffic, the check is redone every 2 seconds. This improves
the reaction times a lot and confuses the rate control less.
It will also reduce the time it initially takes to tune to a new TX power
value. With the old algorithm it could take about 30 to 45 seconds to settle to
a new power value. This will happen in about two to four seconds now.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
ef1a628d83fc0423c36e773281162be790503168 27-Aug-2008 Michael Buesch <mb@bu3sch.de> b43: Implement dynamic PHY API

This patch implements a dynamic "ops" based PHY API.
This is needed in order to conveniently support future PHY types
to avoid the "switch"-hell.

This patch does not change any functionality. It just moves lots
of code from one place to another and adjusts it for the changed
data structures.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3eb75aac8907e7ea36f0d078b2cc7393986001cf 17-Aug-2008 Huang Weiyi <weiyi.huang@gmail.com> removed unused #include <version.h>

The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
drivers/net/wireless/ath5k/base.c
drivers/net/wireless/b43/main.c
drivers/net/wireless/ipw2100.c
drivers/net/wireless/ipw2200.c
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-eeprom.c
drivers/net/wireless/iwlwifi/iwl-hcmd.c
drivers/net/wireless/iwlwifi/iwl-power.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
430cd47fa98178b5199105fab4fb74e04bd0635c 15-Aug-2008 Larry Finger <Larry.Finger@lwfinger.net> b43: Fix for another Bluetooth Coexistence SPROM Programming error for BCM4306

In trying to help users on the Ubuntu Bugzilla, I discovered another
BCM4306 with the Bluetooth Coexistence programming error in the SPROM.

This patch is contingent on the one that added the Linksys device with
subdevice code of 0x0014.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
a58d452290aafae30b021c8bf185853b1aaf2092 10-Aug-2008 Larry Finger <Larry.Finger@lwfinger.net> b43: Fix for SPROM coding error in Linksys WMP54G (BCM4306/3)

The Linksys WMP54G (BCM4306/3) card in a PCI format has an SPROM coding
error and needs the fix found for several other cards.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
605a0bd66d9d55e9ba46da1a9e5140c68bdf6d85 15-Jul-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: remove IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE flag

I forgot this in the previous patch that made it unused.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
0b57664cf2393bc1eff594ff7e5ff26533843fe6 15-Jul-2008 Johannes Berg <johannes@sipsolutions.net> wireless: fix warnings from QoS patch

When I removed the special "default" meaning from the QoS
parameters, I forgot to update drivers and this lead to
warnings because some drivers were checking for the special
values and putting in defaults. This fixes that by removing
the default special-casing completely.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
9d139c810a2aa17365cc548d0cd2a189d8433c65 09-Jul-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: revamp beacon configuration

This patch changes mac80211's beacon configuration handling
to never pass skbs to the driver directly but rather always
require the driver to use ieee80211_beacon_get(). Additionally,
it introduces "change flags" on the config_interface() call
to enable drivers to figure out what is changing. Finally, it
removes the beacon_update() driver callback in favour of
having IBSS beacon delivered by ieee80211_beacon_get() as well.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
28f49d8fec19833672a6a813bfde0068fee50bc9 29-Jun-2008 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6
1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9 28-Jun-2008 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/wireless/iwlwifi/iwl4965-base.c
923fd7036ff04381b265037469c79a2e7d0d6b67 20-Jun-2008 Michael Buesch <mb@bu3sch.de> b43: Add debugfs firmware debugging knob

This adds a firmware debugging knob to debugfs.
With this knob it's possible to enable advanced runtime firmware
checks.
For now it only implements one sanity check for the mac-suspend.
In future there'll probably be more.
If CONFIG_B43_DEBUG is disabled, these checks will collapse to nothing.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
9b839a7453dc7a25dbd367486017648182df541f 20-Jun-2008 Michael Buesch <mb@bu3sch.de> b43: Add simple firmware watchdog

This adds a simple firmware watchdog for the opensource firmware.
This will check every 15 seconds, if the firmware zeroed out the watchdog
register. The firmware will do this in its eventloop.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6bbc321a96d4d3533eb136b981baba6c8248d635 19-Jun-2008 Michael Buesch <mb@bu3sch.de> b43: Add debugfs files for random SHM access

This adds debugfs files for random SHM access.
This is needed in order to implement firmware and driver debugging
scripts in userspace.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c9e8eae0935f03e2d03a7ad7af80d8fc6c53e68c 15-Jun-2008 Michael Buesch <mb@bu3sch.de> b43: Do not return TX_BUSY from op_tx

Never return TX_BUSY from op_tx. It doesn't make sense to return
TX_BUSY, if we can not transmit the packet.
Drop the packet and return TX_OK.
This will fix the resume hang.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
caea902f72b053fd0c76d0d3b6b2e057beb3fc64 17-Jun-2008 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/wireless/rt2x00/Kconfig
drivers/net/wireless/rt2x00/rt2x00usb.c
net/sctp/protocol.c
98a3b2fe435ae76170936c14f5c9e6a87548e3ef 12-Jun-2008 Michael Buesch <mb@bu3sch.de> b43: Fix noise calculation WARN_ON

This removes a WARN_ON that is responsible for the following koops:
http://www.kerneloops.org/searchweek.php?search=b43_generate_noise_sample

The comment in the patch describes why it's safe to simply remove
the check.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
65b53e4cc90e59936733b3b95b9451d2ca47528d 10-Jun-2008 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/tg3.c
drivers/net/wireless/rt2x00/rt2x00dev.c
net/mac80211/ieee80211_i.h
04dea136b06ddd58879c9272b9f66ff060962317 20-May-2008 Johannes Berg <johannes@sipsolutions.net> b43: enable mesh

This patch enables b43 to do mesh networking, tested against my zd1211rw
dongle.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3bf0a32e22fedc0b46443699db2d61ac2a883ac4 22-May-2008 Michael Buesch <mb@bu3sch.de> b43: Fix controller restart crash

This fixes a kernel crash on rmmod, in the case where the controller
was restarted before doing the rmmod.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6b4bec010d888c5b8c731aa596635cd83dd3416c 20-May-2008 Michael Buesch <mb@bu3sch.de> b43: Upload both beacon templates on initial load

This updates the beacon template code to upload both templates,
if we never uploaded one before.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
53c068566dde708cb28a4dfc06ae3d7fd7434397 20-May-2008 Michael Buesch <mb@bu3sch.de> b43: Add firmware markers support

This adds support for firmware markers.
With firmware markers it's easily possible to check whether the
firmware runs some codepath or not. The driver will throw a message
when the firmware executes a MARKER(x).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
afa83e239af58a93eddd10a7a43ac5618884db15 19-May-2008 Michael Buesch <mb@bu3sch.de> b43: Add panic reason code that doesn't trigger restart

Add a firmware panic reason code that doesn't trigger a restart.
This is useful for firmware debugging and avoiding endless
restart loops. We can use FWPANIC_DIE to halt the firmware at a
well defined point.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
6821783271aaf541504ff8a138184fcc83fa282b 17-May-2008 Michael Buesch <mb@bu3sch.de> b43: Allow running without PCM firmware

This patch adds code to allow running the device without PCM firmware loaded.
Without PCM firmware we don't have hardware accelerated crypto on
devices with a core rev <= 10.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e48b0eeb0ab508021b654a45f332b30cac2163b9 17-May-2008 Michael Buesch <mb@bu3sch.de> b43: Add hooks for firmware debugging

This patch adds some hooks for firmware debugging.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e93048825face354ecb0cb3ac00190c764a44f45 15-May-2008 Larry.Finger@lwfinger.net <Larry.Finger@lwfinger.net> b43: Fix typo in firmware file name for 802.11 cores with rev 13

When the patch for the BCM4311 rev 2 was prepared, I misread the specs
and coded the wrong file name for the initvals firmware.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e039fa4a4195ac4ee895e6f3d1334beed63256fe 15-May-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: move TX info into skb->cb

This patch converts mac80211 and all drivers to have transmit
information and status in skb->cb rather than allocating extra
memory for it and copying all the data around. To make it fit,
a union is used where only data that is necessary for all steps
is kept outside of the union.

A number of fixes were done by Ivo, as well as the rt2x00 part
of this patch.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
2e92e6f2c50b4baf85cca968f0e6f1b5c0df7d39 15-May-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: use rate index in TX control

This patch modifies struct ieee80211_tx_control to give band
info and the rate index (instead of rate pointers) to drivers.
This mostly serves to reduce the TX control structure size to
make it fit into skb->cb so that the fragmentation code can
put it there and we can think about passing it to drivers that
way in the future.

The rt2x00 driver update was done by Ivo, thanks.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
36d6825b91bc492b65b6333c369cd96a2fc8c903 15-May-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: let drivers wake but not start queues

Having drivers start queues is just confusing, their ->start()
callback can block and do whatever is necessary, so let mac80211
start queues and have drivers wake queues when necessary (to get
packets flowing again right away.)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
566bfe5a8bcde13188a356f77666f8115813cf31 08-May-2008 Bruno Randolf <br1@einfach.org> mac80211: use hardware flags for signal/noise units

trying to clean up the signal/noise code. the previous code in mac80211 had
confusing names for the related variables, did not have much definition of
what units of signal and noise were provided and used implicit mechanisms from
the wireless extensions.

this patch introduces hardware capability flags to let the hardware specify
clearly if it can provide signal and noise level values and which units it can
provide. this also anticipates possible new units like RCPI in the future.

for signal:

IEEE80211_HW_SIGNAL_UNSPEC - unspecified, unknown, hw specific
IEEE80211_HW_SIGNAL_DB - dB difference to unspecified reference point
IEEE80211_HW_SIGNAL_DBM - dBm, difference to 1mW

for noise we currently only have dBm:

IEEE80211_HW_NOISE_DBM - dBm, difference to 1mW

if IEEE80211_HW_SIGNAL_UNSPEC or IEEE80211_HW_SIGNAL_DB is used the driver has
to provide the maximum value (max_signal) it reports in order for applications
to make sense of the signal values.

i tried my best to find out for each driver what it can provide and update it
but i'm not sure (?) for some of them and used the more conservative guess in
doubt. this can be fixed easily after this patch has been merged by changing
the hardware flags of the driver.

DRIVER SIGNAL MAX NOISE QUAL
-----------------------------------------------------------------
adm8211 unspec(?) 100 n/a missing
at76_usb unspec(?) (?) unused missing
ath5k dBm dBm percent rssi
b43legacy dBm dBm percent jssi(?)
b43 dBm dBm percent jssi(?)
iwl-3945 dBm dBm percent snr+more
iwl-4965 dBm dBm percent snr+more
p54 unspec 127 n/a missing
rt2x00 dBm n/a percent rssi+tx/rx frame success
rt2400 dBm n/a
rt2500pci dBm n/a
rt2500usb dBm n/a
rt61pci dBm n/a
rt73usb dBm n/a
rtl8180 unspec(?) 65 n/a (?)
rtl8187 unspec(?) 65 (?) noise(?)
zd1211 dB(?) 100 n/a percent

drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
cdbf0846e2dd5f122f3910d0e2a305fab337744b 02-May-2008 Harvey Harrison <harvey.harrison@gmail.com> b43: replace limit_value macro with clamp_val

kernel-provided clamp_val is identical, delete the private limit_value helper.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e100bb64bf7cdeae7f742a65ee1985649a7fd1b4 30-Apr-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: QoS related cleanups

This
* makes the queue number passed to drivers a u16
(as it will be with skb_get_queue_mapping)
* removes the useless queue number defines
* splits hw->queues into hw->queues/ampdu_queues
* removes the debugfs files for per-queue counters
* removes some dead QoS code
* removes the beacon queue configuration for IBSS
so that the drivers now never get a queue number
bigger than (hw->queues + hw->ampdu_queues - 1)
for tx and only in the range 0..hw->queues-1 for
conf_tx.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e40ac414c0130358f9eb068f4993a37f013621be 25-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Don't disable IRQs in mac_suspend

This patch removes the IRQ-disable from mac_suspend.
The main advantage of this is to get rid of the IRQ-sync call in mac_suspend.
We need to remove the MAC suspend bit from the IRQ service mask, as otherwise
the IRQ handler would race with us.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
f5eda47f45e90dfa38e25d569b9ac84ba94f8301 20-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Rewrite LO calibration algorithm

This patch distributes the Local Oscillator calibration bursts over time,
so that calibration only happens when it's actually needed.
Currently we periodically perform a recalibration of the whole table.
The table is huge and this takes lots of time. Additionally only small bits
of the table are actually needed at a given time. So instead of maintaining
a huge table with all possible calibration values, we create dynamic calibration
settings that
a) We only calibrate when they are actually needed.
b) Are cached for some time until they expire.
So a recalibration might happen if we need a calibration setting that's not
cached, or if the active calibration setting expires.
Currently the expire timeout is set to 30 seconds. We may raise that in future.

This patch reduces overall memory consumption by nuking the
huge static calibration tables.

This patch has been tested on several 4306, 4311 and 4318 flavours.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
21a75d7788f4e29b6c6d28e08f9f0310c4de828d 25-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Fix some TX/RX locking issues

This fixes some TX/RX related locking issues.
With this patch applied, some of the PHY transmission errors are fixed.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c2a3b233450d5bc426c063ea2d8a74351db29ea4 01-May-2008 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
2e35af143a1380173ba292e48e9b4913ef16b4ee 27-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Fix dual-PHY devices

This fixes operation of dual-PHY (A/B/G) devices.
Do not anounce the A-PHY to mac80211, as that's not supported, yet.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
533dd1b0be103b0ff11da71152877e1ba530f1c2 29-Apr-2008 Harvey Harrison <harvey.harrison@gmail.com> wireless: use get/put_unaligned_* helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Daniel Drake <dsd@gentoo.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/net/wireless/b43/main.c
d02aacff4467806ee56f147ac8eff6911d95811a 24-Apr-2008 Linus Torvalds <torvalds@linux-foundation.org> Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits)
tun: Multicast handling in tun_chr_ioctl() needs proper locking.
[NET]: Fix heavy stack usage in seq_file output routines.
[AF_UNIX] Initialise UNIX sockets before general device initcalls
[RTNETLINK]: Fix bogus ASSERT_RTNL warning
iwlwifi: Fix built-in compilation of iwlcore (part 2)
tun: Fix minor race in TUNSETLINK ioctl handling.
ppp_generic: use stats from net_device structure
iwlwifi: Don't unlock priv->mutex if it isn't locked
wireless: rndis_wlan: modparam_workaround_interval is never below 0.
prism54: prism54_get_encode() test below 0 on unsigned index
mac80211: update mesh EID values
b43: Workaround DMA quirks
mac80211: fix use before check of Qdisc length
net/mac80211/rx.c: fix off-by-one
mac80211: Fix race between ieee80211_rx_bss_put and lookup routines.
ath5k: Fix radio identification on AR5424/2424
ssb: Fix all-ones boardflags
b43: Add more btcoexist workarounds
b43: Fix HostFlags data types
b43: Workaround invalid bluetooth settings
...
9fc38458355525f801cd2ab403ac89850489a05e 19-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Add more btcoexist workarounds

This adds more workarounds for devices with broken BT bits.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
a259d6a45b915e00e8c6085e35fea7b61e3008a8 18-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Fix HostFlags data types

The HostFlags are a bitmask of 48bit. So we must use an u64 datatype
to hold all bits.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
1855ba7812dbd294fcfc083dc7d3b14d3b1f38db 18-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Workaround invalid bluetooth settings

This adds a workaround for invalid bluetooth SPROM settings
on ASUS PCI cards.
This will stop the microcode from poking with the BT GPIO line.
This fixes data transmission on this device, as the BT GPIO line
is used for something TX related on this device
(probably the power amplifier or the radio).
This also adds a modparam knob to help debugging this in the future,
as more devices with this bug may show up.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
b844eba292b477cda14582bfc6f535deed57a82d 23-Mar-2008 Rafael J. Wysocki <rjw@sisk.pl> PM: Remove destroy_suspended_device()

After 2.6.24 there was a plan to make the PM core acquire all device
semaphores during a suspend/hibernation to protect itself from
concurrent operations involving device objects. That proved to be
too heavy-handed and we found a better way to achieve the goal, but
before it happened, we had introduced the functions
device_pm_schedule_removal() and destroy_suspended_device() to allow
drivers to "safely" destroy a suspended device and we had adapted some
drivers to use them. Now that these functions are no longer necessary,
it seems reasonable to remove them and modify their users to use the
normal device unregistration instead.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/net/wireless/b43/main.c
ba380013b681e91e059f95b51002f8d43024b371 15-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Add fastpath to b43_mac_suspend()

This adds a fastpath for the common workloads to the
MAC suspend flushing.
In common workloads the FIFO flush will take between 100 and
200 microseconds. So we want to avoid calling msleep() in the
common case, as it will waste over 800 microseconds + scheduler
overhead.

This fastpath will hit in workloads where only small chunks
of data are transmitted (downloading a file) or when a TX rate bigger
or equal to 24MBit/s is used when transmitting lots of stuff (iperf).
So in the commonly used workloads it will basically always hit.

In case the fastpath is not hit, there's no real performance or latency
disadvantage from that.

And yes, I measured this. So this is not one of these
bad Programmer Likeliness Assumptions that are always wrong. ;)

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
8cf6a31e8d30cae1fbec8c782842f00472a4495c 05-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: use b43_is_mode() call

We must use the b43_is_mode() call to check the current interface
operation mode.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
5042c5070daaa6a3c033e4510439e3ac02a1df60 05-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Fix PHY TX control words in SHM

This fixes the initialization of the PHY TX control words in
shared memory. These control words are used for management frames
like beacons.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c97a4ccc1fad35d3d183900af29c171b6d56b7f9 05-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Fix beacon BH update

This fixes beacon updating in the bottomhalf.
In case the device is busy, we will defer to later in the IRQ handler.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
a82d992261f79506a0d55b9a179a211f96caf878 04-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Beaconing fixes

These are some beaconing related fixes. Basically it prevents
the card from triggering the beacon IRQ over and over again.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d59f720d88089f2feabe4335839521b26572dc75 03-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Fix TBTT and PU timings

This fixes some timings for pre-TBTT and synthetic PU.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
7b584163979a9fe2ebfdd57a9d64cbe27166ab70 03-Apr-2008 Michael Buesch <mb@bu3sch.de> b43: Add more N-PHY stuff

This adds some minor stuff for N-PHY support. Nothing special.
Adds Analog switching and some TODOs for RSSI processing.
Just a patch I had floating around for quite some time now.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
5100d5ac81b9330dc57e35adbe50923ba6107b8f 29-Mar-2008 Michael Buesch <mb@bu3sch.de> b43: Add PIO support for PCMCIA devices

This adds PIO support back (D'oh!) for PCMCIA devices.
This is a complete rewrite of the old PIO code. It does actually work
and we get reasonable performance out of it on a modern machine.
On a PowerBook G4 I get a few MBit for TX and a few more for RX.
So it doesn't work as well as DMA (of course), but it's a _lot_ faster
than the old PIO code (only got a few kBit with that).

The limiting factor is the host CPU speed. So it will generate 100%
CPU usage when the network interface is heavily loaded. A voluntary preemption
point in the RX path makes sure Desktop Latency isn't hurt.

PIO is needed for 16bit PCMCIA devices, as we really don't want to poke with
the braindead DMA mechanisms on PCMCIA sockets. Additionally, not all
PCMCIA sockets do actually support DMA in 16bit mode (mine doesn't).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
8e8e43843ba3ced0c657cbc0fdb10644ec60f772 28-Mar-2008 David S. Miller <davem@davemloft.net> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/usb/rndis_host.c
drivers/net/wireless/b43/dma.c
net/ipv6/ndisc.c
7a193a5df7580957c918269e4ba2fccbe4141cb4 23-Mar-2008 Michael Buesch <mb@bu3sch.de> b43: Remove irqs_disabled() sanity checks

Remove all irqs_disabled() sanity checks, as they are not safe on
a RT-enabled kernel and will trigger bogus warnings.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
affe0a02189eeec43757993b1ccb65f24e39afa5 05-Mar-2008 Adrian Bunk <bunk@kernel.org> make b43_mac_{enable,suspend}() static

b43_mac_{enable,suspend}() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
b27faf8ebf256429df8851477e02609448c0781f 06-Mar-2008 Michael Buesch <mb@bu3sch.de> b43: Rename the DMA ring pointers

Rename the DMA ring pointers to have more descriptive and standard
names. Also remove the 6th unused TX ring. We can add it back later,
if we need it. The unused TX-status rx-ring is also removed, as that's
only used by legacy devices not supported by this driver anyway.

This is no functional change, except less memory allocation for
the removed rings.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e6f5b934fba8c44c87c551e066aa7ca6fde2939e 05-Mar-2008 Michael Buesch <mb@bu3sch.de> b43: Add QOS support

This adds QOS support to the b43 driver.
QOS can be disabled on driver level with a module parameter for debugging purposes.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
38968d096b9f497e7ec4590b6b80eb8679e3646a 25-Feb-2008 Johannes Berg <johannes@sipsolutions.net> b43: verify sta_notify mac80211 callback

This helps verify that nothing bad is going on in mac80211,
it is unfortunately not possible to implement this generically
in mac80211 easily because there we can't assume that we only
have a single vif which b43 currently can assume.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
35f0d354bf0b0c125ac814419202f8c551081fda 13-Feb-2008 Michael Buesch <mb@bu3sch.de> b43: Add HostFlags HI support

This adds support for the high 16 bits of the hostflags.
No functional change.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
bb1eeff12d4cd6c706ef9fae340a9c93bb41ad05 09-Feb-2008 Michael Buesch <mb@bu3sch.de> b43: Fix bandswitch

This fixes bandswitching for the new mac80211 band API.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
8318d78a44d49ac1edf2bdec7299de3617c4232e 24-Jan-2008 Johannes Berg <johannes@sipsolutions.net> cfg80211 API for channels/bitrates, mac80211 and driver conversion

This patch creates new cfg80211 wiphy API for channel and bitrate
registration and converts mac80211 and drivers to the new API. The
old mac80211 API is completely ripped out. All drivers (except ath5k)
are updated to the new API, in many cases I expect that optimisations
can be done.

Along with the regulatory code I've also ripped out the
IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag, I believe it to be
unnecessary if the hardware simply gives us whatever channels it wants
to support and we then enable/disable them as required, which is pretty
much required for travelling.

Additionally, the patch adds proper "basic" rate handling for STA
mode interface, AP mode interface will have to have new API added
to allow userspace to set the basic rate set, currently it'll be
empty... However, the basic rate handling will need to be moved to
the BSS conf stuff.

I do expect there to be bugs in this, especially wrt. transmit
power handling where I'm basically clueless about how it should work.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
588e6cdfccb847661c62a2cc0f301d689b94ee64 09-Feb-2008 Michael Buesch <mb@bu3sch.de> b43: Fix firmware load message level

The firmware version information should always get printed. Not only
on a debug build.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
9c7d99d6fba1f26b95fb70b43f7954e9684cad3e 09-Feb-2008 Michael Buesch <mb@bu3sch.de> b43: Add firmware information to modinfo

This adds the firmware ID to modinfo.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
26bc783f8cf7227718f8b4cbc32f0c3a898b128f 09-Feb-2008 Michael Buesch <mb@bu3sch.de> b43: Add driver load messages

This adds printk messages with basic information about the driver being loaded.
This information includes a summary of the compiled-in features, which
simplifies bug-reporting and debugging a lot.
Also a firmware ID is printed. This is a unique identifier blob for a specific
version of the firmware. This ID is attached to a specific version of the firmware
blob in b43-fwcutter (see fwcutter git).
This helps users to select the right firmware for their device.
This also makes it possible to use automated scripts to fetch and extract the right
firmware for the driver. (the script will grep the .ko for the "Firmware-ID: xxx" string.
While the driver might still support other versions of the firmware for backward
compatibility, this will always print out the officially supported version, which
people _should_ use.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
3506e0c49a5ceba72c0405d1a470184c2d6705f7 05-Feb-2008 Rafael J. Wysocki <rjw@sisk.pl> b43: avoid unregistering device objects during suspend

Modify the b43 driver to avoid deadlocking suspend and resume, which happens
as a result of attempting to unregister device objects locked by the PM core
during suspend/resume cycles. Also, make it use a suspend-safe method of
unregistering device object in the resume error path.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Michael Buesch <mb@bu3sch.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/net/wireless/b43/main.c
96cf49a2c13e8dcf442abaadf6645f6a1fb3ae92 05-Feb-2008 Andrew Morton <akpm@linux-foundation.org> drivers/net/wireless/b43/main.c needs io.h

m68k:

drivers/net/wireless/b43/main.c:251: error: implicit declaration of function 'mmiowb'

Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/net/wireless/b43/main.c
7be1bb6b798d506693d2d8668e801951996b5a4a 23-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Fix suspend/resume

This fixes suspend/resume.

We must not overwrite the MAC addresses on resume. Otherwise
the card won't ACK any packets anymore.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
1946a2c3c6d138f0e1face8734226d9ba090e831 23-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Fix rfkill allocation leakage in error paths

We must kill rfkill in any error paths that trigger after rfkill init.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
1f7d87b0ecacefe4541c75901cbcf29efba42ca6 22-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Fix MAC control and microcode init

This zeros out all microcode related memory before loading
the microcode.

This also fixes initialization of the MAC control register.
The _only_ place where we overwrite the contents of the MAC control
register is at the beginning of b43_chip_init().
All other places must do read() -> mask/set -> write() to not
overwrite existing bits.

This also adds a longer delay for waiting for the microcode
to initialize itself. It seems that the current timeout is sufficient
on all available devices, but there's no real reason why we shouldn't
wait for up to one second. Slow embedded devices might exist.
Better safe than sorry.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
61cb5dd6d1c81fbb5629f60db4e2a7faa7124b7a 21-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Fix firmware caching

We must also store the ID string (filename) for the cached firmware blobs
and verify that we really have the right firmware cached before using it.
If we don't have the right fw cached, we must free it and request the
correct blobs.

This fixes bandswitch on A/B/G multi-PHY devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
53a6e2342d73d509318836e320f70cd286acd69c 13-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Add NPHY radio init code

This adds some code to init the 2055 radio.
This patch adds two files "tables_nphy.h" and "tables_nphy.c"

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
eb189d8bc9824bcb2187ffdab27d77ab469264c3 28-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Add support for new firmware

This patch adds support for new firmware.
Old firmware is still supported until July 2008.

To get new firmware, go to
ftp://ftp.linksys.com/opensourcecode/wrt150nv11/1.51.3/
and download the tarball. We don't have a smaller tarball, yet.
That will be fixed later.
You can extract firmware out of the "wl_ap.o" file contained
in this tarball using latest fwcutter. You must pass the option
--unsupported to fwcutter.
Fwcutter-010 with official support for a new firmware image will
be released soon.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
243dcfcc1d4b33aa610f1bf3ec610dafdf4d7ff7 13-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Fix radio ID register reading

This fixes reading of the high 16 bits of the radio ID
on new devices. 2055 radios want lo16 to be read first.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
dd0d43ea0bbd4c4554b13d4a5d282f9c4d1b5591 07-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Add N-PHY related initvals firmware filenames.

This adds the initval filenames for the N-PHY firmware.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
47f76ca3a34cd6571a2de39da2926123ca39a4c1 27-Dec-2007 Michael Buesch <mb@bu3sch.de> b43: Fix tim search buffer overrun

Use the length of the variable section of the beacon instead of the
whole beacon length for bounds checking.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
280d0e16bcbf5893505a0d0897f3ca1ddc0764fa 26-Dec-2007 Michael Buesch <mb@bu3sch.de> b43: Put multicast frames on the mcast queue

This queues frames flagged as "send after DTIM" by mac80211
on the special multicast queue. The firmware will take care
to send the packet after the DTIM.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d4df6f1a9edb80c99913548467397617ccee7855 26-Dec-2007 Michael Buesch <mb@bu3sch.de> b43: Fix template upload locking.

This fixes the template upload locking.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e66fee6aa04b27b6b6f812af0e4123eded5bf8ac 26-Dec-2007 Michael Buesch <mb@bu3sch.de> b43: Fix upload of beacon packets to the hardware

This fixes uploading of the beacon data and writing of the
TIM and DTIM offsets.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
32bfd35d4b63bd63de4bb0d791ef049c3c868726 19-Dec-2007 Johannes Berg <johannes@sipsolutions.net> mac80211: dont use interface indices in drivers

This patch gets rid of the if_id stuff where possible in favour of
a new per-virtual-interface structure "struct ieee80211_vif". This
structure is located at the end of the per-interface structure and
contains a variable length driver-use data area.

This has two advantages:
* removes the need to look up interfaces by if_id, this is better
for working with network namespaces and performance
* allows drivers to store and retrieve per-interface data without
having to allocate own lists/hash tables

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
f31800d8b79bc42e495070aa6e6425841b7bdcbf 09-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Remove the PHY spinlock

This fixes a sparse warning about weird locking.
The spinlock is not needed, so simply remove it.
This also adds some sanity checks to the PHY and radio locking
to protect against recursive locking.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
96c755a3923748313851da42018c962f5609942f 06-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Fix any N-PHY related WARN_ON() in the attach stage.

This fixes all WARN_ON()s in the attach stage.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d5c71e464170e823b5ae5fe7b3555f3c31694148 04-Jan-2008 Michael Buesch <mb@bu3sch.de> b43: Add NPHY kconfig option

This adds a new Kconfig option for enabling probing of N-PHYs.
This option will be removed again once the stuff works.
For now it is to help in development. This way real users won't
execute the broken N-PHY codepaths, but the developers can easily
enable N-PHY stuff.

To enable N-PHY probing simply remove the BROKEN dependency
and enable the option in the kernel config.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
aa6c7ae21d079f25420e436092e5461001ec29d7 26-Dec-2007 Michael Buesch <mb@bu3sch.de> b43: Add definitions for MAC Control register

This adds some definitions for the MAC Control register
and uses them.
This basically is no functional change.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
03b29773b613f10d2f97dbf0983f1c4c58507967 26-Dec-2007 Michael Buesch <mb@bu3sch.de> b43: Remove PIO support

Remove b43 PIO support.
DMA works well on all supported devices. There's no reason to use PIO.
Additionally, new devices don't support PIO in hardware anymore.
b43 PIO support is dead and unused code.

After applying this patch please do
git rm drivers/net/wireless/b43/pio.h
git rm drivers/net/wireless/b43/pio.c
to remove the main PIO support code.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
f3dd3fcc2c79b950801641075b33b86acc372d9b 22-Dec-2007 Michael Buesch <mb@bu3sch.de> b43: Fix chip access validation for new devices

This fixes chip access validation for newer devices
(4318 and up, I think)

This patch fixes probing of a PCMCIA based 4318 device.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
9db1f6d725921c413cc344beda5e7e7d011b02e7 22-Dec-2007 Michael Buesch <mb@bu3sch.de> b43: Only select allowed TX and RX antennas

This fixes antenna selection in b43. It adds a sanity check
for the antenna numbers we get from mac80211.

This patch depends on
ssb: Fix extraction of values from SPROM

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
e861b98d5e1be769ca6483b6df97149b956ea834 22-Dec-2007 Michael Buesch <mb@bu3sch.de> ssb: Fix extraction of values from SPROM

This fixes extraction of some values from the SPROM.
It mainly fixes extraction of antenna related values, which
is needed for another b43 fix sent later.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
8ed7fc48eb31e583bb31c2bcfdd3a9c557bad5d0 09-Dec-2007 Michael Buesch <mb@bu3sch.de> b43: Fix ofdmtab write regression

commit f04b3787bbce4567e28069a9ec97dcd804626ac7 introduced
a regression for the ofdmtable writing.

It incorrectly removed the writing of the high 16bits for
a 32bit table write and initialized the direction identifier
too late.

This patch does also some cleanups to make the code much more
readable and adds a few comments, so non rocket scientists are
also able to understand what this address caching is all about.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
013978b688d2a27af3ab55ca739e8c8ac7254870 26-Nov-2007 Larry Finger <Larry.Finger@lwfinger.net> b43: Changes to enable BCM4311 rev 02 with wireless core revision 13

The BCM94311MCG rev 02 chip has an 802.11 core with revision 13 and
has not been supported until now. The changes include the following:

(1) Add the 802.11 rev 13 device to the ssb_device_id table to load b43.
(2) Add PHY revision 9 to the supported list.
(3) Change the 2-bit routing code for address extensions to 0b10 rather
than the 0b01 used for the 32-bit case.
(4) Remove some magic numbers in the DMA setup.

The DMA implementation for this chip supports full 64-bit addressing with
one exception. Whenever the Descriptor Ring Buffer is in high memory, a
fatal DMA error occurs. This problem was not present in 2.6.24-rc2 due
to code to "Bias the placement of kernel pages at lower PFNs". When
commit 44048d70 reverted that code, the DMA error appeared. As a "fix",
use the GFP_DMA flag when allocating the buffer for 64-bit DMA. At present,
this problem is thought to arise from a hardware error.

This patch has been tested on my system and by Cédric Caumont
<icare40@hotmail.com>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
00e0b8cb74ed7c16b2bc41eb33a16eae5b6e2d5c 25-Nov-2007 Stefano Brivio <stefano.brivio@polimi.it> b43: reinit on too many PHY TX errors

Restart the hardware on too many PHY TX errors. A thousand PHY TX errors
per 15 seconds means we won't be able to recover for sure.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d8be11ee95be9ec9eabfec9f635e0feac972369b 24-Nov-2007 Johannes Berg <johannes@sipsolutions.net> b43: include FCS in frames handed to mac80211

Sometimes it can be useful to see the FCS, especially when
bad-FCS frames are shown. Pass the FCS to mac80211 and let
it worry about snipping it off when required.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
d42ce84a05d7a427df22894de268c1b4473f6004 23-Nov-2007 Johannes Berg <johannes@sipsolutions.net> b43: include full 64-bit timestamp in monitor mode

When monitor mode is enabled, this will make b43 read out the
full 64-bit MAC time from the chip for each received packet.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
95de2841aad971867851b59c0c5253ecc2e19832 09-Nov-2007 Larry Finger <Larry.Finger@lwfinger.net> b43: Convert to use of the new SPROM structure

The b43 driver is modified to use the new SPROM structure.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
1f21ad2a4f7f66855dae600ddd635ff5fb299bbd 06-Nov-2007 Stefano Brivio <stefano.brivio@polimi.it> b43/b43legacy: fix my copyright notices

Fix my copyright notices in b43 and b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
61bca6eb85c863603d6054530e2f65c3b9aba85b 06-Nov-2007 Stefano Brivio <stefano.brivio@polimi.it> b43: rewrite A PHY initialization

Rewrite and sync A PHY initialization with specs, thus allowing for further
work to be done on 802.11a support. Note that A PHY initialization involves
G PHYs as well.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
40faacc4078d0fef6daaf6f5d1d332d08631bdd8 28-Oct-2007 Michael Buesch <mb@bu3sch.de> b43: consistent naming for ieee80211_ops

Use a consistent naming scheme for the ops.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
74cfdba7ce7b601559a4bcdc9054baf1bdc6948d 28-Oct-2007 Michael Buesch <mb@bu3sch.de> b43: Use the retry limit parameters from mac80211

Use the limits provided by mac80211.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
c6dfc9a8ec236957eea3a1cf4613e90c45e1475b 28-Oct-2007 Michael Buesch <mb@bu3sch.de> b43: Dereference of wl->current_dev must be protected by wl->mutex

Put all access to wl->current_dev under protection of the mutex.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
1a8d122782bdabe4475f29d022c9a0c092ac9878 14-Dec-2007 Larry Finger <Larry.Finger@lwfinger.net> b43: Fix rfkill radio LED

This fixes Bug #9414

Since addition of the rfkill callback, the LED associated with the off
switch on the radio has not worked for several reasons:

(1) Essential data in the rfkill structure were missing.
(2) The rfkill structure was initialized after the LED initialization.
(3) There was a minor memory leak if the radio LED structure was inited.

Once the above problems were fixed, additional difficulties were noted:

(4) The radio LED was in the wrong state at startup.
(5) The radio switch had to be manipulated twice for each state change.
(6) A circular mutex locking situation existed.
(7) If rfkill-input is built as a module, it is not automatically loaded.

This patch fixes all of the above.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
354807e0dd24fa6ad25df614419c1ae8f1a23b47 19-Nov-2007 Stefano Brivio <stefano.brivio@polimi.it> b43/b43legacy: fix left-over URLs and ifdefs

Fix some left-over URLs and ifdefs in b43 and b43legacy drivers.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
a19d12d742903c745890c1374d64092595571e40 07-Nov-2007 Stefano Brivio <stefano.brivio@polimi.it> b43: fix shared IRQ race condition

Fix an IRQ race condition in b43. If we call b43_stop_wireless_core(), it
will set the status of the device to INITIALIZED and the IRQ handler won't
care any longer about IRQs, thus the kernel will disable the IRQ if it's
shared (unless we boot it with the 'irqpoll' option). So we must disable
IRQs before changing the device status.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
35c7e6602b81bdacb745f04236a419402777139e 03-Nov-2007 Michael Buesch <mb@bu3sch.de> b43: Rewrite and fix rfkill init

The rfkill subsystem doesn't like code like that
rfkill_allocate();
rfkill_register();
rfkill_unregister();
rfkill_register(); /* <- This will crash */

This sequence happens with
modprobe b43
ifconfig wlanX up
ifconfig wlanX down
ifconfig wlanX up

Fix this by always re-allocating the rfkill stuff before register.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
82cd682d56e2a6bbb46d31076cdd9a62c667a2b4 15-Oct-2007 Anton Blanchard <anton@samba.org> [PATCH] b43/b43legacy: jiffies_round -> jiffies_round_relative

When rounding a relative timeout we need to use round_jiffies_relative().

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
023384faf6a6cb44b5d4a265a7c58279ff810de1 17-Oct-2007 Michael Buesch <mb@bu3sch.de> [PATCH] b43: Make b43_stop() static

This fixes a sparse warning.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
923403b8074a6db4207b404934d5c821d73c199f 16-Oct-2007 WANG Cong <xiyou.wangcong@gmail.com> [PATCH] drivers/net/wireless/b43/main.c: fix an uninitialized variable

Fix an uninitialized variable in drivers/net/wireless/b43/main.c::b43_start().

Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
90ba931fa1d3410c87d93ef774624d12533f37c3 11-Oct-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] janitorial: fix all double includes in drivers/net/wireless

This patch removes all double includes of the same file. This
makes scripts/checkincludes.pl happy.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
628a140ba033ef201706a8c7e767c8a0c0f8326c 26-Sep-2007 Johannes Berg <johannes@sipsolutions.net> [MAC80211]: remove ALG_NONE

This "algorithm" is used only internally and is not useful.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Michael Buesch <mb@bu3sch.de>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
05b64b364822863974c0121359b01d7ba0f22205 28-Sep-2007 Michael Buesch <mb@bu3sch.de> [B43]: Rewrite pwork locking policy.

Implement much easier and more lightweight locking for
the periodic work.
This also removes the last big busywait loop and replaces it
by a sleeping loop.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
42bb4cd5ae320dd46630533fecb91b940d4468e2 28-Sep-2007 Michael Buesch <mb@bu3sch.de> [B43]: Use input-polldev for the rfkill switch

This removes the direct call to rfkill on an rfkill event
and replaces it with an input device. This way userspace is also
notified about the event.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
8e9f7529fdfe34ed519f048682eb404fbd8004e8 27-Sep-2007 Michael Buesch <mb@bu3sch.de> [B43]: RF-kill support

This adds full support for the RFKILL button and
the RFKILL LED trigger.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
21954c367e4088c491122edd263964345bc1d3bf 27-Sep-2007 Michael Buesch <mb@bu3sch.de> [B43]: LED triggers support

Drive the LEDs through the generic LED triggers.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
4150c57212ad134765dd78c654a4b9906252b66d 17-Sep-2007 Johannes Berg <johannes@sipsolutions.net> [PATCH] mac80211: revamp interface and filter configuration

Drivers are currently supposed to keep track of monitor
interfaces if they allow so-called "hard" monitor, and
they are also supposed to keep track of multicast etc.

This patch changes that, replaces the set_multicast_list()
callback with a new configure_filter() callback that takes
filter flags (FIF_*) instead of interface flags (IFF_*).
For a driver, this means it should open the filter as much
as necessary to get all frames requested by the filter flags.
Accordingly, the filter flags are named "positively", e.g.
FIF_ALLMULTI.

Multicast filtering is a bit special in that drivers that
have no multicast address filters need to allow multicast
frames through when either the FIF_ALLMULTI flag is set or
when the mc_count value is positive.

At the same time, drivers are no longer notified about
monitor interfaces at all, this means they now need to
implement the start() and stop() callbacks and the new
change_filter_flags() callback. Also, the start()/stop()
ordering changed, start() is now called *before* any
add_interface() as it really should be, and stop() after
any remove_interface().

The patch also changes the behaviour of setting the bssid
to multicast for scanning when IEEE80211_HW_NO_PROBE_FILTERING
is set; the IEEE80211_HW_NO_PROBE_FILTERING flag is removed
and the filter flag FIF_BCN_PRBRESP_PROMISC introduced.
This is a lot more efficient for hardware like b43 that
supports it and other hardware can still set the BSSID
to all-ones.

Driver modifications by Johannes Berg (b43 & iwlwifi), Michael Wu
(rtl8187, adm8211, and p54), Larry Finger (b43legacy), and
Ivo van Doorn (rt2x00).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/b43/main.c
fda9abcf1a5b6b78a4ead25729583541af9876b5 20-Sep-2007 Michael Buesch <mb@bu3sch.de> [B43]: Support for turning the radio off from software.

This adds support for turning the radio off in software.
That's useful in environments, where you don't want the RF
to radiate any signals, but don't want to bring the interface down.

Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
6a724d68a38c33ba4c7f7b5f008301ac12c9ced1 20-Sep-2007 Michael Buesch <mb@bu3sch.de> [B43]: Remove the "radio hw enabled" message on startup.

This message is useless. Only report state changes.

Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
05155c83d13b983ac2c5691575fd471543df31fe 19-Sep-2007 Michael Buesch <mb@bu3sch.de> [B43]: Change loglevel of radio-enable message.

Also cleanup the code a bit and remove the inline.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
1a09404a2338163f181d170c7abdc2242b6c6f03 20-Sep-2007 Michael Buesch <mb@bu3sch.de> [B43]: Fix sparse warnings.

The remaining warning in phy.c will be fixed later.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
0795af5729b18218767fab27c44b1384f72dc9ad 04-Oct-2007 Joe Perches <joe@perches.com> [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()

This is nicer than the MAC_FMT stuff.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c
e4d6b7951812d98417feb10784e400e253caf633 18-Sep-2007 Michael Buesch <mb@bu3sch.de> [B43]: add mac80211-based driver for modern BCM43xx devices

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/b43/main.c