pandora-kernel.git
14 years agomac80211: document TX powersave filter requirements
Johannes Berg [Fri, 7 Aug 2009 14:28:09 +0000 (16:28 +0200)]
mac80211: document TX powersave filter requirements

This documents what's required to implement that TX powersave
filter properly wrt. handling hardware queues.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: explain TX retry and status
Johannes Berg [Fri, 7 Aug 2009 14:23:43 +0000 (16:23 +0200)]
mac80211: explain TX retry and status

Add some more documentation including an example so that
it's clearer what should be done for TX retries.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonl80211: add generation number to all dumps
Johannes Berg [Fri, 7 Aug 2009 14:17:38 +0000 (16:17 +0200)]
nl80211: add generation number to all dumps

In order for userspace to be able to figure out whether
it obtained a consistent snapshot of data or not when
using netlink dumps, we need to have a generation number
in each dump message that indicates whether the list has
changed or not -- its value is arbitrary.

This patch adds such a number to all dumps, this needs
some mac80211 involvement to keep track of a generation
number to start with when adding/removing mesh paths or
stations.

The wiphy and netdev lists can be fully handled within
cfg80211, of course, but generation numbers need to be
stored there as well.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: use reassociation when possible
Johannes Berg [Fri, 7 Aug 2009 12:51:05 +0000 (14:51 +0200)]
cfg80211: use reassociation when possible

With the move of everything related to the SME from
mac80211 to cfg80211, we lost the ability to send
reassociation frames. This adds them back, but only
for wireless extensions. With the userspace SME, it
shall control assoc vs. reassoc (it already can do
so with the nl80211 interface).

I haven't touched the connect() implementation, so
it is not possible to reassociate with the nl80211
connect primitive. I think that should be done with
the NL80211_CMD_ROAM command, but we'll have to see
how that can be handled in the future, especially
with fullmac chips.

This patch addresses only the immediate regression
we had in mac80211, which previously sent reassoc.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: validate channel settings across interfaces
Johannes Berg [Fri, 7 Aug 2009 15:22:35 +0000 (17:22 +0200)]
cfg80211: validate channel settings across interfaces

Currently, there's a problem that affects regulatory
enforcement and connection stability, in that it is
possible to switch the channel while connected to a
network or joined to an IBSS.

The problem comes from the fact that we only validate
the channel against the current interface's type, not
against any other interface. Thus, you have any type
of interface up, additionally bring up a monitor mode
interface and switch the channel on the monitor. This
will obviously also switch the channel on the other
interface.

The problem now is that if you do that while sending
beacons for IBSS mode, you can switch to a disabled
channel or a channel that doesn't allow beaconing.
Combined with a managed mode interface connected to
an AP instead of an IBSS interface, you can easily
break the connection that way.

To fix this, this patch validates any channel change
with all available interfaces, and disallows such
changes on secondary interfaces if another interface
is connected to an AP or joined to an IBSS.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: hack to disable filters for fixing association
Kalle Valo [Fri, 7 Aug 2009 10:35:33 +0000 (13:35 +0300)]
wl1251: hack to disable filters for fixing association

Commit 9cef8737 "mac80211: fix managed mode BSSID handling" broke
association in wl1251, most probably because the driver configured
the bssid filter incorrectly. Workaround this by disabling filter
altogether. This needs to be fixed properly soon.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: add hw scan completed debug message
Kalle Valo [Fri, 7 Aug 2009 10:35:26 +0000 (13:35 +0300)]
wl1251: add hw scan completed debug message

The logs currently don't show when hw scan has completed, fix that.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: remove Luciano as maintainer
Kalle Valo [Fri, 7 Aug 2009 10:35:19 +0000 (13:35 +0300)]
wl1251: remove Luciano as maintainer

Luciano is maintaining wl1271 part.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: rename reg.h to wl1251_reg.h
Kalle Valo [Fri, 7 Aug 2009 10:35:11 +0000 (13:35 +0300)]
wl1251: rename reg.h to wl1251_reg.h

Now that wl1271 doesn't use reg.h anymore, it can be renamed to
wl1251_reg.h.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: use workqueue provided by mac80211
Kalle Valo [Fri, 7 Aug 2009 10:35:04 +0000 (13:35 +0300)]
wl1251: use workqueue provided by mac80211

wl1251 should use workqueue created by mac80211 to not block the events
workqueue too long.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: move wl1251_acx_wake_up_conditions() to wl1251_ps_set_mode()
Kalle Valo [Fri, 7 Aug 2009 10:34:56 +0000 (13:34 +0300)]
wl1251: move wl1251_acx_wake_up_conditions() to wl1251_ps_set_mode()

It should not be hidden inside wl1251_cmd_ps_mode().

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: fix channel setting in wl1251_op_config()
Kalle Valo [Fri, 7 Aug 2009 10:34:49 +0000 (13:34 +0300)]
wl1251: fix channel setting in wl1251_op_config()

There is a bug in wl1251_op_config(). It was calling join with previous
channel. Fix it by setting assigning wl->channel before calling join command.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: create wl1251_join()
Kalle Valo [Fri, 7 Aug 2009 10:34:42 +0000 (13:34 +0300)]
wl1251: create wl1251_join()

Better to use wl1251_cmd_join() only for sending the command and move
the logic to wl1251_join().

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: add channel to wl1251_cmd_join() parameters
Kalle Valo [Fri, 7 Aug 2009 10:34:34 +0000 (13:34 +0300)]
wl1251: add channel to wl1251_cmd_join() parameters

