Commit graph android_kernel_sony_sdm845/include/net
Message SHA1
xfrm: Handle blackhole route creation via afinfo.
That way we don't have to potentially do this in every xfrm_lookup()
caller.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-01 14:59:04 -08:00
2774c131b1
ipv6: Normalize arguments to ip6_dst_blackhole().
Return a dst pointer which is potentitally error encoded.

Don't pass original dst pointer by reference, pass a struct net
instead of a socket, and elide the flow argument since it is
unnecessary.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-01 14:45:33 -08:00
69ead7afdf
xfrm: Kill XFRM_LOOKUP_WAIT flag.
This can be determined from the flow flags instead.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-01 14:36:37 -08:00
80c0bc9e37
ipv6: Change final dst lookup arg name to "can_sleep"
Since it indicates whether we are invoked from a sleepable
context or not.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-01 14:32:04 -08:00
a1414715f0
ipv4: Kill can_sleep arg to ip_route_output_flow()
This boolean state is now available in the flow flags.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-01 14:27:04 -08:00
273447b352
net: Add FLOWI_FLAG_CAN_SLEEP.
And set is in contexts where the route resolution can sleep.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-01 14:22:19 -08:00
5df65e5567
ipv4: Make final arg to ip_route_output_flow to be boolean "can_sleep"
Since that is what the current vague "flags" argument means.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-01 14:19:23 -08:00
420d44daa7
ipv4: Can final ip_route_connect() arg to boolean "can_sleep".
Since that's what the current vague "flags" thing means.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-01 14:15:24 -08:00
abdf7e7239
ipv6: Consolidate route lookup sequences.
Route lookups follow a general pattern in the ipv6 code wherein
we first find the non-IPSEC route, potentially override the
flow destination address due to ipv6 options settings, and then
finally make an IPSEC search using either xfrm_lookup() or
__xfrm_lookup().

__xfrm_lookup() is used when we want to generate a blackhole route
if the key manager needs to resolve the IPSEC rules (in this case
-EREMOTE is returned and the original 'dst' is left unchanged).

Otherwise plain xfrm_lookup() is used and when asynchronous IPSEC
resolution is necessary, we simply fail the lookup completely.

All of these cases are encapsulated into two routines,
ip6_dst_lookup_flow and ip6_sk_dst_lookup_flow.  The latter of which
handles unconnected UDP datagram sockets.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-01 13:19:07 -08:00
68d0c6d34d
udp: Switch to ip_finish_skb
This patch converts UDP to use the new ip_finish_skb API.  This
would then allows us to more easily use ip_make_skb which allows
UDP to run without a socket lock.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Herbert Xu   authored and   David S. Miller   commited 2011-03-01 12:35:03 -08:00
f6b9664f8b
inet: Add ip_make_skb and ip_finish_skb
This patch adds the helper ip_make_skb which is like ip_append_data
and ip_push_pending_frames all rolled into one, except that it does
not send the skb produced.  The sending part is carried out by
ip_send_skb, which the transport protocol can call after it has
tweaked the skb.

It is meant to be called in cases where corking is not used should
have a one-to-one correspondence to sendmsg.

This patch also adds the helper ip_finish_skb which is meant to
be replace ip_push_pending_frames when corking is required.
Previously the protocol stack would peek at the socket write
queue and add its header to the first packet.  With ip_finish_skb,
the protocol stack can directly operate on the final skb instead,
just like the non-corking case with ip_make_skb.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Herbert Xu   authored and   David S. Miller   commited 2011-03-01 12:35:03 -08:00
1c32c5ad6f
inet: Remove explicit write references to sk/inet in ip_append_data
In order to allow simultaneous calls to ip_append_data on the same
socket, it must not modify any shared state in sk or inet (other
than those that are designed to allow that such as atomic counters).

This patch abstracts out write references to sk and inet_sk in
ip_append_data and its friends so that we may use the underlying
code in parallel.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Herbert Xu   authored and   David S. Miller   commited 2011-03-01 12:35:02 -08:00
1470ddf7f8
cfg80211: add a field for the bitrate of the last rx data packet from a station
Also fix a typo in the STATION_INFO_TX_BITRATE description

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

