...
 
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
#EXTRA_CFLAGS += -pedantic
#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-value
EXTRA_CFLAGS += -Wno-unused-label
......@@ -105,6 +109,7 @@ CONFIG_PLATFORM_ARM_RPI = n
CONFIG_PLATFORM_ARM64_RPI = n
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
CONFIG_PLATFORM_ARM_NETHUNTER = n
CONFIG_PLATFORM_JB_X86 = n
CONFIG_PLATFORM_ARM_S3C2K4 = n
CONFIG_PLATFORM_ARM_PXA2XX = n
......@@ -112,6 +117,7 @@ CONFIG_PLATFORM_ARM_S3C6K4 = n
CONFIG_PLATFORM_MIPS_RMI = n
CONFIG_PLATFORM_RTD2880B = n
CONFIG_PLATFORM_MIPS_AR9132 = n
CONFIG_PLATFORM_OPENWRT_NEO2 = n
CONFIG_PLATFORM_RTK_DMP = n
CONFIG_PLATFORM_MIPS_PLM = n
CONFIG_PLATFORM_MSTAR389 = n
......@@ -749,6 +755,21 @@ MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
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)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ACTIONS_ATM702X
#ARCH := arm
......@@ -839,6 +860,16 @@ KVER:= 3.1.10
KSRC:= /usr/src/Mstar_kernel/3.1.10/
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)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
......@@ -929,11 +960,22 @@ endif
ifeq ($(CONFIG_PLATFORM_MIPS_AR9132), y)
EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
ARCH := mips
CROSS_COMPILE := mips-openwrt-linux-
KSRC := /home/alex/test_openwrt/tmp/linux-2.6.30.9
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)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM
ARCH := mips
......@@ -1548,7 +1590,7 @@ export CONFIG_RTL8812AU = m
all: 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:
$(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
u8 bmatch = _FALSE;
u8 *pie = pnetwork->IEs;
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;) {
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
sta->wpa2_pairwise_cipher = pairwise_cipher & sec->wpa2_pairwise_cipher;
if (!sta->wpa2_group_cipher)
status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID;
status = WLAN_STATUS_INVALID_GROUP_CIPHER;
if (!sta->wpa2_pairwise_cipher)
status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID;
status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER;
} else
status = WLAN_STATUS_INVALID_IE;
......@@ -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;
if (!sta->wpa_group_cipher)
status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID;
status = WLAN_STATUS_INVALID_GROUP_CIPHER;
if (!sta->wpa_pairwise_cipher)
status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID;
status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER;
} else
status = WLAN_STATUS_INVALID_IE;
......
......@@ -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;
struct cmd_obj *pcmd;
......
......@@ -1214,7 +1214,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
elems->timeout_int = pos;
elems->timeout_int_len = elen;
break;
case WLAN_EID_HT_CAP:
case WLAN_EID_HT_CAPABILITY:
elems->ht_capabilities = pos;
elems->ht_capabilities_len = elen;
break;
......@@ -1230,7 +1230,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
elems->vht_operation = pos;
elems->vht_operation_len = elen;
break;
case WLAN_EID_VHT_OP_MODE_NOTIFY:
case WLAN_EID_OPMODE_NOTIF:
elems->vht_op_mode_notify = pos;
elems->vht_op_mode_notify_len = elen;
break;
......
......@@ -4319,7 +4319,8 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
u8 action = P2P_PUB_ACTION_ACTION;
u32 p2poui = cpu_to_be32(P2POUI);
u8 oui_subtype = P2P_GO_NEGO_RESP;
u8 wpsie[255] = { 0x00 }, p2pie[255] = { 0x00 };
u8 *wpsie;
u8 p2pie[ 255 ] = { 0x00 };
u8 p2pielen = 0, i;
uint wpsielen = 0;
u16 wps_devicepassword_id = 0x0000;
......@@ -4345,6 +4346,8 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
if (pmgntframe == NULL)
return;
wpsie = rtw_zmalloc(256);
RTW_INFO("[%s] In, result = %d\n", __FUNCTION__, result);
/* update attribute */
pattrib = &pmgntframe->attrib;
......@@ -4727,6 +4730,8 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
dump_mgntframe(padapter, pmgntframe);
kfree(wpsie);
return;
}
......@@ -8265,12 +8270,11 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status
/* setting auth algo number */
val16 = (u16)psta->authalg;
if (status != _STATS_SUCCESSFUL_)
val16 = 0;
if (val16) {
val16 = cpu_to_le16(val16);
use_shared_key = 1;
} else {
val16 = 0;
}
pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&val16, &(pattrib->pktlen));
......@@ -10493,7 +10497,7 @@ unsigned int send_beacon(_adapter *padapter)
issue_beacon(padapter, 100);
issue++;
do {
rtw_yield_os();
yield();
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bxmitok));
poll++;
} while ((poll % 10) != 0 && _FALSE == bxmitok && !RTW_CANNOT_RUN(padapter));
......
......@@ -31,7 +31,7 @@ int rtw_fw_ps_state(PADAPTER padapter)
if (registry_par->check_fw_ps != 1)
return _SUCCESS;
_enter_pwrlock(&pwrpriv->check_32k_lock);
down(&pwrpriv->check_32k_lock);
if (RTW_CANNOT_RUN(padapter)) {
RTW_INFO("%s: bSurpriseRemoved=%s , hw_init_completed=%d, bDriverStopped=%s\n", __func__
......@@ -61,7 +61,7 @@ int rtw_fw_ps_state(PADAPTER padapter)
exit_fw_ps_state:
_exit_pwrlock(&pwrpriv->check_32k_lock);
up(&pwrpriv->check_32k_lock);
return ret;
}
......@@ -105,9 +105,9 @@ void ips_enter(_adapter *padapter)
rtw_btcoex_IpsNotify(padapter, pwrpriv->ips_mode_req);
#endif /* CONFIG_BT_COEXIST */
_enter_pwrlock(&pwrpriv->lock);
down(&pwrpriv->lock);
_ips_enter(padapter);
_exit_pwrlock(&pwrpriv->lock);
up(&pwrpriv->lock);
}
int _ips_leave(_adapter *padapter)
......@@ -151,7 +151,7 @@ int ips_leave(_adapter *padapter)
if (!is_primary_adapter(padapter))
return _SUCCESS;
_enter_pwrlock(&pwrpriv->lock);
down(&pwrpriv->lock);
ret = _ips_leave(padapter);
#ifdef DBG_CHECK_FW_PS_STATE
if (rtw_fw_ps_state(padapter) == _FAIL) {
......@@ -159,7 +159,7 @@ int ips_leave(_adapter *padapter)
pdbgpriv->dbg_leave_ips_fail_cnt++;
}
#endif /* DBG_CHECK_FW_PS_STATE */
_exit_pwrlock(&pwrpriv->lock);
up(&pwrpriv->lock);
if (_SUCCESS == ret)
odm_dm_reset(&GET_HAL_DATA(padapter)->odmpriv);
......@@ -282,9 +282,9 @@ void rtw_ps_processor(_adapter *padapter)
#endif /* SUPPORT_HW_RFOFF_DETECTED */
u32 ps_deny = 0;
_enter_pwrlock(&adapter_to_pwrctl(padapter)->lock);
down(&adapter_to_pwrctl(padapter)->lock);
ps_deny = rtw_ps_deny_get(padapter);
_exit_pwrlock(&adapter_to_pwrctl(padapter)->lock);
up(&adapter_to_pwrctl(padapter)->lock);
if (ps_deny != 0) {
RTW_DBG(FUNC_ADPT_FMT ": ps_deny=0x%08X, skip power save!\n",
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
#endif
#ifdef CONFIG_LPS_LCLK
_enter_pwrlock(&pwrpriv->lock);
down(&pwrpriv->lock);
#endif
/* 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
}
#ifdef CONFIG_LPS_LCLK
_exit_pwrlock(&pwrpriv->lock);
up(&pwrpriv->lock);
#endif
}
......@@ -1230,7 +1230,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter)
}
#ifdef CONFIG_LPS_LCLK
_enter_pwrlock(&pwrpriv->lock);
down(&pwrpriv->lock);
#ifndef CONFIG_DETECT_CPWM_BY_POLLING
cpwm_orig = 0;
......@@ -1274,7 +1274,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter)
} while (1);
#endif /* CONFIG_DETECT_CPWM_BY_POLLING */
_exit_pwrlock(&pwrpriv->lock);
up(&pwrpriv->lock);
#endif
#ifdef CONFIG_P2P_PS
......@@ -1403,7 +1403,7 @@ void LPS_Leave_check(
rtw_yield_os();
while (1) {
_enter_pwrlock(&pwrpriv->lock);
down(&pwrpriv->lock);
if (rtw_is_surprise_removed(padapter)
|| (!rtw_is_hw_init_completed(padapter))
......@@ -1414,7 +1414,7 @@ void LPS_Leave_check(
)
bReady = _TRUE;
_exit_pwrlock(&pwrpriv->lock);
up(&pwrpriv->lock);
if (_TRUE == bReady)
break;
......@@ -1454,12 +1454,12 @@ void cpwm_int_hdl(
}
#endif
_enter_pwrlock(&pwrpriv->lock);
down(&pwrpriv->lock);
#ifdef CONFIG_LPS_RPWM_TIMER
if (pwrpriv->rpwm < PS_STATE_S2) {
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;
}
#endif /* CONFIG_LPS_RPWM_TIMER */
......@@ -1475,7 +1475,7 @@ void cpwm_int_hdl(
_rtw_up_sema(&padapter->xmitpriv.xmit_sema);
}
_exit_pwrlock(&pwrpriv->lock);
up(&pwrpriv->lock);
exit:
return;
......@@ -1545,12 +1545,12 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work)
if (RTW_CANNOT_RUN(padapter))
return;
_enter_pwrlock(&pwrpriv->lock);
down(&pwrpriv->lock);
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);
goto exit;
}
_exit_pwrlock(&pwrpriv->lock);
up(&pwrpriv->lock);
#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);
......@@ -1571,7 +1571,7 @@ static void rpwmtimeout_workitem_callback(struct work_struct *work)
return;
}
_enter_pwrlock(&pwrpriv->lock);
down(&pwrpriv->lock);
if ((pwrpriv->rpwm == pwrpriv->cpwm) || (pwrpriv->cpwm >= PS_STATE_S2)) {
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)
pwrpriv->brpwmtimeout = _FALSE;
exit:
_exit_pwrlock(&pwrpriv->lock);
up(&pwrpriv->lock);
}
/*
......@@ -1650,7 +1650,7 @@ s32 rtw_register_task_alive(PADAPTER padapter, u32 task)
pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S2;
_enter_pwrlock(&pwrctrl->lock);
down(&pwrctrl->lock);
register_task_alive(pwrctrl, 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
if (_FAIL == res) {
......@@ -1708,7 +1708,7 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task)
}
#endif /* CONFIG_BT_COEXIST */
_enter_pwrlock(&pwrctrl->lock);
down(&pwrctrl->lock);
unregister_task_alive(pwrctrl, 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)
pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S2;
_enter_pwrlock(&pwrctrl->lock);
down(&pwrctrl->lock);
register_task_alive(pwrctrl, XMIT_ALIVE);
......@@ -1763,7 +1763,7 @@ s32 rtw_register_tx_alive(PADAPTER padapter)
}
}
_exit_pwrlock(&pwrctrl->lock);
up(&pwrctrl->lock);
#ifdef CONFIG_DETECT_CPWM_BY_POLLING
if (_FAIL == res) {
......@@ -1800,7 +1800,7 @@ s32 rtw_register_cmd_alive(PADAPTER padapter)
pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S2;
_enter_pwrlock(&pwrctrl->lock);
down(&pwrctrl->lock);
register_task_alive(pwrctrl, CMD_ALIVE);
......@@ -1814,7 +1814,7 @@ s32 rtw_register_cmd_alive(PADAPTER padapter)
}
}
_exit_pwrlock(&pwrctrl->lock);
up(&pwrctrl->lock);
#ifdef CONFIG_DETECT_CPWM_BY_POLLING
if (_FAIL == res) {
......@@ -1843,11 +1843,11 @@ s32 rtw_register_rx_alive(PADAPTER padapter)
pwrctrl = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrctrl->lock);
down(&pwrctrl->lock);
register_task_alive(pwrctrl, RECV_ALIVE);
_exit_pwrlock(&pwrctrl->lock);
up(&pwrctrl->lock);
return _SUCCESS;
......@@ -1869,11 +1869,11 @@ s32 rtw_register_evt_alive(PADAPTER padapter)
pwrctrl = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrctrl->lock);
down(&pwrctrl->lock);
register_task_alive(pwrctrl, EVT_ALIVE);
_exit_pwrlock(&pwrctrl->lock);
up(&pwrctrl->lock);
return _SUCCESS;
......@@ -1920,7 +1920,7 @@ void rtw_unregister_tx_alive(PADAPTER padapter)
}
}
#endif
_enter_pwrlock(&pwrctrl->lock);
down(&pwrctrl->lock);
unregister_task_alive(pwrctrl, XMIT_ALIVE);
......@@ -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)
}
#endif
_enter_pwrlock(&pwrctrl->lock);
down(&pwrctrl->lock);
unregister_task_alive(pwrctrl, CMD_ALIVE);
......@@ -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)
pwrctrl = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrctrl->lock);
down(&pwrctrl->lock);
unregister_task_alive(pwrctrl, RECV_ALIVE);
_exit_pwrlock(&pwrctrl->lock);
up(&pwrctrl->lock);
}
......@@ -2025,7 +2025,7 @@ void rtw_unregister_evt_alive(PADAPTER padapter)
unregister_task_alive(pwrctrl, EVT_ALIVE);
_exit_pwrlock(&pwrctrl->lock);
up(&pwrctrl->lock);
}
#endif /* CONFIG_LPS_LCLK */
......@@ -2619,13 +2619,13 @@ void rtw_ps_deny(PADAPTER padapter, PS_DENY_REASON reason)
pwrpriv = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrpriv->lock);
down(&pwrpriv->lock);
if (pwrpriv->ps_deny & BIT(reason)) {
RTW_INFO(FUNC_ADPT_FMT ": [WARNING] Reason %d had been set before!!\n",
FUNC_ADPT_ARG(padapter), 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",
* FUNC_ADPT_ARG(padapter), pwrpriv->ps_deny); */
......@@ -2645,13 +2645,13 @@ void rtw_ps_deny_cancel(PADAPTER padapter, PS_DENY_REASON reason)
pwrpriv = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrpriv->lock);
down(&pwrpriv->lock);
if ((pwrpriv->ps_deny & BIT(reason)) == 0) {
RTW_INFO(FUNC_ADPT_FMT ": [ERROR] Reason %d had been canceled before!!\n",
FUNC_ADPT_ARG(padapter), 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",
* FUNC_ADPT_ARG(padapter), pwrpriv->ps_deny); */
......
......@@ -697,7 +697,6 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_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)
{
u8 *psta_addr = NULL;
......@@ -2531,7 +2530,6 @@ static void recvframe_expand_pkt(
#endif
/* perform defrag */
union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q);
union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
{
_list *plist, *phead;
......@@ -2541,7 +2539,6 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
union recv_frame *prframe, *pnextrframe;
_queue *pfree_recv_queue;
curfragnum = 0;
pfree_recv_queue = &adapter->recvpriv.free_recv_queue;
......
......@@ -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(&(pstapriv->sta_hash_lock), &irqL2);
if (_rtw_queue_empty(pfree_sta_queue) == _TRUE) {
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL); */
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
if (!pstapriv->padapter->pnetdev || _rtw_queue_empty(pfree_sta_queue) == _TRUE) {
psta = NULL;
} else {
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)
#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_) {
pstapriv->sta_dz_bitmap &= ~BIT(psta->cmn.aid);
pstapriv->tim_bitmap &= ~BIT(psta->cmn.aid);
......
......@@ -16,6 +16,7 @@
#include <drv_types.h>
#include <hal_data.h>
#include <net/cfg80211.h>
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
......@@ -1285,7 +1286,7 @@ inline u8 rtw_get_hwseq_no(_adapter *padapter)
#endif /* CONFIG_CONCURRENT_MODE */
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;
struct pkt_file pktfile;
......@@ -2305,11 +2306,11 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
struct pkt_file pktfile;
struct pkt_attrib *pattrib;
_pkt *pkt;
struct sk_buff *pkt;
struct pkt_file pktfile_queue;
struct pkt_attrib *pattrib_queue;
_pkt *pkt_queue;
struct sk_buff *pkt_queue;
s32 llc_sz, mem_sz;
......@@ -2480,7 +2481,7 @@ This sub-routine will perform all the following:
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;
......@@ -2677,7 +2678,7 @@ exit:
#ifdef CONFIG_IEEE80211W
/* 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;
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
_irqL irqL;
_queue *queue = NULL;
_adapter *padapter = pxmitpriv->adapter;
_pkt *pndis_pkt = NULL;
struct sk_buff *pndis_pkt = NULL;
if (pxmitframe == NULL) {
......@@ -4411,7 +4412,7 @@ fail:
* 0 success, hardware will handle this xmit frame(packet)
* <0 fail
*/
s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
s32 rtw_xmit(_adapter *padapter, struct sk_buff **ppkt)
{
static systime start = 0;
static u32 drop_cnt = 0;
......@@ -5354,7 +5355,7 @@ sint check_pending_xmitbuf(
return ret;
}
thread_return rtw_xmit_thread(thread_context context)
int rtw_xmit_thread(void *context)
{
s32 err;
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
* Import new snapshot from git (issue 5283)
......
......@@ -12,7 +12,7 @@ Copyright: 2009 Johannes Berg <johannes@sipsolutions.net>
License: GPL-2
Files: debian/*
Copyright: 2017-2018 Offensive Security
Copyright: 2017-2019 Offensive Security
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=$?
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
PACKAGE_NAME="realtek-rtl88xxau"
PACKAGE_VERSION="5.2.20.2~20190210"
PACKAGE_VERSION="5.2.20.2~20190429"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=88XXau
PROCS_NUM=`nproc`
......
......@@ -10933,13 +10933,12 @@ exit:
void rtw_dump_cur_efuse(PADAPTER padapter)
{
int i =0;
int mapsize =0;
u16 mapsize =0;
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter);
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);
return;
}
......@@ -10969,7 +10968,7 @@ u32 Hal_readPGDataFromConfigFile(PADAPTER padapter)
{
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter);
u32 ret = _FALSE;
u32 maplen = 0;
u16 maplen = 0;
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)
#endif /* CONFIG_RX_INDICATE_QUEUE */
#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 */
_rtw_init_queue(&precvpriv->free_recv_buf_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)
if (precvpriv->pallocated_recv_buf)
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
......
......@@ -1877,10 +1877,6 @@ odm_cmn_info_init(
p_dm->support_interface = (u8)value;
break;
case ODM_CMNINFO_MP_TEST_CHIP:
p_dm->is_mp_chip = (u8)value;
break;
case ODM_CMNINFO_IC_TYPE:
p_dm->support_ic_type = (u32)value;
break;
......
......@@ -98,11 +98,11 @@ extern const u16 phy_rate_table[28];
#define dm_type_by_driver 1
struct phydm_phystatus_statistic {
/*[CCK]*/
u32 rssi_cck_sum;
u32 rssi_cck_cnt;
/*[OFDM]*/
/*[OFDM]*/
u32 rssi_ofdm_sum;
u32 rssi_ofdm_cnt;
u32 evm_ofdm_sum;
......@@ -138,7 +138,7 @@ struct phydm_phystatus_statistic {
#if (defined(PHYDM_COMPILE_ABOVE_4SS))
u32 rssi_4ss_cnt;
u32 rssi_4ss_sum[4];
u32 evm_4ss_sum[4];
u32 evm_4ss_sum[4];
u32 snr_4ss_sum[4];
u16 evm_4ss_hist[4][PHY_HIST_SIZE];
u16 snr_4ss_hist[4][PHY_HIST_SIZE];
......@@ -146,7 +146,7 @@ struct phydm_phystatus_statistic {
};
struct phydm_phystatus_avg {
/*[CCK]*/
u8 rssi_cck_avg;
/*[OFDM]*/
......@@ -172,7 +172,7 @@ struct phydm_phystatus_avg {
/*[4SS]*/
#if (defined(PHYDM_COMPILE_ABOVE_4SS))
u8 rssi_4ss_avg[4];
u8 evm_4ss_avg[4];
u8 evm_4ss_avg[4];
u8 snr_4ss_avg[4];
#endif
};
......@@ -449,7 +449,7 @@ enum phydm_dbg_comp {
DBG_DFS = BIT(F11_DFS),
DBG_DYN_ARFR = BIT(F12_DYN_ARFR),
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_PRI_CCA = BIT(F16_PRI_CCA),
DBG_ADPTV_SOML = BIT(F17_ADPTV_SOML),
......@@ -562,7 +562,7 @@ struct phydm_iot_center {
/*-----------HOOK BEFORE REG INIT-----------*/
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 */
u8 support_interface;/*PHYDM PCIE/USB/SDIO = 1/2/3*/
u32 support_ic_type; /*PHYDM supported IC*/
......@@ -609,9 +609,9 @@ struct phydm_iot_center {
u8 is_receiver_blocking_en;
u16 fw_offload_ability;
/*-----------HOOK BEFORE REG INIT-----------*/
/*===========================================================*/
/*===========================================================*/
/*====[ CALL BY Reference ]=========================================*/
/*===========================================================*/
/*===========================================================*/
u64 *p_num_tx_bytes_unicast; /*TX Unicast byte count*/
u64 *p_num_rx_bytes_unicast; /*RX Unicast byte count*/
......@@ -644,9 +644,9 @@ struct phydm_iot_center {
u8 *p_mp_mode;
u32 *p_interrupt_mask;
u8 *p_bb_op_mode;
/*===========================================================*/
/*===========================================================*/
/*====[ CALL BY VALUE ]===========================================*/
/*===========================================================*/
/*===========================================================*/
u8 disable_phydm_watchdog;
boolean is_link_in_process;
......
......@@ -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 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*/
value32 = odm_get_bb_reg(p_dm, 0xdd0, MASKDWORD);
......
......@@ -21,28 +21,13 @@
#include "phydm_precomp.h"
#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
#endif
#define GET_VERSION_MP(ic, txt) (odm_get_version_mp_##ic##txt())
#define GET_VERSION_TC(ic, txt) (odm_get_version_tc_##ic##txt())
#if (PHYDM_TESTCHIP_SUPPORT == 1)
#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
#define GET_VERSION(ic, txt) GET_VERSION_MP(ic, txt)
enum hal_status
odm_config_rf_with_header_file(
......
This diff is collapsed.
......@@ -1083,7 +1083,7 @@ void rtl8812_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
rtw_hal_set_fw_rsvd_page(padapter, _FALSE);
DLBcnCount++;
do {
rtw_yield_os();
yield();
/*rtw_mdelay_os(10);*/
/* check rsvd page download OK.*/
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)
DLBcnCount++;
do {
rtw_yield_os();
yield();
/*rtw_mdelay_os(10);*/
/* check rsvd page download OK.*/
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)
SetFwRsvdPagePkt_BTCoex(padapter);
DLBcnCount++;
do {
rtw_yield_os();
yield();
/* rtw_mdelay_os(10); */
/* check rsvd page download OK. */
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)
value32 = rtw_read32(adapter, REG_MCUFWDL);
if (value32 & FWDL_ChkSum_rpt || RTW_CANNOT_IO(adapter))
break;
rtw_yield_os();
yield();
} while (rtw_get_passing_time_ms(start) < timeout_ms || cnt < min_cnt);
if (!(value32 & FWDL_ChkSum_rpt))
......@@ -437,7 +437,7 @@ static s32 _FWFreeToGo8812(_adapter *adapter, u32 min_cnt, u32 timeout_ms)
value32 = rtw_read32(adapter, REG_MCUFWDL);
if (value32 & WINTINI_RDY || RTW_CANNOT_IO(adapter))
break;
rtw_yield_os();
yield();
} while (rtw_get_passing_time_ms(start) < timeout_ms || cnt < min_cnt);
if (!(value32 & WINTINI_RDY))
......
......@@ -23,7 +23,6 @@
#endif
static void _dbg_dump_macreg(_adapter *padapter)
{
u32 offset = 0;
......@@ -964,7 +963,7 @@ usb_AggSettingRxUpdate_8812A(
/* Adjust DMA page and thresh. */
temp = pHalData->rxagg_dma_size | (pHalData->rxagg_dma_timeout << 8);
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;
case RX_AGG_USB:
......
......@@ -836,7 +836,7 @@ void rtl8814_set_FwJoinBssReport_cmd(PADAPTER padapter, u8 mstatus)
DLBcnCount++;
do
{
rtw_yield_os();
yield();
//rtw_mdelay_os(10);
// check rsvd page download OK.
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)
do
{
rtw_yield_os();
yield();
//rtw_mdelay_os(10);
// check rsvd page download OK.
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid));
......@@ -1168,7 +1168,7 @@ void rtl8814_iqk_done(_adapter* padapter)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct submit_ctx *iqk_sctx = &pHalData->iqk_sctx;
rtw_sctx_done(&iqk_sctx);
}
......@@ -1354,7 +1354,7 @@ static void SetFwRsvdPagePkt_BTCoex(PADAPTER padapter)
if (BufIndex < (MaxRsvdPageBufSize - PageSize)) {
BufIndex = TxDescOffset + (MaxRsvdPageBufSize - PageSize);
TotalPageNum = BCNQ_PAGE_NUM_8814-1;
}
/* 3 (6) BT Qos null data */
......@@ -1401,8 +1401,8 @@ static void SetFwRsvdPagePkt_BTCoex(PADAPTER padapter)
#ifdef CONFIG_WOWLAN
rtl8814_set_FwAoacRsvdPage_cmd(padapter, &RsvdPageLoc);
#endif
}
}
return;
error:
......@@ -1464,13 +1464,13 @@ void rtl8812a_download_BTCoex_AP_mode_rsvd_page(PADAPTER padapter)
DLBcnCount++;
do
{
rtw_yield_os();
yield();
//rtw_mdelay_os(10);
// check rsvd page download OK.
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid));
poll++;
} while (!bcn_valid && (poll%10) != 0 && !RTW_CANNOT_RUN(padapter));
} while (!bcn_valid && DLBcnCount <= 100 && !RTW_CANNOT_RUN(padapter));
if (RTW_CANNOT_RUN(padapter))
......
......@@ -1776,35 +1776,31 @@ u32 rtl8814au_hal_deinit(PADAPTER Adapter)
if((pwrctl->bHWPwrPindetect ) && (pwrctl->bHWPowerdown))
rtl8814au_hw_power_down(Adapter);
}
}
}
return _SUCCESS;
}
unsigned int rtl8814au_inirp_init(PADAPTER Adapter)
{
u8 i;
{
u8 i;
struct recv_buf *precvbuf;
uint status;
struct dvobj_priv *pdev= adapter_to_dvobj(Adapter);
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);
#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;
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;
//issue Rx irp to receive data
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
//issue Rx irp to receive data
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
for(i=0; i<NR_RECVBUFF; i++)
{
if(_read_port(pintfhdl, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf) == _FALSE )
......@@ -1813,27 +1809,13 @@ unsigned int rtl8814au_inirp_init(PADAPTER Adapter)
status = _FAIL;
goto exit;
}
precvbuf++;
precvpriv->free_recv_buf_queue_cnt--;
}
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
if (pdev->RtInPipe[REALTEK_USB_IN_INT_EP_IDX] != 0x05) {
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;
}
_read_interrupt = pintfhdl->io_ops._read_interrupt;
if(_read_interrupt(pintfhdl, RECV_INT_IN_ADDR) == _FALSE )
{
RT_TRACE(_module_hci_hal_init_c_,_drv_err_,("usb_rx_init: usb_read_interrupt error \n"));
status = _FAIL;
precvbuf++;
precvpriv->free_recv_buf_queue_cnt--;
}
#endif
exit:
RT_TRACE(_module_hci_hal_init_c_,_drv_info_,("<=== usb_inirp_init \n"));
return status;
......@@ -1841,9 +1823,9 @@ exit:
}
unsigned int rtl8814au_inirp_deinit(PADAPTER Adapter)
{
{
RT_TRACE(_module_hci_hal_init_c_,_drv_info_,("\n ===> usb_rx_deinit \n"));
rtw_read_port_cancel(Adapter);
RT_TRACE(_module_hci_hal_init_c_,_drv_info_,("\n <=== usb_rx_deinit \n"));
......@@ -1869,8 +1851,8 @@ hal_ReadIDs_8814AU(
{
pHalData->EEPROMVID = EF2Byte( *(pu2Byte)&PROMContent[EEPROM_VID_8814AU] );
pHalData->EEPROMPID = EF2Byte( *(pu2Byte)&PROMContent[EEPROM_PID_8814AU] );
// Customer ID, 0x00 and 0xff are reserved for Realtek.
// Customer ID, 0x00 and 0xff are reserved for Realtek.
pHalData->EEPROMCustomerID = *(pu1Byte)&PROMContent[EEPROM_CustomID_8814];
pHalData->EEPROMSubCustomerID = EEPROM_Default_SubCustomerID;
}
......@@ -1879,11 +1861,11 @@ hal_ReadIDs_8814AU(
pHalData->EEPROMVID = EEPROM_Default_VID;
pHalData->EEPROMPID = EEPROM_Default_PID;
// Customer ID, 0x00 and 0xff are reserved for Realtek.
// Customer ID, 0x00 and 0xff are reserved for Realtek.
pHalData->EEPROMCustomerID = EEPROM_Default_CustomerID;
pHalData->EEPROMSubCustomerID = EEPROM_Default_SubCustomerID;
}
RTW_INFO("VID = 0x%04X, PID = 0x%04X\n", pHalData->EEPROMVID, pHalData->EEPROMPID);
RTW_INFO("Customer ID: 0x%02X, SubCustomer ID: 0x%02X\n", pHalData->EEPROMCustomerID, pHalData->EEPROMSubCustomerID);
}
......@@ -1904,7 +1886,7 @@ hal_InitPGData_8814A(
//#if ((DEV_BUS_TYPE==RT_USB_INTERFACE || DEV_BUS_TYPE==RT_SDIO_INTERFACE)) && (MP_DRIVER != 1)
//if(hal_ReadeFuse_8814A(pAdapter) == _FAIL)
//#endif
// Read EFUSE real map to shadow.
EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, _FALSE);
}
......@@ -1928,10 +1910,10 @@ hal_CustomizedBehavior_8814AU(
IN PADAPTER Adapter
)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
struct led_priv *pledpriv = &(Adapter->ledpriv);
// Led mode
switch(pHalData->CustomerID)
{
......@@ -1952,9 +1934,9 @@ hal_CustomizeByCustomerID_8814AU(
)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
RTW_INFO("PID= 0x%x, VID= %x\n",pHalData->EEPROMPID,pHalData->EEPROMVID);
// Decide CustomerID according to VID/DID or EEPROM
switch(pHalData->EEPROMCustomerID)
{
......@@ -1968,17 +1950,17 @@ hal_CustomizeByCustomerID_8814AU(
else if((pHalData->EEPROMVID == 0x0BFF) && (pHalData->EEPROMPID == 0x8160))
{
pHalData->CustomerID = RT_CID_CHINA_MOBILE;
}
}
else if((pHalData->EEPROMVID == 0x0BDA) && (pHalData->EEPROMPID == 0x5088))
pHalData->CustomerID = RT_CID_CC_C;
break;
case EEPROM_CID_WHQL:
//padapter->bInHctTest = _TRUE;
//pMgntInfo->bSupportTurboMode = _FALSE;
//pMgntInfo->bAutoTurboBy8186 = _FALSE;
//pMgntInfo->PowerSaveControl.bInactivePs = _FALSE;
//pMgntInfo->PowerSaveControl.bIPSModeBackup = _FALSE;
//pMgntInfo->PowerSaveControl.bLeisurePs = _FALSE;
......
......@@ -76,7 +76,7 @@ void interrupt_handler_8814au(_adapter *padapter, u16 pkt_len, u8 *pbuf)
if (pHalData->IntArray[0] & IMR_TBDER_88E)
RTW_INFO("%s: HISR_TXBCNERR\n", __func__);
#endif /* 0 */
if(check_fwstate(pmlmepriv, WIFI_AP_STATE))
{
......@@ -249,7 +249,7 @@ _exit_recvbuf2recvframe:
#endif
void rtl8814au_xmit_tasklet(void *priv)
{
{
int ret = _FALSE;
_adapter *padapter = (_adapter*)priv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
......@@ -269,41 +269,37 @@ void rtl8814au_xmit_tasklet(void *priv)
if(ret==_FALSE)
break;
}
}
void rtl8814au_set_intf_ops(struct _io_ops *pops)
{
_rtw_memset((u8 *)pops, 0, sizeof(struct _io_ops));
{
_rtw_memset((u8 *)pops, 0, sizeof(struct _io_ops));
pops->_read8 = &usb_read8;
pops->_read16 = &usb_read16;
pops->_read32 = &usb_read32;
pops->_read_mem = &usb_read_mem;
pops->_read_port = &usb_read_port;
pops->_read_port = &usb_read_port;
pops->_write8 = &usb_write8;
pops->_write16 = &usb_write16;
pops->_write32 = &usb_write32;
pops->_writeN = &usb_writeN;
#ifdef CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
#ifdef CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
pops->_write8_async= &usb_async_write8;
pops->_write16_async = &usb_async_write16;
pops->_write32_async = &usb_async_write32;
#endif
#endif
pops->_write_mem = &usb_write_mem;
pops->_write_port = &usb_write_port;
pops->_read_port_cancel = &usb_read_port_cancel;
pops->_write_port_cancel = &usb_write_port_cancel;
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
pops->_read_interrupt = &usb_read_interrupt;
#endif
}
void rtl8814au_set_hw_type(struct dvobj_priv *pdvobj)
......
......@@ -99,8 +99,6 @@
typedef _Bool bool;
#endif
typedef void (*proc_t)(void *);
typedef __kernel_size_t SIZE_T;
typedef __kernel_ssize_t SSIZE_T;
#define FIELD_OFFSET(s, field) ((SSIZE_T)&((s *)(0))->field)
......
......@@ -100,10 +100,9 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
#include <rtw_ioctl.h>
#include <rtw_ioctl_set.h>
#include <rtw_ioctl_query.h>
#include <rtw_ioctl_rtl.h>
#include <osdep_intf.h>
#include <rtw_eeprom.h>
#include <sta_info.h>
#include "sta_info.h"
#include <rtw_event.h>
#include <rtw_mlme_ext.h>
#include <rtw_mi.h>
......@@ -992,7 +991,7 @@ struct dvobj_priv {
struct rtw_traffic_statistics traffic_stat;
#ifdef PLATFORM_LINUX
_thread_hdl_ rtnl_lock_holder;
void * rtnl_lock_holder;
#if defined(CONFIG_IOCTL_CFG80211) && defined(RTW_SINGLE_WIPHY)
struct wiphy *wiphy;
......@@ -1003,7 +1002,7 @@ struct dvobj_priv {
_timer txbcn_timer;
#endif
_timer dynamic_chk_timer; /* dynamic/periodic check timer */
#ifdef CONFIG_RTW_NAPI_DYNAMIC
u8 en_napi_dynamic;
#endif /* CONFIG_RTW_NAPI_DYNAMIC */
......@@ -1067,7 +1066,7 @@ struct dvobj_priv {
WCHAR active_path[MAX_ACTIVE_REG_PATH]; /* adapter regpath */
USB_EXTENSION usb_extension;
_nic_hdl pipehdls_r8192c[0x10];
struct net_device *pipehdls_r8192c[0x10];
#endif
u32 config_descriptor_len;/* ULONG UsbConfigurationDescriptorLength; */
......@@ -1258,7 +1257,7 @@ struct proxim {
#ifdef CONFIG_MAC_LOOPBACK_DRIVER
typedef struct loopbackdata {
_sema sema;
_thread_hdl_ lbkthread;
void * lbkthread;
u8 bstop;
u32 cnt;
u16 size;
......@@ -1371,15 +1370,15 @@ struct _ADAPTER {
void (*callback[8])(u8 level);
} gpiointpriv;
#endif
_thread_hdl_ cmdThread;
void *cmdThread;
#ifdef CONFIG_EVENT_THREAD_MODE
_thread_hdl_ evtThread;
void *evtThread;
#endif
#ifdef CONFIG_XMIT_THREAD_MODE
_thread_hdl_ xmitThread;
void *xmitThread;
#endif
#ifdef CONFIG_RECV_THREAD_MODE
_thread_hdl_ recvThread;
void *recvThread;
#endif
u8 registered;
#ifndef PLATFORM_LINUX
......@@ -1402,12 +1401,12 @@ struct _ADAPTER {
#ifdef PLATFORM_LINUX
_nic_hdl pnetdev;
struct net_device *pnetdev;
char old_ifname[IFNAMSIZ];
/* used by rtw_rereg_nd_name related function */
struct rereg_nd_name_data {
_nic_hdl old_pnetdev;
struct net_device *old_pnetdev;
char old_ifname[IFNAMSIZ];
u8 old_ips_mode;
u8 old_bRegUseLed;
......@@ -1437,7 +1436,7 @@ struct _ADAPTER {
#endif /* PLATFORM_LINUX */
#ifdef PLATFORM_FREEBSD
_nic_hdl pifp;
struct net_device *pifp;
int bup;
_lock glock;
#endif /* PLATFORM_FREEBSD */
......
......@@ -351,7 +351,7 @@ struct hal_ops {
void (*write_rfreg)(_adapter *padapter, enum rf_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data);
#ifdef CONFIG_HOSTAPD_MLME
s32(*hostap_mgnt_xmit_entry)(_adapter *padapter, _pkt *pkt);
s32(*hostap_mgnt_xmit_entry)(_adapter *padapter, struct sk_buff *pkt);
#endif
void (*EfusePowerSwitch)(_adapter *padapter, u8 bWrite, u8 PwrState);
......@@ -693,7 +693,7 @@ void rtw_hal_set_tx_power_level(_adapter *padapter, u8 channel);
void rtw_hal_get_tx_power_level(_adapter *padapter, s32 *powerlevel);
#ifdef CONFIG_HOSTAPD_MLME
s32 rtw_hal_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt);
s32 rtw_hal_hostap_mgnt_xmit_entry(_adapter *padapter, struct sk_buff *pkt);
#endif
#ifdef DBG_CONFIG_ERROR_DETECT
......