From 15b1c0e822f578306332d4f4c449250db5c5dceb Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 7 Dec 2006 15:47:08 -0800 Subject: [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 Signed-off-by: David S. Miller --- drivers/net/hamradio/scc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'drivers/net/hamradio/scc.c') diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index ec9b6d9b6f05..2ce047e9d262 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c @@ -1540,11 +1540,6 @@ static int scc_net_alloc(const char *name, struct scc_channel *scc) /* * Network driver methods * */ /* ******************************************************************** */ -static unsigned char ax25_bcast[AX25_ADDR_LEN] = -{'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, '0' << 1}; -static unsigned char ax25_nocall[AX25_ADDR_LEN] = -{'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, '1' << 1}; - /* ----> Initialize device <----- */ static void scc_net_setup(struct net_device *dev) @@ -1562,8 +1557,8 @@ static void scc_net_setup(struct net_device *dev) dev->do_ioctl = scc_net_ioctl; dev->tx_timeout = NULL; - memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); - memcpy(dev->dev_addr, ax25_nocall, AX25_ADDR_LEN); + memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN); + memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN); dev->flags = 0; -- cgit v1.2.2