openwrt/staging/blogic.git
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Sun, 6 Jul 2008 04:41:53 +0000 (21:41 -0700)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-next-2.6

16 years agovlan: Add GVRP support
Patrick McHardy [Sun, 6 Jul 2008 04:26:57 +0000 (21:26 -0700)]
vlan: Add GVRP support

Add GVRP support for dynamically registering VLANs with switches.

By default GVRP is disabled because we only support the applicant-only
participant model, which means it should not be enabled on vlans that
are members of a bridge. Since there is currently no way to cleanly
determine that, the user is responsible for enabling it.

The code is pretty small and low impact, its wrapped in a config
option though because it depends on the GARP implementation and
the STP core.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agovlan: Move device unregistration before lower dev cleanup
Patrick McHardy [Sun, 6 Jul 2008 04:26:41 +0000 (21:26 -0700)]
vlan: Move device unregistration before lower dev cleanup

Move the unregister_netdevice() call for the VLAN device before cleanup
for the lower device. This is needed by GVRP so it can send a leave
message before the applicant on the lower device is cleaned up.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agovlan: Change vlan_dev_set_vlan_flag() to handle multiple flags at once
Patrick McHardy [Sun, 6 Jul 2008 04:26:27 +0000 (21:26 -0700)]
vlan: Change vlan_dev_set_vlan_flag() to handle multiple flags at once

Change vlan_dev_set_vlan_flag() to handle multiple flags at once and
rename to vlan_dev_change_flags(). This allows to to use it from the
netlink interface, which in turn allows to handle necessary adjustments
when changing flags centrally.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Add GARP applicant-only participant
Patrick McHardy [Sun, 6 Jul 2008 04:26:13 +0000 (21:26 -0700)]
net: Add GARP applicant-only participant

Add an implementation of the GARP (Generic Attribute Registration Protocol)
applicant-only participant. This will be used by the following patch to
add GVRP support to the VLAN code.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobridge: Use STP demux
Patrick McHardy [Sun, 6 Jul 2008 04:25:56 +0000 (21:25 -0700)]
bridge: Use STP demux

Use the STP demux layer for receiving STP PDUs instead of directly
registering with LLC.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Add STP demux layer
Patrick McHardy [Sun, 6 Jul 2008 04:25:39 +0000 (21:25 -0700)]
net: Add STP demux layer

Add small STP demux layer for demuxing STP PDUs based on MAC address.
This is needed to run both GARP and STP in parallel (or even load the
modules) since both use LLC_SAP_BSPAN.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMIB: add struct net to UDP6_INC_STATS_BH
Pavel Emelyanov [Sun, 6 Jul 2008 04:19:40 +0000 (21:19 -0700)]
MIB: add struct net to UDP6_INC_STATS_BH

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMIB: add struct net to UDP6_INC_STATS_USER
Pavel Emelyanov [Sun, 6 Jul 2008 04:19:20 +0000 (21:19 -0700)]
MIB: add struct net to UDP6_INC_STATS_USER

As simple as the patch #1 in this set.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMIB: add struct net to UDP_INC_STATS_BH
Pavel Emelyanov [Sun, 6 Jul 2008 04:18:48 +0000 (21:18 -0700)]
MIB: add struct net to UDP_INC_STATS_BH

Two special cases here - one is rxrpc - I put init_net there
explicitly, since we haven't touched this part yet. The second
place is in __udp4_lib_rcv - we already have a struct net there,
but I have to move its initialization above to make it ready
at the "drop" label.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMIB: add struct net to UDP_INC_STATS_USER
Pavel Emelyanov [Sun, 6 Jul 2008 04:18:07 +0000 (21:18 -0700)]
MIB: add struct net to UDP_INC_STATS_USER

Nothing special - all the places already have a struct sock
at hands, so use the sock_net() net.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'davem-next' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Sun, 6 Jul 2008 04:03:31 +0000 (21:03 -0700)]
Merge branch 'davem-next' of /linux/kernel/git/jgarzik/netdev-2.6

16 years agonetns: selective flush of rt_cache
Denis V. Lunev [Sun, 6 Jul 2008 02:06:12 +0000 (19:06 -0700)]
netns: selective flush of rt_cache

dst cache is marked as expired on the per/namespace basis by previous
path. Right now we have to implement selective cache shrinking. This
procedure has been ported from older OpenVz codebase.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: place rt_genid into struct net
Denis V. Lunev [Sun, 6 Jul 2008 02:04:32 +0000 (19:04 -0700)]
netns: place rt_genid into struct net

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoipv4: pass current value of rt_genid into rt_hash
Denis V. Lunev [Sun, 6 Jul 2008 02:04:09 +0000 (19:04 -0700)]
ipv4: pass current value of rt_genid into rt_hash

Basically, there is no difference to atomic_read internally or pass it as
a parameter as rt_hash is inline.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: add struct net parameter to rt_cache_invalidate
Denis V. Lunev [Sun, 6 Jul 2008 02:03:31 +0000 (19:03 -0700)]
netns: add struct net parameter to rt_cache_invalidate

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: make rt_secret_rebuild timer per namespace
Denis V. Lunev [Sun, 6 Jul 2008 02:02:59 +0000 (19:02 -0700)]
netns: make rt_secret_rebuild timer per namespace

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: register net.ipv4.route.flush in each namespace
Denis V. Lunev [Sun, 6 Jul 2008 02:02:33 +0000 (19:02 -0700)]
netns: register net.ipv4.route.flush in each namespace

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoipv4: remove static flush_delay variable
Denis V. Lunev [Sun, 6 Jul 2008 02:02:06 +0000 (19:02 -0700)]
ipv4: remove static flush_delay variable

flush delay is used as an external storage for net.ipv4.route.flush sysctl
entry. It is write-only.

The ctl_table->data for this entry is used once. Fix this case to point
to the stack to remove global variable. Do this to avoid additional
variable on struct net in the next patch.

Possible race (as it was before) accessing this local variable is removed
using flush_mutex.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: add fib_rules_ops to flush_cache method
Denis V. Lunev [Sun, 6 Jul 2008 02:01:28 +0000 (19:01 -0700)]
net: add fib_rules_ops to flush_cache method

This is required to pass namespace context into rt_cache_flush called from
->flush_cache.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: add namespace parameter to rt_cache_flush
Denis V. Lunev [Sun, 6 Jul 2008 02:00:44 +0000 (19:00 -0700)]
netns: add namespace parameter to rt_cache_flush

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago8390: Split 8390 support into a pausing and a non pausing driver core
Alan Cox [Fri, 4 Jul 2008 06:43:12 +0000 (23:43 -0700)]
8390: Split 8390 support into a pausing and a non pausing driver core

Only a few ISA controllers need the pausing version of the 8390 core
while PCMCIA, later ISA and PCI do not. More importantly the ISA delays
can break non ISA boxes so we must use a different build of 8390.c for
the two sets of controllers.

No changes since last time as all the points of concerns raised proved to
be invalid

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoWAN: Remove no longer needed pvc_desc in FR code.
Krzysztof Halasa [Tue, 1 Jul 2008 12:42:07 +0000 (14:42 +0200)]
WAN: Remove no longer needed pvc_desc in FR code.

Remove no longer needed struct pvc_desc in FR code.
Requires "WAN: convert drivers to use built-in netdev_stats" patch.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoWAN: convert drivers to use built-in netdev_stats
Krzysztof Halasa [Mon, 30 Jun 2008 21:26:53 +0000 (23:26 +0200)]
WAN: convert drivers to use built-in netdev_stats

There is no point in using separate net_device_stats structs when
the one in struct net_device is present. Compiles.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoigb: add NAPI Rx queue support
PJ Waskiewicz [Fri, 27 Jun 2008 18:00:39 +0000 (11:00 -0700)]
igb: add NAPI Rx queue support

Update the NAPI implementation to use the new napi_struct infrstructure.
This removes the need of multiple net_device structs to implement a
multiqueue NAPI.

Signed-off-by: PJ Waskiewicz <peter.p.waskiewicz.jr.@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoigb: fix init on 82575 with MNG enabled
Alexander Duyck [Fri, 27 Jun 2008 18:00:29 +0000 (11:00 -0700)]
igb: fix init on 82575 with MNG enabled

This patch resolves an issue seen on 82575 adapters with managability
pass-thru enabled, which could cause the system to panic.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoigb: eliminate hw from the hw_dbg macro arguments
Auke Kok [Fri, 27 Jun 2008 18:00:18 +0000 (11:00 -0700)]
igb: eliminate hw from the hw_dbg macro arguments

Various cosmetic cleanups. Comment fixes. Eliminate the hw part out
of the hw_dbg macro since it's always used.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoigb: fix parameter options
Alexander Duyck [Fri, 27 Jun 2008 18:00:07 +0000 (11:00 -0700)]
igb: fix parameter options

Currently there are items in the driver to support parameters, but there
are no parameters being added to the driver.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoigb: cleanup function header comments
Jeff Kirsher [Fri, 27 Jun 2008 17:59:59 +0000 (10:59 -0700)]
igb: cleanup function header comments

Function header comments do not match function name.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoigb: Remove adapter struct from these function call parameters
Mitch Williams [Fri, 27 Jun 2008 17:59:48 +0000 (10:59 -0700)]
igb: Remove adapter struct from these function call parameters

