diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-12-07 15:47:08 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-08 17:19:26 -0800 |
commit | 15b1c0e822f578306332d4f4c449250db5c5dceb (patch) | |
tree | c577cadd3edb7a9915501f1bcb4be086961bb316 /drivers/net/hamradio/mkiss.c | |
parent | e8cc49bb0fdb9e18a99e6780073d1400ba2b0d1f (diff) | |
download | op-kernel-dev-15b1c0e822f578306332d4f4c449250db5c5dceb.zip op-kernel-dev-15b1c0e822f578306332d4f4c449250db5c5dceb.tar.gz |
[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/mkiss.c')
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index d8715b2..d08fbc3 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c @@ -672,11 +672,6 @@ static struct net_device_stats *ax_get_stats(struct net_device *dev) static void ax_setup(struct net_device *dev) { - static char ax25_bcast[AX25_ADDR_LEN] = - {'Q'<<1,'S'<<1,'T'<<1,' '<<1,' '<<1,' '<<1,'0'<<1}; - static char ax25_test[AX25_ADDR_LEN] = - {'L'<<1,'I'<<1,'N'<<1,'U'<<1,'X'<<1,' '<<1,'1'<<1}; - /* Finish setting up the DEVICE info. */ dev->mtu = AX_MTU; dev->hard_start_xmit = ax_xmit; @@ -691,8 +686,8 @@ static void ax_setup(struct net_device *dev) dev->hard_header = ax_header; dev->rebuild_header = ax_rebuild_header; - memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); - memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN); + memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN); + memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN); dev->flags = IFF_BROADCAST | IFF_MULTICAST; } |