Commit Graph

14425 Commits (1197764e403d97231eb6da2b1e16f511a7fd3101)

Author SHA1 Message Date
Eric Dumazet 17d0cdfa8f net: ntohs() misuse
Some drivers incorrectly use ntohs() instead of htons()

A cleanup as htons() returns same result than ntohs(),
but better to use the proper one.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 17:23:24 -07:00
David S. Miller 3ee40c376a Merge branch 'linux-2.6.31.y' of git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax 2009-06-11 17:11:33 -07:00
Inaky Perez-Gonzalez 98eb0f53e2 wimax: fix gcc warnings in sh4 when calling BUG()
SH4's BUG() seems to confuse the compiler as it is considered to
return; thus, some functions would trigger usage of uninitialized
variables or non-void functions returning void.

Work around by initializing/returning.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 11:47:39 -07:00
Stephen Hemminger 130aa61a77 bonding: fix multiple module load problem
Some users still load bond module multiple times to create bonding
devices.  This accidentally was broken by a later patch about
the time sysfs was fixed.  According to Jay, it was broken
by:
   commit b8a9787edd
   Author: Jay Vosburgh <fubar@us.ibm.com>
   Date:   Fri Jun 13 18:12:04 2008 -0700

     bonding: Allow setting max_bonds to zero

Note: sysfs and procfs still produce WARN() messages when this is done
so the sysfs method is the recommended API.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 05:46:04 -07:00
Cindy H Kao 0bcfc5ef01 wimax/i2400m: use -EL3RST to indicate device reset instead of -ERESTARTSYS
When the i2400m device resets, the driver code will force some
functions to return a -ERESTARTSYS error code, which can is used by
the caller to determine which recovery actions to take.

However, in certain situations the only thing that can be done is to
bubble up said error code to user space, for handling.

However, -ERESTARSYS was a poor choice, as it is supposed to be used
by the kernel only.

As such, replace -ERESTARTSYS with -EL3RST; as well, in
i2400m_msg_to_dev(), when the device is in boot mode (following a
recent reset), return -EL3RST instead of -ENODEV (meaning the device
is in bootrom mode after a reset, not that the device was
disconnected, and thus, normal commands cannot be executed).

Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
2009-06-11 03:30:26 -07:00
Cindy H Kao 8b5b30ee7d wimax/i2400m: when bootstrap fails, reinitialize the bootrom
When a device reset happens during firmware load [in
i2400m_dev_bootstrap()], __i2400m_dev_start() will retry a number of
times. However, for those retries to be able to accomplish anything,
the device's bootrom has to be reinitialized.

Thus, on the retry path, pass the I2400M_MAC_REINIT to the firmware
load code.

Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
2009-06-11 03:30:26 -07:00
Inaky Perez-Gonzalez 16820c166d wimax/i2400m/sdio: Move all the RX code to a unified, IRQ based receive routine
The current SDIO code was working in polling mode for boot-mode
(firmware load) mode. This was causing issues on some hardware.

Moved all the RX code to use a unified IRQ handler that based on the
type of data the device is sending can discriminate and decide which
is the right destination.

As well, all the reads from the device are made to be at least the
block size (256); the driver will ignore the rest when not needed.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:25 -07:00
Inaky Perez-Gonzalez 6e053d6c79 wimax/i2400m: don't reset device when bootrom init retries are exceeded
When i2400m_bootrom_init() fails to put the device into a state of
being ready to accept firmware, the driver was currently trying to
reset it if it failed to do so. This is not too useful; as part of
trying to put the device in the right state a few resets have already
been tried.

At this point, things are probably fried out and an extra reset might
do more harm than good (for example causing reseting of other
functions in the same composite device).

So it is left up to the callers to determine the error path to take
(at the end this is always i2400m_setup(), who depending on how many
retries are left, might give up on the device).

From a fix by Cindy H. Kao.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:25 -07:00
Dirk Brandewie 1c0b2dd757 wimax/i2400m/sdio: Add device specific poke table.
Add a poke table for the SDIO device (as it is different than USB).

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2009-06-11 03:30:24 -07:00
Dirk Brandewie 7308a0c239 wimax/i2400m: move boot time poke table out of common driver
This change moves the table of "pokes" performed on the device at boot
time to the bus specific portion of the driver.

Different models of the i2400m device supported by this driver require
different poke tables, thus having a single table that works for all
is impossible. For that, the table is moved to the bus-specific
driver, who can decide which table to use based on the specifics of
the device and point the generic driver to it.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2009-06-11 03:30:24 -07:00
Inaky Perez-Gonzalez ecddfd5ed7 wimax/i2400m: Allow bus-specific driver to specify retry count
The code that sets up the i2400m (firmware load and general driver
setup after it) includes a couple of retry loops.

The SDIO device sometimes can get in more complicated corners than the
USB one (due to its interaction with other SDIO functions), that
require trying a few more times.

To solve that, without having a failing USB device taking longer to be
considered dead, allow the retry counts to be specified by the
bus-specific driver, which the general driver takes as a parameter.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:23 -07:00
Inaky Perez-Gonzalez b4013f91cd wimax/i2400m: if a device reboot happens during probe, handle it
When a device reboot happens when we are under probe, with init_mutex
taken, make sure we can recover. Have dev_reset_handle set boot mode
and i2400m_msg_to_dev() will see it and fail gracefully instead of
timing out.

Found and diagnosed by Cindy H. Kao.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:23 -07:00
Inaky Perez-Gonzalez 59063afa0a wimax/i2400m: fix oops when the TX FIFO fills up due to a missing check
When the TX FIFO filled up and i2400m_tx_new() failed to allocate a
new TX message header, a missing check for said condition was causing a
kernel oops when trying to dereference a NULL i2400m->tx_msg pointer.

Found and diagnosed by Cindy H. Kao.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:22 -07:00
Inaky Perez-Gonzalez b4bd07e3b1 wimax/i2400m: don't reset device on i2400m_dev_shutdown()
i2400m_dev_shutdown() tried to reset the device to put it in a known
state before shutting down.

But that turned out to be pointless. We reach this case in two paths:

 1 - when the device resets, to clean up state
 2 - when the driver is unloaded, for the same

however, in both cases it is pointless; in (1) the device is already
reset, why do it again? in (2) we can't -- the USB stack, for example,
doesn't allow communicating with the device when the driver is being
unbound and if the device is disconnected, the device is gone already.

So just remove it. Leave the function as a placeholder for future
cleanups that will be done from data allocated by the driver during
device operation.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:22 -07:00
Inaky Perez-Gonzalez 2971a5bac8 wimax/i2400m: fix panic due to missed corner cases on tail_room calculation
i2400m_tx_skip_tail() needs to handle the special case of being called
when the tail room that is left over in the FIFO is zero.

This happens when a TX message header was opened at the very end of
the FIFO (without payloads). The i2400m_tx_close() code already marked
said TX message (header) to be skipped and this function should be
doing nothing.

It is called anyway because it is part of a common "corner case" path
handling which takes care of more cases than only this one.

The tail room computation was also improved to take care of the case
when tx_in is at the end of the buffer boundary; tail_room has to be
modded (%) to the buffer size. To do that in a single well-documented
place, __i2400m_tx_tail_room() is introduced and used.

Treat i2400m->tx_in == 0 as a corner case and handle it accordingly.

Found and diagnosed by Cindy H. Kao.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:21 -07:00
Inaky Perez-Gonzalez c56affafdd wimax/i2400m: fix panic/warnings caused by missed check on empty TX message
In some situations, when a new TX message header is started, there
might be no space for data payloads. In this case the message is left
with zero payloads and the i2400m_tx_close() function has just to mark
it as "to skip". If it tries to go ahead it will overwrite things
because there is no space to add padding as defined by the
bus-specific layer. This can cause buffer overruns and in some stress
cases, panics.

Found and diagnosed by Cindy H. Kao.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:21 -07:00
Inaky Perez-Gonzalez 8593a1967f wimax/i2400m: rename misleading I2400M_PL_PAD to I2400M_PL_ALIGN
The constant is being use as an alignment factor, not as a padding
factor; made reading/reviewing the code quite confusing.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:20 -07:00
Dirk Brandewie 10b1de6b77 wimax/i2400m/sdio: Implement I2400M_RT_BUS reset type
This reset type causes the WiMAX function to be disabled and
re-enabled, which will force the WiMAX device to reset and enter boot
mode.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2009-06-11 03:30:20 -07:00
Dirk Brandewie ead6823991 wimax/i2400m: Change d_printf() level for secure boot messages
Changing debug level of print out to support validation engineers
getting the messages they need.