Simplify a bunch of calls to these functions by moving the adapter
struct out of the function arguments since that is not needed.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoigb: limit EEPROM access
Jeff Kirsher [Fri, 27 Jun 2008 17:59:33 +0000 (10:59 -0700)]
igb: limit EEPROM access

EEPROM access beyond the base eeprom page is unsupported.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipg: run-time configurable jumbo frame support
Pekka Enberg [Mon, 23 Jun 2008 11:36:56 +0000 (14:36 +0300)]
ipg: run-time configurable jumbo frame support

Make jumbo frame support configurable via ifconfig mtu option as suggested by
Stephen Hemminger.

Cc: Stephen Hemminger <stephen.hemminger@vyatta.com>
Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipg: per-device max_rxframe_size
Pekka Enberg [Mon, 23 Jun 2008 11:36:35 +0000 (14:36 +0300)]
ipg: per-device max_rxframe_size

Add a ->max_rxframe member to struct ipg_nic_private and convert the users of
IPG_MAX_RXFRAME_SIZE to use it instead to enable per-device jumbo frame
configuration.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipg: per-device rxsupport_size
Pekka Enberg [Mon, 23 Jun 2008 11:36:18 +0000 (14:36 +0300)]
ipg: per-device rxsupport_size

Add a ->max_rxframe member to struct ipg_nic_private and convert the users of
IPG_RXSUPPORT_SIZE to use it instead to enable per-device jumbo frame
configuration.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipg: per-device rxfrag_size
Pekka Enberg [Mon, 23 Jun 2008 11:36:00 +0000 (14:36 +0300)]
ipg: per-device rxfrag_size

Add a ->max_rxframe member to struct ipg_nic_private and convert the users of
IPG_RXFRAG_SIZE to use it instead to enable per-device jumbo frame
configuration.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipg: remove jumbo frame #ifdef from mtu
Pekka Enberg [Mon, 23 Jun 2008 11:35:37 +0000 (14:35 +0300)]
ipg: remove jumbo frame #ifdef from mtu

Remove JUMBO_FRAME #ifdef from dev->mtu setting in ipg_nic_open() so that we
can make IPG_TXFRAG_SIZE configurable.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipg: always compile in jumbo frame support
Pekka Enberg [Mon, 23 Jun 2008 11:35:16 +0000 (14:35 +0300)]
ipg: always compile in jumbo frame support

Add a ->is_jumbo boolean to struct ipg_nic_private and fix up
ipg_interrupt_handler() to call the jumbo frame version of ipg_nic_rx() if the
boolean is set to true. Also remove the JUMBO_FRAME #ifdefs so we can always
compile in support for jumbo frames.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoMerge branch 'r8169-next' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu...
Jeff Garzik [Fri, 4 Jul 2008 12:35:57 +0000 (08:35 -0400)]
Merge branch 'r8169-next' of git://git./linux/kernel/git/romieu/netdev-2.6 into upstream-next

16 years agotun: Allow GSO using virtio_net_hdr
Rusty Russell [Thu, 3 Jul 2008 10:48:02 +0000 (03:48 -0700)]
tun: Allow GSO using virtio_net_hdr

Add a IFF_VNET_HDR flag.  This uses the same ABI as virtio_net
(ie. prepending struct virtio_net_hdr to packets) to indicate GSO and
checksum information.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Max Krasnyansky <maxk@qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotun: TUNSETFEATURES to set gso features.
Rusty Russell [Thu, 3 Jul 2008 10:46:16 +0000 (03:46 -0700)]
tun: TUNSETFEATURES to set gso features.

ethtool is useful for setting (some) device fields, but it's
root-only.  Finer feature control is available through a tun-specific
ioctl.

