aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/6pack.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-15 03:13:44 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-15 03:13:44 -0400
commite308a5d806c852f56590ffdd3834d0df0cbed8d7 (patch)
tree294ff654e90950f5162737c26f4799b0b710b748 /drivers/net/hamradio/6pack.c
parentf1f28aa3510ddb84c966bac65611bb866c77a092 (diff)
netdev: Add netdev->addr_list_lock protection.
Add netif_addr_{lock,unlock}{,_bh}() helpers. Use them to protect operations that operate on or read the network device unicast and multicast address lists. Also use them in cases where the code simply wants to block calls into the driver's ->set_rx_mode() and ->set_multicast_list() methods. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio/6pack.c')
-rw-r--r--drivers/net/hamradio/6pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 06ad9f302b5a..ffc937f5d15d 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -300,7 +300,9 @@ static int sp_set_mac_address(struct net_device *dev, void *addr)
300 struct sockaddr_ax25 *sa = addr; 300 struct sockaddr_ax25 *sa = addr;
301 301
302 netif_tx_lock_bh(dev); 302 netif_tx_lock_bh(dev);
303 netif_addr_lock(dev);
303 memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN); 304 memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN);
305 netif_addr_unlock(dev);
304 netif_tx_unlock_bh(dev); 306 netif_tx_unlock_bh(dev);
305 307
306 return 0; 308 return 0;