mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-25 14:44:09 +00:00
Merge pull request #359 from v3l0c1r4pt0r/v5.1.5
Fixes for kernel version 5.1.4
This commit is contained in:
commit
3df255bf29
@ -1038,7 +1038,8 @@ typedef enum _HT_CAP_AMPDU_DENSITY {
|
||||
* According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2)
|
||||
*/
|
||||
#define IEEE80211_MIN_AMPDU_BUF 0x8
|
||||
#define IEEE80211_MAX_AMPDU_BUF 0x40
|
||||
#define IEEE80211_MAX_AMPDU_BUF_HT 0x40
|
||||
#define IEEE80211_MAX_AMPDU_BUF 0x100
|
||||
|
||||
|
||||
/* Spatial Multiplexing Power Save Modes */
|
||||
|
@ -342,7 +342,11 @@ static const struct ieee80211_txrx_stypes
|
||||
|
||||
static u64 rtw_get_systime_us(void)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
|
||||
struct timespec64 ts;
|
||||
ktime_get_boottime_ts64(&ts);
|
||||
return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
|
||||
struct timespec ts;
|
||||
get_monotonic_boottime(&ts);
|
||||
return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
|
||||
|
@ -1058,11 +1058,14 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
|
||||
return dscp >> 5;
|
||||
}
|
||||
|
||||
|
||||
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0))
|
||||
, void *accel_priv
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
#else
|
||||
, struct net_device *sb_dev
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0))
|
||||
, select_queue_fallback_t fallback
|
||||
#endif
|
||||
#endif
|
||||
|
@ -630,7 +630,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0))
|
||||
if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) {
|
||||
#else
|
||||
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
|
||||
#endif
|
||||
RTW_INFO("%s: failed to access memory\n", __FUNCTION__);
|
||||
ret = -EFAULT;
|
||||
goto exit;
|
||||
|
@ -1961,7 +1961,7 @@ static int isFileReadable(char *path)
|
||||
ret = PTR_ERR(fp);
|
||||
else {
|
||||
oldfs = get_fs();
|
||||
set_fs(get_ds());
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
if (1 != readFile(fp, &buf, 1))
|
||||
ret = PTR_ERR(fp);
|
||||
@ -1991,7 +1991,7 @@ static int retriveFromFile(char *path, u8 *buf, u32 sz)
|
||||
RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp);
|
||||
|
||||
oldfs = get_fs();
|
||||
set_fs(get_ds());
|
||||
set_fs(KERNEL_DS);
|
||||
ret = readFile(fp, buf, sz);
|
||||
set_fs(oldfs);
|
||||
closeFile(fp);
|
||||
@ -2026,7 +2026,7 @@ static int storeToFile(char *path, u8 *buf, u32 sz)
|
||||
RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp);
|
||||
|
||||
oldfs = get_fs();
|
||||
set_fs(get_ds());
|
||||
set_fs(KERNEL_DS);
|
||||
ret = writeFile(fp, buf, sz);
|
||||
set_fs(oldfs);
|
||||
closeFile(fp);
|
||||
|
Loading…
Reference in New Issue
Block a user