openwrt/staging/blogic.git
13 years agomac80211: selective throughput LED trigger active
Johannes Berg [Tue, 30 Nov 2010 07:59:23 +0000 (08:59 +0100)]
mac80211: selective throughput LED trigger active

The throughput LED trigger was always active when
the radio was enabled. In most cases that's likely
the desired behaviour, but iwlwifi requires it to
be only active when one of the virtual interfaces
is actually "connected" in some way.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add throughput based LED blink trigger
Johannes Berg [Tue, 30 Nov 2010 07:58:45 +0000 (08:58 +0100)]
mac80211: add throughput based LED blink trigger

iwlwifi and other drivers like to blink their LED
based on throughput. Implement this generically in
mac80211, based on a throughput table the driver
specifies. That way, drivers can set the blink
frequencies depending on their desired behaviour
and max throughput.

All the drivers need to do is provide an LED class
device, best with blink hardware offload.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: make LED trigger names available early
Johannes Berg [Sat, 27 Nov 2010 19:02:59 +0000 (20:02 +0100)]
mac80211: make LED trigger names available early

The throughput trigger will require doing LED
classdev/trigger handling before register_hw(),
so drivers should have access to the trigger
names before it. If trigger registration fails,
this will still make the trigger name available,
but that's not a big problem since the default
trigger will the simply not be found.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Wed, 22 Dec 2010 19:27:21 +0000 (14:27 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6 into for-davem

Conflicts:
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-core.h

13 years agoMerge branch '20101221_static_const' of git://repo.or.cz/linux-2.6/trivial-mods
David S. Miller [Tue, 21 Dec 2010 21:26:15 +0000 (13:26 -0800)]
Merge branch '20101221_static_const' of git://repo.or.cz/linux-2.6/trivial-mods

13 years agosundance: Program station address into HW
Denis Kirjanov [Tue, 21 Dec 2010 02:02:26 +0000 (02:02 +0000)]
sundance: Program station address into HW

Program adapter's StationAddress register when changing device MAC address

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosundance: Wrap up acceess to ASICCtrl high word with a macro
Denis Kirjanov [Tue, 21 Dec 2010 02:01:36 +0000 (02:01 +0000)]
sundance: Wrap up acceess to ASICCtrl high word with a macro

Wrap up acceess to ASICCtrl high word with a macro

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofilter: optimize accesses to ancillary data
Eric Dumazet [Wed, 15 Dec 2010 19:45:28 +0000 (19:45 +0000)]
filter: optimize accesses to ancillary data

We can translate pseudo load instructions at filter check time to
dedicated instructions to speed up filtering and avoid one switch().
libpcap currently uses SKF_AD_PROTOCOL, but custom filters probably use
other ancillary accesses.

Note : I made the assertion that ancillary data was always accessed with
BPF_LD|BPF_?|BPF_ABS instructions, not with BPF_LD|BPF_?|BPF_IND ones
(offset given by K constant, not by K + X register)

On x86_64, this saves a few bytes of text :

# size net/core/filter.o.*
   text    data     bss     dec     hex filename
   4864       0       0    4864    1300 net/core/filter.o.new
   4944       0       0    4944    1350 net/core/filter.o.old

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: remove cancel_work_sync() from remove_one
Tejun Heo [Tue, 14 Dec 2010 06:09:59 +0000 (06:09 +0000)]
bnx2: remove cancel_work_sync() from remove_one

Michael pointed out that bnx2_close() already cancels bp->reset_task
and thus it is guaranteed to be idle when bnx2_remove_one() is called.
Remove the unnecessary cancel_work_sync() in remove_one.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc...
David S. Miller [Tue, 21 Dec 2010 20:17:29 +0000 (12:17 -0800)]
Merge branch 'for-davem' of git://git./linux/kernel/git/bwh/sfc-next-2.6

13 years agostmmac: unwind properly in stmmac_dvr_probe()
Dan Carpenter [Mon, 20 Dec 2010 21:34:56 +0000 (21:34 +0000)]
stmmac: unwind properly in stmmac_dvr_probe()

The original code had a several problems:
*) It had potential null dereferences of "priv" and "res".
*) It released the memory region before it was aquired.
*) It didn't free "ndev" after it was allocated.
*) It didn't call unregister_netdev() after calling stmmac_probe().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: remove bogus check
Dan Carpenter [Mon, 20 Dec 2010 21:04:02 +0000 (21:04 +0000)]
bnx2x: remove bogus check

We dereferenced params on the line before so it's too late to check if
params is NULL.  In fact, params can never be NULL and strict_cos is
either 0 or 1 so that part of the check is bogus too.  Let's remove it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: timestamp cloned packet in dev_queue_xmit_nit
Eric Dumazet [Mon, 20 Dec 2010 21:22:51 +0000 (21:22 +0000)]
net: timestamp cloned packet in dev_queue_xmit_nit

Le vendredi 17 décembre 2010 à 10:26 +0100, Eric Dumazet a écrit :

>
> I think we can add this after latest Changli patch :
>
> He does one skb_clone() before calling the sniffers.
> We could set timestamp on this clone, instead of original skb.
>
> Problem solved.
>

[PATCH net-next-2.6] net: timestamp cloned packet in dev_queue_xmit_nit

