1From a63a5f70e5cf05f6bce4cda2e0dd67462e1d76a5 Mon Sep 17 00:00:00 2001
2From: Joan Bruguera <joanbrugueram@gmail.com>
3Date: Mon, 29 Aug 2022 00:06:53 +0200
4Subject: [PATCH] Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 6.1-rc1
5
6Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-35 on Arch Linux
7---
8 src/wl/sys/wl_cfg80211_hybrid.c | 21 +++++++++++++--------
9 1 file changed, 13 insertions(+), 8 deletions(-)
10
11diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
12index 4fef22a..50d1e34 100644
13--- a/src/wl/sys/wl_cfg80211_hybrid.c
14+++ b/src/wl/sys/wl_cfg80211_hybrid.c
15@@ -105,20 +105,25 @@ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wd
16 static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm);
17 #endif
18
19+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
20+#define MAYBE_INT_LINK_ID int link_id,
21+#else
22+#define MAYBE_INT_LINK_ID
23+#endif
24 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
25 static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy,
26- struct net_device *dev, u8 key_idx, bool unicast, bool multicast);
27+ struct net_device *dev, MAYBE_INT_LINK_ID u8 key_idx, bool unicast, bool multicast);
28 #else
29 static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy,
30 struct net_device *dev, u8 key_idx);
31 #endif
32 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
33 static s32 wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
34- u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params);
35+ MAYBE_INT_LINK_ID u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params);
36 static s32 wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
37- u8 key_idx, bool pairwise, const u8 *mac_addr);
38+ MAYBE_INT_LINK_ID u8 key_idx, bool pairwise, const u8 *mac_addr);
39 static s32 wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev,
40- u8 key_idx, bool pairwise, const u8 *mac_addr,
41+ MAYBE_INT_LINK_ID u8 key_idx, bool pairwise, const u8 *mac_addr,
42 void *cookie, void (*callback) (void *cookie, struct key_params *params));
43 #else
44 static s32 wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
45@@ -1165,7 +1170,7 @@ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm)
46 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
47 static s32
48 wl_cfg80211_config_default_key(struct wiphy *wiphy,
49- struct net_device *dev, u8 key_idx, bool unicast, bool multicast)
50+ struct net_device *dev, MAYBE_INT_LINK_ID u8 key_idx, bool unicast, bool multicast)
51 #else
52 static s32
53 wl_cfg80211_config_default_key(struct wiphy *wiphy,
54@@ -1190,7 +1195,7 @@ wl_cfg80211_config_default_key(struct wiphy *wiphy,
55 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
56 static s32
57 wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
58- u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params)
59+ MAYBE_INT_LINK_ID u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params)
60 #else
61 static s32
62 wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
63@@ -1311,7 +1316,7 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
64 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
65 static s32
66 wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
67- u8 key_idx, bool pairwise, const u8 *mac_addr)
68+ MAYBE_INT_LINK_ID u8 key_idx, bool pairwise, const u8 *mac_addr)
69 #else
70 static s32
71 wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
72@@ -1354,7 +1359,7 @@ wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
73 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
74 static s32
75 wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev,
76- u8 key_idx, bool pairwise, const u8 *mac_addr, void *cookie,
77+ MAYBE_INT_LINK_ID u8 key_idx, bool pairwise, const u8 *mac_addr, void *cookie,
78 void (*callback) (void *cookie, struct key_params * params))
79 #else
80 static s32
81--
822.37.2
83