GitHub/LineageOS/android_kernel_motorola_exynos9610.git
12 years agonetfilter: xt_HMARK: modulus is expensive for hash calculation
Pablo Neira Ayuso [Mon, 14 May 2012 00:01:46 +0000 (02:01 +0200)]
netfilter: xt_HMARK: modulus is expensive for hash calculation

Use:

((u64)(HASH_VAL * HASH_SIZE)) >> 32

as suggested by David S. Miller.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agonetfilter: xt_HMARK: potential NULL dereference in get_inner_hdr()
Dan Carpenter [Sat, 12 May 2012 01:00:03 +0000 (01:00 +0000)]
netfilter: xt_HMARK: potential NULL dereference in get_inner_hdr()

There is a typo in the error checking and "&&" was used instead of "||".
If skb_header_pointer() returns NULL then it leads to a NULL
dereference.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agonetfilter: xt_hashlimit: use _ALL macro to reject unknown flag bits
Florian Westphal [Thu, 10 May 2012 22:11:54 +0000 (22:11 +0000)]
netfilter: xt_hashlimit: use _ALL macro to reject unknown flag bits

David Miller says:
     The canonical way to validate if the set bits are in a valid
     range is to have a "_ALL" macro, and test:
     if (val & ~XT_HASHLIMIT_ALL)
         goto err;"

make it so.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoqeth: recognize vlan devices in layer3 mode
frank.blaschka@de.ibm.com [Wed, 16 May 2012 01:28:26 +0000 (01:28 +0000)]
qeth: recognize vlan devices in layer3 mode

The qeth layer3 driver is notified about IP address changes.
Changes concerning qeth driven network interfaces have to be
forwarded to the OSA-card. This includes IP addresses of VLAN
interfaces with a qeth device as base device. Function
qeth_l3_verify_vlan_dev() determines if the net_device of the
IP event belongs to a vlan device belonging to a qeth device
as real device. This function is broken starting with commit
7ff0bcf676f7ed224ce21b58c7858c8e527068b2 , which means IP
addresses of VLAN devices are no longer set at the base qeth
device. The patch repairs function qeth_l3_verify_vlan_dev().

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqeth: remove token ring part 2
Frank Blaschka [Wed, 16 May 2012 01:28:25 +0000 (01:28 +0000)]
qeth: remove token ring part 2

Commit 1abd2296b4a1ee7b6a883541c3ede52042a09521 starts removing
token ring from qeth_l3. This patch removes the rest of token
ring related code from the driver.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: sock_flag() cleanup
Eric Dumazet [Wed, 16 May 2012 05:57:07 +0000 (05:57 +0000)]
net: sock_flag() cleanup

- sock_flag() accepts a const pointer

- sock_flag() returns a boolean

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agofq_codel: should use qdisc backlog as threshold
Eric Dumazet [Wed, 16 May 2012 04:39:09 +0000 (04:39 +0000)]
fq_codel: should use qdisc backlog as threshold

codel_should_drop() logic allows a packet being not dropped if queue
size is under max packet size.

In fq_codel, we have two possible backlogs : The qdisc global one, and
the flow local one.

The meaningful one for codel_should_drop() should be the global backlog,
not the per flow one, so that thin flows can have a non zero drop/mark
probability.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Dave Taht <dave.taht@bufferbloat.net>
Cc: Kathleen Nichols <nichols@pollere.com>
Cc: Van Jacobson <van@pollere.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: Implement MISDN_CTRL_RX_OFF for more drivers
Karsten Keil [Tue, 15 May 2012 23:51:08 +0000 (23:51 +0000)]
mISDN: Implement MISDN_CTRL_RX_OFF for more drivers

MISDN_CTRL_RX_OFF is a meachanism to discard RX data in the driver if
the data is not needed by the application. It can be used when playing
mesages, but not recording or with unidirectional protocols.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: Implement MISDN_CTRL_FILL_EMPTY for more drivers
Karsten Keil [Tue, 15 May 2012 23:51:07 +0000 (23:51 +0000)]
mISDN: Implement MISDN_CTRL_FILL_EMPTY for more drivers

MISDN_CTRL_FILL_EMPTY is a meachanism to send a fixed value (normally silence)
as long no data from upper layers is available. It can be used when recording
voice messages or with unidirectional protocols.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: Allow to set a minimum length for transparent data
Karsten Keil [Tue, 15 May 2012 23:51:06 +0000 (23:51 +0000)]
mISDN: Allow to set a minimum length for transparent data

If the FIFO of the card is small, many short messages are queued up to
the upper layers and the userspace. This change allows the applications
to set a minimum datalen they want from the drivers.
Create a common control function to avoid code duplication in each
driver.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: Reduce RX buffer allocation for transparent data
Karsten Keil [Tue, 15 May 2012 23:51:05 +0000 (23:51 +0000)]
mISDN: Reduce RX buffer allocation for transparent data

We did allways allocate maxsize buffers, but for transparent data we know
the actual size.
Use a common function to calculate size and detect overflows.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: Bugfix hfcsusb: usb endpoint activation/deactivation
Martin Bachem [Tue, 15 May 2012 23:51:04 +0000 (23:51 +0000)]
mISDN: Bugfix hfcsusb: usb endpoint activation/deactivation

Here was a off by one in the activation/deactivation.
The additional activation in open_bchannel() did hide
it, but only if you do not try to use B2.

Signed-off-by: Martin Bachem <info@colognechip.com>
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: avmfritz use the bigger fifo of chip version 2
Karsten Keil [Tue, 15 May 2012 23:51:03 +0000 (23:51 +0000)]
mISDN: avmfritz use the bigger fifo of chip version 2

If we detect the latest hardware revision we should use the bigger fifo
to avoid TX underruns and have less interrupts.
TX underruns should be logged as warning.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: Early confirm for transparent data
Karsten Keil [Tue, 15 May 2012 23:51:02 +0000 (23:51 +0000)]
mISDN: Early confirm for transparent data