Now we do one clone of skb if at least one sniffer might take packet,
we also can do the skb timestamping on the clone and let original packet
unchanged.

This is a generalization of commit 8caf153974f2 (net: sch_netem: Fix an
inconsistency in ingress netem timestamps.)

This way, we can have a good idea when packets are delivered to our
stack (tcpdump -i ifb0), while a tcpdump on original device gives
timestamps right before ingressing.

This also speedup our stack, avoiding taking timestamps if not needed.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net/*/: Use static const
Joe Perches [Tue, 21 Dec 2010 10:16:10 +0000 (02:16 -0800)]
drivers/net/*/: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

Signed-off-by: Joe Perches <joe@perches.com>
13 years agotulip: Use DEFINE_PCI_DEVICE_TABLE and static const
Joe Perches [Tue, 21 Dec 2010 10:16:09 +0000 (02:16 -0800)]
tulip: Use DEFINE_PCI_DEVICE_TABLE and static const

Moves the PCI table to the right read-only section.
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

Signed-off-by: Joe Perches <joe@perches.com>
13 years agousb: Use static const, consolidate code
Joe Perches [Tue, 21 Dec 2010 10:16:09 +0000 (02:16 -0800)]
usb: Use static const, consolidate code

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

Consolidate duplicated code into new fix_crc_bug function
and declare data in that function static const.