(Includes Mark McLoughlin <markmc@redhat.com>'s fix to hold rtnl sem).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Max Krasnyansky <maxk@qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotun: Interface to query tun/tap features.
Rusty Russell [Thu, 3 Jul 2008 10:45:32 +0000 (03:45 -0700)]
tun: Interface to query tun/tap features.

The problem with introducing checksum offload and gso to tun is they
need to set dev->features to enable GSO and/or checksumming, which is
supposed to be done before register_netdevice(), ie. as part of
TUNSETIFF.

Unfortunately, TUNSETIFF has always just ignored flags it doesn't
understand, so there's no good way of detecting whether the kernel
supports new IFF_ flags.

This patch implements a TUNGETFEATURES ioctl which returns all the valid IFF
flags.  It could be extended later to include other features.

Here's an example program which uses it:

#include <linux/if_tun.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <err.h>
#include <stdio.h>

static struct {
unsigned int flag;
const char *name;
} known_flags[] = {
{ IFF_TUN, "TUN" },
{ IFF_TAP, "TAP" },
{ IFF_NO_PI, "NO_PI" },
{ IFF_ONE_QUEUE, "ONE_QUEUE" },
};

int main()
{
unsigned int features, i;

int netfd = open("/dev/net/tun", O_RDWR);
if (netfd < 0)
err(1, "Opening /dev/net/tun");

if (ioctl(netfd, TUNGETFEATURES, &features) != 0) {
printf("Kernel does not support TUNGETFEATURES, guessing\n");
features = (IFF_TUN|IFF_TAP|IFF_NO_PI|IFF_ONE_QUEUE);
}
printf("Available features are: ");
for (i = 0; i < sizeof(known_flags)/sizeof(known_flags[0]); i++) {
if (features & known_flags[i].flag) {
features &= ~known_flags[i].flag;
printf("%s ", known_flags[i].name);
}
}
if (features)
printf("(UNKNOWN %#x)", features);
printf("\n");
return 0;
}

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Max Krasnyansky <maxk@qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'net-next-2.6-v6ready-20080703' of git://git.linux-ipv6.org/gitroot...
David S. Miller [Thu, 3 Jul 2008 10:07:58 +0000 (03:07 -0700)]
Merge branch 'net-next-2.6-v6ready-20080703' of git://git.linux-ipv6.org/gitroot/yoshfuji/linux-2.6-next

16 years agoipv4,ipv6 mroute: Add some helper inline functions to remove ugly ifdefs.
YOSHIFUJI Hideaki [Thu, 3 Jul 2008 07:51:22 +0000 (16:51 +0900)]
ipv4,ipv6 mroute: Add some helper inline functions to remove ugly ifdefs.

ip{,v6}_mroute_{set,get}sockopt() should not matter by optimization but
it would be better not to depend on optimization semantically.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years agoipv4: Do cleanup for ip_mr_init
Wang Chen [Thu, 3 Jul 2008 04:13:36 +0000 (12:13 +0800)]
ipv4: Do cleanup for ip_mr_init

Same as ip6_mr_init(), make ip_mr_init() return errno if fails.
But do not do error handling in inet_init(), just print a msg.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years agoipv6: Do cleanup for ip6_mr_init.
Wang Chen [Thu, 3 Jul 2008 04:13:30 +0000 (12:13 +0800)]
ipv6: Do cleanup for ip6_mr_init.

If do not do it, we will get following issues:
1. Leaving junks after inet6_init failing halfway.
2. Leaving proc and notifier junks after ipv6 modules unloading.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years agoipv6 route: Prefer outgoing interface with source address assigned.
YOSHIFUJI Hideaki [Wed, 2 Jul 2008 09:30:18 +0000 (18:30 +0900)]
ipv6 route: Prefer outgoing interface with source address assigned.

Outgoing interface is selected by the route decision if unspecified.
Let's prefer routes via interface(s) with the address assigned if we
have multiple routes with same cost.
With help from Naohiro Ooiwa <nooiwa@miraclelinux.com>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years agoipv6 addrconf: add accept_dad sysctl to control DAD operation.
YOSHIFUJI Hideaki [Sat, 28 Jun 2008 05:18:38 +0000 (14:18 +0900)]
ipv6 addrconf: add accept_dad sysctl to control DAD operation.

- If 0, disable DAD.
- If 1, perform DAD (default).
- If >1, perform DAD and disable IPv6 operation if DAD for MAC-based
  link-local address has been failed (RFC4862 5.4.5).

We do not follow RFC4862 by default.  Refer to the netdev thread entitled
"Linux IPv6 DAD not full conform to RFC 4862 ?"
http://www.spinics.net/lists/netdev/msg52027.html

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years agoipv6: Add disable_ipv6 sysctl to disable IPv6 operaion on specific interface.
YOSHIFUJI Hideaki [Sat, 28 Jun 2008 05:17:11 +0000 (14:17 +0900)]
ipv6: Add disable_ipv6 sysctl to disable IPv6 operaion on specific interface.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years agoipv6: Assume the loopback address in link-local scope.
YOSHIFUJI Hideaki [Wed, 25 Jun 2008 07:58:17 +0000 (16:58 +0900)]
ipv6: Assume the loopback address in link-local scope.

Handle interface property strictly when looking up a route
for the loopback address (RFC4291 2.5.3).

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years agoipv6: Do not forward packets with the unspecified source address.
YOSHIFUJI Hideaki [Wed, 25 Jun 2008 07:55:26 +0000 (16:55 +0900)]
ipv6: Do not forward packets with the unspecified source address.

RFC4291 2.5.2.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years agoipv6: Do not assign non-valid address on interface.
YOSHIFUJI Hideaki [Wed, 25 Jun 2008 07:26:47 +0000 (16:26 +0900)]
ipv6: Do not assign non-valid address on interface.

Check the type of the address when adding a new one on interface.
- the unspecified address (::) is always disallowed (RFC4291 2.5.2)
- the loopback address is disallowed unless the interface is (one of)
  loopback (RFC4291 2.5.3).
- multicast addresses are disallowed.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years agotcp: de-bloat a bit with factoring NET_INC_STATS_BH out
Pavel Emelyanov [Thu, 3 Jul 2008 08:05:41 +0000 (01:05 -0700)]
tcp: de-bloat a bit with factoring NET_INC_STATS_BH out

There are some places in TCP that select one MIB index to
bump snmp statistics like this:

if (<something>)
NET_INC_STATS_BH(<some_id>);
else if (<something_else>)
NET_INC_STATS_BH(<some_other_id>);
...
else
NET_INC_STATS_BH(<default_id>);

or in a more tricky but still similar way.

On the other hand, this NET_INC_STATS_BH is a camouflaged
increment of percpu variable, which is not that small.

Factoring those cases out de-bloats 235 bytes on non-preemptible
i386 config and drives parts of the code into 80 columns.

add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-235 (-235)
function                                     old     new   delta
tcp_fastretrans_alert                       1437    1424     -13
tcp_dsack_set                                137     124     -13
tcp_xmit_retransmit_queue                    690     676     -14
tcp_try_undo_recovery                        283     265     -18
tcp_sacktag_write_queue                     1550    1515     -35
tcp_update_reordering                        162     106     -56
tcp_retransmit_timer                         990     904     -86

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agop54: Add quality output to iwlist and iwconfig
Larry.Finger@lwfinger.net [Mon, 30 Jun 2008 15:39:49 +0000 (10:39 -0500)]
p54: Add quality output to iwlist and iwconfig

The p54 driver family reports a quality of 0 in iwconfig and iwlist
output. This patch calculates a quality number as a percentage of the
rssi to the maximum signal of 127 reported as the maximum signal.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: rework debug settings and make debugging safer
Johannes Berg [Mon, 30 Jun 2008 13:10:46 +0000 (15:10 +0200)]
mac80211: rework debug settings and make debugging safer

This patch reworks the mac80211 debug settings making them more focused
and adding help text for those that didn't have one. It also removes a
number of printks that can be triggered remotely and add no value, e.g.
"too short deauthentication frame received - ignoring".

If somebody really needs to debug that they should just add a monitor
interface and look at the frames in wireshark.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: get rid of function pointers in RX path
Johannes Berg [Mon, 30 Jun 2008 13:10:45 +0000 (15:10 +0200)]
mac80211: get rid of function pointers in RX path

This changes the RX path to no longer use function pointers for
RX handlers but rather invoke them directly. If debugging is
enabled, mark the RX handlers noinline because otherwise they
all get inlined into ieee80211_invoke_rx_handlers() which makes
it harder to see where a bug is.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: get rid of function pointers in TX path
Johannes Berg [Mon, 30 Jun 2008 13:10:44 +0000 (15:10 +0200)]
mac80211: get rid of function pointers in TX path

This changes the TX path to no longer use function pointers for
TX handlers but rather invoke them directly. If debugging is
enabled, mark the TX handlers noinline because otherwise they
all get inlined into invoke_tx_handlers() which makes it harder
to see where a bug is.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwl3945: remove RFKILL_STATE_HARD_BLOCKED warnings
Zhu Yi [Mon, 30 Jun 2008 09:23:32 +0000 (17:23 +0800)]
iwl3945: remove RFKILL_STATE_HARD_BLOCKED warnings

The patch fixes the compile warning of "enumeration value
‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch".

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix iwl4965 temperature callback calibration issue
Zhu Yi [Mon, 30 Jun 2008 09:23:31 +0000 (17:23 +0800)]
iwlwifi: fix iwl4965 temperature callback calibration issue

The patch fixes the temperature calibration issue introduced by the
patch "iwlwifi: move RX stats to core, and move temperature to handler".
It also remove the second parameter "stats" since it is already copied
to priv->statistics.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: enable packet injection for iwl3945
Stefanik Gábor [Mon, 30 Jun 2008 09:23:30 +0000 (17:23 +0800)]
iwlwifi: enable packet injection for iwl3945

This patch enables packet injection on iwl3945 devices. Tested with
packetspammer and aireplay-ng.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix incorrect monitor mode operation
Rick Farrington [Mon, 30 Jun 2008 09:23:28 +0000 (17:23 +0800)]
iwlwifi: fix incorrect monitor mode operation

This patch fixes monitor mode operation for iwlwifi.

Problems addressed:
1. when monitor mode was enabled, multiple, overlapped calls were being
made to 'iwl3945_bg_set_monitor'

2. when monitor mode was disabled (via the configure_filter callback),
the driver was still enabling monitor mode

3. when monitor mode was enabled, the selected channel was not set
(eg. 'iwconfig wlanx mode monitor channel n' DID NOT SET channel 'n'
when packet capture was subsequently enabled)

Signed-off-by: Rick Farrington <rickdic@hotmail.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoniu: Add support for rx flow hash configuration.
Santwona Behera [Wed, 2 Jul 2008 10:49:11 +0000 (03:49 -0700)]
niu: Add support for rx flow hash configuration.

Implemented ethtool callback functions for configuring receive flow
hashing in the niu driver.

Signed-off-by: Santwona Behera <santwona.behera@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetdev: Add support for rx flow hash configuration, using ethtool.
Santwona Behera [Wed, 2 Jul 2008 10:47:41 +0000 (03:47 -0700)]
netdev: Add support for rx flow hash configuration, using ethtool.

Added new interfaces to ethtool to configure receive network flow
distribution across multiple rx rings using hashing.

Signed-off-by: Santwona Behera <santwona.behera@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosctp: Mark GET_PEER|LOCAL_ADDR_OLD deprecated.
Vlad Yasevich [Wed, 2 Jul 2008 03:06:22 +0000 (20:06 -0700)]
sctp: Mark GET_PEER|LOCAL_ADDR_OLD deprecated.

Socket options SCTP_GET_PEER_ADDR_OLD, SCTP_GET_PEER_ADDR_NUM_OLD,
SCTP_GET_LOCAL_ADDR_OLD, and SCTP_GET_PEER_LOCAL_ADDR_NUM_OLD
have been replaced by newer versions a since 2005.  It's time
to officially deprecate them and schedule them for removal.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoicmp: fix units for ratelimit
Stephen Hemminger [Wed, 2 Jul 2008 02:29:07 +0000 (19:29 -0700)]
icmp: fix units for ratelimit

Convert the sysctl values for icmp ratelimit to use milliseconds instead
of jiffies which is based on kernel configured HZ.
Internal kernel jiffies are not a proper unit for any userspace API.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoiwlwifi: fix 4965 uCode load
Tomas Winkler [Mon, 30 Jun 2008 09:23:26 +0000 (17:23 +0800)]
iwlwifi: fix 4965 uCode load

This patch fixes uCode load in 4965 HW

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: clean up HW RF-kill state machine and restarts
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:25 +0000 (17:23 +0800)]
iwlwifi: clean up HW RF-kill state machine and restarts

