diff --git a/Makefile b/Makefile index 355ec8c..8bb98b4 100755 --- a/Makefile +++ b/Makefile @@ -83,7 +83,8 @@ CONFIG_RTW_IPCAM_APPLICATION = n CONFIG_RTW_REPEATER_SON = n CONFIG_RTW_WIFI_HAL = y ########################## Debug ########################### -CONFIG_RTW_DEBUG = y +CONFIG_DISABLE_PHYDM_DEBUG_FUNCTION = y +CONFIG_RTW_DEBUG = n # default log level is _DRV_INFO_ = 4, # please refer to "How_to_set_driver_debug_log_level.doc" to set the available level. CONFIG_RTW_LOG_LEVEL = 4 @@ -680,11 +681,15 @@ EXTRA_CFLAGS += -DCONFIG_RTW_DEBUG EXTRA_CFLAGS += -DRTW_LOG_LEVEL=$(CONFIG_RTW_LOG_LEVEL) endif +ifeq ($(CONFIG_DISABLE_PHYDM_DEBUG_FUNCTION), y) +EXTRA_CFLAGS += -DCONFIG_DISABLE_PHYDM_DEBUG_FUNCTION +endif + EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04 ifeq ($(CONFIG_PLATFORM_I386_PC), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT +EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc64le/powerpc/) ARCH ?= $(SUBARCH) CROSS_COMPILE ?= @@ -1757,7 +1762,7 @@ clean: cd hal ; rm -fr */*/*/*.mod.c */*/*/*.mod */*/*/*.o */*/*/.*.cmd */*/*/*.ko cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko - cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko + cd hal/led ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko .*.cmd cd core ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko diff --git a/core/mesh/rtw_mesh.c b/core/mesh/rtw_mesh.c index 1c33616..b7338c7 100644 --- a/core/mesh/rtw_mesh.c +++ b/core/mesh/rtw_mesh.c @@ -438,6 +438,9 @@ void rtw_chk_candidate_peer_notify(_adapter *adapter, struct wlan_network *scann , scanned->network.MacAddress , BSS_EX_TLV_IES(&scanned->network) , BSS_EX_TLV_IES_LEN(&scanned->network) + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) + , scanned->network.Rssi + #endif , GFP_ATOMIC ); #endif @@ -2128,6 +2131,9 @@ void rtw_mesh_expire_peer_notify(_adapter *adapter, const u8 *peer_addr) , peer_addr , null_ssid , 2 + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) + , 0 + #endif , GFP_ATOMIC ); #endif diff --git a/docs/88XXau_modprobe.conf b/docs/88XXau_modprobe.conf new file mode 100644 index 0000000..0160a0e --- /dev/null +++ b/docs/88XXau_modprobe.conf @@ -0,0 +1 @@ +options 88XXau rtw_power_mgnt=0 rtw_enusbss=0 diff --git a/docs/Realtek_Wi-Fi_SDK_for_Android_O_8.0.pdf b/docs/Realtek_Wi-Fi_SDK_for_Android_O_8.0.pdf new file mode 100644 index 0000000..813181e Binary files /dev/null and b/docs/Realtek_Wi-Fi_SDK_for_Android_O_8.0.pdf differ diff --git a/include/autoconf.h b/include/autoconf.h index 030a3c0..c9b945b 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -29,11 +29,9 @@ #define CONFIG_USB_HCI - #define PLATFORM_LINUX - -#define CONFIG_IOCTL_CFG80211 1 +#define CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211 /* #define RTW_USE_CFG80211_STA_EVENT */ /* Indecate new sta asoc through cfg80211_new_sta */ diff --git a/include/rtw_recv.h b/include/rtw_recv.h index 2a51ec0..f0d242b 100644 --- a/include/rtw_recv.h +++ b/include/rtw_recv.h @@ -33,6 +33,8 @@ #endif #else /* PLATFORM_LINUX /PLATFORM_BSD */ +#include + #ifdef CONFIG_SINGLE_RECV_BUF #define NR_RECVBUFF (1) #else diff --git a/os_dep/linux/ioctl_cfg80211.h b/os_dep/linux/ioctl_cfg80211.h index f57586d..e789efa 100644 --- a/os_dep/linux/ioctl_cfg80211.h +++ b/os_dep/linux/ioctl_cfg80211.h @@ -364,8 +364,10 @@ void rtw_cfg80211_deinit_rfkill(struct wiphy *wiphy); #endif #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)) #define rtw_cfg80211_notify_new_peer_candidate(wdev, addr, ie, ie_len, gfp) cfg80211_notify_new_peer_candidate(wdev_to_ndev(wdev), addr, ie, ie_len, gfp) +#else +#define rtw_cfg80211_notify_new_peer_candidate(wdev, addr, ie, ie_len, sig_dbm, gfp) cfg80211_notify_new_peer_candidate(wdev_to_ndev(wdev), addr, ie, ie_len, sig_dbm, gfp) #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)) diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 3e182a5..36e282d 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1273,19 +1273,20 @@ unsigned int rtw_classify8021d(struct sk_buff *skb) return dscp >> 5; } - +#if (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 #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) - , select_queue_fallback_t fallback - #endif + , void *accel_priv + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + , select_queue_fallback_t fallback + #endif #endif ) +#endif { _adapter *padapter = rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -1484,6 +1485,10 @@ void rtw_hook_if_ops(struct net_device *ndev) #ifdef CONFIG_CONCURRENT_MODE static void rtw_hook_vir_if_ops(struct net_device *ndev); #endif +static const struct device_type wlan_type = { + .name = "wlan", +}; + struct net_device *rtw_init_netdev(_adapter *old_padapter) { _adapter *padapter; @@ -1498,6 +1503,7 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter) if (!pnetdev) return NULL; + pnetdev->dev.type = &wlan_type; padapter = rtw_netdev_priv(pnetdev); padapter->pnetdev = pnetdev; diff --git a/os_dep/linux/rtw_rhashtable.h b/os_dep/linux/rtw_rhashtable.h index 567ab39..803d1b4 100644 --- a/os_dep/linux/rtw_rhashtable.h +++ b/os_dep/linux/rtw_rhashtable.h @@ -40,7 +40,11 @@ typedef struct rhashtable_iter rtw_rhashtable_iter; int rtw_rhashtable_walk_enter(rtw_rhashtable *ht, rtw_rhashtable_iter *iter); #define rtw_rhashtable_walk_exit(iter) rhashtable_walk_exit(iter) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) #define rtw_rhashtable_walk_start(iter) rhashtable_walk_start(iter) +#else +#define rtw_rhashtable_walk_start(iter) rhashtable_walk_start_check(iter) +#endif #define rtw_rhashtable_walk_next(iter) rhashtable_walk_next(iter) #define rtw_rhashtable_walk_stop(iter) rhashtable_walk_stop(iter)