...
 
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(
......
......@@ -3943,547 +3943,5 @@ odm_read_and_config_mp_8814a_phy_reg_pg(
}
}
/******************************************************************************
* PHY_REG_PG_Type2.TXT
******************************************************************************/
u32 Array_MP_8814A_PHY_REG_PG_Type2[] = {
0, 0, 0, 0x00000c20, 0xffffffff, 0x36363636,
0, 0, 0, 0x00000c24, 0xffffffff, 0x36363636,
0, 0, 0, 0x00000c28, 0xffffffff, 0x30323436,
0, 0, 0, 0x00000c2c, 0xffffffff, 0x36363636,
0, 0, 0, 0x00000c30, 0xffffffff, 0x28303234,
0, 0, 1, 0x00000c34, 0xffffffff, 0x34343434,
0, 0, 1, 0x00000c38, 0xffffffff, 0x26283032,
0, 0, 2, 0x00000cd8, 0xffffffff, 0x32323232,
0, 0, 2, 0x00000cdc, 0xffffffff, 0x24262830,
0, 0, 0, 0x00000c3c, 0xffffffff, 0x36363636,
0, 0, 0, 0x00000c40, 0xffffffff, 0x28303234,
0, 0, 0, 0x00000c44, 0xffffffff, 0x34342426,
0, 0, 1, 0x00000c48, 0xffffffff, 0x30323434,
0, 0, 1, 0x00000c4c, 0xffffffff, 0x22242628,
0, 0, 2, 0x00000ce0, 0xffffffff, 0x32323232,
0, 0, 2, 0x00000ce4, 0xffffffff, 0x24262830,
0, 0, 2, 0x00000ce8, 0x0000ffff, 0x20202022,
0, 1, 0, 0x00000e20, 0xffffffff, 0x36363636,
0, 1, 0, 0x00000e24, 0xffffffff, 0x36363636,
0, 1, 0, 0x00000e28, 0xffffffff, 0x30323436,
0, 1, 0, 0x00000e2c, 0xffffffff, 0x36363636,
0, 1, 0, 0x00000e30, 0xffffffff, 0x28303234,
0, 1, 1, 0x00000e34, 0xffffffff, 0x34343434,
0, 1, 1, 0x00000e38, 0xffffffff, 0x26283032,
0, 1, 2, 0x00000ed8, 0xffffffff, 0x32323232,
0, 1, 2, 0x00000edc, 0xffffffff, 0x24262830,
0, 1, 0, 0x00000e3c, 0xffffffff, 0x36363636,
0, 1, 0, 0x00000e40, 0xffffffff, 0x28303234,
0, 1, 0, 0x00000e44, 0xffffffff, 0x34342426,
0, 1, 1, 0x00000e48, 0xffffffff, 0x30323434,
0, 1, 1, 0x00000e4c, 0xffffffff, 0x22242628,
0, 1, 2, 0x00000ee0, 0xffffffff, 0x32323232,
0, 1, 2, 0x00000ee4, 0xffffffff, 0x24262830,
0, 1, 2, 0x00000ee8, 0x0000ffff, 0x20202022,
0, 2, 0, 0x00001820, 0xffffffff, 0x36363636,
0, 2, 0, 0x00001824, 0xffffffff, 0x36363636,
0, 2, 0, 0x00001828, 0xffffffff, 0x30323436,
0, 2, 0, 0x0000182c, 0xffffffff, 0x36363636,
0, 2, 0, 0x00001830, 0xffffffff, 0x28303234,
0, 2, 1, 0x00001834, 0xffffffff, 0x34343434,
0, 2, 1, 0x00001838, 0xffffffff, 0x26283032,
0, 2, 2, 0x000018d8, 0xffffffff, 0x32323232,
0, 2, 2, 0x000018dc, 0xffffffff, 0x24262830,
0, 2, 0, 0x0000183c, 0xffffffff, 0x36363636,
0, 2, 0, 0x00001840, 0xffffffff, 0x28303234,
0, 2, 0, 0x00001844, 0xffffffff, 0x34342426,
0, 2, 1, 0x00001848, 0xffffffff, 0x30323434,
0, 2, 1, 0x0000184c, 0xffffffff, 0x22242628,
0, 2, 2, 0x000018e0, 0xffffffff, 0x32323232,
0, 2, 2, 0x000018e4, 0xffffffff, 0x24262830,
0, 2, 2, 0x000018e8, 0x0000ffff, 0x20202022,
0, 3, 0, 0x00001a20, 0xffffffff, 0x36363636,
0, 3, 0, 0x00001a24, 0xffffffff, 0x36363636,
0, 3, 0, 0x00001a28, 0xffffffff, 0x30323436,
0, 3, 0, 0x00001a2c, 0xffffffff, 0x36363636,
0, 3, 0, 0x00001a30, 0xffffffff, 0x28303234,
0, 3, 1, 0x00001a34, 0xffffffff, 0x34343434,
0, 3, 1, 0x00001a38, 0xffffffff, 0x26283032,
0, 3, 2, 0x00001ad8, 0xffffffff, 0x32323232,
0, 3, 2, 0x00001adc, 0xffffffff, 0x24262830,
0, 3, 0, 0x00001a3c, 0xffffffff, 0x36363636,
0, 3, 0, 0x00001a40, 0xffffffff, 0x28303234,
0, 3, 0, 0x00001a44, 0xffffffff, 0x34342426,
0, 3, 1, 0x00001a48, 0xffffffff, 0x30323434,
0, 3, 1, 0x00001a4c, 0xffffffff, 0x22242628,
0, 3, 2, 0x00001ae0, 0xffffffff, 0x32323232,
0, 3, 2, 0x00001ae4, 0xffffffff, 0x24262830,
0, 3, 2, 0x00001ae8, 0x0000ffff, 0x20202022,
1, 0, 0, 0x00000c24, 0xffffffff, 0x36363636,
1, 0, 0, 0x00000c28, 0xffffffff, 0x30323436,
1, 0, 0, 0x00000c2c, 0xffffffff, 0x36363636,
1, 0, 0, 0x00000c30, 0xffffffff, 0x28303234,
1, 0, 1, 0x00000c34, 0xffffffff, 0x34343434,
1, 0, 1, 0x00000c38, 0xffffffff, 0x26283032,
1, 0, 2, 0x00000cd8, 0xffffffff, 0x32323232,
1, 0, 2, 0x00000cdc, 0xffffffff, 0x24262830,
1, 0, 0, 0x00000c3c, 0xffffffff, 0x36363636,
1, 0, 0, 0x00000c40, 0xffffffff, 0x28303234,
1, 0, 0, 0x00000c44, 0xffffffff, 0x34342426,
1, 0, 1, 0x00000c48, 0xffffffff, 0x30323434,
1, 0, 1, 0x00000c4c, 0xffffffff, 0x22242628,
1, 0, 2, 0x00000ce0, 0xffffffff, 0x32323232,
1, 0, 2, 0x00000ce4, 0xffffffff, 0x24262830,
1, 0, 2, 0x00000ce8, 0x0000ffff, 0x20202022,
1, 1, 0, 0x00000e24, 0xffffffff, 0x36363636,
1, 1, 0, 0x00000e28, 0xffffffff, 0x30323436,
1, 1, 0, 0x00000e2c, 0xffffffff, 0x36363636,
1, 1, 0, 0x00000e30, 0xffffffff, 0x28303234,
1, 1, 1, 0x00000e34, 0xffffffff, 0x34343434,
1, 1, 1, 0x00000e38, 0xffffffff, 0x26283032,
1, 1, 2, 0x00000ed8, 0xffffffff, 0x32323232,
1, 1, 2, 0x00000edc, 0xffffffff, 0x24262830,
1, 1, 0, 0x00000e3c, 0xffffffff, 0x36363636,
1, 1, 0, 0x00000e40, 0xffffffff, 0x28303234,
1, 1, 0, 0x00000e44, 0xffffffff, 0x34342426,
1, 1, 1, 0x00000e48, 0xffffffff, 0x30323434,
1, 1, 1, 0x00000e4c, 0xffffffff, 0x22242628,
1, 1, 2, 0x00000ee0, 0xffffffff, 0x32323232,
1, 1, 2, 0x00000ee4, 0xffffffff, 0x24262830,
1, 1, 2, 0x00000ee8, 0x0000ffff, 0x20202022,
1, 2, 0, 0x00001824, 0xffffffff, 0x36363636,
1, 2, 0, 0x00001828, 0xffffffff, 0x30323436,
1, 2, 0, 0x0000182c, 0xffffffff, 0x36363636,
1, 2, 0, 0x00001830, 0xffffffff, 0x28303234,
1, 2, 1, 0x00001834, 0xffffffff, 0x34343434,
1, 2, 1, 0x00001838, 0xffffffff, 0x26283032,
1, 2, 2, 0x000018d8, 0xffffffff, 0x32323232,
1, 2, 2, 0x000018dc, 0xffffffff, 0x24262830,
1, 2, 0, 0x0000183c, 0xffffffff, 0x36363636,
1, 2, 0, 0x00001840, 0xffffffff, 0x28303234,
1, 2, 0, 0x00001844, 0xffffffff, 0x34342426,
1, 2, 1, 0x00001848, 0xffffffff, 0x30323434,
1, 2, 1, 0x0000184c, 0xffffffff, 0x22242628,
1, 2, 2, 0x000018e0, 0xffffffff, 0x32323232,
1, 2, 2, 0x000018e4, 0xffffffff, 0x24262830,
1, 2, 2, 0x000018e8, 0x0000ffff, 0x20202022,
1, 3, 0, 0x00001a24, 0xffffffff, 0x36363636,
1, 3, 0, 0x00001a28, 0xffffffff, 0x30323436,
1, 3, 0, 0x00001a2c, 0xffffffff, 0x36363636,
1, 3, 0, 0x00001a30, 0xffffffff, 0x28303234,
1, 3, 1, 0x00001a34, 0xffffffff, 0x34343434,
1, 3, 1, 0x00001a38, 0xffffffff, 0x26283032,
1, 3, 2, 0x00001ad8, 0xffffffff, 0x32323232,
1, 3, 2, 0x00001adc, 0xffffffff, 0x24262830,
1, 3, 0, 0x00001a3c, 0xffffffff, 0x36363636,
1, 3, 0, 0x00001a40, 0xffffffff, 0x28303234,
1, 3, 0, 0x00001a44, 0xffffffff, 0x34342426,
1, 3, 1, 0x00001a48, 0xffffffff, 0x30323434,
1, 3, 1, 0x00001a4c, 0xffffffff, 0x22242628,
1, 3, 2, 0x00001ae0, 0xffffffff, 0x32323232,
1, 3, 2, 0x00001ae4, 0xffffffff, 0x24262830,
1, 3, 2, 0x00001ae8, 0x0000ffff, 0x20202022
};
void
odm_read_and_config_mp_8814a_phy_reg_pg_type2(
struct PHY_DM_STRUCT* pDM_Odm
)
{
u32 i = 0;
u32 ArrayLen = sizeof(Array_MP_8814A_PHY_REG_PG_Type2)/sizeof(u32);
u32* Array = Array_MP_8814A_PHY_REG_PG_Type2;
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
PADAPTER Adapter = pDM_Odm->Adapter;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
PlatformZeroMemory(pHalData->BufOfLinesPwrByRate, MAX_LINES_HWCONFIG_TXT*MAX_BYTES_LINE_HWCONFIG_TXT);
pHalData->nLinesReadPwrByRate = ArrayLen/6;
#endif
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD, ("===> ODM_ReadAndConfig_MP_8814A_PHY_REG_PG_Type2\n"));
pDM_Odm->phy_reg_pg_version = 1;
pDM_Odm->phy_reg_pg_value_type = PHY_REG_PG_EXACT_VALUE;
for (i = 0; i < ArrayLen; i += 6) {
u32 v1 = Array[i];
u32 v2 = Array[i+1];
u32 v3 = Array[i+2];
u32 v4 = Array[i+3];
u32 v5 = Array[i+4];
u32 v6 = Array[i+5];
odm_ConfigBB_PHY_REG_PG_8814A(pDM_Odm, v1, v2, v3, v4, v5, v6);
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
rsprintf((char *)pHalData->BufOfLinesPwrByRate[i/6], 100, "%s, %s, %s, 0x%X, 0x%08X, 0x%08X,",
(v1 == 0?"2.4G":" 5G"), (v2 == 0?"A":"B"), (v3 == 0?"1Tx":"2Tx"), v4, v5, v6);
#endif
}
}
/******************************************************************************
* PHY_REG_PG_Type3.TXT
******************************************************************************/
u32 Array_MP_8814A_PHY_REG_PG_Type3[] = {
0, 0, 0, 0x00000c20, 0xffffffff, 0x48484848,
0, 0, 0, 0x00000c24, 0xffffffff, 0x46464646,
0, 0, 0, 0x00000c28, 0xffffffff, 0x44464646,
0, 0, 0, 0x00000c2c, 0xffffffff, 0x46464646,
0, 0, 0, 0x00000c30, 0xffffffff, 0x42444646,
0, 0, 1, 0x00000c34, 0xffffffff, 0x44444444,
0, 0, 1, 0x00000c38, 0xffffffff, 0x40424444,
0, 0, 2, 0x00000cd8, 0xffffffff, 0x42424242,
0, 0, 2, 0x00000cdc, 0xffffffff, 0x38404242,
0, 0, 0, 0x00000c3c, 0xffffffff, 0x46464646,
0, 0, 0, 0x00000c40, 0xffffffff, 0x42444646,
0, 0, 0, 0x00000c44, 0xffffffff, 0x44444040,
0, 0, 1, 0x00000c48, 0xffffffff, 0x44444444,
0, 0, 1, 0x00000c4c, 0xffffffff, 0x38384042,
0, 0, 2, 0x00000ce0, 0xffffffff, 0x42424242,
0, 0, 2, 0x00000ce4, 0xffffffff, 0x38404242,
0, 0, 2, 0x00000ce8, 0x0000ffff, 0x20203636,
0, 1, 0, 0x00000e20, 0xffffffff, 0x48484848,
0, 1, 0, 0x00000e24, 0xffffffff, 0x46464646,
0, 1, 0, 0x00000e28, 0xffffffff, 0x44464646,
0, 1, 0, 0x00000e2c, 0xffffffff, 0x46464646,
0, 1, 0, 0x00000e30, 0xffffffff, 0x42444646,
0, 1, 1, 0x00000e34, 0xffffffff, 0x44444444,
0, 1, 1, 0x00000e38, 0xffffffff, 0x40424444,
0, 1, 2, 0x00000ed8, 0xffffffff, 0x42424242,
0, 1, 2, 0x00000edc, 0xffffffff, 0x38404242,
0, 1, 0, 0x00000e3c, 0xffffffff, 0x46464646,
0, 1, 0, 0x00000e40, 0xffffffff, 0x42444646,
0, 1, 0, 0x00000e44, 0xffffffff, 0x44444040,
0, 1, 1, 0x00000e48, 0xffffffff, 0x44444444,
0, 1, 1, 0x00000e4c, 0xffffffff, 0x38384042,
0, 1, 2, 0x00000ee0, 0xffffffff, 0x42424242,
0, 1, 2, 0x00000ee4, 0xffffffff, 0x38404242,
0, 1, 2, 0x00000ee8, 0x0000ffff, 0x20203636,
0, 2, 0, 0x00001820, 0xffffffff, 0x48484848,
0, 2, 0, 0x00001824, 0xffffffff, 0x46464646,
0, 2, 0, 0x00001828, 0xffffffff, 0x44464646,
0, 2, 0, 0x0000182c, 0xffffffff, 0x46464646,
0, 2, 0, 0x00001830, 0xffffffff, 0x42444646,
0, 2, 1, 0x00001834, 0xffffffff, 0x44444444,
0, 2, 1, 0x00001838, 0xffffffff, 0x40424444,
0, 2, 2, 0x000018d8, 0xffffffff, 0x42424242,
0, 2, 2, 0x000018dc, 0xffffffff, 0x38404242,
0, 2, 0, 0x0000183c, 0xffffffff, 0x46464646,
0, 2, 0, 0x00001840, 0xffffffff, 0x42444646,
0, 2, 0, 0x00001844, 0xffffffff, 0x44444040,
0, 2, 1, 0x00001848, 0xffffffff, 0x44444444,
0, 2, 1, 0x0000184c, 0xffffffff, 0x38384042,
0, 2, 2, 0x000018e0, 0xffffffff, 0x42424242,
0, 2, 2, 0x000018e4, 0xffffffff, 0x38404242,
0, 2, 2, 0x000018e8, 0x0000ffff, 0x20203636,
0, 3, 0, 0x00001a20, 0xffffffff, 0x48484848,
0, 3, 0, 0x00001a24, 0xffffffff, 0x46464646,
0, 3, 0, 0x00001a28, 0xffffffff, 0x44464646,
0, 3, 0, 0x00001a2c, 0xffffffff, 0x46464646,
0, 3, 0, 0x00001a30, 0xffffffff, 0x42444646,
0, 3, 1, 0x00001a34, 0xffffffff, 0x44444444,
0, 3, 1, 0x00001a38, 0xffffffff, 0x40424444,
0, 3, 2, 0x00001ad8, 0xffffffff, 0x42424242,
0, 3, 2, 0x00001adc, 0xffffffff, 0x38404242,
0, 3, 0, 0x00001a3c, 0xffffffff, 0x46464646,
0, 3, 0, 0x00001a40, 0xffffffff, 0x42444646,
0, 3, 0, 0x00001a44, 0xffffffff, 0x44444040,
0, 3, 1, 0x00001a48, 0xffffffff, 0x44444444,
0, 3, 1, 0x00001a4c, 0xffffffff, 0x38384042,
0, 3, 2, 0x00001ae0, 0xffffffff, 0x42424242,
0, 3, 2, 0x00001ae4, 0xffffffff, 0x38404242,
0, 3, 2, 0x00001ae8, 0x0000ffff, 0x20203636,
1, 0, 0, 0x00000c24, 0xffffffff, 0x46464646,
1, 0, 0, 0x00000c28, 0xffffffff, 0x44464646,
1, 0, 0, 0x00000c2c, 0xffffffff, 0x46464646,
1, 0, 0, 0x00000c30, 0xffffffff, 0x42444646,
1, 0, 1, 0x00000c34, 0xffffffff, 0x44444444,
1, 0, 1, 0x00000c38, 0xffffffff, 0x40424444,
1, 0, 2, 0x00000cd8, 0xffffffff, 0x42424242,
1, 0, 2, 0x00000cdc, 0xffffffff, 0x38404242,
1, 0, 0, 0x00000c3c, 0xffffffff, 0x46464646,
1, 0, 0, 0x00000c40, 0xffffffff, 0x42444646,
1, 0, 0, 0x00000c44, 0xffffffff, 0x44443840,
1, 0, 1, 0x00000c48, 0xffffffff, 0x44444444,
1, 0, 1, 0x00000c4c, 0xffffffff, 0x36384042,
1, 0, 2, 0x00000ce0, 0xffffffff, 0x42424242,
1, 0, 2, 0x00000ce4, 0xffffffff, 0x38404242,
1, 0, 2, 0x00000ce8, 0x0000ffff, 0x20203436,
1, 1, 0, 0x00000e24, 0xffffffff, 0x46464646,
1, 1, 0, 0x00000e28, 0xffffffff, 0x44464646,
1, 1, 0, 0x00000e2c, 0xffffffff, 0x46464646,
1, 1, 0, 0x00000e30, 0xffffffff, 0x42444646,
1, 1, 1, 0x00000e34, 0xffffffff, 0x44444444,
1, 1, 1, 0x00000e38, 0xffffffff, 0x40424444,
1, 1, 2, 0x00000ed8, 0xffffffff, 0x42424242,
1, 1, 2, 0x00000edc, 0xffffffff, 0x38404242,
1, 1, 0, 0x00000e3c, 0xffffffff, 0x46464646,
1, 1, 0, 0x00000e40, 0xffffffff, 0x42444646,
1, 1, 0, 0x00000e44, 0xffffffff, 0x44443840,
1, 1, 1, 0x00000e48, 0xffffffff, 0x44444444,
1, 1, 1, 0x00000e4c, 0xffffffff, 0x36384042,
1, 1, 2, 0x00000ee0, 0xffffffff, 0x42424242,
1, 1, 2, 0x00000ee4, 0xffffffff, 0x38404242,
1, 1, 2, 0x00000ee8, 0x0000ffff, 0x20203436,
1, 2, 0, 0x00001824, 0xffffffff, 0x46464646,
1, 2, 0, 0x00001828, 0xffffffff, 0x44464646,
1, 2, 0, 0x0000182c, 0xffffffff, 0x46464646,
1, 2, 0, 0x00001830, 0xffffffff, 0x42444646,
1, 2, 1, 0x00001834, 0xffffffff, 0x44444444,
1, 2, 1, 0x00001838, 0xffffffff, 0x40424444,
1, 2, 2, 0x000018d8, 0xffffffff, 0x42424242,
1, 2, 2, 0x000018dc, 0xffffffff, 0x38404242,
1, 2, 0, 0x0000183c, 0xffffffff, 0x46464646,
1, 2, 0, 0x00001840, 0xffffffff, 0x42444646,
1, 2, 0, 0x00001844, 0xffffffff, 0x44443840,
1, 2, 1, 0x00001848, 0xffffffff, 0x44444444,
1, 2, 1, 0x0000184c, 0xffffffff, 0x36384042,
1, 2, 2, 0x000018e0, 0xffffffff, 0x42424242,
1, 2, 2, 0x000018e4, 0xffffffff, 0x38404242,
1, 2, 2, 0x000018e8, 0x0000ffff, 0x20203436,
1, 3, 0, 0x00001a24, 0xffffffff, 0x46464646,
1, 3, 0, 0x00001a28, 0xffffffff, 0x44464646,
1, 3, 0, 0x00001a2c, 0xffffffff, 0x46464646,
1, 3, 0, 0x00001a30, 0xffffffff, 0x42444646,
1, 3, 1, 0x00001a34, 0xffffffff, 0x44444444,
1, 3, 1, 0x00001a38, 0xffffffff, 0x40424444,
1, 3, 2, 0x00001ad8, 0xffffffff, 0x42424242,
1, 3, 2, 0x00001adc, 0xffffffff, 0x38404242,
1, 3, 0, 0x00001a3c, 0xffffffff, 0x46464646,
1, 3, 0, 0x00001a40, 0xffffffff, 0x42444646,
1, 3, 0, 0x00001a44, 0xffffffff, 0x44443840,
1, 3, 1, 0x00001a48, 0xffffffff, 0x44444444,
1, 3, 1, 0x00001a4c, 0xffffffff, 0x36384042,
1, 3, 2, 0x00001ae0, 0xffffffff, 0x42424242,
1, 3, 2, 0x00001ae4, 0xffffffff, 0x38404242,
1, 3, 2, 0x00001ae8, 0x0000ffff, 0x20203436
};
void
odm_read_and_config_mp_8814a_phy_reg_pg_type3(
struct PHY_DM_STRUCT* pDM_Odm
)
{
u32 i = 0;
u32 ArrayLen = sizeof(Array_MP_8814A_PHY_REG_PG_Type3)/sizeof(u32);
u32* Array = Array_MP_8814A_PHY_REG_PG_Type3;
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
PADAPTER Adapter = pDM_Odm->Adapter;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
PlatformZeroMemory(pHalData->BufOfLinesPwrByRate, MAX_LINES_HWCONFIG_TXT*MAX_BYTES_LINE_HWCONFIG_TXT);
pHalData->nLinesReadPwrByRate = ArrayLen/6;
#endif
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD, ("===> ODM_ReadAndConfig_MP_8814A_PHY_REG_PG_Type3\n"));
pDM_Odm->phy_reg_pg_version = 1;
pDM_Odm->phy_reg_pg_value_type = PHY_REG_PG_EXACT_VALUE;
for (i = 0; i < ArrayLen; i += 6) {
u32 v1 = Array[i];
u32 v2 = Array[i+1];
u32 v3 = Array[i+2];
u32 v4 = Array[i+3];
u32 v5 = Array[i+4];
u32 v6 = Array[i+5];
odm_ConfigBB_PHY_REG_PG_8814A(pDM_Odm, v1, v2, v3, v4, v5, v6);
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
rsprintf((char *)pHalData->BufOfLinesPwrByRate[i/6], 100, "%s, %s, %s, 0x%X, 0x%08X, 0x%08X,",
(v1 == 0?"2.4G":" 5G"), (v2 == 0?"A":"B"), (v3 == 0?"1Tx":"2Tx"), v4, v5, v6);
#endif
}
}
/******************************************************************************
* PHY_REG_PG_Type5.TXT
******************************************************************************/
u32 Array_MP_8814A_PHY_REG_PG_Type5[] = {
0, 0, 0, 0x00000c20, 0xffffffff, 0x48484848,
0, 0, 0, 0x00000c24, 0xffffffff, 0x46464646,
0, 0, 0, 0x00000c28, 0xffffffff, 0x44464646,
0, 0, 0, 0x00000c2c, 0xffffffff, 0x46464646,
0, 0, 0, 0x00000c30, 0xffffffff, 0x42444646,
0, 0, 1, 0x00000c34, 0xffffffff, 0x44444444,
0, 0, 1, 0x00000c38, 0xffffffff, 0x40424444,
0, 0, 2, 0x00000cd8, 0xffffffff, 0x42424242,
0, 0, 2, 0x00000cdc, 0xffffffff, 0x38404242,
0, 0, 0, 0x00000c3c, 0xffffffff, 0x46464646,
0, 0, 0, 0x00000c40, 0xffffffff, 0x42444646,
0, 0, 0, 0x00000c44, 0xffffffff, 0x44444040,
0, 0, 1, 0x00000c48, 0xffffffff, 0x44444444,
0, 0, 1, 0x00000c4c, 0xffffffff, 0x38384042,
0, 0, 2, 0x00000ce0, 0xffffffff, 0x42424242,
0, 0, 2, 0x00000ce4, 0xffffffff, 0x38404242,
0, 0, 2, 0x00000ce8, 0x0000ffff, 0x20203636,
0, 1, 0, 0x00000e20, 0xffffffff, 0x48484848,