This patch cleans up HW RF-kill state machine.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: blocking mac_start until uCode is complete
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:24 +0000 (17:23 +0800)]
iwlwifi: blocking mac_start until uCode is complete

This patch makes iwl4965_mac_start block until the uCode has been
completely loaded.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: eliminate iwl4965_mac_get_tsf
Ron Rindjunsky [Mon, 30 Jun 2008 09:23:23 +0000 (17:23 +0800)]
iwlwifi: eliminate iwl4965_mac_get_tsf

This patch removes iwl4965_mac_get_tsf, as this function does not
currently reports any actual value.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Remove unnecessary code
Abhijeet Kolekar [Mon, 30 Jun 2008 09:23:22 +0000 (17:23 +0800)]
iwlwifi: Remove unnecessary code

Removed unnecessary goto.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: control 11n capabilities through module param
Ron Rindjunsky [Mon, 30 Jun 2008 09:23:21 +0000 (17:23 +0800)]
iwlwifi: control 11n capabilities through module param

This patch adds module param 11n_disable to allow configuration of 11n
capabilities. The default value of this param is 11n enabled (value 0).

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: unite common settings of HW params
Ron Rindjunsky [Mon, 30 Jun 2008 09:23:20 +0000 (17:23 +0800)]
iwlwifi: unite common settings of HW params

