safe/jmp/linux-2.6
14 years agonetfilter: xtables: fix mangle tables
Alexey Dobriyan [Thu, 11 Feb 2010 17:41:35 +0000 (18:41 +0100)]
netfilter: xtables: fix mangle tables

In POST_ROUTING hook, calling dev_net(in) is going to oops.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_conntrack_sip: add T.38 FAX support
Patrick McHardy [Thu, 11 Feb 2010 11:30:21 +0000 (12:30 +0100)]
netfilter: nf_conntrack_sip: add T.38 FAX support

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_nat_sip: add TCP support
Patrick McHardy [Thu, 11 Feb 2010 11:29:38 +0000 (12:29 +0100)]
netfilter: nf_nat_sip: add TCP support

Add support for mangling TCP SIP packets.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_nat: support mangling a single TCP packet multiple times
Patrick McHardy [Thu, 11 Feb 2010 11:27:09 +0000 (12:27 +0100)]
netfilter: nf_nat: support mangling a single TCP packet multiple times

nf_nat_mangle_tcp_packet() can currently only handle a single mangling
per window because it only maintains two sequence adjustment positions:
the one before the last adjustment and the one after.

This patch makes sequence number adjustment tracking in
nf_nat_mangle_tcp_packet() optional and allows a helper to manually
update the offsets after the packet has been fully handled.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_conntrack_sip: add TCP support
Patrick McHardy [Thu, 11 Feb 2010 11:26:19 +0000 (12:26 +0100)]
netfilter: nf_conntrack_sip: add TCP support

Add TCP support, which is mandated by RFC3261 for all SIP elements.

SIP over TCP is similar to UDP, except that messages are delimited
by Content-Length: headers and multiple messages may appear in one
packet.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_conntrack_sip: pass data offset to NAT functions
Patrick McHardy [Thu, 11 Feb 2010 11:23:53 +0000 (12:23 +0100)]
netfilter: nf_conntrack_sip: pass data offset to NAT functions

When using TCP multiple SIP messages might be present in a single packet.
A following patch will parse them by setting the dptr to the beginning of
each message. The NAT helper needs to reload the dptr value after mangling
the packet however, so it needs to know the offset of the message to the
beginning of the packet.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_conntrack_sip: fix ct_sip_parse_request() REGISTER request parsing
Patrick McHardy [Thu, 11 Feb 2010 11:23:12 +0000 (12:23 +0100)]
netfilter: nf_conntrack_sip: fix ct_sip_parse_request() REGISTER request parsing

When requests are parsed, the "sip:" part of the SIP URI should be skipped.

Usually this doesn't matter because address parsing skips forward until after
the username part, but in case REGISTER requests it doesn't contain a username
and the address can not be parsed.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_conntrack: show helper and class in /proc/net/nf_conntrack_expect
Patrick McHardy [Thu, 11 Feb 2010 11:22:48 +0000 (12:22 +0100)]
netfilter: nf_conntrack: show helper and class in /proc/net/nf_conntrack_expect

Make the output a bit more informative by showing the helper an expectation
belongs to and the expectation class.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: ctnetlink: dump expectation helper name
Patrick McHardy [Thu, 11 Feb 2010 11:22:28 +0000 (12:22 +0100)]
netfilter: ctnetlink: dump expectation helper name

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoixgbe: Bump driver version up
Peter Waskiewicz [Wed, 10 Feb 2010 16:08:13 +0000 (16:08 +0000)]
ixgbe: Bump driver version up

Driver has gone under significant changes, the version should
reflect that.

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>
14 years agoixgbe: Add support for the new ethtool n-tuple programming interface
Peter Waskiewicz [Wed, 10 Feb 2010 16:07:54 +0000 (16:07 +0000)]
ixgbe: Add support for the new ethtool n-tuple programming interface

This patch adds n-tuple filter programming to 82599.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethtool: Introduce n-tuple filter programming support
Peter P Waskiewicz Jr [Thu, 11 Feb 2010 04:03:05 +0000 (20:03 -0800)]
ethtool: Introduce n-tuple filter programming support

This patchset enables the ethtool layer to program n-tuple
filters to an underlying device.  The idea is to allow capable
hardware to have static rules applied that can assist steering
flows into appropriate queues.

Hardware that is known to support these types of filters today
are ixgbe and niu.

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>
14 years agotcp: fix ICMP-RTO war
Damian Lukowski [Thu, 11 Feb 2010 02:04:08 +0000 (18:04 -0800)]
tcp: fix ICMP-RTO war

Make sure, that TCP has a nonzero RTT estimation after three-way
handshake. Currently, a listening TCP has a value of 0 for srtt,
rttvar and rto right after the three-way handshake is completed
with TCP timestamps disabled.
This will lead to corrupt RTO recalculation and retransmission
flood when RTO is recalculated on backoff reversion as introduced
in "Revert RTO on ICMP destination unreachable"
(f1ecd5d9e7366609d640ff4040304ea197fbc618).
This behaviour can be provoked by connecting to a server which
"responds first" (like SMTP) and rejecting every packet after
the handshake with dest-unreachable, which will lead to softirq
load on the server (up to 30% per socket in some tests).

Thanks to Ilpo Jarvinen for providing debug patches and to
Denys Fedoryshchenko for reporting and testing.

Changes since v3: Removed bad characters in patchfile.

Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: receive checksum refactoring
stephen hemminger [Sun, 7 Feb 2010 06:28:36 +0000 (06:28 +0000)]
sky2: receive checksum refactoring

Break the largish case for handling receive checksum into a separate
function, and if there is a problem use dev_XXX routines to
show which hardware is the problem.

Turn one corner case into a BUG().  This only happens if the driver
is expecting one behavior but the chip does the old behavior;
only ever saw this when bringing up a new chip type and driver
was buggy.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: disable ASF on Yukon Supreme
stephen hemminger [Sun, 7 Feb 2010 06:24:50 +0000 (06:24 +0000)]
sky2: disable ASF on Yukon Supreme

Clone of vendor code to disable ASF on Extreme and Supreme chips.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: resume clocks
stephen hemminger [Sun, 7 Feb 2010 06:23:53 +0000 (06:23 +0000)]
sky2: resume clocks

Change the resume path to use pci write config for a couple of reasons:
1. pci_write_config_dword() allows for more error
   checking of PCI health after resume.

2. better to toggle this register on all chip types, since that
   is what vendor driver does.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: Deny TX BA session requests during disassociation
Sujith [Wed, 10 Feb 2010 09:22:21 +0000 (14:52 +0530)]
mac80211: Deny TX BA session requests during disassociation

In associated state, when bringing an interface down, existing
BA sessions are torn down. When this is in progress, nothing
prevents mac80211 from accepting another BA session start request.

Use a new station flag to fix this.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoAdd Station and AdHoc mode support to libertas_tf
Deepak Saxena [Tue, 9 Feb 2010 21:35:43 +0000 (13:35 -0800)]
Add Station and AdHoc mode support to libertas_tf

Add support for using the libertas_tf driver on a managed
or ad-hoc network.

Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: use correct packet type when transmitting
Bob Copeland [Tue, 9 Feb 2010 18:06:54 +0000 (13:06 -0500)]
ath5k: use correct packet type when transmitting

The hardware needs to know what type of frames are being
sent in order to fill in various fields, for example the
timestamp in probe responses (before this patch, it was
always 0).  Set it correctly when initializing the TX
descriptor.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agofec: Add ARCH_MX5 as a dependency
Amit Kucheria [Fri, 5 Feb 2010 08:56:22 +0000 (08:56 +0000)]
fec: Add ARCH_MX5 as a dependency

i.MX51 babbage board has a FEC ethernet controller

Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agofec: Add LAN8700 phy support
Amit Kucheria [Fri, 5 Feb 2010 08:56:21 +0000 (08:56 +0000)]
fec: Add LAN8700 phy support

The i.MX51 babbage board has a FEC ethernet controller with this phy.

In the long term we should resurrect the phylib patches for fec.

Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agofec: fix uninitialized rx buffer usage
Rob Herring [Fri, 5 Feb 2010 08:56:20 +0000 (08:56 +0000)]
fec: fix uninitialized rx buffer usage

The fec driver was enabling receive buffer descriptor without allocating
the buffers. Make sure the buffer descriptors are initialized to not
start receiving packets.

Open also calls fec_restart after the rx buffers are allocated. With the code
in fec_restart, it zeroes out the buffer descriptors that have just been
setup.