Signed-off-by: Joe Perches <joe@perches.com>
13 years agodrivers/net/*.c: Use static const
Joe Perches [Tue, 21 Dec 2010 10:16:08 +0000 (02:16 -0800)]
drivers/net/*.c: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

Signed-off-by: Joe Perches <joe@perches.com>
13 years agotg3: Use DEFINE_PCI_DEVICE_TABLE
Joe Perches [Tue, 21 Dec 2010 10:16:08 +0000 (02:16 -0800)]
tg3: Use DEFINE_PCI_DEVICE_TABLE

Moves the PCI tables to the right read-only section.

Signed-off-by: Joe Perches <joe@perches.com>
13 years agoTCP: increase default initial receive window.
Nandita Dukkipati [Mon, 20 Dec 2010 14:15:56 +0000 (14:15 +0000)]
TCP: increase default initial receive window.

This patch changes the default initial receive window to 10 mss
(defined constant). The default window is limited to the maximum
of 10*1460 and 2*mss (when mss > 1460).

draft-ietf-tcpm-initcwnd-00 is a proposal to the IETF that recommends
increasing TCP's initial congestion window to 10 mss or about 15KB.
Leading up to this proposal were several large-scale live Internet
experiments with an initial congestion window of 10 mss (IW10), where
we showed that the average latency of HTTP responses improved by
approximately 10%. This was accompanied by a slight increase in
retransmission rate (0.5%), most of which is coming from applications
opening multiple simultaneous connections. To understand the extreme
worst case scenarios, and fairness issues (IW10 versus IW3), we further
conducted controlled testbed experiments. We came away finding minimal
negative impact even under low link bandwidths (dial-ups) and small
buffers.  These results are extremely encouraging to adopting IW10.

However, an initial congestion window of 10 mss is useless unless a TCP
receiver advertises an initial receive window of at least 10 mss.
Fortunately, in the large-scale Internet experiments we found that most
widely used operating systems advertised large initial receive windows
of 64KB, allowing us to experiment with a wide range of initial
congestion windows. Linux systems were among the few exceptions that
advertised a small receive window of 6KB. The purpose of this patch is
to fix this shortcoming.

References:
1. A comprehensive list of all IW10 references to date.
http://code.google.com/speed/protocols/tcpm-IW10.html

2. Paper describing results from large-scale Internet experiments with IW10.
http://ccr.sigcomm.org/drupal/?q=node/621

3. Controlled testbed experiments under worst case scenarios and a
fairness study.
http://www.ietf.org/proceedings/79/slides/tcpm-0.pdf

4. Raw test data from testbed experiments (Linux senders/receivers)
with initial congestion and receive windows of both 10 mss.
http://research.csc.ncsu.edu/netsrv/?q=content/iw10

5. Internet-Draft. Increasing TCP's Initial Window.
https://datatracker.ietf.org/doc/draft-ietf-tcpm-initcwnd/

Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet_sched: sch_sfq: better struct layouts
Eric Dumazet [Mon, 20 Dec 2010 12:54:58 +0000 (12:54 +0000)]
net_sched: sch_sfq: better struct layouts

Here is a respin of patch.

I'll send a short patch to make SFQ more fair in presence of large
packets as well.

Thanks

[PATCH v3 net-next-2.6] net_sched: sch_sfq: better struct layouts

This patch shrinks sizeof(struct sfq_sched_data)
from 0x14f8 (or more if spinlocks are bigger) to 0x1180 bytes, and
reduce text size as well.

   text    data     bss     dec     hex filename
   4821     152       0    4973    136d old/net/sched/sch_sfq.o
   4627     136       0    4763    129b new/net/sched/sch_sfq.o

All data for a slot/flow is now grouped in a compact and cache friendly
structure, instead of being spreaded in many different points.

struct sfq_slot {
        struct sk_buff  *skblist_next;
        struct sk_buff  *skblist_prev;
        sfq_index       qlen; /* number of skbs in skblist */
        sfq_index       next; /* next slot in sfq chain */
        struct sfq_head dep; /* anchor in dep[] chains */
        unsigned short  hash; /* hash value (index in ht[]) */
        short           allot; /* credit for this slot */
};

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jarek Poplawski <jarkao2@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Mon, 20 Dec 2010 21:24:14 +0000 (13:24 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

13 years agonet_sched: sch_sfq: fix allot handling
Eric Dumazet [Mon, 20 Dec 2010 21:18:16 +0000 (13:18 -0800)]
net_sched: sch_sfq: fix allot handling

When deploying SFQ/IFB here at work, I found the allot management was
pretty wrong in sfq, even changing allot from short to int...

We should init allot for each new flow, not using a previous value found
in slot.

Before patch, I saw bursts of several packets per flow, apparently
denying the default "quantum 1514" limit I had on my SFQ class.

class sfq 11:1 parent 11:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 7p requeues 0
 allot 11546

class sfq 11:46 parent 11:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 1p requeues 0
 allot -23873

class sfq 11:78 parent 11:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 5p requeues 0
 allot 11393

After patch, better fairness among each flow, allot limit being
respected, allot is positive :

class sfq 11:e parent 11:
 (dropped 0, overlimits 0 requeues 86)
 backlog 0b 3p requeues 86
 allot 596

class sfq 11:94 parent 11:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 3p requeues 0
 allot 1468

class sfq 11:a4 parent 11:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 4p requeues 0
 allot 650

class sfq 11:bb parent 11:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 3p requeues 0
 allot 596

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet_sched: sch_sfq: add backlog info in sfq_dump_class_stats()
Eric Dumazet [Wed, 15 Dec 2010 08:18:36 +0000 (08:18 +0000)]
net_sched: sch_sfq: add backlog info in sfq_dump_class_stats()

We currently return for each active SFQ slot the number of packets in
queue. We can also give number of bytes accounted for these packets.

tc -s class show dev ifb0

Before patch :

class sfq 11:3d9 parent 11:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 3p requeues 0
 allot 1266

After patch :

class sfq 11:3e4 parent 11:
 (dropped 0, overlimits 0 requeues 0)
 backlog 4380b 3p requeues 0
 allot 1212

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agortlwifi: use alloc_workqueue
John W. Linville [Thu, 16 Dec 2010 19:59:49 +0000 (14:59 -0500)]
rtlwifi: use alloc_workqueue

create_workqueue is deprecated.  The workqueue usage does not seem to
demand any special treatment, so do not set any flags either.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Tejun Heo <tj@kernel.org>
13 years agoath9k: do not limit the chainmask to 1 for legacy mode
Felix Fietkau [Sat, 18 Dec 2010 23:31:55 +0000 (00:31 +0100)]
ath9k: do not limit the chainmask to 1 for legacy mode

Restricting the chainmask to 1 for legacy mode disables useful features
such as MRC, and it reduces the available transmit power.
I can't think of a good reason to do this in legacy mode, so let's just
get rid of that code.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix PA predistortion HT40 mask
Felix Fietkau [Sat, 18 Dec 2010 23:31:54 +0000 (00:31 +0100)]
ath9k_hw: fix PA predistortion HT40 mask

The commit 'ath9k_hw: Disable PAPRD for rates with low Tx power' changed
the code that sets the PAPRD rate masks to use only either the HT20 mask
or the HT40 mask. This is wrong, as the hardware can still use HT20 rates
even when configured for HT40, and the operating channel mode does not
affect PAPRD operation.
The register for the HT40 rate mask is applied as a mask on top of the
other registers to selectively disable PAPRD for specific rates on HT40
packets only.
This patch changes the code back to the old behavior which matches the
intended use of these registers. While with current cards this should not
make any practical difference (according to Atheros, the HT20 and HT40
mask should always be equal), it is more correct that way, and maybe
the HT40 mask will be used for some rare corner cases in the future.

Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix potentially redundant skb data copying
Felix Fietkau [Sat, 18 Dec 2010 18:30:50 +0000 (19:30 +0100)]
mac80211: fix potentially redundant skb data copying

When an skb is shared, it needs to be duplicated, along with its data buffer.
If the skb does not have enough headroom, using skb_copy might cause the data
buffer to be copied twice (once by skb_copy and once by pskb_expand_head).
Fix this by using skb_clone initially and letting ieee80211_skb_resize sort
out the rest.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: skip unnecessary pskb_expand_head calls
Felix Fietkau [Sat, 18 Dec 2010 18:30:49 +0000 (19:30 +0100)]
mac80211: skip unnecessary pskb_expand_head calls

If the skb is not cloned and we don't need any extra headroom, there
is no point in reallocating the skb head.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix initialization of skb->cb in ieee80211_subif_start_xmit
Felix Fietkau [Sat, 18 Dec 2010 18:30:48 +0000 (19:30 +0100)]
mac80211: fix initialization of skb->cb in ieee80211_subif_start_xmit

The change 'mac80211: Fix BUG in pskb_expand_head when transmitting shared skbs'
added a check for copying the skb if it's shared, however the tx info variable
still points at the cb of the old skb

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl1251: wl12xx_get_platform_data() returns an ERR_PTR
Dan Carpenter [Sat, 18 Dec 2010 08:52:10 +0000 (11:52 +0300)]
wl1251: wl12xx_get_platform_data() returns an ERR_PTR

wl12xx_get_platform_data() returns an ERR_PTR on failure and it never
returns a NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Fix use of mutex in interrupt code
Larry Finger [Sat, 18 Dec 2010 01:36:25 +0000 (19:36 -0600)]
rtlwifi: Fix use of mutex in interrupt code

A previous conversion from semaphoreto mutexes missed the fact that one
of the semaphores was used in interrupt code. Fixed by changing to
a spinlock.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMAINTAINERS: Fix typo in rtl8192ce entry
Larry Finger [Fri, 17 Dec 2010 22:04:11 +0000 (16:04 -0600)]
MAINTAINERS: Fix typo in rtl8192ce entry

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Properly initialize channel table for 2GHz
Mohammed Shafi Shajakhan [Fri, 17 Dec 2010 15:14:36 +0000 (20:44 +0530)]
ath9k: Properly initialize channel table for 2GHz

ath9k channel table for 2Ghz does not seems to initialize the 'band'
parameter.Though it does not seems to cause any visible issue it looks
odd when we initialize the 'band' parameter for 5Ghz channel table while
not so for 2Ghz.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8192ce: Fix typo in Kconfig description
Anisse Astier [Fri, 17 Dec 2010 10:45:01 +0000 (11:45 +0100)]
rtl8192ce: Fix typo in Kconfig description

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove baseband rfsilent support
Felix Fietkau [Thu, 16 Dec 2010 23:57:01 +0000 (00:57 +0100)]
ath9k_hw: remove baseband rfsilent support

When rfkill is enabled, ath9k_hw unnecessarily configured the baseband to
turn off based on GPIO input, however that code was hardcoded to GPIO 0
instead of ah->rfkill_gpio.
Since ath9k uses software rfkill anyway, this code is completely unnecessary
and should be removed in case anything else ever uses GPIO 0.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix queue depth check for forming new aggregates
Felix Fietkau [Thu, 16 Dec 2010 23:57:00 +0000 (00:57 +0100)]
ath9k: fix queue depth check for forming new aggregates

To improve aggregation length, there should not be more than two fully formed
A-MPDU frames in the hardware queue. To ensure this, the code checks the tx
queue length before forming new A-MPDUs. This can reduce the throughput (or
maybe even starve out A-MPDU traffic) when too many non-aggregated frames are
in the queue.
Fix this by keeping track of pending A-MPDU frames (even when they're sent out
as single frames), but exclude rate control probing frames to improve
performance.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8192ce: drop 'rtl8192c-' prefix from files
John W. Linville [Thu, 16 Dec 2010 20:43:36 +0000 (15:43 -0500)]
rtl8192ce: drop 'rtl8192c-' prefix from files

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
13 years agomac80211: Remove unused third address from mesh address extension header.
Javier Cardona [Fri, 17 Dec 2010 01:23:34 +0000 (17:23 -0800)]
mac80211: Remove unused third address from mesh address extension header.

The Mesh Control header only includes 0, 1 or 2 addresses. If there is
one address, it should be interpreted as Address 4.  If there are 2,
they are interpreted as Addresses 5 and 6 (Address 4 being the 4th
address in the 802.11 header).

The address extension used to hold up to 3 addresses instead of the current 2.
I'm not sure which draft version changed this, but it is very unlikely that it
will change again given the state of the approval process of this draft.  See
section 7.1.3.6.3 in current draft (8.0).

Also, note that the extra address that I'm removing was not being used, so this
change has no effect on over-the-air frame formats.  But I thought I better
remove it before someone does start using it.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Set available antenna information for cfg80211
Bruno Randolf [Thu, 16 Dec 2010 02:30:33 +0000 (11:30 +0900)]
ath5k: Set available antenna information for cfg80211

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: Export available antennas
Bruno Randolf [Thu, 16 Dec 2010 02:30:28 +0000 (11:30 +0900)]
nl80211: Export available antennas

Export the information which antennas are available for configuration as TX or
RX antennas via nl80211.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Separate available antennas for RX and TX
Bruno Randolf [Thu, 16 Dec 2010 02:30:22 +0000 (11:30 +0900)]
cfg80211: Separate available antennas for RX and TX

As has been pointed out by Daniel Halperin some devices (e.g. Intel IWL5100)
can only TX from a subset of RX antennas, so use separate availability masks
for RX and TX.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Send mesh non-HWMP path selection frames to userspace
Javier Cardona [Fri, 17 Dec 2010 01:37:50 +0000 (17:37 -0800)]
mac80211: Send mesh non-HWMP path selection frames to userspace

Let path selection frames for protocols other than HWMP be sent to
userspace via NL80211_CMD_REGISTER_FRAME.  Also allow userspace to send
and receive mesh path selection frames.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Let userspace enable and configure vendor specific path selection.
Javier Cardona [Fri, 17 Dec 2010 01:37:49 +0000 (17:37 -0800)]
mac80211: Let userspace enable and configure vendor specific path selection.

Userspace will now be allowed to toggle between the default path
selection algorithm (HWMP, implemented in the kernel), and a vendor
specific alternative.  Also in the same patch, allow userspace to add
information elements to mesh beacons.  This is accordance with the
Extensible Path Selection Framework specified in version 7.0 of the
802.11s draft.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Rename mesh_params to mesh_config to prepare for mesh_setup
Javier Cardona [Fri, 17 Dec 2010 01:37:48 +0000 (17:37 -0800)]
mac80211: Rename mesh_params to mesh_config to prepare for mesh_setup

Mesh parameters can be to setup a mesh or to configure it.
This patch renames the ambiguous name mesh_params to mesh_config
in preparation for mesh_setup.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agovmxnet3: locking problems in xmit
Dan Carpenter [Mon, 20 Dec 2010 03:03:15 +0000 (03:03 +0000)]
vmxnet3: locking problems in xmit

There were several paths that didn't release their locks.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotyphoon: memory corruption in typhoon_get_drvinfo()
Dan Carpenter [Mon, 20 Dec 2010 18:43:02 +0000 (10:43 -0800)]
typhoon: memory corruption in typhoon_get_drvinfo()

info->version only has space for 32 characters but my UTS_RELEASE is
"2.6.37-rc6-next-20101217-05817-ge935fc8-dirty" so it doesn't fit.
This is supposed to be the version of the driver, not the kernel
version.  This driver doesn't have a version so lets just leave it
blank.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant
Andreas Mohr [Mon, 20 Dec 2010 18:38:47 +0000 (10:38 -0800)]
net: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant

Due to active notification of the new MCS7832 version by the manufacturer
(Mr. Milton; thanks!) -- quote: "functionality same as MCS7830",
I'm now submitting this patch (on -rc6), intended for networking.git and -stable.

- add MCS7832 USB PID to be able to support this new device variant, too
- add related descriptions

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Flush per-ns routing cache more sanely.
David S. Miller [Mon, 20 Dec 2010 05:11:20 +0000 (21:11 -0800)]
ipv4: Flush per-ns routing cache more sanely.

Flush the routing cache only of entries that match the
network namespace in which the purge event occurred.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
13 years agoehea: Fixing some message level
Breno Leitao [Mon, 20 Dec 2010 18:35:25 +0000 (10:35 -0800)]
ehea: Fixing some message level

Currently there are some info message that is set as error, and an error
message that is set as debug. This patch just fixes it.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobatman-adv: Return hna count on local buffer fill
Sven Eckelmann [Mon, 20 Dec 2010 18:32:03 +0000 (10:32 -0800)]
batman-adv: Return hna count on local buffer fill

hna_local_fill_buffer must return the number of added hna entries and
not the last checked hash bucket.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopktgen: Remove unnecessary prefix from pr_<level>
Joe Perches [Mon, 20 Dec 2010 18:30:06 +0000 (10:30 -0800)]
pktgen: Remove unnecessary prefix from pr_<level>

Remove "pktgen: " prefix string from one pr_info.
pr_fmt adds it, so this is a duplicate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet_sched: always clone skbs
Changli Gao [Mon, 20 Dec 2010 04:35:30 +0000 (04:35 +0000)]
net_sched: always clone skbs

Pawel reported a panic related to handling shared skbs in ixgbe
incorrectly. So we need to revert my previous patch to work around
this bug. Instead of reverting the patch completely, I just revert
the essential lines, so we can add the previous optimization
back more easily in future.

    commit 3511c9132f8b1e1b5634e41a3331c44b0c13be70
    Author: Changli Gao <xiaosuo@gmail.com>
    Date:   Sat Oct 16 13:04:08 2010 +0000

        net_sched: remove the unused parameter of qdisc_create_dflt()

Reported-by: Pawel Staszewski <pstaszewski@itcare.pl>
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: kill unused macros
Shan Wei [Mon, 20 Dec 2010 05:59:35 +0000 (21:59 -0800)]
net: kill unused macros

These macros never be used, so remove them.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: add missing flush of reset_task
Tejun Heo [Wed, 15 Dec 2010 04:03:29 +0000 (04:03 +0000)]
vxge: add missing flush of reset_task

Commit 6e07ebd84 (drivers/net: remove unnecessary
flush_scheduled_work() calls) incorrectly removed the flush call
without replacing it with the appropriate work specific operation.
Fix it by flushing vdev->reset_task explicitly.

Pointed out by Jon Mason.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jon Mason <jon.mason@exar.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: increase skb->users instead of skb_clone()
Changli Gao [Wed, 15 Dec 2010 19:57:25 +0000 (19:57 +0000)]
net: increase skb->users instead of skb_clone()

In dev_queue_xmit_nit(), we have to clone skbs as we need to mangle skbs,
however, we don't need to clone skbs for all the packet_types.

Except for the first packet_type, we increase skb->users instead of
skb_clone().

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: use netif_receive_skb() instead of netif_rx()
Eric Dumazet [Tue, 14 Dec 2010 22:39:58 +0000 (22:39 +0000)]
ifb: use netif_receive_skb() instead of netif_rx()

In ri_tasklet(), we run from softirq, so can directly handle packet
through netif_receive_skb() instead of netif_rx().
There is no risk of recursion.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed.
David Stevens [Fri, 17 Dec 2010 11:42:42 +0000 (11:42 +0000)]
ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed.

This patch modifies IPsec6 to fragment IPv6 packets that are
locally generated as needed.

This version of the patch only fragments in tunnel mode, so that fragment
headers will not be obscured by ESP in transport mode.

Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: remove duplicate neigh_ifdown
stephen hemminger [Thu, 16 Dec 2010 17:42:54 +0000 (17:42 +0000)]
ipv6: remove duplicate neigh_ifdown

When device is being set to down, neigh_ifdown was being called
twice. Once from addrconf notifier and once from ndisc notifier.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: fib6_ifdown cleanup
stephen hemminger [Thu, 16 Dec 2010 17:42:40 +0000 (17:42 +0000)]
ipv6: fib6_ifdown cleanup

Remove (unnecessary) casts to make code cleaner.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Fri, 17 Dec 2010 20:27:22 +0000 (12:27 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/bnx2x/bnx2x.h
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/vhost/vhost.c

13 years agonetlink: fix gcc -Wconversion compilation warning
Dmitry V. Levin [Fri, 17 Dec 2010 20:03:14 +0000 (12:03 -0800)]
netlink: fix gcc -Wconversion compilation warning

$ cat << EOF | gcc -Wconversion -xc -S -o/dev/null -
unsigned f(void) {return NLMSG_HDRLEN;}
EOF
<stdin>: In function 'f':
<stdin>:3:26: warning: negative integer implicitly converted to unsigned type

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoasix: add USB ID for Logitec LAN-GTJ U2A
Arnaud Ebalard [Wed, 15 Dec 2010 12:16:30 +0000 (12:16 +0000)]
asix: add USB ID for Logitec LAN-GTJ U2A

Logitec LAN-GTJ U2A (http://www.pro.logitec.co.jp/pro/g/gLAN-GTJU2A/)
USB 2.0 10/10/1000 Ethernet adapter is based on ASIX AX88178 chipset.

This patch adds missing USB ID for the device.

Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: reset pci function unconditionally during probe
Rajesh Borundia [Thu, 16 Dec 2010 22:59:02 +0000 (22:59 +0000)]
qlcnic: reset pci function unconditionally during probe

Some boot code drivers dont have cleanup routine, so pci function
remains in unknown state prior to driver load. So during driver load
issue FLR unconditionally.

Update driver version to 5.0.14.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: fix ocm window register offset calculation
Rajesh Borundia [Thu, 16 Dec 2010 22:59:01 +0000 (22:59 +0000)]
qlcnic: fix ocm window register offset calculation

OCM window register offset was calculated incorrectly for
pci function greater than zero.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: fix LED test when interface is down.
Sucheta Chakraborty [Thu, 16 Dec 2010 22:59:00 +0000 (22:59 +0000)]
qlcnic: fix LED test when interface is down.

When interface is down, create temporary context to config LED.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotehuti: Firmware filename is tehuti/bdx.bin
Ben Hutchings [Fri, 17 Dec 2010 18:16:23 +0000 (10:16 -0800)]
tehuti: Firmware filename is tehuti/bdx.bin

My conversion of tehuti to use request_firmware() was confused about
the filename of the firmware blob.  Change the driver to match the
blob.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: don't flush routes when setting loopback down
stephen hemminger [Thu, 16 Dec 2010 11:28:12 +0000 (11:28 +0000)]
ipv6: don't flush routes when setting loopback down

When loopback device is being brought down, then keep the route table
entries because they are special. The entries in the local table for
linklocal routes and ::1 address should not be purged.

This is a sub optimal solution to the problem and should be replaced
by a better fix in future.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: fix a lockdep splat
Eric Dumazet [Wed, 15 Dec 2010 23:52:55 +0000 (23:52 +0000)]
ifb: fix a lockdep splat

After recent ifb changes, we must use lockless __skb_dequeue() since
lock is not anymore initialized.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jamal Hadi Salim <hadi@cyberus.ca>
Cc: Changli Gao <xiaosuo@gmail.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: fix the return value of getting the sctp partial delivery point
Wei Yongjun [Tue, 14 Dec 2010 16:10:41 +0000 (16:10 +0000)]
sctp: fix the return value of getting the sctp partial delivery point

Get the sctp partial delivery point using SCTP_PARTIAL_DELIVERY_POINT
socket option should return 0 if success, not -ENOTSUPP.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Fix drivers advertising HW_CSUM feature to use csum_start
Michał Mirosław [Tue, 14 Dec 2010 15:24:08 +0000 (15:24 +0000)]
net: Fix drivers advertising HW_CSUM feature to use csum_start

Some drivers are using skb_transport_offset(skb) instead of skb->csum_start
for NETIF_F_HW_CSUM offload.  This does not matter now, but if someone
implements checksumming of encapsulated packets then this will break silently.

TSO output paths are left as they are, since they are for IP+TCP only
(might be worth converting though).

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Use skb_checksum_start_offset()
Michał Mirosław [Tue, 14 Dec 2010 15:24:08 +0000 (15:24 +0000)]
net: Use skb_checksum_start_offset()

Replace skb->csum_start - skb_headroom(skb) with skb_checksum_start_offset().

Note for usb/smsc95xx: skb->data - skb->head == skb_headroom(skb).

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Introduce skb_checksum_start_offset()
Michał Mirosław [Tue, 14 Dec 2010 15:24:08 +0000 (15:24 +0000)]
net: Introduce skb_checksum_start_offset()

Introduce skb_checksum_start_offset() to replace repetitive calculation.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/veth: Fix packet checksumming
Michał Mirosław [Tue, 14 Dec 2010 12:35:13 +0000 (12:35 +0000)]
net/veth: Fix packet checksumming

We can't change ip_summed from CHECKSUM_PARTIAL to CHECKSUM_NONE
or CHECKSUM_UNNECESSARY because checksum in packet's headers is
not valid and will cause invalid checksum when frame is forwarded.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: fix IPv6 queries for bridge multicast snooping
David Stevens [Tue, 14 Dec 2010 08:42:16 +0000 (08:42 +0000)]
bridge: fix IPv6 queries for bridge multicast snooping

This patch fixes a missing ntohs() for bridge IPv6 multicast snooping.

Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: fix nulls list corruptions in sk_prot_alloc
Octavian Purdila [Thu, 16 Dec 2010 22:26:56 +0000 (14:26 -0800)]
net: fix nulls list corruptions in sk_prot_alloc

Special care is taken inside sk_port_alloc to avoid overwriting
skc_node/skc_nulls_node. We should also avoid overwriting
skc_bind_node/skc_portaddr_node.

The patch fixes the following crash:

 BUG: unable to handle kernel paging request at fffffffffffffff0
 IP: [<ffffffff812ec6dd>] udp4_lib_lookup2+0xad/0x370
 [<ffffffff812ecc22>] __udp4_lib_lookup+0x282/0x360
 [<ffffffff812ed63e>] __udp4_lib_rcv+0x31e/0x700
 [<ffffffff812bba45>] ? ip_local_deliver_finish+0x65/0x190
 [<ffffffff812bbbf8>] ? ip_local_deliver+0x88/0xa0
 [<ffffffff812eda35>] udp_rcv+0x15/0x20
 [<ffffffff812bba45>] ip_local_deliver_finish+0x65/0x190
 [<ffffffff812bbbf8>] ip_local_deliver+0x88/0xa0
 [<ffffffff812bb2cd>] ip_rcv_finish+0x32d/0x6f0
 [<ffffffff8128c14c>] ? netif_receive_skb+0x99c/0x11c0
 [<ffffffff812bb94b>] ip_rcv+0x2bb/0x350
 [<ffffffff8128c14c>] netif_receive_skb+0x99c/0x11c0

Signed-off-by: Leonard Crestez <lcrestez@ixiacom.com>
Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: use mutex instead of spin lock for mbox_lock
Ivan Vecera [Tue, 14 Dec 2010 05:43:19 +0000 (05:43 +0000)]
be2net: use mutex instead of spin lock for mbox_lock

Since the mbox polling uses the schedule_timeout, the mbox_lock should be
a mutex and not a spin lock.
The commit f25b03a replaced udelay() with schedule_timeout() but didn't
change mbox_lock to semaphore or mutex.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: relax tcp_paws_check()
Eric Dumazet [Thu, 16 Dec 2010 22:08:34 +0000 (14:08 -0800)]
tcp: relax tcp_paws_check()

Some windows versions have wrong RFC1323 implementations, with SYN and
SYNACKS messages containing zero tcp timestamps.

We relaxed in commit fc1ad92dfc4e363 the passive connection case
(Windows connects to a linux machine), but the reverse case (linux
connects to a Windows machine) has an analogue problem when tsvals from
windows machine are 'negative' (high order bit set) : PAWS triggers and
we drops incoming messages.

Fix this by making zero ts_recent value special, allowing frame to be
processed.

Based on a report and initial patch from Dmitiy Balakin

Bugzilla reference : https://bugzilla.kernel.org/show_bug.cgi?id=24842

Reported-by: dmitriy.balakin@nicneiron.ru
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: factorize sync-rcu call in unregister_netdevice_many
Octavian Purdila [Mon, 13 Dec 2010 12:44:07 +0000 (12:44 +0000)]
net: factorize sync-rcu call in unregister_netdevice_many

Add dev_close_many and dev_deactivate_many to factorize another
sync-rcu operation on the netdevice unregister path.

$ modprobe dummy numdummies=10000
$ ip link set dev dummy* up
$ time rmmod dummy

Without the patch           With the patch

real    0m 24.63s           real    0m 5.15s
user    0m 0.00s            user    0m 0.00s
sys     0m 6.05s            sys     0m 5.14s

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add batman-adv meshing protocol
Sven Eckelmann [Mon, 13 Dec 2010 11:19:28 +0000 (11:19 +0000)]
net: Add batman-adv meshing protocol

B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is a routing
protocol for multi-hop ad-hoc mesh networks. The networks may be wired or
wireless. See http://www.open-mesh.org/ for more information and user space
tools.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: use NUMA_NO_NODE instead of the magic number -1
Changli Gao [Tue, 14 Dec 2010 03:09:15 +0000 (03:09 +0000)]
net: use NUMA_NO_NODE instead of the magic number -1

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: add the debugfs interface to see RLB hash table
Taku Izumi [Sun, 12 Dec 2010 19:04:43 +0000 (19:04 +0000)]
bonding: add the debugfs interface to see RLB hash table

This patch provices the debugfs interface to see RLB hash table
like the following:

# cat /sys/kernel/debug/bonding/bond0/rlb_hash_table
SourceIP        DestinationIP   Destination MAC   DEV
10.124.196.205  10.124.196.205  ff:ff:ff:ff:ff:ff eth4
10.124.196.205  10.124.196.81   00:19:99:XX:XX:XX eth3
10.124.196.205  10.124.196.1    00:21:d8:XX:XX:XX eth0

This is helpful to check if the receive load balancing works as expected.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: migrate some macros from bond_alb.c to bond_alb.h
Taku Izumi [Sun, 12 Dec 2010 19:03:24 +0000 (19:03 +0000)]
bonding: migrate some macros from bond_alb.c to bond_alb.h

This patch simply migrates some macros from bond_alb.c to bond_alb.h.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: NUMA-aware Tx queue allocations
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:55 +0000 (21:36 +0000)]
cxgb4: NUMA-aware Tx queue allocations

Allocate Tx queue memory on the node indicated by the new
netdev_queue_numa_node_read.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: extend VPD parsing
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:54 +0000 (21:36 +0000)]
cxgb4: extend VPD parsing

Current code parses the VPD RO section for keywords but makes static
assumptions about the location of the section.  Remove them and parse
the VPD to find it.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: add const to static arrays
Joe Perches [Tue, 14 Dec 2010 21:36:53 +0000 (21:36 +0000)]
cxgb4: add const to static arrays

Patch originally from Joe Perches, unmodified.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: remove a bitmap
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:52 +0000 (21:36 +0000)]
cxgb4: remove a bitmap

The driver keeps a bitmap of the netdevs it registered so it knows what to
unregister later.  Remove that and look at reg_state instead.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: remove the name field from the adapter structure
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:51 +0000 (21:36 +0000)]
cxgb4: remove the name field from the adapter structure

Remove a field the driver uses to keep track of the name of the first
netdev it manages to register.  Do this by changing the registration
loop to stop the first time it fails so the first registered device is
trivial to tell.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: correct formatting of MSI-X interrupt names
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:50 +0000 (21:36 +0000)]
cxgb4: correct formatting of MSI-X interrupt names

The last byte of the buffer for MSI-X names could not be used due to a
bogus -1.  Also do not explicitly clear the last byte, snprintf will do
the right thing.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: allocate more space for MSI-X interrupt names
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:49 +0000 (21:36 +0000)]
cxgb4: allocate more space for MSI-X interrupt names

Currently MSI-X names for netdevs with long names are truncated in
/proc/interrupts due to insufficient space.  Use IFNAMSIZ to size the
needed space.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: print port information after registering each netdev
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:48 +0000 (21:36 +0000)]
cxgb4: print port information after registering each netdev

Print information about each port when its netdev is registered instead
of looping separately over the ports at the end.  The bulk of this patch
is due to indentation change.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: distinguish between 1-lane KR/KX and 4-lane KR/KX/KX4 ports
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:47 +0000 (21:36 +0000)]
cxgb4: distinguish between 1-lane KR/KX and 4-lane KR/KX/KX4 ports

