Package Details: 8188eu-dkms v4.3.0.8_13968-17

Git Clone URL: https://aur.archlinux.org/8188eu-dkms.git (read-only, click to copy)
Package Base: 8188eu-dkms
Description: Driver for Realtek RTL8188EUS (RTL8188EUS, RTL8188ETV) WLAN
Upstream URL: http://www.realtek.com.tw/
Keywords: 8188ETV 8188EUS
Licenses: GPL
Submitter: apnkpr
Maintainer: None
Last Packager: apnkpr
Votes: 26
Popularity: 0.096763
First Submitted: 2015-10-07 04:59 (UTC)
Last Updated: 2023-02-09 06:24 (UTC)

Latest Comments

1 2 3 4 Next › Last »

libdev00 commented on 2024-07-29 06:24 (UTC) (edited on 2024-07-29 06:24 (UTC) by libdev00)

does not work on kernel 6.8.x, 6.9.x, 6.10.x

==> WARNING: `dkms install --no-depmod 8188eu/v4.3.0.8_13968 -k 6.8.1-arch1-1' exited 10

==> WARNING: `dkms install --no-depmod 8188eu/v4.3.0.8_13968 -k 6.9.1-arch1-1' exited 10

==> WARNING: `dkms install --no-depmod 8188eu/v4.3.0.8_13968 -k 6.10.0-arch1-2' exited 10

works on lts-6.6.x

Reden commented on 2024-04-07 03:08 (UTC) (edited on 2024-04-07 03:09 (UTC) by Reden)

(3/4) Install DKMS modules ==> dkms install --no-depmod 8188eu/v4.3.0.8_13968 -k 6.8.4-arch1-1 Error! Bad return status for module build on kernel: 6.8.4-arch1-1 (x86_64) Consult /var/lib/dkms/8188eu/v4.3.0.8_13968/build/make.log for more information. ==> WARNING: `dkms install --no-depmod 8188eu/v4.3.0.8_13968 -k 6.8.4-arch1-1' exited 10

Some of the logs:

