...
 
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;
......
......@@ -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));
......@@ -1464,7 +1464,7 @@ 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));
......
......@@ -1790,10 +1790,6 @@ unsigned int rtl8814au_inirp_init(PADAPTER Adapter)
struct intf_hdl * pintfhdl=&Adapter->iopriv.intf;
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;
......@@ -1818,20 +1814,6 @@ unsigned int rtl8814au_inirp_init(PADAPTER Adapter)
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;
}
#endif
exit:
RT_TRACE(_module_hci_hal_init_c_,_drv_info_,("<=== usb_inirp_init \n"));
......
......@@ -300,10 +300,6 @@ void rtl8814au_set_intf_ops(struct _io_ops *pops)
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;
......@@ -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
......
......@@ -15,6 +15,9 @@
#ifndef __IEEE80211_H
#define __IEEE80211_H
#if defined(PLATFORM_LINUX) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
#include <linux/ieee80211.h>
#endif
#ifndef CONFIG_RTL8711FW
......@@ -605,6 +608,7 @@ struct ieee80211_snap_hdr {
#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
/* Status codes */
#if !defined(PLATFORM_LINUX) || LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
#define WLAN_STATUS_SUCCESS 0
#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
#define WLAN_STATUS_CAPS_UNSUPPORTED 10
......@@ -631,11 +635,13 @@ struct ieee80211_snap_hdr {
#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
#endif
#define WLAN_REASON_ACTIVE_ROAM 65533
#define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
#define WLAN_REASON_EXPIRATION_CHK 65535
/* Information Element IDs */
#if !defined(PLATFORM_LINUX) || LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
#define WLAN_EID_SSID 0
#define WLAN_EID_SUPP_RATES 1
#define WLAN_EID_FH_PARAMS 2
......@@ -657,7 +663,7 @@ struct ieee80211_snap_hdr {
#define WLAN_EID_IBSS_DFS 41
/* EIDs defined by IEEE 802.11h - END */
#define WLAN_EID_ERP_INFO 42
#define WLAN_EID_HT_CAP 45
#define WLAN_EID_HT_CAPABILITY 45
#define WLAN_EID_RSN 48
#define WLAN_EID_EXT_SUPP_RATES 50
#define WLAN_EID_MOBILITY_DOMAIN 54
......@@ -671,10 +677,11 @@ struct ieee80211_snap_hdr {
#define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74
#define WLAN_EID_MMIE 76
#define WLAN_EID_VENDOR_SPECIFIC 221
#define WLAN_EID_GENERIC (WLAN_EID_VENDOR_SPECIFIC)
#define WLAN_EID_VHT_CAPABILITY 191
#define WLAN_EID_VHT_OPERATION 192
#define WLAN_EID_VHT_OP_MODE_NOTIFY 199
#define WLAN_EID_OPMODE_NOTIF 199
#endif
#define WLAN_EID_GENERIC (WLAN_EID_VENDOR_SPECIFIC)
#define IEEE80211_MGMT_HDR_LEN 24
#define IEEE80211_DATA_HDR3_LEN 24
......
......@@ -155,7 +155,7 @@ void rtw_drv_stop_vir_ifaces(struct dvobj_priv *dvobj);
void rtw_drv_free_vir_ifaces(struct dvobj_priv *dvobj);
#endif
void rtw_ndev_destructor(_nic_hdl ndev);
void rtw_ndev_destructor(struct net_device *ndev);
#ifdef CONFIG_ARP_KEEP_ALIVE
int rtw_gw_addr_query(_adapter *padapter);
#endif
......
......@@ -15,6 +15,10 @@
#ifndef __OSDEP_SERVICE_H_
#define __OSDEP_SERVICE_H_
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#include <linux/sched/signal.h>
#endif
#define _FAIL 0
#define _SUCCESS 1
......@@ -148,9 +152,9 @@ struct sk_buff *dbg_rtw_skb_alloc(unsigned int size, const enum mstat_f flags, c
void dbg_rtw_skb_free(struct sk_buff *skb, const enum mstat_f flags, const char *func, const int line);
struct sk_buff *dbg_rtw_skb_copy(const struct sk_buff *skb, const enum mstat_f flags, const char *func, const int line);
struct sk_buff *dbg_rtw_skb_clone(struct sk_buff *skb, const enum mstat_f flags, const char *func, const int line);
int dbg_rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb, const enum mstat_f flags, const char *func, int line);
int dbg_rtw_netif_rx(struct net_device *ndev, struct sk_buff *skb, const enum mstat_f flags, const char *func, int line);
#ifdef CONFIG_RTW_NAPI
int dbg_rtw_netif_receive_skb(_nic_hdl ndev, struct sk_buff *skb, const enum mstat_f flags, const char *func, int line);
int dbg_rtw_netif_receive_skb(struct net_device *ndev, struct sk_buff *skb, const enum mstat_f flags, const char *func, int line);
#ifdef CONFIG_RTW_GRO
gro_result_t dbg_rtw_napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb, const enum mstat_f flags, const char *func, int line);
#endif
......@@ -220,9 +224,9 @@ struct sk_buff *_rtw_skb_alloc(u32 sz);
void _rtw_skb_free(struct sk_buff *skb);
struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb);
struct sk_buff *_rtw_skb_clone(struct sk_buff *skb);
int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb);
int _rtw_netif_rx(struct net_device *ndev, struct sk_buff *skb);
#ifdef CONFIG_RTW_NAPI
int _rtw_netif_receive_skb(_nic_hdl ndev, struct sk_buff *skb);
int _rtw_netif_receive_skb(struct net_device *ndev, struct sk_buff *skb);
#ifdef CONFIG_RTW_GRO
gro_result_t _rtw_napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb);
#endif
......@@ -283,9 +287,9 @@ void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_a
extern void *rtw_malloc2d(int h, int w, size_t size);
extern void rtw_mfree2d(void *pbuf, int h, int w, int size);
void rtw_os_pkt_free(_pkt *pkt);
void *rtw_os_pkt_data(_pkt *pkt);
u32 rtw_os_pkt_len(_pkt *pkt);
void rtw_os_pkt_free(struct sk_buff *pkt);
void *rtw_os_pkt_data(struct sk_buff *pkt);
u32 rtw_os_pkt_len(struct sk_buff *pkt);
extern void _rtw_memcpy(void *dec, const void *sour, u32 sz);
extern void _rtw_memmove(void *dst, const void *src, u32 sz);
......@@ -357,8 +361,6 @@ extern void rtw_mdelay_os(int ms);
extern void rtw_udelay_os(int us);
#endif
extern void rtw_yield_os(void);
extern void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc, void *ctx);
......
......@@ -22,7 +22,7 @@ extern void _rtw_free_recv_priv(struct recv_priv *precvpriv);
extern s32 rtw_recv_entry(union recv_frame *precv_frame);
extern int rtw_recv_indicatepkt(_adapter *adapter, union recv_frame *precv_frame);
extern void rtw_recv_returnpacket(IN _nic_hdl cnxt, IN _pkt *preturnedpkt);
extern void rtw_recv_returnpacket(struct net_device *cnxt, struct sk_buff *preturnedpkt);
extern int rtw_recv_monitor(_adapter *padapter, union recv_frame *precv_frame);
......@@ -39,16 +39,16 @@ int rtw_os_recv_resource_alloc(_adapter *padapter, union recv_frame *precvframe)
void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
int rtw_os_alloc_recvframe(_adapter *padapter, union recv_frame *precvframe, u8 *pdata, _pkt *pskb);
int rtw_os_recvframe_duplicate_skb(_adapter *padapter, union recv_frame *pcloneframe, _pkt *pskb);
int rtw_os_alloc_recvframe(_adapter *padapter, union recv_frame *precvframe, u8 *pdata, struct sk_buff *pskb);
int rtw_os_recvframe_duplicate_skb(_adapter *padapter, union recv_frame *pcloneframe, struct sk_buff *pskb);
void rtw_os_free_recvframe(union recv_frame *precvframe);
int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf);
int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf);
_pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 *pdata);
void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, union recv_frame *rframe);
struct sk_buff *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 *pdata);
void rtw_os_recv_indicate_pkt(_adapter *padapter, struct sk_buff *pkt, union recv_frame *rframe);
void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf);
......
......@@ -177,7 +177,7 @@ extern void rtw_free_evt_obj(struct evt_obj *pcmd);
#endif
void rtw_stop_cmd_thread(_adapter *adapter);
thread_return rtw_cmd_thread(thread_context context);
int rtw_cmd_thread(void *context);
extern u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
extern void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv);
......
/******************************************************************************
*
* Copyright(c) 2007 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*****************************************************************************/
#ifndef _RTW_IOCTL_RTL_H_
#define _RTW_IOCTL_RTL_H_
/* ************** oid_rtl_seg_01_01 ************** */
NDIS_STATUS oid_rt_get_signal_quality_hdl(struct oid_par_priv *poid_par_priv);/* 84 */
NDIS_STATUS oid_rt_get_small_packet_crc_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_middle_packet_crc_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_large_packet_crc_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_tx_retry_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_rx_retry_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_rx_total_packet_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_tx_beacon_ok_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_tx_beacon_err_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_pro_set_fw_dig_state_hdl(struct oid_par_priv *poid_par_priv); /* 8a */
NDIS_STATUS oid_rt_pro_set_fw_ra_state_hdl(struct oid_par_priv *poid_par_priv); /* 8b */
NDIS_STATUS oid_rt_get_rx_icv_err_hdl(struct oid_par_priv *poid_par_priv);/* 93 */
NDIS_STATUS oid_rt_set_encryption_algorithm_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_preamble_mode_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_ap_ip_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_channelplan_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_set_channelplan_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_set_preamble_mode_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_set_bcn_intvl_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_dedicate_probe_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_total_tx_bytes_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_total_rx_bytes_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_current_tx_power_level_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_enc_key_mismatch_count_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_enc_key_match_count_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_channel_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_hardware_radio_off_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_key_mismatch_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_supported_wireless_mode_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_channel_list_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_scan_in_progress_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_forced_data_rate_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_wireless_mode_for_scan_list_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_get_bss_wireless_mode_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_scan_with_magic_packet_hdl(struct oid_par_priv *poid_par_priv);
/* ************** oid_rtl_seg_01_03 section start ************** */
NDIS_STATUS oid_rt_ap_get_associated_station_list_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_ap_switch_into_ap_mode_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_ap_supported_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_ap_set_passphrase_hdl(struct oid_par_priv *poid_par_priv);
/* oid_rtl_seg_01_11 */
NDIS_STATUS oid_rt_pro_rf_write_registry_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_pro_rf_read_registry_hdl(struct oid_par_priv *poid_par_priv);
/* ************** oid_rtl_seg_03_00 section start ************** */
NDIS_STATUS oid_rt_get_connect_state_hdl(struct oid_par_priv *poid_par_priv);
NDIS_STATUS oid_rt_set_default_key_id_hdl(struct oid_par_priv *poid_par_priv);
#endif
......@@ -376,14 +376,6 @@ struct recv_priv {
uint ff_hwaddr;
ATOMIC_T rx_pending_cnt;
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
#ifdef PLATFORM_LINUX
PURB int_in_urb;
#endif
u8 *int_in_buf;
#endif /* CONFIG_USB_INTERRUPT_IN_PIPE */
#endif
#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD)
#ifdef PLATFORM_FREEBSD
......@@ -535,7 +527,7 @@ struct recv_buf {
#endif
#if defined(PLATFORM_LINUX)
_pkt *pskb;
struct sk_buff *pskb;
#elif defined(PLATFORM_FREEBSD) /* skb solution */
struct sk_buff *pskb;
#endif
......@@ -559,7 +551,7 @@ struct recv_buf {
*/
struct recv_frame_hdr {
_list list;
_pkt *pkt;
struct sk_buff *pkt;
_adapter *adapter;
......@@ -778,9 +770,9 @@ __inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
__inline static _buffer *get_rxbuf_desc(union recv_frame *precvframe)
__inline static unsigned char *get_rxbuf_desc(union recv_frame