pandora-kernel.git
13 years agoxfrm: Add user interface for esn and big anti-replay windows
Steffen Klassert [Tue, 8 Mar 2011 00:10:27 +0000 (00:10 +0000)]
xfrm: Add user interface for esn and big anti-replay windows

This patch adds a netlink based user interface to configure
esn and big anti-replay windows. The new netlink attribute
XFRMA_REPLAY_ESN_VAL is used to configure the new implementation.
If the XFRM_STATE_ESN flag is set, we use esn and support for big
anti-replay windows for the configured state. If this flag is not
set we use the new implementation with 32 bit sequence numbers.
A big anti-replay window can be configured in this case anyway.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Add support for IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:09:51 +0000 (00:09 +0000)]
xfrm: Add support for IPsec extended sequence numbers

This patch adds support for IPsec extended sequence numbers (esn)
as defined in RFC 4303. The bits to manage the anti-replay window
are based on a patch from Alex Badea.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Support anti-replay window size bigger than 32 packets
Steffen Klassert [Tue, 8 Mar 2011 00:09:09 +0000 (00:09 +0000)]
xfrm: Support anti-replay window size bigger than 32 packets

As it is, the anti-replay bitmap in struct xfrm_replay_state can
only accomodate 32 packets. Even though it is possible to configure
anti-replay window sizes up to 255 packets from userspace. So we
reject any packet with a sequence number within the configured window
but outside the bitmap. With this patch, we represent the anti-replay
window as a bitmap of variable length that can be accessed via the
new struct xfrm_replay_state_esn. Thus, we have no limit on the
window size anymore. To use the new anti-replay window implementantion,
new userspace tools are required. We leave the old implementation
untouched to stay in sync with old userspace tools.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Move IPsec replay detection functions to a separate file
Steffen Klassert [Tue, 8 Mar 2011 00:08:32 +0000 (00:08 +0000)]
xfrm: Move IPsec replay detection functions to a separate file

To support multiple versions of replay detection, we move the replay
detection functions to a separate file and make them accessible
via function pointers contained in the struct xfrm_replay.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoesp6: Add support for IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:07:51 +0000 (00:07 +0000)]
esp6: Add support for IPsec extended sequence numbers

This patch adds IPsec extended sequence numbers support to esp6.
We use the authencesn crypto algorithm to handle esp with separate
encryption/authentication algorithms.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoesp4: Add support for IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:07:14 +0000 (00:07 +0000)]
esp4: Add support for IPsec extended sequence numbers

This patch adds IPsec extended sequence numbers support to esp4.
We use the authencesn crypto algorithm to handle esp with separate
encryption/authentication algorithms.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Use separate low and high order bits of the sequence numbers in xfrm_skb_cb
Steffen Klassert [Tue, 8 Mar 2011 00:06:31 +0000 (00:06 +0000)]
xfrm: Use separate low and high order bits of the sequence numbers in xfrm_skb_cb

To support IPsec extended sequence numbers, we split the
output sequence numbers of xfrm_skb_cb in low and high order 32 bits
and we add the high order 32 bits to the input sequence numbers.
All users are updated accordingly.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Add basic infrastructure to support IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:05:43 +0000 (00:05 +0000)]
xfrm: Add basic infrastructure to support IPsec extended sequence numbers

This patch adds the struct xfrm_replay_state_esn which will be
used to support IPsec extended sequence numbers and anti replay windows
bigger than 32 packets. Also we add a function that returns the actual
size of the xfrm_replay_state_esn, a xfrm netlink atribute and a xfrm state
flag for the use of extended sequence numbers.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocrypto: authencesn - Add algorithm to handle IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:04:58 +0000 (00:04 +0000)]
crypto: authencesn - Add algorithm to handle IPsec extended sequence numbers

ESP with separate encryption/authentication algorithms needs a special
treatment for the associated data. This patch add a new algorithm that
handles esp with extended sequence numbers.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'tipc-Mar13-2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg...
David S. Miller [Mon, 14 Mar 2011 01:49:11 +0000 (18:49 -0700)]
Merge branch 'tipc-Mar13-2011' of git://git./linux/kernel/git/paulg/net-next-2.6

13 years agoipv4: Fix PMTU update.
Hiroaki SHIMODA [Wed, 9 Mar 2011 20:09:58 +0000 (20:09 +0000)]
ipv4: Fix PMTU update.

On current net-next-2.6, when Linux receives ICMP Type: 3, Code: 4
(Destination unreachable (Fragmentation needed)),

  icmp_unreach
    -> ip_rt_frag_needed
         (peer->pmtu_expires is set here)
    -> tcp_v4_err
         -> do_pmtu_discovery
              -> ip_rt_update_pmtu
                   (peer->pmtu_expires is already set,
                    so check_peer_pmtu is skipped.)
                   -> check_peer_pmtu

check_peer_pmtu is skipped and MTU is not updated.

To fix this, let check_peer_pmtu execute unconditionally.
And some minor fixes
1) Avoid potential peer->pmtu_expires set to be zero.
2) In check_peer_pmtu, argument of time_before is reversed.
3) check_peer_pmtu expects peer->pmtu_orig is initialized as zero,
   but not initialized.

Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotipc: Update maintenance information
Allan Stephens [Sun, 13 Mar 2011 20:44:07 +0000 (15:44 -0500)]
tipc: Update maintenance information

Updates TIPC maintenance information to reflect changes that have
taken place during TIPC 2.0 development, including:

- removal of directories that have been deleted
- removal of websites that have been decommisioned
- removal of sidestream SCM repositories that are no longer used
- addition of netdev as appropriate list for kernel code.

Grateful acknowledgement is given to Joe Perches <joe@perches.com>,
who reported the stale file entry that triggered the update.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate obsolete routine for handling routed messages
Allan Stephens [Fri, 11 Mar 2011 18:22:53 +0000 (13:22 -0500)]
tipc: Eliminate obsolete routine for handling routed messages

Eliminates a routine that is used in handling messages arriving from
another cluster or zone. Such messages can no longer be received by TIPC
now that multi-cluster and multi-zone network support has been eliminated.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate remaining support for routing table messages
Allan Stephens [Fri, 11 Mar 2011 18:09:28 +0000 (13:09 -0500)]
tipc: Eliminate remaining support for routing table messages

Gets rid of all remaining code relating to ROUTE_DISTRIBUTOR messages.
These messages were only used in multi-cluster and multi-zone networks,
which TIPC no longer supports. (For safety, TIPC now treats such messages
the same way that it handles other unrecognized messages.)

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Remove bearer flag indicating existence of broadcast address
Allan Stephens [Mon, 28 Feb 2011 16:47:36 +0000 (11:47 -0500)]
tipc: Remove bearer flag indicating existence of broadcast address

Eliminates the flag in the TIPC bearer structure that indicates if
the bearer supports broadcasting, since the flag is always set to 1
and serves no useful purpose.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Don't respond to neighbor discovery request on blocked bearer
Allan Stephens [Mon, 28 Feb 2011 16:04:08 +0000 (11:04 -0500)]
tipc: Don't respond to neighbor discovery request on blocked bearer

Adds a check to prevent TIPC from trying to respond to an incoming
LINK_CONFIG request message if the associated bearer is currently
prohibited from sending messages.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate unnecessary constant for neighbor discovery msg size
Allan Stephens [Mon, 28 Feb 2011 21:02:30 +0000 (16:02 -0500)]
tipc: Eliminate unnecessary constant for neighbor discovery msg size

Eliminates an unnecessary constant that defines the size of a LINK_CONFIG
message, and uses one of the existing standard message size symbols in
its place. (The defunct constant was located in the wrong place anyway,
since it was grouped with other constants that define message users instead
of message sizes.)

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Remove unused field in bearer structure
Allan Stephens [Mon, 28 Feb 2011 20:03:22 +0000 (15:03 -0500)]
tipc: Remove unused field in bearer structure

Eliminates a field in TIPC's bearer objects that is set, but never
referenced.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Correct misnamed references to neighbor discovery domain
Allan Stephens [Mon, 28 Feb 2011 19:56:15 +0000 (14:56 -0500)]
tipc: Correct misnamed references to neighbor discovery domain

Renames items that are improperly labelled as "network scope" items
(which are represented by simple integer values) rather than "network
domain" items (which are represented by <Z.C.N>-type network addresses).
This change is purely cosmetic, and does not affect the operation of TIPC.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Optimizations to link creation code
Allan Stephens [Mon, 28 Feb 2011 16:32:27 +0000 (11:32 -0500)]
tipc: Optimizations to link creation code

Enhances link creation code as follows:

1) Detects illegal attempts to add a requested link earlier in the
   link creation process. This prevents TIPC from wasting time
   initializing a link object it then throws away, and also eliminates
   the code needed to do the throwing away.

2) Passes in the node object associated with the requested link.
   This allows TIPC to eliminate a search to locate the node object,
   as well as code that attempted to create the node if it doesn't
   exist.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Give Tx of discovery responses priority over link messages
Allan Stephens [Mon, 28 Feb 2011 15:56:23 +0000 (10:56 -0500)]
tipc: Give Tx of discovery responses priority over link messages

Delay releasing the node lock when processing a neighbor discovery
message until after the optional discovery response message has been
sent. This helps ensure that any link protocol messages sent by a
link endpoint created as a result of a neighbor discovery request
are received after the discovery response is received, thereby
giving the receiving node a chance to create a peer link endpoint to
consume those link protocol messages, if one does not already exist.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Cosmetic changes to neighbor discovery logic
Allan Stephens [Mon, 28 Feb 2011 15:03:05 +0000 (10:03 -0500)]
tipc: Cosmetic changes to neighbor discovery logic

Reworks the appearance of the routine that processes incoming
LINK_CONFIG messages to keep the main logic flow at a consistent level
of indentation, and to add comments outlining the various phases involved
in processing each message. This rework is being done to allow upcoming
enhancements to this routine to be integrated more cleanly.

The diff isn't really readable, so know that it was a case of the
old code being like:

tipc_disc_recv_msg(..)
{
if (in_own_cluster(orig)) {
...
lines and lines of stuff
...
}
}

which is now replaced with the more sane:

tipc_disc_recv_msg(..)
{
if (!in_own_cluster(orig))
return;
...
lines and lines of stuff
...
}

Instances of spin locking within the reindented block were replaced with
the identical tipc_node_[un]lock() abstractions.  Note that all these
changes are cosmetic in nature, and do not change the way LINK_CONFIG
messages are processed.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Fix redundant link field handling in link protocol message
Allan Stephens [Mon, 28 Feb 2011 20:30:20 +0000 (15:30 -0500)]
tipc: Fix redundant link field handling in link protocol message

