Commit Graph

13105 Commits (22117d6eaac50d366d9013c88318a869ea4d8739)

Author SHA1 Message Date
Alexander Duyck 9eb2341d0d igb: add support for another dual port 82576 non-security nic
Adding device id to support 82576NS dual port copper
NIC.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-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-03-14 12:41:05 -07:00
Alexander Duyck 75f4f382e3 igb: correct typo that was setting vfta mask to 1
This patch corrects a typo that was doing a less than comparison instead of
a left shift due to the fact that I didn't get enough <'s in there.

This resolves an issue in which vlans were not functioning correctly.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-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-03-14 12:41:04 -07:00
Alexander Duyck cad6d05f56 igb: add PF to pool
Add Pf to pool if adding a VLVF register value and the VFTA bit is
already set.

This patch addresses the unlikely situation that the PF adds a vlan
entry when the vlvf is full, and a vf later adds the vlan to the vlvf.

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-03-14 12:41:03 -07:00
Alexander Duyck a2cf8b6ce1 igb: support wol on second port
We need to support wol on the second port for situations such as when the
lan ports are on the motherboard itself.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-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-03-14 12:41:03 -07:00
Alexander Duyck bd38e5d124 igb: resolve warning of unused adapter struct
If DCA is undefined then the adapter struct becomes unnecessary.  To
resolve this issue the DCA calls can simply make a call to the adapter
struct through the rx_ring adapter struct member.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-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-03-14 12:41:02 -07:00
Alexander Duyck 5e6d5b17db igb: remove netif running call from igb_poll
The netif_running check in igb poll is a hold over from the use of fake
netdevs to use multiple queues with NAPI prior to 2.6.24.  It is no longer
necessary to have the call there and it currently can cause errors if
work_done == budget.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-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-03-14 12:41:01 -07:00
Maciej Sosnowski 92be791759 igb: switch to new dca API
With the new DCA API, the driver should use dca3_get_tag() instead of
the obsolete dca_get_tag().

Signed-off-by: Maciej Sosnowski < maciej.sosnowski@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:01 -07:00
Dhananjay Phadke de9307c686 netxen: remove old flash check.
Remove flash size check which made sense only for ancient
boards with 1MB flash. The check is based on values read
from specific locations and fails with firmware size changes.

This prevents driver from getting right mac addresses.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-14 11:40:08 -07:00
Gabriele Paoloni 9c705260fe ppp: ppp_mp_explode() redesign
I found the PPP subsystem to not work properly when connecting channels
with different speeds to the same bundle.

Problem Description:

As the "ppp_mp_explode" function fragments the sk_buff buffer evenly
among the PPP channels that are connected to a certain PPP unit to
make up a bundle, if we are transmitting using an upper layer protocol
that requires an Ack before sending the next packet (like TCP/IP for
example), we will have a bandwidth bottleneck on the slowest channel
of the bundle.

Let's clarify by an example. Let's consider a scenario where we have
two PPP links making up a bundle: a slow link (10KB/sec) and a fast
link (1000KB/sec) working at the best (full bandwidth). On the top we
have a TCP/IP stack sending a 1000 Bytes sk_buff buffer down to the
PPP subsystem. The "ppp_mp_explode" function will divide the buffer in
two fragments of 500B each (we are neglecting all the headers, crc,
flags etc?.). Before the TCP/IP stack sends out the next buffer, it
will have to wait for the ACK response from the remote peer, so it
will have to wait for both fragments to have been sent over the two
PPP links, received by the remote peer and reconstructed. The
resulting behaviour is that, rather than having a bundle working
@1010KB/sec (the sum of the channels bandwidths), we'll have a bundle
working @20KB/sec (the double of the slowest channels bandwidth).


Problem Solution:

The problem has been solved by redesigning the "ppp_mp_explode"
function in such a way to make it split the sk_buff buffer according
to the speeds of the underlying PPP channels (the speeds of the serial
interfaces respectively attached to the PPP channels). Referring to
the above example, the redesigned "ppp_mp_explode" function will now
divide the 1000 Bytes buffer into two fragments whose sizes are set
according to the speeds of the channels where they are going to be
sent on (e.g .  10 Byets on 10KB/sec channel and 990 Bytes on
1000KB/sec channel).  The reworked function grants the same
performances of the original one in optimal working conditions (i.e. a
bundle made up of PPP links all working at the same speed), while
greatly improving performances on the bundles made up of channels
working at different speeds.

Signed-off-by: Gabriele Paoloni <gabriele.paoloni@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 16:09:12 -07:00
Lennert Buytenhek 5a89392225 mv643xx_eth: fix unicast address filter corruption on mtu change
When mv643xx_eth_open() is called to up an interface, port_start()
will first re-program the unicast address filter, and then
re-initialise the PORT_CONFIG register, but that will disable unicast
promiscuous mode if it was enabled by the unicast address filter setup.

This isn't a problem on ifconfig up, as ->set_rx_mode() will be called
shortly afterwards which will program the filters again, but it does
trigger when changing the MTU, which calls mv643xx_eth_stop() and then
mv643xx_eth_open() by hand to repopulate the receive rings with skbuffs
of the new size.

Swap the initialisation of the PORT_START register and the call to
the unicast filter setup function to fix this.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 15:48:02 -07:00
Tomasz Lemiech 1f8ae0a21d tulip: Fix for MTU problems with 802.1q tagged frames
The original patch was submitted last year but wasn't discussed or applied
because of missing maintainer's CCs. I only fixed some formatting errors,
but as I saw tulip is very badly formatted and needs further work.

Original description:
This patch fixes MTU problem, which occurs when using 802.1q VLANs. We
should allow receiving frames of up to 1518 bytes in length, instead of
1514.

Based on patch written by Ben McKeegan for 2.4.x kernels. It is archived
at http://www.candelatech.com/~greear/vlan/howto.html#tulip
I've adjusted a few things to make it apply on 2.6.x kernels.

Tested on D-Link DFE-570TX quad-fastethernet card.

Signed-off-by: Tomasz Lemiech <szpajder@staszic.waw.pl>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Ben McKeegan <ben@netservers.co.uk>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 15:43:38 -07:00
Marcin Slusarz a390d1f379 phylib: convert state_queue work to delayed_work
It closes a race in phy_stop_machine when reprogramming of phy_timer
(from phy_state_machine) happens between del_timer_sync and cancel_work_sync.

Without this change it could lead to crash if phy_device would be freed after
phy_stop_machine (timer would fire and schedule freed work).

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 15:41:19 -07:00
Pavel Roskin 34cd347cec bmac: remove unused variable bp in bmac_misc_intr()
From: Pavel Roskin <proski@gnu.org>

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 14:17:16 -07:00
Jan-Bernd Themann 52e21b1bd9 ehea: fix circular locking problem
This patch fixes the circular locking problem by changing the locking strategy
concerning the logging of firmware handles.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 13:50:40 -07:00
Benjamin Herrenschmidt 9616a75505 emac: Fix clock control for 405EX and 405EXr chips
The EMAC variant in the 405EX and 405EXr chips needs the "440EP" type clock
control workaround to avoid lockups of the Rx side during reset.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Felix Radensky <felix@embedded-sol.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 13:48:46 -07:00
Chris Leech e90d400c2b ixgbe: fix multiple unicast address support
Multiple unicast address support appears to have been broken with the
change to support net_device_ops.  This a regression from 2.6.28 to 2.6.29.

I'm not 100% on whether ndo_set_multicast_list can be NULL after this
or not.  If ndo_set_rx_mode is set everything _should_ be using it.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 13:40:36 -07:00
Dave Jones 59f8e169e2 via-velocity: Fix DMA mapping length errors on transmit.
From: Dave Jones <davej@redhat.com>

The dma-debug changes caught that this driver uses the
wrong DMA mapping length when skb_padto() does something.

With suggestions from Eric Dumazet.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 13:37:46 -07:00
Eric Biederman f9ac30f080 macvlan: Deterministic ingress packet delivery
Changing the mac address when a macvlan device is up will leave the
device on the wrong hash chain making it impossible to receive
packets.

There is no checking of the mac address set on the macvlan.  Allowing
a misconfiguration to grab packets from the the underlying device or
another macvlan.

To resolve these problems I update the hash table of macvlans when the
mac address of a macvlan changes, and when updating the hash table
I verify that the new mac address is usable.

The result is well defined and predictable if not perfect handling of
mac vlan mac addresses.

To keep the code clear I have created a set of hash table maintenance
in macvlan so I am not open coding the hash function and the logic
needed to update the hash table all over the place.

Signed-off-by: Eric Biederman <ebiederm@aristanetworks.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 13:16:13 -07:00
Eric Biederman b0832a2961 macvlan: Support creating macvlans from macvlans
When running in a network namespace whose only link to
the outside world is a macvlan device, not being
able to create another macvlan is a real pain.

So modify macvlan creation to allow automatically forward
a creation of a macvlan on a macvlan to become a creation
of a macvlan on the underlying network device.

Signed-off-by: Eric Biederman <ebiederm@aristanetworks.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 13:15:37 -07:00
Steve Glendinning f7efb6ccc2 smsc911x: improve EEPROM loading timeout logic in open
This patch from Juha Leppanen suppresses a false warning if the eeprom
load succeeds on the very last attempt.

Juha> In function smsc911x_open smsc911x_reg_read+udelay can be run 50
Juha> times with timeout reaching -1, and the following if statetement
Juha> does not catch the timeout and no warning is issued. Also if the
Juha> 50th smsc911x_reg_read is GOOD, loop is exited with timeout as 0
Juha> and bogus warning issued.  Replace testing order and --timeout
Juha> instead of timeout-- and now max 50 smsc911x_reg_read's are done,
Juha> with max 49 udelays.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 12:14:11 -07:00
Steve Glendinning 8dacd54812 smsc911x: check for FFWD success before checking for timeout
This patch from Juha Leppanen suppresses a false warning if a fast
forward operation succeeds on the very last attempt.

Juha> If smsc911x_reg_read loop is executed 500 times, timeout reaches 0
Juha> and the 500th smsc911x_reg_read result in val is ignored. If
Juha> testing order is changed, then val is checked first. The 500th
Juha> reg_read might be GOOD, why ignore it!

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 12:14:09 -07:00
Andy Fleming 26ccfc37da gianfar: Convert to use netdev_ops
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 12:05:23 -07:00
Andy Fleming db46db1577 gianfar: remove gianfar_mii.c
commit 1577ecef76
Author: Andy Fleming <afleming@freescale.com>
Date:   Wed Feb 4 16:42:12 2009 -0800

    netdev: Merge UCC and gianfar MDIO bus drivers

left out the deletion of gianfar_mii.c.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 12:05:21 -07:00
Jiri Pirko bda6a15a0d 8139too: allow to set mac address on running device
Similar patch as for 8139cp posted yesterday, so the same comment:

