11 years agonet: add IEEE 802.15.4 socket family implementation
Sergey Lapin [Mon, 8 Jun 2009 12:18:48 +0000]
net: add IEEE 802.15.4 socket family implementation

Add support for communication over IEEE 802.15.4 networks. This implementation
is neither certified nor complete, but aims to that goal. This commit contains
only the socket interface for communication over IEEE 802.15.4 networks.
One can either send RAW datagrams or use SOCK_DGRAM to encapsulate data
inside normal IEEE 802.15.4 packets.

Configuration interface, drivers and software MAC 802.15.4 implementation will
follow.

Initial implementation was done by Maxim Gorbachyov, Maxim Osipov and Pavel
Smolensky as a research project at Siemens AG. Later the stack was heavily
reworked to better suit the linux networking model, and is now maitained
as an open project partially sponsored by Siemens.

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>

11 years agoAdd constants for the ieee 802.15.4 stack
Sergey Lapin [Mon, 8 Jun 2009 12:18:47 +0000]
Add constants for the ieee 802.15.4 stack

IEEE 802.15.4 stack requires several constants to be defined/adjusted.

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>

11 years agopkt_sched: Change PSCHED_SHIFT from 10 to 6
Jarek Poplawski [Mon, 8 Jun 2009 22:05:13 +0000]
pkt_sched: Change PSCHED_SHIFT from 10 to 6

Change PSCHED_SHIFT from 10 to 6 to increase schedulers time
resolution. This will increase 16x a number of (internal) ticks per
nanosecond, and is needed to improve accuracy of schedulers based on
rate tables, like HTB, TBF or CBQ, with rates above 100Mbit. It is
assumed this change is safe for 32bit accounting of time diffs up
to 2 minutes, which should be enough for common use (extremely low
rate values may overflow, so get inaccurate instead). To make full
use of this change an updated iproute2 will be needed. (But using
older iproute2 should be safe too.)

This change breaks ticks - microseconds similarity, so some minor code
fixes might be needed. It is also planned to change naming adequately
eg. to PSCHED_TICKS2NS() etc. in the near future.

Reported-by: Antonio Almeida <vexwek@gmail.com>
Tested-by: Antonio Almeida <vexwek@gmail.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agopkt_sched: Use PSCHED_SHIFT in PSCHED time conversion
Jarek Poplawski [Mon, 8 Jun 2009 22:05:00 +0000]
pkt_sched: Use PSCHED_SHIFT in PSCHED time conversion

Use PSCHED_SHIFT constant instead of '10' in PSCHED_US2NS() and
PSCHED_NS2US() macros to enable changing this value later.

Additionally use PSCHED_SHIFT in sch_hfsc SM_SHIFT and ISM_SHIFT
definitions. This part of the patch is based on feedback from
Patrick McHardy <kaber@trash.net>.

Reported-by: Antonio Almeida <vexwek@gmail.com>
Tested-by: Antonio Almeida <vexwek@gmail.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agonet: dev_addr_init() fix
Eric Dumazet [Mon, 8 Jun 2009 03:49:24 +0000]
net: dev_addr_init() fix

commit f001fde5eadd915f4858d22ed70d7040f48767cf
(net: introduce a list of device addresses dev_addr_list (v6))
added one regression Vegard Nossum found in its testings.

With kmemcheck help, Vegard found some uninitialized memory
was read and reported to user, potentialy leaking kernel data.
( thread can be found on http://lkml.org/lkml/2009/5/30/177 )

dev_addr_init() incorrectly uses sizeof() operator. We were
initializing one byte instead of MAX_ADDR_LEN bytes.

Reported-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agobe2net: Remove unnecessary frag list traversing.
David S. Miller [Tue, 9 Jun 2009 08:01:31 +0000]
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>

11 years agoxfrm: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:22:47 +0000]
xfrm: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agosctp: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:22:35 +0000]
sctp: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agophonet: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:21:58 +0000]
phonet: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agonetfilter: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:23:58 +0000]
netfilter: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agoipv6: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:20:05 +0000]
ipv6: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agoipv4: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:19:37 +0000]
ipv4: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agonet/core/user_dma.c: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:19:10 +0000]
net/core/user_dma.c: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agonet/core/skbuff.c: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:18:59 +0000]
net/core/skbuff.c: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agonet/core/dev.c: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:18:51 +0000]
net/core/dev.c: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agodatagram: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:18:15 +0000]
datagram: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agoappletalk: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:17:44 +0000]
appletalk: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agonetdevice.h: Use frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:17:27 +0000]
netdevice.h: Use frag list abstraction interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agoskbuff: Add frag list abstraction interfaces.
David S. Miller [Tue, 9 Jun 2009 07:17:13 +0000]
skbuff: Add frag list abstraction interfaces.

