diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-11 20:09:43 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 16:15:33 -0400 |
commit | 9cfc7bd608b97463993b4f3e4775d99022253f8d (patch) | |
tree | fcfcf1e714a91943a740dcaa2744ee66448f9f73 /net/batman-adv/main.h | |
parent | 3193e8fdfa355289892661d206d1954114a7be95 (diff) |
batman-adv: Reformat multiline comments to consistent style
batman-adv doesn't follow the style for multiline comments that David S. Miller
prefers. All comments should be reformatted to follow this consistent style to
make the code slightly more readable.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r-- | net/batman-adv/main.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 12386421a55b..4b06b7621e7a 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* Copyright (C) 2007-2012 B.A.T.M.A.N. contributors: |
2 | * Copyright (C) 2007-2012 B.A.T.M.A.N. contributors: | ||
3 | * | 2 | * |
4 | * Marek Lindner, Simon Wunderlich | 3 | * Marek Lindner, Simon Wunderlich |
5 | * | 4 | * |
@@ -16,7 +15,6 @@ | |||
16 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
18 | * 02110-1301, USA | 17 | * 02110-1301, USA |
19 | * | ||
20 | */ | 18 | */ |
21 | 19 | ||
22 | #ifndef _NET_BATMAN_ADV_MAIN_H_ | 20 | #ifndef _NET_BATMAN_ADV_MAIN_H_ |
@@ -36,19 +34,21 @@ | |||
36 | #define TQ_MAX_VALUE 255 | 34 | #define TQ_MAX_VALUE 255 |
37 | #define JITTER 20 | 35 | #define JITTER 20 |
38 | 36 | ||
39 | /* Time To Live of broadcast messages */ | 37 | /* Time To Live of broadcast messages */ |
40 | #define TTL 50 | 38 | #define TTL 50 |
41 | 39 | ||
42 | /* purge originators after time in seconds if no valid packet comes in | 40 | /* purge originators after time in seconds if no valid packet comes in |
43 | * -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE */ | 41 | * -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE |
42 | */ | ||
44 | #define PURGE_TIMEOUT 200000 /* 200 seconds */ | 43 | #define PURGE_TIMEOUT 200000 /* 200 seconds */ |
45 | #define TT_LOCAL_TIMEOUT 3600000 /* in miliseconds */ | 44 | #define TT_LOCAL_TIMEOUT 3600000 /* in miliseconds */ |
46 | #define TT_CLIENT_ROAM_TIMEOUT 600000 /* in miliseconds */ | 45 | #define TT_CLIENT_ROAM_TIMEOUT 600000 /* in miliseconds */ |
47 | /* sliding packet range of received originator messages in sequence numbers | 46 | /* sliding packet range of received originator messages in sequence numbers |
48 | * (should be a multiple of our word size) */ | 47 | * (should be a multiple of our word size) |
48 | */ | ||
49 | #define TQ_LOCAL_WINDOW_SIZE 64 | 49 | #define TQ_LOCAL_WINDOW_SIZE 64 |
50 | #define TT_REQUEST_TIMEOUT 3000 /* miliseconds we have to keep | 50 | /* miliseconds we have to keep pending tt_req */ |
51 | * pending tt_req */ | 51 | #define TT_REQUEST_TIMEOUT 3000 |
52 | 52 | ||
53 | #define TQ_GLOBAL_WINDOW_SIZE 5 | 53 | #define TQ_GLOBAL_WINDOW_SIZE 5 |
54 | #define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1 | 54 | #define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1 |
@@ -57,8 +57,10 @@ | |||
57 | 57 | ||
58 | #define TT_OGM_APPEND_MAX 3 /* number of OGMs sent with the last tt diff */ | 58 | #define TT_OGM_APPEND_MAX 3 /* number of OGMs sent with the last tt diff */ |
59 | 59 | ||
60 | #define ROAMING_MAX_TIME 20000 /* Time in which a client can roam at most | 60 | /* Time in which a client can roam at most ROAMING_MAX_COUNT times in |
61 | * ROAMING_MAX_COUNT times in miliseconds*/ | 61 | * miliseconds |
62 | */ | ||
63 | #define ROAMING_MAX_TIME 20000 | ||
62 | #define ROAMING_MAX_COUNT 5 | 64 | #define ROAMING_MAX_COUNT 5 |
63 | 65 | ||
64 | #define NO_FLAGS 0 | 66 | #define NO_FLAGS 0 |
@@ -72,11 +74,13 @@ | |||
72 | #define VIS_INTERVAL 5000 /* 5 seconds */ | 74 | #define VIS_INTERVAL 5000 /* 5 seconds */ |
73 | 75 | ||
74 | /* how much worse secondary interfaces may be to be considered as bonding | 76 | /* how much worse secondary interfaces may be to be considered as bonding |
75 | * candidates */ | 77 | * candidates |
78 | */ | ||
76 | #define BONDING_TQ_THRESHOLD 50 | 79 | #define BONDING_TQ_THRESHOLD 50 |
77 | 80 | ||
78 | /* should not be bigger than 512 bytes or change the size of | 81 | /* should not be bigger than 512 bytes or change the size of |
79 | * forw_packet->direct_link_flags */ | 82 | * forw_packet->direct_link_flags |
83 | */ | ||
80 | #define MAX_AGGREGATION_BYTES 512 | 84 | #define MAX_AGGREGATION_BYTES 512 |
81 | #define MAX_AGGREGATION_MS 100 | 85 | #define MAX_AGGREGATION_MS 100 |
82 | 86 | ||
@@ -201,19 +205,16 @@ static inline void bat_dbg(int type __always_unused, | |||
201 | pr_err("%s: " fmt, _netdev->name, ## arg); \ | 205 | pr_err("%s: " fmt, _netdev->name, ## arg); \ |
202 | } while (0) | 206 | } while (0) |
203 | 207 | ||
204 | /** | 208 | /* returns 1 if they are the same ethernet addr |
205 | * returns 1 if they are the same ethernet addr | ||
206 | * | 209 | * |
207 | * note: can't use compare_ether_addr() as it requires aligned memory | 210 | * note: can't use compare_ether_addr() as it requires aligned memory |
208 | */ | 211 | */ |
209 | |||
210 | static inline int compare_eth(const void *data1, const void *data2) | 212 | static inline int compare_eth(const void *data1, const void *data2) |
211 | { | 213 | { |
212 | return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0); | 214 | return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0); |
213 | } | 215 | } |
214 | 216 | ||
215 | /** | 217 | /* has_timed_out - compares current time (jiffies) and timestamp + timeout |
216 | * has_timed_out - compares current time (jiffies) and timestamp + timeout | ||
217 | * @timestamp: base value to compare with (in jiffies) | 218 | * @timestamp: base value to compare with (in jiffies) |
218 | * @timeout: added to base value before comparing (in milliseconds) | 219 | * @timeout: added to base value before comparing (in milliseconds) |
219 | * | 220 | * |
@@ -237,7 +238,8 @@ static inline bool has_timed_out(unsigned long timestamp, unsigned int timeout) | |||
237 | * - when adding nothing - it is neither a predecessor nor a successor | 238 | * - when adding nothing - it is neither a predecessor nor a successor |
238 | * - before adding more than 127 to the starting value - it is a predecessor, | 239 | * - before adding more than 127 to the starting value - it is a predecessor, |
239 | * - when adding 128 - it is neither a predecessor nor a successor, | 240 | * - when adding 128 - it is neither a predecessor nor a successor, |
240 | * - after adding more than 127 to the starting value - it is a successor */ | 241 | * - after adding more than 127 to the starting value - it is a successor |
242 | */ | ||
241 | #define seq_before(x, y) ({typeof(x) _d1 = (x); \ | 243 | #define seq_before(x, y) ({typeof(x) _d1 = (x); \ |
242 | typeof(y) _d2 = (y); \ | 244 | typeof(y) _d2 = (y); \ |
243 | typeof(x) _dummy = (_d1 - _d2); \ | 245 | typeof(x) _dummy = (_d1 - _d2); \ |