aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/iface.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 00a1f4ccdaf1..72189661fc49 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -63,15 +63,16 @@ static int ieee80211_change_mtu(struct net_device *dev, int new_mtu)
63static int ieee80211_change_mac(struct net_device *dev, void *addr) 63static int ieee80211_change_mac(struct net_device *dev, void *addr)
64{ 64{
65 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 65 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
66 struct sockaddr *sa = addr;
66 int ret; 67 int ret;
67 68
68 if (ieee80211_sdata_running(sdata)) 69 if (ieee80211_sdata_running(sdata))
69 return -EBUSY; 70 return -EBUSY;
70 71
71 ret = eth_mac_addr(dev, addr); 72 ret = eth_mac_addr(dev, sa);
72 73
73 if (ret == 0) 74 if (ret == 0)
74 memcpy(sdata->vif.addr, addr, ETH_ALEN); 75 memcpy(sdata->vif.addr, sa->sa_data, ETH_ALEN);
75 76
76 return ret; 77 return ret;
77} 78}