With the hope that these can be used to eliminate direct
references to the frag list implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agobluetooth: Kill skb_frags_no(), unused.
David S. Miller [Mon, 8 Jun 2009 23:16:56 +0000]
bluetooth: Kill skb_frags_no(), unused.

Furthermore, it twiddles with the details of SKB list handling
directly, which we're trying to eliminate.

Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agodeclance: Restore tx descriptor ring locking
Maciej W. Rozycki [Mon, 8 Jun 2009 09:42:35 +0000]
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>

11 years agoisdn: extend INTERFACE.CAPI document
Tilman Schmidt [Sun, 7 Jun 2009 09:09:24 +0000]
isdn: extend INTERFACE.CAPI document

Clarify calling context and return codes of callback methods, and
add a description of the _cmsg structure and helper functions.

Impact: documentation
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agoisdn: prevent NULL ptr Oops in capi_cmsg2str()
Tilman Schmidt [Sun, 7 Jun 2009 09:09:24 +0000]
isdn: prevent NULL ptr Oops in capi_cmsg2str()

The dereferencing of the private pointer cmsg->m in capi_cmsg2str() may
cause an Oops in case of an error, which is particularly inconvenient
as that function is typically used to format an error message. Add a
NULL pointer check to avoid this.

Impact: error handling improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agoisdn: kerneldoc for capiutil.c
Tilman Schmidt [Sun, 7 Jun 2009 09:09:23 +0000]
isdn: kerneldoc for capiutil.c

Add kerneldoc comments for the exported funtions in capiutil.c.

Impact: documentation
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agoisdn: rename capi_ctr_reseted() to capi_ctr_down()
Tilman Schmidt [Sun, 7 Jun 2009 09:09:23 +0000]
isdn: rename capi_ctr_reseted() to capi_ctr_down()

Change the name of the Kernel CAPI exported function capi_ctr_reseted()
to something representing its purpose better.

Impact: renaming, no functional change
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agotun: Fix unregister race
Eric W. Biederman [Mon, 8 Jun 2009 07:44:31 +0000]
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>

11 years agoe100: Fix napi_enable BUG_ON when recovering from EEH error
Andre Detsch [Mon, 8 Jun 2009 07:42:30 +0000]
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>

11 years agonet pkgen.c:fix no need for check
Figo.zhang [Mon, 8 Jun 2009 07:40:35 +0000]
net pkgen.c:fix no need for check

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>

11 years agomlx4: FIX error flow when initializing EQ table
Yevgeny Petrilin [Mon, 8 Jun 2009 07:39:58 +0000]
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>

11 years agotun: Fix copy/paste error in tun_get_user
Sridhar Samudrala [Mon, 8 Jun 2009 07:27:28 +0000]
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>

11 years agonet: Fix memcpy_toiovecend() to use the right offset
Sridhar Samudrala [Fri, 5 Jun 2009 09:35:44 +0000]
net: Fix memcpy_toiovecend() to use the right offset

Increment the iovec base by the offset passed in for the initial
copy_to_user() in memcpy_to_iovecend().

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>

11 years agonet: Fix skb_copy_datagram_from_iovec() to pass the right offset
Sridhar Samudrala [Fri, 5 Jun 2009 09:35:40 +0000]
net: Fix skb_copy_datagram_from_iovec() to pass the right offset

I am working on enabling UFO between KVM guests using virtio-net and i have
some patches that i got working with 2.6.30-rc8. When i wanted to try them
with net-next-2.6, i noticed that virtio-net is not working with that tree.

After some debugging, it turned out to be several bugs in the recent patches
to fix aio with tun driver, specifically the following 2 commits.

http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=0a1ec07a67bd8b0033dace237249654d015efa21
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=6f26c9a7555e5bcca3560919db9b852015077dae

Fix the call to memcpy_from_iovecend() in skb_copy_datagram_from_iovec
to pass the right iovec offset.

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>

11 years agonet: skb_shared_info optimization
Eric Dumazet [Fri, 5 Jun 2009 04:04:16 +0000]
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>

