diff options
author | Luis R. Rodriguez <mcgrof@suse.com> | 2014-04-18 05:22:54 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-21 02:18:55 +0400 |
commit | 599018a71013386119c057a64183e49240c8b4e6 (patch) | |
tree | 2c4931261b8371407f66e8d48aac29f75aeca324 /include/net/net_namespace.h | |
parent | 8465a5fcd1ceba8f2b55121d47b73f4025401490 (diff) | |
download | linux-599018a71013386119c057a64183e49240c8b4e6.tar.xz |
6lowpan: add helper to get 6lowpan namespace
This will simplify the new reassembly backport
with no code changes being required.
CC: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: linux-zigbee-devel@lists.sourceforge.net
Cc: David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 5f9eb260990f..bc4118ede5b5 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -373,6 +373,21 @@ static inline void rt_genid_bump_ipv6(struct net *net) } #endif +#if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN) +static inline struct netns_ieee802154_lowpan * +net_ieee802154_lowpan(struct net *net) +{ + return &net->ieee802154_lowpan; +} +#else +static inline struct netns_ieee802154_lowpan * +net_ieee802154_lowpan(struct net *net) +{ + return NULL; +} +#endif + + /* For callers who don't really care about whether it's IPv4 or IPv6 */ static inline void rt_genid_bump_all(struct net *net) { |