mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 07:29:40 +00:00
rtl8188eu: Fix build for kernel 5.0 and newer
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
77148c3879
commit
49e792766b
6 changed files with 22 additions and 18 deletions
|
@ -626,7 +626,7 @@ void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
ptable->func = &OnAuth;
|
||||
else
|
||||
ptable->func = &OnAuthClient;
|
||||
/* pass through */
|
||||
__attribute__((__fallthrough__));
|
||||
case WIFI_ASSOCREQ:
|
||||
case WIFI_REASSOCREQ:
|
||||
_mgt_dispatcher(padapter, ptable, precv_frame);
|
||||
|
|
|
@ -2863,6 +2863,7 @@ static void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val)
|
|||
{
|
||||
case HW_VAR_BASIC_RATE:
|
||||
*((u16 *)(val)) = pHalData->BasicRateSet;
|
||||
__attribute__ ((__fallthrough__));
|
||||
case HW_VAR_TXPAUSE:
|
||||
val[0] = rtw_read8(Adapter, REG_TXPAUSE);
|
||||
break;
|
||||
|
|
|
@ -413,15 +413,17 @@ static 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(4, 19, 0))
|
||||
,struct net_device *sb_dev
|
||||
,select_queue_fallback_t fallback
|
||||
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0))
|
||||
struct net_device *sb_dev
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
|
||||
struct net_device *sb_dev,
|
||||
select_queue_fallback_t fallback
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
|
||||
,void *unused
|
||||
,select_queue_fallback_t fallback
|
||||
#elif (LINUX_VERSION_CODE == KERNEL_VERSION(3, 13, 0))
|
||||
, void *accel
|
||||
void *unused,
|
||||
select_queue_fallback_t fallback
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
|
||||
void *accel_priv
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
|
|
@ -913,7 +913,7 @@ static int isFileReadable(char *path)
|
|||
ret = PTR_ERR(fp);
|
||||
}
|
||||
else {
|
||||
oldfs = get_fs(); set_fs(get_ds());
|
||||
oldfs = get_fs(); set_fs(KERNEL_DS);
|
||||
|
||||
if (1!=readFile(fp, &buf, 1))
|
||||
ret = PTR_ERR(fp);
|
||||
|
@ -934,16 +934,14 @@ static int isFileReadable(char *path)
|
|||
static int retriveFromFile(char *path, u8* buf, u32 sz)
|
||||
{
|
||||
int ret =-1;
|
||||
mm_segment_t oldfs;
|
||||
struct file *fp;
|
||||
|
||||
if (path && buf) {
|
||||
if ( 0 == (ret=openFile(&fp,path, O_RDONLY, 0)) ) {
|
||||
DBG_88E("%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);
|
||||
|
||||
DBG_88E("%s readFile, ret:%d\n",__FUNCTION__, ret);
|
||||
|
@ -968,16 +966,14 @@ static int retriveFromFile(char *path, u8* buf, u32 sz)
|
|||
static int storeToFile(char *path, u8* buf, u32 sz)
|
||||
{
|
||||
int ret =0;
|
||||
mm_segment_t oldfs;
|
||||
struct file *fp;
|
||||
|
||||
if (path && buf) {
|
||||
if ( 0 == (ret=openFile(&fp, path, O_CREAT|O_WRONLY, 0666)) ) {
|
||||
DBG_88E("%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);
|
||||
|
||||
DBG_88E("%s writeFile, ret:%d\n",__FUNCTION__, ret);
|
||||
|
|
|
@ -356,7 +356,12 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!access_ok(VERIFY_READ, (const void __user *)priv_cmd.buf, priv_cmd.total_len)) {
|
||||
#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, (const void __user *)priv_cmd.buf,
|
||||
priv_cmd.total_len)) {
|
||||
#endif
|
||||
DBG_88E("%s: failed to access memory\n", __FUNCTION__);
|
||||
ret = -EFAULT;
|
||||
goto exit;
|
||||
|
|
|
@ -127,7 +127,7 @@ static void rtw_dev_shutdown(struct device *dev)
|
|||
{USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ \
|
||||
{USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */ \
|
||||
{USB_DEVICE(0x056E, 0x4008)}, /* Elecom WDC-150SU2M */ \
|
||||
{USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */
|
||||
{USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */ \
|
||||
{USB_DEVICE(0x2357, 0x0111)}, /* TP-Link TL-WN727N v5.21 */
|
||||
|
||||
static struct usb_device_id rtw_usb_id_tbl[] ={
|
||||
|
|
Loading…
Reference in a new issue