11 years agonet: num_dma_maps is not used
Eric Dumazet [Fri, 5 Jun 2009 04:03:35 +0000]
net: num_dma_maps is not used

Get rid of num_dma_maps in struct skb_shared_info, as it seems unused.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agos2io: Remove private boolean definitions
Tobias Klauser [Thu, 4 Jun 2009 23:07:59 +0000]
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>

11 years agohso: convert dev_alloc_skb() to netdev_alloc_skb()
Paulius Zaleckas [Thu, 4 Jun 2009 05:50:29 +0000]
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>

11 years agonetdev: Added KS8842 driver
Richard R\232öjfors [Thu, 4 Jun 2009 03:35:55 +0000]
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>

11 years agonet: Ensure partial checksum offset is inside the skb head
Herbert Xu [Thu, 4 Jun 2009 01:22:01 +0000]
net: Ensure partial checksum offset is inside the skb head

On Thu, Jun 04, 2009 at 09:06:00PM +1000, Herbert Xu wrote:
>
> 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>

With this applied we can strengthen the partial checksum check:

In skb_partial_csum_set we check to see if the checksum offset
is within the packet.  However, we really should check that it
is within the skb head as that's the only bit we can modify
without copying.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agotun: Optimise handling of bogus gso->hdr_len
Herbert Xu [Mon, 8 Jun 2009 07:20:01 +0000]
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>

11 years agovirtio_net: Set correct gso->hdr_len
Herbert Xu [Thu, 4 Jun 2009 00:59:18 +0000]
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>

11 years agosis190: fix gigabit negotiation
Riccardo Ghetta [Thu, 4 Jun 2009 09:05:20 +0000]
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>

11 years agosis190: add new phy found on asus F5Sr laptop
Riccardo Ghetta [Thu, 4 Jun 2009 09:05:07 +0000]
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>

11 years agosis190: better message on unknown PHY
Riccardo Ghetta [Thu, 4 Jun 2009 09:04:55 +0000]
sis190: better message on unknown PHY

Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agosis190: fix for x86_64 (bug 11509)
Riccardo Ghetta [Sun, 7 Jun 2009 19:47:58 +0000]
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>

11 years agoqlge: Fix timeout on firmware mailbox commands.
Ron Mercer [Sun, 7 Jun 2009 13:58:29 +0000]
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>

11 years agoqlge: Fix timeout on indexed register wait.
Ron Mercer [Sun, 7 Jun 2009 13:58:28 +0000]
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>

11 years agoqlge: Fix bug in MTU setting process.
Ron Mercer [Sun, 7 Jun 2009 13:58:27 +0000]
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>

11 years agoqlge: Fix bug in firmware event handler.
Ron Mercer [Sun, 7 Jun 2009 13:58:26 +0000]
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>

11 years agoqlge: Fix firmware event handler loop.
Ron Mercer [Sun, 7 Jun 2009 13:58:25 +0000]
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>

11 years agonetdev: smsc911x: add missing __devexit_p() usage
Mike Frysinger [Fri, 5 Jun 2009 14:37:20 +0000]
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>

11 years agonetdev: smsc911x: allow building on Blackfin systems
Mike Frysinger [Fri, 5 Jun 2009 14:37:19 +0000]
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>

11 years agoixgbe: Increase the driver version number
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:02:44 +0000]
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>

11 years agoixgbe: Add FW detection and warning for 82599 SFP+ adapters
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:02:24 +0000]
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>

11 years agoixgbe: Re-adjust ring layouts to have better cacheline efficiency
Jesse Brandeburg [Thu, 4 Jun 2009 16:02:04 +0000]
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>

11 years agoixgbe: Enable Flow Director hashing in 82599
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:01:43 +0000]
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>

11 years agoixgbe: Add Flow Director init and modify functions for 82599
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:01:25 +0000]
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>

11 years agoixgbe: Add hardware defines for Flow Director for 82599
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:01:06 +0000]
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>

11 years agoixgbe: Add a second feature flags variable, move HW RSC capability there
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:00:47 +0000]
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>

11 years agoixgbe: move tx processing into NAPI context
Alexander Duyck [Thu, 4 Jun 2009 16:00:27 +0000]
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>

11 years agoixgbe: move v_idx into q_vector and use as index only
Alexander Duyck [Thu, 4 Jun 2009 16:00:09 +0000]
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>

11 years agoixgbe: use rx_buffer_info->dma instead of nr_frags to determine skb unmap
Alexander Duyck [Thu, 4 Jun 2009 15:59:49 +0000]
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>

