pandora-kernel.git
16 years agoiwlwifi: removing unused priv->config
Tomas Winkler [Sat, 1 Mar 2008 23:25:59 +0000 (01:25 +0200)]
iwlwifi: removing unused priv->config

This patch removes unused variable in iwlYYYY_priv

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agossb: Add Gigabit Ethernet driver
Michael Buesch [Fri, 29 Feb 2008 10:36:12 +0000 (11:36 +0100)]
ssb: Add Gigabit Ethernet driver

This adds the Gigabit Ethernet driver for the SSB
Gigabit Ethernet core. This driver actually is a frontend to
the Tigon3 driver. So the real work is done by tg3.
This device is used in the Linksys WRT350N.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix hardware scan completion
Johannes Berg [Wed, 5 Mar 2008 09:58:40 +0000 (10:58 +0100)]
mac80211: fix hardware scan completion

The mac80211 MLME requires restarting timers after a scan
completes but this wasn't done when hardware scan offload
was added, so add it now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Bill Moss <bmoss@clemson.edu>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix mesh_path and sta_info get_by_idx functions
Luis Carlos Cobo [Sat, 1 Mar 2008 01:51:25 +0000 (17:51 -0800)]
mac80211: fix mesh_path and sta_info get_by_idx functions

Skip properly entries whose dev does not match.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: path IE fields macros, fix alignment problems and clean up
Luis Carlos Cobo [Sat, 1 Mar 2008 01:07:54 +0000 (17:07 -0800)]
mac80211: path IE fields macros, fix alignment problems and clean up

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: add PLINK_ prefix and kernel doc to enum plink_state
Luis Carlos Cobo [Fri, 29 Feb 2008 23:46:08 +0000 (15:46 -0800)]
mac80211: add PLINK_ prefix and kernel doc to enum plink_state

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: always force mesh_path deletions
Luis Carlos Cobo [Fri, 29 Feb 2008 23:04:13 +0000 (15:04 -0800)]
mac80211: always force mesh_path deletions

Postponing the deletion is not really useful anymore.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: delete mesh_path timer on mesh_path removal
Luis Carlos Cobo [Fri, 29 Feb 2008 22:49:37 +0000 (14:49 -0800)]
mac80211: delete mesh_path timer on mesh_path removal

This avoids dereferencing a no longer existing struct mesh_path.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: clean up use of endianness conversion functions
Luis Carlos Cobo [Fri, 29 Feb 2008 22:30:32 +0000 (14:30 -0800)]
mac80211: clean up use of endianness conversion functions

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: breakdown mesh network attributes in different extra fields for wext
Luis Carlos Cobo [Fri, 29 Feb 2008 20:32:46 +0000 (12:32 -0800)]
mac80211: breakdown mesh network attributes in different extra fields for wext

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: move comment to better location
Luis Carlos Cobo [Fri, 29 Feb 2008 20:20:39 +0000 (12:20 -0800)]
mac80211: move comment to better location

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix incorrect parenthesis
Luis Carlos Cobo [Fri, 29 Feb 2008 20:15:28 +0000 (12:15 -0800)]
mac80211: fix incorrect parenthesis

Pointed out by Johannes Berg.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix mesh endianness sparse warnings and unmark it as broken
Luis Carlos Cobo [Fri, 29 Feb 2008 20:13:38 +0000 (12:13 -0800)]
mac80211: fix mesh endianness sparse warnings and unmark it as broken

This patch fixes all the mesh related endianness warnings reported by sparse. As
they were the reason why Johannes marked mesh as BROKEN, that flag has been
removed.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: always insert key into list
Johannes Berg [Sat, 1 Mar 2008 18:32:18 +0000 (19:32 +0100)]
mac80211: always insert key into list

Today I hit one of my new WARN_ONs in the mac80211 code because
a key wasn't being freed correctly. After wondering for a while
I finally tracked it to the fact that STA keys aren't added to
the per-sdata key list correctly, they are supposed to always be
on that list, not just for default keys. This patch fixes that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: verify sta_notify mac80211 callback
Johannes Berg [Mon, 25 Feb 2008 15:27:50 +0000 (16:27 +0100)]
b43: verify sta_notify mac80211 callback

This helps verify that nothing bad is going on in mac80211,
it is unfortunately not possible to implement this generically
in mac80211 easily because there we can't assume that we only
have a single vif which b43 currently can assume.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix sta_info mesh timer bug
Johannes Berg [Wed, 27 Feb 2008 08:56:40 +0000 (09:56 +0100)]
mac80211: fix sta_info mesh timer bug

