]> err.no Git - linux-2.6/log
linux-2.6
16 years agort2x00: Fix tx parameter initialization
Ivo van Doorn [Sun, 3 Feb 2008 14:47:30 +0000 (15:47 +0100)]
rt2x00: Fix tx parameter initialization

Check if the aifs, cw_min and cw_max are above 0
when determining if the default should be used.
Tor aifs a negative number is used to determine
if the default should be used or not.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: don't write past the end when writing short descriptors on rt61
Adam Baker [Sun, 3 Feb 2008 14:46:24 +0000 (15:46 +0100)]
rt2x00: don't write past the end when writing short descriptors on rt61

The space allocated in the skb for a descriptor is only 24 bytes when
setting up beacons in rt61 so make sure we don't write to the descriptor
words beyond that and corrupt the beacon packet.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Queue handling overhaul
Ivo van Doorn [Tue, 5 Feb 2008 21:42:23 +0000 (16:42 -0500)]
rt2x00: Queue handling overhaul

This introduces a big queue handling overhaul, this also
renames "ring" to "queues".

Move queue handling into rt2x00queue.c and the matching header,
use Kerneldoc to improve rt2x00 library documentation.

Access to the queues is now protected under a spinlock, this
to prevent race conditions which could corrupt the indexing
system of the queue.

Each queue entry allocates x bytes for driver/device specific data,
this cleans up the queue structure significantly and improves
code readability.

rt2500usb no longer needs 2 entries in the beacon queue to correctly
send out the guardian byte. This is now handled in the entry specific
structure.

rt61 and rt73 now use the correct descriptor size for beacon frames,
since this data is written into the registers not the entire TXD
descriptor was used but instead of a subset of it named TXINFO.

Finally this also fixes numerous other bugs related to incorrect
beacon handling or beacon related code.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Update copyright notice
Ivo van Doorn [Sun, 3 Feb 2008 14:42:53 +0000 (15:42 +0100)]
rt2x00: Update copyright notice

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless/iwlwifi/iwl-4965.c: add parentheses
Roel Kluin [Sat, 2 Feb 2008 19:48:48 +0000 (20:48 +0100)]
wireless/iwlwifi/iwl-4965.c: add parentheses

'!' has a higher priority than '&': bitanding has no effect.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: dissolve pre-rx handlers
Johannes Berg [Tue, 29 Jan 2008 16:07:43 +0000 (17:07 +0100)]
mac80211: dissolve pre-rx handlers

These handlers do not really return a status and the compiler
can do a much better job when they're simply static functions
that it can inline if appropriate. Also makes the code shorter.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: enable 802.11n in Kconfig
Tomas Winkler [Sun, 27 Jan 2008 13:06:23 +0000 (15:06 +0200)]
iwlwifi: enable 802.11n in Kconfig

This patch removes 'IWL4965_HT: depends on n'  from iwlwifi's Kconfig
1. 11n is functional so no need to make it invisible in the configuration
2. Latest Johannes patch 'cfg80211 API for channels/bitrates, mac80211 and
driver conversion' broke compilation because this config option was
invisible - patch fixing it will be provided later

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: A-MPDU Tx activation by load measures
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:26 +0000 (14:07 +0200)]
iwlwifi: A-MPDU Tx activation by load measures

This patch gives a heuristic for activation of the A-MPDU Tx.
As the rate scaling is rate aware, it now also measures estimated load, and
sends A-MPDU activation after a threshold has been met.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: A-MPDU Tx conform block Ack rate scaling to mac80211
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:25 +0000 (14:07 +0200)]
iwlwifi: A-MPDU Tx conform block Ack rate scaling to mac80211

This patch uses the changes in ieee80211_tx_status to pass Block Ack data
to rate scaling module, and uses this data in rate scaling calculations

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: A-MPDU Tx conform flows to mac80211
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:24 +0000 (14:07 +0200)]
iwlwifi: A-MPDU Tx conform flows to mac80211

This patch alters the current iwlwifi behavior to fit the flows introduced
by the mac80211, mainly queues handling and start/stop call backs flows

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: A-MPDU Tx conform API to mac80211
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:23 +0000 (14:07 +0200)]
iwlwifi: A-MPDU Tx conform API to mac80211

This patch alters the current API in order to fit the new
API mac80211 gives for A-MPDU Tx

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: A-MPDU Tx add delBA from recipient support
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:22 +0000 (14:07 +0200)]
mac80211: A-MPDU Tx add delBA from recipient support