It is better to send a confirm for transparent data early as possible
to avoid TX underuns.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: Cleanup channel also if it already was deactivated
Karsten Keil [Tue, 15 May 2012 23:51:01 +0000 (23:51 +0000)]
mISDN: Cleanup channel also if it already was deactivated

If a channel was closed after it was deactivated it could happen that
something was not proper resetted. The test if a channel is still activ
was wrong, so remove it and always do the cleanup.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoDocumentation/networking/ieee802154: update MAC chapter
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:31 +0000 (20:50 +0000)]
Documentation/networking/ieee802154: update MAC chapter

Update the documentation according to latest changes.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodrivers/ieee802154: IEEE 802.15.4 loopback driver
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:30 +0000 (20:50 +0000)]
drivers/ieee802154: IEEE 802.15.4 loopback driver

Add support for IEEE 802.15.4 loopback driver - useful development
and debugging tool.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: monitor device support
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:29 +0000 (20:50 +0000)]
mac802154: monitor device support

Support for monitor device intended to capture all the network activity.
This interface could be used by networks sniffers and is already
supported by WireShark. That's a good test point to check that basic
MAC support works.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: slaves management support
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:28 +0000 (20:50 +0000)]
mac802154: slaves management support

This patch adds functionality for registration and removing slaves
in the stack.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoieee802154: interface type to be added
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:27 +0000 (20:50 +0000)]
ieee802154: interface type to be added

This stack implementation distinguishes several types of slave
interfaces. Another parameter to 'add_iface_' function is added
to clarify the interface type is going to be registered.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: basic mib support
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:26 +0000 (20:50 +0000)]
mac802154: basic mib support

Basic support for IEEE 802.15.4 management information base.
Current implementation contains a command to set HW address only.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: basic MAC commands interface support
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:25 +0000 (20:50 +0000)]
mac802154: basic MAC commands interface support

Declare set of MAC-commands for reduced functionality interface.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: slave interfaces declaration
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:24 +0000 (20:50 +0000)]
mac802154: slave interfaces declaration

Slaves represent typical network interfaces available from userspace.
Each ieee802154 device/transceiver may have several slaves and able
to be associated with several networks at the same time. So this
patch adds structure for slaves declaration.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: declare reduced mlme operations
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:23 +0000 (20:50 +0000)]
mac802154: declare reduced mlme operations

According IEEE 802.15.4 standard each node can be either full functionality
device (FFD) or reduce functionality device (RFD). So 2 sets of operations
are needed. This patch declare RFD operations structure.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: TX data path
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:22 +0000 (20:50 +0000)]
mac802154: TX data path

Main TX data path implementation between upper and physical layers.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: RX data path
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:21 +0000 (20:50 +0000)]
mac802154: RX data path

Main RX data path implementation between physical and mac layers.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: allocation of ieee802154 device
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:20 +0000 (20:50 +0000)]
mac802154: allocation of ieee802154 device

An interface to allocate and register ieee802154 compatible device.
The allocated device has the following representation in memory:

+-----------------------+
| struct wpan_phy       |
+-----------------------+
| struct mac802154_priv |
+-----------------------+
| driver's private data |
+-----------------------+

Used by device drivers to register new instance in the stack.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: basic ieee802.15.4 device structures
alex.bluesman.smirnov@gmail.com [Tue, 15 May 2012 20:50:19 +0000 (20:50 +0000)]
mac802154: basic ieee802.15.4 device structures

The IEEE 802.15.4 Working Group focuses on the standardization of the
bottom two layers of ISO/OSI protocol stack: Physical (PHY) and MAC.
The MAC layer provides access control to a shared channel and reliable
data delivery. The main functions performed by the MAC sublayer are:
association and disassociation, security control, optional star
network topology functions, such as beacon generation and Guaranteed
Time Slots (GTSs) management, generation of ACK frames (if used), and,
finally, application support for the two possible network topologies
described in the standard.

This is an initial commit which describes main data structures needed
for ieee802.15.4 compatible devices representation in the MAC layer.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoisdn: Fix typo in hfcmulti.c
Masanari Iida [Tue, 15 May 2012 09:06:39 +0000 (09:06 +0000)]
isdn: Fix typo in hfcmulti.c

Correcting spelling "extenal" to "external" in hfcmulti.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
12 years agoMerge branch 'delete-tokenring' of git://git.kernel.org/pub/scm/linux/kernel/git...
David S. Miller [Wed, 16 May 2012 05:02:40 +0000 (01:02 -0400)]
Merge branch 'delete-tokenring' of git://git./linux/kernel/git/paulg/linux

