]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
15 years agoixgb: fix link down initial state
Jesse Brandeburg [Fri, 17 Apr 2009 20:44:29 +0000 (20:44 +0000)]
ixgb: fix link down initial state

As reported by Andrew Lutomirski <amluto@gmail.com>

All the intel wired ethernet drivers were calling netif_carrier_off
and netif_stop_queue (or variants) before calling register_netdevice

This is incorrect behavior as was pointed out by davem, and causes
ifconfig and friends to report a strange state before first link
after the driver was loaded, since without a netif_carrier_off, the stack
assumes carrier_on, but before register_netdev, netlink messages are not
sent out telling link state.

This apparently confused *some* versions of networkmanager.

in addition this driver appeared to need a netif_start_queue at
the end of open.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reported-by: Andrew Lutomirski <amluto@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: fix link down initial state
Jesse Brandeburg [Fri, 17 Apr 2009 20:44:27 +0000 (20:44 +0000)]
ixgbe: fix link down initial state

As reported by Andrew Lutomirski <amluto@gmail.com>

All the intel wired ethernet drivers were calling netif_carrier_off
and netif_stop_queue (or variants) before calling register_netdevice

This is incorrect behavior as was pointed out by davem, and causes
ifconfig and friends to report a strange state before first link
after the driver was loaded, since without a netif_carrier_off, the stack
assumes carrier_on, but before register_netdev, netlink messages are not
sent out telling link state.

This apparently confused *some* versions of networkmanager.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reported-by: Andrew Lutomirski <amluto@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoiseries_veth: fix build breakage
Alexander Beregalov [Mon, 20 Apr 2009 01:42:58 +0000 (18:42 -0700)]
iseries_veth: fix build breakage

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoBluetooth: Add workaround for wrong HCI event in eSCO setup
Marcel Holtmann [Sun, 19 Apr 2009 17:30:03 +0000 (19:30 +0200)]
Bluetooth: Add workaround for wrong HCI event in eSCO setup

The Broadcom chips with 2.1 firmware handle the fallback case to a SCO
link wrongly when setting up eSCO connections.

  < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
      handle 11 voice setting 0x0060
  > HCI Event: Command Status (0x0f) plen 4
      Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
  > HCI Event: Connect Complete (0x03) plen 11
      status 0x00 handle 1 bdaddr 00:1E:3A:xx:xx:xx type SCO encrypt 0x01

The Link Manager negotiates the fallback to SCO, but then sends out
a Connect Complete event. This is wrong and the Link Manager should
actually send a Synchronous Connection Complete event if the Setup
Synchronous Connection has been used. Only the remote side is allowed
to use Connect Complete to indicate the missing support for eSCO in
the host stack.

This patch adds a workaround for this which clearly should not be
needed, but reality is that broken Broadcom devices are deployed.

Based on a report by Ville Tervo <ville.tervo@nokia.com>

Signed-off-by: Marcel Holtman <marcel@holtmann.org>
15 years agoBluetooth: Fallback from eSCO to SCO on unspecified error
Marcel Holtmann [Sun, 19 Apr 2009 17:14:14 +0000 (19:14 +0200)]
Bluetooth: Fallback from eSCO to SCO on unspecified error

Some Bluetooth chips (like the ones from Texas Instruments) don't do
proper eSCO negotiations inside the Link Manager. They just return an
error code and in case of the Kyocera ED-8800 headset it is just a
random error.

  < HCI Command: Setup Synchronous Connection 0x01|0x0028) plen 17
    handle 1 voice setting 0x0060
  > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
  > HCI Event: Synchronous Connect Complete (0x2c) plen 17
    status 0x1f handle 257 bdaddr 00:14:0A:xx:xx:xx type eSCO
    Error: Unspecified Error

In these cases it is up to the host stack to fallback to a SCO setup
and so retry with SCO parameters.

Based on a report by Nick Pelly <npelly@google.com>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
15 years agoBluetooth: Fix removing of RFCOMM DLC timer with DEFER_SETUP
Johan Hedberg [Thu, 26 Mar 2009 14:41:56 +0000 (16:41 +0200)]
Bluetooth: Fix removing of RFCOMM DLC timer with DEFER_SETUP

There is a missing call to rfcomm_dlc_clear_timer in the case that
DEFER_SETUP is used and so the connection gets disconnected after the
timeout even if it was successfully accepted previously.

This patch adds a call to rfcomm_dlc_clear_timer to rfcomm_dlc_accept
which will get called when the user accepts the connection by calling
read() on the socket.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
15 years agovlan/macvlan: fix NULL pointer dereferences in ethtool handlers
Patrick McHardy [Fri, 17 Apr 2009 22:59:23 +0000 (15:59 -0700)]
vlan/macvlan: fix NULL pointer dereferences in ethtool handlers

Check whether the underlying device provides a set of ethtool ops before
checking for individual handlers to avoid NULL pointer dereferences.

Reported-by: Art van Breemen <ard@telegraafnet.nl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Fri, 17 Apr 2009 22:54:40 +0000 (15:54 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

15 years agomyri10ge: fix compile error
Andrew Gallatin [Fri, 17 Apr 2009 22:45:15 +0000 (15:45 -0700)]
myri10ge: fix compile error

A compilation error snuck into
2d90b0aa3bc484189940444bcddcbe0ebbb53af5
due to an over-zealous indent script removing spaces around array
initialization ellipsis.  The attached patch fixes the myri10ge
compilation in net-next.

Signed-off-by: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Fri, 17 Apr 2009 22:38:38 +0000 (15:38 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6

15 years agoar9170usb: add ZyXEL NWD271N
Christian Lamparter [Fri, 17 Apr 2009 12:52:23 +0000 (14:52 +0200)]
ar9170usb: add ZyXEL NWD271N

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: validate TIM IE length
Johannes Berg [Thu, 16 Apr 2009 22:54:23 +0000 (00:54 +0200)]
mac80211: validate TIM IE length

The TIM IE must not be shorter than 4 bytes, so verify that
when parsing it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: do not replace BSS structs
Johannes Berg [Thu, 16 Apr 2009 13:00:58 +0000 (15:00 +0200)]
cfg80211: do not replace BSS structs

Instead, allocate extra IE memory if necessary. Normally,
this isn't even necessary since there's enough space.

This is a better way of correcting the "held BSS can
disappear" issue, but also a lot more code. It is also
necessary for proper auth/assoc BSS handling in the
future.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: copy hold when replacing BSS
Johannes Berg [Thu, 16 Apr 2009 10:15:38 +0000 (12:15 +0200)]
cfg80211: copy hold when replacing BSS

When we receive a probe response frame we can replace the
BSS struct in our list -- but if that struct is held then
we need to hold the new one as well.

We really should fix this completely and not replace the
struct, but this is a bandaid for now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: avoid crashing when no scan sdata
Johannes Berg [Wed, 15 Apr 2009 19:33:15 +0000 (21:33 +0200)]
mac80211: avoid crashing when no scan sdata

Using the scan_sdata variable here is terribly wrong,
if there has never been a scan then we fail. However,
we need a bandaid...

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org [2.6.29]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonetfilter: nfnetlink: return ENOMEM if we fail to create netlink socket
Pablo Neira Ayuso [Fri, 17 Apr 2009 15:48:44 +0000 (17:48 +0200)]
netfilter: nfnetlink: return ENOMEM if we fail to create netlink socket

With this patch, nfnetlink returns -ENOMEM instead of -EPERM if we
fail to create the nfnetlink netlink socket during the module
loading. This is exactly what rtnetlink does in this case.

Ideally, it would be better if we propagate the error that has
happened in netlink_kernel_create(), however, this function still
does not implement this yet.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agonetfilter: ctnetlink: report error if event message allocation fails
Pablo Neira Ayuso [Fri, 17 Apr 2009 15:47:31 +0000 (17:47 +0200)]
netfilter: ctnetlink: report error if event message allocation fails

This patch fixes an inconsistency that results in no error reports
to user-space listeners if we fail to allocate the event message.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years ago[PATCH] net: remove superfluous call to synchronize_net()
Eric Dumazet [Fri, 17 Apr 2009 11:52:48 +0000 (04:52 -0700)]
[PATCH] net: remove superfluous call to synchronize_net()

inet_register_protosw() function is responsible for adding a new
inet protocol into a global table (inetsw[]) that is used with RCU rules.

As soon as the store of the pointer is done, other cpus might see
this new protocol in inetsw[], so we have to make sure new protocol
is ready for use. All pending memory updates should thus be committed
to memory before setting the pointer.
This is correctly done using rcu_assign_pointer()

synchronize_net() is typically used at unregister time, after
unsetting the pointer, to make sure no other cpu is still using
the object we want to dismantle. Using it at register time
is only adding an artificial delay that could hide a real bug,
and this bug could popup if/when synchronize_rcu() can proceed
faster than now.

This saves about 13 ms on boot time on a HZ=1000 8 cpus machine  ;)
(4 calls to inet_register_protosw(), and about 3200 us per call)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Fix use after free in tcp_gro_receive
Herbert Xu [Fri, 17 Apr 2009 09:34:38 +0000 (02:34 -0700)]
gro: Fix use after free in tcp_gro_receive

After calling skb_gro_receive skb->len can no longer be relied
on since if the skb was merged using frags, then its pages will
have been removed and the length reduced.

This caused tcp_gro_receive to prematurely end merging which
resulted in suboptimal performance with ixgbe.

The fix is to store skb->len on the stack.

Reported-by: Mark Wagner <mwagner@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopegasus: Handle disconnect error code correctly.
Oliver Neukum [Fri, 17 Apr 2009 08:40:19 +0000 (01:40 -0700)]
pegasus: Handle disconnect error code correctly.

EPERM means that disconnect() is runnung. It should be treated like
ENODEV

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocan: Network Drop Monitor: Make use of consume_skb() in af_can.c
Oliver Hartkopp [Fri, 17 Apr 2009 08:38:46 +0000 (01:38 -0700)]
can: Network Drop Monitor: Make use of consume_skb() in af_can.c

Since commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop
Monitor: Adding kfree_skb_clean for non-drops and modifying
end-of-line points for skbs") so called end-of-line points for skb's
should use consume_skb() to free the socket buffer.

In opposite to consume_skb() the function kfree_skb() is intended to
be used for unexpected skb drops e.g. in error conditions that now can
trigger the network drop monitor if enabled.

This patch moves the skb end-of-line point in af_can.c to use
consume_skb().

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomacb: process the RX ring regardless of interrupt status
Erik Waling [Wed, 15 Apr 2009 23:32:11 +0000 (23:32 +0000)]
macb: process the RX ring regardless of interrupt status

Suppose that we receive lots of frames, start processing them, but
exhaust our budget so that we return before we had a chance to look
at all of them.

Then, when the network layer calls us again, we will only continue
processing the buffers if the REC bit was set in the mean time, which it
might not be if there was a brief pause in the flow of packets. If this
happens, we'll simply display a warning and call netif_rx_complete()
with potentially lots of unprocessed packets in the RX ring...

Fix this by scanning the ring no matter what flags are set in the
interrupt status register.

Signed-off-by: Erik Waling <erik.waling@konftel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomacb: Handle Retry Limit Exceeded errors
Erik Waling [Wed, 15 Apr 2009 23:32:10 +0000 (23:32 +0000)]
macb: Handle Retry Limit Exceeded errors

When transfering large amounts of data we sometimes experienced that the
Retry Limit Exceeded (RLE) bit got set in TSR during transmission
attempts. When this happened the driver would stall in a state that
prevented any more data from being sent.

Signed-off-by: Erik Waling <erik.waling@konftel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Fix the DCB PFC thresholds for 82599
PJ Waskiewicz [Thu, 16 Apr 2009 15:00:41 +0000 (15:00 +0000)]
ixgbe: Fix the DCB PFC thresholds for 82599

The thresholds for the DCB priority flow control are incorrect for 82599.
This fixes the thresholds to be correct.

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>
15 years agoixgbe: Fix DCB traffic class mapping for 82599
PJ Waskiewicz [Thu, 16 Apr 2009 15:00:20 +0000 (15:00 +0000)]
ixgbe: Fix DCB traffic class mapping for 82599

The traffic classes in hardware are not symmetrical for Rx and Tx.  Rx
is every 16 descriptor queues, Tx is not.  It runs 32-32-16-16-8-8-8 when
running with 8 traffic classes, and runs 64-32-16 when running with 4
traffic classes.  This patch fixes the mapping.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Cc: stable@kernel.org
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowan/pc300_drv: convert to net_device_ops
Alexander Beregalov [Thu, 16 Apr 2009 15:48:17 +0000 (15:48 +0000)]
wan/pc300_drv: convert to net_device_ops

On Fri, Apr 17, 2009 at 05:23:02AM +0400, Alexander Beregalov wrote:
>
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
> ---
>  drivers/net/wan/pc300_drv.c |   22 ++++++++++++++--------
>  1 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
> index c23fde0..df10a4c 100644
> --- a/drivers/net/wan/pc300_drv.c
> +++ b/drivers/net/wan/pc300_drv.c
> @@ -225,6 +225,7 @@ static char rcsid[] =
>  #include <linux/skbuff.h>
>  #include <linux/if_arp.h>
>  #include <linux/netdevice.h>
> +#include <linux/etherdevice.h>
>  #include <linux/spinlock.h>
>  #include <linux/if.h>
>  #include <net/arp.h>
> @@ -3246,6 +3247,18 @@ static inline void show_version(void)
>   rcsvers, rcsdate, __DATE__, __TIME__);
>  } /* show_version */
>
> +static const struct net_device_ops cpc_netdev_ops = {
> + .ndo_init = NULL,
> + .ndo_open = cpc_open,
> + .ndo_stop = cpc_close,
> + .ndo_tx_timeout = cpc_tx_timeout,
> + .ndo_set_multicast_list = NULL,

In this case ndo_init and ndo_set_multicast_list
are not needed.

>From 1507a5a797a5f0005696a9bf10e390caca9c3800 Mon Sep 17 00:00:00 2001
From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Fri, 17 Apr 2009 05:45:48 +0400
Subject: [PATCH] wan/pc300_drv: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoirda: include etherdevice.h for eth_*() functions
Alexander Beregalov [Thu, 16 Apr 2009 15:23:03 +0000 (15:23 +0000)]
irda: include etherdevice.h for eth_*() functions

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000: fix transmit routine exit bug
Jesse Brandeburg [Thu, 16 Apr 2009 16:59:47 +0000 (16:59 +0000)]
e1000: fix transmit routine exit bug

If the e1000 transmit cleanup inner loop exited early, then
cleaned might not be true.  This could cause tx hangs or other
badness.  Use count to track the total number of descriptors
cleaned instead of basing a tx queue restart off of a temporary
working state variable.

This code now makes the flow the same for e1000/e1000e/igb/ixgbe

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>
15 years agoe1000e: fix bug in restart queue logic
Jesse Brandeburg [Thu, 16 Apr 2009 16:59:28 +0000 (16:59 +0000)]
e1000e: fix bug in restart queue logic

If the e1000e transmit cleanup inner loop exited early, then
cleaned might not be true.  This could cause tx hangs or other
badness.  Use count to track the total number of descriptors
cleaned instead of basing a tx queue restart off of a temporary
working state variable.

This code now makes the flow the same for e1000/e1000e/igb/ixgbe

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>
15 years agomyri10ge: fix tx ring size in ethtool -g
Brice Goglin [Fri, 17 Apr 2009 00:56:57 +0000 (17:56 -0700)]
myri10ge: fix tx ring size in ethtool -g

Fix tx ring size reported via ethtool -g.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomyri10ge: add MODULE_DEVICE_TABLE
Brice Goglin [Thu, 16 Apr 2009 02:29:22 +0000 (02:29 +0000)]
myri10ge: add MODULE_DEVICE_TABLE

Add MODULE_DEVICE_TABLE so that modinfo reports pci device id aliases.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomyri10ge: allow per-board firmware overriding
Brice Goglin [Thu, 16 Apr 2009 02:24:59 +0000 (02:24 +0000)]
myri10ge: allow per-board firmware overriding

Add myri10ge_fw_names to override the default firmware
on a per-board basis.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomyri10ge: force stats update in ethtool gstats
Brice Goglin [Thu, 16 Apr 2009 02:23:56 +0000 (02:23 +0000)]
myri10ge: force stats update in ethtool gstats

Force a statistics update when our ethtool gstats routine
is called.  Otherwise, ethtool will continue to read stale
stats until something forces an update by reading /proc/net/dev

This requires putting a lock around the stats update to guard
against 2 threads (one via ethtool, and one via procfs)
updating the stats at once.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMAINTAINERS - Update NETWORKING W: url and standardize T: git url
Joe Perches [Thu, 16 Apr 2009 09:38:46 +0000 (09:38 +0000)]
MAINTAINERS - Update NETWORKING W: url and standardize T: git url

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMAINTAINERS - Add section NETWORKING DRIVERS
Joe Perches [Thu, 16 Apr 2009 09:38:45 +0000 (09:38 +0000)]
MAINTAINERS - Add section NETWORKING DRIVERS

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Fri, 17 Apr 2009 00:35:26 +0000 (17:35 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Thu, 16 Apr 2009 23:32:29 +0000 (16:32 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6

15 years agoixgbe: Be explict with what we are !'ing in ixgbe_sfp_config_module_task()
Tony Breeds [Thu, 16 Apr 2009 23:27:23 +0000 (16:27 -0700)]
ixgbe: Be explict with what we are !'ing in ixgbe_sfp_config_module_task()

GCC warns:
drivers/net/ixgbe/ixgbe_main.c: In function 'ixgbe_sfp_config_module_task':
drivers/net/ixgbe/ixgbe_main.c:3920: warning: suggest parantheses around
operand of '!' or change '&' to '&&' or '!' to '~'

Which I think is right.  Bracket to remove ambiguity.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: nf_nat: add support for persistent mappings
Patrick McHardy [Thu, 16 Apr 2009 16:33:01 +0000 (18:33 +0200)]
netfilter: nf_nat: add support for persistent mappings

The removal of the SAME target accidentally removed one feature that is
not available from the normal NAT targets so far, having multi-range
mappings that use the same mapping for each connection from a single
client. The current behaviour is to choose the address from the range
based on source and destination IP, which breaks when communicating
with sites having multiple addresses that require all connections to
originate from the same IP address.

Introduce a IP_NAT_RANGE_PERSISTENT option that controls whether the
destination address is taken into account for selecting addresses.

http://bugzilla.kernel.org/show_bug.cgi?id=12954

Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agoar9170: fix struct layout on arm
Johannes Berg [Fri, 10 Apr 2009 08:02:45 +0000 (10:02 +0200)]
ar9170: fix struct layout on arm

arm will pad even between u8's, so mark the structs/unions
packed. Fixes a build bug on arm due to BUILD_BUG_ON tests
in the code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: correct timeout logic in __orinoco_hw_set_tkip_key()
Pavel Roskin [Fri, 10 Apr 2009 01:41:05 +0000 (21:41 -0400)]
orinoco: correct timeout logic in __orinoco_hw_set_tkip_key()

If the value read from HERMES_RID_TXQUEUEEMPTY becomes 0 after exactly
100 readings, we wrongly consider it a timeout.  Rewrite the clever
while loop as a for loop that does the right thing and looks simpler.

Reported by Juha Leppanen <juha_motorsportcom@luukku.com>

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fragmentation threshold (typo)
Gerrit Renker [Tue, 14 Apr 2009 04:32:56 +0000 (06:32 +0200)]
mac80211: Fragmentation threshold (typo)

mac80211: Fragmentation threshold (typo)

ieee80211_ioctl_siwfrag() sets the fragmentation_threshold to 2352
when frame fragmentation is to be disabled, yet the corresponding
'get' function tests for 2353 bytes instead.

This causes user-space tools to display a fragmentation threshold
of 2352 bytes even if fragmentation has been disabled.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: prevent double kfree when failing to register hardware
Herton Ronaldo Krzesinski [Fri, 10 Apr 2009 21:05:14 +0000 (18:05 -0300)]
rt2x00: prevent double kfree when failing to register hardware

In a scenario where there isn't any firmware available, we will have a
double kfree of rt2x00dev->spec.channels_info when ieee80211_register_hw
returns an error status inside rt2x00lib_probe_hw.

The problem is that if ieee80211_register_hw fails, we call
rt2x00lib_remove_hw twice:
* first inside rt2x00lib_probe_hw upon failure of ieee80211_register_hw
* error status is returned to rt2x00lib_probe_dev, which then sees it and
  calls in this case rt2x00lib_remove_dev that will again run
  rt2x00lib_remove_hw

Prevent this avoiding calling rt2x00lib_remove_hw inside
rt2x00lib_probe_hw

Problem was detected with CONFIG_DEBUG_PAGEALLOC=y, CONFIG_SLUB_DEBUG=y,
CONFIG_SLUB_DEBUG_ON=y, that dumps this with no firmware available:

rt61pci 0000:00:07.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
wmaster0 (rt61pci): not using net_device_ops yet
phy0: Selected rate control algorithm 'pid'
phy0: Failed to initialize wep: -2
phy0 -> rt2x00lib_probe_dev: Error - Failed to initialize hw.
=============================================================================
BUG kmalloc-128: Object already free
-----------------------------------------------------------------------------

INFO: Allocated in rt61pci_probe_hw+0x3e5/0x6e0 [rt61pci] age=340 cpu=0 pid=21
INFO: Freed in rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib] age=0 cpu=0 pid=21
INFO: Slab 0xc13ac3e0 objects=23 used=10 fp=0xdd59f6e0 flags=0x400000c3
INFO: Object 0xdd59f6e0 @offset=1760 fp=0xdd59f790

Bytes b4 0xdd59f6d0:  15 00 00 00 b2 8a fb ff 5a 5a 5a 5a 5a 5a 5a 5a ....².ûÿZZZZZZZZ
  Object 0xdd59f6e0:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
  Object 0xdd59f6f0:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
  Object 0xdd59f700:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
  Object 0xdd59f710:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
  Object 0xdd59f720:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
  Object 0xdd59f730:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
  Object 0xdd59f740:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
  Object 0xdd59f750:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 kkkkkkkkkkkkkkkÂ¥
 Redzone 0xdd59f760:  bb bb bb bb                                     Â»Â»Â»Â»
 Padding 0xdd59f788:  5a 5a 5a 5a 5a 5a 5a 5a                         ZZZZZZZZ
Pid: 21, comm: stage1 Not tainted 2.6.29.1-desktop-1.1mnb #1
Call Trace:
 [<c01abbb3>] print_trailer+0xd3/0x120
 [<c01abd37>] object_err+0x37/0x50
 [<c01acf57>] __slab_free+0xe7/0x2f0
 [<c01ad1de>] kfree+0x7e/0xd0
 [<e0e4a239>] ? rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib]
 [<e0e4a239>] ? rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib]
 [<e0e4a239>] rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib]
 [<e0e4acc7>] rt2x00lib_remove_dev+0x37/0x50 [rt2x00lib]
 [<e0e4b087>] rt2x00lib_probe_dev+0x1a7/0x3b0 [rt2x00lib]
 [<e0eb288f>] rt2x00pci_probe+0xdf/0x1ee [rt2x00pci]
 [<c026b9ee>] local_pci_probe+0xe/0x10
 [<c026c750>] pci_device_probe+0x60/0x80
 [<c02d5c2a>] driver_probe_device+0x9a/0x2e0
 [<c02d5ef9>] __driver_attach+0x89/0x90
 [<c02d541b>] bus_for_each_dev+0x4b/0x70
 [<c026c690>] ? pci_device_remove+0x0/0x40
 [<c02d59d9>] driver_attach+0x19/0x20
 [<c02d5e70>] ? __driver_attach+0x0/0x90
 [<c02d4cef>] bus_add_driver+0x1cf/0x2a0
 [<c026c690>] ? pci_device_remove+0x0/0x40
 [<c02d60c9>] driver_register+0x69/0x140
 [<c026c9b0>] __pci_register_driver+0x40/0x80
 [<e0ecc000>] ? rt61pci_init+0x0/0x19 [rt61pci]
 [<e0ecc017>] rt61pci_init+0x17/0x19 [rt61pci]
 [<c0101116>] do_one_initcall+0x26/0x1c0
 [<c01ab90c>] ? slab_pad_check+0x3c/0x120
 [<c01ab90c>] ? slab_pad_check+0x3c/0x120
 [<c01ac8da>] ? check_object+0xda/0x210
 [<c01b0026>] ? percpu_free+0x46/0x50
 [<c01ad09e>] ? __slab_free+0x22e/0x2f0
 [<c01b0026>] ? percpu_free+0x46/0x50
 [<c01b0026>] ? percpu_free+0x46/0x50
 [<c01b0026>] ? percpu_free+0x46/0x50
 [<c01687ec>] ? stop_machine_destroy+0x3c/0x40
 [<c015e515>] ? load_module+0xa5/0x1c50
 [<e0ec5000>] ? rt61pci_eepromregister_read+0x0/0x40 [rt61pci]
 [<e0eb2000>] ? rt2x00pci_write_tx_data+0x0/0x90 [rt2x00pci]
 [<c03ac2fb>] ? mutex_lock+0xb/0x20
 [<c03ac2fb>] ? mutex_lock+0xb/0x20
 [<c017ad16>] ? tracepoint_update_probe_range+0x76/0xa0
 [<c017ad6f>] ? tracepoint_module_notify+0x2f/0x40
 [<c03b02ed>] ? notifier_call_chain+0x2d/0x70
 [<c014f0ed>] ? __blocking_notifier_call_chain+0x4d/0x60
 [<c014f11a>] ? blocking_notifier_call_chain+0x1a/0x20
 [<c0160156>] sys_init_module+0x96/0x1d0
 [<c019dad6>] ? sys_munmap+0x46/0x60
 [<c0105546>] syscall_call+0x7/0xb
