diff options
author | John W. Linville <linville@tuxdriver.com> | 2009-10-06 16:27:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:48 -0400 |
commit | 0adc23f58e21cb47be998063ea1b82de33ccdd46 (patch) | |
tree | 3cab85dd2b4b8b78360d5be0ade54ef112159df3 /net/mac80211/iface.c | |
parent | ff9fc791940f9ff51387c35f9332efe5007154f1 (diff) |
mac80211: support ETHTOOL_GPERMADDR
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index f6005adcbf90..87aff1d923ba 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -184,10 +184,12 @@ static int ieee80211_open(struct net_device *dev) | |||
184 | * No need to check netif_running since we do not allow | 184 | * No need to check netif_running since we do not allow |
185 | * it to start up with this invalid address. | 185 | * it to start up with this invalid address. |
186 | */ | 186 | */ |
187 | if (compare_ether_addr(null_addr, ndev->dev_addr) == 0) | 187 | if (compare_ether_addr(null_addr, ndev->dev_addr) == 0) { |
188 | memcpy(ndev->dev_addr, | 188 | memcpy(ndev->dev_addr, |
189 | local->hw.wiphy->perm_addr, | 189 | local->hw.wiphy->perm_addr, |
190 | ETH_ALEN); | 190 | ETH_ALEN); |
191 | memcpy(ndev->perm_addr, ndev->dev_addr, ETH_ALEN); | ||
192 | } | ||
191 | } | 193 | } |
192 | 194 | ||
193 | /* | 195 | /* |
@@ -784,6 +786,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, | |||
784 | goto fail; | 786 | goto fail; |
785 | 787 | ||
786 | memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN); | 788 | memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN); |
789 | memcpy(ndev->perm_addr, ndev->dev_addr, ETH_ALEN); | ||
787 | SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy)); | 790 | SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy)); |
788 | 791 | ||
789 | /* don't use IEEE80211_DEV_TO_SUB_IF because it checks too much */ | 792 | /* don't use IEEE80211_DEV_TO_SUB_IF because it checks too much */ |