Because join channel tunes to a channel, better to make it more obvious
by adding a parameter for it.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: initialise default channel to zero
Kalle Valo [Fri, 7 Aug 2009 10:34:27 +0000 (13:34 +0300)]
wl1251: initialise default channel to zero

Because wl->channel was initialised to one, the first join command in
wl1251_op_config() always failed.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: remove wait parameter from wl1251_cmd_join()
Kalle Valo [Fri, 7 Aug 2009 10:34:19 +0000 (13:34 +0300)]
wl1251: remove wait parameter from wl1251_cmd_join()

We should wait everytime for the join command to finish, not waiting for
it might create problems.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: use beacon interval and dtim period provided by mac80211
Kalle Valo [Fri, 7 Aug 2009 10:34:12 +0000 (13:34 +0300)]
wl1251: use beacon interval and dtim period provided by mac80211

wl1251 was using hardcoded beacon intervals and dtim periods, use the ones
provided by mac80211 instead.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: reorder wl1251_cmd_join() arguments
Kalle Valo [Fri, 7 Aug 2009 10:34:05 +0000 (13:34 +0300)]
wl1251: reorder wl1251_cmd_join() arguments

It's more common to have beacon interval before dtim period. Also use
bool instead of u8.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: remove wl1251_ops
Kalle Valo [Fri, 7 Aug 2009 10:33:57 +0000 (13:33 +0300)]
wl1251: remove wl1251_ops

Now wl1271 is splitted to separate files, no need to use wl1251_ops anymore.
So remove struct wl1251_chip and wl1251_ops.c.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: make irq handling interface specific
Bob Copeland [Fri, 7 Aug 2009 10:33:49 +0000 (13:33 +0300)]
wl1251: make irq handling interface specific

In SDIO, the host driver requests the IRQ and invokes a callback to the
card driver.  This differs from SPI, so the relevant code needs to be
interface-specific.  This patch pushes the irq code down into _spi.c
and _sdio.c, and adds enable/disable callbacks.

This fixes the following warning:

[  566.343887] ------------[ cut here ]------------
[  566.349105] WARNING: at kernel/irq/manage.c:222 __enable_irq+0x3c/0x6c()
[  566.356735] Unbalanced enable for IRQ 0
[  566.361099] Modules linked in: msm_wifi wl12xx_sdio wl12xx mac80211 cfg80211 rfkill_backport lib80211_crypt_ccmp lib80211_crypt_wep lib80211_crypt_tkip lib80211
[  566.381240] [<c025acec>] (dump_stack+0x0/0x14) from [<c004b610>] (warn_slowpath+0x70/0x8c)
[  566.391860] [<c004b5a0>] (warn_slowpath+0x0/0x8c) from [<c0077c10>] (__enable_irq+0x3c/0x6c)
[  566.402572]  r3:00000000 r2:c02cad13
[  566.407516]  r7:00001002 r6:00000000 r5:c0310be4 r4:c0310be4
[  566.415786] [<c0077bd4>] (__enable_irq+0x0/0x6c) from [<c0077fd0>] (enable_irq+0x38/0x64)
[  566.425826]  r5:c0310be4 r4:a0000013
[  566.430709] [<c0077f98>] (enable_irq+0x0/0x64) from [<bf0dfa78>] (wl12xx_boot_run_firmware+0xfc/0x170 [wl12xx])
[  566.442947]  r7:00001002 r6:c440a9fc r5:00000072 r4:c440a9e0
[  566.450851] [<bf0df97c>] (wl12xx_boot_run_firmware+0x0/0x170 [wl12xx]) from [<bf0e05f0>] (wl1251_boot+0xd4/0x108 [wl12xx])
[  566.464492]  r5:00000000 r4:c440a9e0
[  566.469466] [<bf0e051c>] (wl1251_boot+0x0/0x108 [wl12xx]) from [<bf0dd27c>] (wl12xx_op_start+0x54/0xb8 [wl12xx])
[  566.482162]  r5:00000000 r4:c440a9e0
[  566.487472] [<bf0dd228>] (wl12xx_op_start+0x0/0xb8 [wl12xx]) from [<bf0b96dc>] (ieee80211_open+0x2dc/0x720 [mac80211])
[  566.500594]  r7:00001002 r6:c4950800 r5:c440a220 r4:00000000
[  566.508865] [<bf0b9400>] (ieee80211_open+0x0/0x720 [mac80211]) from [<c01f1edc>] (dev_open+0x9c/0xfc)
[  566.520705] [<c01f1e40>] (dev_open+0x0/0xfc) from [<c01f17dc>] (dev_change_flags+0x98/0x170)
[  566.531417]  r5:00000041 r4:c4950800
[  566.536330] [<c01f1744>] (dev_change_flags+0x0/0x170) from [<c023041c>] (devinet_ioctl+0x3a8/0x784)
[  566.547683]  r7:c128e380 r6:00000001 r5:00008914 r4:00000000
[  566.555587] [<c0230074>] (devinet_ioctl+0x0/0x784) from [<c02318cc>] (inet_ioctl+0xdc/0x114)
[  566.566299] [<c02317f0>] (inet_ioctl+0x0/0x114) from [<c01e1a60>] (sock_ioctl+0x1f0/0x248)
[  566.576827]  r5:00008914 r4:c572c1a0
[  566.581771] [<c01e1870>] (sock_ioctl+0x0/0x248) from [<c00b23a0>] (vfs_ioctl+0x34/0x94)
[  566.592086]  r7:c572c1a0 r6:bee497e8 r5:00008914 r4:c572c1a0
[  566.599990] [<c00b236c>] (vfs_ioctl+0x0/0x94) from [<c00b2a28>] (do_vfs_ioctl+0x52c/0x584)
[  566.610549]  r7:c572c1a0 r6:00008914 r5:c572c1a0 r4:c3201228
[  566.618453] [<c00b24fc>] (do_vfs_ioctl+0x0/0x584) from [<c00b2ac0>] (sys_ioctl+0x40/0x64)
[  566.628890] [<c00b2a80>] (sys_ioctl+0x0/0x64) from [<c0021da0>] (ret_fast_syscall+0x0/0x2c)
[  566.639541]  r7:00000036 r6:00000000 r5:00000004 r4:001a11f3
[  566.647445] ---[ end trace 15c26ef7dd5e7b03 ]---

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: add sdio support
Bob Copeland [Fri, 7 Aug 2009 10:33:42 +0000 (13:33 +0300)]
wl1251: add sdio support