This patch adds the ability to handle delBA from recipient to initiator
during an A-MPDU session

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: A-MPDU Tx change tx_status to support Block Ack data
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:21 +0000 (14:07 +0200)]
mac80211: A-MPDU Tx change tx_status to support Block Ack data

This patch adds fields to ieee80211_tx_status in order to allow block ack
information exchange between low-level driver,mac80211 and rate scaling
module.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: A-MPDU add debugfs support
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:20 +0000 (14:07 +0200)]
mac80211: A-MPDU add debugfs support

This patch adds A-MPDU status report per STA to the debugfs.
The option to de/activate A-MPDU through debugfs is also present.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: A-MPDU Tx MLME data initialization
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:19 +0000 (14:07 +0200)]
mac80211: A-MPDU Tx MLME data initialization

This patch initialize A-MPDU MLME data for Tx sessions.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: A-MPDU Tx adding qdisc support
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:18 +0000 (14:07 +0200)]
mac80211: A-MPDU Tx adding qdisc support

This patch allows qdisc support in A-MPDU Tx. a method to
handle QoS <-> TID switches is present in this patch.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: A-MPDU Tx adding basic functionality
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:17 +0000 (14:07 +0200)]
mac80211: A-MPDU Tx adding basic functionality

This patch adds the following abilities to mac80211:
 - start A-MPDU Tx session
 - stop A-MPDU Tx session
 - call backs to start/stop A-MPDU Tx session
 - sending addBA request
 - processing addBA response

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: A-MPDU Tx add MLME structures
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:16 +0000 (14:07 +0200)]
mac80211: A-MPDU Tx add MLME structures

This patch adds the needed structures to describe the Tx aggregation MLME
per STA
new:
 - struct tid_ampdu_tx: TID aggregation information (Tx)
changed:
 - struct sta_ampdu_mlme: Tx aggregation information per TID and
  dialog token creator were added
 - struct sta_info: tid_to_tx_q added for tid<->tx queue mapping

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: A-MPDU Tx add session's and low level driver's API
Ron Rindjunsky [Mon, 28 Jan 2008 12:07:15 +0000 (14:07 +0200)]
mac80211: A-MPDU Tx add session's and low level driver's API

This patch adds the API for 3 stages in A-MPDU Tx session flow:
- request mac80211 to start/stop A-MPDU Tx session for specific TID. such a
  request should be issued by a load aware element, either mac80211 itself
  or external element.
- requests by mac80211 to low-level driver to start/stop Tx aggregation.
  notice that low level driver responds now with Starting Sequence Number.
- async feedback by low-level to mac80211 to inform that HW is ready for
  next A-MPDU Tx state.
Changes in API to Rx A-MPDU were also made, reflected in iwlwifi changes as
well.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: rename/document scan_channel
Holger Schurig [Mon, 28 Jan 2008 16:28:05 +0000 (17:28 +0100)]
libertas: rename/document scan_channel

Rename last_scanned_channel to scan_channel, just so that a
grep for struct bss_descriptor's last_scanned element doesn't
show up so many positives.

Also documented the variable and moved it to other scan related
entries in lbs_private.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: make lbs_unset_basic_rate_flags() static
Holger Schurig [Mon, 28 Jan 2008 16:27:03 +0000 (17:27 +0100)]
libertas: make lbs_unset_basic_rate_flags() static

... by moving it into the file where it's sole user resides

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: make lbs_sync_channel() static
Holger Schurig [Mon, 28 Jan 2008 16:26:28 +0000 (17:26 +0100)]
libertas: make lbs_sync_channel() static

... by moving it into the file where it's sole user resides

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: make association debug output nicer
Holger Schurig [Mon, 28 Jan 2008 16:25:53 +0000 (17:25 +0100)]
libertas: make association debug output nicer

This also fixes a bug where should_deauth_infrastructure() always
returned 0.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: trim overly long debug statement
Holger Schurig [Tue, 29 Jan 2008 08:14:40 +0000 (09:14 +0100)]
libertas: trim overly long debug statement

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: allow sending multicast frames through virtual ports
Johannes Berg [Mon, 28 Jan 2008 16:11:43 +0000 (17:11 +0100)]
mac80211: allow sending multicast frames through virtual ports

