1
- diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
2
- index 44a11b0..178e692 100644
3
1
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
4
2
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
5
- @@ -245,7 +245,11 @@
3
+ @@ -245,7 +245,11 @@ static int brcmf_netdev_set_mac_address(
6
4
} else {
7
5
brcmf_dbg(TRACE, "updated to %pM\n", sa->sa_data);
8
6
memcpy(ifp->mac_addr, sa->sa_data, ETH_ALEN);
@@ -14,53 +12,51 @@ index 44a11b0..178e692 100644
14
12
}
15
13
return err;
16
14
}
17
- @@ -424,6 +428,7 @@
15
+ @@ -424,6 +428,7 @@ void brcmf_netif_rx(struct brcmf_if *ifp
18
16
ifp->ndev->stats.rx_packets++;
19
-
17
+
20
18
brcmf_dbg(DATA, "rx proto=0x%X\n", ntohs(skb->protocol));
21
19
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
22
20
if (inirq) {
23
21
netif_rx(skb);
24
22
} else {
25
- @@ -433,6 +438,9 @@
23
+ @@ -433,6 +438,9 @@ void brcmf_netif_rx(struct brcmf_if *ifp
26
24
*/
27
25
netif_rx_ni(skb);
28
26
}
29
27
+ #else
30
28
+ netif_rx(skb);
31
29
+ #endif
32
30
}
33
-
31
+
34
32
void brcmf_netif_mon_rx(struct brcmf_if *ifp, struct sk_buff *skb)
35
- @@ -673,7 +681,11 @@
33
+ @@ -673,7 +681,11 @@ int brcmf_net_attach(struct brcmf_if *if
36
34
ndev->ethtool_ops = &brcmf_ethtool_ops;
37
-
35
+
38
36
/* set the mac address & netns */
39
37
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
40
38
memcpy(ndev->dev_addr, ifp->mac_addr, ETH_ALEN);
41
39
+ #else
42
40
+ eth_hw_addr_set(ifp->ndev, ifp->mac_addr);
43
41
+ #endif
44
42
dev_net_set(ndev, wiphy_net(cfg_to_wiphy(drvr->config)));
45
-
43
+
46
44
INIT_WORK(&ifp->multicast_work, _brcmf_set_multicast_list);
47
- @@ -848,7 +860,11 @@
45
+ @@ -848,7 +860,11 @@ static int brcmf_net_p2p_attach(struct b
48
46
ndev->netdev_ops = &brcmf_netdev_ops_p2p;
49
-
47
+
50
48
/* set the mac address */
51
49
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
52
50
memcpy(ndev->dev_addr, ifp->mac_addr, ETH_ALEN);
53
51
+ #else
54
52
+ eth_hw_addr_set(ndev, ifp->mac_addr);
55
53
+ #endif
56
-
54
+
57
55
if (register_netdev(ndev) != 0) {
58
56
bphy_err(drvr, "couldn't register the p2p net device\n");
59
- diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
60
- index 9ac0d8c..4735063 100644
61
57
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
62
58
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
63
- @@ -2125,7 +2125,7 @@ static int brcmf_p2p_disable_p2p_if(struct brcmf_cfg80211_vif *vif)
59
+ @@ -2125,7 +2125,7 @@ static int brcmf_p2p_disable_p2p_if(stru
64
60
struct brcmf_cfg80211_info *cfg = wdev_to_cfg(&vif->wdev);
65
61
struct net_device *pri_ndev = cfg_to_ndev(cfg);
66
62
struct brcmf_if *ifp = netdev_priv(pri_ndev);
@@ -69,7 +65,7 @@ index 9ac0d8c..4735063 100644
69
65
70
66
return brcmf_fil_iovar_data_set(ifp, "p2p_ifdis", addr, ETH_ALEN);
71
67
}
72
- @@ -2135,7 +2135,7 @@ static int brcmf_p2p_release_p2p_if(struct brcmf_cfg80211_vif *vif)
68
+ @@ -2135,7 +2135,7 @@ static int brcmf_p2p_release_p2p_if(stru
73
69
struct brcmf_cfg80211_info *cfg = wdev_to_cfg(&vif->wdev);
74
70
struct net_device *pri_ndev = cfg_to_ndev(cfg);
75
71
struct brcmf_if *ifp = netdev_priv(pri_ndev);
@@ -78,11 +74,9 @@ index 9ac0d8c..4735063 100644
78
74
79
75
return brcmf_fil_iovar_data_set(ifp, "p2p_ifdel", addr, ETH_ALEN);
80
76
}
81
- diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
82
- index 8effeb7..04362e2 100644
83
77
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
84
78
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
85
- @@ -4164,7 +4164,11 @@
79
+ @@ -4164,7 +4164,11 @@ static int brcmf_sdio_bus_reset(struct d
86
80
87
81
/* reset the adapter */
88
82
sdio_claim_host(sdiodev->func1);
@@ -94,8 +88,6 @@ index 8effeb7..04362e2 100644
94
88
sdio_release_host(sdiodev->func1);
95
89
96
90
brcmf_bus_change_state(sdiodev->bus_if, BRCMF_BUS_DOWN);
97
- diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
98
- index ab83553..7941d28 100644
99
91
--- a/include/net/cfg80211.h
100
92
+++ b/include/net/cfg80211.h
101
93
@@ -5555,7 +5555,7 @@ struct wireless_dev {
@@ -107,11 +99,9 @@ index ab83553..7941d28 100644
107
99
{
108
100
if (wdev->netdev)
109
101
return wdev->netdev->dev_addr;
110
- diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
111
- index 57aa863..f5ebb5a 100644
112
102
--- a/net/mac80211/iface.c
113
103
+++ b/net/mac80211/iface.c
114
- @@ -1274,9 +1274,13 @@
104
+ @@ -1274,9 +1274,13 @@ int ieee80211_do_open(struct wireless_de
115
105
* this interface, if it has the special null one.
116
106
*/
117
107
if (dev && is_zero_ether_addr(dev->dev_addr)) {
@@ -123,10 +113,10 @@ index 57aa863..f5ebb5a 100644
123
113
+ eth_hw_addr_set(dev, local->hw.wiphy->perm_addr);
124
114
+ #endif
125
115
memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN);
126
-
116
+
127
117
if (!is_valid_ether_addr(dev->dev_addr)) {
128
- @@ -2136,9 +2140,17 @@
129
-
118
+ @@ -2136,9 +2140,17 @@ int ieee80211_if_add(struct ieee80211_lo
119
+
130
120
ieee80211_assign_perm_addr(local, ndev->perm_addr, type);
131
121
if (is_valid_ether_addr(params->macaddr))
132
122
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
@@ -141,5 +131,5 @@ index 57aa863..f5ebb5a 100644
141
131
+ eth_hw_addr_set(ndev, ndev->perm_addr);
142
132
+ #endif
143
133
SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));
144
-
134
+
145
135
/* don't use IEEE80211_DEV_TO_SUB_IF -- it checks too much */
0 commit comments