I noticed a bug I introduced when mesh is enabled: sta_info_destroy()
will end up calling cancel_timer() on a timer that has never been
initialized because the timer is only initialized in mesh_plink_alloc(),
not in sta_info_alloc(). This patch moves the initialization of all mesh
related fields into sta_info_alloc(), adds a bit of sanity checking to
the cfg80211 handlers and sta_info_insert() and makes mesh_plink_alloc()
a static helper function that is only used from the mesh plink code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: add documentation book
Johannes Berg [Tue, 26 Feb 2008 13:34:06 +0000 (14:34 +0100)]
mac80211: add documentation book

Quite a while ago I started this book. The required kernel-doc
patches have since gone into the tree so it is now possible to
build the book in mainline.

The actual documentation is still rather incomplete and not all
things are linked into the book, but this enables us to edit
the documentation collaboratively, hopefully driver authors can
add documentation based on their experience with mac80211.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: don't clear next_hop in path reclaim
Johannes Berg [Tue, 26 Feb 2008 09:53:57 +0000 (10:53 +0100)]
mac80211: don't clear next_hop in path reclaim

Luis pointed out that this path is going to be freed right
away anyway so there's no point in assigning next_hop.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: remove STA entries when taking down interface
Johannes Berg [Mon, 25 Feb 2008 15:27:49 +0000 (16:27 +0100)]
mac80211: remove STA entries when taking down interface

When we take down an interface, we need to remove the STA info
items that belong to it because otherwise we might invoke a
sta_notify() callback in the driver when we later delete the
STA entries, but in that case the driver will already have
removed its knowledge of the interface they belonged to leading
to confusion. Also, we could invoke the set_tim() callback after
the driver removed its knowledge of the interface, which can
lead to a crash if it requests a beacon with a then-invalid vif
pointer!

A side effect of this patch is that, because it was easier, it
disallows changing the WDS peer while an interface is up. Should
that actually be necessary, it can be added back, but the WDS
peer STA entry may not be added while the interface is UP so for
now I've simplified the WDS peer's STA entry lifetime management.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: clean up sta_info and document locking
Johannes Berg [Mon, 25 Feb 2008 15:27:48 +0000 (16:27 +0100)]
mac80211: clean up sta_info and document locking

This patch cleans up the sta_info struct and documents how
each set of variables is locked. Notably, flags locking is
completely missing. It also adds kernel-doc for some (but
not all yet) members of the struct.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: split sta_info_add
Johannes Berg [Mon, 25 Feb 2008 15:27:47 +0000 (16:27 +0100)]
mac80211: split sta_info_add

sta_info_add() has two functions: allocating a station info
structure and inserting it into the hash table/list. Splitting
these two functions allows allocating with GFP_KERNEL in many
places instead of GFP_ATOMIC which is now required by the RCU
protection. Additionally, in many places RCU protection is now
no longer needed at all because between sta_info_alloc() and
sta_info_insert() the caller owns the structure.

This fixes a few race conditions with setting initial flags
and similar, but not all (see comments in ieee80211_sta.c and
cfg.c). More documentation on the existing races will be in
a follow-up patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: RCU-ify STA info structure access
Johannes Berg [Mon, 25 Feb 2008 15:27:46 +0000 (16:27 +0100)]
mac80211: RCU-ify STA info structure access

This makes access to the STA hash table/list use RCU to protect
against freeing of items. However, it's not a true RCU, the
copy step is missing: whenever somebody changes a STA item it
is simply updated. This is an existing race condition that is
now somewhat understandable.

This patch also fixes the race key freeing vs. STA destruction
by making sure that sta_info_destroy() is always called under
RTNL and frees the key.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: split ieee80211_txrx_data
Johannes Berg [Mon, 25 Feb 2008 15:27:43 +0000 (16:27 +0100)]
mac80211: split ieee80211_txrx_data

Split it into ieee80211_tx_data and ieee80211_rx_data to clarify
usage/flag usage and remove the stupid union thing.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: reorder a few fields in sta_info
Johannes Berg [Mon, 25 Feb 2008 21:17:30 +0000 (22:17 +0100)]
mac80211: reorder a few fields in sta_info

Three __le16s followed by an enum (int) leave a two-byte hole
of padding which we can use for two of the other fields.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix kernel-doc comment for mesh_plink_deactivate
Johannes Berg [Mon, 25 Feb 2008 20:36:27 +0000 (21:36 +0100)]
mac80211: fix kernel-doc comment for mesh_plink_deactivate

Accidentally copied in a __mesh_plink_deactivate, noticed by Luis
Carlos Cobo.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: clean up mesh RX path a bit more
Johannes Berg [Mon, 25 Feb 2008 15:24:38 +0000 (16:24 +0100)]
mac80211: clean up mesh RX path a bit more

Moves another ifdef into the sta_info header file in favour of
compiling more code even w/o CONFIG_MAC80211_MESH.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: export mesh_plink_broken
Johannes Berg [Mon, 25 Feb 2008 15:15:06 +0000 (16:15 +0100)]
mac80211: export mesh_plink_broken