When reworking the port access control code, I forgot multicast frames
and those are now always rejected because the destination station is
not known. This changes the code to allow through multicast frames and
also avoid the sta hash lookup (which is bound to fail) for them.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: set assoc flag to bss_conf
Tomas Winkler [Sun, 27 Jan 2008 14:18:22 +0000 (16:18 +0200)]
mac80211: set assoc flag to bss_conf

Only BSS_CHANGED_ASSOC was set in the 'changed' bitmask. Assignment  to
bss_conf.assoc was absent.
This patch assign value to  bss_conf.assoc according the association state.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[NIU]: Add Support for Sun ATCA Blade Server.
Matheos Worku [Fri, 29 Feb 2008 05:25:43 +0000 (21:25 -0800)]
[NIU]: Add Support for Sun ATCA Blade Server.

Ports 0 and 1 of the NIU device are connected to extended fabric
through SERDES. Ports 2 and 3 are connected using RGMII Fiber mode.

[ Coding style cleanups... -DaveM ]

Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Fix source address selection for ORCHID addresses
Juha-Matti Tapio [Fri, 29 Feb 2008 04:55:46 +0000 (20:55 -0800)]
[IPV6]: Fix source address selection for ORCHID addresses

Skip the prefix length matching in source address selection for
orchid -> non-orchid addresses.

Overlay Routable Cryptographic Hash IDentifiers (RFC 4843,
2001:10::/28) are currenty not globally reachable. Without this
check a host with an ORCHID address can end up preferring those over
regular addresses when talking to other regular hosts in the 2001::/16
range thus breaking non-orchid connections.

Signed-off-by: Juha-Matti Tapio <jmtapio@verkkotelakka.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Add ORCHID prefix to address label table
Juha-Matti Tapio [Fri, 29 Feb 2008 04:55:02 +0000 (20:55 -0800)]
[IPV6]: Add ORCHID prefix to address label table

Add a new label for Overlay Routable Cryptographic Hash Identifiers
(RFC 4843) prefix 2001:10::/28 to help proper source address
selection.

ORCHID addresses are used by for example Host Identity Protocol. They are
global and routable, but they currently need support from both endpoints
and therefore mixing regular and ORCHID addresses for source and
destination is a bad idea in general case.

Signed-off-by: Juha-Matti Tapio <jmtapio@verkkotelakka.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Process inet_select_addr inside a namespace.
Denis V. Lunev [Fri, 29 Feb 2008 04:52:54 +0000 (20:52 -0800)]
[NETNS]: Process inet_select_addr inside a namespace.

The context is available from a network device passed in.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Enable IPv4 address manipulations inside namespace.
Denis V. Lunev [Fri, 29 Feb 2008 04:52:25 +0000 (20:52 -0800)]
[NETNS]: Enable IPv4 address manipulations inside namespace.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Enable all routing manipulation via netlink inside namespace.
Denis V. Lunev [Fri, 29 Feb 2008 04:52:04 +0000 (20:52 -0800)]
[NETNS]: Enable all routing manipulation via netlink inside namespace.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Process devinet ioctl in the correct namespace.
Denis V. Lunev [Fri, 29 Feb 2008 04:51:43 +0000 (20:51 -0800)]
[NETNS]: Process devinet ioctl in the correct namespace.

Add namespace parameter to devinet_ioctl and locate device inside it for
state changes.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Register /proc/net/rt_cache for each namespace.
Denis V. Lunev [Fri, 29 Feb 2008 04:51:18 +0000 (20:51 -0800)]
[NETNS]: Register /proc/net/rt_cache for each namespace.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Process /proc/net/rt_cache inside a namespace.
Denis V. Lunev [Fri, 29 Feb 2008 04:50:55 +0000 (20:50 -0800)]
[NETNS]: Process /proc/net/rt_cache inside a namespace.

Show routing cache for a particular namespace only.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: rt_cache_get_next should take rt_genid into account.
Denis V. Lunev [Fri, 29 Feb 2008 04:50:33 +0000 (20:50 -0800)]
[IPV4]: rt_cache_get_next should take rt_genid into account.

In the other case /proc/net/rt_cache will look inconsistent in respect to
genid.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Process ip_rt_redirect in the correct namespace.
Denis V. Lunev [Fri, 29 Feb 2008 04:50:06 +0000 (20:50 -0800)]
[NETNS]: Process ip_rt_redirect in the correct namespace.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: DST cleanup routines should be called inside namespace.
Denis V. Lunev [Fri, 29 Feb 2008 04:49:44 +0000 (20:49 -0800)]
[NETNS]: DST cleanup routines should be called inside namespace.

