hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/batman-adv/main.h
....@@ -1,19 +1,7 @@
11 /* SPDX-License-Identifier: GPL-2.0 */
2
-/* Copyright (C) 2007-2018 B.A.T.M.A.N. contributors:
2
+/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
33 *
44 * Marek Lindner, Simon Wunderlich
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of version 2 of the GNU General Public
8
- * License as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful, but
11
- * WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
175 */
186
197 #ifndef _NET_BATMAN_ADV_MAIN_H_
....@@ -25,7 +13,7 @@
2513 #define BATADV_DRIVER_DEVICE "batman-adv"
2614
2715 #ifndef BATADV_SOURCE_VERSION
28
-#define BATADV_SOURCE_VERSION "2018.3"
16
+#define BATADV_SOURCE_VERSION "2020.4"
2917 #endif
3018
3119 /* B.A.T.M.A.N. parameters */
....@@ -217,20 +205,20 @@
217205
218206 /* Kernel headers */
219207
208
+#include <linux/atomic.h>
220209 #include <linux/compiler.h>
221210 #include <linux/etherdevice.h>
222211 #include <linux/if_vlan.h>
223212 #include <linux/jiffies.h>
213
+#include <linux/netdevice.h>
224214 #include <linux/percpu.h>
215
+#include <linux/seq_file.h>
216
+#include <linux/skbuff.h>
225217 #include <linux/types.h>
226218 #include <uapi/linux/batadv_packet.h>
227219
228220 #include "types.h"
229
-
230
-struct net_device;
231
-struct packet_type;
232
-struct seq_file;
233
-struct sk_buff;
221
+#include "main.h"
234222
235223 /**
236224 * batadv_print_vid() - return printable version of vid information
....@@ -247,6 +235,7 @@
247235 }
248236
249237 extern struct list_head batadv_hardif_list;
238
+extern unsigned int batadv_hardif_generation;
250239
251240 extern unsigned char batadv_broadcast_addr[];
252241 extern struct workqueue_struct *batadv_event_workqueue;
....@@ -319,7 +308,7 @@
319308 * @y: value to compare @x against
320309 *
321310 * It handles overflows/underflows and can correctly check for a predecessor
322
- * unless the variable sequence number has grown by more then
311
+ * unless the variable sequence number has grown by more than
323312 * 2**(bitwidth(x)-1)-1.
324313 *
325314 * This means that for a u8 with the maximum value 255, it would think:
....@@ -341,11 +330,11 @@
341330
342331 /**
343332 * batadv_seq_after() - Checks if a sequence number x is a successor of y
344
- * @x: potential sucessor of @y
333
+ * @x: potential successor of @y
345334 * @y: value to compare @x against
346335 *
347336 * It handles overflows/underflows and can correctly check for a successor
348
- * unless the variable sequence number has grown by more then
337
+ * unless the variable sequence number has grown by more than
349338 * 2**(bitwidth(x)-1)-1.
350339 *
351340 * This means that for a u8 with the maximum value 255, it would think:
....@@ -393,5 +382,7 @@
393382
394383 unsigned short batadv_get_vid(struct sk_buff *skb, size_t header_len);
395384 bool batadv_vlan_ap_isola_get(struct batadv_priv *bat_priv, unsigned short vid);
385
+int batadv_throw_uevent(struct batadv_priv *bat_priv, enum batadv_uev_type type,
386
+ enum batadv_uev_action action, const char *data);
396387
397388 #endif /* _NET_BATMAN_ADV_MAIN_H_ */