This adds the wl1251_sdio module, enabling the SDIO interface for
wl1251, as used by the Google G1 phone and others.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: split spi interface into separate module
Bob Copeland [Fri, 7 Aug 2009 10:33:34 +0000 (13:33 +0300)]
wl1251: split spi interface into separate module

This creates a module called wl1251_spi.ko which contains just the
SPI-specific code.  The core remains in the module wl1251.ko.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: move module probe methods into spi.c
Bob Copeland [Fri, 7 Aug 2009 10:33:26 +0000 (13:33 +0300)]
wl1251: move module probe methods into spi.c

This change moves all of the spi specific code from main.c into
spi.c.  The module initialization code also moves, but common
code for initializing mac80211 etc. stays in main.c, as this will
eventually form a common library module also used by wl1251_sdio.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: make wl1251_set_partition bus agnostic
Bob Copeland [Fri, 7 Aug 2009 10:33:18 +0000 (13:33 +0300)]
wl1251: make wl1251_set_partition bus agnostic

The same partition setting code can be used for both SPI and SDIO
modes, if we remove the spi-specific commands and use the more
generic buffer write routines.  Do that and move it to io.c
since it deals with register/memory address offsets.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: introduce wl1251_if_operations struct
Bob Copeland [Fri, 7 Aug 2009 10:33:11 +0000 (13:33 +0300)]
wl1251: introduce wl1251_if_operations struct

Introduce an ops struct with read, write, and reset functions to
abstract away the details of the wl1251 bus interface.  Doing this
will allow SDIO to coexist with SPI by supplying its own I/O
routines.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: use wiphy_dev instead of wl->spi->dev
Bob Copeland [Fri, 7 Aug 2009 10:33:04 +0000 (13:33 +0300)]
wl1251: use wiphy_dev instead of wl->spi->dev

Remove a dependency on the bus-specific struct device by using wiphy_dev
when requesting firmware.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: separate bus i/o code into io.c
Bob Copeland [Fri, 7 Aug 2009 10:32:56 +0000 (13:32 +0300)]
wl1251: separate bus i/o code into io.c

In order to eventually support wl1251 spi and sdio interfaces, move
the register and memory transfer functions to a common file.  Also
rename wl1251_spi_mem_{read,write} to indicate its common usage.
We still use spi_read internally until SDIO interface is introduced
so nothing functional should change here.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: remove fixed address support from spi commands
Kalle Valo [Fri, 7 Aug 2009 10:32:48 +0000 (13:32 +0300)]
wl1251: remove fixed address support from spi commands

The fixed addresses are not used in wl1251, only in wl1271. So it can
be safely removed.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Update beacon RSSI
Sujith [Fri, 7 Aug 2009 04:15:36 +0000 (09:45 +0530)]
ath9k: Update beacon RSSI

ANI uses the beacon RSSI for its operation.
Update this properly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Remove local chainmask variable
Sujith [Fri, 7 Aug 2009 04:15:33 +0000 (09:45 +0530)]
ath9k: Remove local chainmask variable

The chainmask can be obtained directly from ath_hw.
Also, use a helper macro for comparing CTLs - this improves readability.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Cleanup TX power calculation for 4K chips
Sujith [Fri, 7 Aug 2009 04:15:30 +0000 (09:45 +0530)]
ath9k: Cleanup TX power calculation for 4K chips

Write CCK power-per-rate array always and report
correct TX power to regulatory.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Clean antenna configuration for 4K EEPROM chips
Sujith [Fri, 7 Aug 2009 04:15:23 +0000 (09:45 +0530)]
ath9k: Clean antenna configuration for 4K EEPROM chips

This patch revamps the antenna configuration mechanism
for 4K chips.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Add macros for Antenna Diversity
Sujith [Fri, 7 Aug 2009 04:15:21 +0000 (09:45 +0530)]
ath9k: Add macros for Antenna Diversity

A subsequent patch would use these for configuring
antennae on AR9285.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Cleanup ath9k_hw_4k_set_gain() interface
Sujith [Fri, 7 Aug 2009 04:15:19 +0000 (09:45 +0530)]
ath9k: Cleanup ath9k_hw_4k_set_gain() interface

regChainOffset is always zero, remove it.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Split eeprom.c into manageable pieces
Sujith [Fri, 7 Aug 2009 04:15:15 +0000 (09:45 +0530)]
ath9k: Split eeprom.c into manageable pieces

Add eeprom_def.c, eeprom_4k.c and eeprom_9287.c
This improves maintainability.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Remove a few DEBUG mesages
Sujith [Fri, 7 Aug 2009 04:15:13 +0000 (09:45 +0530)]
ath9k: Remove a few DEBUG mesages