Device inside the namespace can be started and downed. So, active routing
cache should be cleaned up on device stop.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Enable inetdev_event notifier.
Denis V. Lunev [Fri, 29 Feb 2008 04:49:13 +0000 (20:49 -0800)]
[NETNS]: Enable inetdev_event notifier.

After all these preparations it is time to enable main IPv4 device
initialization routine inside namespace. It is safe do this now.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Disable multicaststing configuration inside non-initial namespace.
Denis V. Lunev [Fri, 29 Feb 2008 04:48:49 +0000 (20:48 -0800)]
[NETNS]: Disable multicaststing configuration inside non-initial namespace.

Do not calls hooks from device notifiers and disallow configuration from
ioctl/netlink layer.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Default arp parameters lookup.
Denis V. Lunev [Fri, 29 Feb 2008 04:48:25 +0000 (20:48 -0800)]
[NETNS]: Default arp parameters lookup.

Default ARP parameters should be findable regardless of the context.
Required to make inetdev_event working.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Register neighbour table parameters in the correct namespace.
Denis V. Lunev [Fri, 29 Feb 2008 04:48:01 +0000 (20:48 -0800)]
[NETNS]: Register neighbour table parameters in the correct namespace.

neigh_sysctl_register should register sysctl entries inside correct namespace
to avoid naming conflict. Typical example is a loopback. Entries for it
present in all namespaces.

Required to make inetdev_event working.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Disable inetaddr notifiers in namespaces other than initial.
Denis V. Lunev [Fri, 29 Feb 2008 04:46:17 +0000 (20:46 -0800)]
[NETNS]: Disable inetaddr notifiers in namespaces other than initial.

ip_fib_init is kept enabled. It is already namespace-aware.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: Consolidate masq_inet_event and masq_device_event.
Denis V. Lunev [Fri, 29 Feb 2008 04:45:41 +0000 (20:45 -0800)]
[NETFILTER]: Consolidate masq_inet_event and masq_device_event.

They do exactly the same job.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Remove check for ifa->ifa_dev != NULL.
Denis V. Lunev [Fri, 29 Feb 2008 04:45:00 +0000 (20:45 -0800)]
[IPV4]: Remove check for ifa->ifa_dev != NULL.

This is a callback registered to inet address notifier chain.
The check is useless as:
- ifa->ifa_dev is always != NULL
- similar checks are abscent in all other notifiers.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Remove ifa != NULL check.
Denis V. Lunev [Fri, 29 Feb 2008 04:44:27 +0000 (20:44 -0800)]
[IPV4]: Remove ifa != NULL check.

This is a callback registered to inet address notifier chain.
The check is useless as:
- ifa is always != NULL
- similar checks are abscent in all other notifiers.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[X25]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:16:33 +0000 (14:16 -0800)]
[X25]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[WANROUTER]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:15:56 +0000 (14:15 -0800)]
[WANROUTER]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[8021Q]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:14:58 +0000 (14:14 -0800)]
[8021Q]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:14:25 +0000 (14:14 -0800)]
[IPV4]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:13:46 +0000 (14:13 -0800)]
[IPV6]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:13:16 +0000 (14:13 -0800)]
[SCTP]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKTGEN]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:11:49 +0000 (14:11 -0800)]
[PKTGEN]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NEIGHBOUR]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:10:51 +0000 (14:10 -0800)]
[NEIGHBOUR]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[LLC]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:08:54 +0000 (14:08 -0800)]
[LLC]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPX]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:06:14 +0000 (14:06 -0800)]
[IPX]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SUNRPC]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:00:59 +0000 (14:00 -0800)]
[SUNRPC]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'pending' of master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev
David S. Miller [Thu, 28 Feb 2008 21:56:37 +0000 (13:56 -0800)]
Merge branch 'pending' of master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev

16 years ago[ATM]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 21:55:45 +0000 (13:55 -0800)]
[ATM]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Update AUTH structures to match declarations in draft-16.
Vlad Yasevich [Wed, 27 Feb 2008 21:04:52 +0000 (16:04 -0500)]
[SCTP]: Update AUTH structures to match declarations in draft-16.

