Commit 1a8a23d2 authored by Jakub Kicinski's avatar Jakub Kicinski

ipv6: constify dev_addr passing

In preparation for netdev->dev_addr being constant
make all relevant arguments in ndisc constant.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2ef6db76
...@@ -137,7 +137,7 @@ struct ndisc_options *ndisc_parse_options(const struct net_device *dev, ...@@ -137,7 +137,7 @@ struct ndisc_options *ndisc_parse_options(const struct net_device *dev,
u8 *opt, int opt_len, u8 *opt, int opt_len,
struct ndisc_options *ndopts); struct ndisc_options *ndopts);
void __ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data, void __ndisc_fill_addr_option(struct sk_buff *skb, int type, const void *data,
int data_len, int pad); int data_len, int pad);
#define NDISC_OPS_REDIRECT_DATA_SPACE 2 #define NDISC_OPS_REDIRECT_DATA_SPACE 2
......
...@@ -2237,12 +2237,12 @@ static int addrconf_ifid_6lowpan(u8 *eui, struct net_device *dev) ...@@ -2237,12 +2237,12 @@ static int addrconf_ifid_6lowpan(u8 *eui, struct net_device *dev)
static int addrconf_ifid_ieee1394(u8 *eui, struct net_device *dev) static int addrconf_ifid_ieee1394(u8 *eui, struct net_device *dev)
{ {
union fwnet_hwaddr *ha; const union fwnet_hwaddr *ha;
if (dev->addr_len != FWNET_ALEN) if (dev->addr_len != FWNET_ALEN)
return -1; return -1;
ha = (union fwnet_hwaddr *)dev->dev_addr; ha = (const union fwnet_hwaddr *)dev->dev_addr;
memcpy(eui, &ha->uc.uniq_id, sizeof(ha->uc.uniq_id)); memcpy(eui, &ha->uc.uniq_id, sizeof(ha->uc.uniq_id));
eui[0] ^= 2; eui[0] ^= 2;
......
...@@ -142,7 +142,7 @@ struct neigh_table nd_tbl = { ...@@ -142,7 +142,7 @@ struct neigh_table nd_tbl = {
}; };
EXPORT_SYMBOL_GPL(nd_tbl); EXPORT_SYMBOL_GPL(nd_tbl);
void __ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data, void __ndisc_fill_addr_option(struct sk_buff *skb, int type, const void *data,
int data_len, int pad) int data_len, int pad)
{ {
int space = __ndisc_opt_addr_space(data_len, pad); int space = __ndisc_opt_addr_space(data_len, pad);
...@@ -165,7 +165,7 @@ void __ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data, ...@@ -165,7 +165,7 @@ void __ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data,
EXPORT_SYMBOL_GPL(__ndisc_fill_addr_option); EXPORT_SYMBOL_GPL(__ndisc_fill_addr_option);
static inline void ndisc_fill_addr_option(struct sk_buff *skb, int type, static inline void ndisc_fill_addr_option(struct sk_buff *skb, int type,
void *data, u8 icmp6_type) const void *data, u8 icmp6_type)
{ {
__ndisc_fill_addr_option(skb, type, data, skb->dev->addr_len, __ndisc_fill_addr_option(skb, type, data, skb->dev->addr_len,
ndisc_addr_option_pad(skb->dev->type)); ndisc_addr_option_pad(skb->dev->type));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment