Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

batman-adv: prepare for const netdev->dev_addr

netdev->dev_addr will be constant soon, make sure
the qualifier is propagated thru batman-adv.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jakub Kicinski and committed by
David S. Miller
47ce5f1e 818a76a5

+14 -13
+7 -7
net/batman-adv/bridge_loop_avoidance.c
··· 254 254 * Return: backbone gateway if found or NULL otherwise 255 255 */ 256 256 static struct batadv_bla_backbone_gw * 257 - batadv_backbone_hash_find(struct batadv_priv *bat_priv, u8 *addr, 257 + batadv_backbone_hash_find(struct batadv_priv *bat_priv, const u8 *addr, 258 258 unsigned short vid) 259 259 { 260 260 struct batadv_hashtable *hash = bat_priv->bla.backbone_hash; ··· 336 336 * @vid: the VLAN ID 337 337 * @claimtype: the type of the claim (CLAIM, UNCLAIM, ANNOUNCE, ...) 338 338 */ 339 - static void batadv_bla_send_claim(struct batadv_priv *bat_priv, u8 *mac, 339 + static void batadv_bla_send_claim(struct batadv_priv *bat_priv, const u8 *mac, 340 340 unsigned short vid, int claimtype) 341 341 { 342 342 struct sk_buff *skb; ··· 488 488 * Return: the (possibly created) backbone gateway or NULL on error 489 489 */ 490 490 static struct batadv_bla_backbone_gw * 491 - batadv_bla_get_backbone_gw(struct batadv_priv *bat_priv, u8 *orig, 491 + batadv_bla_get_backbone_gw(struct batadv_priv *bat_priv, const u8 *orig, 492 492 unsigned short vid, bool own_backbone) 493 493 { 494 494 struct batadv_bla_backbone_gw *entry; ··· 926 926 */ 927 927 static bool batadv_handle_unclaim(struct batadv_priv *bat_priv, 928 928 struct batadv_hard_iface *primary_if, 929 - u8 *backbone_addr, u8 *claim_addr, 929 + const u8 *backbone_addr, const u8 *claim_addr, 930 930 unsigned short vid) 931 931 { 932 932 struct batadv_bla_backbone_gw *backbone_gw; ··· 964 964 */ 965 965 static bool batadv_handle_claim(struct batadv_priv *bat_priv, 966 966 struct batadv_hard_iface *primary_if, 967 - u8 *backbone_addr, u8 *claim_addr, 967 + const u8 *backbone_addr, const u8 *claim_addr, 968 968 unsigned short vid) 969 969 { 970 970 struct batadv_bla_backbone_gw *backbone_gw; ··· 2126 2126 struct batadv_hard_iface *primary_if, 2127 2127 struct batadv_bla_claim *claim) 2128 2128 { 2129 - u8 *primary_addr = primary_if->net_dev->dev_addr; 2129 + const u8 *primary_addr = primary_if->net_dev->dev_addr; 2130 2130 u16 backbone_crc; 2131 2131 bool is_own; 2132 2132 void *hdr; ··· 2294 2294 struct batadv_hard_iface *primary_if, 2295 2295 struct batadv_bla_backbone_gw *backbone_gw) 2296 2296 { 2297 - u8 *primary_addr = primary_if->net_dev->dev_addr; 2297 + const u8 *primary_addr = primary_if->net_dev->dev_addr; 2298 2298 u16 backbone_crc; 2299 2299 bool is_own; 2300 2300 int msecs;
+2 -1
net/batman-adv/routing.c
··· 747 747 struct batadv_orig_node *orig_node = NULL; 748 748 struct batadv_hard_iface *primary_if = NULL; 749 749 bool ret = false; 750 - u8 *orig_addr, orig_ttvn; 750 + const u8 *orig_addr; 751 + u8 orig_ttvn; 751 752 752 753 if (batadv_is_my_client(bat_priv, dst_addr, vid)) { 753 754 primary_if = batadv_primary_if_get_selected(bat_priv);
+1 -1
net/batman-adv/tp_meter.c
··· 631 631 struct batadv_orig_node *orig_node = NULL; 632 632 const struct batadv_icmp_tp_packet *icmp; 633 633 struct batadv_tp_vars *tp_vars; 634 + const unsigned char *dev_addr; 634 635 size_t packet_len, mss; 635 636 u32 rtt, recv_ack, cwnd; 636 - unsigned char *dev_addr; 637 637 638 638 packet_len = BATADV_TP_PLEN; 639 639 mss = BATADV_TP_PLEN;
+2 -2
net/batman-adv/tvlv.c
··· 587 587 * @tvlv_value: tvlv content 588 588 * @tvlv_value_len: tvlv content length 589 589 */ 590 - void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, u8 *src, 591 - u8 *dst, u8 type, u8 version, 590 + void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, const u8 *src, 591 + const u8 *dst, u8 type, u8 version, 592 592 void *tvlv_value, u16 tvlv_value_len) 593 593 { 594 594 struct batadv_unicast_tvlv_packet *unicast_tvlv_packet;
+2 -2
net/batman-adv/tvlv.h
··· 42 42 struct batadv_orig_node *orig_node, 43 43 u8 *src, u8 *dst, 44 44 void *tvlv_buff, u16 tvlv_buff_len); 45 - void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, u8 *src, 46 - u8 *dst, u8 type, u8 version, 45 + void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, const u8 *src, 46 + const u8 *dst, u8 type, u8 version, 47 47 void *tvlv_value, u16 tvlv_value_len); 48 48 49 49 #endif /* _NET_BATMAN_ADV_TVLV_H_ */