12 years agonet: ipv4 and ipv6: Convert printk(KERN_DEBUG to pr_debug
Joe Perches [Tue, 15 May 2012 14:11:54 +0000 (14:11 +0000)]
net: ipv4 and ipv6: Convert printk(KERN_DEBUG to pr_debug

Use the current debugging style and enable dynamic_debug.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: ipv6: Standardize prefixes for message logging
Joe Perches [Tue, 15 May 2012 14:11:53 +0000 (14:11 +0000)]
net: ipv6: Standardize prefixes for message logging

Add #define pr_fmt(fmt) as appropriate.

Add "IPv6: " to appropriate files.

Convert printk(KERN_<LEVEL> to pr_<level> (but not KERN_DEBUG).
Standardize on "%s: " not "%s(): " when emitting __func__.
Use "%s: ", __func__ instead of embedding function name.
Coalesce formats, align arguments.

ADDRCONF output is now prefixed with "IPv6: "

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetdev/phy: Make get_phy_id() static and quit EXPORTing it.
David Daney [Tue, 15 May 2012 10:46:52 +0000 (10:46 +0000)]
netdev/phy: Make get_phy_id() static and quit EXPORTing it.

This function is only referenced from within phy_device.c, so there is
no reason to export it.  In fact, we can make it static.

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_core: Fixed error flow in rem_slave_eqs
Jack Morgenstein [Tue, 15 May 2012 10:35:04 +0000 (10:35 +0000)]
net/mlx4_core: Fixed error flow in rem_slave_eqs

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_core: Add XRC domains and counters to resource tracker
Jack Morgenstein [Tue, 15 May 2012 10:35:03 +0000 (10:35 +0000)]
net/mlx4_core: Add XRC domains and counters to resource tracker

Add missing resource tracking for XRC domains and complete the tracking for HCA
network flow counters.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_core: Fix potential kernel Oops in res tracker during Dom0 driver unload
Jack Morgenstein [Tue, 15 May 2012 10:35:02 +0000 (10:35 +0000)]
net/mlx4_core: Fix potential kernel Oops in res tracker during Dom0 driver unload

Currently the slave and master resources are deleted after master freed
all bitmaps. If any resources were not properly cleaned up during the
shutdown process, an Oops would result.

Fix so that delete slave (only) resources during cleanup. Master resources
are cleaned up during unload process, and need not separately be cleaned.

Note that during cleanup, we need to split the resource-tracker freeing
functionality.

Before removing all the bitmaps, we free any leftover slave resources.
However, we can only remove the resource tracker linked list after
all bitmap frees, since some of the freeing functions (e.g.,
mlx4_cleanup_eq_table) use paravirtualized FW commands which expect
the resource tracker linked list to be present.

Found-by: Aviad Yehezkel <aviadye@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_core: Do not reset module-parameter num_vfs when fail to enable sriov
Jack Morgenstein [Tue, 15 May 2012 10:35:01 +0000 (10:35 +0000)]
net/mlx4_core: Do not reset module-parameter num_vfs when fail to enable sriov

Consider the following scenario: 2 HCAs, where only one of which can run SRIOV.

If we reset the module parameter, all the VFs of the SRIOV HCA will be
claimed by the PPF host (-- the code relies on num_vfs being non-zero
to avoid this claiming, and num_vfs was reset when pci_enable_sriov failed
for the non-SRIOV HCA).

The solution is not to touch the num_vfs parameter.

Also, eliminate the unneeded check of num_vfs when disabling sriov
(the dev flag bit is sufficient).

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_core: Remove unused *_str functions from the resource tracker
Jack Morgenstein [Tue, 15 May 2012 10:35:00 +0000 (10:35 +0000)]
net/mlx4_core: Remove unused *_str functions from the resource tracker

Removed unsued *_str helper functions from resource_tracker.c

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_core: Change SYNC_TPT to be native (not wrapped)
Jack Morgenstein [Tue, 15 May 2012 10:34:59 +0000 (10:34 +0000)]
net/mlx4_core: Change SYNC_TPT to be native (not wrapped)

The "wrapped" was incorrect, since no wrapper function was defined.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_core: Fix init_port mask state for slaves
Jack Morgenstein [Tue, 15 May 2012 10:34:58 +0000 (10:34 +0000)]
net/mlx4_core: Fix init_port mask state for slaves

In function mlx4_INIT_PORT_wrapper, the port state mask for the
slave is only set if we are invoking the INIT_PORT fw command.

However, the reference count for the (initialized) port is
incremented anyway.

This creates a problem in that when we have multiple slaves,
then the CLOSE_PORT command will never be invoked. The
reason is that in the CLOSE_PORT wrapper, if the port-state
mask is zero for the slave (which it is), the wrapper returns
without doing anything. The only slave which will not return
immediately in the CLOSE_PORT wrapper is that slave for which
INIT_PORT was invoked.

The fix is to not have the port-state mask setting depend
on the logic for calling the INIT_PORT fw command.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4: Address build warnings on set but not used variables
Or Gerlitz [Tue, 15 May 2012 10:34:57 +0000 (10:34 +0000)]
net/mlx4: Address build warnings on set but not used variables

Handle the compiler warnings on variables which are set but not used
by removing the relevant variable or casting a return value which is
ignored on purpose to void.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotokenring: delete all remaining driver support
Paul Gortmaker [Thu, 10 May 2012 02:41:59 +0000 (22:41 -0400)]
tokenring: delete all remaining driver support

This represents the mass deletion of the of the tokenring support.

It gets rid of:
  - the net/tr.c which the drivers depended on
  - the drivers/net component
  - the Kbuild infrastructure around it
  - any tokenring related CONFIG_ settings in any defconfigs
  - the tokenring headers in the include/linux dir
  - the firmware associated with the tokenring drivers.
  - any associated token ring documentation.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agonet: delete all instances of special processing for token ring
Paul Gortmaker [Thu, 10 May 2012 21:14:35 +0000 (17:14 -0400)]
net: delete all instances of special processing for token ring

We are going to delete the Token ring support.  This removes any
special processing in the core networking for token ring, (aside
from net/tr.c itself), leaving the drivers and remaining tokenring
support present but inert.

The mass removal of the drivers and net/tr.c will be in a separate
commit, so that the history of these files that we still care
about won't have the giant deletion tied into their history.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agoatm: remove the coupling to token ring support
Paul Gortmaker [Thu, 10 May 2012 20:17:00 +0000 (16:17 -0400)]
atm: remove the coupling to token ring support

The token ring support is going away, so decouple
the atm support from it in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agos390: delete any traces of token ring support
Paul Gortmaker [Thu, 10 May 2012 19:50:52 +0000 (15:50 -0400)]
s390: delete any traces of token ring support

The token ring support is going away from the core kernel.
Divorce the S390 drivers from it in advance.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agoxfrm: Convert several xfrm policy match functions to bool.
David S. Miller [Tue, 15 May 2012 19:04:57 +0000 (15:04 -0400)]
xfrm: Convert several xfrm policy match functions to bool.

xfrm_selector_match
xfrm_sec_ctx_match
__xfrm4_selector_match
__xfrm6_selector_match

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Convert net_ratelimit uses to net_<level>_ratelimited
Joe Perches [Sun, 13 May 2012 21:56:26 +0000 (21:56 +0000)]
net: Convert net_ratelimit uses to net_<level>_ratelimited

Standardize the net core ratelimited logging functions.

Coalesce formats, align arguments.
Change a printk then vprintk sequence to use printf extension %pV.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Add net_ratelimited_function and net_<level>_ratelimited macros
Joe Perches [Sun, 13 May 2012 21:56:25 +0000 (21:56 +0000)]
net: Add net_ratelimited_function and net_<level>_ratelimited macros

__ratelimit() can be considered an inverted bool test because
it returns true when not ratelimited.  Several tests in the
kernel tree use this __ratelimit() function incorrectly.

No net_ratelimit uses are incorrect currently though.

Most uses of net_ratelimit are to log something via printk or
pr_<level>.

In order to minimize the uses of net_ratelimit, and to start
standardizing the code style used for __ratelimit() and net_ratelimit(),
add a net_ratelimited_function() macro and net_<level>_ratelimited()
logging macros similar to pr_<level>_ratelimited that use the global
net_ratelimit instead of a static per call site "struct ratelimit_state".

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodummy: documentation is stale
Alan Cox [Mon, 14 May 2012 03:57:31 +0000 (03:57 +0000)]
dummy: documentation is stale

dummy0/1/2 names are always used and there are options to set multiple
dummy devices. Remove the obsolete text

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42865
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoxfrm_algo: drop an unnecessary inclusion
Jan Beulich [Tue, 15 May 2012 02:00:44 +0000 (02:00 +0000)]
xfrm_algo: drop an unnecessary inclusion

For several releases, this has not been needed anymore, as no helper
functions declared in net/ah.h get implemented by xfrm_algo.c anymore.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoxfrm: make xfrm_algo.c a module
Jan Beulich [Tue, 15 May 2012 01:57:44 +0000 (01:57 +0000)]
xfrm: make xfrm_algo.c a module

By making this a standalone config option (auto-selected as needed),
selecting CRYPTO from here rather than from XFRM (which is boolean)
allows the core crypto code to become a module again even when XFRM=y.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlcnic-ethtool: set the ethtool_dump flag by ETH_FW_DUMP_DISABLE value that is zero...
Manish chopra [Tue, 15 May 2012 01:13:39 +0000 (01:13 +0000)]
qlcnic-ethtool: set the ethtool_dump flag by ETH_FW_DUMP_DISABLE value that is zero, if firmware dump is disabled.

Signed-off-by: Manish chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agolinux/ethtool: Added macro ETH_FW_DUMP_DISABLE
Manish chopra [Tue, 15 May 2012 01:13:38 +0000 (01:13 +0000)]
linux/ethtool: Added macro ETH_FW_DUMP_DISABLE

o flag field of ethtool_dump structure must be initialized by this macro
value that is zero, if the firmware dump is disabled.
by this we can get the firmware dump capability [enable/disable] via ethtool

Signed-off-by: Manish chopra <manish.chopra@qlogic.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: fix suspend/resume locking
Giuseppe CAVALLARO [Sun, 13 May 2012 22:18:43 +0000 (22:18 +0000)]
stmmac: fix suspend/resume locking

Upon resume from standby, there is a possible interrupt
unsafe locking scenario raised when configure the Kernel
with CONFIG_PROVE_LOCKING. So this patch fixes that in
PM driver stuff by calling lock/unlock_irqsave/restore.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: add mixed burst for DMA
Giuseppe CAVALLARO [Sun, 13 May 2012 22:18:42 +0000 (22:18 +0000)]
stmmac: add mixed burst for DMA

In mixed burst (MB) mode, the AHB master always initiates
the bursts with fixed-size when the DMA requests transfers
of size less than or equal to 16 beats.
This patch adds the MB support and the flag that can be
passed from the platform to select it.
MB mode can also give some benefits in terms of performances
on some platforms.

v2: fixed Coding Style

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: extend mac addr reg and fix perfect filering
Giuseppe CAVALLARO [Sun, 13 May 2012 22:18:41 +0000 (22:18 +0000)]
stmmac: extend mac addr reg and fix perfect filering

This patch is to extend the number of MAC address registers
for 16 to 32. In fact, other new 16 registers are available in new
chips and this can help on perfect filter mode for unicast.

This patch also fixes the perfect filtering mode by setting the
bit 31 in the MAC address registers.

v2: fixed Coding Style.

Signed-off-by: Gianni Antoniazzi <gianni.antoniazzi-ext@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodm9000: some coldfire boards need this
Steven King [Fri, 11 May 2012 06:49:46 +0000 (06:49 +0000)]
dm9000: some coldfire boards need this

Some coldfire boards (ie m5253demo) have a dm9000 onboard.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocodel: use u16 field instead of 31bits for rec_inv_sqrt
Eric Dumazet [Sat, 12 May 2012 21:23:23 +0000 (21:23 +0000)]
codel: use u16 field instead of 31bits for rec_inv_sqrt

David pointed out gcc might generate poor code with 31bit fields.

Using u16 is more than enough and permits a better code output.

Also make the code intent more readable using constants, fixed point arithmetic
not being trivial for everybody.

Suggested-by: David Miller <davem@davemloft.net>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Mon, 14 May 2012 22:15:33 +0000 (18:15 -0400)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:

* an improvement to avoid to linearise the whole received packet when not needed
* an improvement for client traffic rerouting after roaming
* a fix for the local translation table state-machine
* minor cleanups and fixes

12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 14 May 2012 22:00:48 +0000 (18:00 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next

12 years agonet: codel: fix build errors
Sasha Levin [Mon, 14 May 2012 11:57:06 +0000 (11:57 +0000)]
net: codel: fix build errors

Fix the following build error:

net/sched/sch_fq_codel.c: In function 'fq_codel_dump_stats':
net/sched/sch_fq_codel.c:464:3: error: unknown field 'qdisc_stats' specified in initializer
net/sched/sch_fq_codel.c:464:3: warning: missing braces around initializer
net/sched/sch_fq_codel.c:464:3: warning: (near initialization for 'st.<anonymous>')
net/sched/sch_fq_codel.c:465:3: error: unknown field 'qdisc_stats' specified in initializer
net/sched/sch_fq_codel.c:465:3: warning: excess elements in struct initializer
net/sched/sch_fq_codel.c:465:3: warning: (near initialization for 'st')
net/sched/sch_fq_codel.c:466:3: error: unknown field 'qdisc_stats' specified in initializer
net/sched/sch_fq_codel.c:466:3: warning: excess elements in struct initializer
net/sched/sch_fq_codel.c:466:3: warning: (near initialization for 'st')
net/sched/sch_fq_codel.c:467:3: error: unknown field 'qdisc_stats' specified in initializer
net/sched/sch_fq_codel.c:467:3: warning: excess elements in struct initializer
net/sched/sch_fq_codel.c:467:3: warning: (near initialization for 'st')
make[1]: *** [net/sched/sch_fq_codel.o] Error 1

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/codel: Add missing #include <linux/prefetch.h>
Geert Uytterhoeven [Mon, 14 May 2012 09:47:05 +0000 (09:47 +0000)]
net/codel: Add missing #include <linux/prefetch.h>

m68k allmodconfig:

net/sched/sch_codel.c: In function ‘dequeue’:
net/sched/sch_codel.c:70: error: implicit declaration of function ‘prefetch’
make[1]: *** [net/sched/sch_codel.o] Error 1

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobatman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists
Antonio Quartulli [Sun, 15 Jan 2012 23:36:58 +0000 (00:36 +0100)]
batman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists

When trying to add a new tt_local_entry, if such entry already exists, we have
to ensure that the TT_CLIENT_PENDING flag is not set, otherwise the entry will
be deleted soon.

Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: README cleanups
Sven Eckelmann [Mon, 2 Apr 2012 17:31:26 +0000 (19:31 +0200)]
batman-adv: README cleanups

- Add routing_algo

- Remove date from README:
The date has to be updated when a patch touches the README. Therefore, nearly
every feature will modify this date. It can happens quite often that not only
one feature is currently in development or waiting on the mailinglist. This
creates merge conflicts when applying a patchset.

The date itself doesn't provide any additional information when this file is
only available in a release tarball or as part of a SCM repository.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: Start new development cycle
Sven Eckelmann [Fri, 30 Mar 2012 16:44:09 +0000 (18:44 +0200)]
batman-adv: Start new development cycle

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: use shorter pr_warn instead of pr_warning
Sven Eckelmann [Mon, 26 Mar 2012 14:22:45 +0000 (16:22 +0200)]
batman-adv: use shorter pr_warn instead of pr_warning

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: refactor window_protected to avoid unnecessary return statement
Marek Lindner [Sat, 17 Mar 2012 07:28:33 +0000 (15:28 +0800)]
batman-adv: refactor window_protected to avoid unnecessary return statement

Reported-by: David Laight <David.Laight@aculab.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: prepare lq_update_lock to be shared among different protocols
Marek Lindner [Sat, 17 Mar 2012 07:28:32 +0000 (15:28 +0800)]
batman-adv: prepare lq_update_lock to be shared among different protocols

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: improve unicast packet (re)routing
Antonio Quartulli [Fri, 16 Mar 2012 17:03:28 +0000 (18:03 +0100)]
batman-adv: improve unicast packet (re)routing

In case of a client X roaming from a generic node A to another node B, it is
possible that a third node C gets A's OGM but not B's. At this point in time, if
C wants to send data to X it will send a unicast packet destined to A. The
packet header will contain A's last ttvn (C got A's OGM and so it knows it).

The packet will travel towards A without being intercepted because the ttvn
contained in its header is the newest for A.

Once A will receive the packet, A's state will not report to be in a "roaming
phase" (because, after a roaming, once A sends out its OGM, all the changes are
committed and the node is considered not to be in the roaming state anymore)
and it will match the ttvn carried by the packet. Therefore there is no reason
for A to try to alter the packet's route, thus dropping the packet because the
destination client is not there anymore.

However, C is well aware that it's routing information towards the client X is
outdated as it received an OGM from A saying that the client roamed away.
Thanks to this detail, this patch introduces a small change in behaviour: as
long as C is in the state of not knowing the new location of client X it will
forward the traffic to its last known location using ttvn-1 of the destination.
By using an older ttvn node A will be forced to re-route the packet.
Intermediate nodes are also allowed to update the packet's destination as long
as they have the information about the client's new location.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: avoid skb_linearise() if not needed
Antonio Quartulli [Fri, 16 Mar 2012 10:52:31 +0000 (11:52 +0100)]
batman-adv: avoid skb_linearise() if not needed

Whenever we want to access headers only, we do not need to linearise the whole
packet. Instead we can use pskb_may_pull()

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agoetherdevice: Remove now unused compare_ether_addr_64bits
Joe Perches [Fri, 11 May 2012 12:21:06 +0000 (12:21 +0000)]
etherdevice: Remove now unused compare_ether_addr_64bits

Move and invert the logic from the otherwise unused
compare_ether_addr_64bits to ether_addr_equal_64bits.

Neaten the logic in is_etherdev_addr.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoigb: Add Support for new i210/i211 devices.
Carolyn Wyborny [Fri, 6 Apr 2012 23:25:19 +0000 (23:25 +0000)]
igb: Add Support for new i210/i211 devices.

This patch adds new initialization functions and device support
for i210 and i211 devices.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Add function and pointers for 82580 low power state settings.
Carolyn Wyborny [Sun, 4 Mar 2012 03:26:26 +0000 (03:26 +0000)]
igb: Add function and pointers for 82580 low power state settings.

82580 and later parts did not have low power setting functions.  This patch
adds the specific functions, pointers and assignments for these low
power settings.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agofq_codel: Fair Queue Codel AQM
Eric Dumazet [Fri, 11 May 2012 09:30:50 +0000 (09:30 +0000)]
fq_codel: Fair Queue Codel AQM

Fair Queue Codel packet scheduler

Principles :

- Packets are classified (internal classifier or external) on flows.
- This is a Stochastic model (as we use a hash, several flows might
                              be hashed on same slot)
- Each flow has a CoDel managed queue.
- Flows are linked onto two (Round Robin) lists,
  so that new flows have priority on old ones.

- For a given flow, packets are not reordered (CoDel uses a FIFO)
- head drops only.
- ECN capability is on by default.
- Very low memory footprint (64 bytes per flow)

tc qdisc ... fq_codel [ limit PACKETS ] [ flows number ]
                      [ target TIME ] [ interval TIME ] [ noecn ]
                      [ quantum BYTES ]

defaults : 1024 flows, 10240 packets limit, quantum : device MTU
           target : 5ms (CoDel default)
           interval : 100ms (CoDel default)

Impressive results on load :

class htb 1:1 root leaf 10: prio 0 quantum 1514 rate 200000Kbit ceil 200000Kbit burst 1475b/8 mpu 0b overhead 0b cburst 1475b/8 mpu 0b overhead 0b level 0
 Sent 43304920109 bytes 33063109 pkt (dropped 0, overlimits 0 requeues 0)
 rate 201691Kbit 28595pps backlog 0b 312p requeues 0
 lended: 33063109 borrowed: 0 giants: 0
 tokens: -912 ctokens: -912

class fq_codel 10:1735 parent 10:
 (dropped 1292, overlimits 0 requeues 0)
 backlog 15140b 10p requeues 0
  deficit 1514 count 1 lastcount 1 ldelay 7.1ms
class fq_codel 10:4524 parent 10:
 (dropped 1291, overlimits 0 requeues 0)
 backlog 16654b 11p requeues 0
  deficit 1514 count 1 lastcount 1 ldelay 7.1ms
class fq_codel 10:4e74 parent 10:
 (dropped 1290, overlimits 0 requeues 0)
 backlog 6056b 4p requeues 0
  deficit 1514 count 1 lastcount 1 ldelay 6.4ms dropping drop_next 92.0ms
class fq_codel 10:628a parent 10:
 (dropped 1289, overlimits 0 requeues 0)
 backlog 7570b 5p requeues 0
  deficit 1514 count 1 lastcount 1 ldelay 5.4ms dropping drop_next 90.9ms
class fq_codel 10:a4b3 parent 10:
 (dropped 302, overlimits 0 requeues 0)
 backlog 16654b 11p requeues 0
  deficit 1514 count 1 lastcount 1 ldelay 7.1ms
class fq_codel 10:c3c2 parent 10:
 (dropped 1284, overlimits 0 requeues 0)
 backlog 13626b 9p requeues 0
  deficit 1514 count 1 lastcount 1 ldelay 5.9ms
class fq_codel 10:d331 parent 10:
 (dropped 299, overlimits 0 requeues 0)
 backlog 15140b 10p requeues 0
  deficit 1514 count 1 lastcount 1 ldelay 7.0ms
class fq_codel 10:d526 parent 10:
 (dropped 12160, overlimits 0 requeues 0)
 backlog 35870b 211p requeues 0
  deficit 1508 count 12160 lastcount 1 ldelay 15.3ms dropping drop_next 247us
class fq_codel 10:e2c6 parent 10:
 (dropped 1288, overlimits 0 requeues 0)
 backlog 15140b 10p requeues 0
  deficit 1514 count 1 lastcount 1 ldelay 7.1ms
class fq_codel 10:eab5 parent 10:
 (dropped 1285, overlimits 0 requeues 0)
 backlog 16654b 11p requeues 0
  deficit 1514 count 1 lastcount 1 ldelay 5.9ms
class fq_codel 10:f220 parent 10:
 (dropped 1289, overlimits 0 requeues 0)
 backlog 15140b 10p requeues 0
  deficit 1514 count 1 lastcount 1 ldelay 7.1ms

qdisc htb 1: root refcnt 6 r2q 10 default 1 direct_packets_stat 0 ver 3.17
 Sent 43331086547 bytes 33092812 pkt (dropped 0, overlimits 66063544 requeues 71)
 rate 201697Kbit 28602pps backlog 0b 260p requeues 71
qdisc fq_codel 10: parent 1:1 limit 10240p flows 65536 target 5.0ms interval 100.0ms ecn
 Sent 43331086547 bytes 33092812 pkt (dropped 949359, overlimits 0 requeues 0)
 rate 201697Kbit 28602pps backlog 189352b 260p requeues 0
  maxpacket 1514 drop_overlimit 0 new_flow_count 5582 ecn_mark 125593
  new_flows_len 0 old_flows_len 11

PING 172.30.42.18 (172.30.42.18) 56(84) bytes of data.
64 bytes from 172.30.42.18: icmp_req=1 ttl=64 time=0.227 ms
64 bytes from 172.30.42.18: icmp_req=2 ttl=64 time=0.165 ms
64 bytes from 172.30.42.18: icmp_req=3 ttl=64 time=0.166 ms
64 bytes from 172.30.42.18: icmp_req=4 ttl=64 time=0.151 ms
64 bytes from 172.30.42.18: icmp_req=5 ttl=64 time=0.164 ms
64 bytes from 172.30.42.18: icmp_req=6 ttl=64 time=0.172 ms
64 bytes from 172.30.42.18: icmp_req=7 ttl=64 time=0.175 ms
64 bytes from 172.30.42.18: icmp_req=8 ttl=64 time=0.183 ms
64 bytes from 172.30.42.18: icmp_req=9 ttl=64 time=0.158 ms
64 bytes from 172.30.42.18: icmp_req=10 ttl=64 time=0.200 ms

10 packets transmitted, 10 received, 0% packet loss, time 8999ms
rtt min/avg/max/mdev = 0.151/0.176/0.227/0.022 ms

Much better than SFQ because of priority given to new flows, and fast
path dirtying less cache lines.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocodel: use Newton method instead of sqrt() and divides
Eric Dumazet [Sat, 12 May 2012 03:32:13 +0000 (03:32 +0000)]
codel: use Newton method instead of sqrt() and divides

As Van pointed out, interval/sqrt(count) can be implemented using
multiplies only.

http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Iterative_methods_for_reciprocal_square_roots

This patch implements the Newton method and reciprocal divide.

Total cost is 15 cycles instead of 120 on my Corei5 machine (64bit
kernel).

There is a small 'error' for count values < 5, but we don't really care.

I reuse a hole in struct codel_vars :
 - pack the dropping boolean into one bit
 - use 31bit to store the reciprocal value of sqrt(count).

Suggested-by: Van Jacobson <van@pollere.net>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Dave Taht <dave.taht@bufferbloat.net>
Cc: Kathleen Nichols <nichols@pollere.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Matt Mathis <mattmathis@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Nandita Dukkipati <nanditad@google.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agorndis_wlan: cleanup: change oid from __le32 to u32 in various places
Jussi Kivilinna [Fri, 11 May 2012 22:17:57 +0000 (22:17 +0000)]
rndis_wlan: cleanup: change oid from __le32 to u32 in various places

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agorndis_host: cleanup: change oid from __le32 to u32 in rndis_query()
Jussi Kivilinna [Fri, 11 May 2012 22:17:50 +0000 (22:17 +0000)]
rndis_host: cleanup: change oid from __le32 to u32 in rndis_query()

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agorndis_wlan: cleanup: byteswap data from device instead of RNDIS_* defines
Jussi Kivilinna [Fri, 11 May 2012 22:17:42 +0000 (22:17 +0000)]
rndis_wlan: cleanup: byteswap data from device instead of RNDIS_* defines

All other values from device provided buffer are byteswapped, so it seems more
logical to do same for these.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agorndis_host: cleanup: byteswap data from device instead of RNDIS_* defines
Jussi Kivilinna [Fri, 11 May 2012 22:17:34 +0000 (22:17 +0000)]
rndis_host: cleanup: byteswap data from device instead of RNDIS_* defines

All other values from device provided buffer are byteswapped, so it seems
more logical to do same for these.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: move bus message definition
Linus Walleij [Fri, 11 May 2012 22:17:26 +0000 (22:17 +0000)]
usb/net: rndis: move bus message definition

This moves the bus message definition to land together with the
other message types. This message is not used in the kernel but
I'm keeping it anyway.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: fixup a few name prefixes
Linus Walleij [Fri, 11 May 2012 22:17:19 +0000 (22:17 +0000)]
usb/net: rndis: fixup a few name prefixes

This switches a horde of NDIS_*-prefixed variables to the RNDIS_*
prefix. Most of them aren't used much and causes no changes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: merge command codes
Linus Walleij [Fri, 11 May 2012 22:17:07 +0000 (22:17 +0000)]
usb/net: rndis: merge command codes

Switch the hyperv filter and rndis gadget driver to use the same command
enumerators as the other drivers and delete the surplus command codes.

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: move and namespace PnP defines
Linus Walleij [Fri, 11 May 2012 22:16:54 +0000 (22:16 +0000)]
usb/net: rndis: move and namespace PnP defines

This moves the PnP OID definitions to the RNDIS_* namespace
and puts them in the next falling slot in the list. Oh, the comment
above the PnP defines was referring to some obsolete or out-of-tree
driver so removed it, and removed my own comments telling where each
header segment came from as well, we have moved everything around by
this point anyway.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: delete duplicate packet types
Linus Walleij [Fri, 11 May 2012 22:16:47 +0000 (22:16 +0000)]
usb/net: rndis: delete duplicate packet types

The NDIS_*-prefixed packet types have equivalent RNDIS_*-
prefixed types, besides nothing in the kernel use these defines.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: merge media type definitions
Linus Walleij [Fri, 11 May 2012 22:16:39 +0000 (22:16 +0000)]
usb/net: rndis: merge media type definitions

Let's have a unified table of RNDIS media. We used to have a similar
table with NDIS_* prefix from the gadget driver, but since we're only
using RNDIS in the kernel (IIRC NDIS, non-remote, is for the windows-
internal network drivers so what do we care) let's prefix everything
with RNDIS. Some of the definitions were conflicting, in one of the
defines 0x0B is bearer "CO WAN" and in two others "BPC". Well I took
the majority vote. Two definition of medium 0x09 calls it "wireless
WAN" but one vote for "wireless LAN" but in this case I am sticking
with the minority, "Wide Area Network" does not make much sense in
this case as far as I can tell.

NOTE: latin singular and plural is so screwed up in these defines
that it makes my eyes bleed. But I will not attempt to submit a
patch converting all use of _MEDIA_ to _MEDIUM_ while I can probably
tell from the semantics of the code that RNDIS_MEDIA_STATE_CONNECTED
is most probably (erroneously) referring to a singular, unless it
can return an array of connected media. I suspect these erroneous
plurals are used in documentation and such so I don't want to
mess around with things for no functional change.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: group all status codes together
Linus Walleij [Fri, 11 May 2012 22:16:30 +0000 (22:16 +0000)]
usb/net: rndis: group all status codes together

Move all RNDIS status codes so they appear in rising order and
in one place of the header file.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: delete surplus defines
Linus Walleij [Fri, 11 May 2012 22:16:23 +0000 (22:16 +0000)]
usb/net: rndis: delete surplus defines

These defines are not used in the kernel, and they have duplicate
definitions under the RNDIS_* prefix.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: merge duplicate 802_* OIDs
Linus Walleij [Fri, 11 May 2012 22:16:16 +0000 (22:16 +0000)]
usb/net: rndis: merge duplicate 802_* OIDs

The 802_* network OIDs were duplicated, so let's merge them and
use the RNDIS_* prefixed definitions from the hyperV driver.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: eliminate first set of duplicate OIDs
Linus Walleij [Fri, 11 May 2012 22:16:08 +0000 (22:16 +0000)]
usb/net: rndis: eliminate first set of duplicate OIDs

The RNDIS protocol contains a vast number of Object ID:s (OIDs).
The current definitions had multiple definitions of these ID:s,
let's use the nicely RNDIS_*-prefixed defines from the HyperV
implementation, rename everywhere they're used, and copy+rename
the few that were missing from this list of objects.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: remove ambigous status codes
Linus Walleij [Fri, 11 May 2012 22:15:59 +0000 (22:15 +0000)]
usb/net: rndis: remove ambigous status codes

The RNDIS status codes are redefined with much stranged ifdeffery
and only one of these codes was used in the hyperv driver, and
there it is very clearly referring to the RNDIS variant, not some
other status. So clarify this by explictly using the RNDIS_*
prefixed status code in the hyperv drivera and delete the
duplicate defines.

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: break out <linux/rndis.h> defines
Linus Walleij [Fri, 11 May 2012 22:15:50 +0000 (22:15 +0000)]
usb/net: rndis: break out <linux/rndis.h> defines

As a first step to consolidate the RNDIS implementations, break out
a common file with all the #defines and move it to <linux/rndis.h>.

This also deletes the immediate duplicated defines in the
<linux/rndis.h> file that yields a lot of compilation warnings.

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousb/net: rndis: inline the cpu_to_le32() macro
Linus Walleij [Fri, 11 May 2012 22:15:39 +0000 (22:15 +0000)]
usb/net: rndis: inline the cpu_to_le32() macro

The header file <linux/usb/rndis_host.h> used a number of #defines
that included the cpu_to_le32() macro to assure the result will be
in LE endianness. Inlining this into the code instead of using it
in the code definitions yields consolidation opportunities later
on as you will see in the following patches. The individual
drivers also used local defines - all are switched over to the
pattern of doing the conversion at the call sites instead.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv6/af_inet6.c: checkpatch cleanup
Eldad Zack [Sat, 5 May 2012 10:13:53 +0000 (10:13 +0000)]
net/ipv6/af_inet6.c: checkpatch cleanup

af_inet6.c:80: ERROR: do not initialise statics to 0 or NULL
af_inet6.c:259: ERROR: spaces required around that '=' (ctx:VxV)
af_inet6.c:394: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:412: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:422: ERROR: do not use assignment in if condition
af_inet6.c:425: ERROR: do not use assignment in if condition
af_inet6.c:433: ERROR: do not use assignment in if condition
af_inet6.c:437: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:446: ERROR: spaces required around that '=' (ctx:VxV)
af_inet6.c:478: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:485: ERROR: that open brace { should be on the previous line
af_inet6.c:485: ERROR: space required before the open parenthesis '('
af_inet6.c:513: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:629: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:647: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:687: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:709: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:1073: ERROR: space required before the open parenthesis '('

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: of/phy: fix build error when phylib is built as a module
Bjørn Mork [Fri, 11 May 2012 05:47:01 +0000 (05:47 +0000)]
net: of/phy: fix build error when phylib is built as a module

CONFIG_OF_MDIO is tristate and will be m if PHYLIB is m.  Use
IS_ENABLED macro to prevent build error:

 ERROR: "of_mdio_find_bus" [drivers/net/phy/mdio-mux.ko] undefined!

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: David Daney <david.daney@cavium.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: David Daney <david.daney@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Fri, 11 May 2012 21:57:52 +0000 (17:57 -0400)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:

* fix a little bug in the DHCP packet snooping introduced so far
* minor fixes and cleanups
* minor routing protocol API cleanups
* add a new contributor name to translation-table.{c,h}
* update copyright years in file headers
* minor improvement for the routing algorithm

12 years agobatman-adv: add contributor name
Antonio Quartulli [Wed, 14 Mar 2012 12:03:01 +0000 (13:03 +0100)]
batman-adv: add contributor name

translation_table.{c,h} have been heavily modified by another contributor and
for legal purposes it is better to include his name into the contributor list

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: update copyright years
Antonio Quartulli [Wed, 14 Mar 2012 11:57:02 +0000 (12:57 +0100)]
batman-adv: update copyright years

update copyright years in order to include 2012

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: fix checkpatch string complaint
Marek Lindner [Sat, 17 Mar 2012 07:28:34 +0000 (15:28 +0800)]
batman-adv: fix checkpatch string complaint

Regression introduced by: f76d019194e0a88c57371df169ecc979690a04c2

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: avoid temporary routing loops by being strict on forwarded OGMs
Marek Lindner [Sat, 10 Mar 2012 22:17:53 +0000 (06:17 +0800)]
batman-adv: avoid temporary routing loops by being strict on forwarded OGMs

batman-adv would forward OGMs from non-besthops while replacing the the TQ
and TTL values with the values from the best hop. In certain corner cases
this leads to a temporary routing loop.
This patch changes this behavior: Only packets from best next hops are
forwarded - TQ and TTL values won't be replaced anymore. However, the protocol
needs to rebroadcast OGMs from single hop neighbors regardless of whether or
not they are the best hop. To handle this case a new flag is introduced to
alert neighboring nodes about the forwarded OGM that is not from my best
next hop. It is to be discarded by all nodes except for the one originating
the OGM.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Daniele Furlan <daniele.furlan@gmail.com>
Tested-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
12 years agobatman-adv: Adding hard_iface specific sysfs wrapper macros for UINT
Linus Luessing [Sat, 10 Mar 2012 22:17:52 +0000 (06:17 +0800)]
batman-adv: Adding hard_iface specific sysfs wrapper macros for UINT

This allows us to easily add a sysfs parameter for an unsigned int
later, which is not for a batman mesh interface (e.g. bat0), but for a
common interface instead. It allows reading and writing an atomic_t in
hard_iface (instead of bat_priv compared to the mesh variant).

Developed by Linus during a 6 months trainee study period in Ascom
(Switzerland) AG.

Signed-off-by: Linus Luessing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>