FIX kmalloc-128: Object at 0xdd59f6e0 not freed
rt61pci 0000:00:07.0: PCI INT A disabled
rt61pci: probe of 0000:00:07.0 failed with error -2

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agofix iwl3945 registration regression
Johannes Berg [Thu, 9 Apr 2009 07:56:02 +0000 (09:56 +0200)]
fix iwl3945 registration regression

I forgot that iwl3945 registration is separate from iwlagn.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: quiet beacon loss messages
Michael Buesch [Wed, 15 Apr 2009 18:41:22 +0000 (14:41 -0400)]
mac80211: quiet beacon loss messages

On Sunday 05 April 2009 11:29:38 Michael Buesch wrote:
> On Sunday 05 April 2009 11:23:59 Jaswinder Singh Rajput wrote:
> > With latest linus tree I am getting, .config file attached:
> >
> > [   22.895051] r8169: eth0: link down
> > [   22.897564] ADDRCONF(NETDEV_UP): eth0: link is not ready
> > [   22.928047] ADDRCONF(NETDEV_UP): wlan0: link is not ready
> > [   22.982292] libvirtd used greatest stack depth: 4200 bytes left
> > [   63.709879] wlan0: authenticate with AP 00:11:95:9e:df:f6
> > [   63.712096] wlan0: authenticated
> > [   63.712127] wlan0: associate with AP 00:11:95:9e:df:f6
> > [   63.726831] wlan0: RX AssocResp from 00:11:95:9e:df:f6 (capab=0x471 status=0 aid=1)
> > [   63.726855] wlan0: associated
> > [   63.730093] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
> > [   74.296087] wlan0: no IPv6 routers present
> > [   79.349044] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [  119.358200] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [  179.354292] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [  259.366044] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [  359.348292] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [  361.953459] packagekitd used greatest stack depth: 4160 bytes left
> > [  478.824258] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [  598.813343] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [  718.817292] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [  838.824567] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [  958.815402] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 1078.848434] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 1198.822913] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 1318.824931] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 1438.814157] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 1558.827336] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 1678.823011] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 1798.830589] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 1918.828044] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 2038.827224] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 2116.517152] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 2158.840243] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
> > [ 2278.827427] wlan0: beacon loss from AP 00:11:95:9e:df:f6 - sending probe request
>
>
> I think this message should only show if CONFIG_MAC80211_VERBOSE_DEBUG is set.
> It's kind of expected that we lose a beacon once in a while, so we shouldn't print
> verbose messages to the kernel log (even if they are KERN_DEBUG).
>
> And besides that, I think one can easily remotely trigger this message and flood the logs.
> So it should probably _also_ be ratelimited.

