...
 
Commits (6)
language: c
compiler: gcc
sudo: required
dist: xenial
before_install:
- export ALL_DEB=$(wget --quiet -O - ${KERNEL_URL}v${KVER}/ | grep -o 'href=".*"' | grep -m1 all | cut -d '"' -f 2)
- export KVER_BUILD=$(echo $ALL_DEB | cut -d '_' -f 1 | cut -c15-)
- wget ${KERNEL_URL}v${KVER}/$(wget --quiet -O - ${KERNEL_URL}v${KVER}/ | grep -o 'href=".*"' | grep headers | grep generic | grep -m1 amd64 | cut -d '"' -f 2)
- wget ${KERNEL_URL}v${KVER}/$ALL_DEB
- sudo dpkg -i *.deb
script:
- make CC=$COMPILER KVER=$KVER_BUILD-generic
env:
global:
- KERNEL_URL=http://kernel.ubuntu.com/~kernel-ppa/mainline/
matrix:
include:
- compiler: gcc
addons:
apt:
sources:
- sourceline: 'ppa:ondrej/nginx-mainline'
packages:
- libssl1.1
env: COMPILER=gcc-5 KVER=5.2-rc1
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:ondrej/nginx-mainline'
packages:
- gcc-6
- libssl1.1
env: COMPILER=gcc-6 KVER=5.2-rc1
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:ondrej/nginx-mainline'
packages:
- gcc-7
- libssl1.1
env: COMPILER=gcc-7 KVER=5.2-rc1
- compiler: gcc
addons:
apt:
sources:
- sourceline: 'ppa:ondrej/nginx-mainline'
packages:
- libssl1.1
env: COMPILER=gcc-5 KVER=4.19.45
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:ondrej/nginx-mainline'
packages:
- gcc-6
- libssl1.1
env: COMPILER=gcc-6 KVER=4.19.45
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:ondrej/nginx-mainline'
packages:
- gcc-7
- libssl1.1
env: COMPILER=gcc-7 KVER=4.19.45
- compiler: gcc
env: COMPILER=gcc-5 KVER=3.14.79
...@@ -7,6 +7,10 @@ EXTRA_CFLAGS += -Wextra ...@@ -7,6 +7,10 @@ EXTRA_CFLAGS += -Wextra
#EXTRA_CFLAGS += -pedantic #EXTRA_CFLAGS += -pedantic
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes #EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
#EXTRA_CFLAGS += -Wno-tautological-compare
#EXTRA_CFLAGS += -Wno-incompatible-pointer-types
#EXTRA_CFLAGS += -Wno-switch
#EXTRA_CFLAGS += -Wno-cast-function-type
EXTRA_CFLAGS += -Wno-unused-variable EXTRA_CFLAGS += -Wno-unused-variable
EXTRA_CFLAGS += -Wno-unused-value EXTRA_CFLAGS += -Wno-unused-value
EXTRA_CFLAGS += -Wno-unused-label EXTRA_CFLAGS += -Wno-unused-label
...@@ -105,6 +109,7 @@ CONFIG_PLATFORM_ARM_RPI = n ...@@ -105,6 +109,7 @@ CONFIG_PLATFORM_ARM_RPI = n
CONFIG_PLATFORM_ARM64_RPI = n CONFIG_PLATFORM_ARM64_RPI = n
CONFIG_PLATFORM_ANDROID_X86 = n CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
CONFIG_PLATFORM_ARM_NETHUNTER = n
CONFIG_PLATFORM_JB_X86 = n CONFIG_PLATFORM_JB_X86 = n
CONFIG_PLATFORM_ARM_S3C2K4 = n CONFIG_PLATFORM_ARM_S3C2K4 = n
CONFIG_PLATFORM_ARM_PXA2XX = n CONFIG_PLATFORM_ARM_PXA2XX = n
...@@ -112,6 +117,7 @@ CONFIG_PLATFORM_ARM_S3C6K4 = n ...@@ -112,6 +117,7 @@ CONFIG_PLATFORM_ARM_S3C6K4 = n
CONFIG_PLATFORM_MIPS_RMI = n CONFIG_PLATFORM_MIPS_RMI = n
CONFIG_PLATFORM_RTD2880B = n CONFIG_PLATFORM_RTD2880B = n
CONFIG_PLATFORM_MIPS_AR9132 = n CONFIG_PLATFORM_MIPS_AR9132 = n
CONFIG_PLATFORM_OPENWRT_NEO2 = n
CONFIG_PLATFORM_RTK_DMP = n CONFIG_PLATFORM_RTK_DMP = n
CONFIG_PLATFORM_MIPS_PLM = n CONFIG_PLATFORM_MIPS_PLM = n
CONFIG_PLATFORM_MSTAR389 = n CONFIG_PLATFORM_MSTAR389 = n
...@@ -749,6 +755,21 @@ MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ ...@@ -749,6 +755,21 @@ MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX := INSTALL_PREFIX :=
endif endif
ifeq ($(CONFIG_PLATFORM_ARM_NETHUNTER), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID
# default setting for Android 4.1, 4.2
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
# Enable this for Android 5.0
EXTRA_CFLAGS += -DCONFIG_RADIO_WORK
EXTRA_CFLAGS += -DRTW_VENDOR_EXT_SUPPORT
EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
ARCH := arm
CROSS_COMPILE := /mnt/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-
KSRC := /mnt/android/lineage/kernel/oneplus/msm8974
endif
ifeq ($(CONFIG_PLATFORM_ACTIONS_ATM702X), y) ifeq ($(CONFIG_PLATFORM_ACTIONS_ATM702X), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ACTIONS_ATM702X EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ACTIONS_ATM702X
#ARCH := arm #ARCH := arm
...@@ -839,6 +860,16 @@ KVER:= 3.1.10 ...@@ -839,6 +860,16 @@ KVER:= 3.1.10
KSRC:= /usr/src/Mstar_kernel/3.1.10/ KSRC:= /usr/src/Mstar_kernel/3.1.10/
endif endif
ifeq ($(CONFIG_PLATFORM_ANDROID_ARM64), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -fno-pic
EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC -DCONFIG_RADIO_WORK
#Enable this to have two interfaces:
#EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
endif
ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y) ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
...@@ -929,11 +960,22 @@ endif ...@@ -929,11 +960,22 @@ endif
ifeq ($(CONFIG_PLATFORM_MIPS_AR9132), y) ifeq ($(CONFIG_PLATFORM_MIPS_AR9132), y)
EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
ARCH := mips ARCH := mips
CROSS_COMPILE := mips-openwrt-linux- CROSS_COMPILE := mips-openwrt-linux-
KSRC := /home/alex/test_openwrt/tmp/linux-2.6.30.9 KSRC := /home/alex/test_openwrt/tmp/linux-2.6.30.9
endif endif
# This is how I built for openwrt Neo2 platform. --Ben
ifeq ($(CONFIG_PLATFORM_OPENWRT_NEO2), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm64
CROSS_COMPILE := aarch64-openwrt-linux-
#export PATH=$PATH:/home/greearb/git/openwrt-neo2-dev/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/bin/
#export STAGING_DIR=/home/greearb/git/openwrt-neo2-dev/staging_dir
KSRC := /home/greearb/git/openwrt-neo2-dev/build_dir/target-aarch64_cortex-a53_musl/linux-sunxi_cortexa53/linux-4.14.78
endif
ifeq ($(CONFIG_PLATFORM_DMP_PHILIPS), y) ifeq ($(CONFIG_PLATFORM_DMP_PHILIPS), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM
ARCH := mips ARCH := mips
...@@ -1548,7 +1590,7 @@ export CONFIG_RTL8812AU = m ...@@ -1548,7 +1590,7 @@ export CONFIG_RTL8812AU = m
all: modules all: modules
modules: modules:
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) O="$(KBUILD_OUTPUT)" modules
strip: strip:
$(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded $(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded
......
...@@ -165,7 +165,7 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d ...@@ -165,7 +165,7 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d
u8 bmatch = _FALSE; u8 bmatch = _FALSE;
u8 *pie = pnetwork->IEs; u8 *pie = pnetwork->IEs;
u8 *p = NULL, *dst_ie = NULL, *premainder_ie = NULL, *pbackup_remainder_ie = NULL; u8 *p = NULL, *dst_ie = NULL, *premainder_ie = NULL, *pbackup_remainder_ie = NULL;
u32 i, offset, ielen, ie_offset, remainder_ielen = 0; u32 i, offset, ielen = 0, ie_offset, remainder_ielen = 0;
for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pnetwork->IELength;) { for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pnetwork->IELength;) {
pIE = (PNDIS_802_11_VARIABLE_IEs)(pnetwork->IEs + i); pIE = (PNDIS_802_11_VARIABLE_IEs)(pnetwork->IEs + i);
...@@ -4506,10 +4506,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct ...@@ -4506,10 +4506,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
sta->wpa2_pairwise_cipher = pairwise_cipher & sec->wpa2_pairwise_cipher; sta->wpa2_pairwise_cipher = pairwise_cipher & sec->wpa2_pairwise_cipher;
if (!sta->wpa2_group_cipher) if (!sta->wpa2_group_cipher)
status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID; status = WLAN_STATUS_INVALID_GROUP_CIPHER;
if (!sta->wpa2_pairwise_cipher) if (!sta->wpa2_pairwise_cipher)
status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID; status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER;
} else } else
status = WLAN_STATUS_INVALID_IE; status = WLAN_STATUS_INVALID_IE;
...@@ -4526,10 +4526,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct ...@@ -4526,10 +4526,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
sta->wpa_pairwise_cipher = pairwise_cipher & sec->wpa_pairwise_cipher; sta->wpa_pairwise_cipher = pairwise_cipher & sec->wpa_pairwise_cipher;
if (!sta->wpa_group_cipher) if (!sta->wpa_group_cipher)
status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID; status = WLAN_STATUS_INVALID_GROUP_CIPHER;
if (!sta->wpa_pairwise_cipher) if (!sta->wpa_pairwise_cipher)
status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID; status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER;
} else } else
status = WLAN_STATUS_INVALID_IE; status = WLAN_STATUS_INVALID_IE;
......
...@@ -530,7 +530,7 @@ void rtw_stop_cmd_thread(_adapter *adapter) ...@@ -530,7 +530,7 @@ void rtw_stop_cmd_thread(_adapter *adapter)
} }
} }
thread_return rtw_cmd_thread(thread_context context) int rtw_cmd_thread(void *context)
{ {
u8 ret; u8 ret;
struct cmd_obj *pcmd; struct cmd_obj *pcmd;
......
...@@ -1214,7 +1214,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, ...@@ -1214,7 +1214,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
elems->timeout_int = pos; elems->timeout_int = pos;
elems->timeout_int_len = elen; elems->timeout_int_len = elen;
break; break;
case WLAN_EID_HT_CAP: case WLAN_EID_HT_CAPABILITY:
elems->ht_capabilities = pos; elems->ht_capabilities = pos;
elems->ht_capabilities_len = elen; elems->ht_capabilities_len = elen;
break; break;
...@@ -1230,7 +1230,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, ...@@ -1230,7 +1230,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
elems->vht_operation = pos; elems->vht_operation = pos;
elems->vht_operation_len = elen; elems->vht_operation_len = elen;
break; break;
case WLAN_EID_VHT_OP_MODE_NOTIFY: case WLAN_EID_OPMODE_NOTIF:
elems->vht_op_mode_notify = pos; elems->vht_op_mode_notify = pos;
elems->vht_op_mode_notify_len = elen; elems->vht_op_mode_notify_len = elen;
break; break;
......
...@@ -4319,7 +4319,8 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l ...@@ -4319,7 +4319,8 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
u8 action = P2P_PUB_ACTION_ACTION; u8 action = P2P_PUB_ACTION_ACTION;
u32 p2poui = cpu_to_be32(P2POUI); u32 p2poui = cpu_to_be32(P2POUI);
u8 oui_subtype = P2P_GO_NEGO_RESP; u8 oui_subtype = P2P_GO_NEGO_RESP;
u8 wpsie[255] = { 0x00 }, p2pie[255] = { 0x00 }; u8 *wpsie;
u8 p2pie[ 255 ] = { 0x00 };
u8 p2pielen = 0, i; u8 p2pielen = 0, i;
uint wpsielen = 0; uint wpsielen = 0;
u16 wps_devicepassword_id = 0x0000; u16 wps_devicepassword_id = 0x0000;
...@@ -4345,6 +4346,8 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l ...@@ -4345,6 +4346,8 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
if (pmgntframe == NULL) if (pmgntframe == NULL)
return; return;
wpsie = rtw_zmalloc(256);
RTW_INFO("[%s] In, result = %d\n", __FUNCTION__, result); RTW_INFO("[%s] In, result = %d\n", __FUNCTION__, result);
/* update attribute */ /* update attribute */
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;
...@@ -4727,6 +4730,8 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l ...@@ -4727,6 +4730,8 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
dump_mgntframe(padapter, pmgntframe); dump_mgntframe(padapter, pmgntframe);
kfree(wpsie);
return; return;
} }
...@@ -8265,12 +8270,11 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status ...@@ -8265,12 +8270,11 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status
/* setting auth algo number */ /* setting auth algo number */
val16 = (u16)psta->authalg; val16 = (u16)psta->authalg;
if (status != _STATS_SUCCESSFUL_)
val16 = 0;
if (val16) { if (val16) {
val16 = cpu_to_le16(val16); val16 = cpu_to_le16(val16);
use_shared_key = 1; use_shared_key = 1;
} else {
val16 = 0;
} }
pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&val16, &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&val16, &(pattrib->pktlen));
...@@ -10493,7 +10497,7 @@ unsigned int send_beacon(_adapter *padapter) ...@@ -10493,7 +10497,7 @@ unsigned int send_beacon(_adapter *padapter)
issue_beacon(padapter, 100); issue_beacon(padapter, 100);
issue++; issue++;
do { do {
rtw_yield_os(); yield();
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bxmitok)); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bxmitok));
poll++; poll++;
} while ((poll % 10) != 0 && _FALSE == bxmitok && !RTW_CANNOT_RUN(padapter)); } while ((poll % 10) != 0 && _FALSE == bxmitok && !RTW_CANNOT_RUN(padapter));
......
...@@ -31,7 +31,7 @@ int rtw_fw_ps_state(PADAPTER padapter) ...@@ -31,7 +31,7 @@ int rtw_fw_ps_state(PADAPTER padapter)
if (registry_par->check_fw_ps != 1) if (registry_par->check_fw_ps != 1)
return _SUCCESS; return _SUCCESS;
_enter_pwrlock(&pwrpriv->check_32k_lock); down(&pwrpriv->check_32k_lock);
if (RTW_CANNOT_RUN(padapter)) { if (RTW_CANNOT_RUN(padapter)) {
RTW_INFO("%s: bSurpriseRemoved=%s , hw_init_completed=%d, bDriverStopped=%s\n", __func__ RTW_INFO("%s: bSurpriseRemoved=%s , hw_init_completed=%d, bDriverStopped=%s\n", __func__
...@@ -61,7 +61,7 @@ int rtw_fw_ps_state(PADAPTER padapter) ...@@ -61,7 +61,7 @@ int rtw_fw_ps_state(PADAPTER padapter)
exit_fw_ps_state: exit_fw_ps_state:
_exit_pwrlock(&pwrpriv->check_32k_lock); up(&pwrpriv->check_32k_lock);
return ret; return ret;
} }
...@@ -105,9 +105,9 @@ void ips_enter(_adapter *padapter) ...@@ -105,9 +105,9 @@ void ips_enter(_adapter *padapter)
rtw_btcoex_IpsNotify(padapter, pwrpriv->ips_mode_req); rtw_btcoex_IpsNotify(padapter, pwrpriv->ips_mode_req);
#endif /* CONFIG_BT_COEXIST */ #endif /* CONFIG_BT_COEXIST */
_enter_pwrlock(&pwrpriv->lock); down(&pwrpriv->lock);
_ips_enter(padapter); _ips_enter(padapter);
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
} }
int _ips_leave(_adapter *padapter) int _ips_leave(_adapter *padapter)
...@@ -151,7 +151,7 @@ int ips_leave(_adapter *padapter) ...@@ -151,7 +151,7 @@ int ips_leave(_adapter *padapter)
if (!is_primary_adapter(padapter)) if (!is_primary_adapter(padapter))
return _SUCCESS; return _SUCCESS;
_enter_pwrlock(&pwrpriv->lock); down(&pwrpriv->lock);
ret = _ips_leave(padapter); ret = _ips_leave(padapter);
#ifdef DBG_CHECK_FW_PS_STATE #ifdef DBG_CHECK_FW_PS_STATE
if (rtw_fw_ps_state(padapter) == _FAIL) { if (rtw_fw_ps_state(padapter) == _FAIL) {
...@@ -159,7 +159,7 @@ int ips_leave(_adapter *padapter) ...@@ -159,7 +159,7 @@ int ips_leave(_adapter *padapter)
pdbgpriv->dbg_leave_ips_fail_cnt++; pdbgpriv->dbg_leave_ips_fail_cnt++;
} }
#endif /* DBG_CHECK_FW_PS_STATE */ #endif /* DBG_CHECK_FW_PS_STATE */
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
if (_SUCCESS == ret) if (_SUCCESS == ret)
odm_dm_reset(&GET_HAL_DATA(padapter)->odmpriv); odm_dm_reset(&GET_HAL_DATA(padapter)->odmpriv);
...@@ -282,9 +282,9 @@ void rtw_ps_processor(_adapter *padapter) ...@@ -282,9 +282,9 @@ void rtw_ps_processor(_adapter *padapter)
#endif /* SUPPORT_HW_RFOFF_DETECTED */ #endif /* SUPPORT_HW_RFOFF_DETECTED */
u32 ps_deny = 0; u32 ps_deny = 0;
_enter_pwrlock(&adapter_to_pwrctl(padapter)->lock); down(&adapter_to_pwrctl(padapter)->lock);
ps_deny = rtw_ps_deny_get(padapter); ps_deny = rtw_ps_deny_get(padapter);
_exit_pwrlock(&adapter_to_pwrctl(padapter)->lock); up(&adapter_to_pwrctl(padapter)->lock);
if (ps_deny != 0) { if (ps_deny != 0) {
RTW_DBG(FUNC_ADPT_FMT ": ps_deny=0x%08X, skip power save!\n", RTW_DBG(FUNC_ADPT_FMT ": ps_deny=0x%08X, skip power save!\n",
FUNC_ADPT_ARG(padapter), ps_deny); FUNC_ADPT_ARG(padapter), ps_deny);
...@@ -837,7 +837,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode ...@@ -837,7 +837,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
#endif #endif
#ifdef CONFIG_LPS_LCLK #ifdef CONFIG_LPS_LCLK
_enter_pwrlock(&pwrpriv->lock); down(&pwrpriv->lock);
#endif #endif
/* if(pwrpriv->pwr_mode == PS_MODE_ACTIVE) */ /* if(pwrpriv->pwr_mode == PS_MODE_ACTIVE) */
...@@ -1017,7 +1017,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode ...@@ -1017,7 +1017,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
} }
#ifdef CONFIG_LPS_LCLK #ifdef CONFIG_LPS_LCLK
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
#endif #endif
} }
...@@ -1230,7 +1230,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter) ...@@ -1230,7 +1230,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter)
} }
#ifdef CONFIG_LPS_LCLK #ifdef CONFIG_LPS_LCLK
_enter_pwrlock(&pwrpriv->lock); down(&pwrpriv->lock);
#ifndef CONFIG_DETECT_CPWM_BY_POLLING #ifndef CONFIG_DETECT_CPWM_BY_POLLING
cpwm_orig = 0; cpwm_orig = 0;
...@@ -1274,7 +1274,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter) ...@@ -1274,7 +1274,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter)
} while (1); } while (1);
#endif /* CONFIG_DETECT_CPWM_BY_POLLING */ #endif /* CONFIG_DETECT_CPWM_BY_POLLING */
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
#endif #endif
#ifdef CONFIG_P2P_PS #ifdef CONFIG_P2P_PS
...@@ -1403,7 +1403,7 @@ void LPS_Leave_check( ...@@ -1403,7 +1403,7 @@ void LPS_Leave_check(
rtw_yield_os(); rtw_yield_os();
while (1) { while (1) {
_enter_pwrlock(&pwrpriv->lock); down(&pwrpriv->lock);
if (rtw_is_surprise_removed(padapter) if (rtw_is_surprise_removed(padapter)
|| (!rtw_is_hw_init_completed(padapter)) || (!rtw_is_hw_init_completed(padapter))
...@@ -1414,7 +1414,7 @@ void LPS_Leave_check( ...@@ -1414,7 +1414,7 @@ void LPS_Leave_check(
) )
bReady = _TRUE; bReady = _TRUE;
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
if (_TRUE == bReady) if (_TRUE == bReady)
break; break;
...@@ -1454,12 +1454,12 @@ void cpwm_int_hdl( ...@@ -1454,12 +1454,12 @@ void cpwm_int_hdl(
} }
#endif #endif
_enter_pwrlock(&pwrpriv->lock); down(&pwrpriv->lock);
#ifdef CONFIG_LPS_RPWM_TIMER #ifdef CONFIG_LPS_RPWM_TIMER
if (pwrpriv->rpwm < PS_STATE_S2) { if (pwrpriv->rpwm < PS_STATE_S2) {
RTW_INFO("%s: Redundant CPWM Int. RPWM=0x%02X CPWM=0x%02x\n", __func__, pwrpriv->rpwm, pwrpriv->cpwm); RTW_INFO("%s: Redundant CPWM Int. RPWM=0x%02X CPWM=0x%02x\n", __func__, pwrpriv->rpwm, pwrpriv->cpwm);
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
goto exit; goto exit;
} }
#endif /* CONFIG_LPS_RPWM_TIMER */ #endif /* CONFIG_LPS_RPWM_TIMER */
...@@ -1475,7 +1475,7 @@ void cpwm_int_hdl( ...@@ -1475,7 +1475,7 @@ void cpwm_int_hdl(
_rtw_up_sema(&padapter->xmitpriv.xmit_sema); _rtw_up_sema(&padapter->xmitpriv.xmit_sema);
} }
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
exit: exit:
return; return;
...@@ -1545,12 +1545,12 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work) ...@@ -1545,12 +1545,12 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work)
if (RTW_CANNOT_RUN(padapter)) if (RTW_CANNOT_RUN(padapter))
return; return;
_enter_pwrlock(&pwrpriv->lock); down(&pwrpriv->lock);
if ((pwrpriv->rpwm == pwrpriv->cpwm) || (pwrpriv->cpwm >= PS_STATE_S2)) { if ((pwrpriv->rpwm == pwrpriv->cpwm) || (pwrpriv->cpwm >= PS_STATE_S2)) {
RTW_INFO("%s: rpwm=0x%02X cpwm=0x%02X CPWM done!\n", __func__, pwrpriv->rpwm, pwrpriv->cpwm); RTW_INFO("%s: rpwm=0x%02X cpwm=0x%02X CPWM done!\n", __func__, pwrpriv->rpwm, pwrpriv->cpwm);
goto exit; goto exit;
} }
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
#if defined(DBG_CPWM_CHK_FAIL) && (defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C)) #if defined(DBG_CPWM_CHK_FAIL) && (defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C))
RTW_INFO("+%s: rpwm=0x%02X cpwm=0x%02X\n", __func__, pwrpriv->rpwm, pwrpriv->cpwm); RTW_INFO("+%s: rpwm=0x%02X cpwm=0x%02X\n", __func__, pwrpriv->rpwm, pwrpriv->cpwm);
...@@ -1571,7 +1571,7 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work) ...@@ -1571,7 +1571,7 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work)
return; return;
} }
_enter_pwrlock(&pwrpriv->lock); down(&pwrpriv->lock);
if ((pwrpriv->rpwm == pwrpriv->cpwm) || (pwrpriv->cpwm >= PS_STATE_S2)) { if ((pwrpriv->rpwm == pwrpriv->cpwm) || (pwrpriv->cpwm >= PS_STATE_S2)) {
RTW_INFO("%s: cpwm=%d, nothing to do!\n", __func__, pwrpriv->cpwm); RTW_INFO("%s: cpwm=%d, nothing to do!\n", __func__, pwrpriv->cpwm);
...@@ -1582,7 +1582,7 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work) ...@@ -1582,7 +1582,7 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work)
pwrpriv->brpwmtimeout = _FALSE; pwrpriv->brpwmtimeout = _FALSE;
exit: exit:
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
} }
/* /*
...@@ -1650,7 +1650,7 @@ s32 rtw_register_task_alive(PADAPTER padapter, u32 task) ...@@ -1650,7 +1650,7 @@ s32 rtw_register_task_alive(PADAPTER padapter, u32 task)
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S2; pslv = PS_STATE_S2;
_enter_pwrlock(&pwrctrl->lock); down(&pwrctrl->lock);
register_task_alive(pwrctrl, task); register_task_alive(pwrctrl, task);
...@@ -1664,7 +1664,7 @@ s32 rtw_register_task_alive(PADAPTER padapter, u32 task) ...@@ -1664,7 +1664,7 @@ s32 rtw_register_task_alive(PADAPTER padapter, u32 task)
} }
} }
_exit_pwrlock(&pwrctrl->lock); up(&pwrctrl->lock);
#ifdef CONFIG_DETECT_CPWM_BY_POLLING #ifdef CONFIG_DETECT_CPWM_BY_POLLING
if (_FAIL == res) { if (_FAIL == res) {
...@@ -1708,7 +1708,7 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task) ...@@ -1708,7 +1708,7 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task)
} }
#endif /* CONFIG_BT_COEXIST */ #endif /* CONFIG_BT_COEXIST */
_enter_pwrlock(&pwrctrl->lock); down(&pwrctrl->lock);
unregister_task_alive(pwrctrl, task); unregister_task_alive(pwrctrl, task);
...@@ -1721,7 +1721,7 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task) ...@@ -1721,7 +1721,7 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task)
} }
} }
_exit_pwrlock(&pwrctrl->lock); up(&pwrctrl->lock);
} }
...@@ -1749,7 +1749,7 @@ s32 rtw_register_tx_alive(PADAPTER padapter) ...@@ -1749,7 +1749,7 @@ s32 rtw_register_tx_alive(PADAPTER padapter)
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S2; pslv = PS_STATE_S2;
_enter_pwrlock(&pwrctrl->lock); down(&pwrctrl->lock);
register_task_alive(pwrctrl, XMIT_ALIVE); register_task_alive(pwrctrl, XMIT_ALIVE);
...@@ -1763,7 +1763,7 @@ s32 rtw_register_tx_alive(PADAPTER padapter) ...@@ -1763,7 +1763,7 @@ s32 rtw_register_tx_alive(PADAPTER padapter)
} }
} }
_exit_pwrlock(&pwrctrl->lock); up(&pwrctrl->lock);
#ifdef CONFIG_DETECT_CPWM_BY_POLLING #ifdef CONFIG_DETECT_CPWM_BY_POLLING
if (_FAIL == res) { if (_FAIL == res) {
...@@ -1800,7 +1800,7 @@ s32 rtw_register_cmd_alive(PADAPTER padapter) ...@@ -1800,7 +1800,7 @@ s32 rtw_register_cmd_alive(PADAPTER padapter)
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S2; pslv = PS_STATE_S2;
_enter_pwrlock(&pwrctrl->lock); down(&pwrctrl->lock);
register_task_alive(pwrctrl, CMD_ALIVE); register_task_alive(pwrctrl, CMD_ALIVE);
...@@ -1814,7 +1814,7 @@ s32 rtw_register_cmd_alive(PADAPTER padapter) ...@@ -1814,7 +1814,7 @@ s32 rtw_register_cmd_alive(PADAPTER padapter)
} }
} }
_exit_pwrlock(&pwrctrl->lock); up(&pwrctrl->lock);
#ifdef CONFIG_DETECT_CPWM_BY_POLLING #ifdef CONFIG_DETECT_CPWM_BY_POLLING
if (_FAIL == res) { if (_FAIL == res) {
...@@ -1843,11 +1843,11 @@ s32 rtw_register_rx_alive(PADAPTER padapter) ...@@ -1843,11 +1843,11 @@ s32 rtw_register_rx_alive(PADAPTER padapter)
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrctrl->lock); down(&pwrctrl->lock);
register_task_alive(pwrctrl, RECV_ALIVE); register_task_alive(pwrctrl, RECV_ALIVE);
_exit_pwrlock(&pwrctrl->lock); up(&pwrctrl->lock);
return _SUCCESS; return _SUCCESS;
...@@ -1869,11 +1869,11 @@ s32 rtw_register_evt_alive(PADAPTER padapter) ...@@ -1869,11 +1869,11 @@ s32 rtw_register_evt_alive(PADAPTER padapter)
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrctrl->lock); down(&pwrctrl->lock);
register_task_alive(pwrctrl, EVT_ALIVE); register_task_alive(pwrctrl, EVT_ALIVE);
_exit_pwrlock(&pwrctrl->lock); up(&pwrctrl->lock);
return _SUCCESS; return _SUCCESS;
...@@ -1920,7 +1920,7 @@ void rtw_unregister_tx_alive(PADAPTER padapter) ...@@ -1920,7 +1920,7 @@ void rtw_unregister_tx_alive(PADAPTER padapter)
} }
} }
#endif #endif
_enter_pwrlock(&pwrctrl->lock); down(&pwrctrl->lock);
unregister_task_alive(pwrctrl, XMIT_ALIVE); unregister_task_alive(pwrctrl, XMIT_ALIVE);
...@@ -1933,7 +1933,7 @@ void rtw_unregister_tx_alive(PADAPTER padapter) ...@@ -1933,7 +1933,7 @@ void rtw_unregister_tx_alive(PADAPTER padapter)
} }
} }
_exit_pwrlock(&pwrctrl->lock); up(&pwrctrl->lock);
} }
...@@ -1979,7 +1979,7 @@ void rtw_unregister_cmd_alive(PADAPTER padapter) ...@@ -1979,7 +1979,7 @@ void rtw_unregister_cmd_alive(PADAPTER padapter)
} }
#endif #endif
_enter_pwrlock(&pwrctrl->lock); down(&pwrctrl->lock);
unregister_task_alive(pwrctrl, CMD_ALIVE); unregister_task_alive(pwrctrl, CMD_ALIVE);
...@@ -1992,7 +1992,7 @@ void rtw_unregister_cmd_alive(PADAPTER padapter) ...@@ -1992,7 +1992,7 @@ void rtw_unregister_cmd_alive(PADAPTER padapter)
} }
} }
_exit_pwrlock(&pwrctrl->lock); up(&pwrctrl->lock);
} }
...@@ -2006,12 +2006,12 @@ void rtw_unregister_rx_alive(PADAPTER padapter) ...@@ -2006,12 +2006,12 @@ void rtw_unregister_rx_alive(PADAPTER padapter)
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrctrl->lock); down(&pwrctrl->lock);
unregister_task_alive(pwrctrl, RECV_ALIVE); unregister_task_alive(pwrctrl, RECV_ALIVE);
_exit_pwrlock(&pwrctrl->lock); up(&pwrctrl->lock);
} }
...@@ -2025,7 +2025,7 @@ void rtw_unregister_evt_alive(PADAPTER padapter) ...@@ -2025,7 +2025,7 @@ void rtw_unregister_evt_alive(PADAPTER padapter)
unregister_task_alive(pwrctrl, EVT_ALIVE); unregister_task_alive(pwrctrl, EVT_ALIVE);
_exit_pwrlock(&pwrctrl->lock); up(&pwrctrl->lock);
} }
#endif /* CONFIG_LPS_LCLK */ #endif /* CONFIG_LPS_LCLK */
...@@ -2619,13 +2619,13 @@ void rtw_ps_deny(PADAPTER padapter, PS_DENY_REASON reason) ...@@ -2619,13 +2619,13 @@ void rtw_ps_deny(PADAPTER padapter, PS_DENY_REASON reason)
pwrpriv = adapter_to_pwrctl(padapter); pwrpriv = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrpriv->lock); down(&pwrpriv->lock);
if (pwrpriv->ps_deny & BIT(reason)) { if (pwrpriv->ps_deny & BIT(reason)) {
RTW_INFO(FUNC_ADPT_FMT ": [WARNING] Reason %d had been set before!!\n", RTW_INFO(FUNC_ADPT_FMT ": [WARNING] Reason %d had been set before!!\n",
FUNC_ADPT_ARG(padapter), reason); FUNC_ADPT_ARG(padapter), reason);
} }
pwrpriv->ps_deny |= BIT(reason); pwrpriv->ps_deny |= BIT(reason);
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
/* RTW_INFO("-" FUNC_ADPT_FMT ": Now PS deny for 0x%08X\n", /* RTW_INFO("-" FUNC_ADPT_FMT ": Now PS deny for 0x%08X\n",
* FUNC_ADPT_ARG(padapter), pwrpriv->ps_deny); */ * FUNC_ADPT_ARG(padapter), pwrpriv->ps_deny); */
...@@ -2645,13 +2645,13 @@ void rtw_ps_deny_cancel(PADAPTER padapter, PS_DENY_REASON reason) ...@@ -2645,13 +2645,13 @@ void rtw_ps_deny_cancel(PADAPTER padapter, PS_DENY_REASON reason)
pwrpriv = adapter_to_pwrctl(padapter); pwrpriv = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrpriv->lock); down(&pwrpriv->lock);
if ((pwrpriv->ps_deny & BIT(reason)) == 0) { if ((pwrpriv->ps_deny & BIT(reason)) == 0) {
RTW_INFO(FUNC_ADPT_FMT ": [ERROR] Reason %d had been canceled before!!\n", RTW_INFO(FUNC_ADPT_FMT ": [ERROR] Reason %d had been canceled before!!\n",
FUNC_ADPT_ARG(padapter), reason); FUNC_ADPT_ARG(padapter), reason);
} }
pwrpriv->ps_deny &= ~BIT(reason); pwrpriv->ps_deny &= ~BIT(reason);
_exit_pwrlock(&pwrpriv->lock); up(&pwrpriv->lock);
/* RTW_INFO("-" FUNC_ADPT_FMT ": Now PS deny for 0x%08X\n", /* RTW_INFO("-" FUNC_ADPT_FMT ": Now PS deny for 0x%08X\n",
* FUNC_ADPT_ARG(padapter), pwrpriv->ps_deny); */ * FUNC_ADPT_ARG(padapter), pwrpriv->ps_deny); */
......
...@@ -697,7 +697,6 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame) ...@@ -697,7 +697,6 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame)
} }
/* ###set the security information in the recv_frame */ /* ###set the security information in the recv_frame */
union recv_frame *portctrl(_adapter *adapter, union recv_frame *precv_frame);
union recv_frame *portctrl(_adapter *adapter, union recv_frame *precv_frame) union recv_frame *portctrl(_adapter *adapter, union recv_frame *precv_frame)
{ {
u8 *psta_addr = NULL; u8 *psta_addr = NULL;
...@@ -2531,7 +2530,6 @@ static void recvframe_expand_pkt( ...@@ -2531,7 +2530,6 @@ static void recvframe_expand_pkt(
#endif #endif
/* perform defrag */ /* perform defrag */
union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q);
union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q) union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
{ {
_list *plist, *phead; _list *plist, *phead;
...@@ -2541,7 +2539,6 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q) ...@@ -2541,7 +2539,6 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
union recv_frame *prframe, *pnextrframe; union recv_frame *prframe, *pnextrframe;
_queue *pfree_recv_queue; _queue *pfree_recv_queue;
curfragnum = 0; curfragnum = 0;
pfree_recv_queue = &adapter->recvpriv.free_recv_queue; pfree_recv_queue = &adapter->recvpriv.free_recv_queue;
......
...@@ -476,9 +476,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) ...@@ -476,9 +476,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL); */ /* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL); */
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
if (_rtw_queue_empty(pfree_sta_queue) == _TRUE) { if (!pstapriv->padapter->pnetdev || _rtw_queue_empty(pfree_sta_queue) == _TRUE) {
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL); */
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
psta = NULL; psta = NULL;
} else { } else {
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list); psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
...@@ -757,6 +755,11 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta) ...@@ -757,6 +755,11 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
#ifdef CONFIG_NATIVEAP_MLME #ifdef CONFIG_NATIVEAP_MLME
if (psta->cmn.aid > 31) {
pr_err("***** psta->aid (%d) out of bounds\n", psta->cmn.aid);
return _FAIL;
}
if (pmlmeinfo->state == _HW_STATE_AP_) { if (pmlmeinfo->state == _HW_STATE_AP_) {
pstapriv->sta_dz_bitmap &= ~BIT(psta->cmn.aid); pstapriv->sta_dz_bitmap &= ~BIT(psta->cmn.aid);
pstapriv->tim_bitmap &= ~BIT(psta->cmn.aid); pstapriv->tim_bitmap &= ~BIT(psta->cmn.aid);
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <drv_types.h> #include <drv_types.h>
#include <hal_data.h> #include <hal_data.h>
#include <net/cfg80211.h>
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS) #if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n" #error "Shall be Linux or Windows, but not both!\n"
...@@ -1285,7 +1286,7 @@ inline u8 rtw_get_hwseq_no(_adapter *padapter) ...@@ -1285,7 +1286,7 @@ inline u8 rtw_get_hwseq_no(_adapter *padapter)
#endif /* CONFIG_CONCURRENT_MODE */ #endif /* CONFIG_CONCURRENT_MODE */
return hwseq_num; return hwseq_num;
} }
static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattrib) static s32 update_attrib(_adapter *padapter, struct sk_buff *pkt, struct pkt_attrib *pattrib)
{ {
uint i; uint i;
struct pkt_file pktfile; struct pkt_file pktfile;
...@@ -2305,11 +2306,11 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra ...@@ -2305,11 +2306,11 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
struct pkt_file pktfile; struct pkt_file pktfile;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
_pkt *pkt; struct sk_buff *pkt;
struct pkt_file pktfile_queue; struct pkt_file pktfile_queue;
struct pkt_attrib *pattrib_queue; struct pkt_attrib *pattrib_queue;
_pkt *pkt_queue; struct sk_buff *pkt_queue;
s32 llc_sz, mem_sz; s32 llc_sz, mem_sz;
...@@ -2480,7 +2481,7 @@ This sub-routine will perform all the following: ...@@ -2480,7 +2481,7 @@ This sub-routine will perform all the following:
6. apply sw-encrypt, if necessary. 6. apply sw-encrypt, if necessary.
*/ */
s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxmitframe) s32 rtw_xmitframe_coalesce(_adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
{ {
struct pkt_file pktfile; struct pkt_file pktfile;
...@@ -2677,7 +2678,7 @@ exit: ...@@ -2677,7 +2678,7 @@ exit:
#ifdef CONFIG_IEEE80211W #ifdef CONFIG_IEEE80211W
/* broadcast or multicast management pkt use BIP, unicast management pkt use CCMP encryption */ /* broadcast or multicast management pkt use BIP, unicast management pkt use CCMP encryption */
s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxmitframe) s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
{ {
struct pkt_file pktfile; struct pkt_file pktfile;
s32 frg_inx, frg_len, mpdu_len, llc_sz, mem_sz; s32 frg_inx, frg_len, mpdu_len, llc_sz, mem_sz;
...@@ -3427,7 +3428,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram ...@@ -3427,7 +3428,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
_irqL irqL; _irqL irqL;
_queue *queue = NULL; _queue *queue = NULL;
_adapter *padapter = pxmitpriv->adapter; _adapter *padapter = pxmitpriv->adapter;
_pkt *pndis_pkt = NULL; struct sk_buff *pndis_pkt = NULL;
if (pxmitframe == NULL) { if (pxmitframe == NULL) {
...@@ -4411,7 +4412,7 @@ fail: ...@@ -4411,7 +4412,7 @@ fail:
* 0 success, hardware will handle this xmit frame(packet) * 0 success, hardware will handle this xmit frame(packet)
* <0 fail * <0 fail
*/ */
s32 rtw_xmit(_adapter *padapter, _pkt **ppkt) s32 rtw_xmit(_adapter *padapter, struct sk_buff **ppkt)
{ {
static systime start = 0; static systime start = 0;
static u32 drop_cnt = 0; static u32 drop_cnt = 0;
...@@ -5354,7 +5355,7 @@ sint check_pending_xmitbuf( ...@@ -5354,7 +5355,7 @@ sint check_pending_xmitbuf(
return ret; return ret;
} }
thread_return rtw_xmit_thread(thread_context context) int rtw_xmit_thread(void *context)
{ {
s32 err; s32 err;
PADAPTER padapter; PADAPTER padapter;
......
realtek-rtl88xxau-dkms (5.2.20.2~20190617-0kali1) kali-dev; urgency=medium
[ Raphaël Hertzog ]
* Update Vcs-* fields for the move to gitlab.com
* Add GitLab's CI configuration file
[ Sophie Brun ]
* Add debian/gbp.conf
* New upstream version 5.2.20.2~20190617
* Update debian/copyright
* Add a patch to change snapshot version
-- Sophie Brun <sophie@offensive-security.com> Fri, 16 Aug 2019 10:17:10 +0200
realtek-rtl88xxau-dkms (5.2.20.2~20190210-0kali1) kali-dev; urgency=medium realtek-rtl88xxau-dkms (5.2.20.2~20190210-0kali1) kali-dev; urgency=medium
* Import new snapshot from git (issue 5283) * Import new snapshot from git (issue 5283)
......
...@@ -12,7 +12,7 @@ Copyright: 2009 Johannes Berg <johannes@sipsolutions.net> ...@@ -12,7 +12,7 @@ Copyright: 2009 Johannes Berg <johannes@sipsolutions.net>
License: GPL-2 License: GPL-2
Files: debian/* Files: debian/*
Copyright: 2017-2018 Offensive Security Copyright: 2017-2019 Offensive Security
License: GPL-2 License: GPL-2
License: GPL-2 License: GPL-2
......
[DEFAULT]
debian-branch=kali/master
update-version.patch
Description: Change version
We imported a snapshot to get latest improvements. Change the dmks.conf
version to be consistent with source package version.
Author: Sophie Brun <sophie@offensive-security.com>
Last-Update: 2019-08-16
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/dkms.conf
+++ b/dkms.conf
@@ -1,5 +1,5 @@
PACKAGE_NAME="realtek-rtl88xxau"
-PACKAGE_VERSION="5.2.20.2~20190429"
+PACKAGE_VERSION="5.2.20.2~20190617"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=88XXau
PROCS_NUM=`nproc`
...@@ -20,4 +20,16 @@ RESULT=$? ...@@ -20,4 +20,16 @@ RESULT=$?
echo "Finished running dkms install steps." echo "Finished running dkms install steps."
if echo "net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf; then
echo "Disabled IPv6 Successfuly "
sysctl -p
else
echo "Could not disable IPv6"
fi
exit $RESULT exit $RESULT
PACKAGE_NAME="realtek-rtl88xxau" PACKAGE_NAME="realtek-rtl88xxau"
PACKAGE_VERSION="5.2.20.2~20190210" PACKAGE_VERSION="5.2.20.2~20190429"
CLEAN="'make' clean" CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=88XXau BUILT_MODULE_NAME[0]=88XXau
PROCS_NUM=`nproc` PROCS_NUM=`nproc`
......
...@@ -10933,13 +10933,12 @@ exit: ...@@ -10933,13 +10933,12 @@ exit:
void rtw_dump_cur_efuse(PADAPTER padapter) void rtw_dump_cur_efuse(PADAPTER padapter)
{ {
int i =0; u16 mapsize =0;
int mapsize =0;
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter); HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter);
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&mapsize, _FALSE); EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&mapsize, _FALSE);
if (mapsize <= 0 || mapsize > EEPROM_MAX_SIZE) { if (mapsize > EEPROM_MAX_SIZE) {
RTW_ERR("wrong map size %d\n", mapsize); RTW_ERR("wrong map size %d\n", mapsize);
return; return;
} }
...@@ -10969,7 +10968,7 @@ u32 Hal_readPGDataFromConfigFile(PADAPTER padapter) ...@@ -10969,7 +10968,7 @@ u32 Hal_readPGDataFromConfigFile(PADAPTER padapter)
{ {
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter); HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter);
u32 ret = _FALSE; u32 ret = _FALSE;
u32 maplen = 0; u16 maplen = 0;
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&maplen, _FALSE); EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&maplen, _FALSE);
......
...@@ -35,23 +35,6 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz) ...@@ -35,23 +35,6 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
#endif /* CONFIG_RX_INDICATE_QUEUE */ #endif /* CONFIG_RX_INDICATE_QUEUE */
#endif /* PLATFORM_FREEBSD */ #endif /* PLATFORM_FREEBSD */
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
#ifdef PLATFORM_LINUX
precvpriv->int_in_urb = usb_alloc_urb(0, GFP_KERNEL);
if (precvpriv->int_in_urb == NULL) {
res = _FAIL;
RTW_INFO("alloc_urb for interrupt in endpoint fail !!!!\n");
goto exit;
}
#endif /* PLATFORM_LINUX */
precvpriv->int_in_buf = rtw_zmalloc(ini_in_buf_sz);
if (precvpriv->int_in_buf == NULL) {
res = _FAIL;
RTW_INFO("alloc_mem for interrupt in endpoint fail !!!!\n");
goto exit;
}
#endif /* CONFIG_USB_INTERRUPT_IN_PIPE */
/* init recv_buf */ /* init recv_buf */
_rtw_init_queue(&precvpriv->free_recv_buf_queue); _rtw_init_queue(&precvpriv->free_recv_buf_queue);
_rtw_init_queue(&precvpriv->recv_buf_pending_queue); _rtw_init_queue(&precvpriv->recv_buf_pending_queue);
...@@ -162,14 +145,6 @@ void usb_free_recv_priv(_adapter *padapter, u16 ini_in_buf_sz) ...@@ -162,14 +145,6 @@ void usb_free_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
if (precvpriv->pallocated_recv_buf) if (precvpriv->pallocated_recv_buf)
rtw_mfree(precvpriv->pallocated_recv_buf, NR_RECVBUFF * sizeof(struct recv_buf) + 4); rtw_mfree(precvpriv->pallocated_recv_buf, NR_RECVBUFF * sizeof(struct recv_buf) + 4);
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
#ifdef PLATFORM_LINUX
if (precvpriv->int_in_urb)
usb_free_urb(precvpriv->int_in_urb);
#endif
if (precvpriv->int_in_buf)
rtw_mfree(precvpriv->int_in_buf, ini_in_buf_sz);
#endif /* CONFIG_USB_INTERRUPT_IN_PIPE */
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
......
...@@ -1877,10 +1877,6 @@ odm_cmn_info_init( ...@@ -1877,10 +1877,6 @@ odm_cmn_info_init(
p_dm->support_interface = (u8)value; p_dm->support_interface = (u8)value;
break; break;
case ODM_CMNINFO_MP_TEST_CHIP:
p_dm->is_mp_chip = (u8)value;
break;
case ODM_CMNINFO_IC_TYPE: case ODM_CMNINFO_IC_TYPE:
p_dm->support_ic_type = (u32)value; p_dm->support_ic_type = (u32)value;
break; break;
......
...@@ -98,11 +98,11 @@ extern const u16 phy_rate_table[28]; ...@@ -98,11 +98,11 @@ extern const u16 phy_rate_table[28];
#define dm_type_by_driver 1 #define dm_type_by_driver 1
struct phydm_phystatus_statistic { struct phydm_phystatus_statistic {
/*[CCK]*/ /*[CCK]*/
u32 rssi_cck_sum; u32 rssi_cck_sum;
u32 rssi_cck_cnt; u32 rssi_cck_cnt;
/*[OFDM]*/ /*[OFDM]*/
u32 rssi_ofdm_sum; u32 rssi_ofdm_sum;
u32 rssi_ofdm_cnt; u32 rssi_ofdm_cnt;
u32 evm_ofdm_sum; u32 evm_ofdm_sum;
...@@ -138,7 +138,7 @@ struct phydm_phystatus_statistic { ...@@ -138,7 +138,7 @@ struct phydm_phystatus_statistic {
#if (defined(PHYDM_COMPILE_ABOVE_4SS)) #if (defined(PHYDM_COMPILE_ABOVE_4SS))
u32 rssi_4ss_cnt; u32 rssi_4ss_cnt;
u32 rssi_4ss_sum[4]; u32 rssi_4ss_sum[4];
u32 evm_4ss_sum[4]; u32 evm_4ss_sum[4];
u32 snr_4ss_sum[4]; u32 snr_4ss_sum[4];
u16 evm_4ss_hist[4][PHY_HIST_SIZE]; u16 evm_4ss_hist[4][PHY_HIST_SIZE];
u16 snr_4ss_hist[4][PHY_HIST_SIZE]; u16 snr_4ss_hist[4][PHY_HIST_SIZE];
...@@ -146,7 +146,7 @@ struct phydm_phystatus_statistic { ...@@ -146,7 +146,7 @@ struct phydm_phystatus_statistic {
}; };
struct phydm_phystatus_avg { struct phydm_phystatus_avg {
/*[CCK]*/ /*[CCK]*/
u8 rssi_cck_avg; u8 rssi_cck_avg;
/*[OFDM]*/ /*[OFDM]*/
...@@ -172,7 +172,7 @@ struct phydm_phystatus_avg { ...@@ -172,7 +172,7 @@ struct phydm_phystatus_avg {
/*[4SS]*/ /*[4SS]*/
#if (defined(PHYDM_COMPILE_ABOVE_4SS)) #if (defined(PHYDM_COMPILE_ABOVE_4SS))
u8 rssi_4ss_avg[4]; u8 rssi_4ss_avg[4];
u8 evm_4ss_avg[4]; u8 evm_4ss_avg[4];
u8 snr_4ss_avg[4]; u8 snr_4ss_avg[4];
#endif #endif
}; };
...@@ -449,7 +449,7 @@ enum phydm_dbg_comp { ...@@ -449,7 +449,7 @@ enum phydm_dbg_comp {
DBG_DFS = BIT(F11_DFS), DBG_DFS = BIT(F11_DFS),
DBG_DYN_ARFR = BIT(F12_DYN_ARFR), DBG_DYN_ARFR = BIT(F12_DYN_ARFR),
DBG_ADPTVTY = BIT(F13_ADPTVTY), DBG_ADPTVTY = BIT(F13_ADPTVTY),
DBG_CFO_TRK = BIT(F14_CFO_TRK), DBG_CFO_TRK = BIT(F14_CFO_TRK),
DBG_ENV_MNTR = BIT(F15_ENV_MNTR), DBG_ENV_MNTR = BIT(F15_ENV_MNTR),
DBG_PRI_CCA = BIT(F16_PRI_CCA), DBG_PRI_CCA = BIT(F16_PRI_CCA),
DBG_ADPTV_SOML = BIT(F17_ADPTV_SOML), DBG_ADPTV_SOML = BIT(F17_ADPTV_SOML),
...@@ -562,7 +562,7 @@ struct phydm_iot_center { ...@@ -562,7 +562,7 @@ struct phydm_iot_center {
/*-----------HOOK BEFORE REG INIT-----------*/ /*-----------HOOK BEFORE REG INIT-----------*/
u8 support_platform;/*PHYDM Platform info WIN/AP/CE = 1/2/3 */ u8 support_platform;/*PHYDM Platform info WIN/AP/CE = 1/2/3 */
u8 normal_rx_path; u8 normal_rx_path;
boolean brxagcswitch; /* for rx AGC table switch in Microsoft case */ boolean brxagcswitch; /* for rx AGC table switch in Microsoft case */
u8 support_interface;/*PHYDM PCIE/USB/SDIO = 1/2/3*/ u8 support_interface;/*PHYDM PCIE/USB/SDIO = 1/2/3*/
u32 support_ic_type; /*PHYDM supported IC*/ u32 support_ic_type; /*PHYDM supported IC*/
...@@ -609,9 +609,9 @@ struct phydm_iot_center { ...@@ -609,9 +609,9 @@ struct phydm_iot_center {
u8 is_receiver_blocking_en; u8 is_receiver_blocking_en;
u16 fw_offload_ability; u16 fw_offload_ability;
/*-----------HOOK BEFORE REG INIT-----------*/ /*-----------HOOK BEFORE REG INIT-----------*/
/*===========================================================*/ /*===========================================================*/
/*====[ CALL BY Reference ]=========================================*/ /*====[ CALL BY Reference ]=========================================*/
/*===========================================================*/ /*===========================================================*/
u64 *p_num_tx_bytes_unicast; /*TX Unicast byte count*/ u64 *p_num_tx_bytes_unicast; /*TX Unicast byte count*/
u64 *p_num_rx_bytes_unicast; /*RX Unicast byte count*/ u64 *p_num_rx_bytes_unicast; /*RX Unicast byte count*/
...@@ -644,9 +644,9 @@ struct phydm_iot_center { ...@@ -644,9 +644,9 @@ struct phydm_iot_center {
u8 *p_mp_mode; u8 *p_mp_mode;
u32 *p_interrupt_mask; u32 *p_interrupt_mask;
u8 *p_bb_op_mode; u8 *p_bb_op_mode;
/*===========================================================*/ /*===========================================================*/
/*====[ CALL BY VALUE ]===========================================*/ /*====[ CALL BY VALUE ]===========================================*/
/*===========================================================*/ /*===========================================================*/
u8 disable_phydm_watchdog; u8 disable_phydm_watchdog;
boolean is_link_in_process; boolean is_link_in_process;
......
...@@ -205,7 +205,6 @@ phydm_bb_debug_info_n_series( ...@@ -205,7 +205,6 @@ phydm_bb_debug_info_n_series(
s32 scfo_a = 0, scfo_b = 0, avg_cfo_a = 0, avg_cfo_b = 0; s32 scfo_a = 0, scfo_b = 0, avg_cfo_a = 0, avg_cfo_b = 0;
s32 cfo_end_a = 0, cfo_end_b = 0, acq_cfo_a = 0, acq_cfo_b = 0; s32 cfo_end_a = 0, cfo_end_b = 0, acq_cfo_a = 0, acq_cfo_b = 0;
PHYDM_SNPRINTF((output + used, out_len - used, "\r\n %-35s\n", "BB Report Info"));
/*AGC result*/ /*AGC result*/
value32 = odm_get_bb_reg(p_dm, 0xdd0, MASKDWORD); value32 = odm_get_bb_reg(p_dm, 0xdd0, MASKDWORD);
......
...@@ -21,28 +21,13 @@ ...@@ -21,28 +21,13 @@
#include "phydm_precomp.h" #include "phydm_precomp.h"
#define READ_AND_CONFIG_MP(ic, txt) (odm_read_and_config_mp_##ic##txt(p_dm)) #define READ_AND_CONFIG_MP(ic, txt) (odm_read_and_config_mp_##ic##txt(p_dm))
#define READ_AND_CONFIG_TC(ic, txt) (odm_read_and_config_tc_##ic##txt(p_dm))
#if (PHYDM_TESTCHIP_SUPPORT == 1)
#define READ_AND_CONFIG(ic, txt) do {\
if (p_dm->is_mp_chip)\
READ_AND_CONFIG_MP(ic, txt);\
else\
READ_AND_CONFIG_TC(ic, txt);\
} while (0)
#else
#define READ_AND_CONFIG READ_AND_CONFIG_MP #define READ_AND_CONFIG READ_AND_CONFIG_MP
#endif
#define GET_VERSION_MP(ic, txt) (odm_get_version_mp_##ic##txt()) #define GET_VERSION_MP(ic, txt) (odm_get_version_mp_##ic##txt())
#define GET_VERSION_TC(ic, txt) (odm_get_version_tc_##ic##txt()) #define GET_VERSION_TC(ic, txt) (odm_get_version_tc_##ic##txt())
#if (PHYDM_TESTCHIP_SUPPORT == 1) #define GET_VERSION(ic, txt) GET_VERSION_MP(ic, txt)
#define GET_VERSION(ic, txt) (p_dm->is_mp_chip ? GET_VERSION_MP(ic, txt) : GET_VERSION_TC(ic, txt))
#else
#define GET_VERSION(ic, txt) GET_VERSION_MP(ic, txt)
#endif
enum hal_status enum hal_status
odm_config_rf_with_header_file( odm_config_rf_with_header_file(
......
This diff is collapsed.
...@@ -1083,7 +1083,7 @@ void rtl8812_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus) ...@@ -1083,7 +1083,7 @@ void rtl8812_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
rtw_hal_set_fw_rsvd_page(padapter, _FALSE); rtw_hal_set_fw_rsvd_page(padapter, _FALSE);
DLBcnCount++; DLBcnCount++;
do { do {
rtw_yield_os(); yield();
/*rtw_mdelay_os(10);*/ /*rtw_mdelay_os(10);*/
/* check rsvd page download OK.*/ /* check rsvd page download OK.*/
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bcn_valid)); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bcn_valid));
...@@ -1127,7 +1127,7 @@ void rtl8812_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus) ...@@ -1127,7 +1127,7 @@ void rtl8812_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
DLBcnCount++; DLBcnCount++;
do { do {
rtw_yield_os(); yield();
/*rtw_mdelay_os(10);*/ /*rtw_mdelay_os(10);*/
/* check rsvd page download OK.*/ /* check rsvd page download OK.*/
rtw_hal_get_hwreg(padapter , HW_VAR_BCN_VALID , (u8 *)(&bcn_valid)); rtw_hal_get_hwreg(padapter , HW_VAR_BCN_VALID , (u8 *)(&bcn_valid));
...@@ -1506,7 +1506,7 @@ void rtl8812a_download_BTCoex_AP_mode_rsvd_page(PADAPTER padapter) ...@@ -1506,7 +1506,7 @@ void rtl8812a_download_BTCoex_AP_mode_rsvd_page(PADAPTER padapter)
SetFwRsvdPagePkt_BTCoex(padapter); SetFwRsvdPagePkt_BTCoex(padapter);
DLBcnCount++; DLBcnCount++;
do { do {
rtw_yield_os(); yield();
/* rtw_mdelay_os(10); */ /* rtw_mdelay_os(10); */
/* check rsvd page download OK. */ /* check rsvd page download OK. */
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bcn_valid)); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bcn_valid));
......
...@@ -399,7 +399,7 @@ static s32 polling_fwdl_chksum(_adapter *adapter, u32 min_cnt, u32 timeout_ms) ...@@ -399,7 +399,7 @@ static s32 polling_fwdl_chksum(_adapter *adapter, u32 min_cnt, u32 timeout_ms)
value32 = rtw_read32(adapter, REG_MCUFWDL); value32 = rtw_read32(adapter, REG_MCUFWDL);
if (value32 & FWDL_ChkSum_rpt || RTW_CANNOT_IO(adapter)) if (value32 & FWDL_ChkSum_rpt || RTW_CANNOT_IO(adapter))
break; break;
rtw_yield_os(); yield();
} while (rtw_get_passing_time_ms(start) < timeout_ms || cnt < min_cnt); } while (rtw_get_passing_time_ms(start) < timeout_ms || cnt < min_cnt);
if (!(value32 & FWDL_ChkSum_rpt)) if (!(value32 & FWDL_ChkSum_rpt))
...@@ -437,7 +437,7 @@ static s32 _FWFreeToGo8812(_adapter *adapter, u32 min_cnt, u32 timeout_ms) ...@@ -437,7 +437,7 @@ static s32 _FWFreeToGo8812(_adapter *adapter, u32 min_cnt, u32 timeout_ms)
value32 = rtw_read32(adapter, REG_MCUFWDL); value32 = rtw_read32(adapter, REG_MCUFWDL);
if (value32 & WINTINI_RDY || RTW_CANNOT_IO(adapter)) if (value32 & WINTINI_RDY || RTW_CANNOT_IO(adapter))
break; break;
rtw_yield_os(); yield();
} while (rtw_get_passing_time_ms(start) < timeout_ms || cnt < min_cnt); } while (rtw_get_passing_time_ms(start) < timeout_ms || cnt < min_cnt);
if (!(value32 & WINTINI_RDY)) if (!(value32 & WINTINI_RDY))
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#endif #endif
static void _dbg_dump_macreg(_adapter *padapter) static void _dbg_dump_macreg(_adapter *padapter)
{ {
u32 offset = 0; u32 offset = 0;
...@@ -964,7 +963,7 @@ usb_AggSettingRxUpdate_8812A( ...@@ -964,7 +963,7 @@ usb_AggSettingRxUpdate_8812A(
/* Adjust DMA page and thresh. */ /* Adjust DMA page and thresh. */
temp = pHalData->rxagg_dma_size | (pHalData->rxagg_dma_timeout << 8); temp = pHalData->rxagg_dma_size | (pHalData->rxagg_dma_timeout << 8);
rtw_write16(Adapter, REG_RXDMA_AGG_PG_TH, temp); rtw_write16(Adapter, REG_RXDMA_AGG_PG_TH, temp);
rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH + 3, BIT(7)); /* for dma agg , 0x280[31]GBIT_RXDMA_AGG_OLD_MOD, set 1 */ rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH + 3, BIT(7)); /* for dma agg , 0x280[31]1GBIT_RXDMA_AGG_OLD_MOD, set 1 */
} }
break; break;
case RX_AGG_USB: case RX_AGG_USB:
......
...@@ -836,7 +836,7 @@ void rtl8814_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus) ...@@ -836,7 +836,7 @@ void rtl8814_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
DLBcnCount++; DLBcnCount++;
do do
{ {
rtw_yield_os(); yield();
//rtw_mdelay_os(10); //rtw_mdelay_os(10);
// check rsvd page download OK. // check rsvd page download OK.
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid)); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid));
...@@ -879,7 +879,7 @@ void rtl8814_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus) ...@@ -879,7 +879,7 @@ void rtl8814_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
do do
{ {
rtw_yield_os(); yield();
//rtw_mdelay_os(10); //rtw_mdelay_os(10);
// check rsvd page download OK. // check rsvd page download OK.
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid)); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid));
...@@ -1168,7 +1168,7 @@ void rtl8814_iqk_done(_adapter* padapter) ...@@ -1168,7 +1168,7 @@ void rtl8814_iqk_done(_adapter* padapter)
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct submit_ctx *iqk_sctx = &pHalData->iqk_sctx; struct submit_ctx *iqk_sctx = &pHalData->iqk_sctx;
rtw_sctx_done(&iqk_sctx); rtw_sctx_done(&iqk_sctx);
} }
...@@ -1354,7 +1354,7 @@ static void SetFwRsvdPagePkt_BTCoex(PADAPTER padapter) ...@@ -1354,7 +1354,7 @@ static void SetFwRsvdPagePkt_BTCoex(PADAPTER padapter)
if (BufIndex < (MaxRsvdPageBufSize - PageSize)) { if (BufIndex < (MaxRsvdPageBufSize - PageSize)) {
BufIndex = TxDescOffset + (MaxRsvdPageBufSize - PageSize); BufIndex = TxDescOffset + (MaxRsvdPageBufSize - PageSize);
TotalPageNum = BCNQ_PAGE_NUM_8814-1; TotalPageNum = BCNQ_PAGE_NUM_8814-1;
} }
/* 3 (6) BT Qos null data */ /* 3 (6) BT Qos null data */
...@@ -1401,8 +1401,8 @@ static void SetFwRsvdPagePkt_BTCoex(PADAPTER padapter) ...@@ -1401,8 +1401,8 @@ static void SetFwRsvdPagePkt_BTCoex(PADAPTER padapter)
#ifdef CONFIG_WOWLAN #ifdef CONFIG_WOWLAN
rtl8814_set_FwAoacRsvdPage_cmd(padapter, &RsvdPageLoc); rtl8814_set_FwAoacRsvdPage_cmd(padapter, &RsvdPageLoc);
#endif #endif
} }
return; return;
error: error:
...@@ -1464,13 +1464,13 @@ void rtl8812a_download_BTCoex_AP_mode_rsvd_page(PADAPTER padapter) ...@@ -1464,13 +1464,13 @@ void rtl8812a_download_BTCoex_AP_mode_rsvd_page(PADAPTER padapter)
DLBcnCount++; DLBcnCount++;
do do
{ {
rtw_yield_os(); yield();
//rtw_mdelay_os(10); //rtw_mdelay_os(10);
// check rsvd page download OK. // check rsvd page download OK.
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid)); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid));
poll++; poll++;
} while (!bcn_valid && (poll%10) != 0 && !RTW_CANNOT_RUN(padapter)); } while (!bcn_valid && (poll%10) != 0 && !RTW_CANNOT_RUN(padapter));
} while (!bcn_valid && DLBcnCount <= 100 && !RTW_CANNOT_RUN(padapter)); } while (!bcn_valid && DLBcnCount <= 100 && !RTW_CANNOT_RUN(padapter));
if (RTW_CANNOT_RUN(padapter)) if (RTW_CANNOT_RUN(padapter))
......
...@@ -1776,35 +1776,31 @@ u32 rtl8814au_hal_deinit(PADAPTER Adapter) ...@@ -1776,35 +1776,31 @@ u32 rtl8814au_hal_deinit(PADAPTER Adapter)
if((pwrctl->bHWPwrPindetect ) && (pwrctl->bHWPowerdown)) if((pwrctl->bHWPwrPindetect ) && (pwrctl->bHWPowerdown))
rtl8814au_hw_power_down(Adapter); rtl8814au_hw_power_down(Adapter);
} }
} }
return _SUCCESS; return _SUCCESS;
} }
unsigned int rtl8814au_inirp_init(PADAPTER Adapter) unsigned int rtl8814au_inirp_init(PADAPTER Adapter)
{ {
u8 i; u8 i;
struct recv_buf *precvbuf; struct recv_buf *precvbuf;
uint status; uint status;
struct dvobj_priv *pdev= adapter_to_dvobj(Adapter); struct dvobj_priv *pdev= adapter_to_dvobj(Adapter);
struct intf_hdl * pintfhdl=&Adapter->iopriv.intf; struct intf_hdl * pintfhdl=&Adapter->iopriv.intf;
struct recv_priv *precvpriv = &(Adapter->recvpriv); struct recv_priv *precvpriv = &(Adapter->recvpriv);
u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
#endif
_read_port = pintfhdl->io_ops._read_port; _read_port = pintfhdl->io_ops._read_port;
status = _SUCCESS; status = _SUCCESS;
RT_TRACE(_module_hci_hal_init_c_,_drv_info_,("===> usb_inirp_init \n")); RT_TRACE(_module_hci_hal_init_c_,_drv_info_,("===> usb_inirp_init \n"));
precvpriv->ff_hwaddr = RECV_BULK_IN_ADDR; precvpriv->ff_hwaddr = RECV_BULK_IN_ADDR;
//issue Rx irp to receive data //issue Rx irp to receive data
precvbuf = (struct recv_buf *)precvpriv->precv_buf; precvbuf = (struct recv_buf *)precvpriv->precv_buf;
for(i=0; i<NR_RECVBUFF; i++) for(i=0; i<NR_RECVBUFF; i++)
{ {
if(_read_port(pintfhdl, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf) == _FALSE ) if(_read_port(pintfhdl, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf) == _FALSE )
...@@ -1813,27 +1809,13 @@ unsigned int rtl8814au_inirp_init(PADAPTER Adapter) ...@@ -1813,27 +1809,13 @@ unsigned int rtl8814au_inirp_init(PADAPTER Adapter)
status = _FAIL; status = _FAIL;
goto exit; goto exit;
} }
precvbuf++;
precvpriv->free_recv_buf_queue_cnt--;
}
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE precvbuf++;
if (pdev->RtInPipe[REALTEK_USB_IN_INT_EP_IDX] != 0x05) { precvpriv->free_recv_buf_queue_cnt--;
status = _FAIL;
RTW_INFO("%s =>Warning !! Have not USB Int-IN pipe, RtIntInPipe(%d)!!!\n", __func__, pdev->RtInPipe[REALTEK_USB_IN_INT_EP_IDX]);
goto exit;
}