diff mbox

brcmfmac: set wiphy perm_addr to hardware MAC address

Message ID 1433033546-19214-1-git-send-email-zajec5@gmail.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Rafał Miłecki May 31, 2015, 12:52 a.m. UTC
This allows e.g. user space to use /sys/class/ieee80211/*/macaddress

Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Arend van Spriel June 1, 2015, 11:47 a.m. UTC | #1
On 05/31/15 02:52, Rafa? Mi?ecki wrote:
> This allows e.g. user space to use /sys/class/ieee80211/*/macaddress

Acked-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Rafa? Mi?ecki<zajec5@gmail.com>
> ---
>   drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
> index 6fe2b75..955dd0a 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
> @@ -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);

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo June 8, 2015, 11:27 a.m. UTC | #2
Rafa? Mi?ecki <zajec5@gmail.com> writes:

> This allows e.g. user space to use /sys/class/ieee80211/*/macaddress
>
> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>

Thanks, applied manually.
diff mbox

Patch

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
index 6fe2b75..955dd0a 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
@@ -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);