Commit Graph

14425 Commits (1197764e403d97231eb6da2b1e16f511a7fd3101)

Author SHA1 Message Date
Sebastian Andrzej Siewior 4d1d49858c net/libertas: remove GPIO-CS handling in SPI interface code
This removes the dependency on GPIO framework and lets the SPI host
driver handle the chip select. The SPI host driver is required to keep
the CS active for the entire message unless cs_change says otherwise.
This patch collects the two/three single SPI transfers into a message.
Also the delay in read path in case use_dummy_writes are not used is
moved into the SPI host driver.

Tested-by: Mike Rapoport <mike@compulab.co.il>
Tested-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:50 -04:00
Jussi Kivilinna 582241a084 rndis_wlan: cleanup: rename all rndis_wext* objects to rndis_wlan*
Driver used to be named rndis_wext before inclusion to upstream. Since
rndis_wlan is being converted to cfg80211, use of rndis_wext* names
can be confusing. So rename all rndis_wext to rndis_wlan (as should
have been when driver was renamed).

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:50 -04:00
Jussi Kivilinna aa18294a28 rndis_wlan: cleanup: capitalize enum labels
Capitalize enum labels as told in Documents/CodingStyle.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:49 -04:00
Johannes Berg a60e77e5a4 iwlwifi: port to cfg80211 rfkill
This ports the iwlwifi rfkill code to the new API offered by
cfg80211 and thus removes a lot of useless stuff. The soft-
rfkill is completely removed since that is now handled by
setting the interfaces down.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:49 -04:00
Wolfgang Grandegger 51611a120e can: sja1000_of_platform: fix build problems with printk format
According to "Documentation/printk-formats.txt", if the type is
dependent on a config option for its size, like resource_size_t,
we should use a format specifier of its largest possible type and
explicitly cast to it.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-10 01:12:39 -07:00
Ron Mercer 1abb0de2f8 qlge: bugfix: Get rid of errant spin_unlock().
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-10 01:04:16 -07:00
Ron Mercer 00acd0d2ec qlge: Add set TX csum ethtool op.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-10 01:04:15 -07:00
Ron Mercer e4552f51ce qlge: Add support for varied pcie function numbers.
Currently we support only PCIe NIC functions zero and one, and FCoE
functions as 3 and 4. Future configurations can mix these up in any
fashion.
This patch removes the 0-1 dependancy and allows usage of any of the 4
functions. We also find the alternate NIC function (if exist) and
determine our port number based on the comparison of the two functions:
Lower function number gets first port, higher function gets second port.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-10 01:04:14 -07:00
Ron Mercer 542512e482 qlge: Add support for using alternate MAC address.
Extract either manufacturer or Bladecenter Open Fabric
Manager (BOFM) MAC address.  BOFM may indicate an
alternate MAC address.  This patch honors that request
by extracting the MAC address from a different
flash location if a flag is set.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-10 01:04:13 -07:00
Ron Mercer ec33a49135 qlge: Drop inbound frames > MTU.
The max frame size register is set higher than the MTU to
accomodate FCoE frames.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-10 01:04:12 -07:00
Ron Mercer a32959cd9d qlge: Drop inbound error frames.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-10 01:04:12 -07:00
Ron Mercer e4059d942a qlge: Remove netif_set_gso_max_size() call.
Not necessary if hardware supports 65536 as it's the default setting.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-10 01:04:09 -07:00
Ron Mercer cfec0cbc92 qlge: Add support for retrieving firmware version.
This is used by driver banner and ethtool info.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-10 01:04:08 -07:00
Michael Chan a463696039 [SCSI] cnic: Add new Broadcom CNIC driver.
The CNIC driver controls BNX2 hardware rings and resources used by
iSCSI.  Most hardware resources for iSCSI are separate from those
used for ethernet networking.

iSCSI uses a separate MAC address and IP address.  The CNIC driver
creates a UIO interface to handle the non-offloaded packets such as
ARP, etc in userspace.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-09 10:22:42 -05:00
Michael Chan 4edd473f20 [SCSI] bnx2: Add support for CNIC driver.
Add interface and functions to support a new CNIC driver to drive
the Broadcom bnx2 hardware for iSCSI offload.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-09 10:22:38 -05:00
Breno Leitao 25b0b999fb bnx2: no need to check before vfreeing
There is no need to check if a pointer is NULL before calling
vfree(), since vfree() function already check for it.

Signed-off-by: Breno Leitão <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-09 05:25:38 -07:00
Yi Zou 3d8fd38567 ixgbe: Include offloaded FCoE data into total rx/tx statistics for 82599
Include offloaded FCoE data into total rx/tx statistics for 82599 so they
are properly reflected by ethtool or ifconfig.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-09 05:25:37 -07:00
Chaitanya Lala 18760f1e74 e1000e: Expose MDI-X status via ethtool change
Ethtool is a standard way of getting information about
ethernet interfaces.  We enhance ethtool kernel interface
& e1000e to make the MDI-X status readable via ethtool in
userspace.

Signed-off-by: Chaitanya Lala <clala@riverbed.com>
Signed-off-by: Arthur Jones <ajones@riverbed.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-09 05:25:36 -07:00
Simon Horman edfea6e641 e1000e: Call e1000e_config_collision_dist() after TCTL has been set
e1000e_config_collision_dist() sets tctl, but subsequently tctl is
overwritten.  It seems to me that as things stand the call to
e1000e_config_collision_dist() has no effect and should either be
removed or moved down a little bit.  This kernel patch takes the latter
option.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-09 05:25:36 -07:00
Dave Graham 23a2d1b233 e1000e: Fixes possible phy corrupton on 82571 designs.
Phy corruption has been observed on 2-port 82571 adapters, and is root-caused
to lack of synchronization between the 2 driver instances, which conflict
when attempting to access the phy via the single MDIC register.
A semaphore exists for this purpose, and is now used on these designs. Because
PXE &/or EFI boot code (which we cannot expect to be built with this fix) may
leave the inter-instance semaphore in an invalid initial state when the driver
first loads, this fix also includes a one-time (per driver load) fix-up of the
semaphore initial state.

Signed-off-by: dave graham <david.graham@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-09 05:25:35 -07:00
Sergey Lapin 8459464f07 ieee802154: add simple HardMAC driver sample
fakehard is a really simple driver implementing only necessary
callbacks and serves the role of an example of driver for HardMAC
IEEE 802.15.4 device.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Sergey Lapin <slapin@ossfans.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-09 05:25:34 -07:00
Eric Dumazet fdd7b4c330 r8169: fix crash when large packets are received
Michael Tokarev reported receiving a large packet could crash
a machine with RTL8169 NIC.
( original thread at http://lkml.org/lkml/2009/6/8/192 )

Problem is this driver tells that NIC frames up to 16383 bytes
can be received but provides skb to rx ring allocated with
smaller sizes (1536 bytes in case standard 1500 bytes MTU is used)

When a frame larger than what was allocated by driver is received,
dma transfert can occurs past the end of buffer and corrupt
kernel memory.

Fix is to tell to NIC what is the maximum size a frame can be.

This bug is very old, (before git introduction, linux-2.6.10), and 
should be backported to stable versions.

Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-09 04:01:02 -07:00
David S. Miller ebc8d2ab61 be2net: Remove unnecessary frag list traversing.
This driver does not indicate support for frag lists.

Furthermore, even if it did, the code is walking the frag
lists incorrectly.  The idiom is:

	for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next)

but it's doing:

	for (iter = skb_shinfo(skb)->frag_list; iter;
	     iter = skb_shinfo(iter)->frag_list)

which would never work.  And this proves that this driver never
saw an SKB with active frag lists.

So just remove the code altogether and the driver TX path becomes
much simpler.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-09 01:01:31 -07:00
Russell King 7698fdedcf Merge branch 'for-rmk' of git://git.marvell.com/orion into devel 2009-06-08 19:27:13 +01:00
Maciej W. Rozycki 963267bc5d declance: Restore tx descriptor ring locking
A driver overhaul on 29 Feb 2000 (!) broke locking around fiddling with 
the tx descriptor ring in start_xmit(); a follow-on "fix" removed the 
broken remnants altogether.  Here's a patch to restore proper locking in 
the function -- the complement in the interrupt handler has been correct 
all the time.

 This *may* have been the reason for the occasional confusion of the chip 
-- triggering a tx timeout followed by a chip reset sequence -- seen on 
R4k-based DECstations with the onboard Ethernet interface.  Another theory 
is the confusion is due to an unindentified problem -- perhaps a silicon 
erratum -- associated with the variation of the MT ASIC used to interface 
the R4k CPU to the rest of the system on these computers; with its 
aggressive write-back buffering the design is particularly weakly ordered 
when it comes to MMIO (in the absence of ordering barriers uncached reads 
are allowed to bypass earlier uncached writes, even if to the same 
location), which may trigger all kinds of corner cases in peripheral 
hardware as well as software.

