Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ MODDESTDIR := kernel/drivers/net/wireless/

DEPMOD = /sbin/depmod

EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
EXTRA_CFLAGS += -O1
#EXTRA_CFLAGS += -O3
#EXTRA_CFLAGS += -Wall
#EXTRA_CFLAGS += -Wextra
#EXTRA_CFLAGS += -Werror
#EXTRA_CFLAGS += -pedantic
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes

EXTRA_CFLAGS += -Wno-unused-variable
EXTRA_CFLAGS += -Wno-unused-value
EXTRA_CFLAGS += -Wno-unused-label
EXTRA_CFLAGS += -Wno-unused-parameter
EXTRA_CFLAGS += -Wno-unused-function
EXTRA_CFLAGS += -Wno-unused
EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
ccflags-y += $(USER_EXTRA_CFLAGS)
ccflags-y += -O1
#ccflags-y += -O3
#ccflags-y += -Wall
#ccflags-y += -Wextra
#ccflags-y += -Werror
#ccflags-y += -pedantic
#ccflags-y += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes

ccflags-y += -Wno-unused-variable
ccflags-y += -Wno-unused-value
ccflags-y += -Wno-unused-label
ccflags-y += -Wno-unused-parameter
ccflags-y += -Wno-unused-function
ccflags-y += -Wno-unused
ccflags-y += -DCONFIG_CONCURRENT_MODE

ccflags-y += -D__CHECK_ENDIAN__

#EXTRA_CFLAGS += -Wno-uninitialized
#ccflags-y += -Wno-uninitialized

EXTRA_CFLAGS += -g -I$(src)/include
ccflags-y += -g -I$(src)/include

#EXTRA_LDFLAGS += --strip-debug

Expand Down Expand Up @@ -104,11 +104,11 @@ _OUTSRC_FILES := hal/odm_debug.o \
hal/odm_CfoTracking.o\
hal/odm_NoiseMonitor.o

EXTRA_CFLAGS += -I$(src)/platform
ccflags-y += -I$(src)/platform
_PLATFORM_FILES := platform/platform_ops.o

ifeq ($(CONFIG_BT_COEXIST), y)
EXTRA_CFLAGS += -I$(src)/hal
ccflags-y += -I$(src)/hal
_OUTSRC_FILES += hal/HalBtc8723b1Ant.o \
hal/HalBtc8723b2Ant.o
endif
Expand Down Expand Up @@ -158,106 +158,106 @@ endif


ifeq ($(CONFIG_USB_AUTOSUSPEND), y)
EXTRA_CFLAGS += -DCONFIG_USB_AUTOSUSPEND
ccflags-y += -DCONFIG_USB_AUTOSUSPEND
endif

ifeq ($(CONFIG_POWER_SAVING), y)
EXTRA_CFLAGS += -DCONFIG_POWER_SAVING
ccflags-y += -DCONFIG_POWER_SAVING
endif

ifeq ($(CONFIG_HW_PWRP_DETECTION), y)
EXTRA_CFLAGS += -DCONFIG_HW_PWRP_DETECTION
ccflags-y += -DCONFIG_HW_PWRP_DETECTION
endif

ifeq ($(CONFIG_WIFI_TEST), y)
EXTRA_CFLAGS += -DCONFIG_WIFI_TEST
ccflags-y += -DCONFIG_WIFI_TEST
endif

ifeq ($(CONFIG_BT_COEXIST), y)
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
ccflags-y += -DCONFIG_BT_COEXIST
endif

ifeq ($(CONFIG_INTEL_WIDI), y)
EXTRA_CFLAGS += -DCONFIG_INTEL_WIDI
ccflags-y += -DCONFIG_INTEL_WIDI
endif

