linux-2.6
15 years agonetfilter: fix warning in net/netfilter/nf_conntrack_proto_tcp.c
Ingo Molnar [Tue, 25 Nov 2008 17:20:13 +0000 (18:20 +0100)] 
netfilter: fix warning in net/netfilter/nf_conntrack_proto_tcp.c

fix this warning:

  net/netfilter/nf_conntrack_proto_tcp.c: In function \u2018tcp_in_window\u2019:
  net/netfilter/nf_conntrack_proto_tcp.c:491: warning: unused variable \u2018net\u2019
  net/netfilter/nf_conntrack_proto_tcp.c: In function \u2018tcp_packet\u2019:
  net/netfilter/nf_conntrack_proto_tcp.c:812: warning: unused variable \u2018net\u2019

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agonetfilter: nfmark IPV6 routing in OUTPUT, mangle, NFQUEUE
Eric Leblond [Tue, 25 Nov 2008 11:18:11 +0000 (12:18 +0100)] 
netfilter: nfmark IPV6 routing in OUTPUT, mangle, NFQUEUE

This patch let nfmark to be evaluated for routing decision for OUTPUT
packet, in mangle table, when process paquet in NFQUEUE. This patch is
an IPv6 port of Laurent Licour IPv4 one.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agonetfilter: nfmark routing in OUTPUT, mangle, NFQUEUE
Eric Leblond [Tue, 25 Nov 2008 11:15:16 +0000 (12:15 +0100)] 
netfilter: nfmark routing in OUTPUT, mangle, NFQUEUE

This patch let nfmark to be evaluated for routing decision for OUTPUT
packet, in mangle table, when process paquet in NFQUEUE
Until now, only change (in NFQUEUE process) on fields src_addr,
dest_addr and tos could make netfilter to reevalute the routing.

From: Laurent Licour <laurent@licour.com>
Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agonetfilter: nf_conntrack_ftp: change "partial ..." message to pr_debug()
Patrick McHardy [Mon, 24 Nov 2008 17:34:48 +0000 (18:34 +0100)] 
netfilter: nf_conntrack_ftp: change "partial ..." message to pr_debug()

The message triggers when sending non-FTP data on port 21 or with
certain clients that use multiple syscalls to send the command.

Change to pr_debug() since users have been complaining.

Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agonetfilter: nf_conntrack_proto_sctp: avoid bogus warning
Patrick McHardy [Mon, 24 Nov 2008 12:44:55 +0000 (13:44 +0100)] 
netfilter: nf_conntrack_proto_sctp: avoid bogus warning

net/netfilter/nf_conntrack_proto_sctp.c: In function 'sctp_packet':
net/netfilter/nf_conntrack_proto_sctp.c:376: warning: array subscript is above array bounds

gcc doesn't realize that do_basic_checks() guarantees that there is
at least one valid chunk and thus new_state is never SCTP_CONNTRACK_MAX
after the loop. Initialize to SCTP_CONNTRACK_NONE to avoid the warning.

Based on patch by Wu Fengguang <wfg@linux.intel.com>

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: ip{,6}t_policy.h should include xp_policy.h
Andy Whitcroft [Thu, 20 Nov 2008 14:59:56 +0000 (15:59 +0100)] 
netfilter: ip{,6}t_policy.h should include xp_policy.h

It seems that all of the include/netfilter_{ipv4,ipv6}/{ipt,ip6t}_*.h which
share constants include the corresponding include/netfilter/xp_*.h files.
Neither ipt_policy.h not ip6t_policy.h do.  Make these consistant with
the norm.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: nf_conntrack_proto_gre: spread __exit
Alexey Dobriyan [Thu, 20 Nov 2008 09:01:37 +0000 (10:01 +0100)] 
netfilter: nf_conntrack_proto_gre: spread __exit

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: ip6table_filter: merge LOCAL_IN and FORWARD hooks
Alexey Dobriyan [Thu, 20 Nov 2008 08:58:08 +0000 (09:58 +0100)] 
netfilter: ip6table_filter: merge LOCAL_IN and FORWARD hooks

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: xt_recent: don't save proc dirs
Alexey Dobriyan [Thu, 20 Nov 2008 08:57:01 +0000 (09:57 +0100)] 
netfilter: xt_recent: don't save proc dirs

Not needed, since creation and removal are done by name.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: nf_conntrack: fix warning and prototype mismatch
Patrick McHardy [Tue, 18 Nov 2008 11:24:17 +0000 (12:24 +0100)] 
netfilter: nf_conntrack: fix warning and prototype mismatch

net/netfilter/nf_conntrack_core.c:46:1: warning: symbol 'nfnetlink_parse_nat_setup_hook' was not declared. Should it be static?

Including the proper header also revealed an incorrect prototype.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: nfnetlink_log: fix warning and prototype mismatch
Patrick McHardy [Tue, 18 Nov 2008 11:16:52 +0000 (12:16 +0100)] 
netfilter: nfnetlink_log: fix warning and prototype mismatch

net/netfilter/nfnetlink_log.c:537:1: warning: symbol 'nfulnl_log_packet' was not declared. Should it be static?