Signed-off-by:  <dirk.j.brandewie@intel.com>
2009-06-11 03:30:19 -07:00
Inaky Perez-Gonzalez 16eafba8de wimax/i2400m: i2400m_schedule_work() doesn't need i2400m->work_queue
By mistake, the BUG_ON() check was left in there and it will fail when
called if i2400m->work_queue is still not setup.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:19 -07:00
Inaky Perez-Gonzalez e9a6b45be5 wimax/i2400m: i2400m's work queue should be initialized before RX support
RX support is the only user of the work-queue, to process
reports/notifications from the device. Thus, it needs the work queue
to be initialized first.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:18 -07:00
Inaky Perez-Gonzalez fff1068559 wimax/i2400m: don't call netif_start_queue() in _tx_msg_sent()
Reported and fixed by Cindy H Kao.

When the device is stopped __i2400m_dev_stop() stops the network
queue.

However, when this is done in the middle of heavy network operation,
when the bus-specific subdriver is still wrapping up and it reports a
sent TX transaction with _tx_msg_sent() right after the device was
stopped, the queue was being started again, which was causing a stream
of oopsen and finally a panic.

In any case, said call has no place there. It's a left over from an
early implementation that was discarded later on.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:18 -07:00
Inaky Perez-Gonzalez fb10167478 wimax/i2400m: introduce module parameter to disable entering power save
The i2400m driver waits for the device to report being ready for
entering power save before asking it to do so. This module parameter
allows control of said operation; if disabled, the driver won't ask
the device to enter power save mode.

This is useful in setups where power saving is not so important or
when the overhead imposed by network reentry after power save is not
acceptable; by combining this with parameter 'idle_mode_disabled', the
driver will always maintain both the connection and the device in
active state.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-06-11 03:30:17 -07:00
Figo.zhang f2333a014c netxen: No need to check vfree() pointer.
vfree() does its own 'NULL' check, so no need for check before
calling it.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:49:10 -07:00
Sathya Perla 934037bc2e be2net: Fix be_tx_q_clean() being called on freed queues
In the tx queue destroy path, be_tx_q_clean() is currently called after the tx queues are freed; it must be called before.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:19 -07:00
Sathya Perla a7a0ef31de be2net: Fix early reset of rx-completion
be_rx_compl_get() must not reset(via the valid word) the rx_compl as the rx_compl is not processed yet; it must be reset after it is processed.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:18 -07:00
Sathya Perla 76fbb42919 be2net: Fix rx stats updation in non-lro path
rx stats are not getting updated when an rx_compl with only one frag is rcvd in non-lro path.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:16 -07:00
Sathya Perla 6811086899 be2net: fix netdev stats rx_errors and rx_dropped
Fix netdev stat rx_errors to cover length related errors and checksum errors and rx_dropped to the pkts dropped due to lack of buffers

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:16 -07:00
Sathya Perla b305be78a0 be2net: Use cancel_delayed_work_sync instead of cancel_delayed_work()
Use cancel_delayed_work_sycn instead of cancel_delayed_work() to reliably kill be_worker() as it rearms itself.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:15 -07:00
Figo.zhang c0feed87fe tehuti: No need check vfree() pointer.
vfree() does its own 'NULL' check, so no need for check before
calling it.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:14 -07:00
Figo.zhang 50d36a93dc vxge: No need for check vfree() pointer.
vfree() does its own 'NULL' check, so no need for check before
calling it.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:14 -07:00
Divy Le Ray 74b793e1ef cxgb3: remove __GFP_NOFAIL usage
Pre-allocate a skb at init time to be used for control messages to the HW
if skb allocation fails.

