diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-19 10:12:43 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-20 19:33:59 +0200 |
commit | 524b09ea34a44fc501edb82bb04cb52f464e96a1 (patch) | |
tree | faa20379c05b23703e9934155756f6515f9d9c84 /drivers/staging/wlan-ng | |
parent | e7c636f2bb50367581bec53782fb15ebf8648936 (diff) |
staging: use eth_hw_addr_set() in orphan drivers
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20211019171243.1412240-9-kuba@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r-- | drivers/staging/wlan-ng/prism2sta.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 1be43300052f..daa7cc4e897c 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -585,6 +585,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev) struct hfa384x *hw = wlandev->priv; u16 temp; u8 snum[HFA384x_RID_NICSERIALNUMBER_LEN]; + u8 addr[ETH_ALEN]; /* Collect version and compatibility info */ /* Some are critical, some are not */ @@ -855,11 +856,12 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev) /* Collect the MAC address */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFOWNMACADDR, - wlandev->netdev->dev_addr, ETH_ALEN); + addr, ETH_ALEN); if (result != 0) { netdev_err(wlandev->netdev, "Failed to retrieve mac address\n"); goto failed; } + eth_hw_addr_set(wlandev->netdev, addr); /* short preamble is always implemented */ wlandev->nsdcaps |= P80211_NSDCAP_SHORT_PREAMBLE; |