So far there was not a chance to set a mac address on running 8139too device.
This is for example needed when you want to use this NIC as a bonding slave in
bonding device in mode balance-alb. This simple patch allows it.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:48:18 -07:00
Jiri Pirko c048aaf4ca 8139cp: allow to set mac address on running device
So far there was not a chance to set a mac address on running 8139cp device.
This is for example needed when you want to use this NIC as a bonding slave in
bonding device in mode balance-alb. This simple patch allows it.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:47:48 -07:00
Divy Le Ray 3bcb1255ba cxgb3: update driver version
update driver version to 1.1.1-ko

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:49 -07:00
Divy Le Ray d9507a532a cxgb3: update FW
Update FW to 7.1

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:48 -07:00
Divy Le Ray bf792094ef cxgb3: detect mac link faults.
The driver currently ignores the local or remote link faults
raised at the mac layer. This patch fixes it.
Our mac however only advertizes link events, so wait for the
phy to stabilize the link, then enable mac link events interrupts.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:47 -07:00
Divy Le Ray cd40658a61 cxgb3: Update Rev3 mac workaround
Update the heurstics workaround unlocking a hung mac:
- reduce Tx mac toggling by enabling Tx drain before resetting the mac
- Take Tx (lack of) activity in account only
- Update the monitoring counter range to 64 bits

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:46 -07:00
Divy Le Ray fc88219601 cxgb3: disable high freq non-data interrupts
Under RX pressure, The HW might generate a high load of interrupts
to signal mac fifo or free lists overflow.
Disable the interrupts, and poll the relevant status bits
to maintain stats.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:45 -07:00
Divy Le Ray 42c8ea17e8 cxgb3: separate TX and RX reclaim handlers
Separate TX and RX reclaim handlers
Don't disable interrupts in RX reclaim handler.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:45 -07:00
Divy Le Ray b2b964f064 cxgb3: prefetch buffer access in GRO mode
Elmininate a cache miss when accessing the CPL header within
the first aggregated buffer.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:44 -07:00
Divy Le Ray 8f4358044d cxgb3: fix skb truesize in jumbo mode
Update skb truesize correctly for the 2nd buffer from a Jumbo frame

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:44 -07:00
Divy Le Ray 9bb2b31e6f cxgb3: release page ref on mapping error
Release page chunk reference in case we fail to map it.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:43 -07:00
Divy Le Ray 26b3871d2c cxgb3: ring rx door bell less frequently
Ring free lists door bell less frequently,
specifically every quarter of the active FL
size.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:43 -07:00
Ron Mercer 855b0993f2 qlge: bugfix: Pad outbound frames smaller than 60 bytes.
With some asic configurations xmit of frames smaller than 60 bytes may
fail.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:27:25 -07:00
Ron Mercer 6612a6344a qlge: bugfix: Move netif_napi_del() to common call point.
Moving netif_napi_del() up the call chain so it will get called from all
exit points.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:27:24 -07:00
Ron Mercer a7a655f22c qlge: bugfix: Tell hw to strip vlan header.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:27:24 -07:00
Ron Mercer c3c6496dc3 qlge: bugfix: Increase filter on inbound csum.
Chip does not do UDP checksum when fragmentation occurs.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:27:23 -07:00
Ilya Yanok 9fae6c3f64 dnet: replace obsolete *netif_rx_* functions with *napi_*
*netif_rx_* functions is obsolete and removed in newer kernels so
we need to use corresponding *napi_* functions instead.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 09:51:46 -07:00
Linus Torvalds f1c7404e37 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sunhme: Fix qfe parent detection.
  sparc64: Fix lost interrupts on sun4u.
  sparc64: wait_event_interruptible_timeout may return -ERESTARTSYS
  jsflash: stop defining MAJOR_NR
2009-03-12 09:27:53 -07:00
Sathya Perla 6b7c5b947c net: Add be2net driver.
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-11 23:32:22 -07:00
David S. Miller 2c5849ea38 dnet: Fix warnings on 64-bit.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-11 23:28:57 -07:00
Ilya Yanok 4796417417 dnet: Dave DNET ethernet controller driver (updated)
Driver for Dave DNET ethernet controller found on Dave/DENX QongEVB-LITE
FPGA. Heavily based on Dave sources, I've just adopted it to current
kernel version and done some code cleanup.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-11 23:26:02 -07:00
Randy Dunlap ff5e2b4732 wimax: fix i2400m printk formats
Fix printk format warnings:

drivers/net/wimax/i2400m/netdev.c:523: warning: format '%zu' expects type 'size_t', but argument 7 has type 'unsigned int'
drivers/net/wimax/i2400m/netdev.c:548: warning: format '%zu' expects type 'size_t', but argument 7 has type 'unsigned int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-11 23:24:03 -07:00
Yevgeny Petrilin 793730bfb6 mlx4_core: Don't perform SET_PORT command for Ethernet ports
The same operation is performed when the Ethernet driver initializes
the port.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2009-03-11 15:47:18 -07:00
Ayaz Abdulla 3e1a3ce2f1 forcedeth: version bump to 64
This patch bumps up the version to 0.64

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:52 -07:00
Ayaz Abdulla 1b2bb76f57 forcedeth: fix irq clearing and napi spin lock changes
This patch clears the irqstatus register with the exact same events it
has read from it. Since the read-write operation is not atomic, a new
irqstatus bit could have been set in between these operations and would
then be cleared accidentally.

Secondly, we now don't need any spin lock protection when
scheduling/completing napi poll as the isr will not execute anymore (as
we turn off all interrupts now).

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:51 -07:00
Ayaz Abdulla 6cef67a02f forcedeth: performance changes
This patch modifies the throughput mode poll settings to reduce the
number of interrupts. This is only used by older hardware that need a
timer irq in throughput mode.

Secondly, this patch increases the default rx ring from 128 to 512. This
drastically improves bandwidth utilization for small packets sizes i.e
512 bytes.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:50 -07:00
Ayaz Abdulla 4145ade2bb forcedeth: add interrupt moderation logic
This patch adds the logic to moderate the interrupts by changing the
mode between throughput and poll. If there has been a large amount of
time without any burst of network load, the code will transition to pure
throughput mode (where each tx/rx/other will cause an interrupt). If
bursts of network load occurs, it will transition to poll based mode to
help reduce cpu utilization (it will not interrupt on each packet) while
maintaining the optimum network bandwidth utilization.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:49 -07:00
Ayaz Abdulla b67874ac16 forcedeth: remove isr processing loop
This patch is only a subset of changes so that it is easier to see the
modifications. This patch removes the isr 'for' loop and shifts all the
logic to account for new tab spacing.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:49 -07:00
Ayaz Abdulla 9e184767c9 forcedeth: add new optimization mode
A new optimization mode called Dynamic has been added. This will be mode
where interrupt moderation logic will dynamically switch between pure
throughput mode and poll based (called 'cpu') mode.

Also, for newer chipsets, the timer irq is not needed for throughput
mode. Secondly, since we are modifying the irqmask to change between
modes, msix is not supported.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:48 -07:00
Ayaz Abdulla f27e6f39fc forcedeth: napi - handle all processing
The napi poll routine has been modified to handle all interrupt events
and process them accordingly. Therefore, the ISR will now only schedule
the napi poll and disable all interrupts instead of just disabling rx
interrupt.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:48 -07:00
Ayaz Abdulla 33912e72d0 forcedeth: add/modify tx done with limit
There are two tx_done routines to handle tx completion processing. Both
these functions now take in a limit value and return the amount of tx
completions. This will be used by a future patch to determine the total
amount of work done.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:47 -07:00
Ayaz Abdulla 2daac3e8f8 forcedeth: remove overhead
This patch removes unnecessary overhead code. Firstly, there is no nead
to mask off unwanted interrupts as we will be checking against the
irqmask field anyways. Secondly, there has been no value in last few
years from detecting error or unknown interrupts.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:47 -07:00
Ayaz Abdulla 582806be06 forcedeth: save irq events for napi processing
This patch will save the irq events in the driver's context so that the
napi routine knows which interrupts have occurred. Subsequent changes
will be moving all interrupt processing into the napi poll routine.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:46 -07:00
Ayaz Abdulla d41c628c51 forcedeth: remove msix + napi
This patch removes support for msix running in conjunction with napi.
There has been reported issues regarding the behaviour of irqmask and
generation of interrupts by the HW when in MSIX mode. When running napi,
the driver is constantly turning off/on the irqmask. For the time being,
I am going to disable it until I can root cause the issue.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:45 -07:00
Ayaz Abdulla 08d9357574 forcedeth: fix missing napi enable/disable calls
This patch adds missing napi enable/disable calls.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:45 -07:00
Ayaz Abdulla 8ed1454aa8 forcedeth: fix stats version feature
Newer versions of the stats feature would not encompass all older
versions. This would result in only retreiving a subset of all available
stats in HW.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:44 -07:00
Stephen Hemminger 7546dd97d2 net: convert usage of packet_type to read_mostly
Protocols that use packet_type can be __read_mostly section for better
locality. Elminate any unnecessary initializations of NULL.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:22:43 -07:00
Dhananjay Phadke 1e2d0059fc netxen: annotate board_config and board_type
Remove huge board config structure from each instance, read
only necessary fields from flash.

Replace board_type with port_type (1G/10G), there's another
board_type field describing card type (SFP/XFP/CX4).

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:10:04 -07:00
Dhananjay Phadke becf46a012 netxen: cleanup superfluous multi-context code
MAX_RCV_CTX was set to 1, there's only rx context per
PCI function.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:10:03 -07:00
Dhananjay Phadke 9f5bc7f190 netxen: refactor netdev open close
rearrange open and close into hardware attach(), detach() and
nic up() and down(). this will be used for suspend/resume
subsequently.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:10:02 -07:00
Dhananjay Phadke d32cc3d24e netxen: small xmit optimizations
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:10:02 -07:00
Dhananjay Phadke 0ddc110c6f netxen: cleanup rx handling
o remove unused rx fragment handling code.
o imporove check for status descriptor ownership.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:10:01 -07:00
David S. Miller d5df2a1613 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/bnx2x_main.c
	drivers/net/wireless/iwlwifi/iwl3945-base.c
	drivers/net/wireless/rt2x00/rt73usb.c
2009-03-10 05:04:16 -07:00
Eilon Greenstein db434ac6bf bnx2x: Using DMAE to initialize the chip
There was a bug, which occasionally caused failure in PRAM initialization after
the cold boot.
Also incremented version number to 1.45.27.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:52:03 -07:00
Eilon Greenstein 6dc7d8c843 bnx2x: Casting page alignment
Adding a proper cast to the argument of PAGE_ALIGN macro so that the output
won't depend on its original type. Without this cast aligned value will be
truncated to the size of the argument type.

