diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-08-24 13:01:33 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-27 04:32:39 -0400 |
commit | 214838a2108b4b1e18abce2e28d37996e9bf7c68 (patch) | |
tree | 090a6020ec9c9c4e91615465b54e29084244d9f7 /drivers/net/hamradio | |
parent | 84a2ea1c2cee0288f96e0c6aa4f975d4d26508c7 (diff) |
[PATCH] Fix 6pack setting of MAC address
Don't check type of sax25_family; dev_set_mac_address has already done
that before and anyway, the type to check against would have been
ARPHRD_AX25. We only got away because AF_AX25 and ARPHRD_AX25 both happen
to be defined to the same value.
Don't check sax25_ndigis either; it's value is insignificant for the
purpose of setting the MAC address and the check has shown to break
some application software for no good reason.
Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/hamradio')
-rw-r--r-- | drivers/net/hamradio/6pack.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index b59c65b9645b..0b230222bfea 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c | |||
@@ -308,12 +308,6 @@ static int sp_set_mac_address(struct net_device *dev, void *addr) | |||
308 | { | 308 | { |
309 | struct sockaddr_ax25 *sa = addr; | 309 | struct sockaddr_ax25 *sa = addr; |
310 | 310 | ||
311 | if (sa->sax25_family != AF_AX25) | ||
312 | return -EINVAL; | ||
313 | |||
314 | if (!sa->sax25_ndigis) | ||
315 | return -EINVAL; | ||
316 | |||
317 | spin_lock_irq(&dev->xmit_lock); | 311 | spin_lock_irq(&dev->xmit_lock); |
318 | memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN); | 312 | memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN); |
319 | spin_unlock_irq(&dev->xmit_lock); | 313 | spin_unlock_irq(&dev->xmit_lock); |