Something like this:

Signed-off-by: Michael Buesch <mb@bu3sch.de>
15 years agob43: Do radio lock assertion in software
Michael Buesch [Tue, 31 Mar 2009 10:27:32 +0000 (12:27 +0200)]
b43: Do radio lock assertion in software

The assertion of the lock-bit in the hardware register is unreliable,
because there are devices with quirks that will randomly set the bit.

Do the assertion in software, only.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Add rt73usb USB IDs
Ivo van Doorn [Sat, 28 Mar 2009 19:52:14 +0000 (20:52 +0100)]
rt2x00: Add rt73usb USB IDs

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54usb: add Telsey 802.11g USB2.0 Adapter
Christian Lamparter [Sun, 29 Mar 2009 20:50:28 +0000 (22:50 +0200)]
p54usb: add Telsey 802.11g USB2.0 Adapter

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170: add Cace Airpcap NX usb_id
Christian Lamparter [Tue, 24 Mar 2009 20:58:08 +0000 (21:58 +0100)]
ar9170: add Cace Airpcap NX usb_id

This patch adds a new device to ar9170usb.

Reported-by: Mike Kershaw/Dragorn <dragorn@kismetwireless.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoairo: queue SIOCSIWAUTH-requested auth mode change for next commit
Dan Williams [Wed, 8 Apr 2009 14:15:17 +0000 (10:15 -0400)]
airo: queue SIOCSIWAUTH-requested auth mode change for next commit