Ensures that the "redundant link exists" field of the LINK_PROTOCOL
messages sent by a link endpoint is set if and only if the sending
node has at least one other working link to the peer node. Previously,
the bit was set only if there were at least 2 working links to the peer
node, meaning the bit was incorrectly left unset in messages sent by a
non-working link endpoint when exactly one alternate working link was
available. The revised code now takes the state of the link sending
the message into account when deciding if an alternate link exists.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: make msg_set_redundant_link() consistent with other set ops
Allan Stephens [Mon, 28 Feb 2011 20:30:20 +0000 (15:30 -0500)]
tipc: make msg_set_redundant_link() consistent with other set ops

All the other boolean like msg_set_X(m) operations don't
export both a msg_set_X(a) and a msg_clear_X(m), but instead
just have the single msg_set_X(m, val) variant.

Make the redundant_link one consistent by having the set take
a value, and delete the msg_clear_redundant_link() anomoly.
This is a cosmetic change and should not change behaviour.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: cosmetic - function names are not to be full sentences
Paul Gortmaker [Mon, 28 Feb 2011 15:36:21 +0000 (11:36 -0400)]
tipc: cosmetic - function names are not to be full sentences

Function names like "tipc_node_has_redundant_links" are unweildy
and result in long lines even for simple lines.  The "has" doesn't
contribute any value add, so dropping that is a slight step in the
right direction.   This is a cosmetic change, basic result of:

for i in `grep -l tipc_node_has_ *` ; do sed -i s/tipc_node_has_/tipc_node_/ $i ; done

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate timestamp from link protocol messages
Allan Stephens [Sun, 27 Feb 2011 19:43:52 +0000 (14:43 -0500)]
tipc: Eliminate timestamp from link protocol messages

Removes support for the timestamp field of TIPC's link protocol messages.

This field was previously used to hold an OS-dependent timestamp value
that was used to assist in debugging early versions of TIPC. The field
has now been deemed unnecessary and has been removed from the latest TIPC
specification. This change has no impact on the operation of TIPC since
the field was set by TIPC, but never referenced.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: manually inline net_start/stop, make assoc. vars static
Allan Stephens [Sat, 26 Feb 2011 00:11:25 +0000 (19:11 -0500)]
tipc: manually inline net_start/stop, make assoc. vars static

Relocates network-related variables into the subsystem files where
they are now primarily used (following the recent rework of TIPC's
node table), and converts globals into locals where possible. Changes
the initialization of tipc_num_links from run-time to compile-time,
and eliminates the net_start routine that becomes empty as a result.
Also eliminates the corresponding net_stop routine by moving its
(trivial) content into the one location that called the routine.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Convert node object array to a hash table
Allan Stephens [Fri, 25 Feb 2011 23:42:52 +0000 (18:42 -0500)]
tipc: Convert node object array to a hash table

Replaces the dynamically allocated array of pointers to the cluster's
node objects with a static hash table. Hash collisions are resolved
using chaining, with a typical hash chain having only a single node,
to avoid degrading performance during processing of incoming packets.
The conversion to a hash table reduces the memory requirements for
TIPC's node table to approximately the same size it had prior to
the previous commit.

In addition to the hash table itself, TIPC now also maintains a
linked list for the node objects, sorted by ascending network address.
This list allows TIPC to continue sending responses to user space
applications that request node and link information in sorted order.
The list also improves performance when name table update messages are
sent by making it easier to identify the nodes that must be notified.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate configuration for maximum number of cluster nodes
Allan Stephens [Fri, 25 Feb 2011 19:22:11 +0000 (14:22 -0500)]
tipc: Eliminate configuration for maximum number of cluster nodes

Gets rid of the need for users to specify the maximum number of
cluster nodes supported by TIPC. TIPC now automatically provides
support for all 4K nodes allowed by its addressing scheme.

Note: This change sets TIPC's memory usage to the amount used by
a maximum size node table with 4K entries.  An upcoming patch that
converts the node table from a linear array to a hash table will
compact the node table to a more efficient design, but for clarity
it is nice to have all the Kconfig infrastruture go away separately.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Split up unified structure of network-related variables
Allan Stephens [Fri, 25 Feb 2011 15:01:58 +0000 (10:01 -0500)]
tipc: Split up unified structure of network-related variables

Converts the fields of the global "tipc_net" structure into individual
variables.  Since the struct was never referenced as a complete unit,
its existence was pointless.  This will facilitate upcoming changes to
TIPC's node table and simpify upcoming relocation of the variables so
they are only visible to the files that actually use them.

This change is essentially cosmetic in nature, and doesn't affect the
operation of TIPC.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Fix problem with missing link in "tipc-config -l" output
Allan Stephens [Thu, 24 Feb 2011 18:20:20 +0000 (13:20 -0500)]
tipc: Fix problem with missing link in "tipc-config -l" output

Removes a race condition that could cause TIPC's internal counter
of the number of links it has to neighboring nodes to have the
incorrect value if two independent threads of control simultaneously
create new link endpoints connecting to two different nodes using two
different bearers. Such under counting would result in TIPC failing to
list the final link(s) in its response to a configuration request to
list all of the node's links. The counter is now updated atomically
to ensure that simultaneous increments do not interfere with each
other.

Thanks go to Peter Butler <pbutler@pt.com> for his assistance in
diagnosing and fixing this problem.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Add support for SO_RCVTIMEO socket option
Allan Stephens [Wed, 23 Feb 2011 19:52:14 +0000 (14:52 -0500)]
tipc: Add support for SO_RCVTIMEO socket option

Adds support for the SO_RCVTIMEO socket option to TIPC's socket
receive routines.

Thanks go out to Raj Hegde <rajenhegde@yahoo.ca> for his contribution
to the development and testing this enhancement.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Cosmetic changes to node subscription code
Allan Stephens [Wed, 23 Feb 2011 19:13:41 +0000 (14:13 -0500)]
tipc: Cosmetic changes to node subscription code

Relocates the code that notifies users of node subscriptions so that
it is adjacent to the rest of the routines that implement TIPC's node
subscription capability. Renames the name table routine that is
invoked by a node subscription to better reflect its purpose and to
be consistent with other, similar name table routines.

These changes are cosmetic in nature, and do not alter the behavior
of TIPC.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Prevent null pointer error when removing a node subscription
Allan Stephens [Wed, 23 Feb 2011 18:51:15 +0000 (13:51 -0500)]
tipc: Prevent null pointer error when removing a node subscription

Prevents a null pointer dereference from occurring if a node subscription
is triggered at the same time that the subscribing port or publication is
terminating the subscription. The problem arises if the triggering routine
asynchronously activates and deregisters the node subscription while
deregistration is already underway -- the deregistration routine may find
that the pointer it has just verified to be non-NULL is now NULL.
To avoid this race condition the triggering routine now simply marks the
node subscription as defunct (to prevent it from re-activating)
instead of deregistering it. The subscription is now both deregistered
and destroyed only when the subscribing port or publication code terminates
the node subscription.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Add network address mask helper routines
Allan Stephens [Wed, 23 Feb 2011 16:44:49 +0000 (11:44 -0500)]
tipc: Add network address mask helper routines

Introduces a pair of helper routines that convert the network address
for a TIPC node into the network address for its cluster or zone.

This is a cosmetic change designed to avoid future errors caused by
the incorrect use of address bitmasks, and does not alter the existing
operation of TIPC.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Correct broadcast link peer info when displaying links
Allan Stephens [Mon, 21 Feb 2011 14:45:31 +0000 (09:45 -0500)]
tipc: Correct broadcast link peer info when displaying links

Fixes a typo in the calculation of the network address of a node's own
cluster when generating a response to the configuration command that
lists all of the node's links. The correct mask value for a <Z.C.N>
network address uses 1's for the 8-bit zone and 12-bit cluster parts
and 0's for the 12-bit node part.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Allow receiving into iovec containing multiple entries
Allan Stephens [Mon, 21 Feb 2011 14:45:40 +0000 (09:45 -0500)]
tipc: Allow receiving into iovec containing multiple entries

Enhances TIPC's socket receive routines to support iovec structures
containing more than a single entry. This change leverages existing
sk_buff routines to do most of the work; the only significant change
to TIPC itself is that an sk_buff now records how much data has been
already consumed as an numeric offset, rather than as a pointer to
the first unread data byte.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agodecnet: Convert to use flowidn where applicable.
David S. Miller [Sat, 12 Mar 2011 22:17:10 +0000 (17:17 -0500)]
decnet: Convert to use flowidn where applicable.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Put fl6_* macros to struct flowi6 and use them again.
David S. Miller [Sat, 12 Mar 2011 21:36:19 +0000 (16:36 -0500)]
net: Put fl6_* macros to struct flowi6 and use them again.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Convert to use flowi6 where applicable.
David S. Miller [Sat, 12 Mar 2011 21:22:43 +0000 (16:22 -0500)]
ipv6: Convert to use flowi6 where applicable.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Put fl4_* macros to struct flowi4 and use them again.
David S. Miller [Sat, 12 Mar 2011 08:00:33 +0000 (03:00 -0500)]
net: Put fl4_* macros to struct flowi4 and use them again.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Kill fib_semantic_match declaration from fib_lookup.h
David S. Miller [Sat, 12 Mar 2011 07:44:16 +0000 (02:44 -0500)]
ipv4: Kill fib_semantic_match declaration from fib_lookup.h

This function no longer exists.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Use flowi4 and flowi6 in xfrm layer.
David S. Miller [Sat, 12 Mar 2011 07:42:11 +0000 (02:42 -0500)]
net: Use flowi4 and flowi6 in xfrm layer.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add flowi6_* member helper macros.
David S. Miller [Sat, 12 Mar 2011 07:30:50 +0000 (02:30 -0500)]
net: Add flowi6_* member helper macros.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: Use flowi4 and flowi6 in xt_TCPMSS
David S. Miller [Sat, 12 Mar 2011 07:16:48 +0000 (02:16 -0500)]
netfilter: Use flowi4 and flowi6 in xt_TCPMSS

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: Use flowi4 and flowi6 in nf_conntrack_h323_main
David S. Miller [Sat, 12 Mar 2011 07:14:05 +0000 (02:14 -0500)]
netfilter: Use flowi4 and flowi6 in nf_conntrack_h323_main

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4 in UDP
David S. Miller [Sat, 12 Mar 2011 07:09:18 +0000 (02:09 -0500)]
ipv4: Use flowi4 in UDP

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: Use flowi4 in nf_nat_standalone.c
David S. Miller [Sat, 12 Mar 2011 07:06:33 +0000 (02:06 -0500)]
netfilter: Use flowi4 in nf_nat_standalone.c

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4 in ipmr code.
David S. Miller [Sat, 12 Mar 2011 07:04:50 +0000 (02:04 -0500)]
ipv4: Use flowi4 in ipmr code.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4 in FIB layer.
David S. Miller [Sat, 12 Mar 2011 07:02:42 +0000 (02:02 -0500)]
ipv4: Use flowi4 in FIB layer.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4 in public route lookup interfaces.
David S. Miller [Sat, 12 Mar 2011 06:12:47 +0000 (01:12 -0500)]
ipv4: Use flowi4 in public route lookup interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use struct flowi4 internally in routing lookups.
David S. Miller [Sat, 12 Mar 2011 01:07:33 +0000 (20:07 -0500)]
ipv4: Use struct flowi4 internally in routing lookups.