We have never used these at all.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Try to fix whitespace damage
Sujith [Fri, 7 Aug 2009 04:15:11 +0000 (09:45 +0530)]
ath9k: Try to fix whitespace damage

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Cleanup function return types
Sujith [Fri, 7 Aug 2009 04:15:09 +0000 (09:45 +0530)]
ath9k: Cleanup function return types

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Remove unneeded assignment of protocol field
Sujith [Fri, 7 Aug 2009 04:15:01 +0000 (09:45 +0530)]
ath9k: Remove unneeded assignment of protocol field

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: Set WEP ciphers
Samuel Ortiz [Thu, 6 Aug 2009 19:04:41 +0000 (21:04 +0200)]
cfg80211: Set WEP ciphers

With iwconfig there is no way to properly set the ciphers when trying to
connect to a WEP SSID. Although mac80211 based drivers dont need it, several
fullmac drivers do.
This patch basically sets the WEP ciphers whenever they're not set at all.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: fix SME association after disassociation
Johannes Berg [Thu, 6 Aug 2009 18:41:34 +0000 (20:41 +0200)]
cfg80211: fix SME association after disassociation

When an AP disassociates us, we currently go into a weird
state because the SME doesn't handle authenticated but not
associated well unless it's within its own state machine,
it can't recover from that. However, it shouldn't need to,
since we don't do any decisions in it really -- so when we
get disconnected, simply deauthenticate too.

Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: fix nl80211 disconnected events
Johannes Berg [Thu, 6 Aug 2009 18:41:33 +0000 (20:41 +0200)]
cfg80211: fix nl80211 disconnected events

When reporting a disconnection to userspace, we try
to report whether it was from the AP or by our own
choice. However, we misreported a broadcast deauth
or disassoc as being by own choice, which is wrong.
Fix this by checking the sender address instead of
the destination address.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: stay authenticated after disassoc
Johannes Berg [Thu, 6 Aug 2009 18:41:32 +0000 (20:41 +0200)]
mac80211: stay authenticated after disassoc

After being disassociated by the AP, mac80211 currently
reports this to cfg80211, and then goes to delete the
association. That's fine, but cfg80211 assumes that it's
still authenticated, however, mac80211 throws away all
state.

This fixes mac80211 to keep track of the authentication
in that case so that cfg80211 can request a deauth or
new association properly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: add wl1271 to Kconfig and the Makefile
Luciano Coelho [Thu, 6 Aug 2009 13:25:29 +0000 (16:25 +0300)]
wl1271: add wl1271 to Kconfig and the Makefile

This patch adds support for the wl1271 driver in the Kconfig and in the
Makefile.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: add wl1271 driver files
Luciano Coelho [Thu, 6 Aug 2009 13:25:28 +0000 (16:25 +0300)]
wl1271: add wl1271 driver files

This driver supports the wl1271 chipset from Texas Instruments based on the
WiLink(tm) 6.0 mobile platform.  Support for wl1273 should be relatively easy
to add.  This chipset is designed for embedded devices, with good powersaving
capabilities.  The wl1271 chipset is the successor of wl1251 and supports the
802.11b/g/n standards, but currently this driver supports only b/g.

More information about this chipset can be found here:
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12762&contentId=29993

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: fix disassociation warning due to misuse of wdev->current_bss
Pavel Roskin [Thu, 6 Aug 2009 08:52:42 +0000 (04:52 -0400)]
cfg80211: fix disassociation warning due to misuse of wdev->current_bss

WARN_ON was triggered at mlme.c:213 when dissociating from an AP.

wdev->current_bss->pub.bssid should be used in place of
wdev->current_bss for BSSID comparison.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: consolidate storage of WEP and TKIP keys
David Kilroy [Wed, 5 Aug 2009 20:23:32 +0000 (21:23 +0100)]
orinoco: consolidate storage of WEP and TKIP keys

When TKIP support was added, we stored the keys separately to avoid
issues when both TKIP and WEP keys are sent to the driver.

We need to consolidate the storage to convert to cfg80211, so do this
first and try iron out the issues.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: add function to retrieve current bssid
David Kilroy [Wed, 5 Aug 2009 20:23:31 +0000 (21:23 +0100)]
orinoco: add function to retrieve current bssid

We will need this from the cfg80211 disassociate call.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: move disassociation to hw.c
David Kilroy [Wed, 5 Aug 2009 20:23:30 +0000 (21:23 +0100)]
orinoco: move disassociation to hw.c

This allows the disassociation to be called via cfg80211.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: pass orinoco_set_tkip_key the sequence lengths
David Kilroy [Wed, 5 Aug 2009 20:23:29 +0000 (21:23 +0100)]
orinoco: pass orinoco_set_tkip_key the sequence lengths

When we store the keys for cfg80211, the sequence lengths will also be
stored. So avoid assuming the sequence lengths at this level.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: use local types for auth alg and sequence length
David Kilroy [Wed, 5 Aug 2009 20:23:28 +0000 (21:23 +0100)]
orinoco: use local types for auth alg and sequence length

This helps in the refactorring required to convert the driver to
cfg80211.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: prefer_port3 can be a single bit
David Kilroy [Wed, 5 Aug 2009 20:23:27 +0000 (21:23 +0100)]
orinoco: prefer_port3 can be a single bit

This is a boolean value set based on firmware capabilities, so move the
variable to the capabilities section and reduce the structure size.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: display wext SSID when connected by cfg80211
Zhu Yi [Wed, 5 Aug 2009 07:07:13 +0000 (15:07 +0800)]
wireless: display wext SSID when connected by cfg80211

cfg80211 displays correct link info when connected by wext. But if
the connection is setup by cfg80211, wext cannot display the SSID.
This patch fixed this issue.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Fix fallout from the IEEE80211_IF_TYPE to NL80211_IFTYPE change.
Gábor Stefanik [Tue, 4 Aug 2009 23:28:20 +0000 (01:28 +0200)]
b43: Fix fallout from the IEEE80211_IF_TYPE to NL80211_IFTYPE change.

Update a comment that still says IEEE80211_IF_TYPE instead of NL80211_IFTYPE.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: remove wrong probe_resp_plcp write
gregor kowski [Tue, 4 Aug 2009 22:44:23 +0000 (00:44 +0200)]
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>
14 years agob43: Typo fixes & minor cleanup
Gábor Stefanik [Tue, 4 Aug 2009 22:25:42 +0000 (00:25 +0200)]
b43: Typo fixes & minor cleanup

Make use of HostFlags defines in the LP-PHY code.
Fix fallout from the IEEE80211_IF_TYPE to NL80211_IFTYPE change.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix compilation of mesh (although its disabled)
Luis R. Rodriguez [Tue, 4 Aug 2009 22:06:26 +0000 (15:06 -0700)]
mac80211: fix compilation of mesh (although its disabled)

Mesh is currently disabled on mac80211, its marked
as broken. This patch gets it to compile though,
to account for the mac80211 workqueue changes.
There was a simple typo in the patches for mesh
for the workqueue migration, but we never compile
tested it as we couldn't even select mesh as its
broken. Lets at least let it compile for those
interested in getting it fixed.

Reported-by: Pat Erley <pat-lkml@erley.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Add LP 2063 radio init
Gábor Stefanik [Tue, 4 Aug 2009 21:57:32 +0000 (23:57 +0200)]
b43: Add LP 2063 radio init

Add B2063 radio init code and tables for LP-PHY.
Rename structures common between B2062 and B2063 to B206X.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agozd1211rw: make it clear we don't use leds.h LED stuff
Luis R. Rodriguez [Tue, 4 Aug 2009 21:04:17 +0000 (14:04 -0700)]
zd1211rw: make it clear we don't use leds.h LED stuff

zd1211rw uses its own LED stuff so let rename its LED
stuff as such.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: use new FIF_PSPOLL configure filter
Luis R. Rodriguez [Tue, 4 Aug 2009 17:05:30 +0000 (10:05 -0700)]
ath9k: use new FIF_PSPOLL configure filter

We used to set pspoll filter on ath9k on AP mode but
we no longer need this mode specific check as mac80211
now does the check for us and informs us when we should
enable pspoll through FIF_PSPOLL.

Cc: Igor Perminov <igor.perminov@inbox.ru>
Cc: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fix missing output in monitor mode after ifconfig up
Joerg Albert [Tue, 4 Aug 2009 23:52:07 +0000 (01:52 +0200)]
ath5k: fix missing output in monitor mode after ifconfig up

Let ath5k_chan_set() always call ath5k_reset().
This fixes the bug that we don't
get any packets in monitor mode after:

ifconfig wlan0 down
iwconfig wlan0 mode monitor channel 1
ifconfig wlan0 up

but they arrive after

iwconfig wlan0 channel 2

Signed-off-by: Joerg Albert <jal2@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix memory corruption in rf cache, add a sanity check
Pavel Roskin [Tue, 4 Aug 2009 21:48:16 +0000 (17:48 -0400)]
rt2x00: fix memory corruption in rf cache, add a sanity check

Change rt2x00_rf_read() and rt2x00_rf_write() to subtract 1 from the rf
register number.  This is needed because the rf registers are enumerated
starting with one.  The size of the rf register cache is just enough to
hold all registers, so writing to the highest register was corrupting
memory.  Add a check to make sure that the rf register number is valid.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Cc: stable@kernel.org
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoixgbe: Fix receive on real device when VLANs are configured
Lucy Liu [Thu, 13 Aug 2009 14:09:38 +0000 (14:09 +0000)]
ixgbe: Fix receive on real device when VLANs are configured

Traffic received with a priority tag (VID = 0) and non-zero priority value was
incorrectly handled by the VLAN packet code path due to a check on zero for
the whole VLAN tag instead of just the VID.

This patch masked out the priority field when checking the vlan tag for
received VLAN packets.

Signed-off-by: Lucy Liu <lucy.liu@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Do not return 0 in ixgbe_fcoe_ddp() upon FCP_RSP in DDP completion
Yi Zou [Thu, 13 Aug 2009 14:09:58 +0000 (14:09 +0000)]
ixgbe: Do not return 0 in ixgbe_fcoe_ddp() upon FCP_RSP in DDP completion