ifeq ($(CONFIG_WAPI_SUPPORT), y)
EXTRA_CFLAGS += -DCONFIG_WAPI_SUPPORT
ccflags-y += -DCONFIG_WAPI_SUPPORT
endif


ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
EXTRA_CFLAGS += -DCONFIG_EFUSE_CONFIG_FILE
ccflags-y += -DCONFIG_EFUSE_CONFIG_FILE
ifeq ($(MODULE_NAME), 8189es)
EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_8189e.map\"
ccflags-y += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_8189e.map\"
else
EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_$(MODULE_NAME).map\"
ccflags-y += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_$(MODULE_NAME).map\"
endif
EXTRA_CFLAGS += -DWIFIMAC_PATH=\"/data/wifimac.txt\"
ccflags-y += -DWIFIMAC_PATH=\"/data/wifimac.txt\"
endif

ifeq ($(CONFIG_EXT_CLK), y)
EXTRA_CFLAGS += -DCONFIG_EXT_CLK
ccflags-y += -DCONFIG_EXT_CLK
endif

ifeq ($(CONFIG_TRAFFIC_PROTECT), y)
EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
ccflags-y += -DCONFIG_TRAFFIC_PROTECT
endif

ifeq ($(CONFIG_LOAD_PHY_PARA_FROM_FILE), y)
EXTRA_CFLAGS += -DCONFIG_LOAD_PHY_PARA_FROM_FILE
ccflags-y += -DCONFIG_LOAD_PHY_PARA_FROM_FILE
endif

ifeq ($(CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY), y)
EXTRA_CFLAGS += -DCONFIG_CALIBRATE_TX_POWER_BY_REGULATORY
ccflags-y += -DCONFIG_CALIBRATE_TX_POWER_BY_REGULATORY
endif

ifeq ($(CONFIG_CALIBRATE_TX_POWER_TO_MAX), y)
EXTRA_CFLAGS += -DCONFIG_CALIBRATE_TX_POWER_TO_MAX
ccflags-y += -DCONFIG_CALIBRATE_TX_POWER_TO_MAX
endif

ifeq ($(CONFIG_RTW_ADAPTIVITY_EN), disable)
EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_EN=0
ccflags-y += -DCONFIG_RTW_ADAPTIVITY_EN=0
else ifeq ($(CONFIG_RTW_ADAPTIVITY_EN), enable)
EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_EN=1
ccflags-y += -DCONFIG_RTW_ADAPTIVITY_EN=1
else ifeq ($(CONFIG_RTW_ADAPTIVITY_EN), auto)
EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_EN=2
ccflags-y += -DCONFIG_RTW_ADAPTIVITY_EN=2
endif

ifeq ($(CONFIG_RTW_ADAPTIVITY_MODE), normal)
EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_MODE=0
ccflags-y += -DCONFIG_RTW_ADAPTIVITY_MODE=0
else ifeq ($(CONFIG_RTW_ADAPTIVITY_MODE), carrier_sense)
EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_MODE=1
ccflags-y += -DCONFIG_RTW_ADAPTIVITY_MODE=1
endif

ifeq ($(CONFIG_SKIP_SIGNAL_SCALE_MAPPING), y)
EXTRA_CFLAGS += -DCONFIG_SKIP_SIGNAL_SCALE_MAPPING
ccflags-y += -DCONFIG_SKIP_SIGNAL_SCALE_MAPPING
endif

ifeq ($(CONFIG_WOWLAN), y)
EXTRA_CFLAGS += -DCONFIG_WOWLAN
ccflags-y += -DCONFIG_WOWLAN
endif

ifeq ($(CONFIG_AP_WOWLAN), y)
EXTRA_CFLAGS += -DCONFIG_AP_WOWLAN
ccflags-y += -DCONFIG_AP_WOWLAN
endif

ifeq ($(CONFIG_PNO_SUPPORT), y)
EXTRA_CFLAGS += -DCONFIG_PNO_SUPPORT
ccflags-y += -DCONFIG_PNO_SUPPORT
ifeq ($(CONFIG_PNO_SET_DEBUG), y)
EXTRA_CFLAGS += -DCONFIG_PNO_SET_DEBUG
ccflags-y += -DCONFIG_PNO_SET_DEBUG
endif
endif