The new SCTP socket api (draft 16) updates the AUTH API structures.
We never exported these since we knew they would change.
Update the rest to match the draft.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years ago[SCTP]: Incorrect length was used in SCTP_*_AUTH_CHUNKS socket option
Vlad Yasevich [Wed, 27 Feb 2008 19:40:37 +0000 (14:40 -0500)]
[SCTP]: Incorrect length was used in SCTP_*_AUTH_CHUNKS socket option

The chunks are stored inside a parameter structure in the kernel
and when we copy them to the user, we need to account for
the parameter header.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years ago[SCTP]: Clean up naming conventions of sctp protocol/address family registration
Neil Horman [Fri, 15 Feb 2008 14:53:59 +0000 (09:53 -0500)]
[SCTP]: Clean up naming conventions of sctp protocol/address family registration

I noticed while looking into some odd behavior in sctp, that the variable
name sctp_pf_inet6_specific was used twice to represent two different
pieces of data (its both a structure name and a pointer to that type of
structure), which is confusing to say the least, and potentially dangerous
depending on the variable scope.  This patch cleans that up, and makes the
protocol and address family registration names in SCTP more regular,
increasing readability.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
 ipv6.c     |   12 ++++++------
 protocol.c |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

16 years ago[APPLETALK]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 20:53:32 +0000 (12:53 -0800)]
[APPLETALK]: Use proc_create() to setup ->proc_fops first

As Davem mentioned in his recently patch
(d9595a7b9c777d45a74774f1428c263a0a47f4c0)
that the procfs visibility should occur after
the ->proc_fops are setup.

And also, Alexey provide proc_create() to make
sure that ->proc_fops is setup before gluing PDE
to main tree.

We use proc_create().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: add bnx2x to MAINTAINERS
Eliezer Tamir [Thu, 28 Feb 2008 19:59:10 +0000 (11:59 -0800)]
[BNX2X]: add bnx2x to MAINTAINERS

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: update version, remove CVS strings
Eliezer Tamir [Thu, 28 Feb 2008 19:58:49 +0000 (11:58 -0800)]
[BNX2X]: update version, remove CVS strings

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Fix Xmit bugs
Eliezer Tamir [Thu, 28 Feb 2008 19:57:55 +0000 (11:57 -0800)]
[BNX2X]: Fix Xmit bugs

Several endianity corrections in start_xmit()

Fixed TSO bug where packets were missing the TCP flags.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Prevent PCI queue overflow
Eliezer Tamir [Thu, 28 Feb 2008 19:57:29 +0000 (11:57 -0800)]
[BNX2X]: Prevent PCI queue overflow

Limit traffic through an internal queue to prevent overflow.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: fix slowpath races and locking
Eliezer Tamir [Thu, 28 Feb 2008 19:56:57 +0000 (11:56 -0800)]
[BNX2X]: fix slowpath races and locking

Fixed locking between fastpath and slowpath operations.

Corrected order of traffic disabling to prevent race when going down
under traffic.

- first have the microcode drop all incoming packets
- then do the slowpath stuff
- only then reset the MAC

Got rid of in_reset_task.

Remove_one() and friends would deference a null pointer if init_one
failed.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: fix HW attentions and error handling
Eliezer Tamir [Thu, 28 Feb 2008 19:55:53 +0000 (11:55 -0800)]
[BNX2X]: fix HW attentions and error handling

Some of the HW attentions, used to indicate an error were not properly
acked.

This will cause the driver to endlessly receive interrupts when such
an error happens.

Had to break the code into smaller chunks because it got too nested.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: fix MSI-X/INT#A errata
Eliezer Tamir [Thu, 28 Feb 2008 19:54:54 +0000 (11:54 -0800)]
[BNX2X]: fix MSI-X/INT#A errata

Errata A0.158 workaround.

Running in INT#A mode after running with MSI-X fails due to a PCI core
bug.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: correct statistics
Eliezer Tamir [Thu, 28 Feb 2008 19:54:03 +0000 (11:54 -0800)]
[BNX2X]: correct statistics

Errors were summed improperly, some stats were missing.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Correct RX filtering and MC configuration
Eliezer Tamir [Thu, 28 Feb 2008 19:53:13 +0000 (11:53 -0800)]
[BNX2X]: Correct RX filtering and MC configuration

The configuration of RX filtering needed the following corrections:

Drop flags need to be set per Rx queue.

Have to tell the microcode to collect drop stats, and properly wait
for them to complete when going down.

Sometimes we failed to detect proper completion due to a logical error
in the wait loop.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Correct Link management
Eliezer Tamir [Thu, 28 Feb 2008 19:51:50 +0000 (11:51 -0800)]
[BNX2X]: Correct Link management

Properly protect PHY access between two devices on the same board with
a HW lock.

Use GPIO to clear all previous configurations before changing link
parameters.

Shut down the external PHY in case of fan failure.

Reducing the MDC/MDIO clock to 2.5MHz due to problems with some
devices.

Resolve the flow control response according to autoneg with external
PHY.

Unmasking all PHY interrupts in single write to prevent a race in the
interrupts order.

LASI indication fixes to work with peculiarities of PHYs.

Disable MAC RX to avoid a HW bug when closing the MAC under traffic.

Disable parallel detection on HiGig due to HW limitation.

Updating the shared memory structure to work with the current
bootcode.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Correct init_one()
Eliezer Tamir [Thu, 28 Feb 2008 19:50:16 +0000 (11:50 -0800)]
[BNX2X]: Correct init_one()

Correct PCI-E info printed by init_one()
In one case it failed to free the netdev.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Spelling fixes
Eliezer Tamir [Thu, 28 Feb 2008 19:49:42 +0000 (11:49 -0800)]
[BNX2X]: Spelling fixes

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPCOMP]: Disable BH on output when using shared tfm
Herbert Xu [Thu, 28 Feb 2008 19:23:17 +0000 (11:23 -0800)]
[IPCOMP]: Disable BH on output when using shared tfm

Because we use shared tfm objects in order to conserve memory,
(each tfm requires 128K of vmalloc memory), BH needs to be turned
off on output as that can occur in process context.

Previously this was done implicitly by the xfrm output code.
That was lost when it became lockless.  So we need to add the
BH disabling to IPComp directly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
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 [Thu, 28 Feb 2008 19:03:29 +0000 (11:03 -0800)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6

16 years agoSSB PCI core driver: use new SPROM data structure
Aurelien Jarno [Thu, 28 Feb 2008 14:11:26 +0000 (15:11 +0100)]
SSB PCI core driver: use new SPROM data structure

Switch the SSB PCI core driver to the new SPROM data structure now that
the old one has been removed.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoDon't build bcm43xx if SSB is static and b43 PCI-SSB bridge is enabled.
Alexey Zaytsev [Sat, 23 Feb 2008 10:33:07 +0000 (13:33 +0300)]
Don't build bcm43xx if SSB is static and b43 PCI-SSB bridge is enabled.

This may happen e.g. when the ssb is statically enables by the b44 driver,
and the b43 pci-ssb bridge is enbled by the b43/b43legacy drivers, or the
b43/b43legacy drivers are built statically.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoUse a separate config option for the b43 pci to ssb bridge.
Alexey Zaytsev [Sat, 23 Feb 2008 09:59:26 +0000 (12:59 +0300)]
Use a separate config option for the b43 pci to ssb bridge.

The bridge code was unnecessary enabled by the b44
driver, but it prevents the bcm43xx driver from
being loaded, as the bridge claims the same pci ids.

Now we enable the birdge only if the b43{legacy}
drivers are selected.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: Remove unused exports
Roland Dreier [Tue, 26 Feb 2008 14:26:56 +0000 (15:26 +0100)]
libertas: Remove unused exports

The libertas driver exports a number of symbols with no in-tree users;
remove these unused exports.  lbs_reset_device() is completely unused, with
no callers at all, so remove the function completely.

A couple of these unused exported symbols are static, which causes the
following build error on ia64 with gcc 4.2.3:

    drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh causes a section type conflict
    drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh causes a section type conflict

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix kmalloc vs. net_ratelimit
Johannes Berg [Mon, 25 Feb 2008 23:39:28 +0000 (00:39 +0100)]
mac80211: fix kmalloc vs. net_ratelimit

The "goto end;" part definitely must not be rate limited.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Fix rt2x00lib_reset_link_tuner()
Ivo van Doorn [Mon, 25 Feb 2008 22:15:13 +0000 (23:15 +0100)]
rt2x00: Fix rt2x00lib_reset_link_tuner()

rt2x00lib_reset_link_tuner() can be called from within
the link tuner itself. This means that it should
_not_ call rt2x00lib_stop_link_tuner() since that will
cause the thread to hang.

Reorder the things that should be done during a
link tuner reset and during a link tuner start.

Also make antenna tuning the last step of the link
tuner since it could possibly reset some statistical
information which we need for average calculation.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Don't switch to antenna with low rssi
Ivo van Doorn [Mon, 25 Feb 2008 22:15:08 +0000 (23:15 +0100)]
rt2x00: Don't switch to antenna with low rssi

When rssi_a > rssi_b is true and the current antenna
was already antenna A, then rt2x00 incorrectly jumped
to antenna B.

Also don't configure the antenna when there has been
no change in the antenna setup.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Add link tuner safe RX toggle states
Ivo van Doorn [Mon, 25 Feb 2008 22:15:05 +0000 (23:15 +0100)]
rt2x00: Add link tuner safe RX toggle states

This adds 2 new states which both are used to toggle
the RX. These new states are required for usage
inside the link tuner thread, because the normal
RX toggling will stop the link tuner thread.
While it is possible that the link tuner thread itself
is the caller of the RX toggle (when using software
antenna diversity).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Fix antenna diversity
Ivo van Doorn [Mon, 25 Feb 2008 22:15:01 +0000 (23:15 +0100)]
rt2x00: Fix antenna diversity

Fix 2 issues in antenna diversity selection.

1) the following statement will always return true.
if ((rssi_curr - rssi_old) > -5 || (rssi_curr - rssi_old) < 5)
It is cleaner to check if the absolute value is smaller then 5.

