projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UPSTREAM: phy: Add set_mode callback
[firefly-linux-kernel-4.4.55.git]
/
include
/
net
/
l3mdev.h
diff --git
a/include/net/l3mdev.h
b/include/net/l3mdev.h
index 774d85b2d5d97734b79eadea20f090ebf684b057..5689a0c749f76cd7ce5810b6ac165e43ddb0b59d 100644
(file)
--- a/
include/net/l3mdev.h
+++ b/
include/net/l3mdev.h
@@
-29,7
+29,7
@@
struct l3mdev_ops {
/* IPv4 ops */
struct rtable * (*l3mdev_get_rtable)(const struct net_device *dev,
const struct flowi4 *fl4);
/* IPv4 ops */
struct rtable * (*l3mdev_get_rtable)(const struct net_device *dev,
const struct flowi4 *fl4);
-
void
(*l3mdev_get_saddr)(struct net_device *dev,
+
int
(*l3mdev_get_saddr)(struct net_device *dev,
struct flowi4 *fl4);
/* IPv6 ops */
struct flowi4 *fl4);
/* IPv6 ops */
@@
-112,10
+112,11
@@
static inline bool netif_index_is_l3_master(struct net *net, int ifindex)
return rc;
}
return rc;
}
-static inline
void
l3mdev_get_saddr(struct net *net, int ifindex,
-
struct flowi4 *fl4)
+static inline
int
l3mdev_get_saddr(struct net *net, int ifindex,
+ struct flowi4 *fl4)
{
struct net_device *dev;
{
struct net_device *dev;
+ int rc = 0;
if (ifindex) {
if (ifindex) {
@@
-124,11
+125,13
@@
static inline void l3mdev_get_saddr(struct net *net, int ifindex,
dev = dev_get_by_index_rcu(net, ifindex);
if (dev && netif_is_l3_master(dev) &&
dev->l3mdev_ops->l3mdev_get_saddr) {
dev = dev_get_by_index_rcu(net, ifindex);
if (dev && netif_is_l3_master(dev) &&
dev->l3mdev_ops->l3mdev_get_saddr) {
- dev->l3mdev_ops->l3mdev_get_saddr(dev, fl4);
+
rc =
dev->l3mdev_ops->l3mdev_get_saddr(dev, fl4);
}
rcu_read_unlock();
}
}
rcu_read_unlock();
}
+
+ return rc;
}
static inline struct dst_entry *l3mdev_get_rt6_dst(const struct net_device *dev,
}
static inline struct dst_entry *l3mdev_get_rt6_dst(const struct net_device *dev,
@@
-200,9
+203,10
@@
static inline bool netif_index_is_l3_master(struct net *net, int ifindex)
return false;
}
return false;
}
-static inline
void
l3mdev_get_saddr(struct net *net, int ifindex,
-
struct flowi4 *fl4)
+static inline
int
l3mdev_get_saddr(struct net *net, int ifindex,
+ struct flowi4 *fl4)
{
{
+ return 0;
}
static inline
}
static inline