11 years agoixgbe: ethtool support to change advertised link modes of 82599 adapters
Mallikarjuna R Chilakala [Thu, 4 Jun 2009 11:11:34 +0000]
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>

11 years agoixgbe: Fix 82599 adapter link flickering issues
Mallikarjuna R Chilakala [Thu, 4 Jun 2009 11:11:13 +0000]
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>

11 years agoixgbe: Harden the 82599 multispeed fiber autotry mechanism
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 11:10:53 +0000]
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>

11 years agoixgbe: Add ethtool offline test support
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 11:10:35 +0000]
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>

11 years agoixgbe: Change the 82599 PHY DSP restart logic
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 11:10:17 +0000]
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>

11 years agoixgbe: Enable ACPI WoL capabilities for 82599
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 11:09:58 +0000]
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>

11 years agocfg80211: errno.h: define ERFKILL
Alexander Beregalov [Sun, 7 Jun 2009 12:01:00 +0000]
cfg80211: errno.h: define ERFKILL

Commit 1f87f7d3 (cfg80211: add rfkill support) added ERFKILL
to asm-generic/errno.h, but alpha, mips, parisc and sparc use
their own numbering scheme and do not include asm-generic/errno.h.
We need to add definition of ERFKILL for them.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Sun, 7 Jun 2009 11:24:21 +0000]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

11 years agoremoval of forcedeth device ids
Ayaz Abdulla [Sun, 7 Jun 2009 10:54:37 +0000]
removal of forcedeth device ids

This patch removes the forcedeth device ids from pci_ids.h

The forcedeth driver uses the device id constants directly in its source
file.

[ Need to keep PCI_DEVICE_ID_NVIDIA_NVENET_15 in order to keep
  drivers/pci/quirks.c building -DaveM ]

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agoforcedeth: addition of new mcp89 device id
Ayaz Abdulla [Wed, 3 Jun 2009 15:05:35 +0000]
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>

11 years agoforcedeth: remove device id macros
Ayaz Abdulla [Wed, 3 Jun 2009 15:05:17 +0000]
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>

11 years agowimax: depend on rfkill properly
Johannes Berg [Thu, 4 Jun 2009 06:22:25 +0000]
wimax: depend on rfkill properly

My mistake, I should have added that when cleaning up
rfkill and changing wimax.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

11 years agoar9170: remove deprecated code
Christian Lamparter [Wed, 3 Jun 2009 20:24:48 +0000]
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>

11 years agoiwlwifi: fix comment describing disable_11n
Reinette Chatre [Wed, 3 Jun 2009 18:44:12 +0000]
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>

11 years agoiwlwifi: add value and range define for link quality command
Wey-Yi Guy [Wed, 3 Jun 2009 18:44:11 +0000]
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>

11 years agoiwlagn: delay ict interrupt.
Mohamed Abbas [Wed, 3 Jun 2009 18:44:10 +0000]
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>

11 years agoiwl3945/iwlwifi: fix led bug when SW rfkill
Abhijeet Kolekar [Wed, 3 Jun 2009 18:44:09 +0000]
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>

11 years agoiwl3945: port allow skb allocation in tasklet patch
Abhijeet Kolekar [Wed, 3 Jun 2009 18:44:08 +0000]
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>

11 years agoiwlwifi: unify station management
Tomas Winkler [Wed, 3 Jun 2009 18:44:07 +0000]
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>

11 years agoTI DaVinci EMAC: Remove print_mac, DECLARE_MAC_BUF
Chaithrika U S [Thu, 4 Jun 2009 04:54:29 +0000]
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>

11 years agotun: Only wake up writers
Herbert Xu [Thu, 4 Jun 2009 04:45:55 +0000]
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>

11 years agoMerge branch 'net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vxy/lksctp-dev
David S. Miller [Thu, 4 Jun 2009 04:43:52 +0000]
Merge branch 'net-next' of git://git./linux/kernel/git/vxy/lksctp-dev

11 years agoipv4: remove ip_mc_drop_socket() declaration from af_inet.c.
Rami Rosen [Thu, 4 Jun 2009 04:43:26 +0000]
ipv4: remove ip_mc_drop_socket() declaration from af_inet.c.

ip_mc_drop_socket() method is declared in linux/igmp.h, which
is included anyhow in af_inet.c. So there is no need for this declaration.
This patch removes it from af_inet.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agogso: Stop fraglists from escaping
Herbert Xu [Thu, 4 Jun 2009 04:20:51 +0000]
gso: Stop fraglists from escaping