Code was clearly wrong, plus callers expect the mode change to happen as
soon as possible, not dropped on the floor until the next time some
other config value changes and a commit happens.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoat76c50x-usb: Add device ID for OQO model 01+
Jamie Lentin [Tue, 7 Apr 2009 21:59:56 +0000 (22:59 +0100)]
at76c50x-usb: Add device ID for OQO model 01+

Add USB device ID for OQO 01+'s internal wireless LAN

An OQO employee mentions the chip's true identity here:-
    ftp://ftp.oqo.com/unsupported/linux/OQOLinux.html

Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: don't leak skb on receive error
Philip Rakity [Tue, 7 Apr 2009 19:41:17 +0000 (12:41 -0700)]
libertas: don't leak skb on receive error

Don't lead memory when receive errors

Signed-off-by: Philip Rakity <prakity@yahoo.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: correct wext transmit power handler
Johannes Berg [Tue, 7 Apr 2009 13:22:28 +0000 (15:22 +0200)]
mac80211: correct wext transmit power handler

Wext makes no assumptions about the contents of
data->txpower.fixed and data->txpower.value when
data->txpower.disabled is set, so do not update
the user-requested power level while disabling.

Also, when wext configures a really _fixed_ power
output [1], we should reject it instead of limiting it
to the regulatory constraint. If the user wants to set
a _limit_ [2] then we should honour that.

[1] iwconfig wlan0 txpower 20dBm fixed
[2] iwconfig wlan0 txpower 10dBm

This fixes
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1942

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: fix access to a freed skb in ath_rx_tasklet()
Pavel Roskin [Sat, 4 Apr 2009 00:10:26 +0000 (20:10 -0400)]
ath9k: fix access to a freed skb in ath_rx_tasklet()

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonet/ps3: Fix wireless AP connect error handling
Masakazu Mokuno [Mon, 30 Mar 2009 18:04:36 +0000 (11:04 -0700)]
net/ps3: Fix wireless AP connect error handling

This patch fixes the bug that the driver tries to continue to
connect(associate) to AP even if gelic_wl_do_{wpa,wep}_setup() fails,

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54spi: fix locking warning in p54spi_op_tx
Christian Lamparter [Mon, 30 Mar 2009 13:55:24 +0000 (15:55 +0200)]
p54spi: fix locking warning in p54spi_op_tx

This patch fixes the following waring:
> ------------[ cut here ]------------
>WARNING: at kernel/softirq.c:138 local_bh_enable+0x54/0xbc()
>Modules linked in: p54spi
>[<c0034ff8>] (dump_stack+0x0/0x14)
>[<c005b1a4>] (warn_on_slowpath+0x0/0x68)
>[<c00604c8>] (local_bh_enable+0x0/0xbc)
>[<bf000000>] (p54spi_op_tx+0x0/0x4c [p54spi])
>[<c01a4d34>] (p54_sta_unlock+0x0/0x78)