Reported-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Tested-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:52:02 -07:00
Eilon Greenstein 916c775ff2 bnx2x: Adding restriction on sge_buf_size
sge_buff_size may not be more than 0xffff.

Reported-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Tested-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:52:01 -07:00
Ron Mercer d4a4aba617 qlge: bugfix: Fix endian issue related to rx buffers.
This was introduced in an earlier net-next patch.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:58 -07:00
Ron Mercer 74c50b4bae qlge: bugfix: Pad outbound frames smaller than 60 bytes.
With some asic configurations xmit of frames smaller than 60 bytes may
fail.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:58 -07:00
Ron Mercer 6b318cb368 qlge: bugfix: Move netif_napi_del() to common call point.
Moving netif_napi_del() up the call chain so it will get called from all
exit points.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:56 -07:00
Ron Mercer 39a28bc480 qlge: Remove spinlock from asic init path.
There is nothing to contend with it.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:56 -07:00
Ron Mercer b25215d043 qlge: Clear shadow registers before use.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:55 -07:00
Ron Mercer 08b1bc8f4a qlge: Get rid of irqsave/restore in intr disable.
The completion interrupt disable routine is only called from the ISR, so
there is no need for irqsave/restore.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:54 -07:00
Ron Mercer c9cf0a04a0 qlge: bugfix: Tell hw to strip vlan header.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:54 -07:00
Ron Mercer 1e213303d8 qlge: Add tx multiqueue support.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:53 -07:00
Ron Mercer 22bdd4f599 qlge: Add support for GRO.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:53 -07:00
Ron Mercer d555f5921f qlge: Increase filtering for inbound csum settings.
Chip does not do UDP checksum when fragmentation occurs.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:51 -07:00
Ron Mercer a75ee7f1cc qlge: Remove debug junk from asic reset logic.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:49 -07:00
Ron Mercer db98812f6b qlge: Move reset logic into asic_reset_worker func.
Get rid of extraneous ql_cycle_adapter.  It's only called from the one
place.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:48 -07:00
Friedrich Oslage 0796e75503 sunhme: Fix qfe parent detection.
Signed-off-by: Friedrich Oslage <bluebird@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-08 20:13:42 -07:00
Christian Lamparter c035002472 p54: fix race condition in memory management
This patch fixes a number of race conditions in the driver.
Up until now, "entry" pointer was initialized before acquiring the right lock.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-06 15:54:32 -05:00
Michael Buesch 1a77733ccb b43: Fix compilation for devices without PCI core
This fixes compilation, if the PCI core is disabled.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:48 -05:00
Jouni Malinen 39d89cd34d ath9k: Add a debugfs interface for controlling virtual wiphys
debugfs ath9k/phy#/wiphy can be used to show the current list of
virtual wiphys and to add/remove virtual wiphys. Eventually, this
interface could be replaced with a cfg80211/nl80211 command that is
passed through mac80211.

For example:
# cat /debug/ath9k/phy0/wiphy
primary: phy0
# echo add > /debug/ath9k/phy0/wiphy
# cat /debug/ath9k/phy0/wiphy
primary: phy0
secondary: phy1
# echo del=phy1 > /debug/ath9k/phy0/wiphy
# cat /debug/ath9k/phy0/wiphy
primary: phy0

In addition, following commands can be used to test pausing and
unpausing of the virtual wiphys:
pause=phy1
unpause=phy1
select=phy1
(select pauses and unpauses wiphys automatically based on channel)
schedule=500
(set wiphy scheduling interval in msec; 0 = disable; default value: 500)

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:48 -05:00
Jouni Malinen f98c3bd241 ath9k: Add a simple virtual wiphy scheduler
This is a very simple scheduler that goes through the wiphys and
schedules one at a time every N milliseconds (current default value:
500 ms). This is enough for initial testing, but there are number of
areas where a more complex scheduler can improve operations greatly.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:48 -05:00
Jouni Malinen 8089cc47ed ath9k: Special processing for channel changes during scan
Allow mac80211-controlled channel changes on an active wiphy and
especially during a scan. We need this as long as the scan is
controlled by mac80211. Moving this control into the driver could
allow some optimizations on scanning while using multiple virtual
interfaces, but for now, try to work as well as possible with the
current scan mechanism.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:47 -05:00
Jouni Malinen 7ec3e514d9 ath9k: Add workaround to recover from failed channel changes
It looks like channel change may fail in some cases and end up leaving
the hardware in state where it cannot transmit any frames. Add a
workaround to recover from this state if we detect that wiphy
selection is failing due to wiphys not leaving PAUSING state.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:47 -05:00
Jouni Malinen ee166a0e71 ath9k: Check virtual wiphy state on tx()
mac80211 should not be requesting us to transmit frames on paused
wiphys since we stop the TX queues. Just in case, add debug code to
make sure we catch if this were to happen.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:47 -05:00
Jouni Malinen 18eb62f87a ath9k: Pause other virtual wiphys on channel change
For now, allow channel changes immediately and just force the other
virtual wiphys to paused state. This is needed to allow
mac80211-controlled scan to control channel changes.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen 465ca84d95 ath9k: Register larger listen interval
Notify the AP that we may be sleeping longer to allow the AP power
save code to buffer larger number of frames for us when using virtual
wiphys.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen 9580a222b8 ath9k: Make start/stop operations aware of virtual wiphys
Instead of always going through initialization/deinitialization steps,
do this only for the first/last wiphy to not break the other wiphys.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen 0e2dedf971 ath9k: Add routines for switching between active virtual wiphys
ath9k_wiphy_select() can be used to select a virtual wiphy to be
activated. Other virtual wiphys will be paused and once that is done,
the operational channel is changed and the wiphys that are on the
selected channel will be unpaused.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen f0ed85c6c7 ath9k: Virtual wiphy pause/unpause functionality
Allow virtual wiphys to be paused/unpaused to allow off-channel
operations. Pause will stop all TX queues for the wiphy and move the
STA into power save mode if in managed mode. Unpause wakes up the TX
queues and notifies the AP that the STA woke up if in managed mode.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:45 -05:00
Jouni Malinen b93bce2a5e ath9k: Configure RX filter for multi-BSSID broadcast
Allow RX filter to pass through all broadcast/multicast frames (i.e.,
no BSSID filtering) if virtual interfaces are used. Software filtering
will be used in this case to drop broadcast/multicast frames for
foreign BSSIDs.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:45 -05:00
Jouni Malinen c52f33d05e ath9k: Add support for multiple secondary virtual wiphys
The new struct ath_softc::sec_wiphy array is used to store information
about virtual wiphys and select which wiphy is used in calls to
mac80211. Each virtual wiphy will be assigned a different MAC address
based on the virtual wiphy index.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:45 -05:00
Jouni Malinen bce048d77d ath9k: Add data structure for supporting virtual radio/wiphy operation
This is the initial step in allowing ath9k to register multiple
virtual radios (wiphys). The goal of virtual radios is to allow the
same radio to be shared for multiple virtual interfaces that may
operate on different channels. The mac80211 virtual interface support
is designed only for single channel operation and as such, it is not
suitable for this type of use. Anyway, it can be used on top of the
virtual radio concept, if desired (e.g., use two virtual radios to
handle two channels and then add multiple mac80211 virtual interfaces
on top of each virtual radio).

The new struct ath_wiphy is now registered as the driver data
structure for wiphy. This structure has a pointer to the shared (among
virtual wiphys of the same physical radio) struct ath_softc data. The
primary wiphy maintains the allocated memory for ath_softc. Secondary
(virtual) wiphys will only allocate the new ath_wiphy structure.

Registration of secondary wiphys is added in a separate patch.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Jouni Malinen 8ca21f0185 ath9k: Set BSSID mask based on configured interfaces
Instead of using a hardcoded BSSID mask (mask for own addresses),
iterate through all active interfaces and determine the minimal mask
that covers all local addresses.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Jouni Malinen 2c3db3d51e ath9k: Cleanup multiple VIF processing
Replace the internal sc_vaps array and index values by using vif
pointer from mac80211. Allow multiple VIPs to be registered. Though,
number of beaconing VIFs is still limited by ATH_BCBUF (currently
1). Multiple virtual STAs support is not yet complete, but at least
the data structures should now be able to handle this.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Ivo van Doorn 860559fe68 rt2x00: Export all register stats through debugfs
By exporting the register base, and word size to userspace
through debugfs it will be easier to create scripts which
parse the register information. This makes debugging and
register dumps information easier.

This will break my previous scripts which dumped and parsed
all information, but since this is only for debugging purposes
this change should not be a problem.

Dumpfiles created with the old version can be easily manually
edited to make them compatible with this new approach, which
means there will be no problems comparing dumps from the
different versions either.

Also be more consistent with using tabs to seperate different
fields.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Jouni Malinen d216aaa674 ath9k: Clean up setkey operations
There is no need to use ath_keyset() wrapper for
ath9k_hw_set_keycache_entry() calls. In addition, improve the comments
describing the key setting operations.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:43 -05:00
Gabor Juhos aebe2b5624 ath9k: fix AR_TXCFG_DMASZ_MASK value
The current bitmask is invalid, because the tx dma size is a 3 bit wide
value.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:43 -05:00
Sujith b75bc150af ath9k: Remove unused variables in struct ath_beacon_config
We don't store the beacon timestamp internally, nor
do we do any TIM handling in ath9k.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:43 -05:00
Sujith 2554935b08 ath9k: Lock config_interface() callback with a mutex
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:42 -05:00
Sujith b238e90e99 ath9k: Handle TSF properly for AP mode
The TSF has to be reset only once, upon bringing
the interface up in AP mode. For any beacon reconfigure calls
after that, resetting the TSF results in incorrect beacon generation.
The only exception is a change in the beacon interval,
which is indicated to the driver by mac80211 through
IEEE80211_CONF_CHANGE_BEACON_INTERVAL, handle this properly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:42 -05:00
Sujith 5379c8a266 ath9k: Split beacon configuration into mode specific routines
This makes the code easier to understand.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:42 -05:00
Sujith 9546aae086 ath9k: Cleanup beacon stuck processing
We never use SC_OP_NO_RESET, it is not configurable at all.
Remove all code that deals with this flag and make beacon
stuck processing simple.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:41 -05:00
Sujith 9fc9ab0a69 ath9k: Scrub beacon.c
Remove useless comments, fix indentation.
Also, remove all occurrences of ASSERT(vif) which are not needed.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:41 -05:00
Sujith 0c98de6535 ath9k: Use new scan notifiers from mac80211
The only use case for this right now is ANI calibration,
but more might come up in the future.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:41 -05:00
Alina Friedrichsen 0ad65bd7e1 ath5k: Set TSF fix
The old code doesn't work correctly e.g. on newer chipsets like AR5418+AR2122 and AR5416+AR2133.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:40 -05:00
Alina Friedrichsen b9a1619763 ath9k: Set TSF fix
The old code doesn't work correctly e.g. on newer chipsets like AR5418+AR2122 and AR5416+AR2133.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:40 -05:00
Michael Buesch ce4fbdbf16 b43: Pass more RX flags to mac80211
This changes the RX handler to pass more status flags to mac80211.
It also changes part of the drop policy, if bad frames were requested. (Note that
currently mac80211 will throw a WARN_ON in that case. But nothing bad will happen).