ifeq ($(CONFIG_GPIO_WAKEUP), y)
EXTRA_CFLAGS += -DCONFIG_GPIO_WAKEUP
ccflags-y += -DCONFIG_GPIO_WAKEUP
endif


ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211
EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT # only enable when kernel >= 3.2
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
ccflags-y += -DCONFIG_IOCTL_CFG80211
ccflags-y += -DRTW_USE_CFG80211_STA_EVENT # only enable when kernel >= 3.2
ccflags-y += -DCONFIG_P2P_IPS
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/ | sed -e s/armv.l/arm/)
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
Expand All @@ -267,10 +267,10 @@ INSTALL_PREFIX :=
endif

ifeq ($(CONFIG_PLATFORM_FS_MX61), y)
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211
EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT # only enable when kernel >= 3.2
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -Wno-error=date-time
ccflags-y += -DCONFIG_IOCTL_CFG80211
ccflags-y += -DRTW_USE_CFG80211_STA_EVENT # only enable when kernel >= 3.2
ccflags-y += -DCONFIG_P2P_IPS
ccflags-y += -DCONFIG_LITTLE_ENDIAN -Wno-error=date-time
ARCH := arm
KSRC ?= $(KERNEL_SRC)
LICENSE = "GPLv2"
Expand Down
5 changes: 0 additions & 5 deletions core/rtw_ieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,11 +1308,6 @@ static u8 key_char2num(u8 ch)
return 0xff;
}

u8 str_2char2num(u8 hch, u8 lch)
{
return ((key_char2num(hch) * 10 ) + key_char2num(lch));
}