p54spi_op_tx needs to be called from different locking contexts.
Therefore we have to protect the linked list with irqsave spinlocks.

Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: replace MAC80211_LEDS with P54_LEDS in p54.h
Christian Lamparter [Wed, 25 Mar 2009 02:11:44 +0000 (03:11 +0100)]
p54: replace MAC80211_LEDS with P54_LEDS in p54.h

I'm very sorry, as this change belongs to the other patch:
"[PATCH] p54: fix SoftLED compile dependencies".
however I must have somehow lost "git add" for that file.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Refresh RX poison on buffer recycling
Michael Buesch [Fri, 27 Mar 2009 23:41:25 +0000 (00:41 +0100)]
b43: Refresh RX poison on buffer recycling

The RX buffer poison needs to be refreshed, if we recycle an RX buffer,
because it might be (partially) overwritten by some DMA operations.

Cc: stable@kernel.org
Cc: Francesco Gringoli <francesco.gringoli@ing.unibs.it>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Poison RX buffers
Michael Buesch [Fri, 27 Mar 2009 21:51:58 +0000 (22:51 +0100)]
b43: Poison RX buffers

This patch adds poisoning and sanity checking to the RX DMA buffers.
This is used for protection against buggy hardware/firmware that raises
RX interrupts without doing an actual DMA transfer.

This mechanism protects against rare "bad packets" (due to uninitialized skb data)
and rare kernel crashes due to uninitialized RX headers.

The poison is selected to not match on valid frames and to be cheap for checking.

The poison check mechanism _might_ trigger incorrectly, if we are voluntarily
receiving frames with bad PLCP headers. However, this is nonfatal, because the
chance of such a match is basically zero and in case it happens it just results
in dropping the packet.
Bad-PLCP RX defaults to off, and you should leave it off unless you want to listen
to the latest news broadcasted by your microwave oven.

This patch also moves the initialization of the RX-header "length" field in front of
the mapping of the DMA buffer. The CPU should not touch the buffer after we mapped it.

Cc: stable@kernel.org
Reported-by: Francesco Gringoli <francesco.gringoli@ing.unibs.it>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix bug in getting rx status for frames pending in reorder buffer
Vasanthakumar Thiagarajan [Wed, 25 Mar 2009 12:40:18 +0000 (18:10 +0530)]
mac80211: Fix bug in getting rx status for frames pending in reorder buffer

Currently rx status for frames which are completed from reorder buffer
is taken from it's cb area which is not always right, cb is not holding
the rx status when driver uses mac80211's non-irq rx handler to pass it's
received frames. This results in dropping almost all frames from reorder
buffer when security is enabled by doing double decryption (first in hw,
second in sw because of wrong rx status). This patch copies rx status into
cb area before the frame is put into reorder buffer. After this patch,
there is a significant improvement in throughput with ath9k + WPA2(AES).

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: fix NULL pointer deference in reg_device_remove()
Luis R. Rodriguez [Wed, 25 Mar 2009 01:21:08 +0000 (21:21 -0400)]
cfg80211: fix NULL pointer deference in reg_device_remove()

We won't ever get here as regulatory_hint_core() can only fail
on -ENOMEM and in that case we don't initialize cfg80211 but this is
technically correct code.

This is actually good for stable, where we don't check for -ENOMEM
failure on __regulatory_hint()'s failure.

