Skip to content

Commit

Permalink
mac80211: support ETHTOOL_GPERMADDR
Browse files Browse the repository at this point in the history
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
John W. Linville committed Oct 7, 2009
1 parent ff9fc79 commit 0adc23f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,12 @@ static int ieee80211_open(struct net_device *dev)
* No need to check netif_running since we do not allow
* it to start up with this invalid address.
*/
if (compare_ether_addr(null_addr, ndev->dev_addr) == 0)
if (compare_ether_addr(null_addr, ndev->dev_addr) == 0) {
memcpy(ndev->dev_addr,
local->hw.wiphy->perm_addr,
ETH_ALEN);
memcpy(ndev->perm_addr, ndev->dev_addr, ETH_ALEN);
}
}

/*
Expand Down Expand Up @@ -784,6 +786,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
goto fail;

memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN);
memcpy(ndev->perm_addr, ndev->dev_addr, ETH_ALEN);
SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));

/* don't use IEEE80211_DEV_TO_SUB_IF because it checks too much */
Expand Down

0 comments on commit 0adc23f

Please sign in to comment.