Signed-off-by: Rob Herring <r.herring@freescale.com>
Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 10 Feb 2010 20:35:24 +0000 (12:35 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agonet: atm: use seq_list_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:21:51 +0000 (23:21 +0000)]
net: atm: use seq_list_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: ipx: use seq_list_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:21:22 +0000 (23:21 +0000)]
net: ipx: use seq_list_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: irda: use seq_list_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:21:05 +0000 (23:21 +0000)]
net: irda: use seq_list_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: x25: use seq_list_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:20:42 +0000 (23:20 +0000)]
net: x25: use seq_list_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: af_key: use seq_hlist_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:20:29 +0000 (23:20 +0000)]
net: af_key: use seq_hlist_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: appletalk: use seq_hlist_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:20:15 +0000 (23:20 +0000)]
net: appletalk: use seq_hlist_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: ax25: use seq_hlist_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:19:59 +0000 (23:19 +0000)]
net: ax25: use seq_hlist_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: netrom: use seq_hlist_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:19:42 +0000 (23:19 +0000)]
net: netrom: use seq_hlist_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: packet: use seq_hlist_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:19:29 +0000 (23:19 +0000)]
net: packet: use seq_hlist_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: rose: use seq_hlist_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:19:17 +0000 (23:19 +0000)]
net: rose: use seq_hlist_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: x25: use seq_hlist_foo() helpers
Li Zefan [Mon, 8 Feb 2010 23:19:04 +0000 (23:19 +0000)]
net: x25: use seq_hlist_foo() helpers

Simplify seq_file code.

Signed-off-by: Li Zefan <lizf@cn.fujtisu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: add a wrapper sk_entry()
Li Zefan [Mon, 8 Feb 2010 23:18:45 +0000 (23:18 +0000)]
net: add a wrapper sk_entry()

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoseq_file: Add helpers for iteration over a hlist
Li Zefan [Mon, 8 Feb 2010 23:18:22 +0000 (23:18 +0000)]
seq_file: Add helpers for iteration over a hlist

Some places in kernel need to iterate over a hlist in seq_file,
so provide some common helpers.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovia-velocity: Fix races on shared interrupts
Simon Kagstrom [Tue, 9 Feb 2010 23:38:25 +0000 (23:38 +0000)]
via-velocity: Fix races on shared interrupts

This patch fixes two potential races in the velocity driver:

* Move the ACK and error handler to the interrupt handler. This fixes a
  potential race with shared interrupts when the other device interrupts
  before the NAPI poll handler has finished. As the velocity driver hasn't
  acked it's own interrupt, it will then steal the interrupt from the
  other device.

* Use spin_lock_irqsave in velocity_poll. In the current code, the
  interrupt handler will deadlock if e.g., the NAPI poll handler is
  executing when an interrupt (for another device) comes in since it
  tries to take the already held lock.

  Also unlock the spinlock only after enabling the interrupt in
  velocity_poll.

The error path is moved to the interrupt handler since this is where the
ISR is checked now.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Anders Grafstrom <anders.grafstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovia-velocity: Take spinlock on set coalesce
Simon Kagstrom [Tue, 9 Feb 2010 23:38:07 +0000 (23:38 +0000)]
via-velocity: Take spinlock on set coalesce

velocity_set_coalesce touches ISR and some other sensitive registers not
covered by the rtnl lock, so take the velocity spinlock.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovia-velocity: Remove unused IRQ status parameter from rx_srv and tx_srv
Simon Kagstrom [Tue, 9 Feb 2010 23:37:54 +0000 (23:37 +0000)]
via-velocity: Remove unused IRQ status parameter from rx_srv and tx_srv

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agortl8187: Add new device ID
Jelle Martijn Kok [Wed, 10 Feb 2010 15:34:09 +0000 (09:34 -0600)]
rtl8187: Add new device ID

Add new RTL8187B device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'master' of git://dev.medozas.de/linux
Patrick McHardy [Wed, 10 Feb 2010 16:56:46 +0000 (17:56 +0100)]
Merge branch 'master' of git://dev.medozas.de/linux

14 years agonetfilter: xtables: generate initial table on-demand
Jan Engelhardt [Wed, 17 Jun 2009 20:14:54 +0000 (22:14 +0200)]
netfilter: xtables: generate initial table on-demand

The static initial tables are pretty large, and after the net
namespace has been instantiated, they just hang around for nothing.
This commit removes them and creates tables on-demand at runtime when
needed.

Size shrinks by 7735 bytes (x86_64).

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: xtables: use xt_table for hook instantiation
Jan Engelhardt [Wed, 17 Jun 2009 11:57:48 +0000 (13:57 +0200)]
netfilter: xtables: use xt_table for hook instantiation

