diff options
| author | Alexander Aring <[email protected]> | 2016-06-15 21:20:19 +0200 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2016-06-15 20:41:22 -0700 |
| commit | 1e82f961ac8e94c50a933e89ee08071fc81a4bbd (patch) | |
| tree | fea1c84c789b71b48ea0e0dd938bd51f850f3e81 /include | |
| parent | 848484c93128eae5b0f879ad1c2d7204c10a8b6a (diff) | |
ndisc: add __ndisc_opt_addr_space function
This patch adds __ndisc_opt_addr_space as low-level function for
ndisc_opt_addr_space which doesn't depend on net_device parameter.
Cc: David S. Miller <[email protected]>
Cc: Alexey Kuznetsov <[email protected]>
Cc: James Morris <[email protected]>
Cc: Hideaki YOSHIFUJI <[email protected]>
Cc: Patrick McHardy <[email protected]>
Acked-by: YOSHIFUJI Hideaki <[email protected]>
Reviewed-by: Stefan Schmidt <[email protected]>
Signed-off-by: Alexander Aring <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ndisc.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 2d8edaad29cb..4cee82654fe5 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -127,10 +127,15 @@ static inline int ndisc_addr_option_pad(unsigned short type) } } +static inline int __ndisc_opt_addr_space(unsigned char addr_len, int pad) +{ + return NDISC_OPT_SPACE(addr_len + pad); +} + static inline int ndisc_opt_addr_space(struct net_device *dev) { - return NDISC_OPT_SPACE(dev->addr_len + - ndisc_addr_option_pad(dev->type)); + return __ndisc_opt_addr_space(dev->addr_len, + ndisc_addr_option_pad(dev->type)); } static inline u8 *ndisc_opt_addr_data(struct nd_opt_hdr *p, |