And fix the supported flags ethtool reports for the two cases.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: set the number of queues before device registration
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:46 +0000 (21:36 +0000)]
cxgb4: set the number of queues before device registration

The number of queues is known early, move the calls to
netif_set_real_num_[rt]x_queues before register_netdev.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: do not read the clock frequency from VPD
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:45 +0000 (21:36 +0000)]
cxgb4: do not read the clock frequency from VPD

No need to read the clock frequency from VPD, we already get it a bit
later from FW, after any potential adjustments.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: enable PCIe relaxed ordering
Dimitris Michailidis [Tue, 14 Dec 2010 21:36:44 +0000 (21:36 +0000)]
cxgb4: enable PCIe relaxed ordering

Enable relaxed ordering for descriptor reads and packet I/O.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: update version to 1.62.00-2
Vladislav Zolotarov [Mon, 13 Dec 2010 05:44:50 +0000 (05:44 +0000)]
bnx2x: update version to 1.62.00-2

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: remove old FW files
Vladislav Zolotarov [Mon, 13 Dec 2010 20:34:37 +0000 (22:34 +0200)]
bnx2x: remove old FW files

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: replace FW to 6.2.5
Vladislav Zolotarov [Mon, 13 Dec 2010 05:44:35 +0000 (05:44 +0000)]
bnx2x: replace FW to 6.2.5

Includes FCoE releated fixes in FW flows

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: add FW 6.2.5 files
Vladislav Zolotarov [Mon, 13 Dec 2010 20:28:42 +0000 (22:28 +0200)]
bnx2x: add FW 6.2.5 files

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Add DCB/PFC support - link layer
Vladislav Zolotarov [Mon, 13 Dec 2010 05:44:25 +0000 (05:44 +0000)]
bnx2x: Add DCB/PFC support - link layer

Add appropriate HW DCB/PFC configuration

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: add DCB support
Vladislav Zolotarov [Mon, 13 Dec 2010 05:44:18 +0000 (05:44 +0000)]
bnx2x: add DCB support

Adding DCB initialization and handling on 57712 FW/HW

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Shmulik Ravid-Rabinovitz <shmulikr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>