We will change the externally visible APIs next.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Pass ipv4 flow objects into fib_lookup() paths.
David S. Miller [Sat, 12 Mar 2011 00:54:08 +0000 (19:54 -0500)]
ipv4: Pass ipv4 flow objects into fib_lookup() paths.

To start doing these conversions, we need to add some temporary
flow4_* macros which will eventually go away when all the protocol
code paths are changed to work on AF specific flowi objects.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add flowiX_to_flowi() shorthands.
David S. Miller [Sat, 12 Mar 2011 00:23:02 +0000 (19:23 -0500)]
net: Add flowiX_to_flowi() shorthands.

This is just a shorthand which will help in passing around AF
specific flow structures as generic ones.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Break struct flowi out into AF specific instances.
David S. Miller [Sat, 12 Mar 2011 05:44:35 +0000 (00:44 -0500)]
net: Break struct flowi out into AF specific instances.

Now we have struct flowi4, flowi6, and flowidn for each address
family.  And struct flowi is just a union of them all.

It might have been troublesome to convert flow_cache_uli_match() but
as it turns out this function is completely unused and therefore can
be simply removed.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Make flowi ports AF dependent.
David S. Miller [Sat, 12 Mar 2011 05:43:55 +0000 (00:43 -0500)]
net: Make flowi ports AF dependent.

Create two sets of port member accessors, one set prefixed by fl4_*
and the other prefixed by fl6_*

This will let us to create AF optimal flow instances.

It will work because every context in which we access the ports,
we have to be fully aware of which AF the flowi is anyways.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Create union flowi_uli
David S. Miller [Fri, 11 Mar 2011 23:36:42 +0000 (18:36 -0500)]
net: Create union flowi_uli

This will be used when we have seperate flowi types.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Create struct flowi_common
David S. Miller [Fri, 11 Mar 2011 23:22:00 +0000 (18:22 -0500)]
net: Create struct flowi_common

Pull out the AF independent members of struct flowi into a
new struct flowi_common

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Put flowi_* prefix on AF independent members of struct flowi
David S. Miller [Sat, 12 Mar 2011 05:29:39 +0000 (00:29 -0500)]
net: Put flowi_* prefix on AF independent members of struct flowi

I intend to turn struct flowi into a union of AF specific flowi
structs.  There will be a common structure that each variant includes
first, much like struct sock_common.

This is the first step to move in that direction.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Eliminate "fl" and "pol" args to xfrm_bundle_ok().
David S. Miller [Fri, 11 Mar 2011 20:59:31 +0000 (15:59 -0500)]
xfrm: Eliminate "fl" and "pol" args to xfrm_bundle_ok().

There is only one caller of xfrm_bundle_ok(), and that always passes these
parameters as NULL.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Remove unnecessary padding in struct flowi
David S. Miller [Fri, 11 Mar 2011 20:55:37 +0000 (15:55 -0500)]
net: Remove unnecessary padding in struct flowi

Move tos, scope, proto, and flags to the beginning of
the structure.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Create and use route lookup helpers.
David S. Miller [Sat, 12 Mar 2011 05:00:52 +0000 (00:00 -0500)]
ipv4: Create and use route lookup helpers.

The idea here is this minimizes the number of places one has to edit
in order to make changes to how flows are defined and used.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Sat, 12 Mar 2011 22:41:02 +0000 (14:41 -0800)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6

13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Sat, 12 Mar 2011 19:06:59 +0000 (11:06 -0800)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6

13 years agoixgbe: DCB, PFC not cleared until reset occurs
John Fastabend [Thu, 10 Mar 2011 12:06:12 +0000 (12:06 +0000)]
ixgbe: DCB, PFC not cleared until reset occurs

The PFC configuration is not cleared until the device is reset. This
has not been a problem because setting DCB attributes forced a
hardware reset. Now that we no longer require this reset to occur
PFC remains configured even after being disabled until the
device is reset.

This removes a goto in the PFC hardware set routines for 82598 and
82599 devices that was short circuiting the clear.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: add support for VF Transmit rate limit using iproute2
Lior Levy [Fri, 11 Mar 2011 02:03:07 +0000 (02:03 +0000)]
ixgbe: add support for VF Transmit rate limit using iproute2

Implemented ixgbe_ndo_set_vf_bw function which is being used by iproute2
tool. In addition, updated ixgbe_ndo_get_vf_config function to show the
actual rate limit to the user.

The rate limitation can be configured only when the link is up and the
link speed is 10Gb.
The rate limit value can be 0 or ranged between 11 and actual link
speed measured in Mbps. A value of '0' disables the rate limit for
this specific VF.

iproute2 usage will be 'ip link set ethX vf Y rate Z'.
After the command is made, the rate will be changed instantly.
To view the current rate limit, use 'ip link show ethX'.

The rates will be zeroed only upon driver reload or a link speed change.

This feature is being supported by 82599 and X540 devices.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, set minimum bandwidth per traffic class
John Fastabend [Wed, 9 Mar 2011 04:46:16 +0000 (04:46 +0000)]
ixgbe: DCB, set minimum bandwidth per traffic class

