diff --git a/Makefile b/Makefile index 04ceb31..c20afd4 100644 --- a/Makefile +++ b/Makefile @@ -119,7 +119,7 @@ CONFIG_RTW_SDIO_PM_KEEP_POWER = y ###################### MP HW TX MODE FOR VHT ####################### CONFIG_MP_VHT_HW_TX_MODE = n ###################### Platform Related ####################### -CONFIG_PLATFORM_I386_PC = y +CONFIG_PLATFORM_I386_PC = n CONFIG_PLATFORM_ANDROID_X86 = n CONFIG_PLATFORM_ANDROID_INTEL_X86 = n CONFIG_PLATFORM_JB_X86 = n @@ -1285,6 +1285,13 @@ endif EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04 +EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN +# default setting for Android 4.1, 4.2 +EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT + +# Enable this for Android 5.0 +EXTRA_CFLAGS += -DCONFIG_RADIO_WORK + ifeq ($(CONFIG_PLATFORM_I386_PC), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT diff --git a/core/rtw_debug.c b/core/rtw_debug.c index 96fa994..05d8dc8 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -42,7 +42,7 @@ const char *rtw_log_level_str[] = { void dump_drv_version(void *sel) { RTW_PRINT_SEL(sel, "%s %s\n", DRV_NAME, DRIVERVERSION); - RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__); + //RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__); } void dump_drv_cfg(void *sel) diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 60db590..4bbf980 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -4805,7 +4805,11 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t *ssid, source = rtw_zmalloc(2048); if (source != NULL) { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) + len = kernel_read(fp, source, len, &pos); +#else len = vfs_read(fp, source, len, &pos); +#endif rtw_parse_cipher_list(nlo_info, source); rtw_mfree(source, 2048); } diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h index 41d746b..64e32df 100644 --- a/include/osdep_service_linux.h +++ b/include/osdep_service_linux.h @@ -43,6 +43,9 @@ #endif #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) +#include +#endif #include #include #include diff --git a/include/rtw_debug.h b/include/rtw_debug.h index ffb6bfc..a966524 100644 --- a/include/rtw_debug.h +++ b/include/rtw_debug.h @@ -82,7 +82,7 @@ extern void rtl871x_cedbg(const char *fmt, ...); #define KERN_CONT #define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg) #elif defined PLATFORM_LINUX - #define _dbgdump printk + #define _dbgdump pr_debug #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)) #define KERN_CONT #endif @@ -221,7 +221,7 @@ extern uint rtw_drv_log_level; if (sel == RTW_DBGDUMP)\ RTW_PRINT(fmt, ##arg); \ else {\ - _seqdump(sel, fmt, ##arg) /*rtw_warn_on(1)*/; \ + _seqdump(sel, fmt, ##arg); \ } \ } while (0) @@ -232,7 +232,7 @@ extern uint rtw_drv_log_level; if (sel == RTW_DBGDUMP)\ _RTW_PRINT(fmt, ##arg); \ else {\ - _seqdump(sel, fmt, ##arg) /*rtw_warn_on(1)*/; \ + _seqdump(sel, fmt, ##arg); \ } \ } while (0)