/var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_sreset.c:172:6: warning: no previous prototype for ‘sreset_restore_network_station’ [-Wmissing-prototypes]
  172 | void sreset_restore_network_station(_adapter *padapter)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_sreset.c:241:6: warning: no previous prototype for ‘sreset_restore_network_status’ [-Wmissing-prototypes]
  241 | void sreset_restore_network_status(_adapter *padapter)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_sreset.c:260:6: warning: no previous prototype for ‘sreset_stop_adapter’ [-Wmissing-prototypes]
  260 | void sreset_stop_adapter(_adapter *padapter)
      |      ^~~~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_sreset.c:290:6: warning: no previous prototype for ‘sreset_start_adapter’ [-Wmissing-prototypes]
  290 | void sreset_start_adapter(_adapter *padapter)
      |      ^~~~~~~~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_btcoex.o
  CC [M]  /var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_beamforming.o
  CC [M]  /var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_odm.o
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_odm.c:169:6: warning: no previous prototype for ‘rtw_odm_adaptivity_ver_msg’ [-Wmissing-prototypes]
  169 | void rtw_odm_adaptivity_ver_msg(void *sel, _adapter *adapter)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_odm.c:177:6: warning: no previous prototype for ‘rtw_odm_adaptivity_en_msg’ [-Wmissing-prototypes]
  177 | void rtw_odm_adaptivity_en_msg(void *sel, _adapter *adapter)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_odm.c:198:6: warning: no previous prototype for ‘rtw_odm_adaptivity_mode_msg’ [-Wmissing-prototypes]
  198 | void rtw_odm_adaptivity_mode_msg(void *sel, _adapter *adapter)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_odm.c:216:6: warning: no previous prototype for ‘rtw_odm_adaptivity_dml_msg’ [-Wmissing-prototypes]
  216 | void rtw_odm_adaptivity_dml_msg(void *sel, _adapter *adapter)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/rtw_odm.c:231:6: warning: no previous prototype for ‘rtw_odm_adaptivity_dc_backoff_msg’ [-Wmissing-prototypes]
  231 | void rtw_odm_adaptivity_dc_backoff_msg(void *sel, _adapter *adapter)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/efuse/rtw_efuse.o
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/core/efuse/rtw_efuse.c:588:1: warning: no previous prototype for ‘Efuse_PgPacketWrite_BT’ [-Wmissing-prototypes]
  588 | Efuse_PgPacketWrite_BT(IN       PADAPTER        pAdapter,
      | ^~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/osdep_service.o
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/osdep_service.c:2165:5: warning: no previous prototype for ‘rtw_change_ifname’ [-Wmissing-prototypes]
 2165 | int rtw_change_ifname(_adapter *padapter, const char *ifname)
      |     ^~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/osdep_service.c: In function ‘rtw_change_ifname’:
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/osdep_service.c:2203:28: warning: passing argument 1 of ‘_rtw_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2203 |         _rtw_memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
      |                     ~~~~~~~^~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/osdep_service.c:807:24: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  807 | void _rtw_memcpy(void* dst, void* src, u32 sz)
      |                  ~~~~~~^~~
  CC [M]  /var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.o
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:608:14: warning: no previous prototype for ‘rtw_classify8021d’ [-Wmissing-prototypes]
  608 | unsigned int rtw_classify8021d(struct sk_buff *skb)
      |              ^~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:728:5: warning: no previous prototype for ‘rtw_ndev_init’ [-Wmissing-prototypes]
  728 | int rtw_ndev_init(struct net_device *dev)
      |     ^~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:739:6: warning: no previous prototype for ‘rtw_ndev_uninit’ [-Wmissing-prototypes]
  739 | void rtw_ndev_uninit(struct net_device *dev)
      |      ^~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:2108:6: warning: no previous prototype for ‘netdev_br_init’ [-Wmissing-prototypes]
 2108 | void netdev_br_init(struct net_device *netdev)
      |      ^~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c: In function ‘_rtw_drv_register_netdev’:
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:2164:28: warning: passing argument 1 of ‘_rtw_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2164 |         _rtw_memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
      |                     ~~~~~~~^~~~~~~~~~
In file included from /var/lib/dkms/8188eu/v4.3.0.8_13968/build/include/drv_types.h:32,
                 from /var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:22:
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/include/osdep_service.h:258:35: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  258 | extern void     _rtw_memcpy(void* dec, void* sour, u32 sz);
      |                             ~~~~~~^~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c: At top level:
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:2338:6: warning: no previous prototype for ‘ips_netdrv_open’ [-Wmissing-prototypes]
 2338 | int  ips_netdrv_open(_adapter *padapter)
      |      ^~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:2558:5: warning: no previous prototype for ‘pm_netdev_open’ [-Wmissing-prototypes]
 2558 | int pm_netdev_open(struct net_device *pnetdev,u8 bnormal)
      |     ^~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:2651:5: warning: no previous prototype for ‘pm_netdev_close’ [-Wmissing-prototypes]
 2651 | int pm_netdev_close(struct net_device *pnetdev,u8 bnormal)
      |     ^~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:2739:5: warning: no previous prototype for ‘rtw_suspend_free_assoc_resource’ [-Wmissing-prototypes]
 2739 | int rtw_suspend_free_assoc_resource(_adapter *padapter)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:3085:5: warning: no previous prototype for ‘rtw_suspend_normal’ [-Wmissing-prototypes]
 3085 | int rtw_suspend_normal(_adapter *padapter)
      |     ^~~~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/os_intfs.c:3598:5: warning: no previous prototype for ‘rtw_resume_process_normal’ [-Wmissing-prototypes]
 3598 | int rtw_resume_process_normal(_adapter *padapter)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/usb_intf.o
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/usb_intf.c:369:17: error: ‘struct usb_driver’ has no member named ‘drvwrap’
  369 |         .usbdrv.drvwrap.driver.shutdown = rtw_dev_shutdown,
      |                 ^~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/usb_intf.c:369:43: error: initialization of ‘const char *’ from incompatible pointer type ‘void (*)(struct device *)’ [-Werror=incompatible-pointer-types]
  369 |         .usbdrv.drvwrap.driver.shutdown = rtw_dev_shutdown,
      |                                           ^~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/usb_intf.c:369:43: note: (near initialization for ‘usb_drv.usbdrv.name’)
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/usb_intf.c:752:6: warning: no previous prototype for ‘usb_set_intf_ops’ [-Wmissing-prototypes]
  752 | void usb_set_intf_ops(_adapter *padapter,struct _io_ops *pops)
      |      ^~~~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/usb_intf.c:864:5: warning: no previous prototype for ‘rtw_hw_suspend’ [-Wmissing-prototypes]
  864 | int rtw_hw_suspend(_adapter *padapter )
      |     ^~~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/usb_intf.c:939:5: warning: no previous prototype for ‘rtw_hw_resume’ [-Wmissing-prototypes]
  939 | int rtw_hw_resume(_adapter *padapter)
      |     ^~~~~~~~~~~~~
/var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/usb_intf.c:1481:11: warning: no previous prototype for ‘rtw_usb_if1_init’ [-Wmissing-prototypes]
 1481 | _adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
      |           ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/8188eu/v4.3.0.8_13968/build/os_dep/linux/usb_intf.o] Error 1