The respective xt_table structures already have most of the metadata
needed for hook setup. Add a 'priority' field to struct xt_table so
that xt_hook_link() can be called with a reduced number of arguments.

So should we be having more tables in the future, it comes at no
static cost (only runtime, as before) - space saved:
6807373->6806555.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: xtables: compact table hook functions (2/2)
Jan Engelhardt [Sat, 13 Jun 2009 04:57:10 +0000 (06:57 +0200)]
netfilter: xtables: compact table hook functions (2/2)

The calls to ip6t_do_table only show minimal differences, so it seems
like a good cleanup to merge them to a single one too.
Space saving obtained by both patches: 6807725->6807373
("Total" column from `size -A`.)

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: xtables: compact table hook functions (1/2)
Jan Engelhardt [Sat, 13 Jun 2009 04:46:36 +0000 (06:46 +0200)]
netfilter: xtables: compact table hook functions (1/2)

This patch combines all the per-hook functions in a given table into
a single function. Together with the 2nd patch, further
simplifications are possible up to the point of output code reduction.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: ctnetlink: add missing netlink attribute policies
Patrick McHardy [Wed, 10 Feb 2010 14:38:33 +0000 (15:38 +0100)]
netfilter: ctnetlink: add missing netlink attribute policies

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: xtables: symmetric COMPAT_XT_ALIGN definition
Alexey Dobriyan [Wed, 10 Feb 2010 14:03:27 +0000 (15:03 +0100)]
netfilter: xtables: symmetric COMPAT_XT_ALIGN definition

Rewrite COMPAT_XT_ALIGN in terms of dummy structure hack.
Compat counters logically have nothing to do with it.
Use ALIGN() macro while I'm at it for same types.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: xtables: consistent struct compat_xt_counters definition
Alexey Dobriyan [Wed, 10 Feb 2010 14:00:32 +0000 (15:00 +0100)]
netfilter: xtables: consistent struct compat_xt_counters definition

There is compat_u64 type which deals with different u64 type alignment
on different compat-capable platforms, so use it and removed some
hardcoded assumptions.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoMerge branch 'master' of /repos/git/net-next-2.6
Patrick McHardy [Wed, 10 Feb 2010 13:17:10 +0000 (14:17 +0100)]
Merge branch 'master' of /repos/git/net-next-2.6

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 9 Feb 2010 19:44:44 +0000 (11:44 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

14 years agoath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k.
Vivek Natarajan [Tue, 9 Feb 2010 06:04:50 +0000 (11:34 +0530)]
ath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Retry null data frame for power save.
Vivek Natarajan [Tue, 9 Feb 2010 09:20:28 +0000 (14:50 +0530)]
mac80211: Retry null data frame for power save.

Even if the null data frame is not acked by the AP, mac80211
goes into power save. This might lead to loss of frames
from the AP.
Prevent this by restarting dynamic_ps_timer when ack is not
received for null data frames.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table()
Roel Kluin [Tue, 9 Feb 2010 11:07:41 +0000 (12:07 +0100)]
iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table()

The wrong pointer was tested.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Fix sequence numbers for PAE frames
Sujith [Tue, 9 Feb 2010 04:37:00 +0000 (10:07 +0530)]
ath9k: Fix sequence numbers for PAE frames

Currently, PAE frames are not assigned proper sequence numbers.
Since sending PAE frames as part of aggregates breaks
crupto with several APs, they are sent as normal MPDUs.
Fix the seqeuence number issue by updating the frame with the
internal sequence number.

Tested-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Tue, 9 Feb 2010 06:45:56 +0000 (22:45 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6

14 years agodrivers/net: Correct NULL test
Julia Lawall [Tue, 9 Feb 2010 06:44:18 +0000 (22:44 -0800)]
drivers/net: Correct NULL test

Test the value that was just allocated rather than the previously tested one.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression *x;
expression e;
identifier l;
@@

if (x == NULL || ...) {
    ... when forall
    return ...; }
... when != goto l;
    when != x = e
    when != &x
*x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMAINTAINERS: networking drivers - Add git net-next tree
Joe Perches [Tue, 9 Feb 2010 06:42:40 +0000 (22:42 -0800)]
MAINTAINERS: networking drivers - Add git net-next tree

During the rc period, patches that are not bugfixes
should be done using the net-next tree.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/sched: Fix module name in Kconfig
Jan Luebbe [Tue, 9 Feb 2010 06:41:44 +0000 (22:41 -0800)]
net/sched: Fix module name in Kconfig

The action modules have been prefixed with 'act_', but the Kconfig
description was not changed.

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb3: fix GRO checksum check
Divy Le Ray [Tue, 9 Feb 2010 06:37:24 +0000 (22:37 -0800)]
cxgb3: fix GRO checksum check

Verify the HW checksum state for frames handed to GRO processing.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodst: call cond_resched() in dst_gc_task()
Eric Dumazet [Mon, 8 Feb 2010 23:00:39 +0000 (15:00 -0800)]
dst: call cond_resched() in dst_gc_task()

Kernel bugzilla #15239

On some workloads, it is quite possible to get a huge dst list to
process in dst_gc_task(), and trigger soft lockup detection.

Fix is to call cond_resched(), as we run in process context.

Reported-by: Pawel Staszewski <pstaszewski@itcare.pl>
Tested-by: Pawel Staszewski <pstaszewski@itcare.pl>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: Reset dynamic ps timer in Rx path.
Vivek Natarajan [Mon, 8 Feb 2010 12:17:01 +0000 (17:47 +0530)]
mac80211: Reset dynamic ps timer in Rx path.

The current mac80211 implementation enables power save if there
is no Tx traffic for a specific timeout. Hence, PS is triggered
even if there is a continuous Rx only traffic(like UDP) going on.
This makes the drivers to wait on the tim bit in the next beacon
to awake which leads to redundant sleep-wake cycles.
Fix this by restarting the dynamic ps timer on receiving every
data packet.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
CC: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: make rate_control_alloc static
Andres Salomon [Mon, 8 Feb 2010 02:47:50 +0000 (21:47 -0500)]
mac80211: make rate_control_alloc static

rate_control_alloc is not used by anything outside of
ieee80211_init_rate_ctrl_alg.  Both are in rate.c; there's no reason to make
rate_control_alloc visible outside of it.

Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath: fix WARN_ON with Polish (Poland) Contry code
Christian Lamparter [Sun, 7 Feb 2010 15:01:55 +0000 (16:01 +0100)]
ath: fix WARN_ON with Polish (Poland) Contry code

This patch fixes a WARN_ON which is triggered
by Poland's country code.

ath: EEPROM regdomain: 0x8268
ath: EEPROM indicates we should expect a country code
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x37
ath: Country alpha2 being used: PL
ath: Regpair used: 0x37
  -----------[ cut here ]------------
WARNING: at drivers/net/wireless/ath/regd.c:155 ath_regd_init+0x30b
Pid: 12661, comm: firmware/carl91 2.6.33-rc5-wl #18
Call Trace:
 [<>] ? warn_slowpath_common+0x76/0x8c
 [<>] ? ar9170_reg_notifier+0x0/0x2d [carl9170usb]
 [<>] ? ath_regd_init+0x30b/0x377 [ath]
 [<>] ? ar9170_register+0x3b3/0x3ca [carl9170usb]
[...]
---[ end trace ]---

Note: Poland is just an example. But it is very likely
that more country codes are affected.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove get_tx_stats() driver op
Kalle Valo [Sun, 7 Feb 2010 08:22:01 +0000 (10:22 +0200)]
mac80211: remove get_tx_stats() driver op

get_tx_stats() driver operation is not currently used anywhere in mac80211
and there are no plans to use it in the not-so-near future. So it can go
without anyone missing it.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: remove get_tx_stats() mac80211 op
Kalle Valo [Sun, 7 Feb 2010 08:21:53 +0000 (10:21 +0200)]
rt2x00: remove get_tx_stats() mac80211 op

get_tx_stats() will be removed from mac80211.

Compile-tested only.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54: remove get_tx_stats() mac80211 op
Kalle Valo [Sun, 7 Feb 2010 08:21:46 +0000 (10:21 +0200)]
p54: remove get_tx_stats() mac80211 op

get_tx_stats() will be removed from mac80211.

p54 uses struct ieee80211_tx_queue_stats also internally, so create a new
identical struct p54_tx_queue_stats which the driver can use.

Compile-tested only.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Tested-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: remove get_tx_stats() mac80211 op
Kalle Valo [Sun, 7 Feb 2010 08:21:37 +0000 (10:21 +0200)]
iwlwifi: remove get_tx_stats() mac80211 op

get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43legacy: remove get_tx_stats() mac80211 op
Kalle Valo [Sun, 7 Feb 2010 17:51:00 +0000 (19:51 +0200)]
b43legacy: remove get_tx_stats() mac80211 op

get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: remove get_tx_stats() mac80211 op
Kalle Valo [Sun, 7 Feb 2010 17:50:50 +0000 (19:50 +0200)]
b43: remove get_tx_stats() mac80211 op

get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove get_tx_stats() mac80211 op
Kalle Valo [Sun, 7 Feb 2010 08:21:07 +0000 (10:21 +0200)]
ath5k: remove get_tx_stats() mac80211 op

get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoar9170: remove get_tx_stats() mac80211 op
Kalle Valo [Sun, 7 Feb 2010 08:21:00 +0000 (10:21 +0200)]
ar9170: remove get_tx_stats() mac80211 op

get_tx_stats() will be removed from mac80211.

Because ar9170 uses ieee80211_tx_queue_stats internally, create a new
identical struct ar9170_tx_queue_stats which the driver can use.

Compile-tested only.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Tested-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: remove get_tx_stats() mac80211 op
Kalle Valo [Sun, 7 Feb 2010 08:20:52 +0000 (10:20 +0200)]
mwl8k: remove get_tx_stats() mac80211 op

get_tx_stats() will be removed from mac80211.

mwl8k used struct ieee80211_tx_queue_stats internally to track the queue
lenght. Replace struct ieee80211_tx_queue_stats with a simple len field
in struct mwl8k_tx_queue. Limit and count fields seemed to be unused.

Compile-tested only.

Cc: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoadm821: remove get_tx_stats() mac80211 op
Kalle Valo [Sun, 7 Feb 2010 08:20:44 +0000 (10:20 +0200)]
adm821: remove get_tx_stats() mac80211 op

get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix keycache leak in split tkip case
Ming Lei [Sat, 6 Feb 2010 14:38:23 +0000 (22:38 +0800)]
ath9k: fix keycache leak in split tkip case

If split tkip key is used, ath_delete_key should delete
rx key and rx mic key. This patch fixes the leak of hw
keycache in the case.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix deauth race
Johannes Berg [Sat, 6 Feb 2010 14:20:13 +0000 (15:20 +0100)]
mac80211: fix deauth race

When userspace requests a deauth while the
authentication work is pending in the auth
(not probe) state, we do not properly abort
the work and then things get confused.

Fix that and also improve the checks here
to include the correct virtual interface,
just in case two virtual interfaces would
ever try to connect to the same BSS.

Also fix a bug -- need to use list_del_rcu
instead of just list_del to free a work
item.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: Send broadcast probe request only when asked to
Samuel Ortiz [Fri, 5 Feb 2010 19:33:48 +0000 (11:33 -0800)]
iwlwifi: Send broadcast probe request only when asked to

When running directed active scans we currently end up sending both the SSID
probe requests and an additional broadcast one.
This is due to the fact that we always leave the probe request template SSID IE
length to 0. Instead we should set it to the first SSID to scan, and fill the
direct_scan array with the remaining SSIDs to scan for. This way we only send
what we've been asked to: a broadcast probe request when no directed scan is
requested, and directed probe requests otherwise.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: Add chain_noise support for 6050
Ben Cahill [Fri, 5 Feb 2010 19:33:47 +0000 (11:33 -0800)]
iwlwifi: Add chain_noise support for 6050

Existing iwl6050_ops->iwl6050_hcmd_utils structure had no pointers to chain
noise functions (gain_computation and chain_noise_reset).  As it turns out,
by adding chain_noise_scale (see related patch), there is no need for separate
chain noise function, so simply use iwl6000_ops->iwl5000_hcmd_utils, and
remove those for 6050.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: Add chain noise scaling factor
Ben Cahill [Fri, 5 Feb 2010 19:33:46 +0000 (11:33 -0800)]
iwlwifi: Add chain noise scaling factor

6x50 device requires a different scaling factor for Rx gain values sent to
device via PHY_CALIBRATION_CMD (CHAIN_NOISE_GAIN_CMD).  Rather than create
a new iwlXXXX_gain_computation() function, add new chain_noise_scale member
to struct iwl_cfg, and keep using iwl5000_gain_computation().

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix bss_conf.dtim_period
Johannes Berg [Fri, 5 Feb 2010 10:45:06 +0000 (11:45 +0100)]
mac80211: fix bss_conf.dtim_period

In AP mode, the only mode where the parameter
is supposed to be valid, we never assign it!
Fix that to allow drivers to avoid parsing
the TIM IE for the value.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Added a new debugfs file for reading channel_type
Benoit Papillault [Thu, 4 Feb 2010 21:00:20 +0000 (22:00 +0100)]
mac80211: Added a new debugfs file for reading channel_type

This file helps debugging HT channels since it displays if we are on
ht20 or ht40+/ht40-

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: don't retry commands
Holger Schurig [Thu, 4 Feb 2010 13:37:45 +0000 (14:37 +0100)]
libertas: don't retry commands

Retrying commands seldomly works, most often the firmware is in a
weird state anyway and needs the device to reset. So it's better
to report the broken state back to user-space.

Also rename command_timer_fn() into lbs_cmd_timeout_handler(),
which better reflect it's usage.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: fix txop unit
Kalle Valo [Thu, 4 Feb 2010 13:33:25 +0000 (15:33 +0200)]
wl1251: fix txop unit

mac80211 uses unit units of 32 usec with txop but wl1251_acx_ac_cfg()
expects it to be usecs. This fortunately didn't cause any severe problems,
only that firmware was using incorrect WMM settings.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: handle allocation fail in samples generation
Rafał Miłecki [Thu, 4 Feb 2010 12:11:54 +0000 (13:11 +0100)]
b43: N-PHY: handle allocation fail in samples generation

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: load generated samples
Rafał Miłecki [Thu, 4 Feb 2010 12:08:08 +0000 (13:08 +0100)]
b43: N-PHY: load generated samples

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: partly implement SPUR workaround
Rafał Miłecki [Thu, 4 Feb 2010 11:23:12 +0000 (12:23 +0100)]
b43: N-PHY: partly implement SPUR workaround

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: save calibration for further restore
Rafał Miłecki [Thu, 4 Feb 2010 11:23:11 +0000 (12:23 +0100)]
b43: N-PHY: save calibration for further restore

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: prepare code for reapplying TX cal coeffs
Rafał Miłecki [Thu, 4 Feb 2010 11:23:10 +0000 (12:23 +0100)]
b43: N-PHY: prepare code for reapplying TX cal coeffs

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement overriding RF control intc
Rafał Miłecki [Thu, 4 Feb 2010 11:23:08 +0000 (12:23 +0100)]
b43: N-PHY: implement overriding RF control intc

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas/if_spi: needs linux/semaphore.h
Randy Dunlap [Wed, 3 Feb 2010 23:31:07 +0000 (15:31 -0800)]
libertas/if_spi: needs linux/semaphore.h

libertas/if_spi.c needs to #include linux/semaphore.h to fix build errors:

drivers/net/wireless/libertas/if_spi.c:59: error: field 'spi_ready' has incomplete type
drivers/net/wireless/libertas/if_spi.c:60: error: field 'spi_thread_terminated' has incomplete type
drivers/net/wireless/libertas/if_spi.c:785: error: implicit declaration of function 'down_interruptible'
drivers/net/wireless/libertas/if_spi.c:787: error: implicit declaration of function 'up'
drivers/net/wireless/libertas/if_spi.c:834: error: implicit declaration of function 'down'
drivers/net/wireless/libertas/if_spi.c:943: error: implicit declaration of function 'sema_init'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agossb: fix interrupt assignment
Jochen Friedrich [Wed, 3 Feb 2010 20:28:11 +0000 (21:28 +0100)]
ssb: fix interrupt assignment

Explicitely enable shared interrupt 2 for any core that didn't get a dedicated IRQ
anymore (fallthrough case) and for EXTIF cores to make gpio interrupts work.
Also remove a bogus comment.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43/b43legacy: Wake queues in wireless_core_start
Larry Finger [Wed, 3 Feb 2010 19:33:44 +0000 (13:33 -0600)]
b43/b43legacy: Wake queues in wireless_core_start

If b43 or b43legacy are deauthenticated or disconnected, there is a
possibility that a reconnection is tried with the queues stopped in
mac80211. To prevent this, start the queues before setting
STAT_INITIALIZED.

In b43, a similar change has been in place (twice) in the
wireless_core_init() routine. Remove the duplicate and add similar
code to b43legacy.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org> [2.6.32]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: tear down all agg queues when restart/reconfig hw
Wey-Yi Guy [Wed, 3 Feb 2010 17:28:55 +0000 (09:28 -0800)]
mac80211: tear down all agg queues when restart/reconfig hw

When there is a need to restart/reconfig hw, tear down all the
aggregation queues and let the mac80211 and driver get in-sync to have
the opportunity to re-establish the aggregation queues again.

Need to wait until driver re-establish all the station information before tear
down the aggregation queues, driver(at least iwlwifi driver) will reject the
stop aggregation queue request if station is not ready. But also need to make
sure the aggregation queues are tear down before waking up the queues, so
mac80211 will not sending frames with aggregation bit set.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Enable TIM timer interrupt only when needed.
Senthil Balasubramanian [Wed, 3 Feb 2010 17:21:13 +0000 (22:51 +0530)]
ath9k: Enable TIM timer interrupt only when needed.

The TIM timer interrupt is enabled even before the ACK of nullqos
is received which is unnecessary.

Also clean up the CONF_PS part of config callback properly for
better readability.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: configure the beacon only if the STA is associated
Senthil Balasubramanian [Wed, 3 Feb 2010 17:20:18 +0000 (22:50 +0530)]
ath9k: configure the beacon only if the STA is associated

beacons configuration SHOULD be done only if the STA is associated.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: allow station add/remove to sleep
Johannes Berg [Wed, 3 Feb 2010 12:59:58 +0000 (13:59 +0100)]
mac80211: allow station add/remove to sleep

Many drivers would like to sleep during station
addition and removal, and currently have a high
complexity there from not being able to.

This introduces two new callbacks sta_add() and
sta_remove() that drivers can implement instead
of using sta_notify() and that can sleep, and
the new sta_add() callback is also allowed to
fail.

The reason we didn't do this previously is that
the IBSS code wants to insert stations from the
RX path, which is a tasklet, so cannot sleep.
This patch will keep the station allocation in
that path, but moves adding the station to the
driver out of line. Since the addition can now
fail, we can have IBSS peer structs the driver
rejected -- in that case we still talk to the
station but never tell the driver about it in
the control.sta pointer. If there will ever be
a driver that has a low limit on the number of
stations and that cannot talk to any stations
that are not known to it, we need to do come up
with a new strategy of handling larger IBSSs,
maybe quicker expiry or rejecting peers.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: don't probe if we have probe response
Johannes Berg [Wed, 3 Feb 2010 12:57:46 +0000 (13:57 +0100)]
mac80211: don't probe if we have probe response

We can now easily determine whether we already
have probe response information for the BSS we
are asked to connect to, in which case there's
little point in probing the BSS again.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: update radiotap parser
Johannes Berg [Wed, 3 Feb 2010 09:24:30 +0000 (10:24 +0100)]
wireless: update radiotap parser

Upstream radiotap has adopted the namespace
proposal David Young made and I then took care
of, for which I had adapted the radiotap parser
as a library outside the kernel. This brings
the in-kernel parser up to speed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211_hwsim: add fake hw scan handler
Johannes Berg [Wed, 3 Feb 2010 09:47:55 +0000 (10:47 +0100)]
mac80211_hwsim: add fake hw scan handler

For debugging hardware scan trigger/complete
functionality, it was useful to have code in
hwsim that pretends to do a hardware scan.

This code could be extended to actually do the
scan, but for now it was sufficient for me to
only pretend. Since hwsim was written to ease
debugging, it only makes sense to add it to it
permanently.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Mon, 8 Feb 2010 21:38:38 +0000 (16:38 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

Conflicts:
net/mac80211/scan.c

14 years agomac80211: fix deferred hardware scan requests
Johannes Berg [Wed, 3 Feb 2010 09:22:31 +0000 (10:22 +0100)]
mac80211: fix deferred hardware scan requests

Reinette found the reason for the warnings that
happened occasionally when a hw-offloaded scan
finished; her description of the problem:

  mac80211 will defer the handling of scan requests if it is
  busy with management work at the time. The scan requests
  are deferred and run after the work has completed. When
  this occurs there are currently two problems.

  * The scan request for hardware scan is not fully populated
    with the band and channels to scan not initialized.

  * When the scan is queued the state is not correctly updated
    to reflect that a scan is in progress. The problem here is
    that when the driver completes the scan and calls
    ieee80211_scan_completed() a warning will be triggered
    since mac80211 was not aware that a scan was in progress.

The reason is that the queued scan work will start
the hw scan right away when the hw_scan_req struct
has already been allocated. However, in the first
pass it will not have been filled, which happens
at the same time as setting the bits. To fix this,
simply move the allocation after the pending work
test as well, so that the first iteration of the
scan work will call __ieee80211_start_scan() even
in the hardware scan case.

Bug-identified-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>