Either way this piece of code is buggy.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 02:42:35 -07:00
Eric W. Biederman f0a4d0e5b5 tun: Fix unregister race
It is possible for tun_chr_close to race with dellink on the
a tun device.  In which case if __tun_get runs before dellink
but dellink runs before tun_chr_close calls unregister_netdevice
we will attempt to unregister the netdevice after it is already
gone.  

The two cases are already serialized on the rtnl_lock, so I have
gone for the cheap simple fix of moving rtnl_lock to cover __tun_get
in tun_chr_close.  Eliminating the possibility of the tun device
being unregistered between __tun_get and unregister_netdevice in
tun_chr_close.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Tested-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:44:31 -07:00
Andre Detsch ef681ce1e8 e100: Fix napi_enable BUG_ON when recovering from EEH error
BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)) was being hit
during e100 EEH recovery. The problem source was a napi_enable
call being made during e100_io_error_detected. Napi should remain
disabled after e100_down, and only be reenabled when the interface
is recovered.

This patch also updates e100_io_error_detected in order to make
it similar to the current versions of the error_detected callback
in drivers such as e1000e and ixgbe.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:42:30 -07:00
Yevgeny Petrilin a5b19b635c mlx4: FIX error flow when initializing EQ table
If mlx4_create_eq() would fail for one of EQ's assigned for
completion handling, the code would try to free the same EQ
we failed to create.
The crash was found by Christoph Lameter

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:39:58 -07:00
Sridhar Samudrala 6f536f4039 tun: Fix copy/paste error in tun_get_user
Use the right structure while incrementing the offset in tun_get_user.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:27:28 -07:00
Eric Dumazet 042a53a9e4 net: skb_shared_info optimization
skb_dma_unmap() is quite expensive for small packets,
because we use two different cache lines from skb_shared_info.

One to access nr_frags, one to access dma_maps[0]

Instead of dma_maps being an array of MAX_SKB_FRAGS + 1 elements,
let dma_head alone in a new dma_head field, close to nr_frags,
to reduce cache lines misses.

Tested on my dev machine (bnx2 & tg3 adapters), nice speedup !

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:21:48 -07:00
Tobias Klauser f957bcf016 s2io: Remove private boolean definitions
Remove the private definition of TRUE/FALSE and use the ones from
linux/stddef.h. Also remove the definition of BOOL which is not referenced
inside the driver anyway.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:20:22 -07:00
Paulius Zaleckas d65a68a8da hso: convert dev_alloc_skb() to netdev_alloc_skb()
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:20:20 -07:00
Richard Ršöjfors b07878e547 netdev: Added KS8842 driver
This is a driver for the Micrel KS8842 ethernet switch.

The supplied code is for driving the KS8842 through the Timberdale FPGA
on the Russellville board, a development board for Intel Atom CPU
in the automotive area.

Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:20:20 -07:00
Herbert Xu 4909122fb8 tun: Optimise handling of bogus gso->hdr_len
As all current versions of virtio_net generate a value for the
header length that's too small, we should optimise this so that
we don't copy it twice.  This can be done by ensuring that it is
at least as large as the place where we'll write the checksum.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:20:01 -07:00
Herbert Xu b82f08ea16 virtio_net: Set correct gso->hdr_len
Through a bug in the tun driver, I noticed that virtio_net is
producing bogus hdr_len values.  In particular, it only includes
the IP header in the linear area, and excludes the entire TCP
header.  This causes the TCP header to be copied twice for each
packet.  (The bug omitted the second copy :)

This patch corrects this.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:19:11 -07:00
Riccardo Ghetta 1feede014b sis190: fix gigabit negotiation
Fixes an initialization error; the chip negotiates gigabit, but
the driver mistakenly handled it as 100Mb.
Changes based on both SiS own GPL driver and forcedeth.
Hopefully should fix
	http://bugzilla.kernel.org/show_bug.cgi?id=9735
	http://bugzilla.kernel.org/show_bug.cgi?id=11149

Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:15:14 -07:00
Riccardo Ghetta 856f8f41d4 sis190: add new phy found on asus F5Sr laptop
Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:15:13 -07:00
Riccardo Ghetta c3223d2446 sis190: better message on unknown PHY
Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:15:13 -07:00
Riccardo Ghetta 744c6b2976 sis190: fix for x86_64 (bug 11509)
Corrected dma sync handling on small packets. Should fix
http://bugzilla.kernel.org/show_bug.cgi?id=11509
Note:
While this bug was reported only on x86_64, it could have affected
any architecture.

Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:09:49 -07:00
Ron Mercer 365da8722d qlge: Fix timeout on firmware mailbox commands.
Some firmware mailbox commands require the firmware to
communicate with the FCoE driver running on another
PCI function.  This can potentially take several seconds.
This wait is done in process context only.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:09:48 -07:00
Ron Mercer d2ba498668 qlge: Fix timeout on indexed register wait.
There are 8 banks of 'sub-registers' each of which are accessed
through address/data register pair.  An example would be reading
flash or the xgmac.  Accessing these require the driver to wait for
a ready bit before writing the address and then accessing the data.
This patch increases the timeout to 100us to prevent timeouts
that have been seen on some platforms.
These register are accessed in process context only.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:09:47 -07:00
Ron Mercer c8269b21dd qlge: Fix bug in MTU setting process.
Since an FCoE function shares a port with this NIC function, the
jumbo settings must always be in place.  This patch causes the
hardware to be set up for jumbo if it is not already done.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:09:47 -07:00
Ron Mercer 709ac4f43d qlge: Fix bug in firmware event handler.
Each firmware mailbox command can have a different number of
valid data elements. When waiting for a mailbox command to
complete it the process passes it's element count and
waits for the completion.  It is possible that while waiting
an unrelated firmware async event (AE) can arrive.  When this
happens, the handler will over write the element count
with the value for the newly arrived AE. This can cause
the mailbox command to not get all of it's data.
This patch restores original mailbox count at the end
of the handler.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:09:45 -07:00
Ron Mercer d6f58c2e63 qlge: Fix firmware event handler loop.
Check status on every iteration of event handler loop and exit
if an error occurred.  If an error occurred then recover process
will be queued so this loop should no continue.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:09:44 -07:00
Mike Frysinger df911e2dc4 netdev: smsc911x: add missing __devexit_p() usage
The smsc911x_drv_remove() function is declared with __devexit, so the
assignment to the driver structure needs __devexit_p() wrappings to prevent
build failure when hotplug is disabled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:09:44 -07:00
Mike Frysinger 1993f46739 netdev: smsc911x: allow building on Blackfin systems
The smsc911x driver works fine on Blackfin systems, so add it to the arch
list in the Kconfig.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08 00:09:42 -07:00
Peter P Waskiewicz Jr a1c1db3920 ixgbe: Increase the driver version number
With all the last patchsets going in for 82599 feature enablement, the
driver version needs to be increased for better identification.

Signed-off-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>
2009-06-07 05:20:26 -07:00
Peter P Waskiewicz Jr 794caeb259 ixgbe: Add FW detection and warning for 82599 SFP+ adapters
82599 has a FW running that helps manage the internal SFI PHY.  There are
also a number of pre-production samples of these SFI-based devices in the
field.  This patch adds a check to look for the firmware running on all
SFP+ based adapters, and displays a warning to the system log if a
pre-production adapter is identified.  The driver will continue loading
though, with no functional degradation.

Also remove an old function prototype from ixgbe_82599.c that isn't being
used.

Signed-off-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>
2009-06-07 05:20:26 -07:00
Jesse Brandeburg ae540af185 ixgbe: Re-adjust ring layouts to have better cacheline efficiency
This patch rearranges the ixgbe_ring struct to make better use of
cacheline efficiency.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:25 -07:00
Peter P Waskiewicz Jr c4cf55e5d2 ixgbe: Enable Flow Director hashing in 82599
This patch enables Flow Director's ATR functionality to the main base
driver for 82599.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:24 -07:00
Peter P Waskiewicz Jr ffff477203 ixgbe: Add Flow Director init and modify functions for 82599
This patch adds the functions for ixgbe to initialize Flow Director.  It
also has the function APIs to add Flow Director filters from the base
driver.  This also includes ATR, Application Targeted Routing, which is a
feature set of Flow Director.  This is the hash-based mechanism to
automatically identify flows and add filters based on the hash, and direct
the Rx of that flow back to that same CPU.

Signed-off-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>
2009-06-07 05:20:24 -07:00
Peter P Waskiewicz Jr bfde493ee2 ixgbe: Add hardware defines for Flow Director for 82599
Flow Director is a Rx filter mechanism designed to match Rx flows back to
the same CPU that the flow's Tx occurred from.  This patch adds the first
piece, the defines for the hardware registers, to enable this feature in
82599 hardware.

Signed-off-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>
2009-06-07 05:20:23 -07:00
Peter P Waskiewicz Jr df647b5ca3 ixgbe: Add a second feature flags variable, move HW RSC capability there
This adds a second feature flag variable to use for future feature
expansion.  Add HW RSC to this new feature flags variable.