u8 key_2char2num(u8 hch, u8 lch)
{
return ((key_char2num(hch) << 4) | key_char2num(lch));
Expand Down
40 changes: 27 additions & 13 deletions core/rtw_p2p.c
Original file line number Diff line number Diff line change
Expand Up @@ -3606,8 +3606,10 @@ static void ro_ch_timer_process (struct timer_list *t)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *adapter = (_adapter *)FunctionContext;
#else
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
_adapter *adapter = from_timer(adapter, t, cfg80211_wdinfo.remain_on_ch_timer);
#else
_adapter *adapter = timer_container_of(adapter, t, cfg80211_wdinfo.remain_on_ch_timer);
#endif
struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(adapter);

Expand Down Expand Up @@ -4710,10 +4712,12 @@ static void reset_ch_sitesurvey_timer_process(struct timer_list *t)
static void reset_ch_sitesurvey_timer_process (void *FunctionContext)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
struct adapter *adapter = (struct adapter *)FunctionContext;
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
struct adapter *adapter = from_timer(adapter, t, wdinfo.reset_ch_sitesurvey);
#else
struct adapter *adapter = (struct adapter *)FunctionContext;
struct adapter *adapter = timer_container_of(adapter, t, wdinfo.reset_ch_sitesurvey);
#endif
struct wifidirect_info *pwdinfo = &adapter->wdinfo;

Expand All @@ -4737,10 +4741,12 @@ static void reset_ch_sitesurvey_timer_process2(struct timer_list *t)
static void reset_ch_sitesurvey_timer_process2 (void *FunctionContext)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
struct adapter *adapter = (struct adapter *)FunctionContext;
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
struct adapter *adapter = from_timer(adapter, t, wdinfo.reset_ch_sitesurvey2);
#else
struct adapter *adapter = (struct adapter *)FunctionContext;
struct adapter *adapter = timer_container_of(adapter, t, wdinfo.reset_ch_sitesurvey2);
#endif
struct wifidirect_info *pwdinfo = &adapter->wdinfo;

Expand All @@ -4764,10 +4770,12 @@ static void restore_p2p_state_timer_process(struct timer_list *t)
static void restore_p2p_state_timer_process (void *FunctionContext)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
struct adapter *adapter = (struct adapter *)FunctionContext;
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
struct adapter *adapter = from_timer(adapter, t, wdinfo.restore_p2p_state_timer);
#else
struct adapter *adapter = (struct adapter *)FunctionContext;
struct adapter *adapter = timer_container_of(adapter, t, wdinfo.restore_p2p_state_timer);
#endif
struct wifidirect_info *pwdinfo = &adapter->wdinfo;

Expand All @@ -4783,10 +4791,12 @@ static void pre_tx_scan_timer_process(struct timer_list *t)
static void pre_tx_scan_timer_process(void *FunctionContext)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
struct adapter *padapter = (struct adapter *)FunctionContext;
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
struct adapter *padapter = from_timer(padapter, t, wdinfo.pre_tx_scan_timer);
#else
struct adapter *padapter = (struct adapter *)FunctionContext;
struct adapter *padapter = timer_container_of(padapter, t, wdinfo.pre_tx_scan_timer);
#endif
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
_irqL irqL;
Expand Down Expand Up @@ -4828,8 +4838,10 @@ static void find_phase_timer_process(struct timer_list *t)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *adapter = (_adapter *)FunctionContext;
#else
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
_adapter *adapter = from_timer(adapter, t, wdinfo.find_phase_timer);
#else
_adapter *adapter = timer_container_of(adapter, t, wdinfo.find_phase_timer);
#endif
struct wifidirect_info *pwdinfo = &adapter->wdinfo;

Expand All @@ -4848,12 +4860,14 @@ void ap_p2p_switch_timer_process(struct timer_list *t)
void ap_p2p_switch_timer_process (void *FunctionContext)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *adapter = (_adapter *)FunctionContext;
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
_adapter *adapter = from_timer(adapter, t, wdinfo.ap_p2p_switch_timer);
#else
_adapter *adapter = (_adapter *)FunctionContext;
_adapter *adapter = timer_container_of(adapter, t, wdinfo.ap_p2p_switch_timer);
#endif
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
#ifdef CONFIG_IOCTL_CFG80211
struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(adapter);
#endif
Expand Down
4 changes: 3 additions & 1 deletion core/rtw_pwrctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,10 @@ void pwr_state_check_handler(struct timer_list *t)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *padapter = (_adapter *)FunctionContext;
#else
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
_adapter *padapter = from_timer(padapter, t, pwr_state_check_timer);
#else
_adapter *padapter = timer_container_of(padapter, t, pwr_state_check_timer);
#endif

rtw_ps_cmd(padapter);
Expand Down
6 changes: 4 additions & 2 deletions core/rtw_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -3638,10 +3638,12 @@ void rtw_signal_stat_timer_hdl(struct timer_list *t)
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *adapter = (_adapter *)FunctionContext;
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
_adapter *adapter = from_timer(adapter, t, recvpriv.signal_stat_timer);
#else
_adapter *adapter = (_adapter *)FunctionContext;
_adapter *adapter = timer_container_of(adapter, t, recvpriv.signal_stat_timer);
#endif
struct recv_priv *recvpriv = &adapter->recvpriv;

Expand Down
4 changes: 2 additions & 2 deletions core/rtw_security.c
Original file line number Diff line number Diff line change
Expand Up @@ -2237,7 +2237,7 @@ static int sha256_compress(struct rtw_sha256_state *md, unsigned char *buf)
}

/* Initialize the hash state */
static void sha256_init(struct rtw_sha256_state *md)
static void rtl_sha256_init(struct rtw_sha256_state *md)
{
md->curlen = 0;
md->length = 0;
Expand Down Expand Up @@ -2354,7 +2354,7 @@ static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len,
struct rtw_sha256_state ctx;
size_t i;

sha256_init(&ctx);
rtl_sha256_init(&ctx);
for (i = 0; i < num_elem; i++)
if (sha256_process(&ctx, addr[i], len[i]))
return -1;
Expand Down
2 changes: 1 addition & 1 deletion core/rtw_xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_ap);
}
else
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown);
{ DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown); }

#ifdef CONFIG_TDLS
rtw_check_tdls_established(padapter, pattrib);
Expand Down
Loading