1
0
mirror of https://github.com/morrownr/8821cu-20210916.git synced 2024-12-22 14:26:30 +00:00

Merge pull request #172 from morrownr/revert-168-main

Revert "fixed build for kernel 5.14.0 (Rocky Linux 9.5)"
This commit is contained in:
morrownr 2024-12-16 14:05:36 -06:00 committed by GitHub
commit 9a249f5a20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 16 deletions

View File

@ -464,7 +464,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
* called by others with block-tx. * called by others with block-tx.
*/ */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0); cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0);
#else #else
@ -483,7 +483,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
if (!rtw_cfg80211_allow_ch_switch_notify(adapter)) if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
goto exit; goto exit;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0); cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
#else #else
@ -1159,7 +1159,7 @@ check_bss:
#endif #endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
roam_info.links[0].bssid = cur_network->network.MacAddress; roam_info.links[0].bssid = cur_network->network.MacAddress;
#else #else
roam_info.bssid = cur_network->network.MacAddress; roam_info.bssid = cur_network->network.MacAddress;
@ -1923,7 +1923,7 @@ exit:
} }
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
, int link_id , int link_id
#endif #endif
, u8 key_index , u8 key_index
@ -2088,7 +2088,7 @@ addkey_end:
} }
static int cfg80211_rtw_get_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(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
, int link_id , int link_id
#endif #endif
, u8 keyid , u8 keyid
@ -2279,7 +2279,7 @@ exit:
} }
static int cfg80211_rtw_del_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(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
int link_id, int link_id,
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
@ -2303,7 +2303,7 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
struct net_device *ndev, struct net_device *ndev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
int link_id, int link_id,
#endif #endif
u8 key_index u8 key_index
@ -2355,7 +2355,7 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy, int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,
struct net_device *ndev, struct net_device *ndev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
int link_id, int link_id,
#endif #endif
u8 key_index) u8 key_index)
@ -5448,7 +5448,7 @@ exit:
} }
static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
struct cfg80211_ap_update *info) struct cfg80211_ap_update *info)
#else #else
struct cfg80211_beacon_data *info) struct cfg80211_beacon_data *info)
@ -5469,7 +5469,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
rtw_cfg80211_set_proberesp_ies(ndev, info->proberesp_ies, info->proberesp_ies_len); rtw_cfg80211_set_proberesp_ies(ndev, info->proberesp_ies, info->proberesp_ies_len);
#endif /* not_yet */ #endif /* not_yet */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
if (info->beacon.assocresp_ies_len > 0) if (info->beacon.assocresp_ies_len > 0)
rtw_cfg80211_set_assocresp_ies(ndev, info->beacon.assocresp_ies, info->beacon.assocresp_ies_len); rtw_cfg80211_set_assocresp_ies(ndev, info->beacon.assocresp_ies, info->beacon.assocresp_ies_len);
@ -5484,7 +5484,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
return ret; return ret;
} }
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
unsigned int link_id) unsigned int link_id)
#else #else
@ -6870,7 +6870,7 @@ exit:
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
static int cfg80211_rtw_get_channel(struct wiphy *wiphy, static int cfg80211_rtw_get_channel(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
struct wireless_dev *wdev, unsigned int link_id, struct wireless_dev *wdev, unsigned int link_id,
#else #else
struct wireless_dev *wdev, struct wireless_dev *wdev,
@ -10819,7 +10819,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
rtw_cfg80211_indicate_scan_done(adapter, _TRUE); rtw_cfg80211_indicate_scan_done(adapter, _TRUE);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
if (wdev->links[0].client.current_bss) { if (wdev->links[0].client.current_bss) {
#else #else
if (wdev->current_bss) { if (wdev->current_bss) {

View File

@ -2148,7 +2148,7 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj); u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
#ifdef CONFIG_RTW_NAPI #ifdef CONFIG_RTW_NAPI
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
netif_napi_add_weight(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); netif_napi_add_weight(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
#else #else
netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);

View File

@ -336,7 +336,7 @@ struct rtw_usb_drv usb_drv = {
.usbdrv.reset_resume = rtw_resume, .usbdrv.reset_resume = rtw_resume,
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0))
.usbdrv.drvwrap.driver.shutdown = rtw_dev_shutdown, .usbdrv.drvwrap.driver.shutdown = rtw_dev_shutdown,
#else #else
.usbdrv.driver.shutdown = rtw_dev_shutdown, .usbdrv.driver.shutdown = rtw_dev_shutdown,

View File

@ -1309,7 +1309,7 @@ u32 _rtw_down_sema(_sema *sema)
inline void thread_exit(_completion *comp) inline void thread_exit(_completion *comp)
{ {
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
kthread_complete_and_exit(comp, 0); kthread_complete_and_exit(comp, 0);
#else #else
complete_and_exit(comp, 0); complete_and_exit(comp, 0);