This needs to be exported because rate control algorithms
can be modular.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: clarify mesh Kconfig
Johannes Berg [Mon, 25 Feb 2008 09:13:31 +0000 (10:13 +0100)]
mac80211: clarify mesh Kconfig

This clarifies that the mesh networking code is currently
based on Draft 1.08 of the 802.11 Mesh Networking amendment.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: add missing "break" statement in mesh code
Johannes Berg [Mon, 25 Feb 2008 09:11:50 +0000 (10:11 +0100)]
mac80211: add missing "break" statement in mesh code

This inserts a missing break statement which, if hit, would cause
the code to fall-through and unlock a spinlock twice. Noticed via
sparse's "lock count wrong in basic block" warning and careful
code inspection.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: enable mesh in Kconfig
Johannes Berg [Sat, 23 Feb 2008 14:17:21 +0000 (15:17 +0100)]
mac80211: enable mesh in Kconfig

Currently marked BROKEN because of endianness problems.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: mesh hwmp locking fixes
Johannes Berg [Sat, 23 Feb 2008 14:17:20 +0000 (15:17 +0100)]
mac80211: mesh hwmp locking fixes

This fixes missing unlocks noticed by sparse.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: clean up mesh code
Johannes Berg [Sat, 23 Feb 2008 14:17:19 +0000 (15:17 +0100)]
mac80211: clean up mesh code

Various cleanups, reducing the #ifdef mess and other things.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: complete the mesh (interface handling) code
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:18 +0000 (15:17 +0100)]
mac80211: complete the mesh (interface handling) code

This completes the mesh interface handling code and a few other
bits about the mac80211 module.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: mesh path and mesh peer configuration
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:17 +0000 (15:17 +0100)]
mac80211: mesh path and mesh peer configuration

This adds code to allow adding mesh interfaces and configuring
mesh peers etc. Also, it adds code for station dumping.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: mesh statistics and config through debugfs
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:16 +0000 (15:17 +0100)]
mac80211: mesh statistics and config through debugfs

This patch contains the debugfs code for mesh statistics and configuration
parameters. Please note that generic support for r/w debugfs attributes has been
added.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: code for on-demand Hybrid Wireless Mesh Protocol
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:15 +0000 (15:17 +0100)]
mac80211: code for on-demand Hybrid Wireless Mesh Protocol

This file implements the on-demand Hybrid Wireless Mesh Protocol, at this moment
using hop-count as the metric. When no mesh path exists for a given destination
or the mesh path is not active, frames addressed to that destination will be
queued and a Path Request frame will be sent. Queued frames will be sent when
the path is resolved (usually after reception of a Path Response) or discarded
if discovery times out. Path Requests will also be sent to refresh paths that
are being used and are close to expiring.

Path Errors are sent when a path discovery process triggered by the attempt to
forward a frame originated in a different mesh point times out. Path Errors are
also sent when a peer link is determined to be unreachable because of high error
rates.

Multiple destination support in Path Requests and Path Errors and precursors
have not been implemented yet.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: mesh path table implementation
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:14 +0000 (15:17 +0100)]
mac80211: mesh path table implementation

The mesh path table associates destinations with the next hop to reach them. The
table is a hash of linked lists protected by rcu mechanisms. Every mesh path
contains a lock to protect the mesh path state.

Each outgoing mesh frame requires a look up into this table. Therefore, the
table it has been designed so it is not necessary to hold any lock to find the
appropriate next hop.

If the path is determined to be active within a rcu context we can safely
dereference mpath->next_hop->addr, since it holds a reference to the sta
next_hop. After a mesh path has been set active for the first time it next_hop
must always point to a valid sta.  If this is not possible the mpath must be
deleted or replaced in a RCU safe fashion.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: mesh peer link implementation
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:13 +0000 (15:17 +0100)]
mac80211: mesh peer link implementation

This file implements mesh discovery and peer link establishment support using
the mesh peer link table provided in mesh_plinktbl.c.

Secure peer links have not been implemented yet.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: mesh changes to the MLME
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:12 +0000 (15:17 +0100)]
mac80211: mesh changes to the MLME

This includes support for mesh network scanning. The ugly code in
ieee80211_sta_scan_result() is my approach to work around wext. This has been
tested with wireless tools version 29 and works as expected (the new interface
mode is just not shown).

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: mesh data structures and first mesh changes
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:11 +0000 (15:17 +0100)]
mac80211: mesh data structures and first mesh changes

Includes integration in struct sta_info of mesh peer link elements, previously
on their own mesh peer link table.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: support for mesh interfaces in mac80211 data path
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:10 +0000 (15:17 +0100)]
mac80211: support for mesh interfaces in mac80211 data path