Signed-off-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>
2009-06-07 05:20:22 -07:00
Alexander Duyck 91281fd36c ixgbe: move tx processing into NAPI context
This patch moves the tx cleanup processing out of the MSI-X interrupt
processing and gives it it's own napi routine.  This allows the driver to
process TX cleanup in a polling context instead of in an interrupt context
which prevents TX from starving RX.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:21 -07:00
Alexander Duyck fe49f04aa8 ixgbe: move v_idx into q_vector and use as index only
The v_idx value was being used as both a bitmask and an index.  This change
makes it so that the q_vector contains the index and allows for much of the
code to be simplified since disabling a q_vector involves only clearing one
bit in the interrupt bitmask.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:20 -07:00
Alexander Duyck 21fa4e66bd ixgbe: use rx_buffer_info->dma instead of nr_frags to determine skb unmap
This patch changes the driver so that it uses rx_buffer_info->dma to
determine if it needs to unmap the page instead of sh_info->nr_frags.  This
helps to prevent a cache line miss when receiving small packets as the
rx_buffer_info data should already be in the cache.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:20 -07:00
Mallikarjuna R Chilakala 74766013a1 ixgbe: ethtool support to change advertised link modes of 82599 adapters
Add ethtool support to change advertised link modes/autoneg settings of
82599 multispeed fiber adapters.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:19 -07:00
Mallikarjuna R Chilakala 620fa036b2 ixgbe: Fix 82599 adapter link flickering issues
Fix autoneg restart issues in flow control path which might create
endless link flickering due to known timing issues with 82599
adapters.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakakla@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:19 -07:00
Peter P Waskiewicz Jr 50ac58ba1d ixgbe: Harden the 82599 multispeed fiber autotry mechanism
82599 supports multispeed fiber optical modules (10Gbps/1Gbps).  Some
scenarios can cause the autotry mechanism to not negotiate link properly.
What needs to happen is the driver must flap the Tx laser to induce an Rx
Loss of Signal on the link partner.  This will restart the autotry
mechanism to get link into a known state.  The software definable pin (SDP)
3 on the 0x10fb NIC is wired to cause a Tx LOS event, which triggers the
Rx LOS we require.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:18 -07:00
Peter P Waskiewicz Jr da4dd0f7ca ixgbe: Add ethtool offline test support
This patch adds support for the ethtool internal test engine.

Signed-off-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>
2009-06-07 05:20:16 -07:00
Peter P Waskiewicz Jr 1479ad4fbf ixgbe: Change the 82599 PHY DSP restart logic
When reprogramming the 82599 analog PHY to either SFI optical or Direct
Attach Twinax, we need to restart the DSP in the PHY.  The current method
can cause contention with our FW which is managing PHY state, and will
cause unexpected link flaps.  This patch fixes the DSP restart by issuing
an AN_RESTART in the MAC, which will properly propagate the DSP restart to
the PHY.  This ensures we don't collide with the FW.

Signed-off-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>
2009-06-07 05:20:16 -07:00
Peter P Waskiewicz Jr bdf0a550c8 ixgbe: Enable ACPI WoL capabilities for 82599
The 82599 KX4 device defaults to legacy power management, or APME.  This
puts the device into ACPI mode, which allows more robust WoL setups to
work properly.

Signed-off-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>
2009-06-07 05:20:15 -07:00
David S. Miller b1bc81a0ef Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-06-07 04:24:21 -07:00
Ayaz Abdulla 3df81c4e95 forcedeth: addition of new mcp89 device id
This patch adds a new device id for mcp89 chipset.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 03:52:37 -07:00
Ayaz Abdulla 3c2e1c11d9 forcedeth: remove device id macros
This patch removes the device id macros and instead uses the constants
directly.

The areas in which logic expressions where using the macros now instead
use feature/workaround flags.

No new functionality has been introduced in this patch, only clean up of
flags and macros.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 03:52:37 -07:00
Jonathan Cameron 80153d1bcc [ARM] pxa/stargate2: Add board specific elements to the smc91x driver
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:46:25 +08:00
Christian Lamparter 2489e4ea6c ar9170: remove deprecated code
This patch removes code (deprecated by "cfg80211: add rfkill support" )

main.c: In function 'ar9170_op_config':
main.c:1306: warning: '__IEEE80211_CONF_CHANGE_RADIO_ENABLED'
is deprecated (declared at include/net/mac80211.h:551)

and a useless device state.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-04 10:58:14 -04:00
Reinette Chatre c18bd87b65 iwlwifi: fix comment describing disable_11n
Fixing a comment in the code describing this module parameter.
The description printed when user runs "modinfo" is correct.

Reported-by: Jiajia Zheng <jiajia.zheng@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-04 10:58:13 -04:00
Wey-Yi Guy 13c33a09b3 iwlwifi: add value and range define for link quality command
Instead of hardcoding the link quality parameters inside the functions,
adding #define in iwl-commands.h to shared by different functions.
Also include the valid range for number of link quality parameters.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-04 10:58:12 -04:00
Mohamed Abbas 258c44a0c0 iwlagn: delay ict interrupt.
Wait until ucode is loaded and driver receive ALIVE_REPLY then switch
 to ICT interrupt. This ensures we receive all interrupts indicating
 successful ucode load.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-04 10:58:11 -04:00
Abhijeet Kolekar ee5006a19c iwl3945/iwlwifi: fix led bug when SW rfkill
Patch fixes the bug at
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1903

when SW rfkill is invoked by 'iwconfig txpower off',
the existing connection disassociates and led off command is sent
to the device which returns error as rfkill is 'true'.

Patch fixes this by just avoiding sending the led off/on command when
disassociated. The main purpose of the led_disassociate callback
is to start or stop the blinking.
There are three states in led
1) Always on when radio is on
2) Always off when radio is off
3) blink when associated and if there is some traffic.

In this callback 'allow_blinking' needs to be set false
when associated, as LED will be always on.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-04 10:58:10 -04:00
Abhijeet Kolekar d14d44407b iwl3945: port allow skb allocation in tasklet patch
Port "iwlcore: Allow skb allocation from tasklet." to 3945

If RX queue becomes empty then we need to restock the queue from
tasklet to prevent ucode from starving. A caller to iwl_rx_allocate
will decide if allocated buffer should come from GFP_ATOMIC or
GFP_KERNEL.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-04 10:57:36 -04:00
Tomas Winkler c587de0b8d iwlwifi: unify station management
This patch unifies 3945 and AGN station management
It also removes useless struct iwl_station_mgmt ops
and cleanups a bit the interface

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Tested-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-04 10:56:20 -04:00
Chaithrika U S 5c72616669 TI DaVinci EMAC: Remove print_mac, DECLARE_MAC_BUF
Use printk format specifier for MAC address.
Remove DECALRE_MAC_BUF and print_mac() usage in the driver.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 21:54:29 -07:00
Herbert Xu c722c625db tun: Only wake up writers
When I added socket accounting to tun I inadvertently introduced
spurious wake-up events that kills qemu performance.  The problem
occurs when qemu polls on the tun fd for read, and then transmits
packets.  For each packet transmitted, we will wake up qemu even
if it only cares about read events.

Now this affects all sockets, but it is only a new problem for
tun.  So this patch tries to fix it for tun first and we can then
look at the problem in general.
 
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 21:45:55 -07:00
Divy Le Ray 56c8f14071 cxgb3: minor aq100x phy fixes
Use generic MDIO generic values.
Based on Ben Hutchings'review comments.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 21:01:50 -07:00
Divy Le Ray 6ba5f9c743 cxgb3: Update FW to 7.4.0
Update FW to 7.4.
Bump up driver revision.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 21:01:50 -07:00
Johannes Berg 0aa8204b46 cfg80211: fix Kconfig for users of cfg80211
* iwm doesn't depend on cfg80211 or wireless extensions
 * rndis wlan selects cfg80211 - needs to depend
 * mac80211 selects cfg80211 - needs to depend

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:09:08 -04:00
Bob Copeland 72828b1b3c ath5k: disable beacon interrupt when interface is down
When we remove the active interface, there's no need to continue
sending beacons; doing so would cause a null pointer deref in
ieee80211_beacon_get().  Disable the interrupt in remove_interface
and add a WARN_ON(!vif) in case there are other instances lurking.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:06:15 -04:00
Luis R. Rodriguez e03e5ffd8d ath: make regulatory parsing more verbose on debug
This should help when reviewing issues regarding regulatory
domain on ath5k/ath9k/ar9170.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:06:15 -04:00
Vasanthakumar Thiagarajan 581f725ccd ath9k: Fix write callback of 'debug' which configures debug mask
Handle error condition on copy_from_user() properly and
make sure a NUL terminated char[] is sent to strict_strtoul()
for proper conversion.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:06:15 -04:00
Johannes Berg 76963bb602 iwm: port to new cfg80211 rfkill
Which means removing all rfkill code since it only does
soft-kill which cfg80211 will now handle in exactly the
same way the driver did.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:06:14 -04:00
Johannes Berg 19d337dff9 rfkill: rewrite
This patch completely rewrites the rfkill core to address
the following deficiencies:

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

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

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

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

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

 * rfkill-input pointlessly is a separate module

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

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

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

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

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

Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:06:13 -04:00
Bing Zhao 6bc61f4d8e libertas: improve function init/shutdown handling for SD8688
This patch is to incorporate Dan Williams' comments for commit:
"libertas: implement function init/shutdown commands for SD8688"