DCB provides a guaranteed bandwidth in the case with 0%
bandwidth then no bandwidth is guaranteed. However the
traffic class should still be able to transmit traffic.
For this to work the traffic class must be given the
minimum credits required to send a frame.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: correct typo in define name
Emil Tantilov [Sat, 5 Mar 2011 08:02:18 +0000 (08:02 +0000)]
ixgbe: correct typo in define name

VF Free Running Timer register name missing an F.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: update PHY code to support 100Mbps as well as 1G/10G
Emil Tantilov [Sat, 5 Mar 2011 01:28:07 +0000 (01:28 +0000)]
ixgbe: update PHY code to support 100Mbps as well as 1G/10G

This change updates the PHY setup code to support 100Mbps capable PHYs
as well as 10G and 1Gbps.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: remove timer reset to 0 on timeout
Emil Tantilov [Fri, 4 Mar 2011 03:20:59 +0000 (03:20 +0000)]
ixgbe: remove timer reset to 0 on timeout

The VF mailbox polling for acks and messages would reset the timer to zero
on a timeout. Under heavy load a timeout may actually occur without being
the result of an error and when this occurs it is not practical to perform
a full VF driver reset on every message timeout. Instead, just return an
error (which is already done) and the VF driver will have an opportunity
to retry the operation.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB during ifup use correct CEE or IEEE mode
John Fastabend [Wed, 23 Feb 2011 05:58:25 +0000 (05:58 +0000)]
ixgbe: DCB during ifup use correct CEE or IEEE mode

DCB settings are cleared in the hardware across link events
during ifup ixgbe reprograms the hardware for DCB if it is
enabled. Now that we have two modes CEE or IEEE we need to
use the correct set of configuration data.

This patch checks the dcbx_cap bits and then enables the
device in the correct mode.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: IEEE 802.1Qaz, implement priority assignment table
John Fastabend [Wed, 23 Feb 2011 05:58:19 +0000 (05:58 +0000)]
ixgbe: IEEE 802.1Qaz, implement priority assignment table

This patch adds support to use the priority assignment
table in the ieee_ets structure to map priorities to
traffic classes. Previously ixgbe only supported a
1:1 mapping. Now we can enable and disable hardware
DCB support when multiple traffic classes are actually
being used. This allows the default case all priorities
mapped to traffic class 0 to work in normal hardware
mode and utilize the full packet buffer.

This patch does not address putting the hardware in
4TC mode so packet buffer space may be underutilized
in this case. A follow up patch can address this
optimization. But at least we have the hooks to do
this now.

Also CEE will behave as it always has and map priorities
1:1 with traffic classes.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, missed translation from 8021Qaz TSA to CEE link strict
John Fastabend [Wed, 23 Feb 2011 05:58:14 +0000 (05:58 +0000)]
ixgbe: DCB, missed translation from 8021Qaz TSA to CEE link strict

The patch below  allowed IEEE 802.1Qaz and CEE DCB hardware
configurations to use common hardware set routines,

commit 88eb696cc6a7af8f9272266965b1a4dd7d6a931b
Author: John Fastabend <john.r.fastabend@intel.com>
Date:   Thu Feb 10 03:02:11 2011 -0800

    ixgbe: DCB, abstract out dcb_config from DCB hardware configuration

However the case when CEE link strict and group strict
are set was missed and are currently being mapped
incorrectly in some configurations.

This patch resolves this.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB: enable RSS to be used with DCB
John Fastabend [Wed, 23 Feb 2011 05:58:08 +0000 (05:58 +0000)]
ixgbe: DCB: enable RSS to be used with DCB

RSS had previously been disabled when DCB was enabled because
DCB was single queued per traffic class. Now that DCB implements
multiple Tx/Rx rings per traffic class enable RSS.

Here RSS hashes across the queues in the traffic class.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain.@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: enable ndo_tc_setup
John Fastabend [Wed, 23 Feb 2011 05:58:03 +0000 (05:58 +0000)]
ixgbe: enable ndo_tc_setup

This patch adds the ndo_tc_setup to ixgbe. By default we set
the device to use strict priority.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain.@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, use multiple Tx rings per traffic class
John Fastabend [Tue, 8 Mar 2011 03:44:52 +0000 (03:44 +0000)]
ixgbe: DCB, use multiple Tx rings per traffic class

This enables multiple {Tx|Rx} rings per traffic class while in DCB
mode. In order to get this working as expected the tc_to_tx net
device mapping is configured as well as the prio_tc_map.

skb priorities are mapped across a range of queue pairs to get
a distribution per traffic class. The maximum number of
queue pairs used while in DCB mode is capped at 64. The hardware
max is actually 128 queues but 64 is sufficient for now and
allocating more seemed a bit excessive. It is easy enough to
increase the cap later if need be.

To get the 802.1Q priority tags inserted correctly ixgbe was
previously using the skb queue_mapping field to directly set
the 802.1Q priority. This no longer works because we have removed
the 1:1 mapping between queues and traffic class. Each ring
is aligned with an 802.1Qaz traffic class so here we add an
extra field to the ring struct to identify the 802.1Q traffic
class. This uses an extra byte of the ixgbe_ring struct
fortunately there was a 2byte hole,

