Skip to content

Commit

Permalink
[PATCH] Fix 6pack setting of MAC address
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ralfbaechle authored and jgarzik committed Aug 27, 2005
1 parent 84a2ea1 commit 214838a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/net/hamradio/6pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,6 @@ static int sp_set_mac_address(struct net_device *dev, void *addr)
{
struct sockaddr_ax25 *sa = addr;

if (sa->sax25_family != AF_AX25)
return -EINVAL;

if (!sa->sax25_ndigis)
return -EINVAL;

spin_lock_irq(&dev->xmit_lock);
memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN);
spin_unlock_irq(&dev->xmit_lock);
Expand Down

0 comments on commit 214838a

Please sign in to comment.