As it stands skb fraglists can get past the check in dev_queue_xmit
if the skb is marked as GSO.  In particular, if the packet doesn't
have the proper checksums for GSO, but can otherwise be handled by
the underlying device, we will not perform the fraglist check on it
at all.

If the underlying device cannot handle fraglists, then this will
break.

The fix is as simple as moving the fraglist check from the device
check into skb_gso_ok.

This has caused crashes with Xen when used together with GRO which
can generate GSO packets with fraglists.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

11 years agocxgb3: minor aq100x phy fixes
Divy Le Ray [Wed, 3 Jun 2009 06:19:15 +0000]
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>

11 years agocxgb3: Update FW to 7.4.0
Divy Le Ray [Wed, 3 Jun 2009 13:38:59 +0000]
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>

11 years agocfg80211: fix Kconfig for users of cfg80211
Johannes Berg [Wed, 3 Jun 2009 16:30:31 +0000]
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>

11 years agorfkill: document /dev/rfkill
Johannes Berg [Wed, 3 Jun 2009 08:17:59 +0000]
rfkill: document /dev/rfkill

Add some blurb about /dev/rfkill to the documentation and
fix the "transmiter" spelling error.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

11 years agorfkill: always init poll delayed work
Johannes Berg [Wed, 3 Jun 2009 07:55:29 +0000]
rfkill: always init poll delayed work

The rfkill core didn't initialise the poll delayed work
because it assumed that polling was always done by specifying
the poll function. cfg80211, however, would like to start
polling only later, which is a valid use case and easy to
support, so change rfkill to always initialise the poll
delayed work and thus allow starting polling by calling the
rfkill_resume_polling() function after registration.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

11 years agoath5k: disable beacon interrupt when interface is down
Bob Copeland [Wed, 3 Jun 2009 03:03:06 +0000]
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>

11 years agomac80211: removed unused variable in ieee80211_tx()
Luis R. Rodriguez [Tue, 2 Jun 2009 22:43:25 +0000]
mac80211: removed unused variable in ieee80211_tx()

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

11 years agomac80211: extend sta kdoc - explain when they are added
Luis R. Rodriguez [Tue, 2 Jun 2009 22:38:14 +0000]
mac80211: extend sta kdoc - explain when they are added

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

11 years agocfg80211: make ieee80211_get_mesh_hdrlen() static
Luis R. Rodriguez [Tue, 2 Jun 2009 20:31:10 +0000]
cfg80211: make ieee80211_get_mesh_hdrlen() static

Fixes spares warning:
net/wireless/util.c:261:5: warning:
symbol 'ieee80211_get_mesh_hdrlen' was not declared. Should it be static?

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

11 years agoath: make regulatory parsing more verbose on debug
Luis R. Rodriguez [Tue, 2 Jun 2009 20:30:56 +0000]
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>

11 years agoath9k: Fix write callback of 'debug' which configures debug mask
Vasanthakumar Thiagarajan [Tue, 2 Jun 2009 13:58:55 +0000]
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>

11 years agoiwm: port to new cfg80211 rfkill
Johannes Berg [Tue, 2 Jun 2009 11:01:42 +0000]
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>

11 years agocfg80211: add rfkill support
Johannes Berg [Tue, 2 Jun 2009 11:01:41 +0000]
cfg80211: add rfkill support

To be easier on drivers and users, have cfg80211 register an
rfkill structure that drivers can access. When soft-killed,
simply take down all interfaces; when hard-killed the driver
needs to notify us and we will take down the interfaces
after the fact. While rfkilled, interfaces cannot be set UP.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

11 years agorfkill: add function to query state
Johannes Berg [Tue, 2 Jun 2009 11:01:40 +0000]
rfkill: add function to query state

Sometimes it is necessary to know how the state is,
and it is easier to query rfkill than keep track of
it somewhere else, so add a function for that. This
could later be expanded to return hard/soft block,
but so far that isn't necessary.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

11 years agocfg80211: move txpower wext from mac80211
Johannes Berg [Tue, 2 Jun 2009 11:01:39 +0000]
cfg80211: move txpower wext from mac80211

This patch introduces new cfg80211 API to set the TX power
via cfg80211, puts the wext code into cfg80211 and updates
mac80211 to use all that. The -ENETDOWN bits are a hack but
will go away soon.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>