Tolerate failures to send messages initializing some memories at the cost of
parity error detection for these memories.
Retry sending connection id release messages if both alloc_skb(GFP_ATOMIC)
and alloc_skb(GFP_KERNEL) fail.
Do not bring the interface up if messages binding queue set to port fail to
be sent.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:13 -07:00
Eric Dumazet 87433bfc75 r8169: use dev_kfree_skb() instead of dev_kfree_skb_irq()
rtl8169_tx_interrupt() is used from NAPI context, it can
directly free skbs. dev_kfree_skb_irq() is a leftover from
pre-NAPI times of this driver.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:12 -07:00
Ben Hutchings e762cd70ef sfc: Expose 100/1000BASE-T MDI-X status via ethtool
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:11 -07:00
Ben Hutchings d005ba6cc8 mdio: Expose 10GBASE-T MDI-X status via ethtool
This is available in a standard MDIO register in 10GBASE-T PHYs.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:47:10 -07:00
Ron Mercer b8facca01b qlge: Allow RX buf rings to be > than 4096 bytes.
RX buffer rings can be comprised of non-contiguous fixed
size chunks of memory. The ring is given to the hardware
as a pointer to a location that stores the location of
the queue.  If the queue is greater than 4096 bytes then
the hardware gets a list of said pointers.
This patch addes the necessary logic to generate the list if
the queue size exceeds 4096.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:37:05 -07:00
Ron Mercer 88c55e3cbd qlge: Relax alignment on TX harware queue.
The alignment was on size of queue boundary, but the hardware
only requires 4-byte alignment.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:37:04 -07:00
Roel Kluin 0ed586d075 atl1c: WAKE_MCAST tested twice, not WAKE_UCAST
The WAKE_MCAST bit is tested twice, the first should be WAKE_UCAST.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Jie Yang <jie.yang@atheros.com>
Cc: Jay Cliburn <jcliburn@gmail.com>
Cc: Chris Snook <csnook@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:32:41 -07:00
Risto Suominen b77e522884 de2104x: support for systems lacking cache coherence
Add a configurable Descriptor Skip Length for systems that lack cache
coherence.

(akpm: I think this should be done as a module parameter, not a
compile-tinme option)

Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
Cc: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:32:41 -07:00
sg.tweak@gmail.com ef5c89967d drivers/net/macvlan.c: fix cloning of tagged VLAN interfaces
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13348

akpm: the reporter disappeared, so I typed it in again.

It is not possible to make clone of tagged VLAN interface to be used as
mac-based vlan interfave.

How reproducible:
Use any 802.1q tagged vlan interface, e.g. eth2.700 and clone it:

  ip link add link eth2.700 address 00:04:75:cb:38:09 macvlan0 type macvlan
  ip link set dev macvlan0 up
  ip addr add 10.195.1.1/24 dev macvlan0

So far, so good. Now try to ping anything via macvlan0:

  ping 10.195.1.2

Actual results:
For every attempted packet tx kernel writes to console:

------------[ cut here ]------------
WARNING: at net/8021q/vlan_dev.c:254 vlan_dev_hard_header+0x36/0x126 [8021q]()
Hardware name: M22ES
Modules linked in: arptable_filter arp_tables bridge veth macvlan arc4 ecb
ppp_mppe ppp_async crc_ccitt ppp_generic slhc autofs4 sunrpc 8021q garp stp
ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp
x_tables dm_mirror dm_region_hash dm_log dm_multipath dm_mod sbs sbshc lp
floppy snd_intel8x0 joydev snd_seq_dummy snd_intel8x0m snd_ac97_codec
ide_cd_mod ac97_bus snd_seq_oss cdrom snd_seq_midi_event serio_raw snd_seq
snd_seq_device snd_pcm_oss snd_mixer_oss parport_pc snd_pcm parport battery
8139cp snd_timer i2c_sis96x ac button snd rtc_cmos rtc_core 8139too soundcore
rtc_lib mii i2c_core pcspkr snd_page_alloc pata_sis libata sd_mod scsi_mod ext3
jbd ehci_hcd ohci_hcd uhci_hcd [last unloaded: ip_tables]
Pid: 0, comm: swapper Tainted: G        W  2.6.29.3 #1
Call Trace:
 [<c0425f48>] warn_slowpath+0x60/0x9f
 [<c0425f6f>] warn_slowpath+0x87/0x9f
 [<dffb850d>] vlan_dev_hard_header+0x0/0x126 [8021q]
 [<dffb8543>] vlan_dev_hard_header+0x36/0x126 [8021q]
 [<dffb850d>] vlan_dev_hard_header+0x0/0x126 [8021q]
 [<df83155d>] macvlan_hard_header+0x3c/0x47 [macvlan]
 [<df831521>] macvlan_hard_header+0x0/0x47 [macvlan]
 [<c062bf3f>] arp_create+0xef/0x1ff
 [<c062c08c>] arp_send+0x3d/0x54
 [<c062c916>] arp_solicit+0x16c/0x177
 [<c05fadd2>] neigh_timer_handler+0x227/0x269
 [<c05fabab>] neigh_timer_handler+0x0/0x269
 [<c042ce4d>] run_timer_softirq+0xf0/0x141
 [<c0429e5a>] __do_softirq+0x76/0xf8
 [<c0429de4>] __do_softirq+0x0/0xf8
 <IRQ>  [<c044fb67>] handle_level_irq+0x0/0xad
 [<c0429db7>] irq_exit+0x35/0x62
 [<c04046bb>] do_IRQ+0xdf/0xf4
 [<c04035a7>] common_interrupt+0x27/0x2c
 [<c04079c5>] default_idle+0x2a/0x3d
 [<c0401bb6>] cpu_idle+0x57/0x70

