Skip to content

Commit a3e2f7c

Browse files
authored
Merge pull request #308 from wiktorek140/master
update to 6.1 kernel
2 parents 50c1b12 + b766476 commit a3e2f7c

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

os_dep/linux/ioctl_cfg80211.c

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,9 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
16481648
}
16491649

16501650
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
1651+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
1652+
, int link_id
1653+
#endif
16511654
, u8 key_index
16521655
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
16531656
, bool pairwise
@@ -1792,6 +1795,9 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
17921795
}
17931796

17941797
static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
1798+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
1799+
, int link_id
1800+
#endif
17951801
, u8 keyid
17961802
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
17971803
, bool pairwise
@@ -1957,6 +1963,9 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
19571963
}
19581964

19591965
static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
1966+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
1967+
int link_id,
1968+
#endif
19601969
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
19611970
u8 key_index, bool pairwise, const u8 *mac_addr)
19621971
#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */
@@ -1977,7 +1986,11 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
19771986
}
19781987

19791988
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
1980-
struct net_device *ndev, u8 key_index
1989+
struct net_device *ndev
1990+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
1991+
, int link_id
1992+
#endif
1993+
, u8 key_index
19811994
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
19821995
, bool unicast, bool multicast
19831996
#endif
@@ -2025,7 +2038,12 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
20252038

20262039
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
20272040
int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,
2028-
struct net_device *ndev, u8 key_index)
2041+
struct net_device *ndev
2042+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
2043+
, int link_idm
2044+
#endif
2045+
, u8 key_index
2046+
)
20292047
{
20302048
#define SET_DEF_KEY_PARAM_FMT " key_index=%d"
20312049
#define SET_DEF_KEY_PARAM_ARG , key_index

os_dep/linux/os_intfs.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,14 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
16801680
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
16811681

16821682
#ifdef CONFIG_RTW_NAPI
1683-
netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
1683+
netif_napi_add(
1684+
ndev,
1685+
&adapter->napi,
1686+
rtw_recv_napi_poll
1687+
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0))
1688+
, RTL_NAPI_WEIGHT
1689+
#endif
1690+
);
16841691
#endif /* CONFIG_RTW_NAPI */
16851692

16861693
#if defined(CONFIG_IOCTL_CFG80211)

os_dep/osdep_service.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2636,7 +2636,9 @@ u64 rtw_division64(u64 x, u64 y)
26362636
inline u32 rtw_random32(void)
26372637
{
26382638
#ifdef PLATFORM_LINUX
2639-
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
2639+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
2640+
return get_random_u32();
2641+
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
26402642
return prandom_u32();
26412643
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
26422644
u32 random_int;

0 commit comments

Comments
 (0)