struct ixgbe_ring {
        void *                     desc;                 /*     0     8 */
        struct device *            dev;                  /*     8     8 */
        struct net_device *        netdev;               /*    16     8 */
        union {
                struct ixgbe_tx_buffer * tx_buffer_info; /*           8 */
                struct ixgbe_rx_buffer * rx_buffer_info; /*           8 */
        };                                               /*    24     8 */
        long unsigned int          state;                /*    32     8 */
        u8                         atr_sample_rate;      /*    40     1 */
        u8                         atr_count;            /*    41     1 */
        u16                        count;                /*    42     2 */
        u16                        rx_buf_len;           /*    44     2 */
        u16                        next_to_use;          /*    46     2 */
        u16                        next_to_clean;        /*    48     2 */
        u8                         queue_index;          /*    50     1 */
        u8                         reg_idx;              /*    51     1 */
        u16                        work_limit;           /*    52     2 */

        /* XXX 2 bytes hole, try to pack */

        u8 *                       tail;                 /*    56     8 */
        /* --- cacheline 1 boundary (64 bytes) --- */

Now we can set the VLAN priority directly and it will be
correct. User space can indicate the 802.1Qaz priority
using the SO_PRIORITY setsocket() option and QOS layer will
steer the skb to the correct rings. Additionally using
the multiq qdisc with a queue_mapping action works as
well.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB remove ixgbe_fcoe_getapp routine
John Fastabend [Wed, 23 Feb 2011 05:57:52 +0000 (05:57 +0000)]
ixgbe: DCB remove ixgbe_fcoe_getapp routine

Remove ixgbe_fcoe_getapp() and use the generic kernel
routine instead. Also add application priority to the
kernel maintained list on setapp so applications and
stacks can query the value.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, implement ieee_setapp dcbnl ops
John Fastabend [Wed, 23 Feb 2011 05:57:47 +0000 (05:57 +0000)]
ixgbe: DCB, implement ieee_setapp dcbnl ops

Implement ieee_setapp dcbnl ops in ixgbe. This is required
to setup FCoE which requires dedicated resources. If the
app data is not for FCoE then no action is taken in ixgbe
except to add it to the dcb_app_list.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, implement capabilities flags
John Fastabend [Tue, 1 Mar 2011 05:25:35 +0000 (05:25 +0000)]
ixgbe: DCB, implement capabilities flags

This implements dcbnl get and set capabilities ops. The
devices supported by ixgbe can be configured to run in
IEEE or CEE modes but not both.

With the DCBX set capabilities bit we add an explicit
signal that must be used to toggle between these modes.
This patch adds logic to fail the CEE command set_hw_all()
which programs the device with a CEE configuration if
the CEE caps bit is not set. Similarly, IEEE set
commands will fail if the IEEE caps bit is not set. We
allow most CEE config set commands to occur because they
do not touch the hardware until set_hw_all() is called.

The one exception to the above is the {set|get}app routines.
These must always be protected by caps bits to ensure
side effects do not corrupt the current configured mode.

By requiring the caps bit to be set correctly we can
maintain a consistent configuration in the hardware
for CEE or IEEE modes and prevent partial hardware
configurations that may occur if user space does
not send a complete IEEE or CEE configurations.

It is expected that user space will signal a DCBX mode
before programming device.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: Bump version to 3.0.6
Carolyn Wyborny [Sat, 12 Mar 2011 04:58:19 +0000 (20:58 -0800)]
igb: Bump version to 3.0.6

This patch updates igb version to 3.0.6.

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>
13 years agoigb: Add DMA Coalescing feature to driver
Carolyn Wyborny [Sat, 12 Mar 2011 04:43:54 +0000 (20:43 -0800)]
igb: Add DMA Coalescing feature to driver

This patch add DMA Coalescing which is a power-saving feature that
coalesces DMA writes in order to stay in a low-power state as much
as possible.  Feature is disabled by default.

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>
13 years agoigb: Update NVM functions to work with i350 devices
Carolyn Wyborny [Sat, 12 Mar 2011 04:43:18 +0000 (20:43 -0800)]
igb: Update NVM functions to work with i350 devices

This patch adds functions and functions pointers to accommodate
differences between NVM interfaces and options for i350 devices,
82580 devices and the rest.

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>
13 years agoigb: Add Energy Efficient Ethernet (EEE) for i350 devices.
Carolyn Wyborny [Sat, 12 Mar 2011 04:42:13 +0000 (20:42 -0800)]
igb: Add Energy Efficient Ethernet (EEE) for i350 devices.

This patch adds the EEE feature for i350 devices, enabled by default.

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>
13 years agoixgbevf: Fix Driver String
Greg Rose [Sat, 12 Mar 2011 02:01:29 +0000 (02:01 +0000)]
ixgbevf: Fix Driver String

Change the driver string to match the PF driver string format.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbevf: Fix Version String
Greg Rose [Wed, 2 Mar 2011 06:52:30 +0000 (06:52 +0000)]
ixgbevf: Fix Version String

The kernel version string is off by a major version number since
new silicon was just introduced and also uses the wrong format for
the version postfix.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoath5k: implement ieee80211_ops->{get,set}_ringparam
John W. Linville [Mon, 7 Mar 2011 21:32:59 +0000 (16:32 -0500)]
ath5k: implement ieee80211_ops->{get,set}_ringparam

set_ringparam only allows changes to tx ring at this time.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: implement support for cfg80211_ops->{get,set}_ringparam
John W. Linville [Mon, 7 Mar 2011 21:19:18 +0000 (16:19 -0500)]
mac80211: implement support for cfg80211_ops->{get,set}_ringparam

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: add support for ethtool_ops->{get,set}_ringparam
John W. Linville [Mon, 7 Mar 2011 21:17:59 +0000 (16:17 -0500)]
wireless: add support for ethtool_ops->{get,set}_ringparam

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: support off-channel TX
Johannes Berg [Fri, 11 Mar 2011 04:13:26 +0000 (20:13 -0800)]
iwlagn: support off-channel TX

Add support to iwlagn for off-channel TX. The
microcode API for this is a bit strange in that
it uses a hacked-up scan command, so the scan
code needs to change quite a bit to accomodate
that and be able to send it out.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: do not enable ps if 802.1x controlled port is unblocked
Jason Young [Fri, 11 Mar 2011 00:43:19 +0000 (16:43 -0800)]
mac80211: do not enable ps if 802.1x controlled port is unblocked

If dynamic_ps is disabled, enabling power save before the 4-way
handshake completes may delay the station from being authorized to
send/receive traffic, i.e. increase roaming times. It also may result in
a failed 4-way handshake depending on the AP's timing requirements and
beacon interval, and the station's listen interval.

To fix this, prevent power save from being enabled while the station
isn't authorized and recalculate power save whenever the station's
authorized state changes.

Signed-off-by: Jason Young <a.young.jason@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: fix write past end of array in mesh_id_get()
Dan Carpenter [Thu, 10 Mar 2011 15:23:26 +0000 (18:23 +0300)]
libertas: fix write past end of array in mesh_id_get()

defs.meshie.val.mesh_id is 32 chars long.  It's not supposed to be NUL
terminated.  This code puts a terminator on the end to make it easier to
print to sysfs.  The problem is that if the mesh_id fills the entire
buffer the original code puts the terminator one spot past the end.

The way the original code was written, there was a check to make sure
that maxlen was less than PAGE_SIZE.  Since we know that maxlen is at
most 34 chars, I just removed the check.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Increase the wait count for nf load.
Vivek Natarajan [Thu, 10 Mar 2011 05:35:43 +0000 (11:05 +0530)]
ath9k_hw: Increase the wait count for nf load.

Increasing the wait count makes the nf load pass in
most of the cases.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix PLL initialization for AR9485.
Vivek Natarajan [Thu, 10 Mar 2011 05:35:42 +0000 (11:05 +0530)]
ath9k_hw: Fix PLL initialization for AR9485.

Increase the delay to make sure the initialization of pll
passes.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Improve idle power consumption for AR9485.
Vivek Natarajan [Thu, 10 Mar 2011 05:35:41 +0000 (11:05 +0530)]
ath9k_hw: Improve idle power consumption for AR9485.

Set some GPIO pins to Pull-down mode to save power.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove support for the FIF_PROMISC_IN_BSS filter flag
Felix Fietkau [Wed, 9 Mar 2011 00:48:12 +0000 (01:48 +0100)]
ath9k: remove support for the FIF_PROMISC_IN_BSS filter flag

The hardware rx filter flag triggered by FIF_PROMISC_IN_BSS is overly broad
and covers even frames with PHY errors. When this flag is enabled, this message
shows up frequently during scanning or hardware resets:

ath: Could not stop RX, we could be confusing the DMA engine when we start RX up

Since promiscuous mode is usually not particularly useful, yet enabled by
default by bridging (either used normally in 4-addr mode, or with hacks
for various virtualization software), we should sacrifice it for better
reliability during normal operation.

This patch leaves it enabled if there are active monitor mode interfaces, since
it's very useful for debugging.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl1251: fix elp_work race condition
Grazvydas Ignotas [Sun, 6 Mar 2011 17:23:37 +0000 (19:23 +0200)]
wl1251: fix elp_work race condition

While working on PS I've noticed elp_work is kicking rather often, and
sometimes the chip is put to sleep before 5ms delay expires. This
seems to happen because by the time wl1251_ps_elp_wakeup is called
elp_work might still be pending. After wakeup is done, the processing
may take some time, during which 5ms might expire and elp_work might
get scheduled. In this case, ss soon as 1st thread finishes work and
releases the mutex, elp_work will then put the device to sleep without
5ms delay. In addition 1st thread will queue additional elp_work
needlessly.

Fix this by cancelling work in wl1251_ps_elp_wakeup instead.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl1251: remove wl1251_ps_set_elp function
Grazvydas Ignotas [Sun, 6 Mar 2011 17:23:36 +0000 (19:23 +0200)]
wl1251: remove wl1251_ps_set_elp function

wl1251_ps_set_elp() only does acx_sleep_auth call and takes the chip
from/to ELP, however all callers of wl1251_ps_set_mode() have already
taken the chip out of ELP and puts it back to ELP when they finish.
This makes ELP calls (and register writes they result in) superfluous.

So remove wl1251_ps_set_elp function and call acx_sleep_auth directly.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.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 [Fri, 11 Mar 2011 19:11:11 +0000 (14:11 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6 into for-davem

13 years agoe1000e: bump version number
Bruce Allan [Sat, 26 Feb 2011 03:12:19 +0000 (03:12 +0000)]
e1000e: bump version number

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: do not suggest the driver supports Wake-on-ARP
Bruce Allan [Fri, 4 Mar 2011 09:07:01 +0000 (09:07 +0000)]
e1000e: do not suggest the driver supports Wake-on-ARP

The driver doesn't support Wake-on-ARP, so don't advertise through ethtool
that it does.

Cleanup some coding style issues in the same functions.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>