This changes the TX/RX paths in mac80211 to support mesh interfaces.
This code will be cleaned up later again before being enabled.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: support functions for mesh
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:09 +0000 (15:17 +0100)]
mac80211: support functions for mesh

The two important features coded in mesh.c are:

Recently Multicast Cache: in on-demand HWMP, multicast traffic is retransmitted
by every receiving node. Even though a mesh TTL counter avoids infinite loops,
it is also necessary to avoid traffic explosion by keeping a cache of multicast
mesh frame that have been received recently. With this feature, maximum number
of retransmissions of a multicast frame for the case of N nodes within the range
of each other would be N. Without it, the maximum number of retransmissions
would be in the order of N^(MESH_TTL - 1).

Code to support mesh tables.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: mesh function and data structures definitions
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:08 +0000 (15:17 +0100)]
mac80211: mesh function and data structures definitions

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: add mesh interface type
Johannes Berg [Sat, 23 Feb 2008 14:17:07 +0000 (15:17 +0100)]
mac80211: add mesh interface type

This adds the mesh interface type.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agonl80211/cfg80211: support for mesh, sta dumping
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:06 +0000 (15:17 +0100)]
nl80211/cfg80211: support for mesh, sta dumping

Added support for mesh id and mesh path operation as well as
station structure dumping.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoWEXT: add mesh interface type
Johannes Berg [Sat, 23 Feb 2008 14:17:05 +0000 (15:17 +0100)]
WEXT: add mesh interface type

This introduces a new WEXT type IW_MODE_MESH for mesh networks,
used for scan results.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: various definitions for mesh networking
Luis Carlos Cobo [Sat, 23 Feb 2008 14:17:04 +0000 (15:17 +0100)]
wireless: various definitions for mesh networking

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[IPV6]: Fix powerpc allmodconfig build warnings.
David S. Miller [Thu, 6 Mar 2008 04:58:10 +0000 (20:58 -0800)]
[IPV6]: Fix powerpc allmodconfig build warnings.

Introduced by changeset 95e41e93e18d8e1e272ce23d96bae4f17ce11d42
("[IPV6]: Make ndisc_flow_init() common for later use.")

Reported by Stephen Rothwell.

In file included from net/ipv6/netfilter/ip6_tables.c:21:
include/linux/icmpv6.h:192: warning: 'struct in6_addr' declared inside parameter list
include/linux/icmpv6.h:192: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: replace remaining __FUNCTION__ occurrences
Harvey Harrison [Thu, 6 Mar 2008 04:47:47 +0000 (20:47 -0800)]
net: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoCOSA/SRP: convert channel_data.rsem to mutex
Matthias Kaehlcke [Thu, 6 Mar 2008 02:53:01 +0000 (18:53 -0800)]
COSA/SRP: convert channel_data.rsem to mutex

COSA/SRP driver: The semaphore channel_data.rsem is used as a mutex,
convert it to the mutex API

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Add 'rtable' field in struct sk_buff to alias 'dst' and avoid casts
Eric Dumazet [Thu, 6 Mar 2008 02:30:47 +0000 (18:30 -0800)]
[IPV4]: Add 'rtable' field in struct sk_buff to alias 'dst' and avoid casts

(Anonymous) unions can help us to avoid ugly casts.

A common cast it the (struct rtable *)skb->dst one.

Defining an union like  :
union {
     struct dst_entry *dst;
     struct rtable *rtable;
};
permits to use skb->rtable in place.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Remove commented lines.
Daniel Lezcano [Wed, 5 Mar 2008 20:37:29 +0000 (12:37 -0800)]
[IPV6]: Remove commented lines.

Remove commented lines from netns patchset.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 5 Mar 2008 20:26:41 +0000 (12:26 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:

net/mac80211/rc80211_pid_algo.c

16 years ago[NETNS][IPV6] icmp6 - make icmpv6_socket per namespace
Benjamin Thery [Wed, 5 Mar 2008 18:49:18 +0000 (10:49 -0800)]
[NETNS][IPV6] icmp6 - make icmpv6_socket per namespace

This patch make the changes necessary to support network namespaces in
ICMPv6.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] ip6_input - enable ipv6_rcv to handle several network namespace
Daniel Lezcano [Wed, 5 Mar 2008 18:48:56 +0000 (10:48 -0800)]
[NETNS][IPV6] ip6_input - enable ipv6_rcv to handle several network namespace

The different subsystem of ipv6 are ready for namespaces, so let's
activate it for ipv6_rcv.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - pass always a valid socket to ip6_dst_lookup
Daniel Lezcano [Wed, 5 Mar 2008 18:48:35 +0000 (10:48 -0800)]
[NETNS][IPV6] route6 - pass always a valid socket to ip6_dst_lookup

