Commit 62c20720 authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Greg Kroah-Hartman
Browse files

Staging: batman-adv: Add include guards to all header files



We include different header files indirectly to the same source file.
This creates weird compiler errors from time to time. Include guards
should prefend that functions/variables/... gets redefined by itself.

Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7809cea9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,9 @@
 *
 */

#ifndef _NET_BATMAN_ADV_AGGREGATION_H_
#define _NET_BATMAN_ADV_AGGREGATION_H_

#include "main.h"

/* is there another aggregated packet here? */
@@ -36,3 +39,5 @@ void add_bat_packet_to_list(struct bat_priv *bat_priv,
			    unsigned long send_time);
void receive_aggr_bat_packet(struct ethhdr *ethhdr, unsigned char *packet_buff,
			     int packet_len, struct batman_if *if_incoming);

#endif /* _NET_BATMAN_ADV_AGGREGATION_H_ */
+3 −3
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@
 */


#ifndef BAT_DEBUGFS_H
#define BAT_DEBUGFS_H
#ifndef _NET_BATMAN_ADV_DEBUGFS_H_
#define _NET_BATMAN_ADV_DEBUGFS_H_

#define DEBUGFS_BAT_SUBDIR "batman_adv"

@@ -30,4 +30,4 @@ void debugfs_destroy(void);
int debugfs_add_meshif(struct net_device *dev);
void debugfs_del_meshif(struct net_device *dev);

#endif
#endif /* _NET_BATMAN_ADV_DEBUGFS_H_ */
+3 −3
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@
 */


#ifndef BAT_SYSFS_H
#define BAT_SYSFS_H
#ifndef _NET_BATMAN_ADV_SYSFS_H_
#define _NET_BATMAN_ADV_SYSFS_H_

#define SYSFS_IF_MESH_SUBDIR "mesh"
#define SYSFS_IF_BAT_SUBDIR "batman_adv"
@@ -39,4 +39,4 @@ void sysfs_del_meshif(struct net_device *dev);
int sysfs_add_hardif(struct kobject **hardif_obj, struct net_device *dev);
void sysfs_del_hardif(struct kobject **hardif_obj);

#endif
#endif /* _NET_BATMAN_ADV_SYSFS_H_ */
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@
 *
 */

#ifndef _NET_BATMAN_ADV_BITARRAY_H_
#define _NET_BATMAN_ADV_BITARRAY_H_

/* you should choose something big, if you don't want to waste cpu */
#define TYPE_OF_WORD unsigned long
@@ -40,3 +42,5 @@ char bit_get_packet(TYPE_OF_WORD *seq_bits, int32_t seq_num_diff,

/* count the hamming weight, how many good packets did we receive? */
int  bit_packet_count(TYPE_OF_WORD *seq_bits);

#endif /* _NET_BATMAN_ADV_BITARRAY_H_ */
+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,9 @@
 *
 */

#ifndef _NET_BATMAN_ADV_HARD_INTERFACE_H_
#define _NET_BATMAN_ADV_HARD_INTERFACE_H_

#define IF_NOT_IN_USE 0
#define IF_TO_BE_REMOVED 1
#define IF_INACTIVE 2
@@ -38,3 +41,5 @@ int batman_skb_recv(struct sk_buff *skb,
				struct net_device *orig_dev);
int hardif_min_mtu(void);
void update_min_mtu(void);

#endif /* _NET_BATMAN_ADV_HARD_INTERFACE_H_ */
Loading