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 /drivers/net/hamradio/dmascc.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 'drivers/net/hamradio/dmascc.c')
-rw-r--r-- | drivers/net/hamradio/dmascc.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index e6e721aff6f6..0fbb414b5a4d 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c | |||
@@ -264,12 +264,6 @@ static int io[MAX_NUM_DEVS] __initdata = { 0, }; | |||
264 | 264 | ||
265 | /* Beware! hw[] is also used in cleanup_module(). */ | 265 | /* Beware! hw[] is also used in cleanup_module(). */ |
266 | static struct scc_hardware hw[NUM_TYPES] __initdata_or_module = HARDWARE; | 266 | static struct scc_hardware hw[NUM_TYPES] __initdata_or_module = HARDWARE; |
267 | static char ax25_broadcast[7] __initdata = | ||
268 | { 'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, | ||
269 | '0' << 1 }; | ||
270 | static char ax25_test[7] __initdata = | ||
271 | { 'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, | ||
272 | '1' << 1 }; | ||
273 | 267 | ||
274 | 268 | ||
275 | /* Global variables */ | 269 | /* Global variables */ |
@@ -443,8 +437,8 @@ static void __init dev_setup(struct net_device *dev) | |||
443 | dev->mtu = 1500; | 437 | dev->mtu = 1500; |
444 | dev->addr_len = AX25_ADDR_LEN; | 438 | dev->addr_len = AX25_ADDR_LEN; |
445 | dev->tx_queue_len = 64; | 439 | dev->tx_queue_len = 64; |
446 | memcpy(dev->broadcast, ax25_broadcast, AX25_ADDR_LEN); | 440 | memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN); |
447 | memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN); | 441 | memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN); |
448 | } | 442 | } |
449 | 443 | ||
450 | static int __init setup_adapter(int card_base, int type, int n) | 444 | static int __init setup_adapter(int card_base, int type, int n) |