Skip to contentSkip to conversation

brcmfmac: set wiphy perm_addr to hardware MAC address

PATCH Applied Rafał Miłecki 3 participants 3 messages May 31, 2015 – Jun 8, 2015 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 brcmfmac: set wiphy perm_addr to hardware MAC address

This allows e.g. user space to use /sys/class/ieee80211/*/macaddress

---
 drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +1 -0
index 6fe2b75..955dd0a 100644
@@ -6071,6 +6071,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,
 		brcmf_err("Could not allocate wiphy device\n");
 		return NULL;
 	}
+	memcpy(wiphy->perm_addr, drvr->mac, ETH_ALEN);
 	set_wiphy_dev(wiphy, busdev);
 
 	cfg = wiphy_priv(wiphy);
Signature · 1 line
1.8.4.5
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Rafał Miłecki

This allows e.g. user space to use /sys/class/ieee80211/*/macaddress

Quoted 17 lines
---
  drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 1 +
  1 file changed, 1 insertion(+)
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +1 -0
index 6fe2b75..955dd0a 100644
@@ -6071,6 +6071,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,
  		brcmf_err("Could not allocate wiphy device\n");
  		return NULL;
  	}
+	memcpy(wiphy->perm_addr, drvr->mac, ETH_ALEN);
  	set_wiphy_dev(wiphy, busdev);
 
  	cfg = wiphy_priv(wiphy);