2) Only enable software diversity when default antenna setup
indicates support for it. Don't select it when the hardware
does not indicate support for it...

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agogelic wireless driver needs WIRELESS_EXT support
Sebastian Siewior [Sat, 23 Feb 2008 20:46:31 +0000 (21:46 +0100)]
gelic wireless driver needs WIRELESS_EXT support

|   CC      drivers/net/ps3_gelic_wireless.o
| /home/bigeasy/git/linux-2.6/drivers/net/ps3_gelic_wireless.c: In function 'gelic_wl_setup_netdev_ops':
| /home/bigeasy/git/linux-2.6/drivers/net/ps3_gelic_wireless.c:2660: error: 'struct net_device' has no member named 'wireless_data'
| /home/bigeasy/git/linux-2.6/drivers/net/ps3_gelic_wireless.c:2661: error: 'struct net_device' has no member named 'wireless_handlers'
| make[3]: *** [drivers/net/ps3_gelic_wireless.o] Error 1
| make[2]: *** [drivers/net] Error 2
| make[1]: *** [drivers] Error 2
| make[1]: *** Waiting for unfinished jobs....
| make: *** [sub-make] Error 2

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Acked-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoPS3: gelic: Link the wireless net_device structure to the corresponding device structure
Masakazu Mokuno [Fri, 22 Feb 2008 07:45:26 +0000 (16:45 +0900)]
PS3: gelic: Link the wireless net_device structure to the corresponding device structure

Link the net_device structure of the wireless part to the
corresponding device structure.

Without this, the sysfs node for this net_device would not have
'device' link.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agorndis_wlan: fix sparse warnings
Johannes Berg [Wed, 20 Feb 2008 10:47:45 +0000 (11:47 +0100)]
rndis_wlan: fix sparse warnings

It is obviously wrong to use an enum in a little endian struct,
and those other enums should be declared differently.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[SCTP]: Correctly set the length of sctp_assoc_change notification
Vlad Yasevich [Thu, 14 Feb 2008 15:18:20 +0000 (10:18 -0500)]
[SCTP]: Correctly set the length of sctp_assoc_change notification

sctp_assoc_change notification may contain the data from a received
ABORT chunk.  Set the length correctly to account for that.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years ago[NETFILTER]: Fix NF_QUEUE_NR() parenthesis
Patrick McHardy [Wed, 27 Feb 2008 20:21:18 +0000 (12:21 -0800)]
[NETFILTER]: Fix NF_QUEUE_NR() parenthesis

Properly add parens around the macro argument. This is not needed by
the kernel but the macro is exported to userspace, so it shouldn't
make any assumptions.

Also use NF_VERDICT_BITS instead of NF_VERDICT_QBTIS for the left-shift
since thats whats logically correct.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: xt_conntrack: fix IPv4 address comparison
Jan Engelhardt [Wed, 27 Feb 2008 20:20:41 +0000 (12:20 -0800)]
[NETFILTER]: xt_conntrack: fix IPv4 address comparison

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: xt_conntrack: fix missing boolean clamping
Jan Engelhardt [Wed, 27 Feb 2008 20:09:05 +0000 (12:09 -0800)]
[NETFILTER]: xt_conntrack: fix missing boolean clamping

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack: fix smp_processor_id() in preemptible code warning
Patrick McHardy [Wed, 27 Feb 2008 20:07:47 +0000 (12:07 -0800)]
[NETFILTER]: nf_conntrack: fix smp_processor_id() in preemptible code warning