This also removes some obsolete unused timestamping code.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:40 -05:00
Alina Friedrichsen 91ed19f5f6 ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling
So that a new created IBSS network
doesn't break on the first scan.

It seems to Sujith and me that this
stupid code unnecessary, too.

So remove it...

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:39 -05:00
Vivek Natarajan 541d8dd5e8 ath9k: Handle power modes in isr for power save.
Restore network sleep mode in isr if power save is enabled.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:39 -05:00
Sujith 9331ec8060 ath9k: Fill in rate_update mac80211 callback
This callback can be used to handle dynamic 20/40,
and changes in the operating channel's HT parameters.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:39 -05:00
Jouni Malinen e0caf9eaae ath9k: Remove unused key xoring
This is not used anywhere in ath9k and is just making the code more
confusing.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:38 -05:00
Jouni Malinen 672903b329 ath9k: Document keycache operations
There are number of small details about the keycache operations that
are very easy to miss (and forget), so better include detailed
comments in ath9k_hw_set_keycache_entry() to avoid having to figure
out this every time when having to touch this area.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:38 -05:00
Frank Seidel a412c8040d iwlwifi: reduce stack size
Reduce stack memory footprint of iwlwifi.
(From >1000 bytes for each *_table_read
on i386 down to 32)

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:37 -05:00
Ivo van Doorn 64abd80330 rt2x00: Fix SW antenna diversity
Software antenna tuning is broken because of an function
ordering problem during rt2x00link_tuner().

rt2x00link_precalculate_signal()
rt2x00leds_led_quality()
rt2x00lib_antenna_diversity()

rt2x00link_precalculate_signal() will reset the quality TX/RX counters,
however rt2x00lib_antenna_diversity() requires the RX counter to
see what RSSI value must be used for a particular antenna.
We can't change the ordering since rt2x00lib_antenna_diversity() might
reset other statistics which are needed by the function called earlier.

Move the reset of the quality TX/RX counters into a seperate function
and move the call to after rt2x00lib_antenna_diversity().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:37 -05:00
Abhijeet Kolekar 14d2aac580 iwl3945 : use iwl_activate_qos
3945 can use iwl_activate_qos instead of iwl3945_activate_qos.
Patch does two things
1) Patch adds iwl_activate_qos in core library.
2) 3945 makes use of iwl_activate_qos.

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-03-05 14:39:36 -05:00
Abhijeet Kolekar 2a4ddaabe0 iwl3945: add iwl3945_setup_mac
Patch does following,
1) mac80211's shared data is now initialized in iwl3945_setup_mac.
2) Set the rfkill to right state after initialization

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-03-05 14:39:36 -05:00
Reinette Chatre c8f16138b5 iwlwifi: fix *pci_probe error flow
for iwlagn:
- Have to free eeprom of version check fails - otherwise we end up with
  memory leak.
- Include removal of workqueue (created in _setup_deferred_work) in error
  handling.

for iwl3945:
- Fix a few places to jump to correct error handling.
- Reorganize error handling to match with code flow.
- Include iwl_free_channel_map as part of error handling.
- Include releasing eeprom as part of error handling.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00
Abhijeet Kolekar 6e21f15cac iwl3945: unify set key flow with iwlwifi
unify the set key flow with iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00
Abhijeet Kolekar 7c4cbb6ee0 iwl3945: synchronize timestamp with uCode
In IBSS, TSF maintains local clock counters at each station. Network
Synchronization follows a completely distributed scheme where beacon frames
are generated. Each station maintain its own TSF timestamp, extracted from
beacon timestamps they recieved. Following patch synchronize this beacon timestamp
with uCode.

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-03-05 14:39:35 -05:00
Jay Sternberg 39e6d2256b iwlwifi: update 5150 API version to support new firmware
update API to support new numbering that is used for other newer devices.
5150 ucode has not been released yet, so the first released API will be v2.
For those who do have a v1 API the driver does have backward compatibility
support new value of REPLY_TX_POWER_DBM_CMD

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:35 -05:00
Jiri Slaby db5b4f7ae3 ath5k: fix hw rate index condition
Make sure we print out a warning when the index is out of bounds,
i.e. even on hw_rix == AR5K_MAX_RATES.

Also change to WARN and print text with the reported hw_rix.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:32 -05:00
Jouni Malinen 3f53dd64f1 ath9k: Fix hw crypto configuration for TKIP in AP mode
Incorrect Michael MIC key (RX, should have been TX) was set for the
group key in AP mode. This resulted in all broadcast frames triggering
Michael MIC errors and eventual TKIP countermeasures. The change here
sets the correct Michael MIC key based on whether the local end is the
authenticator (well, AP for now).

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Tested-by: Pat Erley <pat-lkml@erley.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Frank Seidel 998a5a7d6a airo: reduce stack memory footprint
Applying kernel janitors todos (reduce stack
footprint where possible) to airo wireless driver.
(Before 1124 bytes on i386, now 876)

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Roel Kluin b837e606d1 wireless, wavelan: spin off by 1
spin can reach -1 after the loop, so 0 is still success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Vasanthakumar Thiagarajan fa09632b02 ath9k: Remove ununsed ack duration stuff with long/short preamble
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Vasanthakumar Thiagarajan f40154e7f7 ath9k: Configure Power control register appropriately for h/w with 4k eeprom
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:30 -05:00
Alina Friedrichsen 5fe73197d3 zd1211rw: Implement get_tsf()
This patch implements get_tsf() of ieee80211_ops in the zd1211rw driver.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:30 -05:00
Jouni Malinen b3bd89ce95 ath9k: Add module parameter to disable hardware crypto
nohwcrypt=1 module parameter can now be used to disable hardware
crypto in ath9k. While the hardware acceleration handles most cases,
it may be useful to be able to force mac80211 software implementation
to be used for some tests, e.g., with virtual interface combinations
that may not yet be supported in the key cache configuration. In
addition, this allows management frame protection to be tested with
older hardware revisions.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:30 -05:00
Reinette Chatre 623d563e52 iwlwifi: fix error flow in iwl*_pci_probe
Both the agn and 3945 drivers has some problems with dealing with
errors in their probe functions. Ensure that a goto will undo only
things that was done before the goto was called.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 13:43:06 -05:00
Xose Vazquez Perez ef4bb70d87 rt2x00 : more devices to rt73usb.c
add more usb_dev to rt73usb.c . IDs 'stolen' from the
windows inf file(10/21/2008, 1.03.02.0000) plus some
from the Ralink linux driver(2009_0206_RT73_Linux_STA_Drv1.1.0.2.tar.bz2)

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 13:43:05 -05:00
Xose Vazquez Perez 9eb77ab076 rt2x00 : more devices to rt2500usb.c
add more usb_dev to rt2500usb.c . IDs 'stolen' from the
windows inf file(02/12/2009, 2.01.01.0015).

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 13:43:05 -05:00
David S. Miller 508827ff0a Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/tokenring/tmspci.c
	drivers/net/ucc_geth_mii.c
2009-03-05 02:06:47 -08:00
Patrick McHardy 72e2240f18 bonding: Fix device passed into ->ndo_neigh_setup().
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-05 01:57:44 -08:00
David S. Miller 77827a7cf3 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-03-04 23:59:54 -08:00
Meelis Roos 87786945fe tmspci: fix request_irq race
Currently, tmspci tokenring driver crashes on device initialization
because it requests its irq before initializing corresponding data
structures. Fix this by moving request_irq call to a safer place.

Signed-off-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 19:24:27 -08:00
Ben Hutchings 2c3c3d02f2 sfc: Improve NIC internal error recovery
Make the error count a per-NIC variable.
Reset this the count after an hour if it has not reached the critical value.
Set the critical value back to 5.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:25 -08:00
Ben Hutchings 4720bc6cfe sfc: Fix search for flush completion events
When flushing queues we disable normal interrupt and event handling and
poll event queue 0 looking for flush completions.  Unfortunately the
flush event polling loop fails to move past any other type of event.
This problem has not been observed in production hardware but appears to
be a possibility.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:24 -08:00
Ben Hutchings 32d760073e sfc: Don't wake TX queues while they're being flushed
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:23 -08:00
Ben Hutchings 8c870379d2 sfc: Clear I2C adapter structure in falcon_remove_nic()
i2c_del_adapter() leaves dangling pointers in the structure.  If we
retry the NIC probe and pass the structure to i2c_add_adapter() again
it will lead to an oops unless we clear it first.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:22 -08:00
Ben Hutchings 115122afc5 sfc: Clean up properly on reset failure paths
If MAC switching fails, stop the port properly.

If PHY reinitialisation fails, clear the port_initialized flag.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:22 -08:00
Ben Hutchings a7ef59332b sfc: Reject packets from the kernel TX queue during a loopback self-test
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:21 -08:00
Ben Hutchings ca83db369c sfc: Fix efx_ethtool_nway_result() to use clause 45 MDIO registers
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:20 -08:00
Matt Carlson 9f8ac0b7b0 tg3: Fix 5906 link problems
Commit 6833c043f9 introduced the phy
auto-powerdown capability.  While the APD feature only works for 5761
and 5784 asic revisions, the (harmless portion of the) code was applied
to all 5705 and newer devices.  However, the 5906 phy departs from the
usual design.  This commit was interfering with the 5906's ability to
negotiate link against some switches.  This patch corrects the problem.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 15:08:19 -08:00
Roel Kluin 4a8fd2cfda sungem: another error printed one too early
Another error was printed one too early.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 00:11:53 -08:00
Roel Kluin b9bdcd9bd7 net pcmcia: worklimit reaches -1
with while (--worklimit >= 0); worklimit reaches -1 after the loop. In
3c589_cs.c this caused a warning not to be printed.

In 3c574_cs.c contrastingly, el3_rx() treats worklimit differently:

static int el3_rx(struct net_device *dev, int worklimit)
{
	while (--worklimit >= 0) { ... }
	return worklimit;
}

el3_rx() is only called by function el3_interrupt(): twice:

static irqreturn_t el3_interrupt(int irq, void *dev_id)
{
        int work_budget = max_interrupt_work;
	while(...) {
		if (...)
			work_budget = el3_rx(dev, work_budget);
		if (...)
			work_budget = el3_rx(dev, work_budget);
		if (--work_budget < 0) {
		        ...
		        break;
		}
	}
}
The error path can occur 2 too early.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 00:11:52 -08:00
Roel Kluin 858b9ced6e net: more timeouts that reach -1
with while (timeout-- > 0); timeout reaches -1 after the loop, so the tests
below are off by one. also don't do an '< 0' test on an unsigned.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 00:11:42 -08:00
Ron Mercer fc1f9ea51d qlge: Add support for lost firmware events.
When the firmware is issuing events to the driver the events
must be removed from the queue.  If the queue overflows, the
firmware will build and special event that captures those that
are lost.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:49 -08:00
Ron Mercer bb6676705e qlge: Save status from firmware crash (system err).
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:49 -08:00
Ron Mercer 7c92191cb4 qlge: Improve handling for firmware init failure.
This event will arrive at boot time or after an
MPI processor reset if the firmware failed to initialize.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:48 -08:00
Ron Mercer f56b54f542 qlge: Clean up event handler for firmware init.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:48 -08:00
Ron Mercer 2ee1e272d1 qlge: Add worker-handler for firmware events.
This worker and it's supporting routines are used for
IDC 'inter-device-communication' events that require
an ACK mailbox command be sent to allow completion
of the request. These requests are originated by
another function wanting to change some common
port paramters. Typical example would be:

1) Change max TX/RX frame size allowed.
2) Change pause parameters.
3) Change loopback mode.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:47 -08:00
Ron Mercer 5700abe947 qlge: Clean up link up processing.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:46 -08:00
Ron Mercer 11d9fe68ac qlge: Clean up link down processing.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:46 -08:00
Ron Mercer eae6b58fb2 qlge: Add firmware support for insert/remove SFP.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:45 -08:00
Peter Korsgaard a1a69c8db7 dm9601: new vendor/product IDs
Add vendor/product IDs for new no name dm9601 compatible usb ethernet
adaptors.

Reported-by: Eric Lauriault <eric@linux.ca>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:48:16 -08:00
Eric Biederman 38d408152a veth: Allow setting the L3 MTU
The limitation to only 1500 byte mtu's limits the utility of the veth
device for testing routing.  So implement implement a configurable
MTU.

For consistency I drop packets on the receive side when they are
larger than the MTU.  I count those drops.  And I allow
a little padding for vlan headers.

I also test the mtu when a new device is created with netlink
because that path currently bypasses the current mtu setting
code.

Signed-off-by: Eric Biederman <ebiederm@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:36:04 -08:00
Linus Torvalds f41bf2ab99 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] fix lots of ARM __devexit sillyness
  [ARM] 5417/1: Set the correct cacheid for ARMv6 CPUs with ARMv7 style MMU
  [ARM] 5416/1: Use unused address in v6_early_abort
  [ARM] 5411/1: S3C64XX: Fix EINT unmask
  [ARM] at91: fix for Atmel AT91 powersaving
  [ARM] RiscPC: Fix etherh oops
2009-03-03 14:12:41 -08:00
Dhananjay Phadke 567c6c4e2b netxen: firmware download improvements
o set port mode after resetting device.
o prefer cut-through firmware (doesn't require on-card memory).
o load flashed firmware if newer.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 00:05:27 -08:00
Dhananjay Phadke 1f434f6384 netxen: support larger dma addressing
Support larger dma mask if firmware indicates capability
to handle larger addresses.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 00:05:26 -08:00
Ron Mercer bcc2cb3b97 qlge: Add support for getting/setting port config.
This patch adds functionality to get and set port parameters.
Currently it is used to set maximum TX/RX frame sizes. This process is
also capable of setting:
1) Pause type: Standard or Priority based.
2) Loop back mode.
3) Enable Jumbo frame mode (included here...)

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:45:24 -08:00
Ron Mercer cdca8d02ea qlge: Add support for device ID 8000.
This device has more firmware support for link management, setting
TX and RX maximum frame sizes.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:45:24 -08:00
Ron Mercer ca0413b66a qlge: Add support for firmware mailbox commands.
This interface will be used for setting things like maximum
frame size, setting WOL, and ACKing changes requested by the FCOE
function.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:45:23 -08:00
Eilon Greenstein c1accad323 bnx2x: Version update
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:49 -08:00
Eilon Greenstein 0a64ea5748 bnx2x: Register dump
Adding "ethtool -d" support. Due to the complexity of the FW and HW, there are a
lot of different regions in the chip - to keep the code as clean as possible,
the ranges were put in an H file. Some areas cannot be read if the driver is
running - so by default, the driver will not access those areas - but any
programmer facing a problem will be able to easily manipulate the driver to
extract full dump. The full dump can also be used with kernel dump modules in
case of kernel panic.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:48 -08:00
Eilon Greenstein c3eefaf676 bnx2x: Debug prints
Add the FP index to relevant debug prints and simply beautify some others

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:48 -08:00
Eilon Greenstein c016201c5c bnx2x: Whitespace
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:46 -08:00
Eilon Greenstein 8660d8c3ab bnx2x: Loopback support at external PHY
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:45 -08:00
Eilon Greenstein 9223dea6c7 bnx2x: Display BCM8481 FW version
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:44 -08:00
Eilon Greenstein 3b313b618b bnx2x: BCM8705 has no microcode
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:44 -08:00
Eilon Greenstein d7bc788bec bnx2x: Enable BCM8726 module transmitter
When 8726 module detection option is disabled, module should be transmitting
regardless of invalid read from EEPROM

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:43 -08:00
Eilon Greenstein cc1cb004df bnx2x: Supporting new BCM8726 FW
Microcode download requires write of another register and read from
"Limiting/LRM mode" register before setting

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:43 -08:00
Eilon Greenstein 762d5f6c95 bnx2x: Calling tx disable unconditionally
On unload, the FW assumes that no packets will be sent after the driver sends
the FW stop command. To ensure that, the driver must always call
netif_tx_disable

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:42 -08:00
Eilon Greenstein 490c3c9bf9 bnx2x: Using DMA engine
Using DMA engine (DMAE) to initialize large consecutive memories in the chip

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:41 -08:00
Eilon Greenstein 2059aba7e4 bnx2x: Missing module parameter description
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:40 -08:00
Eilon Greenstein 8534f32c2f bnx2x: napi_poll budget check
Check the napi_poll budget only when updating it. Also add a comment to explain
the rmb

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:39 -08:00
Eilon Greenstein 7961f79123 bnx2x: Unlimited Tx interrupt work
The Tx interrupt is very short and there is no need to limit it to a budget

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:39 -08:00
Eilon Greenstein 161197853d bnx2x: Add rmb to read status block indices on load
Add rmb to read status block indices on load

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:38 -08:00
Eilon Greenstein 6044735d8d bnx2x: Reduce the likelihood of smb_mb
As the comment explains, this smb_mb is needed only if the queue is stopped
(which is unlikely) so the barrier can be moved to that location

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:38 -08:00
Eilon Greenstein 0d1a8d2d7d bnx2x: Misleading name
As noted by Ben Hutchings <bhutchings@solarflare.com>, these are the
capabilities offsets and not the ID itself

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:37 -08:00
Eilon Greenstein 98589bb109 bnx2x: Remove redundant smb_mb on unload
As noted by Ben Hutchings <bhutchings@solarflare.com>, these smb_mb are not
needed

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:36 -08:00
Russell King 07555c9880 OMAP: enable smc911x support for LDP platform
The following patch enables SMC911x support to work on the OMAP LDP
board.  Although the SMC911x driver will eventually be obsoleted, the
smsc911x patches are rather invasive for the -rc kernels.

Rather than risk destablising smsc911x, this simpler patch is preferred
to allow the network interface to work.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:29:37 -08:00
David Dillow a8c9a53c22 typhoon: repair firmware loading
The conversion to avoid using pci_alloc_consistent() broke the firmware
load process, as well as added an order-4 kmalloc and doubled the memory
usage of the firmware image. Go back to loading a page at a time.

Also, since the user can now give us utter garbage for firmware, do a
cursory validation so we don't try to load just anything.

Signed-off-by: David Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:15:09 -08:00
Jesse Brandeburg d20b606c99 e1000: fix unmap bug
This is in reference to the issue shown in kerneloops (search e1000 unmap)

The e1000 transmit code was calling pci_unmap_page on dma handles that it
might have called pci_map_single on.

Same bug as e1000e

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-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-03-02 16:03:21 -08:00
Jesse Brandeburg 8ddc951c73 e1000e: fix unmap bug
This is in reference to https://bugzilla.redhat.com/show_bug.cgi?id=484494
Also addresses issue show in kerneloops

The e1000e transmit code was calling pci_unmap_page on dma handles that it
might have called pci_map_single on.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-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-03-02 16:02:53 -08:00
Alexander Duyck 19147bb5f1 igb: remove skb_orphan calls
Remove skb_orphan call from igb driver as it can cause multiple issues due
to the fact that it is calling the desctructor and removing the skb from
the socket prior to transmission.

The call was added to improve performance but did so by allowing the skb to
be removed from the socket which gave the socket more window space to
transmit.  The performance gain is not worth the extra problems that this
kind of workaround can introduce as this could lead to a potential DoS if a
UDP stream decided to monopolize the transmit path.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 16:01:53 -08:00
Ben Hutchings 94f52cd152 sfc: Add support for SFN4112F SFP+ reference design
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:07 -08:00
Ben Hutchings 8129d2173e sfc: Clean up LED control
Reinitialise LEDs after overriding them for identification.

Rename set_fault_led method to set_id_led since we always use it for
NIC identification and not faults.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:05 -08:00
Ben Hutchings b4a44a6987 sfc: Delete unused efx_blinker::led_num field
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:05 -08:00
Ben Hutchings d2d2c37314 sfc: Add support for QT2025C PHY
This is a new PHY supporting SFP+ modules, used in the SFN4112F
reference design.  It is similar to the QT2022C2 and shares much of
its support code.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:04 -08:00
Ben Hutchings 3f39a5e9bf sfc: Fix reporting of PHY id
Shuffle bits of the OUI into the conventional written order.

Replace PHY id component macros with functions.

Zero-pad PHY id components in log messages.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:04 -08:00
Ben Hutchings f794fd4400 sfc: Remove "XFP" from log messages that are not specific to XFP
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:03 -08:00
Ben Hutchings 190dbcfd68 sfc: SFT9001/SFN4111T: Check PHY boot status during board initialisation
During SFN4111T initialisation, check whether the PHY boot status
indicates a bad firmware checksum.  If so, prepare to reflash rather
than continuing with normal initialisation.

Remove redundant PHY boot status check from tenxpress_phy_init().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:03 -08:00
Ben Hutchings 7b065f91fa sfc: Fix test for MDIO read failure
Commit 27dd2caca4 changed
mdio_clause45_check_mmds() to read both DEVS0 and DEVS1 registers and
to combine their values into an unsigned 32-bit mask.  This made the
following test for a negative (failure) value useless.  Fix it to
check whether either read failed.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:02 -08:00
Ben Hutchings 22ef02c23a sfc: SFT9001: Include non-breaking cable diagnostics in online self-tests
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:02 -08:00
Inaky Perez-Gonzalez c747583d19 wimax/i2400m: implement RX reorder support
Allow the device to give the driver RX data with reorder information.

When that is done, the device will indicate the driver if a packet has
to be held in a (sorted) queue. It will also tell the driver when held
packets have to be released to the OS.

This is done to improve the WiMAX-protocol level retransmission
support when missing frames are detected.

The code docs provide details about the implementation.

In general, this just hooks into the RX path in rx.c; if a packet with
the reorder bit in the RX header is detected, the reorder information
in the header is extracted and one of the four main reorder operations
are executed. In one case (queue) no packet will be delivered to the
networking stack, just queued, whereas in the others (reset, update_ws
and queue_update_ws), queued packet might be delivered depending on
the window start for the specific queue.

The modifications to files other than rx.c are:

- control.c: during device initialization, enable reordering support
  if the rx_reorder_disabled module parameter is not enabled

- driver.c: expose a rx_reorder_disable module parameter and call
  i2400m_rx_setup/release() to initialize/shutdown RX reorder
  support.

- i2400m.h: introduce members in 'struct i2400m' needed for
  implementing reorder support.

- linux/i2400m.h: introduce TLVs, commands and constant definitions
  related to RX reorder

Last but not least, the rx reorder code includes an small circular log
where the last N reorder operations are recorded to be displayed in
case of inconsistency. Otherwise diagnosing issues would be almost
impossible.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:28 -08:00
Harvey Harrison 61b8d2688a wimax: replace uses of __constant_{endian}
Base versions handle constant folding now.

Edited by Inaky to fix conflicts due to changes in netdev.c

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:27 -08:00
Inaky Perez-Gonzalez fd5c565c0c wimax/i2400m: support extended data RX protocol (no need to reallocate skbs)
Newer i2400m firmwares (>= v1.4) extend the data RX protocol so that
each packet has a 16 byte header. This header is mainly used to
implement host reordeing (which is addressed in later commits).

However, this header also allows us to overwrite it (once data has
been extracted) with an Ethernet header and deliver to the networking
stack without having to reallocate the skb (as it happened in fw <=
v1.3) to make room for it.

- control.c: indicate the device [dev_initialize()] that the driver
  wants to use the extended data RX protocol. Also involves adding the
  definition of the needed data types in include/linux/wimax/i2400m.h.

- rx.c: handle the new payload type for the extended RX data
  protocol. Prepares the skb for delivery to
  netdev.c:i2400m_net_erx().

- netdev.c: Introduce i2400m_net_erx() that adds the fake ethernet
  address to a prepared skb and delivers it to the networking
  stack.

- cleanup: in most instances in rx.c, the variable 'single' was
  renamed to 'single_last' for it better conveys its meaning.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:26 -08:00
Kay Sievers 347707baa7 wimax: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: inaky.perez-gonzalez@intel.com
Cc: linux-wimax@intel.com
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:26 -08:00
Inaky Perez-Gonzalez 8987691a4a wimax/i2400m: allow control of the base-station idle mode timeout
For power saving reasons, WiMAX links can be put in idle mode while
connected after a certain time of the link not being used for tx or
rx. In this mode, the device pages the base-station regularly and when
data is ready to be transmitted, the link is revived.

This patch allows the user to control the time the device has to be
idle before it decides to go to idle mode from a sysfs
interace.

It also updates the initialization code to acknowledge the module
variable 'idle_mode_disabled' when the firmware is a newer version
(upcoming 1.4 vs 2.6.29's v1.3).

The method for setting the idle mode timeout in the older firmwares is
much more limited and can be only done at initialization time. Thus,
the sysfs file will return -ENOSYS on older ones.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:25 -08:00
Inaky Perez-Gonzalez 6a0f7ab830 wimax/i2400m: firmware_check() encodes the firmware version in i2400m->fw_version
Upcoming modifications will need to test for the running firmware
version before activating a feature or not. This is helpful to
implement backward compatibility with older firmware versions.

Modify i2400m_firmware_check() to encode in i2400m->fw_version the
major and minor version numbers of the firmware interface.

As well, move the call to be done as the very first operation once we
have communication with the device during probe() [in
__i2400m_dev_start()]. This is needed so any operation that is
executed afterwards can determine which fw version it is talking to.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:24 -08:00
Inaky Perez-Gonzalez efa05d0f0a wimax/i2400m: drop support for deprecated major fw interface, add for new minor
Firmware interface version 8.x.x has long been deprecated and is no
longer supported (nor available, as it is a preproduction firmware),
so it can be safely dropped.

Add support for firmware interface v9.2.x (current is 9.1.x). Firmware
version 9.2.x is backwards compatible with 9.1.x; new features are
enabled if switches are pressed to turn them on. Forthcoming commits
to the driver will start pressing those switches when the firmware
interface supports it.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:23 -08:00
Inaky Perez-Gonzalez 1039abbc5b wimax/i2400m: add the ability to fallback to other firmware files if the default is not there
In order to support backwards compatibility with older firmwares when
a driver is updated by a new kernel release, the i2400m bus drivers
can declare a list of firmware files they can work with (in general
these will be each a different version). The firmware loader will try
them in sequence until one loads.

Thus, if a user doesn't have the latest and greatest firmware that a
newly installed kernel would require, the driver would fall back to
the firmware from a previous release.

To support this, the i2400m->bus_fw_name is changed to be a NULL
terminated array firmware file names (and renamed to bus_fw_names) and
we add a new entry (i2400m->fw_name) that points to the name of the
firmware being currently used. All code that needs to print the
firmware file name uses i2400m->fw_name instead of the old
i2400m->bus_fw_name.

The code in i2400m_dev_bootstrap() that loads the firmware is changed
with an iterator over the firmware file name list that tries to load
each form user space, using the first one that succeeds in
request_firmware() (and thus stopping the iteration).

The USB and SDIO bus drivers are updated to take advantage of this and
reflect which firmwares they support.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:23 -08:00
Guo-Fu Tseng 79cb5def8d jme: Advance version number after previous changes
From: Guo-Fu Tseng <cooldavid@cooldavid.org>

Advance version number after previous changes.
Sorry for not come along with previous patch series.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 01:55:15 -08:00
David S. Miller 093fb6968d typhoon: Add missing firmware copy.
Noticed by David Dillow.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 01:53:03 -08:00
David S. Miller aa4abc9bcc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-tx.c
	net/8021q/vlan_core.c
	net/core/dev.c
2009-03-01 21:35:16 -08:00
Dmitriy Taychenachev 52c0326bea zaurus: add usb id for motomagx phones
The Motorola MOTOMAGX phones (Z6, E8, Zn5 so far) are providing
combined ACM/BLAN USB configuration. Since it has Vendor Specific
class, the corresponding drivers (cdc-acm, zaurus) can't find it just
by interface info. This patch adds usb id so the zaurus driver can
properly handle this combined device.

Signed-off-by: Dmitriy Taychenachev <dimichxp@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:48:08 -08:00
Bjørn Mork 05ffb3e287 usbnet: make usbnet_get_link() fall back to ethtool_op_get_link()
Make usbnet_get_link() fall back to ethtool_op_get_link() instead of
defaulting to 1.  
     
This makes usbnet_get_link return valid results without the need for a
driver specific check_connect or mii ops as long as the driver calls
netif_carrier_{on,off}() as appropriate.  cdc_ether is an example of
such a driver.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:45:40 -08:00
Eric W. Biederman 2cf48a10aa veth: Fix carrier detect
The current implementation of carrier detect in veth is broken.
It reports the link is down until both sides of the veth pair
are administatively up and then forever after it reports link up.

So fix veth so that it only reports link up when both interfaces
of the pair are administratively up.

Signed-off-by: Eric Biederman <ebiederm@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:44:21 -08:00
Bjørn Mork cac477e8f1 cdc_ether: add usb id for Ericsson F3507g
The Ericsson F3507g wireless broadband module provides a CDC Ethernet
compliant interface, but identifies it as a "Mobile Direct Line" CDC
subclass, thereby preventing the CDC Ethernet class driver from picking
it up.  This patch adds the device id to cdc_ether.c as a workaround.

Ericsson has provided a "class" driver for this device:
http://kerneltrap.org/mailarchive/linux-net/2008/10/28/3832094
But closer inspection of that driver reveals that it adds little more
than duplication of code from cdc_ether.c.  See also
http://marc.info/?l=linux-usb&m=123334979706403&w=2

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:44:21 -08:00
Guo-Fu Tseng 814c01dc7c jme: Adding {64,40}bits DMA mask back
All JMC250 chips have no problem with higher bits support.
Adding it back.

Found-by: Ethan Hsiao <ethanhsiao@jmicron.com>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:39:32 -08:00
Guo-Fu Tseng eb352b838d jme: Clear all modified GHC register flags
Clear all modified GHC register flags.

Fixed-by: Ethan Hsiao <ethanhsiao@jmicron.com>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:39:32 -08:00
Guo-Fu Tseng 7f7fd2da92 jme: Fix pci sync
We should sync ring descriptor to pci device after modifying it.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:39:31 -08:00
Guo-Fu Tseng 07c8d2aad7 jme: Modifies messages to display correct hardware version
This patch modifies messages to display correct hardware version.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:39:31 -08:00
Ivan Vecera 6709fe9a27 r8169: read MAC address from EEPROM on init (2nd attempt)
This is 2nd attempt to implement the initialization/reading of MAC address
from EEPROM. The first used PCI's VPD and there were some problems, some
devices are not able to read EEPROM content by VPD. The 2nd one uses direct
access to EEPROM through bit-banging interface and my testing results seem
to be much better.

I tested 5 systems each with different Realtek NICs and I didn't find any
problem. AFAIK Francois's NICs also works fine.

Original description:
This fixes the problem when MAC address is set by ifconfig or by
ip link commands and this address is stored in the device after
reboot. The power-off is needed to get right MAC address.
This is problem when Xen daemon is running because it renames the device
name from ethX to pethX and sets its MAC address to FE:FF:FF:FF:FF:FF.
After reboot the device is still using FE:FF:FF:FF:FF:FF.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:34:48 -08:00
David S. Miller fc1f209514 ixgbe: Fix some compiler warnings.
'pap' is never used in ixgbe_dcb_hw_config_82599()
and 'eec' in ixgbe_acquire_eeptom() is only used when
status == 0 but GCC has some trouble seeing that.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:32:39 -08:00
David S. Miller d517c4a1da typhoon: Need non-vmalloc memory to DMA firmware to the card.
request_firmware() gives vmalloc'd memory, which is not suitable
for pci_map_single() and friends.

Use a kmalloc()'d copy of the firmware for this DMA operation.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:24:32 -08:00
PJ Waskiewicz e8e26350f1 ixgbe: Add 82599 device id's, hook it up into the main driver.
With the hardware-specific code in place, add all supported device id's,
along with base driver changes to enable 82599 devices.  The devices
being enabled are:

8086:10f7: 82599EB 10 Gigabit KX4 Network Connection
8086:10fb: 82599EB 10 Gigabit Network Connection

The device 8086:10fb is a fully-pluggable SFP+ NIC.

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-03-01 00:24:36 -08:00
PJ Waskiewicz 235ea828a1 ixgbe: Add DCB for 82599, remove BCN support
This patch adds the DCB (Data Center Bridging) support for 82599 hardware.
This is similar to how the 82598 DCB code works.

This patch also removes the BCN (Backwards Congestion Notification) netlink
configuration code from the driver.  BCN was a pre-standard congestion
notification framework, and was not what the IEEE body decided upon for
standard congestion management. QCN (802.1Qau), Quantized Congestion
Notification is the accepted standard, which is not supported by 82599,
hence we remove the support altogether.

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-03-01 00:24:35 -08:00
PJ Waskiewicz 11afc1b1fd ixgbe: Add hardware specific initialization code for 82599 devices
This patch adds the hardware initialization code specific to 82599.  This
is similar to the 82598 hardware initialization code.  It also includes all
changes to the existing hardware init code to support 82599.

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-03-01 00:24:33 -08:00
David S. Miller 8010dc306b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-02-28 22:32:16 -08:00
David S. Miller 18963caaf5 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-02-28 15:36:58 -08:00
David S. Miller 98f8948f13 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2009-02-28 15:34:24 -08:00
Kalle Valo 2a07954b83 at76c50x-usb: use dev_name() instead of struct device.bus_id
Stephen Rothwell reported that bus_id from struct device will be removed, use
dev_name() instead.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:05 -05:00
Jouni Malinen 222d0b33b3 ath9k: Unlock sc->mutex on error path
An error path in ath9k_add_interface() did not unlock the sc->mutex and
could leave the driver in quite unresponsive state.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:04 -05:00
John Daiker 99da185a72 b43: checkpatch.pl cleanups
Keeping this one simple.

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

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

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:04 -05:00
Jason Andryuk ddcb5c78e8 iwl3945: re-add iwl_poll_direct_bit return value check
Re-add the iwl_poll_direct_bit return value assignment dropped in
"iwl3945: add apm ops".

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:04 -05:00
Jason Andryuk c2436980d0 iwl3945: initialize is_valid_rtc_data_addr function pointer
Initialize is_valid_rtc_data_addr function pointer for iwl3945 to
prevent a NULL pointer dereference in iwl_dump_nic_error_log.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:03 -05:00
Michael Buesch 53b23b88e4 b43: Remove bogus integer truncation warnings
"warning: large integer implicitly truncated to unsigned type"

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:03 -05:00
Bob Copeland 204b190cab ath9k: fix 802.11g conformance test limit typo
802.11g is in 2 ghz band, not 5 ghz.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:02 -05:00
David Kilroy 3faa19cd9d orinoco: prevent accessing memory outside the firmware image
Do this by indicating the end of the appropriate regions of memory.

Note that MAX_PDA_SIZE should only apply to the PDA block read from
flash/EEPROM, and has been erronously applied to the pdr elements.
Remove the macro, and use the actual PDA size passed down by the caller.

We also fix up some of the types used, marking as much as possible
const, and using void* for the end pointers.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:02 -05:00
David Kilroy 7e57811ac5 orinoco: validate firmware header
Check the Agere firmware headers for validity before attempting to
download it.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:02 -05:00
Kalle Valo ba3907e508 at76c50x-usb: add link to the TODO list
It's easier to have the TODO list in wiki, so add a link to the list.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:01 -05:00
Jason Andryuk 1cc198fee9 at76c50x-usb: additional disconnect fixes
Additional attempts to fix Oops on disconnect, that appear to be successful.
However, some may be extraneous.

The cancel_delayed_work call is probably the most necessary.  The
device_unplugged check may not be necessary.  del_timer_sync may not
be necessary either, but the Oops I was receiving was related to
timers.  Hence the addition.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:01 -05:00
Jason Andryuk 5a2137ddcc at76c50x-usb: clean up DMA on stack
Cleanup dma on stack issues:

- no DMA on stack
- cleanup unclear endianness issue

Corrected version of Oliver Neukum's original patch for at76_usb.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:01 -05:00
Jason Andryuk deda862e69 at76c50x-usb: fix oops on disconnect
flush_workqueue needs to be called instead of the generic one and the
associated functions need to be modified to prevent re-adding
themselves to the workqueue.

The rx_tasklet is also killed in the small (?) chance it is scheduled.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:00 -05:00
Luis R. Rodriguez 8454086967 ath9k: follow beacon hints on reg_notifier when world roaming
If we are roaming we allow to follow beacon hints.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:59 -05:00
Luis R. Rodriguez fe33eb3908 cfg80211: move all regulatory hints to workqueue
All regulatory hints (core, driver, userspace and 11d) are now processed in
a workqueue.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:57 -05:00
Michael Buesch 5f9724dd94 b43: Convert usage of b43_radio_maskset()
This patch converts code to use the new b43_radio_maskset() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask, set;
@@

-b43_radio_write16(dev, addr, (b43_radio_read16(dev, addr) & mask) | set);
+b43_radio_maskset(dev, addr, mask, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:53 -05:00
Michael Buesch 3718582a66 b43: Convert usage of b43_radio_mask()
This patch converts code to use the new b43_radio_mask() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask;
@@

-b43_radio_write16(dev, addr, b43_radio_read16(dev, addr) & mask);
+b43_radio_mask(dev, addr, mask);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:53 -05:00
Michael Buesch 4cf507696a b43: Convert usage of b43_radio_set()
This patch converts code to use the new b43_radio_set() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, set;
@@

-b43_radio_write16(dev, addr, b43_radio_read16(dev, addr) | set);
+b43_radio_set(dev, addr, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:53 -05:00
Michael Buesch 76e190cd4b b43: Convert usage of b43_phy_maskset()
This patch converts code to use the new b43_phy_maskset() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask, set;
@@

-b43_phy_write(dev, addr, (b43_phy_read(dev, addr) & mask) | set);
+b43_phy_maskset(dev, addr, mask, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:52 -05:00
Michael Buesch ac1ea3959f b43: Convert usage of b43_phy_mask()
This patch converts code to use the new b43_phy_mask() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask;
@@

-b43_phy_write(dev, addr, b43_phy_read(dev, addr) & mask);
+b43_phy_mask(dev, addr, mask);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:52 -05:00
Michael Buesch e59be0b529 b43: Convert usage of b43_phy_set()
This patch converts code to use the new b43_phy_set() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, set;
@@

-b43_phy_write(dev, addr, b43_phy_read(dev, addr) | set);
+b43_phy_set(dev, addr, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:52 -05:00
Dan Williams 9b02f419a7 libertas: use private SDIO workqueue to avoid scheduling latency
The libertas SDIO interface scheduled the packet worker, resulting in
unwanted latency for every data packet or command sent to the firmware.
Fix a bug on the SDIO probe error path too.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:51 -05:00
Michael Buesch 25d3ef59a2 b43: Implement sw scan callbacks
This implements the new sw scan callbacks in b43.
They are currently used to turn CFP update in the microcode off while scanning.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:51 -05:00
Michael Buesch 8821905cfb b43: Enable PCI slow clock workaround, if needed.
Enable the PCI slow clock workaround, if we're running a PCI core rev <= 10.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Michael Buesch 1cc8f476f1 b43: Honor the no-slow-clock boardflag
Do not turn off the crystal, if the boardflags tell us so.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Michael Buesch 969d15cfab b43: Fix radio host flags
This fixes initialization of some radio related hostflags.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Michael Buesch 2d071ca50e b43: Add slot count compiletime assertion
This adds a compiletime assertion for a recently introduced
assumption on the slot counts.
The tx header cache handling code assumes that the TX slot count
can be divided evenly by the number of TX slots per frame.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Sujith 20977d3e68 ath9k: Add appropriate ANI values for AP mode
The short calibration interval is different for AP
mode, fix this. Also, the timer should be rearmed in
the calibration routine during scanning.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith db0f41f556 ath9k: Fix PCI shutdown sequence
pci_release_region() has to be called after the device
has been disabled. Also remove a stray __init attribute.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith 8147f5de7a ath9k: Fix bug in EEPROM chainmask retrieval
Using wrong chainmasks would have an adverse impact on performance.
This patch fixes chainmask retrieval for non-PCIE cards.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith 9e71279084 ath9k: Add PER to RC debug statistics
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith d9ae96d94a ath9k: Remove multiple macro occurrences
OLC_FOR_AR9280_20_LATER is defined in multiple places,
move it to a common location.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:48 -05:00
Alina Friedrichsen f452a63d1e ath9k: Don't reset TSF after scanning automatically
Reset automatically the TSF on re-enabling beaconing after scanning
in IBSS mode causes several problems. For example a new created IBSS
network can't age before an other node has joined, because scans are
done automatically in that case. And several other strange bugs more...

The TSF reset is done manually in the higher level mac80211 code in
the cases were it's needed, so we don't need to do it here.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:48 -05:00
Michael Buesch bdceeb2dad b43: Optimize DMA buffers
In the old days we used one slot per frame. But when we changed that to 2,
we didn't raise the overall slot count. Which resulted in an effective
division of two to the number of slots.

Double the number of TX slots, so we have an effective hardware queue
of 128 frames per QoS queue.

Also optimize the TX header cache handling. We don't need a cached TX header
for slots that will never carry an actual header.
So we reduce the memory consumption of the cache by 50%.

So as a net result we end up with more or less the same memory usage before
and after this patch (except a few tiny meta structures), but have twice
the number of TX slots available.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:48 -05:00
Michael Buesch 8eccb53f1b b43: Fix DMA buffer size handling
This fixes hidden bugs in the size handling of the DMA buffers.
This sets the RX buffer size to the theoretical max packet size and
fixes passing of the size values to the device (must not subtract the header offset).

These bugs are hidden and don't actually trigger due to the magic +100
offset for the buffer size.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Michael Buesch ca2d559e1a b43: Move DMA stop sanity check
Move the DMA stop sanity check up a few lines, so it's actually
theoretically possible to trigger. (But it still shouldn't trigger, of course).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Vasanthakumar Thiagarajan dbaaa147d6 ath9k: Filter out beacons from other BSS in STA mode
Passing beacons received from other BSS to s/w in non-scanning
state is unnecessary in STA mode. This patch filters them out in
h/w.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Fenghua Yu 96891ceeda iwlwifi: dma mapping read and write changes
When iwlwifi runs on IOMMU, IOMMU generates a lot of PTE write faults
because PTE write bit is not set on some of PTE's. This is because iwlwifi
driver calls DMA mapping with PCI_DMA_TODEVICE which is read only in mapping
PTE. But iwlwifi device actually writes to the mapped page to update its contents.
This issue is not exposed in swiotlb. But VT-d hardware can capture this fault and
stop the fault transaction.

The iwl TX command contains a scratch field that is updated by uCode to
indicate retry counts. For 5000 series the patch is required also for
regular frames, but this patch does not differenciate.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Abhijeet Kolekar 7dc45f25d3 iwl3945: use SW rfkill from iwlwifi
Patch unifies use of SW rfkill between 3945 and agn driver.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:46 -05:00
Abhijeet Kolekar f17d08a657 iwl3945: use iwl_isr
iwl3945 uses iwl_isr and deletes duplicated iwl3945_isr.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:46 -05:00
Abhijeet Kolekar ed3b932e01 iwl3945: remove duplicate interrupt code
Patch removes duplicate code to enable and disable interrupt.
iwl3945 now uses iwlwifi's functions.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:46 -05:00
Abhijeet Kolekar 261b9c3398 iwl3945: use iwl_rx_reply_error notification
Patch removes duplicate code from iwl3945 and uses
iwl_rx_reply_error and spectrum notifications from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Abhijeet Kolekar 030f05eda6 iwl3945: use iwl rx handlers
Patch removes duplicate rx handlers(pm_sleep and pm_debug) from 3945 and
uses handlers from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Abhijeet Kolekar e9dde6f6ed iwl3945: use iwl_mac_hw_scan callback
3945 can use iwl_mac_hw_scan callback instead of
iwl3945_mac_hw_scan callback.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Abhijeet Kolekar cade0eb2c7 iwl3945: use iwl_rx_scan handlers
Patch makes use of iwl_rx_scan handler for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Jason Andryuk 2ce4f9d861 at76c50x-usb: convert at76_debug to an unsigned int
at76_debug should be an unsigned int as it used as a bit field.  In
fact, modprobe fails when trying to set at76_debug's high bit.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
Jason Andryuk 19e8bc7fa7 at76c50x-usb: update to latest mac80211 hw scan api
With the latest mac80211 stack, the driver needs to be updated for
cfg80211 scanning.  I based the changes off of modifications for
at76_usb found here:

http://johannes.sipsolutions.net/patches/old/all/2008-09-19-13:35/020-cfg80211-scan.patch

The trick was that max_signal also needs to be set to avoid a divide
by zero Oops.  I just guessed and used the value 100 for now.

kvalo: handpicked the change from two different patches

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
Kalle Valo 1264b95146 at76c50x-usb: add driver
This is a driver for usb devices based on at76c50x chipset. This is
a mac80211 port of the original at76_usb driver.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
John W. Linville 41d2f291d7 iwlagn: default to MAX_UCODE_BEACON_INTERVAL in iwl_adjust_beacon_interval
Default to MAX_UCODE_BEACON_INTERVAL if the output of
iwl_adjust_beacon_interval would otherwise be zero.  This prevents a
division by zero on my iwl5300-equipped Lenovo T400 with kernels that
include "mac80211: use cfg80211s BSS infrastructure".

This patch is a bit of a hack -- I'm not sure why iwl_setup_rxon_timing
is giving iwl_adjust_beacon_interval a zero input (which is the only way
it would output zero).  I would be happy to have a better fix.  But for
now, this makes my box boot...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
Roel Kluin c493b017e0 b43: Fix LO calibration txctl reg value
This patch expands the parenthesis in the txctl reg write
of the LO calibration to enforce precedence rules.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:43 -05:00
Roel Kluin e05eac3794 p54: misplaced parentheses
Only FIF_FCSFAIL is set due to parentheses

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:43 -05:00
Dan Williams c3d72b9681 ipw2x00: age scan results on resume
Scanned BSS entries are timestamped with jiffies, which doesn't
increment across suspend and hibernate.  On resume, every BSS in the
scan list looks like it was scanned within the last 10 seconds,
irregardless of how long the machine was actually asleep.  Age scan
results on resume with the time spent during sleep so userspace has a
clue how old they really are.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:43 -05:00
John W. Linville bc8263f1d8 airo: correct improper initialization of local variable
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:42 -05:00
Vasanthakumar Thiagarajan d5c232ff9b ath9k: Fix PTK/GTK handshake timeout
Some APs don't start BA negotiation with the client before it is done
with the key handshake in WPA/RSN. With those APs, key handshake times
out if EAPOL frames are sent after addba request. So defer the BA negotiation
until we are done with tx/rx of all EAPOL frames.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:41 -05:00
Ivo van Doorn abd2fdb4c6 rt2x00: Fix RF offset
The word_base is in bytes instead of word index number,
this means that when using it, it should be transformed into
a word index first.

Otherwise RF register reading will fail through debugfs since
we would start reading 4 words starting with word 4 (which is the last
valid word for RF).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:40 -05:00
Sujith fdbf7335ea ath9k: Use beacon interval directly
Setting up the CAB queue requires only the beacon interval,
remove the function ath_get_beaconconfig() which is redundant.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:39 -05:00
Sujith f7a99e46be ath9k: Remove ath_txq_depth and get the queue depth directly
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:39 -05:00
Sujith f34639d323 ath9k: Remove a few unused capability macros
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:39 -05:00
Sujith 171387ef0a ath9k: Initialize channel change time
Set channel change time to 5ms, this will improve scan results.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:38 -05:00
Sujith 83befbde83 ath9k: Fix antenna assignment bug in TX status processing
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:38 -05:00
Sujith 0caa7b14f3 ath9k: Fix HW wait timeout
RX and calibration have different timeout requirements.
This patch fixes it by changing the HW wait routine
to accept a timeout value.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:37 -05:00
Sujith 70768496db ath9k: Program the RTC registers correctly
This patch programs the RTC registers of AR9100 chipsets
correctly during chip reset.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:37 -05:00
Bob Copeland 362695e11a ath5k: compute rts/cts duration after computing full pktlen
RTS and CTS-to-self duration needs to go after ICV len is considered.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:37 -05:00
Bob Copeland acf3c1a592 ath5k: move beacon processing to a tasklet
We currently send beacons directly from the interrupt routine.  This
can hold up interrupt processing in beaconing modes and makes the
ISR somewhat more complex.  Move it to a tasklet like rx and tx.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:37 -05:00
Bob Copeland b5f03956c5 ath5k: use spin_lock_irqsave for beacon lock
ath5k_reset can be called from process context, which in turn can
call ath5k_beacon_config which takes the sc->block spinlock.  Since
it can also be taken in hard irq context, use spin_lock_irqsave
everywhere.  This fixes a potential deadlock in adhoc mode.

Changes-licensed-under: 3-Clause-BSD

Cc: stable@kernel.org
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:36 -05:00
Bob Copeland 0b6f582bd3 ath5k: don't mask off interrupt bits
Since interrupts are already masked by the hardware, there's no need to
discard interrupt bits in the ISR itself.  Also, in ath5k_beacon_config
we mask off a couple of bits without locking, so doing this mask in
software can lead to unhandled beacon timer and beacon miss interrupts.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:36 -05:00
Ivo van Doorn 144d9ad98e rt2x00: Add various new USB IDs for rt73usb
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:36 -05:00
Ivo van Doorn 53bc647a1a rt2x00: Remove check for rf word 0
The only way rf_write() can be called with word 0 is
when the user sends the wrong word index through debugfs.
However the values which are send through debugfs are
validated using the RF_BASE and RF_SIZE macro values,
the most logical solution is to increase RF_BASE with 4
and decrease RF_SIZE with 4 (RF_SIZE has always been
1 word too big)

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:35 -05:00
Ivo van Doorn 62750f421f rt2x00: uncomment get_tsf
The atomic requirement for get_tsf() has been removed
by mac80211. This means the USB drivers can add support
for the callback function again.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:35 -05:00
Reinette Chatre 80bc53931b iwlwifi: Fix and rework Kconfig file
Fixes:
- iwlwifi is an optional driver and should thus not default to 'y'.
- 3945 now depends on IWLCORE.

Rework:
- There is not a case when IWLCORE should not be selected. At the same time
  the driver does not use IWLWIFI or IWLCORE. We can just merge the usage of
  these two. With IWLWIFI being the driver name we proceed to use just it and
  replace instances of IWLCORE with it. The module name does not change
  and is still iwlcore.
- Both IWLAGN and IWL3945 are selecting FW_LOADER, we can thus just move
  this up to one select when IWLWIFI is selected.
- IWL5000 now supports Intel Wireless Wifi 100, 6000, and 6050 series.
- Now that 3945 depends on IWLWIFI we can also indicate its dependency on
  MAC80211_LEDS and LEDS_CLASS at this level.
- IWLAGN_LEDS is not used by driver - remove it.
- IWLAGN_SPECTRUM_MEASUREMENT actually depends on IWLWIFI as it forms part
  of iwlcore module. Move this config up in Kconfig to reflect that and also
  change name to IWLWIFI_SPECTRUM_MEASUREMENT.
- CONFIG_IWLWIFI_RFKILL is used by iwlagn as well as iwl3945, add text to
  description that indicates this.
- CONFIG_IWL3945_RFKILL does not exist - remove usage from driver.
- Add "iwlagn" to end of description of IWLAGN to help people understand
  what iwlagn means in rest of Kconfig text.
- Add "iwl3945" to end of description of IWL3945 to help people understand
  what iwlagn means in rest of Kconfig text.
- Change IWLWIFI_DEBUGFS description to indicate that only iwlagn supports
  it (for now).

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:35 -05:00
Reinette Chatre d21050c7be iwlwifi: use singlethread workqueue
Use one workqueue instead of one per CPU.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:34 -05:00
Wu, Fengguang daf518dee6 iwlwifi: report correct and detailed values about requested txpower
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:34 -05:00
Jiri Slaby 1788bcd155 ipw2200, fix ipw io functions
- some of them are defined as follows:
  #define ipw_write32	expr1; expr2
  and are called from loops or ifs without a compound statement, so
  they are broken. Fix it by putting them into do {} while (0) for
  writes and ({ }) for reads.
- also unify and cleanup them while at it -- convert them from
  macros to inline functions, so that we get some basic typechecking

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Cc: James Ketrenos <jketreno@linux.intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:34 -05:00