Cc: stable@kernel.org
Reported-by: Quentin Armitage <Quentin@armitage.org.uk>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agophylib: Fix delay argument of schedule_delayed_work
Atsushi Nemoto [Thu, 16 Apr 2009 09:43:37 +0000 (02:43 -0700)]
phylib: Fix delay argument of schedule_delayed_work

The commit a390d1f3 ("phylib: convert state_queue work to
delayed_work") missed converting 'expires' value to 'delay' value.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: call fec_restart() in fec_open()
Sascha Hauer [Wed, 15 Apr 2009 01:32:25 +0000 (01:32 +0000)]
fec: call fec_restart() in fec_open()

We called fec_stop() in fec_enet_close(), thus we have to call
fec_restart() in fec_enet_open().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoFEC Buffer rework
Sascha Hauer [Wed, 15 Apr 2009 01:32:24 +0000 (01:32 +0000)]
FEC Buffer rework

Allocate buffers in fec_open and free them again in fec_close. This makes
it possible to use this driver as a module.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: switch to net_device_ops
Sascha Hauer [Wed, 15 Apr 2009 01:32:23 +0000 (01:32 +0000)]
fec: switch to net_device_ops

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: remove debugging printks
Sascha Hauer [Wed, 15 Apr 2009 01:32:22 +0000 (01:32 +0000)]
fec: remove debugging printks

These printks in fec_timeout do not give useful information in
a production kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: align receive packets
Sascha Hauer [Wed, 15 Apr 2009 01:32:21 +0000 (01:32 +0000)]
fec: align receive packets

Otherwise we get a lot of alignment errors

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: refactor init function
Sascha Hauer [Wed, 15 Apr 2009 01:32:20 +0000 (01:32 +0000)]
fec: refactor init function

fec_enet_init() does the hardware initialisation and then calls
fec_restart() which does the same initialisation again, so we
can safely remove the initialisation from fec_enet_init().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: refactor set_multicast_list() to make it more readable
Sascha Hauer [Wed, 15 Apr 2009 01:32:19 +0000 (01:32 +0000)]
fec: refactor set_multicast_list() to make it more readable

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: Codingstyle cleanups
Sascha Hauer [Wed, 15 Apr 2009 01:32:18 +0000 (01:32 +0000)]
fec: Codingstyle cleanups

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: remove unnecessary cast
Sascha Hauer [Wed, 15 Apr 2009 01:32:17 +0000 (01:32 +0000)]
fec: remove unnecessary cast

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: do not typedef struct types
Sascha Hauer [Wed, 15 Apr 2009 01:32:16 +0000 (01:32 +0000)]
fec: do not typedef struct types

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: switch to writel/readl
Sascha Hauer [Wed, 15 Apr 2009 03:11:30 +0000 (03:11 +0000)]
fec: switch to writel/readl

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosun3lance: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:53:00 +0000 (12:53 +0000)]
sun3lance: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmc911x: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:59 +0000 (12:52 +0000)]
smc911x: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosgiseeq: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:58 +0000 (12:52 +0000)]
sgiseeq: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosb1250-mac: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:57 +0000 (12:52 +0000)]
sb1250-mac: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agorionet: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:56 +0000 (12:52 +0000)]
rionet: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopci-skeleton: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:55 +0000 (12:52 +0000)]
pci-skeleton: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopasemi_mac: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:54 +0000 (12:52 +0000)]
pasemi_mac: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetx-eth: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:53 +0000 (12:52 +0000)]
netx-eth: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomvme147: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:52 +0000 (12:52 +0000)]
mvme147: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomipsnet: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:51 +0000 (12:52 +0000)]
mipsnet: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agometh: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:50 +0000 (12:52 +0000)]
meth: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomacmace: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:49 +0000 (12:52 +0000)]
macmace: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomace: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:48 +0000 (12:52 +0000)]
mace: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agolib82596: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:47 +0000 (12:52 +0000)]
lib82596: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agokorina: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:46 +0000 (12:52 +0000)]
korina: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agojazzsonic: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:45 +0000 (12:52 +0000)]
jazzsonic: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixp2000/ixpdev: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:44 +0000 (12:52 +0000)]
ixp2000/ixpdev: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoiseries_veth: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:43 +0000 (12:52 +0000)]
iseries_veth: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoirda/sa1100_ir: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:42 +0000 (12:52 +0000)]
irda/sa1100_ir: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoirda/pxaficp_ir: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:41 +0000 (12:52 +0000)]
irda/pxaficp_ir: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoirda/au1k_ir: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:40 +0000 (12:52 +0000)]
irda/au1k_ir: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoibmveth: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:39 +0000 (12:52 +0000)]
ibmveth: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agohplance: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:38 +0000 (12:52 +0000)]
hplance: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodm9000: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:37 +0000 (12:52 +0000)]
dm9000: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocpmac: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:36 +0000 (12:52 +0000)]
cpmac: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobmac: convert to net_device_ops
Alexander Beregalov [Wed, 15 Apr 2009 12:52:35 +0000 (12:52 +0000)]
bmac: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago8390(p): remove old compat_net_dev_ops code
Alexander Beregalov [Wed, 15 Apr 2009 07:58:29 +0000 (07:58 +0000)]
8390(p): remove old compat_net_dev_ops code

Remove compat_net_dev_ops code and use struct net_device_ops
instead of it.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>