Including the proper header also revealed an incorrect prototype.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: ctnetlink: deliver events for conntracks changed from userspace
Pablo Neira Ayuso [Tue, 18 Nov 2008 10:56:20 +0000 (11:56 +0100)] 
netfilter: ctnetlink: deliver events for conntracks changed from userspace

As for now, the creation and update of conntracks via ctnetlink do not
propagate an event to userspace. This can result in inconsistent situations
if several userspace processes modify the connection tracking table by means
of ctnetlink at the same time. Specifically, using the conntrack command
line tool and conntrackd at the same time can trigger unconsistencies.

This patch also modifies the event cache infrastructure to pass the
process PID and the ECHO flag to nfnetlink_send() to report back
to userspace if the process that triggered the change needs so.
Based on a suggestion from Patrick McHardy.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: ctnetlink: helper modules load-on-demand support
Pablo Neira Ayuso [Tue, 18 Nov 2008 10:54:05 +0000 (11:54 +0100)] 
netfilter: ctnetlink: helper modules load-on-demand support

This patch adds module loading for helpers via ctnetlink.

* Creation path: We support explicit and implicit helper assignation. For
  the explicit case, we try to load the module. If the module is correctly
  loaded and the helper is present, we return EAGAIN to re-start the
  creation. Otherwise, we return EOPNOTSUPP.
* Update path: release the spin lock, load the module and check. If it is
  present, then return EAGAIN to re-start the update.

This patch provides a refactorized function to lookup-and-set the
connection tracking helper. The function removes the exported symbol
__nf_ct_helper_find as it has not clients anymore.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: nf_conntrack: connection tracking helper name persistent aliases
Pablo Neira Ayuso [Mon, 17 Nov 2008 15:01:42 +0000 (16:01 +0100)] 
netfilter: nf_conntrack: connection tracking helper name persistent aliases

This patch adds the macro MODULE_ALIAS_NFCT_HELPER that defines a
way to provide generic and persistent aliases for the connection
tracking helpers.

This next patch requires this patch.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: ctnetlink: get rid of module refcounting in ctnetlink
Pablo Neira Ayuso [Mon, 17 Nov 2008 15:00:40 +0000 (16:00 +0100)] 
netfilter: ctnetlink: get rid of module refcounting in ctnetlink

This patch replaces the unnecessary module refcounting with
the read-side locks. With this patch, all the dump and fill_info
function are called under the RCU read lock.

Based on a patch from Fabian Hugelshofer.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: ctnetlink: use EOPNOTSUPP instead of EINVAL if the conntrack has no helper
Pablo Neira Ayuso [Mon, 17 Nov 2008 14:55:48 +0000 (15:55 +0100)] 
netfilter: ctnetlink: use EOPNOTSUPP instead of EINVAL if the conntrack has no helper

This patch changes the return value if the conntrack has no helper assigned.
Instead of EINVAL, which is reserved for malformed messages, it returns
EOPNOTSUPP.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: ctnetlink: use nf_conntrack_get instead of atomic_inc
Pablo Neira Ayuso [Mon, 17 Nov 2008 14:53:33 +0000 (15:53 +0100)] 
netfilter: ctnetlink: use nf_conntrack_get instead of atomic_inc

Use nf_conntrack_get instead of the direct call to atomic_inc.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: nf_nat: remove warn_if_extra_mangle
Simon Arlott [Tue, 4 Nov 2008 13:35:39 +0000 (14:35 +0100)] 
netfilter: nf_nat: remove warn_if_extra_mangle

In net/ipv4/netfilter/nf_nat_rule.c, the function warn_if_extra_mangle was added
in commit 5b1158e909ecbe1a052203e0d8df15633f829930 (2006-12-02). I have a DNAT
target in the OUTPUT chain than changes connections with dst 2.0.0.1 to another
address which I'll substitute with 66.102.9.99 below.

On every boot I get the following message:
[  146.252505] NAT: no longer support implicit source local NAT
[  146.252517] NAT: packet src 66.102.9.99 -> dst 2.0.0.1

As far as I can tell from reading the function doing this, it should warn if the
source IP for the route to 66.102.9.99 is different from 2.0.0.1 but that is not
the case. It doesn't make sense to check the DNAT target against the local route
source.

Either the function should be changed to correctly check the route, or it should
be removed entirely as it's been nearly 2 years since it was added.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: netns ebtables: br_nf_pre_routing_finish() fixup
Alexey Dobriyan [Tue, 4 Nov 2008 13:31:29 +0000 (14:31 +0100)] 
netfilter: netns ebtables: br_nf_pre_routing_finish() fixup

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: netns ebtables: ebtable_nat in netns
Alexey Dobriyan [Tue, 4 Nov 2008 13:30:46 +0000 (14:30 +0100)] 
netfilter: netns ebtables: ebtable_nat in netns

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: netns ebtables: ebtable_filter in netns
Alexey Dobriyan [Tue, 4 Nov 2008 13:29:58 +0000 (14:29 +0100)] 
netfilter: netns ebtables: ebtable_filter in netns

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: netns ebtables: ebtable_broute in netns
Alexey Dobriyan [Tue, 4 Nov 2008 13:29:03 +0000 (14:29 +0100)] 
netfilter: netns ebtables: ebtable_broute in netns

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: netns ebtables: more cleanup during ebt_unregister_table()
Alexey Dobriyan [Tue, 4 Nov 2008 13:28:04 +0000 (14:28 +0100)] 
netfilter: netns ebtables: more cleanup during ebt_unregister_table()

Now that ebt_unregister_table() can be called during netns stop, and module
pinning scheme can't prevent netns stop, do table cleanup by hand.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: netns ebtables: part 2
Alexey Dobriyan [Tue, 4 Nov 2008 13:27:15 +0000 (14:27 +0100)] 
netfilter: netns ebtables: part 2

* return ebt_table from ebt_register_table(), module code will save it into
  per-netns data for unregistration
* duplicate ebt_table at the very beginning of registration -- it's added into
  list, so one ebt_table wouldn't end up in many lists (and each netns has
  different one)
* introduce underscored tables in individial modules, this is temporary to not
  break bisection.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: netns ebtables: part 1
Alexey Dobriyan [Tue, 4 Nov 2008 13:22:55 +0000 (14:22 +0100)] 
netfilter: netns ebtables: part 1

* propagate netns from userspace, register table in passed netns
* remporarily register every ebt_table in init_net

P. S.: one needs to add ".netns_ok = 1" to igmp_protocol to test with
ebtables(8) in netns.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: arptable_filter: merge forward hook
Alexey Dobriyan [Tue, 4 Nov 2008 13:22:13 +0000 (14:22 +0100)] 
netfilter: arptable_filter: merge forward hook

It's identical to NF_ARP_IN hook.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: netns-aware ipt_addrtype
Alexey Dobriyan [Tue, 4 Nov 2008 13:21:48 +0000 (14:21 +0100)] 
netfilter: netns-aware ipt_addrtype

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: xt_NFLOG: don't call nf_log_packet in NFLOG module.
Eric Leblond [Tue, 4 Nov 2008 13:21:08 +0000 (14:21 +0100)] 
netfilter: xt_NFLOG: don't call nf_log_packet in NFLOG module.

This patch modifies xt_NFLOG to suppress the call to nf_log_packet()
function. The call of this wrapper in xt_NFLOG was causing NFLOG to
use the first initialized module. Thus, if ipt_ULOG is loaded before
nfnetlink_log all NFLOG rules are treated as plain LOG rules.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonet/: Kill now superfluous ->last_rx stores.
David S. Miller [Tue, 4 Nov 2008 06:01:07 +0000 (22:01 -0800)] 
net/: Kill now superfluous ->last_rx stores.

The generic packet receive code takes care of setting
netdev->last_rx when necessary, for the sake of the
bonding ARP monitor.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetem: eliminate unneeded return values
Stephen Hemminger [Tue, 4 Nov 2008 05:13:26 +0000 (21:13 -0800)] 
netem: eliminate unneeded return values

All these individual parsing functions never return an error,
so they can be void.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodrivers/net: Kill now superfluous ->last_rx stores.
David S. Miller [Tue, 4 Nov 2008 05:11:17 +0000 (21:11 -0800)] 
drivers/net: Kill now superfluous ->last_rx stores.

The generic packet receive code takes care of setting
netdev->last_rx when necessary, for the sake of the
bonding ARP monitor.

Drivers need not do it any more.

Some cases had to be skipped over because the drivers
were making use of the ->last_rx value themselves.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: remove two duplicated #include
Jianjun Kong [Tue, 4 Nov 2008 02:23:09 +0000 (18:23 -0800)] 
net: remove two duplicated #include

Removed duplicated #include <rdma/ib_verbs.h> in net/9p/trans_rdma.c
and  #include <linux/thread_info.h> in net/socket.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: '&' redux
Alexey Dobriyan [Tue, 4 Nov 2008 02:21:05 +0000 (18:21 -0800)] 
net: '&' redux

I want to compile out proc_* and sysctl_* handlers totally and
stub them to NULL depending on config options, however usage of &
will prevent this, since taking adress of NULL pointer will break
compilation.

So, drop & in front of every ->proc_handler and every ->strategy
handler, it was never needed in fact.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobonding, net: Move last_rx update into bonding recv logic
Jay Vosburgh [Tue, 4 Nov 2008 02:16:50 +0000 (18:16 -0800)] 
bonding, net: Move last_rx update into bonding recv logic

The only user of the net_device->last_rx field is bonding.
This patch adds a conditional update of last_rx to the bonding special
logic in skb_bond_should_drop, causing last_rx to only be updated when
the ARP monitor is running.

This frees network device drivers from the necessity of
updating last_rx, which can have cache line thrash issues.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: increase receive packet quantum
Stephen Hemminger [Tue, 4 Nov 2008 01:14:38 +0000 (17:14 -0800)] 
net: increase receive packet quantum

This patch gets about 1.25% back on tbench regression.

My change to NAPI for multiqueue support changed the time limit on
network receive processing.  Under sustained loads like tbench, this
can cause the receiver to reschedule prematurely.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoprintk: ipv4 address digits printed in reverse order
Harvey Harrison [Tue, 4 Nov 2008 01:09:55 +0000 (17:09 -0800)] 
printk: ipv4 address digits printed in reverse order

put_dec_trunc prints the digits in reverse order and is reversed
inside number(). Continue using put_dec_trunc, but reverse each quad
in ip4_addr_string.

[Noticed by Julius Volz]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoIPVS: Remove supports_ipv6 scheduler flag
Julius Volz [Tue, 4 Nov 2008 01:08:56 +0000 (17:08 -0800)] 
IPVS: Remove supports_ipv6 scheduler flag

Remove the 'supports_ipv6' scheduler flag since all schedulers now
support IPv6.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoIPVS: Add IPv6 support to LBLC/LBLCR schedulers
Julius Volz [Tue, 4 Nov 2008 01:08:28 +0000 (17:08 -0800)] 
IPVS: Add IPv6 support to LBLC/LBLCR schedulers

Add IPv6 support to LBLC and LBLCR schedulers. These were the last
schedulers without IPv6 support, but we might want to keep the
supports_ipv6 flag in the case of future schedulers without IPv6
support.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Update version to 3.95
Matt Carlson [Tue, 4 Nov 2008 00:58:53 +0000 (16:58 -0800)] 
tg3: Update version to 3.95

This patch updates the version to 3.95.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobroadcom: Add support for BCM50610
Matt Carlson [Tue, 4 Nov 2008 00:56:51 +0000 (16:56 -0800)] 
broadcom: Add support for BCM50610

This patch adds the BCM50610 to the list of phys supported by the
broadcom driver.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobroadcom: Refine expansion register access routine
Matt Carlson [Tue, 4 Nov 2008 00:56:29 +0000 (16:56 -0800)] 
broadcom: Refine expansion register access routine

This patch makes the expansion register access routines a little more
formal.  They will be used by the following bcm50610 support patch.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobroadcom: Add flow control support
Matt Carlson [Tue, 4 Nov 2008 00:56:07 +0000 (16:56 -0800)] 
broadcom: Add flow control support

This patch adds flow control support to Broadcom phys.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: 5785 enhancements
Matt Carlson [Tue, 4 Nov 2008 00:55:44 +0000 (16:55 -0800)] 
tg3: 5785 enhancements

This patch refines support for the 5785 device.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Refine phylib support
Matt Carlson [Tue, 4 Nov 2008 00:54:56 +0000 (16:54 -0800)] 
tg3: Refine phylib support

This patch refines the phylib support in the tg3 driver.  The patch does
the following things :

* Rename tg3_mdio_config() to tg3_mdio_config_5785().  The 5785 will be
  the only device that will use it so the name might as well reflect
  that.
* Fix a memory leak if mdiobus_register() fails.
* Add code to deal with phy device detection failures.
* Add code to correct the supported list of phy features based on the
  MAC <=> PHY interface.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Allow WOL for phylib controlled Broadcom phys
Matt Carlson [Tue, 4 Nov 2008 00:54:15 +0000 (16:54 -0800)] 
tg3: Allow WOL for phylib controlled Broadcom phys

This patch allows WOL to be enabled for Broadcom phys under phylib
control.  The only exception is the AC131, which has a completely
different register set.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Refine power management and WOL code
Matt Carlson [Tue, 4 Nov 2008 00:53:46 +0000 (16:53 -0800)] 
tg3: Refine power management and WOL code

Commit 12dac0756d357325b107fe6ec24921ec38661839 ("tg3: adapt tg3 to
use reworked PCI PM code") introduced the new PCI PM API to the tg3
driver.  The patch was understandably conservative, so this patch
elaborates on that work.

The patch starts by creating a single point in tg3_set_power_state()
to decide whether or not to enable WOL.  The rest of the code in
tg3_set_power_state() was then pivoted to use the result of this
decision.

The patch then makes sure the device is allowed to wakeup before
reporting whether or not WOL is currently enabled.  The final hunks of
the patch consolidate where the WOL capability and WOL enabled flags
are set to a single location.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Move phylib report to end of tg3_init_one
Matt Carlson [Tue, 4 Nov 2008 00:52:56 +0000 (16:52 -0800)] 
tg3: Move phylib report to end of tg3_init_one

Currently, phylib reports appear with a eth%d prefix.  Move the line
after register_netdev() and place it alongside the other informative
messages.  Update nearby informative messages accordingly.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Do not enable APE on bcm5700
Matt Carlson [Tue, 4 Nov 2008 00:52:32 +0000 (16:52 -0800)] 
tg3: Do not enable APE on bcm5700

With older versions of the NVRAM format, the driver may mistakenly
determine that APE is enabled.  Make sure this doesn't happen by
restricting the ENABLE_APE check to devices known to have more
recent NVRAM image formats.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Reclaim TG3_FLG3_5761_5784_AX_FIXES flag
Matt Carlson [Tue, 4 Nov 2008 00:52:09 +0000 (16:52 -0800)] 
tg3: Reclaim TG3_FLG3_5761_5784_AX_FIXES flag

This patch reclaims the TG3_FLG3_5761_5784_AX_FIXES flag.  It only
used twice in non-fast paths.  This patch also consolidates some other
places where specific 5784 AX chip revisions can be generalized.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Preserve LAA when device control is released
Matt Carlson [Tue, 4 Nov 2008 00:51:36 +0000 (16:51 -0800)] 
tg3: Preserve LAA when device control is released

This patch moves the __tg3_set_mac_addr() function earlier in the file
listing, to avoid a function prototype, and calls the function to
restore the LAA after a driver unload chip reset.  With this code in
place, the administrator can wake the machine using the LAA.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Preserve DASH connectivity when WOL enabled
Matt Carlson [Tue, 4 Nov 2008 00:51:11 +0000 (16:51 -0800)] 
tg3: Preserve DASH connectivity when WOL enabled

DASH firmware runs on the APE side of the chip, but it requires a few MAC
to be programmed correctly.

When WOL is enabled and management firmware is disabled, incoming
packets are evaluated and discarded at the chip's rule processor.
When management firmware is enabled, the hardware must be informed that
there are agents further up the stack that still use the incoming
frames.  Normally management firmware will configure the MAC correctly
on its own, but there can be cases where the setting could get clobbered
by the driver.  The first hunk of this patch preserves this setting.

The second hunk of this patch wipes out the driver present signature of
the APE memory space.  By doing so, the DASH firmware can assume
driver absent behavior.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Use pci_ioremap_bar()
Matt Carlson [Tue, 4 Nov 2008 00:49:57 +0000 (16:49 -0800)] 
tg3: Use pci_ioremap_bar()

This patch replaces the existing APE register mapping code with a call
to pci_ioremap_bar().  The code that maps the main device register space
did not undergo a similar change because the information derived from
the pci_resource_start() and pci_resource_len() is still used to
populate the (optional) mem_start and mem_end netdevice members.
Replace hardcoded constants where appropriate.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: Add 5761S support
Matt Carlson [Tue, 4 Nov 2008 00:49:18 +0000 (16:49 -0800)] 
tg3: Add 5761S support

This patch adds support for the 5761S chip variants.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agopkt_sched: sch_generic: Kfree gso_skb in qdisc_reset()
Jarek Poplawski [Mon, 3 Nov 2008 10:52:50 +0000 (02:52 -0800)] 
pkt_sched: sch_generic: Kfree gso_skb in qdisc_reset()

Since gso_skb is re-used for qdisc_peek_dequeued(), and this skb is
counted in the qdisc->q.qlen, it has to be kfreed during qdisc_reset()
when qlen is zeroed.

With help from David S. Miller <davem@davemloft.net>

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/tcp_ipv4.c
Jianjun Kong [Mon, 3 Nov 2008 10:49:10 +0000 (02:49 -0800)] 
net: clean up net/ipv4/tcp_ipv4.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/devinet.c
Jianjun Kong [Mon, 3 Nov 2008 10:48:48 +0000 (02:48 -0800)] 
net: clean up net/ipv4/devinet.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/pararp.c
Jianjun Kong [Mon, 3 Nov 2008 10:48:14 +0000 (02:48 -0800)] 
net: clean up net/ipv4/pararp.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/ip_fragment.c tcp_timer.c ip_input.c
Jianjun Kong [Mon, 3 Nov 2008 10:47:38 +0000 (02:47 -0800)] 
net: clean up net/ipv4/ip_fragment.c tcp_timer.c ip_input.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/ipmr.c
Jianjun Kong [Mon, 3 Nov 2008 08:28:02 +0000 (00:28 -0800)] 
net: clean up net/ipv4/ipmr.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/ip_sockglue.c tcp_output.c
Jianjun Kong [Mon, 3 Nov 2008 08:27:11 +0000 (00:27 -0800)] 
net: clean up net/ipv4/ip_sockglue.c tcp_output.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/igmp.c
Jianjun Kong [Mon, 3 Nov 2008 08:26:09 +0000 (00:26 -0800)] 
net: clean up net/ipv4/igmp.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/fib_frontend.c fib_hash.c ip_gre.c
Jianjun Kong [Mon, 3 Nov 2008 08:25:16 +0000 (00:25 -0800)] 
net: clean up net/ipv4/fib_frontend.c fib_hash.c ip_gre.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/ipip.c raw.c tcp.c tcp_minisocks.c tcp_yeah.c xfrm4_policy.c
Jianjun Kong [Mon, 3 Nov 2008 08:24:34 +0000 (00:24 -0800)] 
net: clean up net/ipv4/ipip.c raw.c tcp.c tcp_minisocks.c tcp_yeah.c xfrm4_policy.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/ah4.c esp4.c fib_semantics.c inet_connection_sock.c inetpeer...
Jianjun Kong [Mon, 3 Nov 2008 08:23:42 +0000 (00:23 -0800)] 
net: clean up net/ipv4/ah4.c esp4.c fib_semantics.c inet_connection_sock.c inetpeer.c ip_output.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosunrpc: Fix build warning due to typo in %pI4 format changes.
David S. Miller [Mon, 3 Nov 2008 07:57:06 +0000 (23:57 -0800)] 
sunrpc: Fix build warning due to typo in %pI4 format changes.

Noticed by Stephen Hemminger.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoIPVS: Add IPv6 support to SH and DH schedulers
Julius Volz [Sat, 1 Nov 2008 13:13:19 +0000 (13:13 +0000)] 
IPVS: Add IPv6 support to SH and DH schedulers

Add IPv6 support to SH and DH schedulers. I hope this simple IPv6 address
hashing is good enough. The 128 bit are just XORed into 32 before hashing
them like an IPv4 address.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
Acked-by: Simon Horman <horms@verge.net.au>
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, 2 Nov 2008 21:13:07 +0000 (13:13 -0800)] 
Merge branch 'davem-next' of /linux/kernel/git/jgarzik/netdev-2.6

