diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-12-07 18:47:08 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-08 20:19:26 -0500 |
commit | 15b1c0e822f578306332d4f4c449250db5c5dceb (patch) | |
tree | c577cadd3edb7a9915501f1bcb4be086961bb316 /net/ax25/ax25_addr.c | |
parent | e8cc49bb0fdb9e18a99e6780073d1400ba2b0d1f (diff) |
[AX.25]: Fix default address and broadcast address initialization.
Only the callsign but not the SSID part of an AX.25 address is ASCII
based but Linux by initializes the SSID which should be just a 4-bit
number from ASCII anyway.
Fix that and convert the code to use a shared constant for both default
addresses. While at it, use the same style for null_ax25_address also.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ax25/ax25_addr.c')
-rw-r--r-- | net/ax25/ax25_addr.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/ax25/ax25_addr.c b/net/ax25/ax25_addr.c index 5524f9cb7b83..21a0616152fc 100644 --- a/net/ax25/ax25_addr.c +++ b/net/ax25/ax25_addr.c | |||
@@ -29,11 +29,20 @@ | |||
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * The null address is defined as a callsign of all spaces with an | 32 | * The default broadcast address of an interface is QST-0; the default address |
33 | * SSID of zero. | 33 | * is LINUX-1. The null address is defined as a callsign of all spaces with |
34 | * an SSID of zero. | ||
34 | */ | 35 | */ |
35 | ax25_address null_ax25_address = {{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00}}; | ||
36 | 36 | ||
37 | const ax25_address ax25_bcast = | ||
38 | {{'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, 0 << 1}}; | ||
39 | const ax25_address ax25_defaddr = | ||
40 | {{'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, 1 << 1}}; | ||
41 | const ax25_address null_ax25_address = | ||
42 | {{' ' << 1, ' ' << 1, ' ' << 1, ' ' << 1, ' ' << 1, ' ' << 1, 0 << 1}}; | ||
43 | |||
44 | EXPORT_SYMBOL_GPL(ax25_bcast); | ||
45 | EXPORT_SYMBOL_GPL(ax25_defaddr); | ||
37 | EXPORT_SYMBOL(null_ax25_address); | 46 | EXPORT_SYMBOL(null_ax25_address); |
38 | 47 | ||
39 | /* | 48 | /* |