The ip6_dst_lookup receive a socket as parameter. In some part of the code
it is called with a NULL socket parameter. We want to rely on the socket
to retrieve the network namespace, so we always pass a valid socket in all
cases.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - add netns parameter to ip6_route_output
Daniel Lezcano [Wed, 5 Mar 2008 18:48:10 +0000 (10:48 -0800)]
[NETNS][IPV6] route6 - add netns parameter to ip6_route_output

Add an netns parameter to ip6_route_output. That will allow to access
to the right routing table for outgoing traffic.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] addrconf - make addrconf per namespace
Benjamin Thery [Wed, 5 Mar 2008 18:47:47 +0000 (10:47 -0800)]
[NETNS][IPV6] addrconf - make addrconf per namespace

All the infrastructure to propagate the network namespace information
is ready. Make use of it.

There is a special case here between the initial network namespace and
the other namespaces:

* When ipv6 is initialized at boot time (aka in the init_net), it
registers to the notifier callback. So addrconf_notify will be called
as many time as there are network devices setup on the system and the
function will add ipv6 addresses to the network devices. But the first
device which needs to have its ipv6 address setup is the loopback,
unfortunatly this is not the case. So the loopback address is setup
manually in the ipv6 init function.

* With the network namespace, this ordering problem does not appears
because notifier is already setup and active, so as soon as we
register the loopback the ipv6 address is setup and it will be the
first device.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] addrconf - Pass the proper network namespace parameters to addrconf
Daniel Lezcano [Wed, 5 Mar 2008 18:46:57 +0000 (10:46 -0800)]
[NETNS][IPV6] addrconf - Pass the proper network namespace parameters to addrconf

This patch propagates the network namespace pointer to the address
configuration routines which need it, which means adding a new
parameter to these functions, and make them use it instead of using
the initial network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] proc - protect snmp6 from non-init_net calls
Daniel Lezcano [Wed, 5 Mar 2008 18:46:31 +0000 (10:46 -0800)]
[NETNS][IPV6] proc - protect snmp6 from non-init_net calls

This patchset avoids creation of the /proc entry for snmp6 when
the call is made from a network namespace different from the init_net.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] af_inet6 - allow socket creation per namespace
Benjamin Thery [Wed, 5 Mar 2008 18:45:59 +0000 (10:45 -0800)]
[NETNS][IPV6] af_inet6 - allow socket creation per namespace

Allow creation of IPv6 raw and datagram sockets in network namespaces
other than init_net.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] Move sysctl initialization later on in the IPv6 init sequence
Benjamin Thery [Wed, 5 Mar 2008 18:45:36 +0000 (10:45 -0800)]
[NETNS][IPV6] Move sysctl initialization later on in the IPv6 init sequence

This patch moves initialization of IPv6 sysctl stuff at the end of
IPv6 initialization.

This will be helpful for network namespaces where some sysctl entries
depend on per-namespace variables, that need to be allocated and
initialized before they are referenced by sysctl.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomake s2io.c:init_tti() static
Adrian Bunk [Tue, 4 Mar 2008 23:19:22 +0000 (15:19 -0800)]
make s2io.c:init_tti() static

Make the needlessly global init_tti() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: "Ramkrishna Vepa" <Ramkrishna.Vepa@neterion.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoFIXED_PHY must depend on PHYLIB=y
Adrian Bunk [Wed, 27 Feb 2008 15:07:54 +0000 (17:07 +0200)]
FIXED_PHY must depend on PHYLIB=y

This patch fixes the following build error introduced by commit
a79d8e93d300adb84cccc38ac396cfb118c238ad and reported by Olaf Hering:

<--  snip  -->

...
  LD      .tmp_vmlinux1
arch/powerpc/sysdev/built-in.o: In function `of_add_fixed_phys':
fsl_soc.c:(.init.text+0xd34): undefined reference to `fixed_phy_add'
make: *** [.tmp_vmlinux1] Error 1

<--   snip  -->

Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agofix drivers/net/atarilance.c compilation
Adrian Bunk [Mon, 3 Mar 2008 21:34:13 +0000 (23:34 +0200)]
fix drivers/net/atarilance.c compilation

This patch fixes the following build error:

<--  snip  -->

...
  CC [M]  drivers/net/atarilance.o
{standard input}: Assembler messages:
{standard input}:406: Error: symbol `Lberr' is already defined
{standard input}:460: Error: symbol `Lberr' is already defined
make[3]: *** [drivers/net/atarilance.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoIntel ethernet adapter: Update MAINTAINERS
Auke Kok [Mon, 3 Mar 2008 22:37:47 +0000 (14:37 -0800)]
Intel ethernet adapter: Update MAINTAINERS

Another team member unfortunately left: update MAINTAINERS.

Condense the 3 lists down to a single list for all our drivers.

Point to our new sourceforge index page which is slightly
better navigateable than the sf.net project page.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoixgbe: fix typo in speed mesage
Emil Tantilov [Mon, 3 Mar 2008 22:37:42 +0000 (14:37 -0800)]
ixgbe: fix typo in speed mesage

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoe100: Do suspend/shutdown like e1000
Auke Kok [Mon, 3 Mar 2008 22:37:31 +0000 (14:37 -0800)]
e100: Do suspend/shutdown like e1000

This fixes a "trying to free already free IRQ" message and simplifies
the shutdown/suspend code by re-using already existing code when going
to suspend. The code is now symmetric with e100_resume.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoehea: Fix missing Kconfig dependency
Thomas Klein [Mon, 3 Mar 2008 12:52:06 +0000 (13:52 +0100)]
ehea: Fix missing Kconfig dependency

Fixed Kconfig: ehea driver requires sparse mem

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoaxnet_cs: change debugging level for "Too much work at interrupt" message.
Komuro [Sat, 1 Mar 2008 01:52:03 +0000 (10:52 +0900)]
axnet_cs: change debugging level for "Too much work at interrupt" message.

This message is frequently displayed even if normal file-transfer.

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agomv643xx_eth: Define module alias for platform device
Martin Michlmayr [Thu, 28 Feb 2008 20:11:48 +0000 (21:11 +0100)]
mv643xx_eth: Define module alias for platform device

The mv643xx_eth driver can be loaded as a platform device, as is done by
various Orion (ARM) based devices.  The driver needs to define a module
alias for the platform driver so udev will load it automatically.
Tested with Debian on a QNAP TS-209.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agode2104x: remove BUG_ON() when changing media type
Ondrej Zary [Mon, 25 Feb 2008 17:45:46 +0000 (18:45 +0100)]
de2104x: remove BUG_ON() when changing media type

When the chip dies (probably because of a bug somewhere in the driver),
de_stop_rxtx() fails and changing the media type crashes the whole machine.
Replace BUG_ON() in de_set_media() with a warning.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodm9161: add configuration for MII/RMII
frederic Rodo [Wed, 27 Feb 2008 11:58:37 +0000 (12:58 +0100)]
dm9161: add configuration for MII/RMII

Signed-off-by: Frederic Rodo <f.rodo@til-technologies.fr>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[IPCONFIG]: The kernel gets no IP from some DHCP servers
Stephen Hemminger [Wed, 5 Mar 2008 01:03:49 +0000 (17:03 -0800)]
[IPCONFIG]: The kernel gets no IP from some DHCP servers

From: Stephen Hemminger <shemminger@linux-foundation.org>

Based upon a patch by Marcel Wappler:

   This patch fixes a DHCP issue of the kernel: some DHCP servers
   (i.e.  in the Linksys WRT54Gv5) are very strict about the contents
   of the DHCPDISCOVER packet they receive from clients.

   Table 5 in RFC2131 page 36 requests the fields 'ciaddr' and
   'siaddr' MUST be set to '0'.  These DHCP servers ignore Linux
   kernel's DHCP discovery packets with these two fields set to
   '255.255.255.255' (in contrast to popular DHCP clients, such as
   'dhclient' or 'udhcpc').  This leads to a not booting system.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Wed, 5 Mar 2008 00:44:01 +0000 (16:44 -0800)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-2.6

16 years agob43legacy: Fix module init message
Michael Buesch [Tue, 4 Mar 2008 19:31:13 +0000 (20:31 +0100)]
b43legacy: Fix module init message

This fixes the module init message to tell that the legacy
driver loaded. This makes it less confusing, in case both drivers are loaded.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agorndis_wlan: fix broken data copy
Jussi Kivilinna [Tue, 4 Mar 2008 18:05:27 +0000 (20:05 +0200)]
rndis_wlan: fix broken data copy

Replace broken code that attempted to copy 6 byte array to 64-bit
integer. Due to missing cast to 64-bit integer, left shift operation
were 32-bit and lead to bytes been copied over each other. New code
uses simple memcpy, for greater readability and efficiency.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: compare the current command with response
Sebastian Siewior [Tue, 4 Mar 2008 17:22:27 +0000 (18:22 +0100)]
libertas: compare the current command with response

instead of with itself.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: fix sanity check on sequence number in command response
David Woodhouse [Mon, 3 Mar 2008 11:20:12 +0000 (12:20 +0100)]
libertas: fix sanity check on sequence number in command response

Slightly more useful if we compare it against the sequence number of the
command we have outstanding, rather than comparing the reply with itself.

Doh. Pointed out by Sebastian Siewior

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54: fix eeprom parser length sanity checks
Johannes Berg [Fri, 29 Feb 2008 22:28:25 +0000 (23:28 +0100)]
p54: fix eeprom parser length sanity checks

When I called p54_parse_eeprom() on a hand-coded structure
I managed to make a small mistake with wrap->len which caused
a segfault a few lines down when trying to read entry->len.
This patch changes the validation code to avoid such problems.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54: fix EEPROM structure endianness
Johannes Berg [Fri, 29 Feb 2008 12:56:33 +0000 (13:56 +0100)]
p54: fix EEPROM structure endianness

Since the EEPROM structure is read from hardware, it is
always little endian, annotate that in the struct and
make sure to convert where applicable.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Michael Wu <flamingice@sourmilk.net>
Tested-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agossb: Add pcibios_enable_device() return value check
Yoichi Yuasa [Fri, 29 Feb 2008 10:09:31 +0000 (11:09 +0100)]
ssb: Add pcibios_enable_device() return value check

This patch has added pcibios_enable_device() return value check.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agorc80211-pid: fix rate adjustment
Stefano Brivio [Sun, 2 Mar 2008 10:33:10 +0000 (11:33 +0100)]
rc80211-pid: fix rate adjustment

Merge rate_control_pid_shift_adjust() to rate_control_pid_adjust_rate()
in order to make the learning algorithm aware of constraints on rates. Also
add some comments and rename variables.

This fixes a bug which prevented 802.11b/g non-AP STAs from working with
802.11b only AP STAs.

This patch was originally destined for 2.6.26, and is being backported
to fix a user reported problem in post-2.6.24 kernels.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[ESP]: Add select on AUTHENC
Herbert Xu [Tue, 4 Mar 2008 22:29:21 +0000 (14:29 -0800)]
[ESP]: Add select on AUTHENC

Now the ESP uses the AEAD interface even for algorithms which are
not combined mode, we need to select CONFIG_CRYPTO_AUTHENC as
otherwise only combined mode algorithms will work.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: Improve ipv4 established hash function.
David S. Miller [Tue, 4 Mar 2008 22:28:41 +0000 (14:28 -0800)]
[TCP]: Improve ipv4 established hash function.

If all of the entropy is in the local and foreign addresses,
but xor'ing together would cancel out that entropy, the
current hash performs poorly.

Suggested by Cosmin Ratiu:

Basically, the situation is as follows: There is a client
machine and a server machine. Both create 15000 virtual
interfaces, open up a socket for each pair of interfaces and
do SIP traffic. By profiling I noticed that there is a lot of
time spent walking the established hash chains with this
particular setup.

The addresses were distributed like this: client interfaces
were 198.18.0.1/16 with increments of 1 and server interfaces
were 198.18.128.1/16 with increments of 1. As I said, there
were 15000 interfaces. Source and destination ports were 5060
for each connection.  So in this case, ports don't matter for
hashing purposes, and the bits from the address pairs used
cancel each other, meaning there are no differences in the
whole lot of pairs, so they all end up in the same hash chain.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: TCP cubic v2.2
Sangtae Ha [Tue, 4 Mar 2008 22:17:41 +0000 (14:17 -0800)]
[TCP]: TCP cubic v2.2

We have updated CUBIC to fix some issues with slow increase in large
BDP networks. We also improved its convergence speed. The fix is in
fact very simple -- the window increase limit of smax during the
window probing phase (i.e., convex growth phase) is removed. We found
that this does not affect TCP friendliness, but only improves its
scalability. We have run some tests in our lab and also over the
Internet path from NCSU to Japan. These results can be seen from the
following page:

http://netsrv.csc.ncsu.edu/wiki/index.php/Intra_protocol_fairness_testing_with_linux-2.6.23.9
http://netsrv.csc.ncsu.edu/wiki/index.php/RTT_fairness_testing_with_linux-2.6.23.9
http://netsrv.csc.ncsu.edu/wiki/index.php/TCP_friendliness_testing_with_linux-2.6.23.9

Signed-off-by: Sangtae Ha <sha2@ncsu.edu>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - Make ip6_dst_gc simpler
Daniel Lezcano [Tue, 4 Mar 2008 21:50:14 +0000 (13:50 -0800)]
[NETNS][IPV6] route6 - Make ip6_dst_gc simpler

This patches improves the readibility of the ip6_dst_gc() routine.
It simplifies long lines which grow a lot due to the introduction
of network namespaces support.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - make garbage collection work with multiple network namespaces
Benjamin Thery [Tue, 4 Mar 2008 21:49:47 +0000 (13:49 -0800)]
[NETNS][IPV6] route6 - make garbage collection work with multiple network namespaces

This patch makes the necessary changes to make IPv6 dst_entry garbage
collection work with multiple network namespaces.

In ip6_dst_gc(), static local variables are now declared
per-namespace.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - move ip6_dst_ops inside the network namespace
Benjamin Thery [Tue, 4 Mar 2008 21:49:23 +0000 (13:49 -0800)]
[NETNS][IPV6] route6 - move ip6_dst_ops inside the network namespace

The ip6_dst_ops is moved inside the network namespace structure.  All
references to this structure are now relative to the initial network
namespace.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - dynamically allocate ip6_dst_ops
Daniel Lezcano [Tue, 4 Mar 2008 21:48:53 +0000 (13:48 -0800)]
[NETNS][IPV6] route6 - dynamically allocate ip6_dst_ops

ip6_dst_ops is dynamically allocated in init and exit functions.  That
provides the ability to do multiple instanciations of this structure.

This will be needed for network namespaces, indeed dst_ops stores data
that are required to be per namespace: entries and gc_thresh.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] rt6_info - move rt6_info structure inside the namespace
Daniel Lezcano [Tue, 4 Mar 2008 21:48:30 +0000 (13:48 -0800)]
[NETNS][IPV6] rt6_info - move rt6_info structure inside the namespace