16 years agobonding: update docs to correctly reflect arp_ip_target behavior
Andy Gospodarek [Wed, 22 Oct 2008 11:19:48 +0000 (11:19 +0000)] 
bonding: update docs to correctly reflect arp_ip_target behavior

This documentation patch hopes to clarify that the '+' was only needed
for Fedora 7 and Red Hat Enterprise Linux 5.0 and 5.1.  After that the
IP addreses could be added as a comma separated list just like the
module option.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosmc91x: add __init markings to smc_drv_probe()
Mike Frysinger [Fri, 31 Oct 2008 22:11:06 +0000 (22:11 +0000)] 
smc91x: add __init markings to smc_drv_probe()

The smc_drv_probe() is the platform_driver probe function and it is only
called during init.  Further, it calls smc_probe() which is marked as __init
already.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoforcdeth: increase max_interrupt_work
Joe Korty [Wed, 29 Oct 2008 21:22:16 +0000 (14:22 -0700)] 
forcdeth: increase max_interrupt_work

This eliminates the following often-generated warning from my 64 bit
Opteron SMP test stand:

eth0: too many iterations (6) in nv_nic_irq

According to the web, the problem is that the forcedeth driver has a
too-low value for max_interrupt_work.  Grepping the kernel I see that
forcedeth has the second lowest value of all ethernet drivers (ie, 6).
Most are in the 20-40 range.  So this patch increases this a bit, from 6
to 15 (at 15 forcedeth becomes the driver with third-lowest
max_interrupt_work value).

My test stand, which used to print out the above warnings repetitively
whenever it was under heavy net load, no longer does so.

Signed-off-by: Joe Korty <joe.korty@ccur.com>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoixgbe: add device support for 82598AT (copper 10GbE) adapters
Jesse Brandeburg [Fri, 31 Oct 2008 07:46:40 +0000 (00:46 -0700)] 
ixgbe: add device support for 82598AT (copper 10GbE) adapters

Intel is currently shipping support for adapters with a phy
that does 10GBase-T (copper), which is 10 Gigabit ethernet
over standard Category 6 cabling.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoatlx: timer cleanup
Stephen Hemminger [Fri, 31 Oct 2008 23:52:04 +0000 (16:52 -0700)] 
atlx: timer cleanup

Do some cleanup on timer usage in this driver:
  * Use round_jiffies to align wakeups and reduce power.
  * Remove atl1_watchdog which does nothing but rearm itself
  * Use setup_timer() function

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoatlx: use embedded net_device_stats
Stephen Hemminger [Fri, 31 Oct 2008 23:52:03 +0000 (16:52 -0700)] 
atlx: use embedded net_device_stats

There is now a net_device_stats structure inside net_device that should
be used if possible by devices. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosch_netem: Replace ->requeue() method with open code
Jarek Poplawski [Sun, 2 Nov 2008 07:36:03 +0000 (00:36 -0700)] 
sch_netem: Replace ->requeue() method with open code

After removing netem classful functionality we are sure its inner
qdisc is tfifo, so we can replace qdisc->ops->requeue() method with
open code. After this patch there are no more ops->requeue() users.

The idea of this patch is by Patrick McHardy.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosch_netem: Remove classful functionality
Jarek Poplawski [Sun, 2 Nov 2008 07:35:24 +0000 (00:35 -0700)] 
sch_netem: Remove classful functionality

Patrick McHardy noticed that: "a lot of the functionality of netem
requires the inner tfifo anyways and rate-limiting is usually done
on top of netem. So I would suggest so either hard-wire the tfifo
qdisc or at least make the assumption that inner qdiscs are
work-conserving.", and later: "- a lot of other qdiscs still don't
work as inner qdiscs of netem [...]".

So, according to his suggestion, this patch removes classful options
of netem. The main reason of this change is to remove ops->requeue()
method, which is currently used only by netem.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP] CUBIC v2.3
Sangtae Ha [Wed, 29 Oct 2008 04:07:18 +0000 (00:07 -0400)] 
[TCP] CUBIC v2.3

Signed-off-by: Sangtae Ha <sha2@ncsu.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoaf_unix: clean up net/unix/af_unix.c garbage.c sysctl_net_unix.c
Jianjun Kong [Sun, 2 Nov 2008 04:38:31 +0000 (21:38 -0700)] 
af_unix: clean up net/unix/af_unix.c garbage.c sysctl_net_unix.c

clean up net/unix/af_unix.c garbage.c sysctl_net_unix.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoudp: add a missing smp_wmb() in udp_lib_get_port()
Eric Dumazet [Sun, 2 Nov 2008 04:19:18 +0000 (21:19 -0700)] 
udp: add a missing smp_wmb() in udp_lib_get_port()

Corey Minyard spotted a missing memory barrier in udp_lib_get_port()

We need to make sure a reader cannot read the new 'sk->sk_next' value
and previous value of 'sk->sk_hash'. Or else, an item could be deleted
from a chain, and inserted into another chain. If new chain was empty
before the move, 'next' pointer is NULL, and lockless reader can
not detect it missed following items in original chain.

This patch is temporary, since we expect an upcoming patch
to introduce another way of handling the problem.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoxfrm6: handling fragment
Nicolas Dichtel [Sun, 2 Nov 2008 04:12:07 +0000 (21:12 -0700)] 
xfrm6: handling fragment

RFC4301 Section 7.1 says:

"7.1.  Tunnel Mode SAs that Carry Initial and Non-Initial Fragments

     All implementations MUST support tunnel mode SAs that are configured
     to pass traffic without regard to port field (or ICMP type/code or
     Mobility Header type) values.  If the SA will carry traffic for
     specified protocols, the selector set for the SA MUST specify the
     port fields (or ICMP type/code or Mobility Header type) as ANY.  An
     SA defined in this fashion will carry all traffic including initial
     and non-initial fragments for the indicated Local/Remote addresses
     and specified Next Layer protocol(s)."

But for IPv6, fragment is treated as a protocol.  This change catches
protocol transported in fragmented packet.  In IPv4, there is no
problem.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: fix two kernel-doc warnings
Johannes Berg [Thu, 23 Oct 2008 06:51:20 +0000 (08:51 +0200)] 
mac80211: fix two kernel-doc warnings

One parameter wasn't described and one I forgot to update when
renaming it; also update TBDs in sta_info.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: use ETH_P_PAE
Luis R. Rodriguez [Mon, 27 Oct 2008 17:17:29 +0000 (10:17 -0700)] 
ath9k: use ETH_P_PAE

It was being discussed where we would put this, but now it found a home
so use its define.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: remove useless conditional
Bob Copeland [Sun, 26 Oct 2008 15:24:48 +0000 (11:24 -0400)] 
ath9k: remove useless conditional

ath9k_hw_keyreset returns true in either branch.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoorinoco: cache downloadable firmware image in memory for use during resume
Andrey Borzenkov [Sun, 19 Oct 2008 08:06:11 +0000 (12:06 +0400)] 
orinoco: cache downloadable firmware image in memory for use during resume

If card is using downloadable firmware (like Agere 9.x), firmware has
to be reloaded during resume. It is not possible to use request_firmware
for that, because tasks are still frozen, so request_firmware will
just timeout and fail. So cache firmware image in memory for later
reuse in ->resume method.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoorinoco: reload firmware on resume
Andrey Borzenkov [Sun, 12 Oct 2008 16:15:43 +0000 (20:15 +0400)] 
orinoco: reload firmware on resume

On resume card state is likely lost so we have to reload firmware
again.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Acked-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Update interrupt masking code
Nick Kossifidis [Sun, 26 Oct 2008 18:40:25 +0000 (20:40 +0200)] 
ath5k: Update interrupt masking code

*Properly get/set all available ISR/IMR values and review common/uncommon bits
*Better handling of per-txq interrupts (we can now resolve what q is generating
 each interrupt -this will help in debuging wme later)
*Some minor updates from legacy-hal
*Properly handle RXNOFRM and TXNOFRM interrupt masking (even when we don't set
 them on IMR they keep showing up, so we disable them by zeroing AR5K_RXNOFRM
 and AR5K_TXNOFRM registers). This doesn't exist on legacy-hal but i've tested
 it on various cards and it works fine.

Changes-Licensed-under: ISC
Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless regulatory: move ignore_request
Johannes Berg [Fri, 24 Oct 2008 18:32:23 +0000 (20:32 +0200)] 
wireless regulatory: move ignore_request

This function is only used once, move it closer to its caller.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: clean up regulatory ignore_request function
Johannes Berg [Fri, 24 Oct 2008 18:32:22 +0000 (20:32 +0200)] 
wireless: clean up regulatory ignore_request function

This function has a few WARNs that may eventually trigger
when an AP sends rogue beacons, those must be removed. Some
of the comments in the function are also inappropriate as
this function is concerned with the global hint, not a per-
wiphy thing (which a multidomain flag on a wiphy would imply).

I'm convinced that we don't need to do anything to implement
multi-domain capability as 802.11-2007 specifies it because
it makes only two things mandatory:
 * starting of BSS/IBSS must have country information
   (this can easily be done with a mac80211 patch)
 * a STA must adopt the country information (we already have
   the framework for this)

But we don't have anything implemented anyway for now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: remove struct regdom hinting
Johannes Berg [Fri, 24 Oct 2008 18:32:21 +0000 (20:32 +0200)] 
wireless: remove struct regdom hinting

The code needs to be split out and cleaned up, so as a
first step remove the capability, to add it back in a
subsequent patch as a separate function. Also remove the
publically facing return value of the function and the
wiphy argument. A number of internal functions go from
being generic helpers to just being used for alpha2
setting.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: make regdom passing semantics simpler
Johannes Berg [Fri, 24 Oct 2008 18:32:20 +0000 (20:32 +0200)] 
wireless: make regdom passing semantics simpler

The regdom struct is given to the core, so it might as well
free it in error conditions.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Update reclaim flag
Daniel Halperin [Fri, 24 Oct 2008 06:48:58 +0000 (23:48 -0700)] 
iwlwifi: Update reclaim flag

The reclaim flag should include REPLY_RX_MPDU_CMD in the list of commands
issued by uCode. This is for safety in case the SEQ_RX_FRAME bit is set
incorrectly.

Signed-off-by: Daniel Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwl3945: iwl3945_mac_get_tsf() should not return zero
Fabrice Bellet [Fri, 24 Oct 2008 06:48:57 +0000 (23:48 -0700)] 
iwl3945: iwl3945_mac_get_tsf() should not return zero

The problem fixed here is that iwl3945_mac_get_tsf() returns 0, as the
function is not implemented, and this is considered as a valid value by
the mac layer in mlme.c:1605. The consequence is that the STA in ad-hoc
mode is inserted/removed quite frequently due to IBSS merging.

This patch fixes :
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1781
and https://bugzilla.redhat.com/show_bug.cgi?id=459401

Signed-off-by: Fabrice Bellet <fabrice@bellet.info>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: run through spell checker
Tomas Winkler [Fri, 24 Oct 2008 06:48:56 +0000 (23:48 -0700)] 
iwlwifi: run through spell checker

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: refactor tx byte count table usage
Tomas Winkler [Fri, 24 Oct 2008 06:48:55 +0000 (23:48 -0700)] 
iwlwifi: refactor tx byte count table usage

This patch drops unreadable usage of IWL_SET/GET_BITS16 in byte count
tables handling
This patch also cleans a bit the byte count table code and adds
WARN_ON traps on invalid values

This patch is pure cleanup, no functional changes.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: clear scanning bits upon failure
Mohamed Abbas [Fri, 24 Oct 2008 06:48:54 +0000 (23:48 -0700)] 
iwlwifi: clear scanning bits upon failure

In iwl_bg_request_scan function, if we could not send a
scan command it will go to done.
In done it does the right thing to call mac80211 with
scan complete, but the problem is STATUS_SCAN_HW is still
set causing any future scan to fail. Fix by clearing the scanning status
bits if scan fails.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: convert correctly rate_n_flags to PLCP index for mimo3 packets
Daniel C. Halperin [Fri, 24 Oct 2008 06:48:53 +0000 (23:48 -0700)] 
iwlwifi: convert correctly rate_n_flags to PLCP index for mimo3 packets

The driver does not properly convert rate_n_flags to PLCP index for mimo3
packets. This makes mac80211 drop the packets

Signed-off-by: Daniel C. Halperin <daniel.c.halperin@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: calibration command namespace renaming
Tomas Winkler [Fri, 24 Oct 2008 06:48:52 +0000 (23:48 -0700)] 
iwlwifi: calibration command namespace renaming

Since calibration framework is not HW specific remove 5000 and 4965 prefix
This patch doesn't provide any functional changes only code renaming
and movement

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: parametrize eeprom versions
Tomas Winkler [Fri, 24 Oct 2008 06:48:51 +0000 (23:48 -0700)] 
iwlwifi: parametrize eeprom versions

This patch uses new parameters eeprom_ver and eeprom_calib_ver
to support additional HW.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: don't update TFD free counter for invalid station
Tomas Winkler [Fri, 24 Oct 2008 06:48:50 +0000 (23:48 -0700)] 
iwlwifi: don't update TFD free counter for invalid station

This patch makes sure that station table is not accessed
with invalid station id in 4965 TX response path

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: refactor TX response flow
Tomas Winkler [Fri, 24 Oct 2008 06:48:49 +0000 (23:48 -0700)] 
iwlwifi: refactor TX response flow

This patch utilize 5000 new TX response command
which contains all necessary information and avoids
back referencing to the original TX frame.
It also change handling of software queue tracking
4965 flow is aligned with changes as much as possible.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: Re-enable aggregation
Sujith [Fri, 24 Oct 2008 04:25:27 +0000 (09:55 +0530)] 
mac80211: Re-enable aggregation

Wireless HW without any dedicated queues for aggregation
do not need the ampdu_queues mechanism present right now
in mac80211. Since mac80211 is still incomplete wrt TX MQ
changes, do not allow aggregation sessions for drivers that
set ampdu_queues.

This is only an interim hack until Intel fixes the requeue issue.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>