diff options
author | Antonio Quartulli <ordex@autistici.org> | 2012-11-25 18:38:50 -0500 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-11-30 04:50:22 -0500 |
commit | af5d4f7737963f2112f148f97c5820425f050650 (patch) | |
tree | f5d5d7b9fcb172df041b8fb34fad875f0c87b9d5 /net/batman-adv/soft-interface.c | |
parent | bb728820fe7c42fdb838ab2745fb5fe6b18b5ffa (diff) |
batman-adv: use ETH_P_BATMAN
The ETH_P_BATMAN ethertype is now defined kernel-wide. Use it instead
of the private BATADV_ETH_P_BATMAN define.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r-- | net/batman-adv/soft-interface.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 54800c783f96..6b548fde8e04 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/ethtool.h> | 34 | #include <linux/ethtool.h> |
35 | #include <linux/etherdevice.h> | 35 | #include <linux/etherdevice.h> |
36 | #include <linux/if_vlan.h> | 36 | #include <linux/if_vlan.h> |
37 | #include <linux/if_ether.h> | ||
37 | #include "unicast.h" | 38 | #include "unicast.h" |
38 | #include "bridge_loop_avoidance.h" | 39 | #include "bridge_loop_avoidance.h" |
39 | 40 | ||
@@ -146,7 +147,7 @@ static int batadv_interface_tx(struct sk_buff *skb, | |||
146 | struct batadv_hard_iface *primary_if = NULL; | 147 | struct batadv_hard_iface *primary_if = NULL; |
147 | struct batadv_bcast_packet *bcast_packet; | 148 | struct batadv_bcast_packet *bcast_packet; |
148 | struct vlan_ethhdr *vhdr; | 149 | struct vlan_ethhdr *vhdr; |
149 | __be16 ethertype = __constant_htons(BATADV_ETH_P_BATMAN); | 150 | __be16 ethertype = __constant_htons(ETH_P_BATMAN); |
150 | static const uint8_t stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, | 151 | static const uint8_t stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, |
151 | 0x00, 0x00}; | 152 | 0x00, 0x00}; |
152 | static const uint8_t ectp_addr[ETH_ALEN] = {0xCF, 0x00, 0x00, 0x00, | 153 | static const uint8_t ectp_addr[ETH_ALEN] = {0xCF, 0x00, 0x00, 0x00, |
@@ -172,7 +173,7 @@ static int batadv_interface_tx(struct sk_buff *skb, | |||
172 | break; | 173 | break; |
173 | 174 | ||
174 | /* fall through */ | 175 | /* fall through */ |
175 | case BATADV_ETH_P_BATMAN: | 176 | case ETH_P_BATMAN: |
176 | goto dropped; | 177 | goto dropped; |
177 | } | 178 | } |
178 | 179 | ||
@@ -302,7 +303,7 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
302 | struct vlan_ethhdr *vhdr; | 303 | struct vlan_ethhdr *vhdr; |
303 | struct batadv_header *batadv_header = (struct batadv_header *)skb->data; | 304 | struct batadv_header *batadv_header = (struct batadv_header *)skb->data; |
304 | short vid __maybe_unused = -1; | 305 | short vid __maybe_unused = -1; |
305 | __be16 ethertype = __constant_htons(BATADV_ETH_P_BATMAN); | 306 | __be16 ethertype = __constant_htons(ETH_P_BATMAN); |
306 | bool is_bcast; | 307 | bool is_bcast; |
307 | 308 | ||
308 | is_bcast = (batadv_header->packet_type == BATADV_BCAST); | 309 | is_bcast = (batadv_header->packet_type == BATADV_BCAST); |
@@ -325,7 +326,7 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
325 | break; | 326 | break; |
326 | 327 | ||
327 | /* fall through */ | 328 | /* fall through */ |
328 | case BATADV_ETH_P_BATMAN: | 329 | case ETH_P_BATMAN: |
329 | goto dropped; | 330 | goto dropped; |
330 | } | 331 | } |
331 | 332 | ||