New upstream version 5.3.9~git20200316

This commit is contained in:
Sophie Brun
2020-05-14 11:44:14 +02:00
parent 64d530c26f
commit be8eedcf76
18 changed files with 204 additions and 75 deletions

View File

@@ -686,9 +686,13 @@ static int rtw_cfg80211_sync_iftype(_adapter *adapter)
static u64 rtw_get_systime_us(void)
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0))
struct timespec64 ts;
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
struct timespec ts;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0))
getboottime64(&ts);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
getboottime(&ts);
#else
get_monotonic_boottime(&ts);
@@ -2367,6 +2371,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
case NL80211_IFTYPE_P2P_CLIENT:
is_p2p = _TRUE;
#endif
__attribute__ ((__fallthrough__));
case NL80211_IFTYPE_STATION:
networkType = Ndis802_11Infrastructure;
@@ -2391,6 +2396,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
case NL80211_IFTYPE_P2P_GO:
is_p2p = _TRUE;
#endif
__attribute__ ((__fallthrough__));
case NL80211_IFTYPE_AP:
networkType = Ndis802_11APMode;

View File

@@ -817,7 +817,7 @@ void rtw_regsty_load_target_tx_power(struct registry_priv *regsty)
#endif /* CONFIG_IEEE80211_BAND_5GHZ */
}
inline void rtw_regsty_load_excl_chs(struct registry_priv *regsty)
static inline void rtw_regsty_load_excl_chs(struct registry_priv *regsty)
{
int i;
int ch_num = 0;
@@ -831,7 +831,7 @@ inline void rtw_regsty_load_excl_chs(struct registry_priv *regsty)
}
#ifdef CONFIG_80211N_HT
inline void rtw_regsty_init_rx_ampdu_sz_limit(struct registry_priv *regsty)
static inline void rtw_regsty_init_rx_ampdu_sz_limit(struct registry_priv *regsty)
{
int i, j;
uint *sz_limit;
@@ -1284,17 +1284,18 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
return dscp >> 5;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0))
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev)
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev,
select_queue_fallback_t fallback)
#else
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
void *accel_priv, select_queue_fallback_t fallback)
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
#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
)
{
_adapter *padapter = rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

View File

@@ -62,7 +62,12 @@ inline struct proc_dir_entry *rtw_proc_create_dir(const char *name, struct proc_
}
inline struct proc_dir_entry *rtw_proc_create_entry(const char *name, struct proc_dir_entry *parent,
const struct file_operations *fops, void * data)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0))
const struct proc_ops *fops, void * data)
#else
const struct file_operations *fops, void * data)
#endif
{
struct proc_dir_entry *entry;
@@ -230,6 +235,26 @@ static ssize_t rtw_drv_proc_write(struct file *file, const char __user *buffer,
return -EROFS;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0))
static const struct proc_ops rtw_drv_proc_seq_fops = {
//.proc_owner = THIS_MODULE,
.proc_open = rtw_drv_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = seq_release,
.proc_write = rtw_drv_proc_write,
};
static const struct proc_ops rtw_drv_proc_sseq_fops = {
//.proc_owner = THIS_MODULE,
.proc_open = rtw_drv_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = single_release,
.proc_write = rtw_drv_proc_write,
};
#else
static const struct file_operations rtw_drv_proc_seq_fops = {
.owner = THIS_MODULE,
.open = rtw_drv_proc_open,
@@ -247,6 +272,7 @@ static const struct file_operations rtw_drv_proc_sseq_fops = {
.release = single_release,
.write = rtw_drv_proc_write,
};
#endif
int rtw_drv_proc_init(void)
{
@@ -3683,6 +3709,27 @@ static ssize_t rtw_adapter_proc_write(struct file *file, const char __user *buff
return -EROFS;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0))
static const struct proc_ops rtw_adapter_proc_seq_fops = {
//.proc_owner = THIS_MODULE,
.proc_open = rtw_adapter_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = seq_release,
.proc_write = rtw_adapter_proc_write,
};
static const struct proc_ops rtw_adapter_proc_sseq_fops = {
//.proc_owner = THIS_MODULE,
.proc_open = rtw_adapter_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = single_release,
.proc_write = rtw_adapter_proc_write,
};
#else
static const struct file_operations rtw_adapter_proc_seq_fops = {
.owner = THIS_MODULE,
.open = rtw_adapter_proc_open,
@@ -3700,6 +3747,7 @@ static const struct file_operations rtw_adapter_proc_sseq_fops = {
.release = single_release,
.write = rtw_adapter_proc_write,
};
#endif
int proc_get_odm_adaptivity(struct seq_file *m, void *v)
{
@@ -3855,6 +3903,26 @@ static ssize_t rtw_odm_proc_write(struct file *file, const char __user *buffer,
return -EROFS;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0))
static const struct proc_ops rtw_odm_proc_seq_fops = {
//.proc_owner = THIS_MODULE,
.proc_open = rtw_odm_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = seq_release,
.proc_write = rtw_odm_proc_write,
};
static const struct proc_ops rtw_odm_proc_sseq_fops = {
//.proc_owner = THIS_MODULE,
.proc_open = rtw_odm_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = single_release,
.proc_write = rtw_odm_proc_write,
};
#else
static const struct file_operations rtw_odm_proc_seq_fops = {
.owner = THIS_MODULE,
.open = rtw_odm_proc_open,
@@ -3873,6 +3941,8 @@ static const struct file_operations rtw_odm_proc_sseq_fops = {
.write = rtw_odm_proc_write,
};
#endif
struct proc_dir_entry *rtw_odm_proc_init(struct net_device *dev)
{
struct proc_dir_entry *dir_odm = NULL;
@@ -3996,6 +4066,26 @@ static ssize_t rtw_mcc_proc_write(struct file *file, const char __user *buffer,
return -EROFS;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0))
static const struct proc_ops rtw_mcc_proc_seq_fops = {
.proc_owner = THIS_MODULE,
.proc_open = rtw_mcc_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = seq_release,
.proc_write = rtw_mcc_proc_write,
};
static const struct proc_ops rtw_mcc_proc_sseq_fops = {
.proc_owner = THIS_MODULE,
.proc_open = rtw_mcc_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = single_release,
.proc_write = rtw_mcc_proc_write,
};
#else
static const struct file_operations rtw_mcc_proc_seq_fops = {
.owner = THIS_MODULE,
.open = rtw_mcc_proc_open,
@@ -4013,6 +4103,7 @@ static const struct file_operations rtw_mcc_proc_sseq_fops = {
.release = single_release,
.write = rtw_mcc_proc_write,
};
#endif
struct proc_dir_entry *rtw_mcc_proc_init(struct net_device *dev)
{

View File

@@ -286,7 +286,7 @@ inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb)
return skb_clone(skb);
#endif /* PLATFORM_FREEBSD */
}
inline struct sk_buff *_rtw_pskb_copy(struct sk_buff *skb)
static inline struct sk_buff *_rtw_pskb_copy(struct sk_buff *skb)
{
#ifdef PLATFORM_LINUX
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36))