pandora-kernel.git
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 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 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>
14 years agobnx2x: Stop loading if error condition detected
Eilon Greenstein [Wed, 12 Aug 2009 08:23:31 +0000 (08:23 +0000)]
bnx2x: Stop loading if error condition detected

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: Calling pci_set_drvdata earlier
Eilon Greenstein [Wed, 12 Aug 2009 08:23:28 +0000 (08:23 +0000)]
bnx2x: Calling pci_set_drvdata earlier

In case of error, bnx2x_init_dev calls pci_set_drvdata(pdev, NULL)

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: Configurable pause scheme
Eilon Greenstein [Wed, 12 Aug 2009 08:23:26 +0000 (08:23 +0000)]
bnx2x: Configurable pause scheme

When a given ring is running out of space, the FW can send pause towards the
network. When working with multi-queues, when one queue is getting out of space
it can block all other queues. The preferred scheme is to send pause frames only
when running out of the shared internal chip buffers and if a given queue cannot
place a packet on the host, it will drop it. Since some users might want to work
in drop-less mode, allowing changing the behavior as a module parameter.

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

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: Prefetch the page containing the BD descriptor
Eilon Greenstein [Wed, 12 Aug 2009 08:23:20 +0000 (08:23 +0000)]
bnx2x: Prefetch the page containing the BD descriptor

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: Reporting host statistics to management FW
Eilon Greenstein [Wed, 12 Aug 2009 08:23:17 +0000 (08:23 +0000)]
bnx2x: Reporting host statistics to management FW

This is required for NCSI statistics

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Removing old PHY FW upgrade code
Eilon Greenstein [Wed, 12 Aug 2009 08:23:14 +0000 (08:23 +0000)]
bnx2x: Removing old PHY FW upgrade code

This code should not have resided in the driver. Now that we have a new
interface, this logic can reside in the application that whishes to upgrade the
PHY FW

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Supporting PHY FW upgrade
Eilon Greenstein [Wed, 12 Aug 2009 08:23:11 +0000 (08:23 +0000)]
bnx2x: Supporting PHY FW upgrade

There are 3 operations that the driver needs to support to allow applications to
access the PHY FW (on top of the MDC/MDIO access). Since those are essentially
nvram access commands, adding them to the ethtool -E interface.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: MDC/MDIO CL45 IOCTLs
Eilon Greenstein [Wed, 12 Aug 2009 08:23:08 +0000 (08:23 +0000)]
bnx2x: MDC/MDIO CL45 IOCTLs

As suggested by Ben Hutchings <bhutchings@solarflare.com>, using the MDC/MDIO
IOCTL

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Adding XAUI CL73 autoneg support
Eilon Greenstein [Wed, 12 Aug 2009 08:23:04 +0000 (08:23 +0000)]
bnx2x: Adding XAUI CL73 autoneg support

Adding CL73 support to the built in PHY in the 5771x device. Also supporting
fallbacks to CL73 if the link partner does not respond.

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: BCM8727 FW load
Eilon Greenstein [Wed, 12 Aug 2009 08:23:01 +0000 (08:23 +0000)]
bnx2x: BCM8727 FW load

The BCM8727 is a dual port PHY. The FW must be loaded in a given order on all
designs - including those which swapped the ports (calling port number zero the
second port)

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: get_ext_phy_fw_version returns NULL if not applicable
Eilon Greenstein [Wed, 12 Aug 2009 08:22:59 +0000 (08:22 +0000)]
bnx2x: get_ext_phy_fw_version returns NULL if not applicable

To avoid confusion, if the PHY does not have a FW (and so, no FW version) make
sure that the string is NULL.

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: Reading the FW version of the BCM8481 PHY
Eilon Greenstein [Wed, 12 Aug 2009 08:22:54 +0000 (08:22 +0000)]
bnx2x: Reading the FW version of the BCM8481 PHY

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: BCM8481 LED4 instead of LASI
Eilon Greenstein [Wed, 12 Aug 2009 08:22:16 +0000 (08:22 +0000)]
bnx2x: BCM8481 LED4 instead of LASI

The BCM8481 does not generate LASI interrupt for 10M, 100M and 1G link, so we
are using LED4 output as the interrupt input to the 57711. This requires some
adaptation in the link interrupt routines

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: Advertize flow control normally in MF mode
Eilon Greenstein [Wed, 12 Aug 2009 08:22:13 +0000 (08:22 +0000)]
bnx2x: Advertize flow control normally in MF mode

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Supporting Device Control Channel
Eilon Greenstein [Wed, 12 Aug 2009 08:22:08 +0000 (08:22 +0000)]
bnx2x: Supporting Device Control Channel

In multi-function mode, the FW can receive special management control commands
to set the Min/Max BW and the the function link state

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Removing old FW files
Eilon Greenstein [Thu, 13 Aug 2009 05:53:55 +0000 (22:53 -0700)]
bnx2x: Removing old FW files

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Using the new FW
Eilon Greenstein [Thu, 13 Aug 2009 05:53:28 +0000 (22:53 -0700)]
bnx2x: Using the new FW

The new FW improves the packets per second rate. It required a lot of change in
the FW which implies many changes in the driver to support it. It is now also
possible for the driver to use a separate MSI-X vector for Rx and Tx - this also
add some to the complicity of this change.

All things said - after this patch, practically all performance matrixes show
improvement.
Though Vladislav Zolotarov is not signed on this patch, he did most of the job
and deserves credit for that.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: New FW files
Eilon Greenstein [Thu, 13 Aug 2009 05:52:50 +0000 (22:52 -0700)]
bnx2x: New FW files

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years ago8139cp: balance dma_map_single vs dma_unmap_single pair
Francois Romieu [Thu, 13 Aug 2009 05:18:14 +0000 (22:18 -0700)]
8139cp: balance dma_map_single vs dma_unmap_single pair

The driver always:
1. allocate cp->rx_buf_sz + NET_IP_ALIGN
2. map cp->rx_buf_sz

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor8169: phy init for the 8102e
françois romieu [Mon, 10 Aug 2009 19:45:48 +0000 (19:45 +0000)]
r8169: phy init for the 8102e

Synced with Realtek's 1.013.00 r8101 driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor8169: phy init for the 8169s
françois romieu [Mon, 10 Aug 2009 19:44:56 +0000 (19:44 +0000)]
r8169: phy init for the 8169s

Synced with Realtek's 6.011.00 r8169 driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor8169: phy init for the 8169scd
françois romieu [Mon, 10 Aug 2009 19:44:19 +0000 (19:44 +0000)]
r8169: phy init for the 8169scd

Synced with Realtek's 6.011.00 r8169 driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>