This patch unites common settings of 4965 and 5000 hw params.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: don't bring up interface if RF-kill avoids radio
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:19 +0000 (17:23 +0800)]
iwlwifi: don't bring up interface if RF-kill avoids radio

This patch avoids the user from bringing up the interface if RF-kill
doesn't allow radio.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi : Patch adds rfkill subsystem for 3945
Abhijeet Kolekar [Mon, 30 Jun 2008 09:23:18 +0000 (17:23 +0800)]
iwlwifi : Patch adds rfkill subsystem for 3945

The patch removes the sysfs interface from iwl3945 and uses
the rfkill subsystem instead.

Original patch by Adel, I fixed the patch to work it properly.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: adjust TSF in IBSS
Assaf Krauss [Mon, 30 Jun 2008 09:23:17 +0000 (17:23 +0800)]
iwlwifi: adjust TSF in IBSS

This patch makes the driver, in IBSS mode, comply with TSF requirements
in 2 ways:
1. It notifies mac80211 of its TSF timestamp.
2. It uses the given timestamp in the beacon template to update the ucode.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: add beacon timestamp to beacon template in IBSS
Assaf Krauss [Mon, 30 Jun 2008 09:23:16 +0000 (17:23 +0800)]
mac80211: add beacon timestamp to beacon template in IBSS