Macvlan driver always uses standard ethernet header length for all types
of interface to which it is linked.  This patch fixes this problem.

Reported-by: <sg.tweak@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:32:39 -07:00
Andreas Mohr 720017623a e100: add non-MII PHY support
Restore support for cards with MII-lacking PHYs as compared to removed
pre-2.6.29 eepro100 driver: use full low-level MII I/O access abstraction
by providing clean PHY-specific mdio_ctrl() functions for either standard
MII-compliant cards, slightly special ones or non-MII PHY ones.

We now have another netdev_priv member for mdio_ctrl(), thus we have some
array indirection, but we save some additional opcodes for specific
phy_82552_v handling in the common case.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: Andreas Mohr <andi@lisas.de>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Bruce Allan <bruce.w.allan@intel.com>
Cc: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Cc: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:32:39 -07:00
David S. Miller 84503ddd65 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-06-10 23:41:43 -07:00
Bob Copeland a6ae0716e5 ath5k: minor rfkill cleanup
Always enable rfkill since the ifdefs in the code is not really worth
the Kconfig option.  Also fix a few code style things, and remove the
usage of the ah_gpio[] array so we can remove it later.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:28:39 -04:00
Vasanthakumar Thiagarajan 5eae6592e9 ath9k: Fix tx stuck when connected to aggr disabled HT AP
This patch along with my previous patch in mac80211 "Fix the
way ADDBA count..", fixes hang in tx when connected to an HT
AP which rejects/times out on addba req.

AGGR_ADDBA_PROGRESS should be cleared in aggr state when addba
negotiation is terminated due to either addba response is timed out
or addba is denied by the AP. With out clearing this bit,
all frames are queued onto s/w queue for getting tx'd as aggr and
will never be scheduled onto hw queue.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:28:38 -04:00
Michael Buesch 403a3a1361 b43: Add fw capabilities
Add automagic feature flags, so the firmware can tell the driver
about supported features and the driver can switch features on/off as
needed.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:28:37 -04:00
Johannes Berg f41f3f373d b43/legacy: port to cfg80211 rfkill
This ports the b43/legacy rfkill code to the new API offered
by cfg80211 and thus removes a lot of useless stuff.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:54 -04:00
Tobias Doerffel e6a3b61681 ath5k: added cfg80211 based rfkill support
This patch introduces initial rfkill support for the ath5k driver
based on rfkill support in the cfg80211 framework.
All rfkill related code is separated into newly created rfkill.c.

Changes to existing code are minimal:

* added a new data structure ath5k_rfkill to the ath5k_softc structure
* inserted calls to HW rfkill init/deinit routines
* ath5k_intr() has been extended to handle AR5K_INT_GPIO interrupts

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:54 -04:00
Christian Lamparter 9b9c5aaeed ar9170: xmit code revamp
This patch is a back-port from aggregation testing code.

In the past, we didn't limit the amount of active tx urbs.
However, ar9170 only has a limited buffer reserved for
pending data frames.

