Skip to content

Commit

Permalink
Merge pull request #308 from wiktorek140/master
Browse files Browse the repository at this point in the history
update to 6.1 kernel
  • Loading branch information
tomaspinho authored Jan 1, 2023
2 parents 50c1b12 + b766476 commit a3e2f7c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
22 changes: 20 additions & 2 deletions os_dep/linux/ioctl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1648,6 +1648,9 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
}

static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
, int link_id
#endif
, u8 key_index
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
, bool pairwise
Expand Down Expand Up @@ -1792,6 +1795,9 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
}

static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
, int link_id
#endif
, u8 keyid
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
, bool pairwise
Expand Down Expand Up @@ -1957,6 +1963,9 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
}

static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
int link_id,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
u8 key_index, bool pairwise, const u8 *mac_addr)
#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */
Expand All @@ -1977,7 +1986,11 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
}

static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
struct net_device *ndev, u8 key_index
struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
, int link_id
#endif
, u8 key_index
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
, bool unicast, bool multicast
#endif
Expand Down Expand Up @@ -2025,7 +2038,12 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,
struct net_device *ndev, u8 key_index)
struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
, int link_idm
#endif
, u8 key_index
)
{
#define SET_DEF_KEY_PARAM_FMT " key_index=%d"
#define SET_DEF_KEY_PARAM_ARG , key_index
Expand Down
9 changes: 8 additions & 1 deletion os_dep/linux/os_intfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,14 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);

#ifdef CONFIG_RTW_NAPI
netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
netif_napi_add(
ndev,
&adapter->napi,
rtw_recv_napi_poll
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0))
, RTL_NAPI_WEIGHT
#endif
);
#endif /* CONFIG_RTW_NAPI */

#if defined(CONFIG_IOCTL_CFG80211)
Expand Down
4 changes: 3 additions & 1 deletion os_dep/osdep_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -2636,7 +2636,9 @@ u64 rtw_division64(u64 x, u64 y)
inline u32 rtw_random32(void)
{
#ifdef PLATFORM_LINUX
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
return get_random_u32();
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
return prandom_u32();
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
u32 random_int;
Expand Down

1 comment on commit a3e2f7c

@moscowstereo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please help me please...
please make a working DEBIAN driver for asus adapter from these files:

  1. Linux_PCE_N53_1008 (1).zip
  2. https://github.com/mareksuscak/asus-pce-n53-linux
  3. https://github.com/unused/patched-Asus-PCE-N53-linux-driver
  4. https://github.com/kuttor/Asus-N53-PCU-RT5592STA-Driver-for-Linux-Kernel-4.6-Ubuntu-16.10

I don’t know how to use Linux, and either the installation instructions are written too confusingly or the drivers themselves have errors, but I couldn’t install any other than yours ...

despite the fact that your driver is installed successfully, but it is for other equipment ...

I think you are the only one who understands this issue

help me please

Please sign in to comment.