The rt6_info structures are moved inside the network namespace
structure. All references to these structures are now relative to the
initial network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] rt6_info - make rt6_info accessed as a pointer
Daniel Lezcano [Tue, 4 Mar 2008 21:48:10 +0000 (13:48 -0800)]
[NETNS][IPV6] rt6_info - make rt6_info accessed as a pointer

This patch make mindless changes and prepares the code to use dynamic
allocation for rt6_info structure. The code accesses the rt6_info
structure as a pointer instead of a global static variable.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - make route6 per namespace
Daniel Lezcano [Tue, 4 Mar 2008 21:47:47 +0000 (13:47 -0800)]
[NETNS][IPV6] route6 - make route6 per namespace

This patch makes the routing engine use the network namespaces to
access routing informations: Add a network namespace parameter to
ipv6_route_ioctl and propagate the network namespace value to all the
routing code that have not yet been changed.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - Pass the network namespace parameter to rt6_purge_dflt_routers
Daniel Lezcano [Tue, 4 Mar 2008 21:47:14 +0000 (13:47 -0800)]
[NETNS][IPV6] route6 - Pass the network namespace parameter to rt6_purge_dflt_routers

Add a network namespace parameter to rt6_purge_dflt_routers.  This is
needed to call fib6_get_table with the appropriate network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - Pass network namespace to rt6_add_route_info and rt6_get_route...
Daniel Lezcano [Tue, 4 Mar 2008 21:46:48 +0000 (13:46 -0800)]
[NETNS][IPV6] route6 - Pass network namespace to rt6_add_route_info and rt6_get_route_info

Add a network namespace parameter to rt6_add_route_info() and
rt6_get_route_info to enable them to handle multiple network
namespaces.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - Make proc entry /proc/net/rt6_stats per namespace
Daniel Lezcano [Tue, 4 Mar 2008 21:46:23 +0000 (13:46 -0800)]
[NETNS][IPV6] route6 - Make proc entry /proc/net/rt6_stats per namespace

Make the proc entry /proc/net/rt6_stats work in all network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - Pass the network namespace parameter to rt6_lookup
Daniel Lezcano [Tue, 4 Mar 2008 21:45:59 +0000 (13:45 -0800)]
[NETNS][IPV6] route6 - Pass the network namespace parameter to rt6_lookup

Add a network namespace parameter to rt6_lookup().

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] route6 - create route6 proc files for the namespace
Daniel Lezcano [Tue, 4 Mar 2008 21:45:33 +0000 (13:45 -0800)]
[NETNS][IPV6] route6 - create route6 proc files for the namespace

Make /proc/net/ipv6_route and /proc/net/rt6_stats to be per namespace.
These proc files are now created when the network namespace is
initialized.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETPOLL]: Revert two bogus cleanups that broke netconsole.
David S. Miller [Tue, 4 Mar 2008 20:28:49 +0000 (12:28 -0800)]
[NETPOLL]: Revert two bogus cleanups that broke netconsole.

Based upon a report by Andrew Morton and code analysis done
by Jarek Poplawski.

This reverts 33f807ba0d9259e7c75c7a2ce8bd2787e5b540c7 ("[NETPOLL]:
Kill NETPOLL_RX_DROP, set but never tested.")  and
c7b6ea24b43afb5749cb704e143df19d70e23dea ("[NETPOLL]: Don't need
rx_flags.").

The rx_flags did get tested for zero vs. non-zero and therefore we do
need those tests and that code which sets NETPOLL_RX_DROP et al.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AF_KEY]: Dump SA/SP entries non-atomically
Timo Teras [Tue, 4 Mar 2008 07:40:12 +0000 (23:40 -0800)]
[AF_KEY]: Dump SA/SP entries non-atomically

Stop dumping of entries when af_key socket receive queue is getting
full and continue it later when there is more room again.

This fixes dumping of large databases. Currently the entries not
fitting into the receive queue are just dropped (including the
end-of-dump message) which can confuse applications.

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>