This patch adds a beacon timestamp to the beacon template used in IBSS
mode. This way the underlying driver can update its TSF accordingly.
According the spec station should adopt the highest TSF from an incoming
beacons in the cell.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: keep the STATUS_EXIT_PENDING flag till the end of down flow
Mohamed Abbas [Mon, 30 Jun 2008 09:23:15 +0000 (17:23 +0800)]
iwlwifi: keep the STATUS_EXIT_PENDING flag till the end of down flow

This patch avoids unsetting STATUS_EXIT_PENDING in the middle of the
down flow.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix IBSS association flow
Tomas Winkler [Mon, 30 Jun 2008 09:23:14 +0000 (17:23 +0800)]
iwlwifi: fix IBSS association flow

This patch fixes regression caused by
'iwlwifi: send ADD_STA before RXON with assoc bit' patch.
RXON associated wasn't IBSS flow.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: remove obsolete lq_ready use
Ron Rindjunsky [Mon, 30 Jun 2008 09:23:13 +0000 (17:23 +0800)]
iwlwifi: remove obsolete lq_ready use

This patch removes the use of lq_ready, once used to sync between link
quality commands to avoid race conditions, but no longer needed as
bss_info_changed is in use.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: move rx aggregation functions to iwl-rx.c
Ron Rindjunsky [Mon, 30 Jun 2008 09:23:12 +0000 (17:23 +0800)]
iwlwifi: move rx aggregation functions to iwl-rx.c

This patch moves Rx aggregation functions into iwl-rx.c

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: setup compressed BA handler
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:11 +0000 (17:23 +0800)]
iwlwifi: setup compressed BA handler

This patch sets the compressed BA handler for 5000. This allows the rate
scaling algorithm to take in count frames that were sent in AMPDUs.

The compressed BA handler has been moved to iwl-rx.c since it is common to
4965 and 5000.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: remove useless network and duplicate checking
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:10 +0000 (17:23 +0800)]
iwlwifi: remove useless network and duplicate checking

The iwlwifi drivers go to great lengths to avoid passing packets to
mac80211 they think shouldn't go there, while mac80211 can (of course!)
handle them very well.

Especially in the case of duplicate packets this is interesting
because it's such a performance hog (especially for IBSS networks)
while mac80211 does that work on the side without much effort.

This patch removes all that and leaves only what is absolutely
necessary for the hardware.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: move RX handlers to iwl-rx.c
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:09 +0000 (17:23 +0800)]
iwlwifi: move RX handlers to iwl-rx.c

This patch moves RX handlers to iwl-rx.c

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: don't send REPLY_REMOVE_ALL_STA upon exit
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:08 +0000 (17:23 +0800)]
iwlwifi: don't send REPLY_REMOVE_ALL_STA upon exit

This patch avoids sending REPLY_REMOVE_ALL_STA in down flow, this avoids a
meaningless warning from being printed
On the way this patch also renames the the function to
iwl_clear_stations_table

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: move RX stats to core, and move temperature to handler
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:07 +0000 (17:23 +0800)]
iwlwifi: move RX stats to core, and move temperature to handler

This patch moves RX stats flow to core modules, and moves temperature
calibration to handler since it is not needed in 5000.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: send ADD_STA before RXON with assoc bit
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:06 +0000 (17:23 +0800)]
iwlwifi: send ADD_STA before RXON with assoc bit

This patch fixes a bug in association flow. As soon as RXON with assoc bit
is sent, uCode expects to have an entry in its station table that describe
the AP. Receiving a beacon from an HT AP before sending ADD_STA results a
uCode error. This patch sends first the ADD_STA (bcast and bssid) and only
then RXON with assoc bit set

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: add REPLY_TX_POWER_DBM_CMD to get_cmd_string
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:05 +0000 (17:23 +0800)]
iwlwifi: add REPLY_TX_POWER_DBM_CMD to get_cmd_string

This patch adds REPLY_TX_POWER_DBM_CMD to get_cmd_string.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: use iwl_is_associated when possible
Ron Rindjunsky [Mon, 30 Jun 2008 09:23:04 +0000 (17:23 +0800)]
iwlwifi: use iwl_is_associated when possible

This patch add uses of iwl_is_associated in places it is suitable in.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: better station table maintenance
Emmanuel Grumbach [Mon, 30 Jun 2008 09:23:03 +0000 (17:23 +0800)]
iwlwifi: better station table maintenance

This patch makes the station table maintenance safer. Two flags are
maintained:

1) if station is present in driver
2) if station is present in uCode