We return the ddp->len in ixgbe_fcoe_ddp() to indicate the length of data that
have been DDPed. However, it is possible that the length is 0, e.g., for SCSI
READ, the FCP_RSP may come back w/ SCSI status 0x28 as Task Set Full with no FCP
data for DDP. In ixgbe_fcoe_ddp(), we return 0 to indicate not passing DDPed
packets to upper layer. Therefore in the case of ddp->len being 0 upon FCP_RSP,
we do not want to return the 0 ddp->len as we want FCP_RSP to be always
delivered to the upper layer. This patch fixes this bug by setting rc only if
ddp->len is non-zero.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Fri, 14 Aug 2009 02:59:44 +0000 (19:59 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/netxen/netxen_nic_main.c

14 years agobonding: wipe out printk's
Jiri Pirko [Thu, 13 Aug 2009 04:11:52 +0000 (04:11 +0000)]
bonding: wipe out printk's

I did not introduce new lines over 80 chars. I even eliminated some of
them.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoinet6: Set default traffic class
Gerrit Renker [Sun, 9 Aug 2009 08:12:49 +0000 (08:12 +0000)]
inet6: Set default traffic class

This patch addresses:
 * assigning -1 to np->tclass as it is currently done is not very meaningful,
   since it turns into 0xff;
 * RFC 3542, 6.5 allows -1 for clearing the sticky IPV6_TCLASS option
   and specifies -1 to mean "use kernel default":
   - RFC 2460, 7. requires that the default traffic class must be zero for
     all 8 bits,
   - this is consistent with RFC 2474, 4.1 which recommends a default PHB of 0,
     in combination with a value of the ECN field of "non-ECT" (RFC 3168, 5.).

This patch changes the meaning of -1 from assigning 255 to mean the RFC 2460
default, which at the same time allows to satisfy clearing the sticky TCLASS
option as per RFC 3542, 6.5.

(When passing -1 as ancillary data, the fallback remains np->tclass, which
 has either been set via socket options, or contains the default value.)

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoinet6: Conversion from u8 to int
Gerrit Renker [Sun, 9 Aug 2009 08:12:48 +0000 (08:12 +0000)]
inet6: Conversion from u8 to int

This replaces assignments of the type "int on LHS" = "u8 on RHS" with
simpler code. The LHS can express all of the unsigned right hand side
values, hence the assigned value can not be negative.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: skb ftracer - Add actual ftrace code to kernel (v3)
Neil Horman [Thu, 13 Aug 2009 05:23:56 +0000 (05:23 +0000)]
net: skb ftracer - Add actual ftrace code to kernel (v3)

skb allocation / consumption correlator

Add ftracer module to kernel to print out a list that correlates a process id,
an skb it read, and the numa nodes on wich the process was running when it was
read along with the numa node the skbuff was allocated on.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
 Makefile            |    1
 trace.h             |   19 ++++++
 trace_skb_sources.c |  154 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 174 insertions(+)
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: skb ftracer - Add config option to enable new ftracer (v3)
Neil Horman [Thu, 13 Aug 2009 05:20:45 +0000 (05:20 +0000)]
net: skb ftracer - Add config option to enable new ftracer (v3)

skb allocation / consumption corelator - Add config option

This patch adds a Kconfig option to enable the addtition of the skb source
tracer.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
 Kconfig |   10 ++++++++++
 1 file changed, 10 insertions(+)
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: free napi resources during detach
Dhananjay Phadke [Thu, 13 Aug 2009 07:03:01 +0000 (07:03 +0000)]
netxen: free napi resources during detach

o Defer napi resouce allocation to device attach.

o Free napi resources and delete napi during detach.

This ensures right behavior across firmware reset.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: remove netxen workqueue
Amit Kumar Salecha [Thu, 13 Aug 2009 07:03:00 +0000 (07:03 +0000)]
netxen: remove netxen workqueue

o Remove private workqueue in the driver, move all
  scheduled tasks to keventd workqueues. This makes
  ports (interfaces) of same / different NIC boards
  independent, in terms of their link watchdog and
  reset tasks.

o Move quick checks for link status and temperature
  in timer callback, schedule watchdog task only if
  link status changed or temperature reached critical
  threshold.

This also fixes deadlock when thermal panic occurs,
watchdog work was flushing workqueue that it was
sitting on.

Signed-off-by: Amit Kumar Salecha <amit@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: fix issues setting rx-usecs with legacy interrupts
Don Skidmore [Tue, 11 Aug 2009 13:18:14 +0000 (13:18 +0000)]
ixgbe: fix issues setting rx-usecs with legacy interrupts

Currently setting rx-usecs when the interface is in legacy interrupt
mode it is not immediate.  We were only setting EITR for each MSIx
vector and since this count would be zero for legacy mode it wasn't
set until after a reset.  This patch corrects that by checking what
mode we are in and then setting EITR accordingly.

Signed-off-by: Don Skidmore <donald.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: fix oops caused by wrong rtnl newlink usage
Oliver Hartkopp [Tue, 11 Aug 2009 02:41:24 +0000 (02:41 +0000)]
can: fix oops caused by wrong rtnl newlink usage

For 'real' hardware CAN devices the netlink interface is used to set CAN
specific communication parameters. Real CAN hardware can not be created with
the ip tool ...

The invocation of 'ip link add type can' lead to an oops as the standard rtnl
newlink function was called:

http://bugzilla.kernel.org/show_bug.cgi?id=13954

This patch adds a private newlink function for the CAN device driver interface
that unconditionally returns -EOPNOTSUPP.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Reported-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
CC: Patrick McHardy <kaber@trash.net>
CC: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: skb ftracer - add tracepoint to skb_copy_datagram_iovec (v3)
Neil Horman [Thu, 13 Aug 2009 05:19:44 +0000 (05:19 +0000)]
net: skb ftracer - add tracepoint to skb_copy_datagram_iovec (v3)

skb allocation / cosumption tracer - Add consumption tracepoint

This patch adds a tracepoint to skb_copy_datagram_iovec, which is called each
time a userspace process copies a frame from a socket receive queue to a user
space buffer.  It allows us to hook in and examine each sk_buff that the system
receives on a per-socket bases, and can be use to compile a list of which skb's
were received by which processes.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
 include/trace/events/skb.h |   20 ++++++++++++++++++++
 net/core/datagram.c        |    3 +++
 2 files changed, 23 insertions(+)
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAdd support for w90p910 mac driver
Wan ZongShun [Sun, 9 Aug 2009 03:06:19 +0000 (03:06 +0000)]
Add support for w90p910 mac driver

I fixed up my mac driver, which relatives to previous
mac driver actually in the tree.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agokorina: add error-handling to korina_alloc_ring
Phil Sutter [Wed, 12 Aug 2009 12:52:32 +0000 (12:52 +0000)]
korina: add error-handling to korina_alloc_ring

This also avoids a potential buffer overflow in case the very first
receive descriptor fails to allocate, as an index of -1 would be used
afterwards. Kudos to Roel Kluin for pointing this out and providing an
initial patch.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agokorina: fix printk formatting, add final info line
Phil Sutter [Wed, 12 Aug 2009 12:22:46 +0000 (12:22 +0000)]
korina: fix printk formatting, add final info line

The macro DRV_NAME contains "korina", the field dev->name points to the
actual interface name. So messages were formerly prefixed with
'korinaeth2:' (on my system).

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/bridge: Add 'hairpin' port forwarding mode
Fischer, Anna [Thu, 13 Aug 2009 06:55:16 +0000 (06:55 +0000)]
net/bridge: Add 'hairpin' port forwarding mode

This patch adds a 'hairpin' (also called 'reflective relay') mode
port configuration to the Linux Ethernet bridge kernel module.
A bridge supporting hairpin forwarding mode can send frames back
out through the port the frame was received on.

Hairpin mode is required to support basic VEPA (Virtual
Ethernet Port Aggregator) capabilities.

You can find additional information on VEPA here:
http://tech.groups.yahoo.com/group/evb/
http://www.ieee802.org/1/files/public/docs2009/new-hudson-vepa_seminar-20090514d.pdf
http://www.internet2.edu/presentations/jt2009jul/20090719-congdon.pdf

An additional patch 'bridge-utils: Add 'hairpin' port forwarding mode'
is provided to allow configuring hairpin mode from userspace tools.

Signed-off-by: Paul Congdon <paul.congdon@hp.com>
Signed-off-by: Anna Fischer <anna.fischer@hp.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agolmc: Read outside array bounds
roel kluin [Mon, 10 Aug 2009 01:29:52 +0000 (01:29 +0000)]
lmc: Read outside array bounds

If dev_alloc_skb() fails on the first iteration of the allocation loop,
then we end up writing before the start of the array.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: Log the explicit address that triggered DAD failure
Jens Rosenboom [Wed, 12 Aug 2009 22:16:04 +0000 (22:16 +0000)]
ipv6: Log the explicit address that triggered DAD failure

If an interface has multiple addresses, the current message for DAD
failure isn't really helpful, so this patch adds the address itself to
the printk.

Signed-off-by: Jens Rosenboom <jens@mcbone.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net:Creating/destroying queues regardless of netif_running() in suspend/resume...
Sarveshwar Bandi [Wed, 12 Aug 2009 21:01:29 +0000 (21:01 +0000)]
be2net:Creating/destroying queues regardless of netif_running() in suspend/resume path

Signed-off-by: sarveshwarb <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: fix panic when splicing unprepared TIDs
Luis R. Rodriguez [Tue, 11 Aug 2009 20:10:33 +0000 (13:10 -0700)]
mac80211: fix panic when splicing unprepared TIDs

We splice skbs from the pending queue for a TID
onto the local pending queue when tearing down a
block ack request. This is not necessary unless we
actually have received a request to start a block ack
request (rate control, for example). If we never received
that request we should not be splicing the tid pending
queue as it would be null, causing a panic.

Not sure yet how exactly we allowed through a call when the
tid state does not have at least HT_ADDBA_REQUESTED_MSK set,
that will require some further review as it is not quite
obvious.

For more information see the bug report:

http://bugzilla.kernel.org/show_bug.cgi?id=13922

This fixes this oops:

BUG: unable to handle kernel NULL pointer dereference at 00000030
IP: [<f8806c70>] ieee80211_agg_splice_packets+0x40/0xc0 [mac80211]
*pdpt = 0000000002d1e001 *pde = 0000000000000000
Thread overran stack, or stack corrupted
Oops: 0000 [#1] SMP
last sysfs file: /sys/module/aes_generic/initstate
Modules linked in: <bleh>

Pid: 0, comm: swapper Not tainted (2.6.31-rc5-wl #2) Dell DV051
EIP: 0060:[<f8806c70>] EFLAGS: 00010292 CPU: 0
EIP is at ieee80211_agg_splice_packets+0x40/0xc0 [mac80211]
EAX: 00000030 EBX: 0000004c ECX: 00000003 EDX: 00000000
ESI: c1c98000 EDI: f745a1c0 EBP: c076be58 ESP: c076be38
 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process swapper (pid: 0, ti=c076a000 task=c0709160 task.ti=c076a000)
Stack: <bleh2>
Call Trace:
 [<f8806edb>] ? ieee80211_stop_tx_ba_cb+0xab/0x150 [mac80211]
 [<f8802f1e>] ? ieee80211_tasklet_handler+0xce/0x110 [mac80211]
 [<c04862ff>] ? net_rx_action+0xef/0x1d0
 [<c0149378>] ? tasklet_action+0x58/0xc0
 [<c014a0f2>] ? __do_softirq+0xc2/0x190
 [<c018eb48>] ? handle_IRQ_event+0x58/0x140
 [<c01205fe>] ? ack_apic_level+0x7e/0x270
 [<c014a1fd>] ? do_softirq+0x3d/0x40
 [<c014a345>] ? irq_exit+0x65/0x90
 [<c010a6af>] ? do_IRQ+0x4f/0xc0
 [<c014a35d>] ? irq_exit+0x7d/0x90
 [<c011d547>] ? smp_apic_timer_interrupt+0x57/0x90
 [<c01094a9>] ? common_interrupt+0x29/0x30
 [<c010fd9e>] ? mwait_idle+0xbe/0x100
 [<c0107e42>] ? cpu_idle+0x52/0x90
 [<c054b1a5>] ? rest_init+0x55/0x60
 [<c077492d>] ? start_kernel+0x315/0x37d
 [<c07743ce>] ? unknown_bootoption+0x0/0x1f9
 [<c0774099>] ? i386_start_kernel+0x79/0x81
Code: <bleh3>
EIP: [<f8806c70>] ieee80211_agg_splice_packets+0x40/0xc0 [mac80211] SS:ESP 0068:c076be38
CR2: 0000000000000030

Cc: stable@kernel.org
Testedy-by: Jack Lau <jackelectronics@hotmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agobnx2x: update version to 1.52.1
Eilon Greenstein [Wed, 12 Aug 2009 08:24:31 +0000 (08:24 +0000)]
bnx2x: update version to 1.52.1

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Whitespaces and comments
Eilon Greenstein [Wed, 12 Aug 2009 08:24:29 +0000 (08:24 +0000)]
bnx2x: Whitespaces and comments

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Removing unused definitions
Eilon Greenstein [Wed, 12 Aug 2009 08:24:25 +0000 (08:24 +0000)]
bnx2x: Removing unused definitions

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Beautify bnx2x_dump.h
Eilon Greenstein [Wed, 12 Aug 2009 08:24:18 +0000 (08:24 +0000)]
bnx2x: Beautify bnx2x_dump.h

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Re-factor the initialization code
Eilon Greenstein [Wed, 12 Aug 2009 08:24:14 +0000 (08:24 +0000)]
bnx2x: Re-factor the initialization code

Moving the code to a more logical place and beautifying it. No real change in
behavior.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Using PCI_DEVICE macro
Eilon Greenstein [Wed, 12 Aug 2009 08:24:10 +0000 (08:24 +0000)]
bnx2x: Using PCI_DEVICE macro

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Adding explicit casting
Eilon Greenstein [Wed, 12 Aug 2009 08:24:05 +0000 (08:24 +0000)]
bnx2x: Adding explicit casting

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Using macro for phy address
Eilon Greenstein [Wed, 12 Aug 2009 08:24:02 +0000 (08:24 +0000)]
bnx2x: Using macro for phy address

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Re-arrange the link structures for better alignment
Eilon Greenstein [Wed, 12 Aug 2009 08:23:59 +0000 (08:23 +0000)]
bnx2x: Re-arrange the link structures for better alignment

Change ieee_fc to u16 instead of u32 and re-arrange the link parameters
structures

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Missing smp_wmb for statistics state machine
Eilon Greenstein [Wed, 12 Aug 2009 08:23:56 +0000 (08:23 +0000)]
bnx2x: Missing smp_wmb for statistics state machine

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Remove SGMII configuration when not required
Eilon Greenstein [Wed, 12 Aug 2009 08:23:53 +0000 (08:23 +0000)]
bnx2x: Remove SGMII configuration when not required

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Keep only one HW path active
Eilon Greenstein [Wed, 12 Aug 2009 08:23:51 +0000 (08:23 +0000)]
bnx2x: Keep only one HW path active

Disable bmac access while working with emac and keep the single lane SerDes in
reset while working with 4 lanes XGXS

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Check unzip return code
Eilon Greenstein [Wed, 12 Aug 2009 08:23:48 +0000 (08:23 +0000)]
bnx2x: Check unzip return code

Without this check, when running out of memory, we will see PSOD's in
bnx2x_init_fill() when doing a memset().  This is because at that time,
bp->gunzip_buf is not pointing to a valid allocated space.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Remove the init_dmae field from bp
Eilon Greenstein [Wed, 12 Aug 2009 08:23:44 +0000 (08:23 +0000)]
bnx2x: Remove the init_dmae field from bp

Moved the dmae_command from the heap to the stack.  This will save 56
bytes per bnx2x structure.   As a side benefit, we can also reduce the
time the dmae_mutex is held.  This is because do we not need to hold
this mutex when setting up the dmae command.  The memory where is dmae
command is stored is not a shared resource and doesn not need to be
protected.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Updating regdump_len at drvinfo
Eilon Greenstein [Wed, 12 Aug 2009 08:23:40 +0000 (08:23 +0000)]
bnx2x: Updating regdump_len at drvinfo

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Move printing of version from probe to the init
Eilon Greenstein [Wed, 12 Aug 2009 08:23:37 +0000 (08:23 +0000)]
bnx2x: Move printing of version from probe to the init

Move printing of version from probe to the init function
Rather then checking if this is the first module probe call to print
the version of the driver only once, the statement is moved to the init
function of the module where init is only called once

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Combine get_pcie_width and get_pcie_speed
Eilon Greenstein [Wed, 12 Aug 2009 08:23:34 +0000 (08:23 +0000)]
bnx2x: Combine get_pcie_width and get_pcie_speed

The functions bnx2x_get_pcie_width() and bnx2x_get_pcie_speed() were
combined into bnx2x_get_pcie_width_speed() so that there is only
1 PCI read to PCICFG_OFFSET + PCICFG_LINK_CONTROL rather then 2 reads.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>