diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-23 14:47:02 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-23 14:47:02 -0400 |
| commit | 5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0 (patch) | |
| tree | 7851ef1c93aa1aba7ef327ca4b75fd35e6d10f29 /include/net | |
| parent | 02f36038c568111ad4fc433f6fa760ff5e38fab4 (diff) | |
| parent | ec37a48d1d16c30b655ac5280209edf52a6775d4 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits)
bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
vlan: Calling vlan_hwaccel_do_receive() is always valid.
tproxy: use the interface primary IP address as a default value for --on-ip
tproxy: added IPv6 support to the socket match
cxgb3: function namespace cleanup
tproxy: added IPv6 support to the TPROXY target
tproxy: added IPv6 socket lookup function to nf_tproxy_core
be2net: Changes to use only priority codes allowed by f/w
tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
tproxy: added tproxy sockopt interface in the IPV6 layer
tproxy: added udp6_lib_lookup function
tproxy: added const specifiers to udp lookup functions
tproxy: split off ipv6 defragmentation to a separate module
l2tp: small cleanup
nf_nat: restrict ICMP translation for embedded header
can: mcp251x: fix generation of error frames
can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set
can-raw: add msg_flags to distinguish local traffic
9p: client code cleanup
rds: make local functions/variables static
...
Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and
drivers/net/wireless/ath/ath9k/debug.c as per David
Diffstat (limited to 'include/net')
55 files changed, 1146 insertions, 388 deletions
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index d1aa2cfb30f0..7f63d5ab7b44 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
| @@ -212,15 +212,12 @@ struct p9_dirent { | |||
| 212 | 212 | ||
| 213 | int p9_client_statfs(struct p9_fid *fid, struct p9_rstatfs *sb); | 213 | int p9_client_statfs(struct p9_fid *fid, struct p9_rstatfs *sb); |
| 214 | int p9_client_rename(struct p9_fid *fid, struct p9_fid *newdirfid, char *name); | 214 | int p9_client_rename(struct p9_fid *fid, struct p9_fid *newdirfid, char *name); |
| 215 | int p9_client_version(struct p9_client *); | ||
| 216 | struct p9_client *p9_client_create(const char *dev_name, char *options); | 215 | struct p9_client *p9_client_create(const char *dev_name, char *options); |
| 217 | void p9_client_destroy(struct p9_client *clnt); | 216 | void p9_client_destroy(struct p9_client *clnt); |
| 218 | void p9_client_disconnect(struct p9_client *clnt); | 217 | void p9_client_disconnect(struct p9_client *clnt); |
| 219 | void p9_client_begin_disconnect(struct p9_client *clnt); | 218 | void p9_client_begin_disconnect(struct p9_client *clnt); |
| 220 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 219 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
| 221 | char *uname, u32 n_uname, char *aname); | 220 | char *uname, u32 n_uname, char *aname); |
| 222 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, | ||
| 223 | u32 n_uname, char *aname); | ||
| 224 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | 221 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, |
| 225 | int clone); | 222 | int clone); |
| 226 | int p9_client_open(struct p9_fid *fid, int mode); | 223 | int p9_client_open(struct p9_fid *fid, int mode); |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 4d40c4d0230b..a9441249306c 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
| @@ -175,20 +175,32 @@ extern int ipv6_chk_acast_addr(struct net *net, struct net_device *dev, | |||
| 175 | extern int register_inet6addr_notifier(struct notifier_block *nb); | 175 | extern int register_inet6addr_notifier(struct notifier_block *nb); |
| 176 | extern int unregister_inet6addr_notifier(struct notifier_block *nb); | 176 | extern int unregister_inet6addr_notifier(struct notifier_block *nb); |
| 177 | 177 | ||
| 178 | static inline struct inet6_dev * | 178 | /** |
| 179 | __in6_dev_get(struct net_device *dev) | 179 | * __in6_dev_get - get inet6_dev pointer from netdevice |
| 180 | * @dev: network device | ||
| 181 | * | ||
| 182 | * Caller must hold rcu_read_lock or RTNL, because this function | ||
| 183 | * does not take a reference on the inet6_dev. | ||
| 184 | */ | ||
| 185 | static inline struct inet6_dev *__in6_dev_get(const struct net_device *dev) | ||
| 180 | { | 186 | { |
| 181 | return rcu_dereference_check(dev->ip6_ptr, | 187 | return rcu_dereference_rtnl(dev->ip6_ptr); |
| 182 | rcu_read_lock_held() || | ||
| 183 | lockdep_rtnl_is_held()); | ||
| 184 | } | 188 | } |
| 185 | 189 | ||
| 186 | static inline struct inet6_dev * | 190 | /** |
| 187 | in6_dev_get(struct net_device *dev) | 191 | * in6_dev_get - get inet6_dev pointer from netdevice |
| 192 | * @dev: network device | ||
| 193 | * | ||
| 194 | * This version can be used in any context, and takes a reference | ||
| 195 | * on the inet6_dev. Callers must use in6_dev_put() later to | ||
| 196 | * release this reference. | ||
| 197 | */ | ||
| 198 | static inline struct inet6_dev *in6_dev_get(const struct net_device *dev) | ||
| 188 | { | 199 | { |
| 189 | struct inet6_dev *idev = NULL; | 200 | struct inet6_dev *idev; |
| 201 | |||
| 190 | rcu_read_lock(); | 202 | rcu_read_lock(); |
| 191 | idev = __in6_dev_get(dev); | 203 | idev = rcu_dereference(dev->ip6_ptr); |
| 192 | if (idev) | 204 | if (idev) |
| 193 | atomic_inc(&idev->refcnt); | 205 | atomic_inc(&idev->refcnt); |
| 194 | rcu_read_unlock(); | 206 | rcu_read_unlock(); |
| @@ -197,16 +209,21 @@ in6_dev_get(struct net_device *dev) | |||
| 197 | 209 | ||
| 198 | extern void in6_dev_finish_destroy(struct inet6_dev *idev); | 210 | extern void in6_dev_finish_destroy(struct inet6_dev *idev); |
| 199 | 211 | ||
| 200 | static inline void | 212 | static inline void in6_dev_put(struct inet6_dev *idev) |
| 201 | in6_dev_put(struct inet6_dev *idev) | ||
| 202 | { | 213 | { |
| 203 | if (atomic_dec_and_test(&idev->refcnt)) | 214 | if (atomic_dec_and_test(&idev->refcnt)) |
| 204 | in6_dev_finish_destroy(idev); | 215 | in6_dev_finish_destroy(idev); |
| 205 | } | 216 | } |
| 206 | 217 | ||
| 207 | #define __in6_dev_put(idev) atomic_dec(&(idev)->refcnt) | 218 | static inline void __in6_dev_put(struct inet6_dev *idev) |
| 208 | #define in6_dev_hold(idev) atomic_inc(&(idev)->refcnt) | 219 | { |
| 220 | atomic_dec(&idev->refcnt); | ||
| 221 | } | ||
| 209 | 222 | ||
| 223 | static inline void in6_dev_hold(struct inet6_dev *idev) | ||
| 224 | { | ||
| 225 | atomic_inc(&idev->refcnt); | ||
| 226 | } | ||
| 210 | 227 | ||
| 211 | extern void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp); | 228 | extern void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp); |
| 212 | 229 | ||
| @@ -216,9 +233,15 @@ static inline void in6_ifa_put(struct inet6_ifaddr *ifp) | |||
