mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-11-22 05:25:03 +00:00
Merge pull request #232 from CGarces/centos8_fix
Add RHEL/CENTOS 8 support
This commit is contained in:
commit
e103b7c701
@ -258,7 +258,7 @@ void rtw_txpwr_init_regd(struct rf_ctl_t *rfctl)
|
||||
);
|
||||
if (rfctl->regd_name)
|
||||
break;
|
||||
__attribute__ ((__fallthrough__));
|
||||
/* fallthrough */
|
||||
default:
|
||||
rfctl->regd_name = regd_str(TXPWR_LMT_WW);
|
||||
RTW_PRINT("assign %s for default case\n", regd_str(TXPWR_LMT_WW));
|
||||
@ -1344,7 +1344,7 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame)
|
||||
else
|
||||
ptable->func = &OnAuthClient;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
|
||||
__attribute__ ((fallthrough));
|
||||
/* fallthrough */
|
||||
#else
|
||||
__attribute__ ((__fallthrough__));
|
||||
#endif
|
||||
@ -16785,4 +16785,3 @@ exit:
|
||||
return _SUCCESS;
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,11 @@
|
||||
|
||||
typedef signed int sint;
|
||||
|
||||
#ifndef RHEL_RELEASE_CODE
|
||||
#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b))
|
||||
#define RHEL_RELEASE_CODE 0
|
||||
#endif
|
||||
|
||||
#ifndef PVOID
|
||||
typedef void *PVOID;
|
||||
/* #define PVOID (void *) */
|
||||
|
@ -1033,9 +1033,11 @@ typedef enum _HT_CAP_AMPDU_DENSITY {
|
||||
* A-PMDU buffer sizes
|
||||
* According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2)
|
||||
*/
|
||||
#define IEEE80211_MIN_AMPDU_BUF 0x8
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0))
|
||||
#define IEEE80211_MAX_AMPDU_BUF 0x40
|
||||
#ifndef IEEE80211_MIN_AMPDU_BUF
|
||||
#define IEEE80211_MIN_AMPDU_BUF 0x8
|
||||
#endif
|
||||
#ifndef IEEE80211_MAX_AMPDU_BUF
|
||||
#define IEEE80211_MAX_AMPDU_BUF 0x40
|
||||
#endif
|
||||
|
||||
/* Spatial Multiplexing Power Save Modes */
|
||||
|
@ -1337,7 +1337,7 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
|
||||
|
||||
|
||||
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,0)
|
||||
, struct net_device *sb_dev
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
|
||||
, void *accel_priv
|
||||
|
@ -663,7 +663,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
||||
ret = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,0))
|
||||
if (!access_ok(priv_cmd.buf, priv_cmd.total_len)){
|
||||
#else
|
||||
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
|
||||
|
Loading…
Reference in New Issue
Block a user