1. remove fn_init_required and fn_shutdown_required variables from
lbs_private structure. If required, __lbs_cmd() will be called
directly to send function init/shutdown command for SD8688 in
if_sdio_probe() or if_sdio_remove() callback.

2. add global variable "user_rmmod" to distinguish between the module
removal case and the card removal case. This flag will be checked in
if_sdio_remove() against SD8688 card to determine whether or not the
function shutdown command needs to be sent.

3. remove "card" from if_sdio_model structure as it cannot store
card pointers for multiple cards. Besides, it's no longer needed
to store the "card" pointer with changes #1 & #2 above.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:16 -04:00
Samuel Ortiz 328d84fb36 wireless/p54: prepare for FIRMWARE_NAME_MAX removal
We're going to remove the FIRMWARE_NAME_MAX definition in order to avoid any
firmware name length restriction.
This patch gets rid of the statically allocated p54usb firmware string, and
replaces them with const char pointers.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:15 -04:00
Samuel Ortiz 939cab83ea iwmc3200wifi: shrink calibration lmac name
iwmc3200wifi: trim down calibration firmware name

The patch trims down iwmc3200wifi calibration firmware name from
iwmc3200wifi-lmac-calib-sdio.bin to iwmc3200wifi-calib-sdio.bin. We can
shorten the firmware name because all calibration is done by LMAC.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:15 -04:00
Christian Lamparter 6d7db193f2 ar9170: cancel led worker properly on exit
"[PATCH 3/4 v2] ar9170: fix LED power state handling" revealed
a bug which can cause a ugly crash.

The delayed worker is canceled before the LED class functions are
unregistered... So, if something manages to update the LEDs
while unregister routine is running the timer could fire _after_ the
module has been unloaded.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:15 -04:00
Christian Lamparter 66d008139c ar9170usb: more minor fixes
This patch contains a few more mostly random fixes for the USB front-end.

1. handle irq command response, instead of printing it to the console.

2. remove fixed FIXME.
    (real fix: "ar9170usb: reset device on resume". )

3. some more one-liner.
	- get rid of a useless "return;"
	- add a few branch prediction hints in hot-paths
	etc.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:15 -04:00
Christian Lamparter b55d6bcf9b ar9170: fix lockdep warning on hibernate
This patch takes care of Johannes' deadlock report by moving the
mutex_lock right after cancel_work_sync in ar9170_op_stop.

Besides, the janitor does not need to hold the mutex anymore,
so this extra lines can be removed as well.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:15 -04:00
Christian Lamparter 2431fe9a4b ar9170: fix LED power state handling
This patch fixes a minor visual bug in the led code, which
left the LED in the wrong power state when it was toggled
in a _unexpected_ way (e.g: enabling the LED twice).

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:15 -04:00
Christian Lamparter 95cf8769bb ar9170: kill duplicated HT feature flag
This patch removes a redundant flag.

.cap	=	IEEE80211_HT_CAP_MAX_AMSDU |	\
>		IEEE80211_HT_CAP_SM_PS |			\ <
		[...]									\
>		IEEE80211_HT_CAP_SM_PS,			\ <
		.ampdu_factor   = 3,					\

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:13 -04:00
Christian Lamparter 864cc02e7c ar9170: use bitop macros for tx filter flags
This patch fixes a bug in configure_filter's (sub-)routines.
We never really cleared the flags once we updated the hardware state,
so we wasted our resources by applying already active settings.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:13 -04:00
Christian Lamparter 29ceff5d58 ar9170: introduce functions for MAC programming
This patch introduces 3 new function which are used to update
the MAC state, whenever needed... e.g: after a band switch.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:12 -04:00
Christian Lamparter d7433390e4 ar9170: 40mhz fixes
This patch replace a few constant magics which may affected
the device when operating in a 40MHz channel.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:12 -04:00
Christian Lamparter b9ad462e34 ar9170: update hardware definitions
This patch only contains a few uncritical updates for the
hardware definition header.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:12 -04:00
Christian Lamparter f46f0dc3f1 ar9170: fix beacon plcp settings
This patch fixes a simple copy & paste error that affected beacon
transmission in 802.11a mode.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:12 -04:00
Johannes Berg 4c4c671aea mac80211_hwsim: remove deprecated radio_enabled
This removes the use of the deprecated radio_enabled setting
and code associated with that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:12 -04:00
Luis R. Rodriguez bdf6d32f93 ar9170: add AVM FRITZ devices
This adds:

USB 0x057C:0x8401       AVM FRITZ!WLAN USB Stick N
USB 0x057C:0x8402       AVM FRITZ!WLAN USB Stick N 2.4

These devices require the 1-stage firmware, if not present we
don't continue.

Cc: Peter Grabienski <Peter.Grabienski@Atheros.com>
Cc: Stephen Chen <Stephen.Chen@Atheros.com>
Cc: Michael Fortin <Michael.Fortin@Atheros.com>
Cc: Johnny Cheng <Johnny.Cheng@Atheros.com>
Cc: Yuan-Gu Wei <Yuan-Gu.Wei@atheros.com>
Cc: Joerg Albert <jal2@gmx.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:11 -04:00
Luis R. Rodriguez c768b58d62 ar9170: add support for 1-stage firmware
You can get the stage 1 firmware from here:

http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/ar9170.fw

md5sum: 34feec4ec0eae3bb92c7c1ea2dfb4530
sha1sum: 6e5250498b815c2940d97242de31e054ae44e079

Its license:

http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/LICENSE

This is a new firmware, tested with WNDA3100.

Cc: Peter Grabienski <Peter.Grabienski@Atheros.com>
Cc: Stephen Chen <Stephen.Chen@Atheros.com>
Cc: Michael Fortin <Michael.Fortin@Atheros.com>
Cc: Johnny Cheng <Johnny.Cheng@Atheros.com>
Cc: Yuan-Gu Wei <Yuan-Gu.Wei@atheros.com>
Cc: Joerg Albert <jal2@gmx.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:11 -04:00
Jouni Malinen 546256fbd0 ath9k: Add sanity check for beacon_int in adhoc/mesh case
It looks like mac80211 can request the driver to start beaconing with
a beacon interval of zero in some cases (at least for mesh point). This
does not sound correct and something may need to be fixed in
mac80211. However, taken into account the unpleasantness of getting
stuck in an infinite busy loop with rtnl_lock held, let's add a quick
workaround in the driver to avoid the worst symptom while someone more
familiar with the mesh implementation can figure out what should be done
with mac80211 as far as beacon interval configuration is concerned.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:11 -04:00
Bob Copeland 73ca520336 ath5k: remove conf->beacon_int usage
ieee80211_conf->beacon_int was deprecated and removed in a cleanup
patch, however it was accidentally added back to ath5k in the change
"ath5k: Allow user/driver to set txpower."  Remove it once more,
fixing the following warning:

[13091.968902] WARNING: at drivers/net/wireless/ath/ath5k/base.c:2167 warn_slowpath_null+0x15/0x1a()
[13091.968906] Hardware name: MacBook1,1
[13091.968909] Modules linked in: usb_storage fuse i915 drm af_packet acpi_cpufreq binfmt_misc dm_mirror dm_region_hash dm_log dm_multipath dm_mod snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_seq_dummy hid_apple arc4 ecb snd_seq_oss snd_seq_midi_event usbhid snd_seq ath5k mac80211 appletouch snd_seq_device snd_pcm_oss snd_mixer_oss sky2 snd_pcm ath processor cfg80211 snd_timer sg ohci1394 snd uhci_hcd bitrev ieee1394 joydev ehci_hcd crc32 snd_page_alloc button ac thermal battery sr_mod applesmc cdrom evdev input_polldev unix [last unloaded: microcode]
[13091.968985] Pid: 2132, comm: phy0 Tainted: G        W  2.6.30-rc5-wl #118
[13091.968988] Call Trace:
[13091.968994]  [<c0125884>] warn_slowpath_fmt+0x77/0xa6
[13091.969003]  [<c03557d8>] ? _spin_unlock+0x2c/0x41
[13091.969008]  [<c0355a56>] ? _spin_lock_irqsave+0x15/0x69
[13091.969012]  [<c0355783>] ? _spin_unlock_irqrestore+0x34/0x5d
[13091.969019]  [<c01445bb>] ? trace_hardirqs_off+0xb/0xd
[13091.969024]  [<c0355783>] ? _spin_unlock_irqrestore+0x34/0x5d
[13091.969029]  [<c01445bb>] ? trace_hardirqs_off+0xb/0xd
[13091.969034]  [<c0355783>] ? _spin_unlock_irqrestore+0x34/0x5d
[13091.969039]  [<c01258c8>] warn_slowpath_null+0x15/0x1a
[13091.969054]  [<f965846d>] ath5k_beacon_update_timers+0x44/0x27f [ath5k]
[13091.969059]  [<c0126370>] ? vprintk+0x2dd/0x312
[13091.969063]  [<c0125e50>] ? release_console_sem+0x1a6/0x1d3
[13091.969076]  [<f96586c5>] ath5k_reset_tsf+0x1d/0x2c [ath5k]
[13091.969095]  [<f93f4426>] __ieee80211_sta_join_ibss+0x35/0x3aa [mac80211]
[13091.969102]  [<c0252793>] ? extract_entropy+0x47/0x8a
[13091.969121]  [<f93f4b21>] ieee80211_sta_find_ibss+0x2de/0x32f [mac80211]
[13091.969126]  [<c035422c>] ? mutex_lock_nested+0x28b/0x2a5
[13091.969145]  [<f93f4b8e>] ? ieee80211_ibss_notify_scan_completed+0x1c/0x6f [mac80211]
[13091.969164]  [<f93f4bc9>] ieee80211_ibss_notify_scan_completed+0x57/0x6f [mac80211]
[13091.969182]  [<f93f26da>] ieee80211_scan_completed+0x31a/0x33f [mac80211]
[13091.969201]  [<f93f27ca>] ieee80211_scan_work+0xcb/0x18b [mac80211]
[13091.969207]  [<c0133a6a>] worker_thread+0x1b1/0x28e
[13091.969212]  [<c0133a25>] ? worker_thread+0x16c/0x28e
[13091.969230]  [<f93f26ff>] ? ieee80211_scan_work+0x0/0x18b [mac80211]
[13091.969237]  [<c013736e>] ? autoremove_wake_function+0x0/0x38
[13091.969242]  [<c01338b9>] ? worker_thread+0x0/0x28e
[13091.969246]  [<c0137031>] kthread+0x4a/0x70
[13091.971460]  [<c0136fe7>] ? kthread+0x0/0x70
[13091.971467]  [<c0103527>] kernel_thread_helper+0x7/0x10
[13091.971470] ---[ end trace 8defaa5d15c50cef ]---

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:11 -04:00
Cliff Cai 2c5b9e511f wireless: libertas: fix unaligned accesses
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:11 -04:00
Jeff Hansen 2493928e4d ath9k: Add "debug" file to debugfs
This patch adds the debug file to the ath9k debugfs, which lets you modify
the debug_mask at runtime, without having to reload the ath9k module.

Signed-off-by: Jeff Hansen <x@jeffhansen.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:11 -04:00
Jeff Hansen bedf087af9 ath9k: Combine legacy and 11n rc statistics
This patch combines the legacy and 11n rcstats into one, using the normal
rate table indices instead of two separate indices for each mode.  Legacy
rates also get all of the PER and retry information, now, too.

Signed-off-by: Jeff Hansen <x@jeffhansen.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:11 -04:00
Jeff Hansen b74444f8a9 ath9k: Reset SC_OP_TSF_RESET flag after stuck beacon
I have a TrendNet 652-BRP running OpenWRT + ath9k very well.  The only
problem is that the beacon gets stuck maybe once a day.  After
Vasanthakumar Thiagarajan's "ath9k: cleanup beacon parameters
configuration" patch, ath9k would nearly re-configure the beacons after it
detected the stuck beacon, and did a reset.  But it would fail the
SC_OP_TSF_RESET check in ath_beacon_config_ap.  This patch gets the beacon
fully reconfigured after the reset.

Signed-off-by: Jeff Hansen <x@jeffhansen.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:11 -04:00
Randy Dunlap 1bb5633348 iwmc3200wifi: fix printk format
Fix printk format for size_t variable:

drivers/net/wireless/iwmc3200wifi/fw.c:75: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: ilw@linux.intel.com
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:10 -04:00
Samuel Ortiz b63b0ea2c1 iwmc3200wifi: fix fragmentation threshold setting
We were sending the fragmentation threshold value to the wrong table,
causing an LMAC assert when setting it from wext.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:10 -04:00
Rami Rosen d651ae3278 iwlwifi: avoid build warning in iwl-core.
When building when CONFIG_IWLWIFI_DEBUG is not set, we get the following
warning:
/work/src/w/drivers/net/wireless/iwlwifi/iwl-core.c: In function ‘iwl_isr’:
/work/src/w/drivers/net/wireless/iwlwifi/iwl-core.c:1707: warning:
unused variable ‘inta_fh’

This patch avoids this warning by adding #ifdef CONFIG_IWLWIFI_DEBUG
before the declaration of inta_fh in iwl_isr() in
drivers/net/wireless/iwlwifi/iwl-core.c

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:10 -04:00
Ivo van Doorn 6b347bff14 rt2x00: Remove last usage of beacon_int from ieee80211_config
This removes the last usage of beacon_int inside the iee80211_config
structure from rt2x00. The attempt is a bit hackish, and subject to
change in the future when the entire rt2x00_dev structure is
cleaned up and restructured.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:10 -04:00
Dan Williams 2fa7a98fc9 libertas: fix WPA adhoc network creation
Oddly enough, the firmware's JOIN/START commands don't appear to have
any facility for setting custom IEs, thus the started adhoc network
doesn't advertise its WPA capability in the beacon.  Whee!

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:09 -04:00
Dan Williams 822ac03a07 libertas: convert CMD_802_11_ASSOCIATE to a direct command
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:09 -04:00
Dan Williams be0d76e48f libertas: convert CMD_802_11_AUTHENTICATE to a direct command
And fix up setting authentication suite for v9+ firmware too.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:09 -04:00
Dan Williams 75b6a61a47 libertas: restyle Marvell & IEEE TLV structure names
Easier to read and more conformant with kernel style.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:09 -04:00
Dan Williams 5fd164e96c libertas: simplify and clean up association/start/join setup
Some of the parameters for association/join/start commands aren't
used (like the FH and CF IEs for IBSS, and the FH IE for BSS), so
get rid of their unions to reduce indirection.  Also clean up
structure names for kernel style.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:09 -04:00
Reinette Chatre d77b034f62 iwlwifi: fix otp access init
Polling function returns positive time if polling was needed to
read value. This is still success.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:09 -04:00
Reinette Chatre df29ff3794 iwlwifi: fix merge error
This hunk of code was removed in patch "iwlwifi: do not
cancel delayed work inside spin_lock_irqsave" submitted at
http://marc.info/?l=linux-wireless&m=124267503030042&w=2

This same patch in this repo does not remove this hunk.
Remove it here.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:09 -04:00
Ivo van Doorn ce2ebc9b8d rt2x00: Add new rt2800usb USB ID's
new patch to add more usb_dev to rt2800usb.c .
IDs 'stolen' from the latest Ralink linux
driver(2009_0520_RT3070_Linux_STA_v2.1.1.0.tar.gz)

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:08 -04:00
Sebastian Andrzej Siewior f488b72de5 net/libertas: make SPI interface big endian aware
The comment (which I remove) says that the translation is done SPI routines.
IMHO this can't work because the SPI driver does not know whether the incomming
bytes are part of the registers/bytes which need to be flipped or part of
packet data which has to remain untouched.
While adding le helpers I also removed spu_write_u32() which has no users.

Tested-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:08 -04:00
John W. Linville 55aa4e0f16 ath5k: avoid leaking mutex in ath5k_config
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:08 -04:00
Haiying Wang 047584ce94 net/ucc_geth: Add SGMII support for UEC GETH driver
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:52:47 -07:00
Haiying Wang fbcc0e2ce5 fsl_pq_mido: Set the first UCC as the mii management interface master
Current code makes the UCC whose register range includes the current mdio
register to be the MII managemnt interface master of the QE. If there is more
than one mdio bus for QE, the UCC of the last mdio bus will be the MII
management interface master which will make the primary mdio bus working
unproperly, e.g. can not get the right clock. Normally the primary mdio bus is
the first UEC's mdio bus.
This patch allows the first UCC to be the MII management interface master of the
multiple UCC mdio buses.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:52:46 -07:00
Haiying Wang 32d0c1e1be net/phy/marvell: update m88e1111 support for SGMII mode
Disable fiber/copper auto selection for Marvell m88e1111 SGMII support.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:52:45 -07:00
Eric Dumazet adf30907d6 net: skb->dst accessors
Define three accessors to get/set dst attached to a skb

struct dst_entry *skb_dst(const struct sk_buff *skb)

void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)

void skb_dst_drop(struct sk_buff *skb)
This one should replace occurrences of :
dst_release(skb->dst)
skb->dst = NULL;