This wasn't much of a problem with the slower 802.11b/g.
We simply stopped the full queue and moved on to something different
in the mean time. But - as you guessed it -  this simple approach
stands in way for a decent aggregation implementation.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:54 -04:00
Johannes Berg 2543a0c4c0 ar9170: interpret firmware debug commands
This adds new commands that the original firmware will not send
but we can use them to debug firmware.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:54 -04:00
Matthieu CASTET b52a033c2c b43: Fix possible unaligned u32 access
Fix possible unaligned u32 access in b43_generate_plcp_hdr().
Unaligned data is read/write with a u32 pointer instead of using the
packed structure. Some versions of gcc ignore the "packed" attribute, if the
structure element is accessed through a local pointer.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:53 -04:00
Sebastian Andrzej Siewior 4d1d49858c net/libertas: remove GPIO-CS handling in SPI interface code
This removes the dependency on GPIO framework and lets the SPI host
driver handle the chip select. The SPI host driver is required to keep
the CS active for the entire message unless cs_change says otherwise.
This patch collects the two/three single SPI transfers into a message.
Also the delay in read path in case use_dummy_writes are not used is
moved into the SPI host driver.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

but it's doing:

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

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

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

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

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

Either way this piece of code is buggy.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This patch corrects this.

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:26 -07:00
Peter P Waskiewicz Jr 794caeb259 ixgbe: Add FW detection and warning for 82599 SFP+ adapters
82599 has a FW running that helps manage the internal SFI PHY.  There are
also a number of pre-production samples of these SFI-based devices in the
field.  This patch adds a check to look for the firmware running on all
SFP+ based adapters, and displays a warning to the system log if a
pre-production adapter is identified.  The driver will continue loading
though, with no functional degradation.

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

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:26 -07:00
Jesse Brandeburg ae540af185 ixgbe: Re-adjust ring layouts to have better cacheline efficiency
This patch rearranges the ixgbe_ring struct to make better use of
cacheline efficiency.

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

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

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:24 -07:00
Peter P Waskiewicz Jr bfde493ee2 ixgbe: Add hardware defines for Flow Director for 82599
Flow Director is a Rx filter mechanism designed to match Rx flows back to
the same CPU that the flow's Tx occurred from.  This patch adds the first
piece, the defines for the hardware registers, to enable this feature in
82599 hardware.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:23 -07:00
Peter P Waskiewicz Jr df647b5ca3 ixgbe: Add a second feature flags variable, move HW RSC capability there
This adds a second feature flag variable to use for future feature
expansion.  Add HW RSC to this new feature flags variable.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:22 -07:00
Alexander Duyck 91281fd36c ixgbe: move tx processing into NAPI context
This patch moves the tx cleanup processing out of the MSI-X interrupt
processing and gives it it's own napi routine.  This allows the driver to
process TX cleanup in a polling context instead of in an interrupt context
which prevents TX from starving RX.

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

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

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

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

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

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

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:16 -07:00
Peter P Waskiewicz Jr 1479ad4fbf ixgbe: Change the 82599 PHY DSP restart logic
When reprogramming the 82599 analog PHY to either SFI optical or Direct
Attach Twinax, we need to restart the DSP in the PHY.  The current method
can cause contention with our FW which is managing PHY state, and will
cause unexpected link flaps.  This patch fixes the DSP restart by issuing
an AN_RESTART in the MAC, which will properly propagate the DSP restart to
the PHY.  This ensures we don't collide with the FW.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:16 -07:00
Peter P Waskiewicz Jr bdf0a550c8 ixgbe: Enable ACPI WoL capabilities for 82599
The 82599 KX4 device defaults to legacy power management, or APME.  This
puts the device into ACPI mode, which allows more robust WoL setups to
work properly.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-07 05:20:15 -07:00
David S. Miller b1bc81a0ef Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-06-07 04:24:21 -07:00
Ayaz Abdulla 3df81c4e95 forcedeth: addition of new mcp89 device id
This patch adds a new device id for mcp89 chipset.

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

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

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

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

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

and a useless device state.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

 * rfkill-input pointlessly is a separate module

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

md5sum: 34feec4ec0eae3bb92c7c1ea2dfb4530
sha1sum: 6e5250498b815c2940d97242de31e054ae44e079

Its license:

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

This is a new firmware, tested with WNDA3100.

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

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:05:11 -04:00