This will allow us in the future to deal with more stations than the
firmware allows.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Add eeprom version to the version file in sysfs
Tomas Winkler [Mon, 30 Jun 2008 09:23:02 +0000 (17:23 +0800)]
iwlwifi: Add eeprom version to the version file in sysfs

This patch adds eeprom version display into device/version sysfs file
/sys/class/net/wlanX/devices/version

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: configure uCode to use open loop tx power algorithm
Gregory Greenman [Mon, 30 Jun 2008 09:23:01 +0000 (17:23 +0800)]
iwlwifi: configure uCode to use open loop tx power algorithm

This patch configures uCode to use open loop tx power algorithm
via TX_POWER_DBM (0x98) host command.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43/b43legacy: add RFKILL_STATE_HARD_BLOCKED support
Adel Gadllah [Sun, 29 Jun 2008 17:20:21 +0000 (19:20 +0200)]
b43/b43legacy: add RFKILL_STATE_HARD_BLOCKED support

This patch sets the rfkill state to RFKILL_STATE_HARD_BLOCKED when the
radio is killed by the hardware switch.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43/b43legacy: use RFKILL_STATE_UNBLOCKED instead of RFKILL_STATE_ON
Adel Gadllah [Sat, 28 Jun 2008 12:20:40 +0000 (14:20 +0200)]
b43/b43legacy: use RFKILL_STATE_UNBLOCKED instead of RFKILL_STATE_ON

This patch removes the usage RFKILL_STATE_ON and uses
RFKILL_STATE_UNBLOCKED instead.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix warning: unused variable invoke_tx_handlers
Tomas Winkler [Sat, 28 Jun 2008 00:15:03 +0000 (03:15 +0300)]
mac80211: fix warning: unused variable invoke_tx_handlers

This patch fixes warning: unused variable in invoke_tx_handlers
when compiling without MAC80211_DEBUG option

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agohostap: use radiotap headers by default
Pavel Roskin [Fri, 27 Jun 2008 20:20:16 +0000 (16:20 -0400)]
hostap: use radiotap headers by default

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agohostap: add radiotap support in monitor mode
Pavel Roskin [Fri, 27 Jun 2008 20:20:10 +0000 (16:20 -0400)]
hostap: add radiotap support in monitor mode

Provide MAC time, rate, channel, signal and noise.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agohostap: don't skip any headers in hostap_80211_header_parse()
Pavel Roskin [Fri, 27 Jun 2008 20:20:04 +0000 (16:20 -0400)]
hostap: don't skip any headers in hostap_80211_header_parse()

Don't try to skip any headers in hostap_80211_header_parse().  We never
use that function for interfaces affected by local->monitor_type.  Both
the master and the AP interface receive 802.11 frames without any
additional headers.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix rfkill deps and remove input device usage
Adel Gadllah [Fri, 27 Jun 2008 17:45:07 +0000 (19:45 +0200)]
iwlwifi: fix rfkill deps and remove input device usage

This patch fixes the rfkill deps for iwl4965/5000
and removes the input device usage.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: removing duplicated parsing of information elements
Ester Kummer [Fri, 27 Jun 2008 15:54:48 +0000 (18:54 +0300)]
mac80211: removing duplicated parsing of information elements

This patch removes the duplicated parsing of information elements
in ieee80211_rx_bss_info and in ieee_rx_mgmt_beacon

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ester Kummer <ester.kummer@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agobuild algorithms into the mac80211 module
Adrian Bunk [Thu, 26 Jun 2008 10:38:13 +0000 (13:38 +0300)]
build algorithms into the mac80211 module

The old infrastructure was:
- the default algorithm is built into mac80211
- other algorithms get into their own modules

The implementation of this complicated scheme was horrible
(just look at net/mac80211/Makefile), and anyone adding a new
algorithm would most likely not get it right at his first attempt.

This patch therefore builds all enabled algorithms into the mac80211
module.

The user interface for the rate control algorithms changes as follows:
- first the user can choose which algorithms to enable (currently only
  MAC80211_RC_PID is available)
- if more than one algorithm is enabled (currently not possible since
  only one algorithm is present) the user then chooses the default one

Note:
- MAC80211_RC_PID is always enables for CONFIG_EMBEDDED=n

Technical changes:
- all selected algorithms get into the mac80211 module
- net/mac80211/Makefile can now become much less complicated
- support for rc80211_pid_algo.c being modular is no longer required
- this includes unexporting mesh_plink_broken

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: add last beacon time in scan list
Emmanuel Grumbach [Tue, 24 Jun 2008 10:38:00 +0000 (13:38 +0300)]
mac80211: add last beacon time in scan list

This patch adds the interval between the scan results and the last time a
beacon was received in the result of the scan.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>