diff options
author | Arend van Spriel <arend@broadcom.com> | 2012-11-14 21:46:11 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-16 14:28:51 -0500 |
commit | 9bcb74f919db1965fa74393d4b545e7b489e91fb (patch) | |
tree | d9b565281c3563dfa633f13e35d9aeb5d58fc687 | |
parent | 607d5c0ef6c4d3a2e7a61ba1b62baa0712366bc0 (diff) |
brcmfmac: change mac address parameter in brcmf_add_if()
The function brcmf_add_if() is called with mac address set to NULL
for the primary interface. When handling IF ADD events the firmware
provides a address mask in the event to derive its mac address from
the primary mac address. Rename the parameter and use it as a mask.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c index 32b73550e5ad..9a590cb06d93 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | |||
@@ -690,10 +690,11 @@ fail: | |||
690 | } | 690 | } |
691 | 691 | ||
692 | struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx, s32 bssidx, | 692 | struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx, s32 bssidx, |
693 | char *name, u8 *mac_addr) | 693 | char *name, u8 *addr_mask) |
694 | { | 694 | { |
695 | struct brcmf_if *ifp; | 695 | struct brcmf_if *ifp; |
696 | struct net_device *ndev; | 696 | struct net_device *ndev; |
697 | int i; | ||
697 | 698 | ||
698 | brcmf_dbg(TRACE, "idx %d\n", ifidx); | 699 | brcmf_dbg(TRACE, "idx %d\n", ifidx); |
699 | 700 | ||
@@ -728,11 +729,12 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx, s32 bssidx, | |||
728 | INIT_WORK(&ifp->setmacaddr_work, _brcmf_set_mac_address); | 729 | INIT_WORK(&ifp->setmacaddr_work, _brcmf_set_mac_address); |
729 | INIT_WORK(&ifp->multicast_work, _brcmf_set_multicast_list); | 730 | INIT_WORK(&ifp->multicast_work, _brcmf_set_multicast_list); |
730 | 731 | ||
731 | if (mac_addr != NULL) | 732 | if (addr_mask != NULL) |
732 | memcpy(&ifp->mac_addr, mac_addr, ETH_ALEN); | 733 | for (i = 0; i < ETH_ALEN; i++) |
734 | ifp->mac_addr[i] = drvr->mac[i] ^ addr_mask[i]; | ||
733 | 735 | ||
734 | brcmf_dbg(TRACE, " ==== pid:%x, net_device for if:%s created ===\n", | 736 | brcmf_dbg(TRACE, " ==== pid:%x, if:%s (%pM) created ===\n", |
735 | current->pid, ifp->ndev->name); | 737 | current->pid, ifp->ndev->name, ifp->mac_addr); |
736 | 738 | ||
737 | return ifp; | 739 | return ifp; |
738 | } | 740 | } |