Felix Fietkau   authored and   John W. Linville   commited 2011-03-01 13:48:21 -05:00
c8dcfd8a04
xfrm: Pass const xfrm_mark to xfrm_mark_put().
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-27 23:20:19 -08:00
e3dfa389fd
xfrm: Pass const xfrm_address_t objects to xfrm_state_lookup* and xfrm_find_acq.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-27 23:17:24 -08:00
a70486f0e6
xfrm: Pass const arg to xfrm_alg_len and xfrm_alg_auth_len.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-27 23:07:02 -08:00
851586218f
xfrm: Pass name as const to xfrm_*_get_byname().
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-27 23:04:45 -08:00
6f2f19ed95
Bluetooth: Move index to common header in management interface
Most mgmt commands and event are related to hci adapter. Moving index to
common header allow to easily use it in command status while reporting errors.
For those not related to adapter use MGMT_INDEX_NONE (0xFFFF) as index.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Acked-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>

Szymon Janc   authored and   Gustavo F. Padovan   commited 2011-02-27 16:56:41 -03:00
4e51eae9cd
mac80211: support direct offchannel TX offload
For devices supported by iwlwifi sometimes
off-channel transmissions need to be handled
by the device completely. To support this
mac80211 needs to pass the frame directly
to the driver and not through the TX path
as the driver needs the frame and channel
information at the same time.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

Johannes Berg   authored and   John W. Linville   commited 2011-02-25 15:33:40 -05:00
5f16a43617
mac80211: make tx() operation return void
The return value of the tx operation is commonly
misused by drivers, leading to errors. All drivers
will drop frames if they fail to TX the frame, and
they must also properly manage the queues (if they
didn't, mac80211 would already warn).

Removing the ability for drivers to return a BUSY
value also allows significant cleanups of the TX
TX handling code in mac80211.

Note that this also fixes a bug in ath9k_htc, the
old "return -1" there was wrong.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k]
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00]
Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi]
Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx]
Signed-off-by: John W. Linville <linville@tuxdriver.com>

Johannes Berg   authored and   John W. Linville   commited 2011-02-25 15:32:34 -05:00
7bb4568372
Phonet: fix flawed "SYN/ACK" logic
* Do not fail if the peer supports more or less than 3 algorithms.
 * Ignore unknown congestion control algorithms instead of failing.
 * Simplify congestion algorithm negotiation (largest is best).
 * Do not use a static buffer.
 * Fix off-by-two read overflow.
 * Avoid extra memory copy (in addition to skb_copy_bits()).

The previous code really made no sense.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Rémi Denis-Courmont   authored and   David S. Miller   commited 2011-02-25 11:19:37 -08:00
8f44fcc72a
Phonet: don't bother with transaction IDs (especially for indications)
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Rémi Denis-Courmont   authored and   David S. Miller   commited 2011-02-25 11:19:36 -08:00
0165d69bcb
Phonet: remove redumdant pep->pipe_state
sk->sk_state already contains the pipe state.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Rémi Denis-Courmont   authored and   David S. Miller   commited 2011-02-25 11:19:36 -08:00
2feb61816f
Phonet: use socket destination in pipe protocol
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Rémi Denis-Courmont   authored and   David S. Miller   commited 2011-02-25 11:19:35 -08:00
14ba8faebc
Phonet: implement per-socket destination/peer address
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Rémi Denis-Courmont   authored and   David S. Miller   commited 2011-02-25 11:19:35 -08:00
a8059512b1
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
David S. Miller   commited 2011-02-24 22:35:12 -08:00
1b0db64fb7
ipvs: unify the formula to estimate the overhead of processing connections
lc and wlc use the same formula, but lblc and lblcr use another one. There
is no reason for using two different formulas for the lc variants.

The formula used by lc is used by all the lc variants in this patch.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Wensong Zhang <wensong@linux-vs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>