Delete skb->dst field

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:51:04 -07:00
Eric Dumazet 511c3f92ad net: skb->rtable accessor
Define skb_rtable(const struct sk_buff *skb) accessor to get rtable from skb

Delete skb->rtable field

Setting rtable is not allowed, just set dst instead as rtable is an alias.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:51:02 -07:00
Bruce Allan 3be8c940a6 e1000e: bump the version number
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:46:37 -07:00
Bruce Allan 37289d9c1e e1000e: workaround a Tx hang on 82577/82578
With bi-directional stress traffic, the receiver could hang causing the
hardware to stop and a "Detected Tx Unit Hang" message dumped to the system
logfile.  Temporarily workaround this issue by disabling Tx flow control by
default.  The issue is currently being investigated and a follow-on patch
will be provided to revert this when it is resolved.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:46:36 -07:00
Bruce Allan a4f58f5455 e1000e: add support for 82577/82578 GbE LOM parts
This patch provides support for the next generation Intel desktop
and mobile gigabit ethernet LOM adapters.  These adapters are the
follow-on parts to the LOMs tied to the prior ICH chipsets and are
comprised of a MAC in the PCH chipset and an external PHY (82577 for
mobile and 82578 for desktop versions).  New features consist of PHY
wakeup to save power by completely turning off the MAC while in Sx
state, and 4K jumbo frames.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:46:34 -07:00
Bruce Allan 2adc55c959 e1000e: specify max supported frame size in adapter struct
By putting the maximum frame size supported by the hardware into the
adapter structure, the change_mtu entry point function can be cleaned
up of checks for all the different max frame sizes supported by

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:46:33 -07:00
Bruce Allan 3ec2a2b80f e1000e: correct flow control thresholds
The flow control thresholds, i.e. high and low watermarks of the Rx
FIFO for when the hardware should transmit PAUSE frames (XON and XOFF,
respectively), need to be tuned for more efficient use of the FIFO.
The logic to set the thresholds for parts that support early-receive
(ERT) was also wrong in that it should check whether jumbo frames are
in use.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:46:33 -07:00
Bruce Allan 918d7197aa e1000e: do not attempt to disable smart powerdown if not supported
During reset, the driver was attempting to disable the Smart Powerdown
feature even if the part does not support Smart Powerdown.  Check for
support before attempting to disable the feature.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:46:32 -07:00
Bruce Allan 6e50912a44 e1000e: enable CRC stripping by default
CRC stripping should be enabled by default but was not if it was not
specified as a module parameter.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03 02:46:31 -07:00
David S. Miller b2f8f7525c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/forcedeth.c
2009-06-03 02:43:41 -07:00
Yevgeny Petrilin d455e5b165 mlx4_en: Updated driver version
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-02 02:36:32 -07:00
Yevgeny Petrilin e486973e9c mlx4_en: Added vlan_features support
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-02 02:29:08 -07:00
Yevgeny Petrilin f813cad836 mlx4_en: multiqueue support
By default the driver opens 8 TX queues (defined by MLX4_EN_NUM_TX_RINGS).
If the driver is configured to support Per Priority Flow Control, we open
8 additional TX rings.
dev->real_num_tx_queues is always set to be MLX4_EN_NUM_TX_RINGS.
The mlx4_en_select_queue() function uses standard hashing (skb_tx_hash)
in case that PPFC is not supported or the skb contain a vlan tag,
otherwise the queue is selected according to vlan priority.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-02 02:29:06 -07:00
Yevgeny Petrilin 3db36fb2c8 mlx4_en: Coalescing target is equal for all mtu's
The interrupt moderation should not depend on number of incoming
bytes, but on number of incoming packets.
The previous scheme caused very high interrupts rate for small
messages when big MTU was configured.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-02 02:29:06 -07:00
Yevgeny Petrilin 3c2fa83f9c mlx4_en: Work with part of the ports.
If the initialization of one of the ports failed,
there is no need to fail the other one as well.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-02 02:29:05 -07:00
Yevgeny Petrilin 9e47edaa1a mlx4_en renamed en_params.c to en_ethtool.c
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-02 02:29:04 -07:00
Yevgeny Petrilin a2b28737a2 mlx4_en: Moved all module parameters handling to en_main.c
en_params.c file now only handles Ethtool functionality

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-02 02:29:03 -07:00
Yevgeny Petrilin 453a608277 mlx4_en: Giving interface name in debug messages
For each debug message, the message will show interface name in case
that the net device was registered, and PCI bus ID with port number
if we were not registered yet. Messages that are not port/netdev specific
stayed in the old format

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-02 02:29:03 -07:00
Neil Horman ea30e11970 e1000: add missing length check to e1000 receive routine
Patch to fix bad length checking in e1000.  E1000 by default does two
things:

1) Spans rx descriptors for packets that don't fit into 1 skb on recieve
2) Strips the crc from a frame by subtracting 4 bytes from the length prior to
doing an skb_put

Since the e1000 driver isn't written to support receiving packets that span
multiple rx buffers, it checks the End of Packet bit of every frame, and
discards it if its not set.  This places us in a situation where, if we have a
spanning packet, the first part is discarded, but the second part is not (since
it is the end of packet, and it passes the EOP bit test).  If the second part of
the frame is small (4 bytes or less), we subtract 4 from it to remove its crc,
underflow the length, and wind up in skb_over_panic, when we try to skb_put a
huge number of bytes into the skb.  This amounts to a remote DOS attack through
careful selection of frame size in relation to interface MTU.  The fix for this
is already in the e1000e driver, as well as the e1000 sourceforge driver, but no
one ever pushed it to e1000.  This is lifted straight from e1000e, and prevents
small frames from causing the underflow described above

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-02 01:29:58 -07:00
Ed Swierk 5a9a8e32eb forcedeth: add phy_power_down parameter, leave phy powered up by default (v2)
Add a phy_power_down parameter to forcedeth: set to 1 to power down the
phy and disable the link when an interface goes down; set to 0 to always
leave the phy powered up.

