kernel: bump 4.14 to 4.14.107
[openwrt/openwrt.git] / target / linux / generic / backport-4.14 / 271-batman-adv-Remove-usage-of-BIT-x-in-packet.h.patch
1 From: Sven Eckelmann <sven.eckelmann@openmesh.com>
2 Date: Thu, 21 Dec 2017 10:17:39 +0100
3 Subject: [PATCH] batman-adv: Remove usage of BIT(x) in packet.h
4
5 The BIT(x) macro is no longer available for uapi headers because it is
6 defined outside of it (linux/bitops.h). The use of it must therefore be
7 avoided and replaced by an appropriate other representation.
8
9 Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
10 Signed-off-by: David S. Miller <davem@davemloft.net>
11 ---
12
13 --- a/net/batman-adv/packet.h
14 +++ b/net/batman-adv/packet.h
15 @@ -19,7 +19,6 @@
16 #define _NET_BATMAN_ADV_PACKET_H_
17
18 #include <asm/byteorder.h>
19 -#include <linux/bitops.h>
20 #include <linux/if_ether.h>
21 #include <linux/types.h>
22
23 @@ -85,9 +84,9 @@ enum batadv_subtype {
24 * one hop neighbor on the interface where it was originally received.
25 */
26 enum batadv_iv_flags {
27 - BATADV_NOT_BEST_NEXT_HOP = BIT(0),
28 - BATADV_PRIMARIES_FIRST_HOP = BIT(1),
29 - BATADV_DIRECTLINK = BIT(2),
30 + BATADV_NOT_BEST_NEXT_HOP = 1UL << 0,
31 + BATADV_PRIMARIES_FIRST_HOP = 1UL << 1,
32 + BATADV_DIRECTLINK = 1UL << 2,
33 };
34
35 /* ICMP message types */
36 @@ -108,9 +107,9 @@ enum batadv_icmp_packettype {
37 * @BATADV_MCAST_WANT_ALL_IPV6: we want all IPv6 multicast packets
38 */
39 enum batadv_mcast_flags {
40 - BATADV_MCAST_WANT_ALL_UNSNOOPABLES = BIT(0),
41 - BATADV_MCAST_WANT_ALL_IPV4 = BIT(1),
42 - BATADV_MCAST_WANT_ALL_IPV6 = BIT(2),
43 + BATADV_MCAST_WANT_ALL_UNSNOOPABLES = 1UL << 0,
44 + BATADV_MCAST_WANT_ALL_IPV4 = 1UL << 1,
45 + BATADV_MCAST_WANT_ALL_IPV6 = 1UL << 2,
46 };
47
48 /* tt data subtypes */
49 @@ -124,10 +123,10 @@ enum batadv_mcast_flags {
50 * @BATADV_TT_FULL_TABLE: contains full table to replace existing table
51 */
52 enum batadv_tt_data_flags {
53 - BATADV_TT_OGM_DIFF = BIT(0),
54 - BATADV_TT_REQUEST = BIT(1),
55 - BATADV_TT_RESPONSE = BIT(2),
56 - BATADV_TT_FULL_TABLE = BIT(4),
57 + BATADV_TT_OGM_DIFF = 1UL << 0,
58 + BATADV_TT_REQUEST = 1UL << 1,
59 + BATADV_TT_RESPONSE = 1UL << 2,
60 + BATADV_TT_FULL_TABLE = 1UL << 4,
61 };
62
63 /**
64 @@ -135,7 +134,7 @@ enum batadv_tt_data_flags {
65 * @BATADV_VLAN_HAS_TAG: whether the field contains a valid vlan tag or not
66 */
67 enum batadv_vlan_flags {
68 - BATADV_VLAN_HAS_TAG = BIT(15),
69 + BATADV_VLAN_HAS_TAG = 1UL << 15,
70 };
71
72 /* claim frame types for the bridge loop avoidance */