Changli Gao   authored and   Simon Horman   commited 2011-02-25 11:35:41 +09:00
b552f7e3a9
ipv4: Rearrange how ip_route_newports() gets port keys.
ip_route_newports() is the only place in the entire kernel that
cares about the port members in the routing cache entry's lookup
flow key.

Therefore the only reason we store an entire flow inside of the
struct rtentry is for this one special case.

Rewrite ip_route_newports() such that:

1) The caller passes in the original port values, so we don't need
   to use the rth->fl.fl_ip_{s,d}port values to remember them.

2) The lookup flow is constructed by hand instead of being copied
   from the routing cache entry's flow.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-24 13:38:12 -08:00
dca8b089c9
Merge 2.6.38-rc6 into tty-next
This was to resolve a merge issue with drivers/char/Makefile and
drivers/tty/serial/68328serial.c

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Greg Kroah-Hartman   commited 2011-02-24 11:36:31 -08:00
f227e08b71
xfrm: Const'ify xfrm_address_t args to xfrm_state_find.
This required a const'ification in xfrm_init_tempstate() too.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:08:47 -08:00
33765d0603
xfrm: Const'ify ptr args to xfrm_state_*_check and xfrm_state_kern.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:45 -08:00
f8848067ca
xfrm: Const'ify xfrm_tmpl and xfrm_state args to xfrm_state_addr_cmp.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:45 -08:00
21eddb5c1e
xfrm: Const'ify policy arg to xp_net.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:44 -08:00
63eb23f5d8
xfrm: Const'ify selector args in xfrm_migrate paths.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:42 -08:00
b4b7c0b389
xfrm: Const'ify pointer args to km_migrate() and implementations.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:41 -08:00
183cad1278
xfrm: Const'ify address argument to xfrm_addr_any()
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:40 -08:00
6cc329610f
xfrm: Const'ify address arguments to xfrm_addr_cmp()
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:39 -08:00
ff6acd1682
xfrm: Const'ify address arguments to ->dst_lookup()
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:38 -08:00
5e6b930f21
xfrm: Const'ify selector argument to xfrm_selector_match()
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:38 -08:00
200ce96e56
xfrm: Const'ify tmpl and address arguments to ->init_temprop()
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:37 -08:00
19bd62441c
xfrm: Pass km_event pointers around as const when possible.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-23 23:07:37 -08:00
214e005bc3
net_sched: long word align struct qdisc_skb_cb data
netem_skb_cb() does :

return (struct netem_skb_cb *)qdisc_skb_cb(skb)->data;

Unfortunatly struct qdisc_skb_cb data is not long word aligned, so
access to psched_time_t time_to_send uses a non aligned access.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Eric Dumazet   authored and   David S. Miller   commited 2011-02-23 14:17:02 -08:00
9e924cf407
mac80211: rename RX_FLAG_TSFT
The flag isn't very descriptive -- the intention
is that the driver provides a TSF timestamp at
the beginning of the MPDU -- make that clearer
by renaming the flag to RX_FLAG_MACTIME_MPDU.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

Johannes Berg   authored and   John W. Linville   commited 2011-02-23 16:25:29 -05:00
6ebacbb79d
net: Make flow cache paths use a const struct flowi.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-22 18:44:31 -08:00
dee9f4bceb
net: Mark flowi arg to flow_cache_uli_match() const.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-22 18:27:22 -08:00
0730b9a150
xfrm: Mark flowi arg to xfrm_state_find() const.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-22 18:24:19 -08:00
b520e9f616
xfrm: Mark flowi arg to xfrm_selector_match() const.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-22 18:07:39 -08:00
e1ad2ab2cf
xfrm: Mark token args to addr_match() const.
Also, make it return a real bool.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-22 18:02:12 -08:00
1744a8fe09
xfrm: Mark flowi arg to xfrm_type->reject() const.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-22 17:59:59 -08:00
8f029de281
xfrm: Mark flowi arg to ->init_tempsel() const.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-02-22 17:51:44 -08:00
73e5ebb20f