The phy power state persists across reboots; Windows, some BIOSes, and
older versions of Linux don't bother to power up the phy again, forcing
users to remove all power to get the interface working (see
http://bugzilla.kernel.org/show_bug.cgi?id=13072).  Leaving the phy
powered on is the safest default behavior.  Users accustomed to seeing
the link state reflect the interface state and/or wanting to minimize
power consumption can set phy_power_down=1 if compatibility with other
OSes is not an issue.

Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-02 00:19:52 -07:00
Joe Perches c930a66220 atl1c_main.c: add wait_for_idle routine
Slight refactoring of duplicated wait for idle checks
Spelling fix

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: jie.yang@atheros.com
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-01 03:13:12 -07:00
Maciej W. Rozycki cf9f6e21c1 3c509: Add missing EISA IDs
Several EISA device IDs for 3c509 family network cards are missing from 
the driver, making the cards unusable in their EISA mode.  Here's a fix to 
add them based on the EISA configuration files distributed by 3Com and our 
eisa.ids database.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-01 03:12:04 -07:00
Stefan Weil 0220ff7fc3 cpmac: prevent fatal exception in cpmac_end_xmit
We should not be stopping the subqueues in cpmac_end_xmit
but rather test the status of them. Replace the calls to
netif_subqueue_stop by __netif_subqueue_stopped. This
fixes an unrecoverable exception from happening when
running the driver.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-01 02:56:39 -07:00
Florian Fainelli 69bd4ae5dc cpmac: remove unused variable.
This patch removes the unused variables in
cpmac_hw_error, cpmac_tx_timeout and cpmac_probe.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-01 02:56:39 -07:00
Wolfgang Grandegger d1a277c584 can: sja1000: generic OF platform bus driver
This patch adds a generic driver for SJA1000 chips on the OpenFirmware
platform bus found on embedded PowerPC systems. You need a SJA1000 node
definition in your flattened device tree source (DTS) file similar to:

  can@3,100 {
  	compatible = "nxp,sja1000";
  	reg = <3 0x100 0x80>;
  	interrupts = <2 0>;
  	interrupt-parent = <&mpic>;
  	nxp,external-clock-frequency = <16000000>;
  };

See also Documentation/powerpc/dts-bindings/can/sja1000.txt.

CC: devicetree-discuss@ozlabs.org
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-01 02:53:35 -07:00
Wolfgang Grandegger 255a915431 can: sja1000: stop misusing member base_addr of struct net_device
As discussed on the netdev mailing list, the member "base_addr" of
"struct net_device" should not be (mis)used to store the virtual
address to the SJA1000 register area. According to David Miller,
it's only use is to allow ISA and similar primitive bus devices to
have their I/O ports changed via ifconfig. The virtual address is
now stored in the private data structure of the SJA1000 device and
the callback functions use "struct sja1000_priv" instead of the
unneeded "struct net_device".

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-01 02:53:34 -07:00
Wolfgang Grandegger 128ced8f9d can: some fixes and cleanups to the initial device driver interface
This patch fixes a few errors sneaked into the initial version of the
device driver interface.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-01 02:53:33 -07:00
André Goddard Rosa 342a437ef6 usbnet: ratelimit warning messages invoked from callback handler
Warning messages coming from rtl8150 driver can flood the console
and make a DTV/set-top-box unable to decode video/audio frames.

'Pegasus' driver handles this situation similarly, preventing this
from happening there.

It happens with a low cost BCM MIPS embedded platform, whenever
timeout errors were coming from usbnet device, making platform
unusable for viewer watching.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 22:13:58 -07:00
Fabio Estevam 6442330734 fec: Add FEC support for MX35 processor
Add FEC support for MX35 processor.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 22:12:34 -07:00
Tadashi Abe e13f93188b irda-usb: suspend/resume support
This patch adds power management suspend/resume hooks for irda-usb.

Signed-off-by: Tadashi Abe <tabe@mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 22:12:33 -07:00
Finn Thain cd39c7a571 mac8390: use printk MAC address format
mac8390: use printk MAC address format

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 22:12:32 -07:00
Jiri Pirko ccffad25b5 net: convert unicast addr list
This patch converts unicast address list to standard list_head using
previously introduced struct netdev_hw_addr. It also relaxes the
locking. Original spinlock (still used for multicast addresses) is not
needed and is no longer used for a protection of this list. All
reading and writing takes place under rtnl (with no changes).

I also removed a possibility to specify the length of the address
while adding or deleting unicast address. It's always dev->addr_len.

The convertion touched especially e1000 and ixgbe codes when the
change is not so trivial.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>

 drivers/net/bnx2.c               |   13 +--
 drivers/net/e1000/e1000_main.c   |   24 +++--
 drivers/net/ixgbe/ixgbe_common.c |   14 ++--
 drivers/net/ixgbe/ixgbe_common.h |    4 +-
 drivers/net/ixgbe/ixgbe_main.c   |    6 +-
 drivers/net/ixgbe/ixgbe_type.h   |    4 +-
 drivers/net/macvlan.c            |   11 +-
 drivers/net/mv643xx_eth.c        |   11 +-
 drivers/net/niu.c                |    7 +-
 drivers/net/virtio_net.c         |    7 +-
 drivers/s390/net/qeth_l2_main.c  |    6 +-
 drivers/scsi/fcoe/fcoe.c         |   16 ++--
 include/linux/netdevice.h        |   18 ++--
 net/8021q/vlan.c                 |    4 +-
 net/8021q/vlan_dev.c             |   10 +-
 net/core/dev.c                   |  195 +++++++++++++++++++++++++++-----------
 net/dsa/slave.c                  |   10 +-
 net/packet/af_packet.c           |    4 +-
 18 files changed, 227 insertions(+), 137 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 22:12:32 -07:00
Jiri Pirko ae63e808f5 bonding: use bond_is_lb() when it's appropriate
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 22:08:31 -07:00
Greg Kroah-Hartman bdb0e010bf ath1e: add new device id for asus hardware
Gary Lin reports that a new device id needs to be added to the atl1e in
order to get some new Asus hardware to work properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 22:04:54 -07:00
Yevgeny Petrilin 465440d272 mlx4_en: Fix a kernel panic when waking tx queue
When the transmit queue gets full we enable interrupts for TX completions
There was a race that we handled the TX queue both from the interrupt context
and from the transmit function. Using "spin_trylock_irq()" ensures this
doesn't happen.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 22:04:42 -07:00
David S. Miller e8573758d5 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2009-05-29 21:56:19 -07:00
Divy Le Ray f22a563b0a cxgb3: add support for the Aquantia 10G-BT phy
Add support for the Aquantia AQ1002 10G-BaseT phy.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 15:55:05 -07:00
Divy Le Ray 744514249f cxgb3: Add Aeluros 2020 phy support
Add support for the AEL2020 phy.
Add PCI IDs of the boards using this phy.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 15:55:04 -07:00
Divy Le Ray c3a8c5b644 cxgb3: move away from LLTX
cxgb3 no longer advertizes LLTX.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 15:55:03 -07:00
Graf Yang 080c82550d netdev: bfin_mac: add Blackfin MII bus to platform bus to allow DSA access
When we register the MII bus to the platfrom bus, the Distributed Switch
Architecture can hook in transparently.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 15:49:09 -07:00
Michael Hennerich 015dac8886 netdev: bfin_mac: fix performance issue found by netperf
- Remove dead long delay
- Use proper defines
- Remove broken implementation of the TX DMA Data Alignment TXDWA feature

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 15:49:09 -07:00
Sonic Zhang 805a8ab3ce netdev: bfin_mac: fix malformed UDP packet transmission when polling with KGDB
Writes to the DMA descriptors may sit in the internal Blackfin data buffers
and not actually be available when the DMA engine goes to fetch them.  This
does not typically happen, but when dealing with short/fast packets such as
UDP and polling KGDB, this occurs much more frequently.  Same goes for
heavy loads as seen by netperf tests or large scp transfers.  So force the
buffers to drain with SSYNC otherwise we get random malformed packets.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 15:49:08 -07:00
Michael Hennerich 91a455f089 netdev: bfin_mac: drop useless IRQF_SHARED from Blackfin EMAC interrupt
The IRQ used by the Blackfin EMAC is internal to the peripheral and cannot
be used to generate any other interrupt, so there is no point in marking it
as IRQF_SHARED.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 15:49:07 -07:00
Eric Dumazet 60df914e29 veth: dont release skb->dst in veth_xmit()
No need to release skb->dst, its now done by core network.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 15:15:30 -07:00
John W. Linville aeeab4ff06 rtl8187: add USB ID for Linksys WUSB54GC-EU v2 USB wifi dongle
http://bugzilla.kernel.org/show_bug.cgi?id=13383

Reported-by: Przemyslaw Kulczycki <azrael@autocom.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-29 12:41:01 +02:00
John W. Linville 21a4cc00e8 at76c50x-usb: avoid mutex deadlock in at76_dwork_hw_scan
http://bugzilla.kernel.org/show_bug.cgi?id=13312

at76_dwork_hw_scan holds a mutex while calling ieee80211_scan_completed,
which then calls at76_config which needs the same mutex.  This reworks
the ordering to not hold the lock while calling ieee80211_scan_completed.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-29 12:41:01 +02:00
Russell King 42f1d2e06a Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci into devel 2009-05-29 10:04:24 +01:00
Finn Thain 4e0168fa48 mac8390: fix build with NET_POLL_CONTROLLER
Fix the build for CONFIG_NET_POLL_CONTROLLER that I broke with
217cbfa856 ("mac8390: fix regression
caused during net_device_ops conversion").

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 01:56:35 -07:00
Divy Le Ray c22c814931 cxgb3: link fault fixes
Do not call t3_link_fault() under spinlock, as it calls msleep().
Besides, only the access to pi->link_fault needs to be serialized.

Also initialize local variables before checking the link status,
link state fields might otherwise end up containing garbage.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 01:54:41 -07:00
Divy Le Ray 10b6d95612 cxgb3: fix dma mapping regression
Commit 5e68b772e6
  cxgb3: map entire Rx page, feed map+offset to Rx ring.

introduced a regression on platforms defining DECLARE_PCI_UNMAP_ADDR()
and related macros as no-ops.

Rx descriptors are fed with the a page buffer bus address + page chunk offset.
The page buffer bus address is set and retrieved through
pci_unamp_addr_set(), pci_unmap_addr().
These functions being meaningless on x86 (if CONFIG_DMA_API_DEBUG is not set).
The HW ends up with a bogus bus address.

This patch saves the page buffer bus address for all plaftorms.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 01:54:37 -07:00
Florian Fainelli 4d5ef9f0f5 korina: periodically poll the media
This patch makes the korina driver poll the media
for link change. This is actually required on
Mikrotik RB532 (not RB532A) for korina to
operate properly.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 01:51:22 -07:00
FUJITA Tomonori 5d23a1d2a3 net: replace dma_sync_single with dma_sync_single_for_cpu
This replaces dma_sync_single() with dma_sync_single_for_cpu() because
dma_sync_single() is an obsolete API; include/linux/dma-mapping.h says:

/* Backwards compat, remove in 2.7.x */
#define dma_sync_single		dma_sync_single_for_cpu
#define dma_sync_sg		dma_sync_sg_for_cpu

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 01:51:22 -07:00
Eric Dumazet cdd0db058d net: dont update dev->trans_start
Second round of drivers for Gb cards (and NIU one I forgot in the 10GB round)

Now that core network takes care of trans_start updates, dont do it
in drivers themselves, if possible. Drivers can avoid one cache miss
(on dev->trans_start) in their start_xmit() handler.

Exceptions are NETIF_F_LLTX drivers

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 01:46:27 -07:00
Eric Dumazet 28679751a9 net: dont update dev->trans_start in 10GB drivers
Followup of commits 9d21493b4b
and 08baf56108
(net: tx scalability works : trans_start)
(net: txq_trans_update() helper)

Now that core network takes care of trans_start updates, dont do it
in drivers themselves, if possible. Multi queue drivers can
avoid one cache miss (on dev->trans_start) in their start_xmit()
handler.

Exceptions are NETIF_F_LLTX drivers (vxge & tehuti)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29 01:46:26 -07:00
David S. Miller 3f1f39c42b Merge branch 'linux-2.6.31.y' of git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax 2009-05-29 01:41:32 -07:00
Benjamin Herrenschmidt 435462c6e6 Merge branch 'merge' into next 2009-05-29 13:54:52 +10:00
Inaky Perez-Gonzalez 2618ab774e wimax/i2400m: usb: fix device reset on autosuspend while not yet idle
When the i2400m is connected to a network, the host interface (USB)
cannot be suspended. For that to happen, the device has to have
negotiated with the basestation to put the link on IDLE state.

If the host tries to put the device in standby while it is connected
but not idle, the device resets, as the driver should not do that.

To avoid triggering that, when the USB susbsytem requires the driver
to autosuspend the device, the driver checks if the device is not yet
idle. If it is not, the request is requested (will be retried again
later on after the autosuspend timeout). At some point the device will
enter idle and the request will succeed (unless of course, there is
network traffic, but at that point, there is no idle neither in the
link or the host interface).

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-05-28 18:02:27 -07:00
Inaky Perez-Gonzalez a0a4c4c9e5 wimax/i2400m: sdio: set the block size before enabling the function
From a fix by Cindy H Kao:

  Block size has to be set before sending IOE enable because the
  firmware reads the block size register before it reads IOE register.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-05-28 18:02:11 -07:00
Inaky Perez-Gonzalez 052991d7ac wimax/i2400m: remove redundant readiness checks from i2400m_report_tlv_*()
Functions i2400m_report_tlv*() are only called from
i2400m_report_hook(), called in a workqueue by
i2400m_report_hook_work(). The scheduler checks for device readiness
before scheduling.

Added an extra check for readiness in i2400m_report_hook_work(), which
makes all the checks down the line redundant.

Obviously the device state could change in the middle, but error
handling would take care of that.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-05-28 18:01:58 -07:00
Inaky Perez-Gonzalez 8ac1101f8c wimax/i2400m: factor out 'state report's TLV handling to a function
i2400m_report_state_hook() is going to get messier as we add handling
code.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-05-28 18:01:49 -07:00
Inaky Perez-Gonzalez 223beea238 wimax/i2400m: allow kernel commands to device to be logged too
By running 'echo 1 > /sys/kernel/debug/wimax:wmxX/i2400m/trace_msg_from_user',
the driver will echo to user space all the commands being sent to the
device from user space, along with the responses.

However, this only helps with the commands being sent from user space;
with this patch, the trace hook is moved to i2400m_msg_to_dev(), which
is the single access point for running commands to the device (both by
user space and the kernel driver). This allows better debugging by
having a complete stream of commands/acks and reports.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-05-28 18:01:42 -07:00
Inaky Perez-Gonzalez 44b849d11b wimax/i2400m: trace commands sent from user space on the "echo" pipe
When commands are sent from user space, trace both the command sent
and the answer received over the "echo" pipe instead of over the
"trace" pipe when command tracing is enabled. As well, when the device
sends a reports/indications, send it over the "echo" pipe.

The "trace" pipe is used by the device to send firmware traces;
gets confusing. Another named pipe makes it easier to split debug
information.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-05-28 18:01:35 -07:00
Inaky Perez-Gonzalez fe44268385 wimax/i2400m: generate fake source MAC address with random_ether_addr()
The WiMAX i2400m driver needs to generate a fake source MAC address to
fake an ethernet header (for destination, the card's MAC is
used). This is the source of the packet, which is the basestation it
came from. The basestation's mac address is not usable for this, as it
uses its own namespace and it is not always available.

Currently the fake source MAC address was being set to all zeros,
which was causing trouble with bridging.

Use random_ether_addr() to generate a proper one that creates no
trouble.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-05-28 18:01:24 -07:00
David S. Miller 46c37672d7 rtl8187: Remove pointless check in rtl8187_rx_cb().
First of all, it exposes the SKB list implementation.

Second of all it's not needed.  If we get called here, we
successfully enqueued the URB with the linked SKB and
such a completion only gets called one time on such an
SKB.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-28 01:22:57 -07:00
David S. Miller a1091aae19 p54: Use SKB list handling helpers instead of by-hand code.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-28 00:48:16 -07:00
David S. Miller ae71fabbe5 wavelan: Remove bogus debugging on skb->next being non-NULL.
This eliminates explicit references to the SKB list handling
implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-27 17:27:01 -07:00
David S. Miller 5615968a70 appletalk: Add proper locking around IPDDP routing table.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-27 16:56:47 -07:00
Eric Dumazet 553e233562 net: use netdev stats in b44, sundance, via-rhine and via-velocity
Use struct net_device_stats provided in struct net_device instead of
private ones.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-27 15:47:07 -07:00
Florian Fainelli 824fb38e99 r6040: check and update media status
This patch removes the not-that-useful message in the
r6040_timer which prints the PHY status. Instead
replace it with a call to mii_check_media which will
update the link status and print it on startup.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-27 15:46:53 -07:00
Eli Cohen ab6bf42e23 mlx4_core: Add module parameter for number of MTTs per segment
The current MTT allocator uses kmalloc() to allocate a buffer for its
buddy allocator, and thus is limited in the amount of MTT segments
that it can control.  As a result, the size of memory that can be
registered is limited too.  This patch uses a module parameter to
control the number of MTT entries that each segment represents,
allowing more memory to be registered with the same number of
segments.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2009-05-27 14:38:34 -07:00
Peter P Waskiewicz Jr 0fb2787bf2 ixgbe: Fix build warning
This patch fixes a build warning due to an unused label.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-26 21:41:18 -07:00
David S. Miller 0a372eb91f sh_eth: Remove references to BUS_ID_SIZE, use MII_BUS_ID_SIZE instead.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-26 21:11:09 -07:00
David S. Miller 21a8cfe120 cpmac: Remove references to BUS_ID_SIZE, use MII_BUS_ID_SIZE.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-26 21:10:22 -07:00
David S. Miller 0e53c7f954 ixp4xx_eth: Remove references to BUS_ID_SIZE.
Use MII_BUS_ID_SIZE instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-26 21:09:33 -07:00
Mike Frysinger b63dc8fef7 bfin_mac: fix build error due to net_device_ops convert
The previous commit "convert to net_device_ops" broke the Blackfin MAC
driver as it declared the new structure before the function it used:
  CC      drivers/net/bfin_mac.o
drivers/net/bfin_mac.c:984: error: ‘bfin_mac_close’ undeclared here (not in a function)
make[1]: *** [drivers/net/bfin_mac.o] Error 1

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-26 20:55:33 -07:00
Jean Delvare f21b75e9d6 r8169: Use a different default for each family
The r8169 driver supports 3 different families of network chips
(RTL8169, RTL8168 and RTL8101). When an unknown version is found, the
driver currently always defaults to the RTL8169 variant. This has very
little chance to ever work for chips of the other families. So better
define a per-family default.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-26 20:54:48 -07:00
Alex Chiang 5ad1890035 atlx: move modinfo data from atlx.h to atl1.c
Both atl1.c and atl2.c include atlx.h, which defines some modinfo
stuff. But atl2.c seems like it doesn't want the modinfo data
from atlx.h, as it defines its own.

Running modinfo on atl2.ko, we get conflicting information:

$ /sbin/modinfo drivers/net/atlx/atl2.ko | egrep "version|description|author"
version:        2.2.3
description:    Atheros Fast Ethernet Network Driver
author:         Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>
version:        2.1.3
author:         Xiong Huang <xiong.huang@atheros.com>, 	Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>

Move the modinfo data out of atlx.h and into atl1.c to eliminate
the confusion:

$ /sbin/modinfo drivers/net/atlx/atl1.ko | egrep "version|description|author"
version:        2.1.3
author:         Xiong Huang <xiong.huang@atheros.com>, 	Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>
description:    Atheros L1 Gigabit Ethernet Driver

$ /sbin/modinfo drivers/net/atlx/atl2.ko | egrep "version|description|author"
version:        2.2.3
description:    Atheros Fast Ethernet Network Driver
author:         Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>

Reported-by: Scott Scriven <scott.scriven@hp.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-26 20:50:12 -07:00
Kevin Hao 3d6593e9cc net/ucc_geth: allow to set mac address on running device
Inspired by the patch for 8139too (bda6a15a).

Currently we can't set mac address on a running ucc_geth device.
But this is needed when you use this device as a bonding slave in
bonding device in balance-alb mode. So add this feature for ucc_geth
device.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-26 20:49:03 -07:00