make[1]: *** [/usr/lib/modules/6.8.4-arch1-1/build/Makefile:1921: /var/lib/dkms/8188eu/v4.3.0.8_13968/build] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/lib/modules/6.8.4-arch1-1/build'

jackoneill commented on 2023-03-10 09:04 (UTC)

Starting with kernel 6.3 the rtl8xxxu module will support this chip. You should blacklist it in order to keep using this module without problems.

aravindpg commented on 2021-11-13 05:01 (UTC)

Linux 5.15 kernel has Realtek RTL8118EU WiFi driver support natively - it should be safe to uninstall the 8188eu-dkms package

rdnvndr commented on 2021-01-09 11:03 (UTC)

Please add the patch for Linux 5.10 support:

diff --git a/core/efuse/rtw_efuse.c b/core/efuse/rtw_efuse.c
index 5d3f80af..364da671 100644
--- a/core/efuse/rtw_efuse.c
+++ b/core/efuse/rtw_efuse.c
@@ -1329,7 +1329,9 @@ void Rtw_Hal_ReadMACAddrFromFile(PADAPTER padapter)
 {
    u32 i;
    struct file *fp;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    mm_segment_t fs;
+#endif
    u8 source_addr[18];
    loff_t pos = 0;
    u32 curtime = rtw_get_current_time();
@@ -1347,9 +1349,10 @@ void Rtw_Hal_ReadMACAddrFromFile(PADAPTER padapter)
        pEEPROM->bloadmac_fail_flag = _TRUE;
        DBG_871X("Error, wifi mac address file doesn't exist.\n");
    } else {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
        fs = get_fs();
        set_fs(KERNEL_DS);
-
+#endif
        DBG_871X("wifi mac address:\n");
        vfs_read(fp, source_addr, 18, &pos);
        source_addr[17] = ':';
@@ -1371,7 +1374,9 @@ void Rtw_Hal_ReadMACAddrFromFile(PADAPTER padapter)
            DBG_871X("%02x \n", pEEPROM->mac_addr[i]);
        }
        DBG_871X("\n");
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
        set_fs(fs);
+#endif
        pEEPROM->bloadmac_fail_flag = _FALSE;
        filp_close(fp, NULL);
    }
@@ -1397,7 +1402,9 @@ u32 Rtw_Hal_readPGDataFromConfigFile(PADAPTER padapter)
 {
    u32 i;
    struct file *fp;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    mm_segment_t fs;
+#endif
    u8 temp[3];
    loff_t pos = 0;
    EEPROM_EFUSE_PRIV *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
@@ -1412,10 +1419,10 @@ u32 Rtw_Hal_readPGDataFromConfigFile(PADAPTER   padapter)
        DBG_871X("Error, Efuse configure file doesn't exist.\n");
        return _FAIL;
    }
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    fs = get_fs();
    set_fs(KERNEL_DS);
-
+#endif
    DBG_871X("Efuse configure file:\n");
    for (i=0; i< EFUSE_MAP_SIZE  ; i++) {
        vfs_read(fp, temp, 2, &pos);
@@ -1424,8 +1431,9 @@ u32 Rtw_Hal_readPGDataFromConfigFile(PADAPTER padapter)
        DBG_871X("%02X \n", PROMContent[i]);
    }
    DBG_871X("\n");
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    set_fs(fs);
-
+#endif
    filp_close(fp, NULL);

    pEEPROM->bloadfile_fail_flag = _FALSE;
diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c
index f8e3f609..e3c11811 100644
--- a/core/rtw_wlan_util.c
+++ b/core/rtw_wlan_util.c
@@ -3657,7 +3657,9 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t* ssid,

    int i = 0;
    struct file *fp;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    mm_segment_t fs;
+#endif
    loff_t pos = 0;
    u8 *source = NULL;
    long len = 0;
@@ -3689,10 +3691,10 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t* ssid,
        DBG_871X("Error, cipher array using default value.\n");
        return 0;
    }
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    fs = get_fs();
    set_fs(KERNEL_DS);
-
+#endif
    source = rtw_zmalloc(2048);

    if (source != NULL) {
@@ -3700,8 +3702,9 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t* ssid,
        rtw_parse_cipher_list(nlo_info, source);
        rtw_mfree(source, 2048);
    }
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    set_fs(fs);
+#endif
    filp_close(fp, NULL);

    DBG_871X("-%s-\n", __func__);
diff --git a/hal/rtl8188e/usb/usb_halinit.c b/hal/rtl8188e/usb/usb_halinit.c
index 366b4bd1..94d6bb76 100644
--- a/hal/rtl8188e/usb/usb_halinit.c
+++ b/hal/rtl8188e/usb/usb_halinit.c
@@ -2499,7 +2499,9 @@ static u32 Hal_readPGDataFromConfigFile(
 {
    u32 i;
    struct file *fp;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    mm_segment_t fs;
+#endif
    u8 temp[3];
    loff_t pos = 0;
    EEPROM_EFUSE_PRIV *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
@@ -2514,10 +2516,10 @@ static u32 Hal_readPGDataFromConfigFile(
        DBG_871X("Error, Efuse configure file doesn't exist.\n");
        return _FAIL;
    }
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    fs = get_fs();
    set_fs(KERNEL_DS);
-
+#endif
    DBG_871X("Efuse configure file:\n");
    for (i=0; i<HWSET_MAX_SIZE_88E; i++) {
        vfs_read(fp, temp, 2, &pos);
@@ -2526,8 +2528,9 @@ static u32 Hal_readPGDataFromConfigFile(
        DBG_871X("%02X \n", PROMContent[i]);
    }
    DBG_871X("\n");
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    set_fs(fs);
-
+#endif
    filp_close(fp, NULL);

    pEEPROM->bloadfile_fail_flag = _FALSE;
@@ -2542,7 +2545,9 @@ Hal_ReadMACAddrFromFile_8188EU(
 {
    u32 i;
    struct file *fp;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    mm_segment_t fs;
+#endif
    u8 source_addr[18];
    loff_t pos = 0;
    u32 curtime = rtw_get_current_time();
@@ -2560,9 +2565,10 @@ Hal_ReadMACAddrFromFile_8188EU(
        pEEPROM->bloadmac_fail_flag = _TRUE;
        DBG_871X("Error, wifi mac address file doesn't exist.\n");
    } else {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
        fs = get_fs();
        set_fs(KERNEL_DS);
-
+#endif
        DBG_871X("wifi mac address:\n");
        vfs_read(fp, source_addr, 18, &pos);
        source_addr[17] = ':';
@@ -2584,7 +2590,9 @@ Hal_ReadMACAddrFromFile_8188EU(
            DBG_871X("%02x \n", pEEPROM->mac_addr[i]);
        }
        DBG_871X("\n");
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
        set_fs(fs);
+#endif
        pEEPROM->bloadmac_fail_flag = _FALSE;
        filp_close(fp, NULL);
    }
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
index 8c21b7eb..96d47ec6 100644
--- a/os_dep/osdep_service.c
+++ b/os_dep/osdep_service.c
@@ -1930,7 +1930,9 @@ static int isFileReadable(char *path)
 { 
    struct file *fp;
    int ret = 0;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    mm_segment_t oldfs;
+#endif
    char buf;

    fp=filp_open(path, O_RDONLY, 0); 
@@ -1938,12 +1940,14 @@ static int isFileReadable(char *path)
        ret = PTR_ERR(fp);
    }
    else {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
        oldfs = get_fs(); set_fs(KERNEL_DS);
-       
+#endif     
        if(1!=readFile(fp, &buf, 1))
            ret = PTR_ERR(fp);
-       
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))  
        set_fs(oldfs);
+#endif
        filp_close(fp,NULL);
    }   
    return ret;
@@ -1959,16 +1963,21 @@ static int isFileReadable(char *path)
 static int retriveFromFile(char *path, u8* buf, u32 sz)
 {
    int ret =-1;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    mm_segment_t oldfs;
+#endif
    struct file *fp;

    if(path && buf) {
        if( 0 == (ret=openFile(&fp,path, O_RDONLY, 0)) ){
            DBG_871X("%s openFile path:%s fp=%p\n",__FUNCTION__, path ,fp);
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
            oldfs = get_fs(); set_fs(KERNEL_DS);
+#endif
            ret=readFile(fp, buf, sz);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
            set_fs(oldfs);
+#endif
            closeFile(fp);

            DBG_871X("%s readFile, ret:%d\n",__FUNCTION__, ret);
@@ -1993,16 +2002,21 @@ static int retriveFromFile(char *path, u8* buf, u32 sz)
 static int storeToFile(char *path, u8* buf, u32 sz)
 {
    int ret =0;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
    mm_segment_t oldfs;
+#endif
    struct file *fp;

    if(path && buf) {
        if( 0 == (ret=openFile(&fp, path, O_CREAT|O_WRONLY, 0666)) ) {
            DBG_871X("%s openFile path:%s fp=%p\n",__FUNCTION__, path ,fp);
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
            oldfs = get_fs(); set_fs(KERNEL_DS);
+#endif
            ret=writeFile(fp, buf, sz);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
            set_fs(oldfs);
+#endif
            closeFile(fp);

            DBG_871X("%s writeFile, ret:%d\n",__FUNCTION__, ret);

pitbuster commented on 2020-08-20 00:26 (UTC)

After updating to 5.8.1 my wifi card is note being recognized anymore (not even shows in lsusb). It works fine on Windows, so I suspect on something broke on the driver side. Anyone else with a similar problem?

rdnvndr commented on 2020-08-16 09:39 (UTC) (edited on 2020-08-16 09:39 (UTC) by rdnvndr)

Please add the patch for Linux 5.8 support:

--- core/rtw_security.c
+++ core/rtw_security.c
@@ -2281,7 +2281,7 @@ BIP_exit:

 #ifndef PLATFORM_FREEBSD
 /* compress 512-bits */
-static int sha256_compress(struct sha256_state *md, unsigned char *buf)
+static int sha256_compress(struct rtw_sha256_state *md, unsigned char *buf)
 {
    u32 S[8], W[64], t0, t1;
    u32 t;
@@ -2323,7 +2323,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf)
 }

 /* Initialize the hash state */
-static void sha256_init(struct sha256_state *md)
+static void sha256_init(struct rtw_sha256_state *md)
 {
    md->curlen = 0;
    md->length = 0;
@@ -2344,7 +2344,7 @@ static void sha256_init(struct sha256_state *md)
    @param inlen  The length of the data (octets)
    @return CRYPT_OK if successful
 */
-static int sha256_process(struct sha256_state *md, unsigned char *in,
+static int sha256_process(struct rtw_sha256_state *md, unsigned char *in,
              unsigned long inlen)
 {
    unsigned long n;
@@ -2385,7 +2385,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in,
    @param out [out] The destination of the hash (32 bytes)
    @return CRYPT_OK if successful
 */
-static int sha256_done(struct sha256_state *md, unsigned char *out)
+static int sha256_done(struct rtw_sha256_state *md, unsigned char *out)
 {
    int i;

@@ -2437,7 +2437,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out)
 static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len,
          u8 *mac)
 {
-   struct sha256_state ctx;
+   struct rtw_sha256_state ctx;
    size_t i;

    sha256_init(&ctx);
--- include/rtw_security.h
+++ include/rtw_security.h
@@ -235,7 +235,7 @@ struct security_priv
 #endif /* DBG_SW_SEC_CNT */
 };

-struct sha256_state {
+struct rtw_sha256_state {
    u64 length;
    u32 state[8], curlen;
    u8 buf[64];

JanMa commented on 2020-04-05 16:44 (UTC)

Please add the following patch for Linux 5.6 support

diff --git a/os_dep/linux/rtw_proc.c b/os_dep/linux/rtw_proc.c
index 9ecc542..14051bc 100644
--- a/os_dep/linux/rtw_proc.c
+++ b/os_dep/linux/rtw_proc.c
@@ -63,9 +63,15 @@ inline struct proc_dir_entry *rtw_proc_create_dir(const char *name, struct proc_
    return entry;
 }

+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+inline struct proc_dir_entry *rtw_proc_create_entry(const char *name, struct proc_dir_entry *parent, 
+   const struct proc_ops *fops, void * data)
+{
+#else
 inline struct proc_dir_entry *rtw_proc_create_entry(const char *name, struct proc_dir_entry *parent, 
    const struct file_operations *fops, void * data)
 {
+#endif
    struct proc_dir_entry *entry;

 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26))
@@ -165,6 +171,15 @@ 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_fops = {
+   .proc_open = rtw_drv_proc_open,
+   .proc_read = seq_read,
+   .proc_write = rtw_drv_proc_write,
+   .proc_lseek = seq_lseek,
+   .proc_release = single_release,
+};
+#else
 static const struct file_operations rtw_drv_proc_fops = {
    .owner = THIS_MODULE,
    .open = rtw_drv_proc_open,
@@ -173,6 +188,7 @@ static const struct file_operations rtw_drv_proc_fops = {
    .release = single_release,
    .write = rtw_drv_proc_write,
 };
+#endif

 int rtw_drv_proc_init(void)
 {
@@ -532,6 +548,15 @@ 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_fops = {
+  .proc_open = rtw_adapter_proc_open,
+  .proc_read = seq_read,
+  .proc_write = rtw_adapter_proc_write,
+  .proc_lseek = seq_lseek,
+  .proc_release = single_release,
+};
+#else
 static const struct file_operations rtw_adapter_proc_fops = {
    .owner = THIS_MODULE,
    .open = rtw_adapter_proc_open,
@@ -540,6 +565,7 @@ static const struct file_operations rtw_adapter_proc_fops = {
    .release = single_release,
    .write = rtw_adapter_proc_write,
 };
+#endif

 int proc_get_odm_dbg_comp(struct seq_file *m, void *v)
 {
@@ -710,6 +736,15 @@ 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_fops = {
+   .proc_open = rtw_odm_proc_open,
+   .proc_read = seq_read,
+   .proc_write = rtw_odm_proc_write,
+   .proc_lseek = seq_lseek,
+   .proc_release = single_release,
+};
+#else
 static const struct file_operations rtw_odm_proc_fops = {
    .owner = THIS_MODULE,
    .open = rtw_odm_proc_open,
@@ -718,6 +753,7 @@ static const struct file_operations rtw_odm_proc_fops = {
    .release = single_release,
    .write = rtw_odm_proc_write,
 };
+#endif

 struct proc_dir_entry *rtw_odm_proc_init(struct net_device *dev)
 {