mac80211: fix 5.18/5.19 brcm patch

This commit is contained in:
coolsnowwolf 2022-08-12 13:24:13 +00:00
parent e9a10023af
commit 084bf632ae

View File

@ -36,7 +36,7 @@ index 44a11b0..178e692 100644
ndev->ethtool_ops = &brcmf_ethtool_ops; ndev->ethtool_ops = &brcmf_ethtool_ops;
/* set the mac address & netns */ /* set the mac address & netns */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
memcpy(ndev->dev_addr, ifp->mac_addr, ETH_ALEN); memcpy(ndev->dev_addr, ifp->mac_addr, ETH_ALEN);
+#else +#else
+ eth_hw_addr_set(ifp->ndev, ifp->mac_addr); + eth_hw_addr_set(ifp->ndev, ifp->mac_addr);
@ -117,7 +117,7 @@ index 57aa863..f5ebb5a 100644
local->hw.wiphy->perm_addr, local->hw.wiphy->perm_addr,
ETH_ALEN); ETH_ALEN);
+#else +#else
+ eth_hw_addr_set(ndev, params->macaddr); + eth_hw_addr_set(dev, local->hw.wiphy->perm_addr);
+#endif +#endif
memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN); memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN);