Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197348
b: refs/heads/master
c: adaaa0c
h: refs/heads/master
v: v3
  • Loading branch information
Linus Lüssing authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 318b092 commit fbaab51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: de37cd49b5a54facef174cf34496919857436e8f
refs/heads/master: adaaa0c6ab89e82684389b80002bce893179cf2c
8 changes: 6 additions & 2 deletions trunk/drivers/staging/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,13 @@ int interface_set_mac_addr(struct net_device *dev, void *p)
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;

hna_local_remove(dev->dev_addr, "mac address changed");
/* only modify hna-table if it has been initialised before */
if (atomic_read(&module_state) == MODULE_ACTIVE) {
hna_local_remove(dev->dev_addr, "mac address changed");
hna_local_add(addr->sa_data);
}

memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
hna_local_add(dev->dev_addr);

return 0;
}
Expand Down

0 comments on commit fbaab51

Please sign in to comment.