Since we're using RCU for the conntrack hash now, we need to avoid
getting preempted or interrupted by BHs while changing the stats.

Fixes warning reported by Tilman Schmidt <tilman@imap.cc> when using
preemptible RCU:

[   48.180297] BUG: using smp_processor_id() in preemptible [00000000] code: ntpdate/3562
[   48.180297] caller is __nf_conntrack_find+0x9b/0xeb [nf_conntrack]
[   48.180297] Pid: 3562, comm: ntpdate Not tainted 2.6.25-rc2-mm1-testing #1
[   48.180297]  [<c02015b9>] debug_smp_processor_id+0x99/0xb0
[   48.180297]  [<fac643a7>] __nf_conntrack_find+0x9b/0xeb [nf_conntrack]

Tested-by: Tilman Schmidt <tilman@imap.cc>
Tested-by: Christian Casteyde <casteyde.christian@free.fr> [Bugzilla #10097]
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6] SYSCTL: Fix possible memory leakage in error path.
YOSHIFUJI Hideaki [Wed, 27 Feb 2008 20:06:38 +0000 (12:06 -0800)]
[IPV6] SYSCTL: Fix possible memory leakage in error path.

In error path, we do need to free memory just allocated.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[INET]: Don't create tunnels with '%' in name.
Pavel Emelyanov [Wed, 27 Feb 2008 07:51:04 +0000 (23:51 -0800)]
[INET]: Don't create tunnels with '%' in name.

Four tunnel drivers (ip_gre, ipip, ip6_tunnel and sit) can receive a
pre-defined name for a device from the userspace.  Since these drivers
call the register_netdevice() (rtnl_lock, is held), which does _not_
generate the device's name, this name may contain a '%' character.

Not sure how bad is this to have a device with a '%' in its name, but
all the other places either use the register_netdev(), which call the
dev_alloc_name(), or explicitly call the dev_alloc_name() before
registering, i.e. do not allow for such names.

This had to be prior to the commit 34cc7b, but I forgot to number the
patches and this one got lost, sorry.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AF_KEY]: Fix oops by converting to proc_net_*().
David S. Miller [Wed, 27 Feb 2008 06:20:44 +0000 (22:20 -0800)]
[AF_KEY]: Fix oops by converting to proc_net_*().

To make sure the procfs visibility occurs after the ->proc_fs ops are
setup, use proc_net_fops_create() and proc_net_remove().

This also fixes an OOPS after module unload in that the name string
for remove was wrong, so it wouldn't actually be removed.  That bug
was introduced by commit 61145aa1a12401ac71bcc450a58c773dd6e2bfb9
("[KEY]: Clean up proc files creation a bit.")

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoCONNECTOR: make cn_already_initialized static
Li Zefan [Wed, 27 Feb 2008 02:25:53 +0000 (18:25 -0800)]
CONNECTOR: make cn_already_initialized static

It is used in connector.c only, so make it static.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Reset scope when changing address
Bjorn Mork [Wed, 27 Feb 2008 02:17:53 +0000 (18:17 -0800)]
[IPV4]: Reset scope when changing address

This bug did bite at least one user, who did have to resort to rebooting
the system after an "ifconfig eth0 127.0.0.1" typo.

Deleting the address and adding a new is a less intrusive workaround.
But I still beleive this is a bug that should be fixed.  Some way or
another.

Another possibility would be to remove the scope mangling based on
address.  This will always be incomplete (are 127/8 the only address
space with host scope requirements?)

We set the scope to RT_SCOPE_HOST if an IPv4 interface is configured
with a loopback address (127/8).  The scope is never reset, and will
remain set to RT_SCOPE_HOST after changing the address. This patch
resets the scope if the address is changed again, to restore normal
functionality.

Signed-off-by: Bjorn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Add missing initializations of the new nl_info.nl_net field
Benjamin Thery [Wed, 27 Feb 2008 02:10:03 +0000 (18:10 -0800)]
[IPV6]: Add missing initializations of the new nl_info.nl_net field

Add some more missing initializations of the new nl_info.nl_net field
in IPv6 stack. This field will be used when network namespaces are
fully supported.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>