mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2025-01-15 16:25:35 +00:00
mxm_wifiex: update to mxm6x17408 release
Corresponding firmware version: SDIO-UART W8987 Firmware version 16.92.21.p99 PCIE-UART W8997 Firmware version 16.92.21.p84.4 SDIO-UART W8997 Firmware version 16.92.21.p84.4 SDIO-UART IW416 Firmware version 16.92.21.p84.3 SDIO_UART IW612 Firmware version 18.99.2.p19.6 SDIO-UART W8801 Firmware version 14.92.36.p182 SDIO-UART W9098 Firmware version 17.92.1.p136.128 PCIE-UART W9098 Firmware version 17.92.1.p136.129 Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
parent
f1382ccbd3
commit
19732f578f
70 changed files with 5247 additions and 4009 deletions
|
@ -1,6 +1,6 @@
|
|||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008-2022 NXP
|
||||
# Copyright 2008-2023 NXP
|
||||
#
|
||||
# This software file (the File) is distributed by NXP
|
||||
# under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
@ -20,8 +20,6 @@ CONFIG_COMPATDIR=n
|
|||
ifeq ($(CONFIG_COMPATDIR), y)
|
||||
COMPATDIR=/lib/modules/$(KERNELVERSION_X86)/build/compat-wireless-3.2-rc1-1/include
|
||||
CC ?= $(CROSS_COMPILE)gcc -I$(COMPATDIR)
|
||||
else
|
||||
CC ?= $(CROSS_COMPILE)gcc -I$(COMPATDIR)
|
||||
endif
|
||||
|
||||
LD ?= $(CROSS_COMPILE)ld
|
||||
|
@ -52,10 +50,10 @@ CONFIG_PCIE9097=n
|
|||
CONFIG_SD9098=y
|
||||
CONFIG_USB9098=n
|
||||
CONFIG_PCIE9098=y
|
||||
CONFIG_SDIW62X=n
|
||||
CONFIG_SDIW624=n
|
||||
CONFIG_SDAW693=n
|
||||
CONFIG_PCIEIW62X=n
|
||||
CONFIG_USBIW62X=n
|
||||
CONFIG_PCIEIW624=n
|
||||
CONFIG_USBIW624=n
|
||||
CONFIG_PCIEAW693=n
|
||||
|
||||
|
||||
|
@ -90,23 +88,8 @@ CONFIG_OPENWRT_SUPPORT=n
|
|||
# Big-endian platform
|
||||
CONFIG_BIG_ENDIAN=n
|
||||
|
||||
#ifdef EMBEDDED_AUTH
|
||||
# Enable driver based authenticator
|
||||
CONFIG_DRV_EMBEDDED_AUTHENTICATOR=n
|
||||
#endif
|
||||
|
||||
#ifdef EMBEDDED_SUPP
|
||||
# Enable driver based supplicant
|
||||
CONFIG_DRV_EMBEDDED_SUPPLICANT=n
|
||||
#endif
|
||||
|
||||
ifeq ($(CONFIG_DRV_EMBEDDED_SUPPLICANT), y)
|
||||
CONFIG_EMBEDDED_SUPP_AUTH=y
|
||||
else
|
||||
ifeq ($(CONFIG_DRV_EMBEDDED_AUTHENTICATOR), y)
|
||||
CONFIG_EMBEDDED_SUPP_AUTH=y
|
||||
endif
|
||||
endif
|
||||
|
||||
#ifdef SDIO_MMC
|
||||
# SDIO suspend/resume
|
||||
|
@ -121,6 +104,8 @@ CONFIG_MULTI_CHAN_SUPPORT=y
|
|||
|
||||
|
||||
|
||||
CONFIG_DUMP_TO_PROC=y
|
||||
|
||||
|
||||
#32bit app over 64bit kernel support
|
||||
CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n
|
||||
|
@ -136,12 +121,6 @@ ccflags-y += -DLINUX
|
|||
|
||||
|
||||
|
||||
#if defined(EMBEDDED_SUPP) || defined(EMBEDDED_AUTH)
|
||||
ifeq ($(CONFIG_EMBEDDED_SUPP_AUTH), y)
|
||||
ccflags-y += -I$(M)/mlan/esa
|
||||
ccflags-y += -I$(M)/mlan/esa/common
|
||||
endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -151,11 +130,10 @@ ifeq ($(CONFIG_IMX_SUPPORT),y)
|
|||
ccflags-y += -DIMX_SUPPORT
|
||||
ifneq ($(ANDROID_PRODUCT_OUT),)
|
||||
ccflags-y += -DIMX_ANDROID
|
||||
ccflags-y += -Wno-implicit-fallthrough
|
||||
CONFIG_ANDROID_KERNEL=y
|
||||
endif
|
||||
endif
|
||||
KERNELDIR ?= /usr/src/arm/linux_5_10_y_kernel/linux-nxp
|
||||
CROSS_COMPILE ?= /opt/fsl-imx-internal-xwayland/5.10-gatesgarth/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-
|
||||
|
||||
LD += -S
|
||||
|
||||
|
@ -236,6 +214,11 @@ endif
|
|||
|
||||
ifeq ($(CONFIG_ANDROID_KERNEL), y)
|
||||
ccflags-y += -DANDROID_KERNEL
|
||||
CONFIG_DUMP_TO_PROC=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DUMP_TO_PROC), y)
|
||||
ccflags-y += -DDUMP_TO_PROC
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OPENWRT_SUPPORT), y)
|
||||
|
@ -276,9 +259,9 @@ ifeq ($(CONFIG_SD9097),y)
|
|||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD9097
|
||||
endif
|
||||
ifeq ($(CONFIG_SDIW62X),y)
|
||||
ifeq ($(CONFIG_SDIW624),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSDIW62X
|
||||
ccflags-y += -DSDIW624
|
||||
endif
|
||||
ifeq ($(CONFIG_SDAW693),y)
|
||||
CONFIG_SDIO=y
|
||||
|
@ -316,9 +299,9 @@ ifeq ($(CONFIG_USB9097),y)
|
|||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSB9097
|
||||
endif
|
||||
ifeq ($(CONFIG_USBIW62X),y)
|
||||
ifeq ($(CONFIG_USBIW624),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSBIW62X
|
||||
ccflags-y += -DUSBIW624
|
||||
endif
|
||||
ifeq ($(CONFIG_USB9098),y)
|
||||
CONFIG_MUSB=y
|
||||
|
@ -340,9 +323,9 @@ ifeq ($(CONFIG_PCIE9098),y)
|
|||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIE9098
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIEIW62X),y)
|
||||
ifeq ($(CONFIG_PCIEIW624),y)
|
||||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIEIW62X
|
||||
ccflags-y += -DPCIEIW624
|
||||
endif
|
||||
#ifdef PCIEAW693_OPT
|
||||
ifeq ($(CONFIG_PCIEAW693),y)
|
||||
|
@ -509,17 +492,7 @@ endif
|
|||
endif
|
||||
|
||||
|
||||
#ifdef EMBEDDED_AUTH
|
||||
ifeq ($(CONFIG_DRV_EMBEDDED_AUTHENTICATOR), y)
|
||||
ccflags-y += -DDRV_EMBEDDED_AUTHENTICATOR
|
||||
endif
|
||||
#endif
|
||||
|
||||
#ifdef EMBEDDED_SUPP
|
||||
ifeq ($(CONFIG_DRV_EMBEDDED_SUPPLICANT), y)
|
||||
ccflags-y += -DDRV_EMBEDDED_SUPPLICANT
|
||||
endif
|
||||
#endif
|
||||
|
||||
|
||||
MOALOBJS = mlinux/moal_main.o \
|
||||
|
@ -599,37 +572,9 @@ endif
|
|||
|
||||
|
||||
|
||||
#if defined(EMBEDDED_SUPP) || defined(EMBEDDED_AUTH)
|
||||
ifeq ($(CONFIG_EMBEDDED_SUPP_AUTH), y)
|
||||
MLANOBJS += mlan/esa/common/crypto_api.o \
|
||||
mlan/esa/common/aes_cmac_rom.o \
|
||||
mlan/esa/common/crypt_new_rom.o \
|
||||
mlan/esa/common/pmkCache.o \
|
||||
mlan/esa/common/pmkCache_rom.o \
|
||||
mlan/esa/common/parser.o \
|
||||
mlan/esa/common/parser_rom.o \
|
||||
mlan/esa/keyMgmtApStaCommon.o \
|
||||
mlan/esa/hostsa_init.o \
|
||||
mlan/esa/authenticator_api.o
|
||||
endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef EMBEDDED_SUPP
|
||||
ifeq ($(CONFIG_DRV_EMBEDDED_SUPPLICANT),y)
|
||||
MLANOBJS += mlan/esa/keyMgmtSta.o \
|
||||
mlan/esa/keyMgmtSta_rom.o \
|
||||
mlan/esa/supplicant.o
|
||||
endif
|
||||
#endif
|
||||
|
||||
#ifdef EMBEDDED_AUTH
|
||||
ifeq ($(CONFIG_DRV_EMBEDDED_AUTHENTICATOR),y)
|
||||
MLANOBJS += mlan/esa/AssocAp_srv_rom.o \
|
||||
mlan/esa/keyMgmtAp_rom.o \
|
||||
mlan/esa/keyMgmtAp.o
|
||||
endif
|
||||
#endif
|
||||
|
||||
obj-m := mlan.o
|
||||
mlan-objs := $(MLANOBJS)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
Goto source code directory wlan_src/.
|
||||
make [clean] build
|
||||
The driver and utility binaries can be found in ../bin_xxxx directory.
|
||||
The driver code supports Linux kernel from 2.6.32 to 6.0.0.
|
||||
The driver code supports Linux kernel from 2.6.32 to 6.3.0.
|
||||
|
||||
2) FOR DRIVER INSTALL
|
||||
|
||||
|
@ -662,6 +662,7 @@
|
|||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
host_mlme=0|1 <Operate in non-host_mlme mode | Operate in host_mlme mode (default)>
|
||||
for supplicant/authenticator running on host side, WPA3 support is available only in host_mlme mode
|
||||
for chipset 89xx FP-92, 90xx and later, host_mlme restricted to 1
|
||||
#endif
|
||||
#endif
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
|
|
|
@ -295,7 +295,7 @@ static mlan_status wlan_11ac_ioctl_vhtcfg(pmlan_adapter pmadapter,
|
|||
/** update the RX MCS map */
|
||||
if (cfg->param.vht_cfg.txrx & MLAN_RADIO_RX) {
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
if (cfg->param.vht_cfg.band == BAND_SELECT_A) {
|
||||
rx_nss = GET_RXMCSSUPP(
|
||||
|
@ -789,7 +789,7 @@ void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap,
|
|||
mcs_map_resp =
|
||||
wlan_le16_to_cpu(pvht_cap->vht_cap.mcs_sets.rx_mcs_map);
|
||||
if (IS_CARD9098(priv->adapter->card_type) ||
|
||||
IS_CARDIW62X(priv->adapter->card_type) ||
|
||||
IS_CARDIW624(priv->adapter->card_type) ||
|
||||
IS_CARD9097(priv->adapter->card_type)) {
|
||||
if (bands & BAND_A) {
|
||||
rx_nss = GET_RXMCSSUPP(priv->adapter->user_htstream >>
|
||||
|
@ -1060,7 +1060,7 @@ t_u8 wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
ENTER();
|
||||
|
||||
if (!IS_CARD9098(pmpriv->adapter->card_type) &&
|
||||
!IS_CARDIW62X(pmpriv->adapter->card_type) &&
|
||||
!IS_CARDIW624(pmpriv->adapter->card_type) &&
|
||||
!IS_CARD9097(pmpriv->adapter->card_type))
|
||||
return ret;
|
||||
/** check band A */
|
||||
|
@ -1179,7 +1179,7 @@ int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
/** set default bandwidth:80M*/
|
||||
SET_OPER_MODE_80M(pmrvl_oper_mode->oper_mode);
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
if (pbss_desc->bss_band & BAND_A)
|
||||
rx_nss = GET_RXMCSSUPP(
|
||||
|
@ -1193,7 +1193,7 @@ int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
nss = wlan_get_nss_num_vht_mcs(mcs_map_user);
|
||||
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
PRINTM(MCMND, "rx_nss=%d nss=%d\n", rx_nss, nss);
|
||||
nss = MIN(rx_nss, nss);
|
||||
|
|
|
@ -426,7 +426,7 @@ int wlan_cmd_append_11ax_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
phecap->type = wlan_cpu_to_le16(phecap->type);
|
||||
phecap->len = wlan_cpu_to_le16(phecap->len);
|
||||
if (IS_CARD9098(pmpriv->adapter->card_type) ||
|
||||
IS_CARDIW62X(pmpriv->adapter->card_type) ||
|
||||
IS_CARDIW624(pmpriv->adapter->card_type) ||
|
||||
IS_CARD9097(pmpriv->adapter->card_type)) {
|
||||
if (pbss_desc->bss_band & band_selected) {
|
||||
rx_nss = GET_RXMCSSUPP(pmpriv->adapter->user_htstream >>
|
||||
|
@ -892,6 +892,10 @@ mlan_status wlan_cmd_11ax_cmd(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
(mlan_ds_11ax_txomi_cmd *)&ds_11ax_cmd->param;
|
||||
mlan_ds_11ax_toltime_cmd *toltime_cmd =
|
||||
(mlan_ds_11ax_toltime_cmd *)&ds_11ax_cmd->param;
|
||||
mlan_ds_11ax_set_bsrp_cmd *set_bsrp_cmd =
|
||||
(mlan_ds_11ax_set_bsrp_cmd *)&ds_11ax_cmd->param;
|
||||
mlan_ds_11ax_llde_cmd *llde_cmd =
|
||||
(mlan_ds_11ax_llde_cmd *)&ds_11ax_cmd->param;
|
||||
MrvlIEtypes_Data_t *tlv = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
@ -934,6 +938,16 @@ mlan_status wlan_cmd_11ax_cmd(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
sizeof(t_u32), sizeof(t_u32));
|
||||
cmd->size += sizeof(t_u32);
|
||||
break;
|
||||
case MLAN_11AXCMD_SET_BSRP_SUBID:
|
||||
axcmd->val[0] = set_bsrp_cmd->value;
|
||||
cmd->size += sizeof(t_u8);
|
||||
break;
|
||||
case MLAN_11AXCMD_LLDE_SUBID:
|
||||
memcpy_ext(pmadapter, axcmd->val, &llde_cmd->llde,
|
||||
sizeof(mlan_ds_11ax_llde_cmd),
|
||||
sizeof(mlan_ds_11ax_llde_cmd));
|
||||
cmd->size += sizeof(mlan_ds_11ax_llde_cmd);
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "Unknown subcmd %x\n", ds_11ax_cmd->sub_id);
|
||||
break;
|
||||
|
@ -1010,6 +1024,14 @@ mlan_status wlan_ret_11ax_cmd(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
memcpy_ext(pmadapter, &cfg->param.toltime_cfg.tol_time,
|
||||
axcmd->val, sizeof(t_u32), sizeof(t_u32));
|
||||
break;
|
||||
case MLAN_11AXCMD_SET_BSRP_SUBID:
|
||||
cfg->param.setbsrp_cfg.value = *axcmd->val;
|
||||
break;
|
||||
case MLAN_11AXCMD_LLDE_SUBID:
|
||||
memcpy_ext(pmadapter, &cfg->param.llde_cfg.llde, axcmd->val,
|
||||
sizeof(mlan_ds_11ax_llde_cmd),
|
||||
sizeof(mlan_ds_11ax_llde_cmd));
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "Unknown subcmd %x\n", axcmd->sub_id);
|
||||
break;
|
||||
|
|
|
@ -286,6 +286,31 @@ t_void wlan_11h_set_chan_dfs_state(mlan_private *priv, t_u8 chan, t_u8 bw,
|
|||
wlan_set_chan_dfs_state(priv, BAND_A, chan_list[i], dfs_state);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief reset dfs_checking_chan's dfs state
|
||||
*
|
||||
* @param priv Private driver information structure
|
||||
* @param dfs_state dfs state
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void wlan_11h_reset_dfs_checking_chan_dfs_state(mlan_private *priv,
|
||||
dfs_state_t dfs_state)
|
||||
{
|
||||
wlan_dfs_device_state_t *pstate_dfs = &priv->adapter->state_dfs;
|
||||
dfs_state_t state;
|
||||
ENTER();
|
||||
if (pstate_dfs->dfs_check_channel) {
|
||||
state = wlan_get_chan_dfs_state(priv, BAND_A,
|
||||
pstate_dfs->dfs_check_channel);
|
||||
if (state == DFS_AVAILABLE)
|
||||
wlan_11h_set_chan_dfs_state(
|
||||
priv, pstate_dfs->dfs_check_channel,
|
||||
pstate_dfs->dfs_check_bandwidth, dfs_state);
|
||||
}
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/**
|
||||
* @brief Setup the IBSS DFS element passed to the firmware in adhoc start
|
||||
|
@ -3814,7 +3839,8 @@ void wlan_dfs_rep_disconnect(mlan_adapter *pmadapter)
|
|||
if (wlan_11h_radar_detect_required(pmpriv,
|
||||
pmadapter->dfsr_channel)) {
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_BSS_STOP,
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_APCMD_BSS_STOP,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL,
|
||||
MNULL);
|
||||
if (ret) {
|
||||
|
@ -3863,7 +3889,8 @@ void wlan_dfs_rep_bw_change(mlan_adapter *pmadapter)
|
|||
pmpriv, pmadapter->dfsr_channel))
|
||||
return;
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_BSS_STOP,
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_APCMD_BSS_STOP,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL,
|
||||
MNULL);
|
||||
if (ret) {
|
||||
|
@ -3877,7 +3904,8 @@ void wlan_dfs_rep_bw_change(mlan_adapter *pmadapter)
|
|||
pmpriv = priv_list[i];
|
||||
|
||||
if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) {
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_BSS_START,
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_APCMD_BSS_START,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL,
|
||||
MNULL);
|
||||
if (ret) {
|
||||
|
@ -4174,10 +4202,9 @@ mlan_status wlan_11h_radar_detected_handling(mlan_adapter *pmadapter,
|
|||
__func__);
|
||||
#ifdef UAP_SUPPORT
|
||||
if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) {
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HOST_CMD_APCMD_BSS_STOP,
|
||||
HostCmd_ACT_GEN_SET, 0,
|
||||
MNULL, MNULL);
|
||||
ret = wlan_prepare_cmd(
|
||||
pmpriv, HostCmd_CMD_APCMD_BSS_STOP,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL, MNULL);
|
||||
PRINTM(MERROR,
|
||||
"STOP UAP and exit radar handling...\n");
|
||||
pstate_rdh->stage = RDH_OFF;
|
||||
|
@ -4410,10 +4437,9 @@ mlan_status wlan_11h_radar_detected_handling(mlan_adapter *pmadapter,
|
|||
pstate_rdh->priv_list[pstate_rdh->priv_curr_idx];
|
||||
#ifdef UAP_SUPPORT
|
||||
if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) {
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HOST_CMD_APCMD_BSS_STOP,
|
||||
HostCmd_ACT_GEN_SET, 0,
|
||||
MNULL, MNULL);
|
||||
ret = wlan_prepare_cmd(
|
||||
pmpriv, HostCmd_CMD_APCMD_BSS_STOP,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL, MNULL);
|
||||
break; /* leads to exit case */
|
||||
}
|
||||
#endif
|
||||
|
@ -4519,10 +4545,9 @@ mlan_status wlan_11h_radar_detected_handling(mlan_adapter *pmadapter,
|
|||
ret = wlan_11h_check_update_radar_det_state(
|
||||
pmpriv);
|
||||
}
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HOST_CMD_APCMD_BSS_START,
|
||||
HostCmd_ACT_GEN_SET, 0,
|
||||
MNULL, MNULL);
|
||||
ret = wlan_prepare_cmd(
|
||||
pmpriv, HostCmd_CMD_APCMD_BSS_START,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL, MNULL);
|
||||
break; /* leads to exit case */
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -169,6 +169,8 @@ extern mlan_status wlan_11h_ioctl_chan_switch_count(pmlan_adapter pmadapter,
|
|||
/** get/set channel dfs state */
|
||||
mlan_status wlan_11h_ioctl_chan_dfs_state(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
t_void wlan_11h_reset_dfs_checking_chan_dfs_state(mlan_private *priv,
|
||||
dfs_state_t dfs_state);
|
||||
|
||||
/** get/set dfs w53 cfg */
|
||||
mlan_status wlan_11h_ioctl_dfs_w53_cfg(pmlan_adapter pmadapter,
|
||||
|
|
|
@ -398,6 +398,7 @@ void wlan_11n_send_delba_to_peer(mlan_private *priv, t_u8 *ra)
|
|||
MLAN_MAC_ADDR_LENGTH)) {
|
||||
PRINTM(MIOCTL, "Tx:Send delba to tid=%d, " MACSTR "\n",
|
||||
ptx_tbl->tid, MAC2STR(ptx_tbl->ra));
|
||||
ptx_tbl->ba_status = BA_STREAM_SENT_DELBA;
|
||||
wlan_send_delba(priv, MNULL, ptx_tbl->tid, ptx_tbl->ra,
|
||||
1);
|
||||
}
|
||||
|
@ -469,6 +470,7 @@ static void wlan_11n_update_addba_request(mlan_private *priv)
|
|||
}
|
||||
|
||||
while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) {
|
||||
ptx_tbl->ba_status = BA_STREAM_SETUP_SENT_ADDBA;
|
||||
wlan_send_addba(priv, ptx_tbl->tid, ptx_tbl->ra);
|
||||
ptx_tbl = ptx_tbl->pnext;
|
||||
}
|
||||
|
@ -759,6 +761,8 @@ static mlan_status wlan_send_delba_to_entry_in_txbastream_tbl(
|
|||
!memcmp(pmadapter, peer_address,
|
||||
tx_ba_stream_tbl_ptr->ra,
|
||||
MLAN_MAC_ADDR_LENGTH))) {
|
||||
tx_ba_stream_tbl_ptr->ba_status =
|
||||
BA_STREAM_SENT_DELBA;
|
||||
if (last_tx_ba_to_delete &&
|
||||
(tx_ba_stream_tbl_ptr ==
|
||||
last_tx_ba_to_delete))
|
||||
|
@ -1022,6 +1026,8 @@ static void wlan_send_delba_txbastream_tbl(pmlan_private priv, t_u8 tid)
|
|||
PRINTM(MIOCTL,
|
||||
"Tx:Send delba to tid=%d, " MACSTR "\n",
|
||||
tid, MAC2STR(tx_ba_stream_tbl_ptr->ra));
|
||||
tx_ba_stream_tbl_ptr->ba_status =
|
||||
BA_STREAM_SENT_DELBA;
|
||||
wlan_release_ralist_lock(priv);
|
||||
wlan_send_delba(priv, MNULL,
|
||||
tx_ba_stream_tbl_ptr->tid,
|
||||
|
@ -1531,7 +1537,7 @@ void wlan_fill_ht_cap_tlv(mlan_private *priv, MrvlIETypes_HTCap_t *pht_cap,
|
|||
|
||||
rx_mcs_supp = GET_RXMCSSUPP(priv->usr_dev_mcs_support);
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
if (bands & BAND_A)
|
||||
rx_mcs_supp = MIN(
|
||||
|
@ -1604,7 +1610,7 @@ void wlan_fill_ht_cap_ie(mlan_private *priv, IEEEtypes_HTCap_t *pht_cap,
|
|||
|
||||
rx_mcs_supp = GET_RXMCSSUPP(priv->usr_dev_mcs_support);
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
if (bands & BAND_A)
|
||||
rx_mcs_supp = MIN(
|
||||
|
@ -1754,8 +1760,12 @@ mlan_status wlan_ret_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *resp)
|
|||
ptx_ba_tbl = wlan_11n_get_txbastream_status(
|
||||
priv, BA_STREAM_SETUP_INPROGRESS);
|
||||
wlan_release_ralist_lock(priv);
|
||||
if (ptx_ba_tbl)
|
||||
if (ptx_ba_tbl) {
|
||||
/* mark this txba stream as waiting addba resp, in case
|
||||
* we send duplicate addba req command */
|
||||
ptx_ba_tbl->ba_status = BA_STREAM_SETUP_SENT_ADDBA;
|
||||
wlan_send_addba(priv, ptx_ba_tbl->tid, ptx_ba_tbl->ra);
|
||||
}
|
||||
} else { /*
|
||||
* In case of failure, recreate
|
||||
* the deleted stream in case
|
||||
|
@ -1763,11 +1773,11 @@ mlan_status wlan_ret_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *resp)
|
|||
*/
|
||||
if (INITIATOR_BIT(pdel_ba->del_ba_param_set)) {
|
||||
wlan_request_ralist_lock(priv);
|
||||
if (!wlan_11n_get_txbastream_tbl(
|
||||
priv, tid, pdel_ba->peer_mac_addr, MFALSE))
|
||||
wlan_11n_create_txbastream_tbl(
|
||||
priv, pdel_ba->peer_mac_addr, tid,
|
||||
BA_STREAM_SETUP_INPROGRESS);
|
||||
wlan_11n_set_txbastream_status(priv, tid,
|
||||
pdel_ba->peer_mac_addr,
|
||||
BA_STREAM_SETUP_COMPLETE,
|
||||
MFALSE);
|
||||
|
||||
ptx_ba_tbl = wlan_11n_get_txbastream_status(
|
||||
priv, BA_STREAM_SETUP_INPROGRESS);
|
||||
wlan_release_ralist_lock(priv);
|
||||
|
@ -1866,12 +1876,27 @@ mlan_status wlan_ret_11n_addba_req(mlan_private *priv, HostCmd_DS_COMMAND *resp)
|
|||
BA_STREAM_NOT_ALLOWED;
|
||||
|
||||
} else {
|
||||
t_u8 event_buf[256];
|
||||
mlan_event *pevent = (mlan_event *)event_buf;
|
||||
addba_timeout_event *evtbuf =
|
||||
(addba_timeout_event *)pevent->event_buf;
|
||||
if (ra_list) {
|
||||
ra_list->packet_count = 0;
|
||||
ra_list->ba_packet_threshold =
|
||||
wlan_get_random_ba_threshold(
|
||||
priv->adapter);
|
||||
}
|
||||
memset(priv->adapter, event_buf, 0x00,
|
||||
sizeof(event_buf));
|
||||
pevent->bss_index = priv->bss_index;
|
||||
pevent->event_id = MLAN_EVENT_ID_DRV_ADDBA_TIMEOUT;
|
||||
pevent->event_len = sizeof(addba_timeout_event);
|
||||
memcpy_ext(priv->adapter, evtbuf->peer_mac_addr,
|
||||
padd_ba_rsp->peer_mac_addr,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
evtbuf->tid = tid;
|
||||
wlan_recv_event(priv, MLAN_EVENT_ID_DRV_ADDBA_TIMEOUT,
|
||||
pevent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2870,6 +2895,58 @@ TxBAStreamTbl *wlan_11n_get_txbastream_tbl(mlan_private *priv, int tid,
|
|||
return MNULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function will set ba_status txbastream entry with
|
||||
* given RA/TID.
|
||||
*
|
||||
* @param priv A pointer to mlan_private
|
||||
* @param ra RA to find in txbastream
|
||||
* @param tid TID to find in txbastream
|
||||
* @param ba_status BA stream status
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void wlan_11n_set_txbastream_status(mlan_private *priv, int tid, t_u8 *ra,
|
||||
baStatus_e ba_status, int lock)
|
||||
{
|
||||
TxBAStreamTbl *ptx_tbl;
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (lock)
|
||||
wlan_request_ralist_lock(priv);
|
||||
ptx_tbl = (TxBAStreamTbl *)util_peek_list(pmadapter->pmoal_handle,
|
||||
&priv->tx_ba_stream_tbl_ptr,
|
||||
MNULL, MNULL);
|
||||
if (!ptx_tbl) {
|
||||
if (lock)
|
||||
wlan_release_ralist_lock(priv);
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) {
|
||||
PRINTM(MDAT_D, "get_txbastream_tbl TID %d\n", ptx_tbl->tid);
|
||||
DBG_HEXDUMP(MDAT_D, "RA", ptx_tbl->ra, MLAN_MAC_ADDR_LENGTH);
|
||||
|
||||
if ((!memcmp(pmadapter, ptx_tbl->ra, ra,
|
||||
MLAN_MAC_ADDR_LENGTH)) &&
|
||||
(ptx_tbl->tid == tid)) {
|
||||
ptx_tbl->ba_status = ba_status;
|
||||
if (lock)
|
||||
wlan_release_ralist_lock(priv);
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
ptx_tbl = ptx_tbl->pnext;
|
||||
}
|
||||
if (lock)
|
||||
wlan_release_ralist_lock(priv);
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function will create a entry in tx ba stream table for the
|
||||
* given RA/TID.
|
||||
|
@ -2939,8 +3016,8 @@ int wlan_send_addba(mlan_private *priv, int tid, t_u8 *peer_mac)
|
|||
|
||||
ENTER();
|
||||
|
||||
PRINTM(MCMND, "Send addba: TID %d\n", tid);
|
||||
DBG_HEXDUMP(MCMD_D, "Send addba RA", peer_mac, MLAN_MAC_ADDR_LENGTH);
|
||||
PRINTM(MCMND, "Send addba: TID %d, " MACSTR "\n", tid,
|
||||
MAC2STR(peer_mac));
|
||||
|
||||
add_ba_req.block_ack_param_set = (t_u16)(
|
||||
(tid << BLOCKACKPARAM_TID_POS) |
|
||||
|
@ -2988,6 +3065,9 @@ int wlan_send_delba(mlan_private *priv, pmlan_ioctl_req pioctl_req, int tid,
|
|||
|
||||
ENTER();
|
||||
|
||||
PRINTM(MCMND, "Send delba: TID %d initiator=%d, " MACSTR "\n", tid,
|
||||
initiator, MAC2STR(peer_mac));
|
||||
|
||||
memset(priv->adapter, &delba, 0, sizeof(delba));
|
||||
delba.del_ba_param_set = (tid << DELBA_TID_POS);
|
||||
|
||||
|
|
|
@ -87,6 +87,10 @@ void wlan_11n_deleteall_txbastream_tbl(mlan_private *priv);
|
|||
/** Get Tx BA stream table */
|
||||
TxBAStreamTbl *wlan_11n_get_txbastream_tbl(mlan_private *priv, int tid,
|
||||
t_u8 *ra, int lock);
|
||||
/** Set Tx BA stream table BA status */
|
||||
void wlan_11n_set_txbastream_status(mlan_private *priv, int tid, t_u8 *ra,
|
||||
baStatus_e ba_status, int lock);
|
||||
|
||||
/** Create Tx BA stream table */
|
||||
void wlan_11n_create_txbastream_tbl(mlan_private *priv, t_u8 *ra, int tid,
|
||||
baStatus_e ba_status);
|
||||
|
@ -376,14 +380,14 @@ static INLINE t_u8 wlan_find_stream_to_delete(mlan_private *priv,
|
|||
tid = priv->aggr_prio_tbl[ptr_tid].ampdu_user;
|
||||
|
||||
while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) {
|
||||
if (tid > priv->aggr_prio_tbl[ptx_tbl->tid].ampdu_user) {
|
||||
if ((ptx_tbl->ba_status == BA_STREAM_SETUP_COMPLETE) &&
|
||||
(tid > priv->aggr_prio_tbl[ptx_tbl->tid].ampdu_user)) {
|
||||
tid = priv->aggr_prio_tbl[ptx_tbl->tid].ampdu_user;
|
||||
*ptid = ptx_tbl->tid;
|
||||
memcpy_ext(priv->adapter, ra, ptx_tbl->ra,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
ret = MTRUE;
|
||||
}
|
||||
|
||||
ptx_tbl = ptx_tbl->pnext;
|
||||
}
|
||||
LEAVE();
|
||||
|
|
|
@ -134,14 +134,13 @@ static mlan_status wlan_11n_dispatch_pkt(t_void *priv, t_void *payload,
|
|||
static void mlan_11n_rxreorder_timer_restart(pmlan_adapter pmadapter,
|
||||
RxReorderTbl *rx_reor_tbl_ptr)
|
||||
{
|
||||
t_u16 min_flush_time = DEF_FLUSH_TIME_AC_BE_BK;
|
||||
t_u16 min_flush_time = pmadapter->flush_time_ac_be_bk;
|
||||
mlan_wmm_ac_e wmm_ac;
|
||||
ENTER();
|
||||
|
||||
wmm_ac = wlan_wmm_convert_tos_to_ac(pmadapter, rx_reor_tbl_ptr->tid);
|
||||
if ((WMM_AC_VI == wmm_ac) || (WMM_AC_VO == wmm_ac)) {
|
||||
min_flush_time = DEF_FLUSH_TIME_AC_VI_VO;
|
||||
}
|
||||
if ((WMM_AC_VI == wmm_ac) || (WMM_AC_VO == wmm_ac))
|
||||
min_flush_time = pmadapter->flush_time_ac_vi_vo;
|
||||
|
||||
if (rx_reor_tbl_ptr->timer_context.timer_is_set)
|
||||
pmadapter->callbacks.moal_stop_timer(
|
||||
|
@ -631,6 +630,54 @@ static t_u8 wlan_is_addba_reject(mlan_private *priv, t_u8 tid)
|
|||
#endif
|
||||
return priv->addba_reject[tid];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of
|
||||
* delete a block ack request
|
||||
*
|
||||
* @param priv A pointer to mlan_private structure
|
||||
* @param addba A pointer to addba buffer
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
mlan_status wlan_11n_add_bastream(mlan_private *priv, t_u8 *addba)
|
||||
{
|
||||
HostCmd_DS_11N_ADDBA_REQ *pevt_addba_req =
|
||||
(HostCmd_DS_11N_ADDBA_REQ *)addba;
|
||||
RxReorderTbl *rx_reor_tbl_ptr = MNULL;
|
||||
t_u16 block_ack_param_set;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
int tid;
|
||||
|
||||
ENTER();
|
||||
|
||||
DBG_HEXDUMP(MCMD_D, "addba req", (t_u8 *)addba,
|
||||
sizeof(HostCmd_DS_11N_ADDBA_REQ));
|
||||
if (priv->adapter->scan_processing) {
|
||||
PRINTM(MERROR,
|
||||
"Scan in progress, ignore ADDBA Request event\n");
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
block_ack_param_set =
|
||||
wlan_le16_to_cpu(pevt_addba_req->block_ack_param_set);
|
||||
tid = (block_ack_param_set & BLOCKACKPARAM_TID_MASK) >>
|
||||
BLOCKACKPARAM_TID_POS;
|
||||
rx_reor_tbl_ptr = wlan_11n_get_rxreorder_tbl(
|
||||
priv, tid, pevt_addba_req->peer_mac_addr);
|
||||
if (rx_reor_tbl_ptr &&
|
||||
(rx_reor_tbl_ptr->ba_status != BA_STREAM_SETUP_COMPLETE)) {
|
||||
PRINTM(MCMND,
|
||||
"BA setup in progress, ignore ADDBA Request event\n");
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
ret = wlan_prepare_cmd(priv, HostCmd_CMD_11N_ADDBA_RSP,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL, addba);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command for adding a block ack
|
||||
* response.
|
||||
|
@ -807,6 +854,11 @@ mlan_status mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid,
|
|||
PRINTM(MDAT_D, "AMSDU ");
|
||||
|
||||
if (rx_reor_tbl_ptr->check_start_win) {
|
||||
PRINTM(MDAT_D,
|
||||
"0:seq_num %d start_win %d win_size %d last_seq %d\n",
|
||||
seq_num, rx_reor_tbl_ptr->start_win,
|
||||
rx_reor_tbl_ptr->win_size,
|
||||
rx_reor_tbl_ptr->last_seq);
|
||||
if (seq_num == rx_reor_tbl_ptr->start_win)
|
||||
rx_reor_tbl_ptr->check_start_win = MFALSE;
|
||||
else {
|
||||
|
@ -1055,7 +1107,7 @@ void mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid, t_u8 *peer_mac,
|
|||
cleanup_rx_reorder_tbl = (initiator) ? MFALSE : MTRUE;
|
||||
|
||||
PRINTM(MEVENT,
|
||||
"delete_bastream_tbl: " MACSTR " tid=%d, type=%d"
|
||||
"delete_bastream_tbl: " MACSTR " tid=%d, type=%d "
|
||||
"initiator=%d reason=%d\n",
|
||||
MAC2STR(peer_mac), tid, type, initiator, reason_code);
|
||||
|
||||
|
@ -1090,14 +1142,13 @@ void mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid, t_u8 *peer_mac,
|
|||
ra_list->del_ba_count = 0;
|
||||
else
|
||||
ra_list->del_ba_count++;
|
||||
ra_list->packet_count = 0;
|
||||
}
|
||||
ra_list->packet_count = 0;
|
||||
/** after delba, we will try to set up BA again after sending 1k packets*/
|
||||
#define MIN_BA_SETUP_PACKET_REQIRED 1024
|
||||
ra_list->ba_packet_threshold =
|
||||
MIN_BA_SETUP_PACKET_REQIRED +
|
||||
wlan_get_random_ba_threshold(
|
||||
priv->adapter);
|
||||
}
|
||||
ra_list->ba_packet_threshold =
|
||||
MIN_BA_SETUP_PACKET_REQIRED +
|
||||
wlan_get_random_ba_threshold(priv->adapter);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1190,6 +1241,13 @@ void wlan_11n_ba_stream_timeout(mlan_private *priv,
|
|||
|
||||
DBG_HEXDUMP(MCMD_D, "Event:", (t_u8 *)event, 20);
|
||||
|
||||
if (event->origninator &&
|
||||
!wlan_11n_get_txbastream_tbl(priv, event->tid, event->peer_mac_addr,
|
||||
MFALSE)) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
memset(priv->adapter, &delba, 0, sizeof(HostCmd_DS_11N_DELBA));
|
||||
memcpy_ext(priv->adapter, delba.peer_mac_addr, event->peer_mac_addr,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
|
|
|
@ -82,6 +82,7 @@ mlan_status mlan_11n_rxreorder_pkt(void *priv, t_u16 seqNum, t_u16 tid,
|
|||
void mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid,
|
||||
t_u8 *PeerMACAddr, t_u8 type, int initiator,
|
||||
t_u16 reason_code);
|
||||
mlan_status wlan_11n_add_bastream(mlan_private *priv, t_u8 *addba);
|
||||
void wlan_11n_ba_stream_timeout(mlan_private *priv,
|
||||
HostCmd_DS_11N_BATIMEOUT *event);
|
||||
mlan_status wlan_ret_11n_addba_resp(mlan_private *priv,
|
||||
|
|
|
@ -398,6 +398,7 @@ static chan_freq_power_t channel_freq_power_EU_A[] = {
|
|||
{132, 5660, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE, {0x13, 0, 0}},
|
||||
{136, 5680, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE, {0x13, 0, 0}},
|
||||
{140, 5700, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE, {0x13, 0, 0}},
|
||||
{144, 5720, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE, {0x13, 0, 0}},
|
||||
{149, 5745, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{153, 5765, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{157, 5785, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
|
@ -579,10 +580,10 @@ static chan_freq_power_t channel_freq_power_low_middle_high_band[] = {
|
|||
{40, 5200, WLAN_TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{44, 5220, WLAN_TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{48, 5240, WLAN_TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{52, 5260, WLAN_TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{56, 5280, WLAN_TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{60, 5300, WLAN_TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{64, 5320, WLAN_TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{52, 5260, WLAN_TX_PWR_DEFAULT, MTRUE, {0x10, 0, 0}},
|
||||
{56, 5280, WLAN_TX_PWR_DEFAULT, MTRUE, {0x10, 0, 0}},
|
||||
{60, 5300, WLAN_TX_PWR_DEFAULT, MTRUE, {0x10, 0, 0}},
|
||||
{64, 5320, WLAN_TX_PWR_DEFAULT, MTRUE, {0x10, 0, 0}},
|
||||
{149, 5745, WLAN_TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{153, 5765, WLAN_TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{157, 5785, WLAN_TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
|
@ -3368,27 +3369,49 @@ void wlan_add_fw_cfp_tables(pmlan_private pmpriv, t_u8 *buf, t_u16 buf_left)
|
|||
break;
|
||||
}
|
||||
}
|
||||
PRINTM(MCMND,
|
||||
"OTP region: region_code=%d %c%c dfs_region=%d\n",
|
||||
pmadapter->otp_region->region_code,
|
||||
pmadapter->otp_region->country_code[0],
|
||||
pmadapter->otp_region->country_code[1],
|
||||
pmadapter->otp_region->dfs_region);
|
||||
|
||||
/* Update the region code and the country code in
|
||||
* pmadapter
|
||||
*/
|
||||
pmadapter->region_code =
|
||||
pmadapter->otp_region->region_code;
|
||||
pmadapter->country_code[0] =
|
||||
pmadapter->otp_region->country_code[0];
|
||||
pmadapter->country_code[1] =
|
||||
pmadapter->otp_region->country_code[1];
|
||||
if (pmadapter->otp_region->force_reg) {
|
||||
/* Region is enforced. Use FW country code only
|
||||
*/
|
||||
pmadapter->country_code[0] =
|
||||
pmadapter->otp_region->country_code[0];
|
||||
pmadapter->country_code[1] =
|
||||
pmadapter->otp_region->country_code[1];
|
||||
} else if (memcmp(pmadapter,
|
||||
pmadapter->otp_region->country_code,
|
||||
pmadapter->country_code,
|
||||
COUNTRY_CODE_LEN - 1)) {
|
||||
PRINTM(MERROR,
|
||||
"FW country code %c%c does not match with %c%c\n",
|
||||
pmadapter->otp_region->country_code[0],
|
||||
pmadapter->otp_region->country_code[1],
|
||||
pmadapter->country_code[0],
|
||||
pmadapter->country_code[1]);
|
||||
|
||||
/* FW code mismatch, replace with the driver
|
||||
* code */
|
||||
pmadapter->otp_region->country_code[0] =
|
||||
pmadapter->country_code[0];
|
||||
pmadapter->otp_region->country_code[1] =
|
||||
pmadapter->country_code[1];
|
||||
}
|
||||
pmadapter->country_code[2] = '\0';
|
||||
pmadapter->domain_reg.country_code[0] =
|
||||
pmadapter->otp_region->country_code[0];
|
||||
pmadapter->domain_reg.country_code[1] =
|
||||
pmadapter->otp_region->country_code[1];
|
||||
pmadapter->domain_reg.country_code[2] = '\0';
|
||||
PRINTM(MCMND,
|
||||
"OTP region: region_code=%d %c%c dfs_region=%d\n",
|
||||
pmadapter->otp_region->region_code,
|
||||
pmadapter->country_code[0],
|
||||
pmadapter->country_code[1],
|
||||
pmadapter->otp_region->dfs_region);
|
||||
pmadapter->cfp_code_bg =
|
||||
pmadapter->otp_region->region_code;
|
||||
pmadapter->cfp_code_a =
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* @brief This file contains the handling of CMD/EVENT in MLAN
|
||||
*
|
||||
*
|
||||
* Copyright 2009-2022 NXP
|
||||
* Copyright 2009-2023 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
@ -26,6 +26,7 @@ Change Log:
|
|||
05/12/2009: initial version
|
||||
************************************************************/
|
||||
#include "mlan.h"
|
||||
#include "mlan_util.h"
|
||||
#ifdef STA_SUPPORT
|
||||
#include "mlan_join.h"
|
||||
#endif
|
||||
|
@ -49,6 +50,30 @@ Change Log:
|
|||
Local Variables
|
||||
********************************************************/
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
|
||||
#define ENUM_ELEMENT(_name, _id) \
|
||||
{ \
|
||||
.id = _id, .name = #_name \
|
||||
}
|
||||
#define ENUM_ELEMENT_LAST(name) \
|
||||
{ \
|
||||
0xFFFF, 0 \
|
||||
}
|
||||
|
||||
static const struct reflective_enum_element host_cmd_id_names[] = {
|
||||
#include "mlan_hostcmd_ids.h"
|
||||
};
|
||||
|
||||
static const struct reflective_enum_element host_fw_event_names[] = {
|
||||
#include "mlan_event_ids.h"
|
||||
};
|
||||
|
||||
#undef ENUM_ELEMENT
|
||||
#undef ENUM_ELEMENT_LAST
|
||||
|
||||
#endif /* DEBUG_LEVEL1 */
|
||||
|
||||
/*******************************************************
|
||||
Global Variables
|
||||
********************************************************/
|
||||
|
@ -56,6 +81,32 @@ Change Log:
|
|||
/********************************************************
|
||||
Local Functions
|
||||
********************************************************/
|
||||
static const char *wlan_hostcmd_get_name(enum host_cmd_id id)
|
||||
{
|
||||
#ifdef DEBUG_LEVEL1
|
||||
const char *name = reflective_enum_lookup_name(host_cmd_id_names, id);
|
||||
|
||||
if (name) {
|
||||
return wlan_str_skip_prefix(name, "HostCmd_CMD_");
|
||||
}
|
||||
#endif
|
||||
|
||||
return "???";
|
||||
}
|
||||
|
||||
static const char *wlan_event_get_name(enum host_fw_event_id id)
|
||||
{
|
||||
#ifdef DEBUG_LEVEL1
|
||||
const char *name = reflective_enum_lookup_name(host_fw_event_names, id);
|
||||
|
||||
if (name) {
|
||||
return wlan_str_skip_prefix(name, "EVENT_");
|
||||
}
|
||||
#endif
|
||||
|
||||
return "???";
|
||||
}
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/**
|
||||
* @brief This function check if the command was cancel scan command
|
||||
|
@ -113,7 +164,7 @@ static t_u8 wlan_is_cmd_allowed_during_scan(t_u16 cmd_id)
|
|||
case HostCmd_CMD_FUNC_INIT:
|
||||
case HostCmd_CMD_CFG_DATA:
|
||||
case HostCmd_CMD_REGION_POWER_CFG:
|
||||
case HostCmd_CHANNEL_TRPC_CONFIG:
|
||||
case HostCmd_CMD_CHANNEL_TRPC_CONFIG:
|
||||
case HostCmd_CMD_FUNC_SHUTDOWN:
|
||||
case HostCmd_CMD_802_11_ASSOCIATE:
|
||||
case HostCmd_CMD_802_11_DEAUTHENTICATE:
|
||||
|
@ -129,13 +180,13 @@ static t_u8 wlan_is_cmd_allowed_during_scan(t_u16 cmd_id)
|
|||
case HostCmd_CMD_TDLS_OPERATION:
|
||||
case HostCmd_CMD_SOFT_RESET:
|
||||
#ifdef UAP_SUPPORT
|
||||
case HOST_CMD_APCMD_SYS_RESET:
|
||||
case HOST_CMD_APCMD_BSS_START:
|
||||
case HOST_CMD_APCMD_BSS_STOP:
|
||||
case HOST_CMD_APCMD_STA_DEAUTH:
|
||||
case HostCmd_CMD_APCMD_SYS_RESET:
|
||||
case HostCmd_CMD_APCMD_BSS_START:
|
||||
case HostCmd_CMD_APCMD_BSS_STOP:
|
||||
case HostCmd_CMD_APCMD_STA_DEAUTH:
|
||||
#endif
|
||||
case HostCmd_CMD_802_11_BG_SCAN_CONFIG:
|
||||
case HostCMD_APCMD_ACS_SCAN:
|
||||
case HostCmd_CMD_APCMD_ACS_SCAN:
|
||||
ret = MFALSE;
|
||||
break;
|
||||
default:
|
||||
|
@ -253,8 +304,9 @@ static t_void wlan_queue_cmd(mlan_private *pmpriv, cmd_ctrl_node *pcmd_node,
|
|||
if (pmpriv->adapter->scan_processing &&
|
||||
pmpriv->adapter->ext_scan_type == EXT_SCAN_ENHANCE) {
|
||||
if (MFALSE == wlan_is_cmd_allowed_during_scan(cmd_no)) {
|
||||
PRINTM(MCMND, "QUEUE_CMD: cmd=0x%x ext_cmd_pending_q\n",
|
||||
cmd_no);
|
||||
PRINTM(MCMND,
|
||||
"QUEUE_CMD: %s [0x%x] ext_cmd_pending_q\n",
|
||||
wlan_hostcmd_get_name(cmd_no), cmd_no);
|
||||
wlan_queue_cmd_to_ext_cmd_pending_queue(pmpriv,
|
||||
pcmd_node);
|
||||
return;
|
||||
|
@ -394,8 +446,9 @@ static t_void wlan_dump_info(mlan_adapter *pmadapter, t_u8 reason)
|
|||
[pmadapter->dbg.last_cmd_index];
|
||||
PRINTM_GET_SYS_TIME(MERROR, &sec, &usec);
|
||||
PRINTM(MERROR,
|
||||
"Current cmd id (%lu.%06lu) = 0x%x, act = 0x%x\n",
|
||||
sec, usec, cmd_id, cmd_act);
|
||||
"Current cmd id (%lu.%06lu) %s [0x%x], act = 0x%x\n",
|
||||
sec, usec, wlan_hostcmd_get_name(cmd_id), cmd_id,
|
||||
cmd_act);
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
if (!IS_USB(pmadapter->card_type) &&
|
||||
pcmd_node->cmdbuf) {
|
||||
|
@ -1161,12 +1214,12 @@ static t_u32 wlan_get_cmd_timeout(t_u16 cmd_id)
|
|||
case HostCmd_CMD_SUPPLICANT_PROFILE:
|
||||
case HostCmd_CMD_SOFT_RESET:
|
||||
#ifdef UAP_SUPPORT
|
||||
case HOST_CMD_APCMD_SYS_RESET:
|
||||
case HOST_CMD_APCMD_BSS_START:
|
||||
case HOST_CMD_APCMD_BSS_STOP:
|
||||
case HOST_CMD_APCMD_STA_DEAUTH:
|
||||
case HostCmd_CMD_APCMD_SYS_RESET:
|
||||
case HostCmd_CMD_APCMD_BSS_START:
|
||||
case HostCmd_CMD_APCMD_BSS_STOP:
|
||||
case HostCmd_CMD_APCMD_STA_DEAUTH:
|
||||
#endif
|
||||
case HostCMD_APCMD_ACS_SCAN:
|
||||
case HostCmd_CMD_APCMD_ACS_SCAN:
|
||||
timeout = MRVDRV_TIMER_5S;
|
||||
break;
|
||||
default:
|
||||
|
@ -1310,8 +1363,8 @@ static mlan_status wlan_dnld_cmd_to_fw(mlan_private *pmpriv,
|
|||
PRINTM_GET_SYS_TIME(MCMND, &sec, &usec);
|
||||
PRINTM_NETINTF(MCMND, pmpriv);
|
||||
PRINTM(MCMND,
|
||||
"DNLD_CMD (%lu.%06lu): 0x%x, act 0x%x, len %d, seqno 0x%x timeout %d\n",
|
||||
sec, usec, cmd_code,
|
||||
"DNLD_CMD (%lu.%06lu): %s [0x%x], act 0x%x, len %d, seqno 0x%x timeout %d\n",
|
||||
sec, usec, wlan_hostcmd_get_name(cmd_code), cmd_code,
|
||||
wlan_le16_to_cpu(*(t_u16 *)((t_u8 *)pcmd + S_DS_GEN)), cmd_size,
|
||||
wlan_le16_to_cpu(pcmd->seq_num), timeout);
|
||||
DBG_HEXDUMP(MCMD_D, "DNLD_CMD", (t_u8 *)pcmd, cmd_size);
|
||||
|
@ -1746,7 +1799,9 @@ mlan_status wlan_process_event(pmlan_adapter pmadapter)
|
|||
if (priv)
|
||||
PRINTM_NETINTF(MEVENT, priv);
|
||||
PRINTM(MERROR,
|
||||
"Error processing DFS Event: 0x%x\n",
|
||||
"Error processing DFS Event: %s [0x%x]\n",
|
||||
wlan_event_get_name(eventcause &
|
||||
EVENT_ID_MASK),
|
||||
eventcause);
|
||||
goto done;
|
||||
}
|
||||
|
@ -1777,17 +1832,13 @@ mlan_status wlan_process_event(pmlan_adapter pmadapter)
|
|||
eventcause != EVENT_FW_DUMP_INFO) {
|
||||
PRINTM_GET_SYS_TIME(MEVENT, &in_ts_sec, &in_ts_usec);
|
||||
PRINTM_NETINTF(MEVENT, priv);
|
||||
PRINTM(MEVENT, "%lu.%06lu : Event: 0x%x\n", in_ts_sec,
|
||||
in_ts_usec, eventcause);
|
||||
PRINTM(MEVENT, "%lu.%06lu : Event: %s [0x%x]\n", in_ts_sec,
|
||||
in_ts_usec, wlan_event_get_name(eventcause), eventcause);
|
||||
}
|
||||
|
||||
ret = priv->ops.process_event(priv);
|
||||
done:
|
||||
pmadapter->event_cause = 0;
|
||||
pmadapter->pmlan_buffer_event = MNULL;
|
||||
if (pmbuf)
|
||||
pmadapter->ops.event_complete(pmadapter, pmbuf,
|
||||
MLAN_STATUS_SUCCESS);
|
||||
pmadapter->ops.event_complete(pmadapter, pmbuf, MLAN_STATUS_SUCCESS);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -2063,7 +2114,8 @@ t_void wlan_insert_cmd_to_pending_q(mlan_adapter *pmadapter,
|
|||
}
|
||||
|
||||
PRINTM_NETINTF(MCMND, pcmd_node->priv);
|
||||
PRINTM(MCMND, "QUEUE_CMD: cmd=0x%x is queued\n", command);
|
||||
PRINTM(MCMND, "QUEUE_CMD: %s [0x%x] is queued\n",
|
||||
wlan_hostcmd_get_name(command), command);
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
|
@ -2147,6 +2199,48 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command error in pre_asleep state
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void wlan_handle_cmd_error_in_pre_aleep(mlan_adapter *pmadapter, t_u16 cmd_no)
|
||||
{
|
||||
cmd_ctrl_node *pcmd_node = MNULL;
|
||||
ENTER();
|
||||
PRINTM(MERROR, "CMD_RESP: 0x%x block in pre_asleep!\n", cmd_no);
|
||||
wlan_request_cmd_lock(pmadapter);
|
||||
pcmd_node = pmadapter->curr_cmd;
|
||||
pmadapter->curr_cmd = MNULL;
|
||||
if (pcmd_node) {
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
pcmd_node->cmdbuf->data_offset += MLAN_TYPE_LEN;
|
||||
pcmd_node->cmdbuf->data_len -= MLAN_TYPE_LEN;
|
||||
}
|
||||
#endif
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
if (!IS_USB(pmadapter->card_type)) {
|
||||
pcmd_node->cmdbuf->data_offset +=
|
||||
pmadapter->ops.intf_header_len;
|
||||
pcmd_node->cmdbuf->data_len -=
|
||||
pmadapter->ops.intf_header_len;
|
||||
}
|
||||
#endif
|
||||
if (pcmd_node->respbuf) {
|
||||
pmadapter->ops.cmdrsp_complete(pmadapter,
|
||||
pcmd_node->respbuf,
|
||||
MLAN_STATUS_SUCCESS);
|
||||
pcmd_node->respbuf = MNULL;
|
||||
}
|
||||
wlan_insert_cmd_to_pending_q(pmadapter, pcmd_node, MFALSE);
|
||||
}
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response
|
||||
*
|
||||
|
@ -2262,9 +2356,10 @@ mlan_status wlan_process_cmdresp(mlan_adapter *pmadapter)
|
|||
PRINTM_GET_SYS_TIME(MCMND, &sec, &usec);
|
||||
PRINTM_NETINTF(MCMND, pmadapter->curr_cmd->priv);
|
||||
PRINTM(MCMND,
|
||||
"CMD_RESP (%lu.%06lu): 0x%x, result %d, len %d, seqno 0x%x\n",
|
||||
sec, usec, orig_cmdresp_no, cmdresp_result, resp->size,
|
||||
resp->seq_num);
|
||||
"CMD_RESP (%lu.%06lu): %s [0x%x], result %d, len %d, seqno 0x%x\n",
|
||||
sec, usec,
|
||||
wlan_hostcmd_get_name(orig_cmdresp_no & ~HostCmd_RET_BIT),
|
||||
orig_cmdresp_no, cmdresp_result, resp->size, resp->seq_num);
|
||||
|
||||
if (!(orig_cmdresp_no & HostCmd_RET_BIT)) {
|
||||
PRINTM(MERROR, "CMD_RESP: Invalid response to command!\n");
|
||||
|
@ -2279,11 +2374,26 @@ mlan_status wlan_process_cmdresp(mlan_adapter *pmadapter)
|
|||
}
|
||||
|
||||
if (pmadapter->curr_cmd->cmd_flag & CMD_F_HOSTCMD) {
|
||||
if (pmadapter->curr_cmd &&
|
||||
cmdresp_result == HostCmd_RESULT_PRE_ASLEEP) {
|
||||
wlan_handle_cmd_error_in_pre_aleep(pmadapter,
|
||||
cmdresp_no);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
pmadapter->curr_cmd->cmd_flag &= ~CMD_F_HOSTCMD;
|
||||
if ((cmdresp_result == HostCmd_RESULT_OK) &&
|
||||
(cmdresp_no == HostCmd_CMD_802_11_HS_CFG_ENH))
|
||||
ret = wlan_ret_802_11_hs_cfg(pmpriv, resp, pioctl_buf);
|
||||
} else {
|
||||
if (pmadapter->curr_cmd &&
|
||||
cmdresp_result == HostCmd_RESULT_PRE_ASLEEP) {
|
||||
wlan_handle_cmd_error_in_pre_aleep(pmadapter,
|
||||
cmdresp_no);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* handle response */
|
||||
ret = pmpriv->ops.process_cmdresp(pmpriv, cmdresp_no, resp,
|
||||
pioctl_buf);
|
||||
|
@ -2433,9 +2543,9 @@ t_void wlan_cmd_timeout_func(t_void *function_context)
|
|||
pmadapter->dbg.timeout_cmd_act =
|
||||
pmadapter->dbg.last_cmd_act[pmadapter->dbg.last_cmd_index];
|
||||
PRINTM_GET_SYS_TIME(MERROR, &sec, &usec);
|
||||
PRINTM(MERROR, "Timeout cmd id (%lu.%06lu) = 0x%x, act = 0x%x\n", sec,
|
||||
usec, pmadapter->dbg.timeout_cmd_id,
|
||||
pmadapter->dbg.timeout_cmd_act);
|
||||
PRINTM(MERROR, "Timeout cmd id (%lu.%06lu) %s [0x%x], act = 0x%x\n",
|
||||
sec, usec, wlan_hostcmd_get_name(pmadapter->dbg.timeout_cmd_id),
|
||||
pmadapter->dbg.timeout_cmd_id, pmadapter->dbg.timeout_cmd_act);
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
if (!IS_USB(pmadapter->card_type) && pcmd_node->cmdbuf) {
|
||||
t_u8 *pcmd_buf;
|
||||
|
@ -3427,12 +3537,13 @@ t_void wlan_check_ps_cond(mlan_adapter *pmadapter)
|
|||
|
||||
if (!pmadapter->cmd_sent && !pmadapter->curr_cmd &&
|
||||
!pmadapter->keep_wakeup && !wlan_is_tx_pending(pmadapter) &&
|
||||
!IS_CARD_RX_RCVD(pmadapter)) {
|
||||
!pmadapter->event_cause && !IS_CARD_RX_RCVD(pmadapter)) {
|
||||
wlan_dnld_sleep_confirm_cmd(pmadapter);
|
||||
} else {
|
||||
PRINTM(MCMND, "Delay Sleep Confirm (%s%s%s%s)\n",
|
||||
(pmadapter->cmd_sent) ? "D" : "",
|
||||
(pmadapter->curr_cmd) ? "C" : "",
|
||||
(pmadapter->event_cause) ? "V" : "",
|
||||
(wlan_is_tx_pending(pmadapter)) ? "T" : "",
|
||||
(IS_CARD_RX_RCVD(pmadapter)) ? "R" : "");
|
||||
}
|
||||
|
@ -3664,6 +3775,16 @@ mlan_status wlan_cmd_enh_power_mode(pmlan_private pmpriv,
|
|||
psmode_enh->action = wlan_cpu_to_le16(GET_PS);
|
||||
psmode_enh->params.ps_bitmap = wlan_cpu_to_le16(ps_bitmap);
|
||||
cmd->size = wlan_cpu_to_le16(S_DS_GEN + AUTO_PS_FIX_SIZE);
|
||||
} else if (cmd_action == EXT_PS_PARAM) {
|
||||
psmode_enh->action = wlan_cpu_to_le16(EXT_PS_PARAM);
|
||||
psmode_enh->params.ext_param.reserved = 0;
|
||||
cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(t_u16) +
|
||||
sizeof(ext_ps_param));
|
||||
psmode_enh->params.ext_param.param.header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_PS_EXT_PARAM);
|
||||
psmode_enh->params.ext_param.param.header.len = sizeof(t_u32);
|
||||
psmode_enh->params.ext_param.param.mode =
|
||||
wlan_cpu_to_le32(*((t_u32 *)pdata_buf));
|
||||
} else if (cmd_action == EN_AUTO_PS) {
|
||||
psmode_enh->action = wlan_cpu_to_le16(EN_AUTO_PS);
|
||||
psmode_enh->params.auto_ps.ps_bitmap =
|
||||
|
@ -4854,6 +4975,7 @@ mlan_status wlan_adapter_init_cmd(pmlan_adapter pmadapter)
|
|||
#ifdef STA_SUPPORT
|
||||
pmlan_private pmpriv_sta = MNULL;
|
||||
#endif
|
||||
t_u32 mode = BLOCK_CMD_IN_PRE_ASLEEP;
|
||||
ENTER();
|
||||
|
||||
pmpriv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY);
|
||||
|
@ -4862,8 +4984,6 @@ mlan_status wlan_adapter_init_cmd(pmlan_adapter pmadapter)
|
|||
#endif
|
||||
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_RECONFIGURE_TX_BUFF,
|
||||
|
@ -4913,6 +5033,13 @@ mlan_status wlan_adapter_init_cmd(pmlan_adapter pmadapter)
|
|||
}
|
||||
}
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_PS_MODE_ENH,
|
||||
EXT_PS_PARAM, HostCmd_ACT_GEN_SET, MNULL, &mode);
|
||||
if (ret) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
#define DEF_AUTO_NULL_PKT_PERIOD 30
|
||||
if (pmpriv_sta) {
|
||||
t_u32 value = DEF_AUTO_NULL_PKT_PERIOD;
|
||||
|
@ -5397,7 +5524,6 @@ mlan_status wlan_handle_event_multi_chan_info(pmlan_private pmpriv,
|
|||
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
wlan_resync_usb_port(pmadapter);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -5750,56 +5876,6 @@ mlan_status wlan_cmd_get_hw_spec(pmlan_private pmpriv, HostCmd_DS_COMMAND *pcmd)
|
|||
}
|
||||
|
||||
#ifdef SDIO
|
||||
/**
|
||||
* @brief This function prepares command of sdio rx aggr command.
|
||||
*
|
||||
* @param pcmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action Command action: GET or SET
|
||||
* @param pdata_buf A pointer to new setting buf
|
||||
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_cmd_sdio_rx_aggr_cfg(HostCmd_DS_COMMAND *pcmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_SDIO_SP_RX_AGGR_CFG *cfg = &pcmd->params.sdio_rx_aggr;
|
||||
|
||||
pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_SDIO_SP_RX_AGGR_CFG);
|
||||
pcmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_SDIO_SP_RX_AGGR_CFG) +
|
||||
S_DS_GEN);
|
||||
cfg->action = cmd_action;
|
||||
if (pdata_buf && (cmd_action == HostCmd_ACT_GEN_SET))
|
||||
cfg->enable = *(t_u8 *)pdata_buf;
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of sdio rx aggr command
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status wlan_ret_sdio_rx_aggr_cfg(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
HostCmd_DS_SDIO_SP_RX_AGGR_CFG *cfg = &resp->params.sdio_rx_aggr;
|
||||
|
||||
pmadapter->pcard_sd->sdio_rx_aggr_enable = cfg->enable;
|
||||
pmadapter->pcard_sd->sdio_rx_block_size =
|
||||
wlan_le16_to_cpu(cfg->sdio_block_size);
|
||||
PRINTM(MMSG, "SDIO rx aggr: %d block_size=%d\n", cfg->enable,
|
||||
pmadapter->pcard_sd->sdio_rx_block_size);
|
||||
if (!pmadapter->pcard_sd->sdio_rx_block_size)
|
||||
pmadapter->pcard_sd->sdio_rx_aggr_enable = MFALSE;
|
||||
if (pmadapter->pcard_sd->sdio_rx_aggr_enable) {
|
||||
pmadapter->pcard_sd->max_sp_rx_size = SDIO_CMD53_MAX_SIZE;
|
||||
wlan_re_alloc_sdio_rx_mpa_buffer(pmadapter);
|
||||
}
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -6151,22 +6227,6 @@ mlan_status wlan_ret_get_hw_spec(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
if ((pmadapter->fw_cap_info & SDIO_SP_RX_AGGR_ENABLE) &&
|
||||
pmadapter->pcard_sd->sdio_rx_aggr_enable) {
|
||||
t_u8 sdio_sp_rx_aggr = MTRUE;
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_SDIO_SP_RX_AGGR_CFG,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL,
|
||||
&sdio_sp_rx_aggr);
|
||||
if (ret) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
} else {
|
||||
pmadapter->pcard_sd->sdio_rx_aggr_enable = MFALSE;
|
||||
PRINTM(MCMND, "FW: SDIO rx aggr disabled 0x%x\n",
|
||||
pmadapter->fw_cap_info);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef STA_SUPPORT
|
||||
|
@ -6408,8 +6468,14 @@ mlan_status wlan_ret_remain_on_channel(pmlan_private pmpriv,
|
|||
HostCmd_DS_REMAIN_ON_CHANNEL *remain_channel =
|
||||
&resp->params.remain_on_chan;
|
||||
mlan_ds_radio_cfg *radio_cfg = MNULL;
|
||||
t_u16 action = wlan_le16_to_cpu(remain_channel->action);
|
||||
|
||||
ENTER();
|
||||
if (action == HostCmd_ACT_GEN_REMOVE)
|
||||
pmpriv->adapter->remain_on_channel = MFALSE;
|
||||
else
|
||||
pmpriv->adapter->remain_on_channel = MTRUE;
|
||||
|
||||
if (pioctl_buf) {
|
||||
radio_cfg = (mlan_ds_radio_cfg *)pioctl_buf->pbuf;
|
||||
radio_cfg->param.remain_chan.status = remain_channel->status;
|
||||
|
@ -6443,7 +6509,7 @@ mlan_status wlan_cmd_wifi_direct_mode(pmlan_private pmpriv,
|
|||
ENTER();
|
||||
cmd->size = wlan_cpu_to_le16((sizeof(HostCmd_DS_WIFI_DIRECT_MODE)) +
|
||||
S_DS_GEN);
|
||||
cmd->command = wlan_cpu_to_le16(HOST_CMD_WIFI_DIRECT_MODE_CONFIG);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_WIFI_DIRECT_MODE_CONFIG);
|
||||
wfd_mode->action = wlan_cpu_to_le16(cmd_action);
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET)
|
||||
wfd_mode->mode = wlan_cpu_to_le16(mode);
|
||||
|
@ -6502,7 +6568,7 @@ mlan_status wlan_cmd_p2p_params_config(pmlan_private pmpriv,
|
|||
ENTER();
|
||||
|
||||
cmd->size = sizeof(HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG) + S_DS_GEN;
|
||||
cmd->command = wlan_cpu_to_le16(HOST_CMD_P2P_PARAMS_CONFIG);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_P2P_PARAMS_CONFIG);
|
||||
p2p_config->action = wlan_cpu_to_le16(cmd_action);
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
tlv = (t_u8 *)p2p_config->tlv_buf;
|
||||
|
@ -6702,7 +6768,8 @@ mlan_status wlan_cmd_gpio_tsf_latch(pmlan_private pmpriv,
|
|||
ENTER();
|
||||
|
||||
cmd->size = sizeof(HostCmd_DS_GPIO_TSF_LATCH_PARAM_CONFIG) + S_DS_GEN;
|
||||
cmd->command = wlan_cpu_to_le16(HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG);
|
||||
cmd->command =
|
||||
wlan_cpu_to_le16(HostCmd_CMD_GPIO_TSF_LATCH_PARAM_CONFIG);
|
||||
gpio_tsf_config->action = wlan_cpu_to_le16(cmd_action);
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
tlv = (t_u8 *)gpio_tsf_config->tlv_buf;
|
||||
|
@ -7092,7 +7159,7 @@ mlan_status wlan_cmd_tx_rx_pkt_stats(pmlan_private pmpriv,
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
cmd->command = wlan_cpu_to_le16(HOST_CMD_TX_RX_PKT_STATS);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TX_RX_PKT_STATS);
|
||||
cmd->size =
|
||||
wlan_cpu_to_le16(sizeof(HostCmd_DS_TX_RX_HISTOGRAM) + S_DS_GEN);
|
||||
|
||||
|
@ -7334,7 +7401,7 @@ mlan_status wlan_ret_802_11_rf_antenna(pmlan_private pmpriv,
|
|||
wlan_le16_to_cpu(pantenna->action_tx), tx_ant_mode,
|
||||
wlan_le16_to_cpu(pantenna->action_rx), rx_ant_mode);
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
tx_ant_mode &= 0x0303;
|
||||
|
@ -7421,7 +7488,7 @@ mlan_status wlan_cmd_reg_access(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
mac_reg->value = wlan_cpu_to_le32(reg_rw->value);
|
||||
if ((reg_rw->type == MLAN_REG_MAC2) &&
|
||||
(IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type))) {
|
||||
tlv = (MrvlIEtypes_Reg_type_t
|
||||
|
@ -7459,7 +7526,7 @@ mlan_status wlan_cmd_reg_access(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
bbp_reg->value = (t_u8)reg_rw->value;
|
||||
if ((reg_rw->type == MLAN_REG_BBP2) &&
|
||||
(IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type))) {
|
||||
tlv = (MrvlIEtypes_Reg_type_t
|
||||
|
@ -7486,7 +7553,7 @@ mlan_status wlan_cmd_reg_access(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
rf_reg->value = (t_u8)reg_rw->value;
|
||||
if ((reg_rw->type == MLAN_REG_RF2) &&
|
||||
(IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type))) {
|
||||
tlv = (MrvlIEtypes_Reg_type_t
|
||||
|
@ -7548,7 +7615,7 @@ mlan_status wlan_cmd_reg_access(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
bca_reg->value = wlan_cpu_to_le32(reg_rw->value);
|
||||
if ((reg_rw->type == MLAN_REG_BCA2) &&
|
||||
(IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type))) {
|
||||
tlv = (MrvlIEtypes_Reg_type_t
|
||||
|
@ -9115,257 +9182,6 @@ mlan_status wlan_ret_boot_sleep(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
|
||||
/**
|
||||
* @brief This function handles send crypto command
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd Hostcmd ID
|
||||
* @param cmd_action Command action
|
||||
* @param pdata_buf A void pointer to information buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_cmd_crypto(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_u16 *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_CRYPTO *cry_cmd = &cmd->params.crypto_cmd;
|
||||
mlan_ds_sup_cfg *cfg = (mlan_ds_sup_cfg *)pdata_buf;
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
subcmd_prf_hmac_sha1_t *prf_hmac_sha1 = MNULL;
|
||||
subcmd_hmac_sha1_t *hmac_sha1 = MNULL;
|
||||
subcmd_hmac_sha256_t *hmac_sha256 = MNULL;
|
||||
subcmd_sha256_t *sha256 = MNULL;
|
||||
subcmd_rijndael_t *rijndael = MNULL;
|
||||
subcmd_rc4_t *rc4 = MNULL;
|
||||
subcmd_md5_t *md5 = MNULL;
|
||||
subcmd_mrvl_f_t *mrvl_f = MNULL;
|
||||
subcmd_sha256_kdf_t *sha256_kdf = MNULL;
|
||||
t_u8 *ptlv = MNULL;
|
||||
t_u8 tlv_bitmap = 0;
|
||||
t_u32 i = 0;
|
||||
#endif
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_CRYPTO);
|
||||
cmd->size = S_DS_GEN + sizeof(HostCmd_DS_CRYPTO);
|
||||
cry_cmd->action = wlan_cpu_to_le16(cmd_action);
|
||||
cry_cmd->subCmdCode = cfg->sub_command;
|
||||
switch (cfg->sub_command) {
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
case HostCmd_CMD_CRYPTO_SUBCMD_PRF_HMAC_SHA1:
|
||||
tlv_bitmap = BIT_TLV_TYPE_CRYPTO_KEY |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_PREFIX |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK;
|
||||
/* set subcmd start */
|
||||
prf_hmac_sha1 = (subcmd_prf_hmac_sha1_t *)cry_cmd->subCmd;
|
||||
prf_hmac_sha1->output_len = cfg->output_len;
|
||||
/* set tlv start */
|
||||
ptlv = prf_hmac_sha1->tlv;
|
||||
cmd->size += sizeof(subcmd_prf_hmac_sha1_t);
|
||||
break;
|
||||
case HostCmd_CMD_CRYPTO_SUBCMD_HMAC_SHA1:
|
||||
tlv_bitmap = BIT_TLV_TYPE_CRYPTO_KEY |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK;
|
||||
/* set subcmd start */
|
||||
hmac_sha1 = (subcmd_hmac_sha1_t *)cry_cmd->subCmd;
|
||||
hmac_sha1->output_len = cfg->output_len;
|
||||
hmac_sha1->data_blks_nr = cfg->data_blks_nr;
|
||||
/* set tlv start */
|
||||
ptlv = hmac_sha1->tlv;
|
||||
cmd->size += sizeof(subcmd_hmac_sha1_t);
|
||||
break;
|
||||
case HostCmd_CMD_CRYPTO_SUBCMD_HMAC_SHA256:
|
||||
tlv_bitmap = BIT_TLV_TYPE_CRYPTO_KEY |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK;
|
||||
/* set subcmd start */
|
||||
hmac_sha256 = (subcmd_hmac_sha256_t *)cry_cmd->subCmd;
|
||||
hmac_sha256->output_len = cfg->output_len;
|
||||
hmac_sha256->data_blks_nr = cfg->data_blks_nr;
|
||||
/* set tlv start */
|
||||
ptlv = hmac_sha256->tlv;
|
||||
cmd->size += sizeof(subcmd_hmac_sha256_t);
|
||||
break;
|
||||
case HostCmd_CMD_CRYPTO_SUBCMD_SHA256:
|
||||
tlv_bitmap = BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK;
|
||||
/* set subcmd start */
|
||||
sha256 = (subcmd_sha256_t *)cry_cmd->subCmd;
|
||||
sha256->output_len = cfg->output_len;
|
||||
sha256->data_blks_nr = cfg->data_blks_nr;
|
||||
/* set tlv start */
|
||||
ptlv = sha256->tlv;
|
||||
cmd->size += sizeof(subcmd_sha256_t);
|
||||
break;
|
||||
case HostCmd_CMD_CRYPTO_SUBCMD_RIJNDAEL:
|
||||
tlv_bitmap = BIT_TLV_TYPE_CRYPTO_KEY |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK;
|
||||
/* set subcmd start */
|
||||
rijndael = (subcmd_rijndael_t *)cry_cmd->subCmd;
|
||||
rijndael->sub_action_code = cfg->sub_action_code;
|
||||
rijndael->output_len = cfg->output_len;
|
||||
/* set tlv start */
|
||||
ptlv = rijndael->tlv;
|
||||
cmd->size += sizeof(subcmd_rijndael_t);
|
||||
break;
|
||||
case HostCmd_CMD_CRYPTO_SUBCMD_RC4:
|
||||
tlv_bitmap = BIT_TLV_TYPE_CRYPTO_KEY |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_IV |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK;
|
||||
/* set subcmd start */
|
||||
rc4 = (subcmd_rc4_t *)cry_cmd->subCmd;
|
||||
rc4->skip_bytes = cfg->skip_bytes;
|
||||
rc4->output_len = cfg->output_len;
|
||||
/* set tlv start */
|
||||
ptlv = rc4->tlv;
|
||||
cmd->size += sizeof(subcmd_rc4_t);
|
||||
break;
|
||||
case HostCmd_CMD_CRYPTO_SUBCMD_MD5:
|
||||
tlv_bitmap = BIT_TLV_TYPE_CRYPTO_KEY |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK;
|
||||
/* set subcmd start */
|
||||
md5 = (subcmd_md5_t *)cry_cmd->subCmd;
|
||||
md5->output_len = cfg->output_len;
|
||||
/* set tlv start */
|
||||
ptlv = md5->tlv;
|
||||
cmd->size += sizeof(subcmd_md5_t);
|
||||
break;
|
||||
case HostCmd_CMD_CRYPTO_SUBCMD_MRVL_F:
|
||||
tlv_bitmap = BIT_TLV_TYPE_CRYPTO_KEY |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK;
|
||||
/* set subcmd start */
|
||||
mrvl_f = (subcmd_mrvl_f_t *)cry_cmd->subCmd;
|
||||
mrvl_f->iterations = cfg->iteration;
|
||||
mrvl_f->count = cfg->count;
|
||||
mrvl_f->output_len = cfg->output_len;
|
||||
/* set tlv start */
|
||||
ptlv = mrvl_f->tlv;
|
||||
cmd->size += sizeof(subcmd_mrvl_f_t);
|
||||
break;
|
||||
case HostCmd_CMD_CRYPTO_SUBCMD_SHA256_KDF:
|
||||
tlv_bitmap = BIT_TLV_TYPE_CRYPTO_KEY |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_PREFIX |
|
||||
BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK;
|
||||
/* set subcmd start */
|
||||
sha256_kdf = (subcmd_sha256_kdf_t *)cry_cmd->subCmd;
|
||||
sha256_kdf->output_len = cfg->output_len;
|
||||
/* set tlv start */
|
||||
ptlv = sha256_kdf->tlv;
|
||||
cmd->size += sizeof(subcmd_sha256_kdf_t);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
/* add tlv */
|
||||
if (tlv_bitmap & BIT_TLV_TYPE_CRYPTO_KEY) {
|
||||
((MrvlIEParamSet_t *)ptlv)->Type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_CRYPTO_KEY);
|
||||
((MrvlIEParamSet_t *)ptlv)->Length =
|
||||
wlan_cpu_to_le16(cfg->key_len);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
(t_u8 *)ptlv + sizeof(MrvlIEParamSet_t), cfg->key,
|
||||
cfg->key_len, cfg->key_len);
|
||||
cmd->size += cfg->key_len + sizeof(MrvlIEParamSet_t);
|
||||
ptlv += cfg->key_len + sizeof(MrvlIEParamSet_t);
|
||||
}
|
||||
|
||||
if (tlv_bitmap & BIT_TLV_TYPE_CRYPTO_KEY_PREFIX) {
|
||||
((MrvlIEParamSet_t *)ptlv)->Type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_CRYPTO_KEY_PREFIX);
|
||||
((MrvlIEParamSet_t *)ptlv)->Length =
|
||||
wlan_cpu_to_le16(cfg->key_prefix_len);
|
||||
memcpy_ext(pmpriv->adapter, ptlv + sizeof(MrvlIEParamSet_t),
|
||||
cfg->key_prefix, cfg->key_prefix_len,
|
||||
cfg->key_prefix_len);
|
||||
cmd->size += cfg->key_prefix_len + sizeof(MrvlIEParamSet_t);
|
||||
ptlv += cfg->key_prefix_len + sizeof(MrvlIEParamSet_t);
|
||||
}
|
||||
|
||||
if (tlv_bitmap & BIT_TLV_TYPE_CRYPTO_KEY_IV) {
|
||||
((MrvlIEParamSet_t *)ptlv)->Type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_CRYPTO_KEY_IV);
|
||||
((MrvlIEParamSet_t *)ptlv)->Length =
|
||||
wlan_cpu_to_le16(cfg->key_iv_len);
|
||||
memcpy_ext(pmpriv->adapter, ptlv + sizeof(MrvlIEParamSet_t),
|
||||
cfg->key_iv, cfg->key_iv_len, cfg->key_iv_len);
|
||||
cmd->size += cfg->key_iv_len + sizeof(MrvlIEParamSet_t);
|
||||
ptlv += cfg->key_iv_len + sizeof(MrvlIEParamSet_t);
|
||||
}
|
||||
|
||||
if (tlv_bitmap & BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK) {
|
||||
t_u16 data_blk_len = 0;
|
||||
t_u8 *pdata_blk = MNULL;
|
||||
for (i = 0; i < cfg->data_blks_nr; i++) {
|
||||
data_blk_len = *(cfg->key_data_blk_len + i);
|
||||
pdata_blk = *(cfg->key_data_blk + i);
|
||||
((MrvlIEParamSet_t *)ptlv)->Type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_CRYPTO_KEY_DATA_BLK);
|
||||
((MrvlIEParamSet_t *)ptlv)->Length =
|
||||
wlan_cpu_to_le16(data_blk_len);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
ptlv + sizeof(MrvlIEParamSet_t), pdata_blk,
|
||||
data_blk_len, data_blk_len);
|
||||
cmd->size += data_blk_len + sizeof(MrvlIEParamSet_t);
|
||||
ptlv += data_blk_len + sizeof(MrvlIEParamSet_t);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
HEXDUMP("HostCmd_DS_COMMAND wlan_cmd_crypto", cmd, cmd->size);
|
||||
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of crypto command
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||
* @param pioctl_buf A pointer to mlan_ioctl_req structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_ret_crypto(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
HostCmd_DS_CRYPTO *crypto_cmd = &resp->params.crypto_cmd;
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
mlan_callbacks *pcb = (pmlan_callbacks)&pmadapter->callbacks;
|
||||
mlan_ds_sup_cfg *cfg = (mlan_ds_sup_cfg *)pioctl_buf->pbuf;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
if (!cfg) {
|
||||
PRINTM(MERROR, "wlan_ret_crypto cfg is null \n");
|
||||
goto done;
|
||||
}
|
||||
if (resp->result == HostCmd_RESULT_OK) {
|
||||
/* copy the result */
|
||||
memcpy_ext(pmpriv->adapter, cfg->output,
|
||||
(t_u8 *)crypto_cmd + sizeof(HostCmd_DS_CRYPTO) +
|
||||
sizeof(cfg->output_len),
|
||||
cfg->output_len, cfg->output_len);
|
||||
}
|
||||
|
||||
/* Prevent the ioctl from completing when the cmd is freed */
|
||||
if (cfg->call_back) {
|
||||
pmadapter->curr_cmd->pioctl_buf = MNULL;
|
||||
/* trigger wait q */
|
||||
pcb->moal_notify_hostcmd_complete(pmadapter->pmoal_handle,
|
||||
pmpriv->bss_index);
|
||||
}
|
||||
#endif
|
||||
done:
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function prepares command of mac_address.
|
||||
*
|
||||
|
@ -9594,6 +9410,142 @@ mlan_status wlan_cmd_rxabortcfg_ext(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command of nav mitigation
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action the action: GET or SET
|
||||
* @param pdata_buf A pointer to data buffer
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_cmd_nav_mitigation(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action,
|
||||
t_void *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_CMD_NAV_MITIGATION_CFG *cfg_cmd =
|
||||
(HostCmd_DS_CMD_NAV_MITIGATION_CFG *)&cmd->params.nav_mitigation;
|
||||
mlan_ds_misc_nav_mitigation *cfg =
|
||||
(mlan_ds_misc_nav_mitigation *)pdata_buf;
|
||||
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_NAV_MITIGATION_CFG);
|
||||
cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_CMD_NAV_MITIGATION_CFG) +
|
||||
S_DS_GEN);
|
||||
cfg_cmd->action = wlan_cpu_to_le16(cmd_action);
|
||||
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
cfg_cmd->start_nav_mitigation =
|
||||
wlan_cpu_to_le16(cfg->start_nav_mitigation);
|
||||
cfg_cmd->threshold = wlan_cpu_to_le16(cfg->threshold);
|
||||
cfg_cmd->detect_cnt = wlan_cpu_to_le16(cfg->detect_cnt);
|
||||
cfg_cmd->stop_cnt = wlan_cpu_to_le16(cfg->stop_cnt);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command of LED config parameter
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action the action: GET or SET
|
||||
* @param pdata_buf A pointer to data buffer
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_cmd_led_config(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf)
|
||||
{
|
||||
int count = 0;
|
||||
HostCmd_DS_CMD_LED_CFG *cfg_cmd = &cmd->params.ledcntrcfg;
|
||||
t_u8 *tlv = MNULL;
|
||||
t_u16 cmd_size = 0;
|
||||
int i = 0;
|
||||
mlan_ds_misc_led_cfg *cfg = (mlan_ds_misc_led_cfg *)pdata_buf;
|
||||
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_LED_CONTROL);
|
||||
cfg_cmd->action = wlan_cpu_to_le16(cmd_action);
|
||||
cmd_size = S_DS_GEN + sizeof(HostCmd_DS_CMD_LED_CFG);
|
||||
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
cfg_cmd->enable = wlan_cpu_to_le16(cfg->enable);
|
||||
count = cfg->led_cfg_len;
|
||||
if (count != 0) {
|
||||
tlv = (t_u8 *)cmd + cmd_size;
|
||||
while (i < count) {
|
||||
MrvlIEtypes_led_behavior_t *led_tlv =
|
||||
(MrvlIEtypes_led_behavior_t *)tlv;
|
||||
|
||||
led_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_LEDBEHAVIOR);
|
||||
led_tlv->header.len = wlan_cpu_to_le16(
|
||||
sizeof(MrvlIEtypes_led_behavior_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
led_tlv->firmwarestate = wlan_cpu_to_le16(
|
||||
cfg->misc_led_behvr[i].firmwarestate);
|
||||
led_tlv->ledstate = wlan_cpu_to_le16(
|
||||
cfg->misc_led_behvr[i].ledstate);
|
||||
led_tlv->ledargs = wlan_cpu_to_le16(
|
||||
cfg->misc_led_behvr[i].ledargs);
|
||||
cmd_size += sizeof(MrvlIEtypes_led_behavior_t);
|
||||
i++;
|
||||
if (i != count) {
|
||||
tlv += sizeof(
|
||||
MrvlIEtypes_led_behavior_t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cmd->size = wlan_cpu_to_le16(cmd_size);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of led config
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||
* @param pioctl_buf A pointer to mlan_ioctl_req structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_ret_led_config(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)(pioctl_buf->pbuf);
|
||||
mlan_ds_misc_led_cfg *mlan_led_cfg = &(misc->param.led_config);
|
||||
t_u8 *tlv = MNULL;
|
||||
int left_len = 0, i = 0;
|
||||
t_u32 cmdrsp_len = wlan_le16_to_cpu(resp->size);
|
||||
ENTER();
|
||||
|
||||
if ((cmdrsp_len < S_DS_GEN) ||
|
||||
(cmdrsp_len - S_DS_GEN < sizeof(HostCmd_DS_CMD_LED_CFG)))
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
||||
mlan_led_cfg->enable = resp->params.ledcntrcfg.enable;
|
||||
left_len = cmdrsp_len - (S_DS_GEN + sizeof(HostCmd_DS_CMD_LED_CFG));
|
||||
|
||||
tlv = (t_u8 *)resp + (S_DS_GEN + sizeof(HostCmd_DS_CMD_LED_CFG));
|
||||
for (i = 0; i < MAX_FW_STATES; i++) {
|
||||
mlan_led_cfg->misc_led_behvr[i].firmwarestate = *tlv;
|
||||
tlv++;
|
||||
tlv++; // to skip reserved byte
|
||||
mlan_led_cfg->misc_led_behvr[i].ledstate = *tlv;
|
||||
tlv++;
|
||||
mlan_led_cfg->misc_led_behvr[i].ledargs = *tlv;
|
||||
tlv++;
|
||||
}
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of Rx Abort Cfg ext
|
||||
*
|
||||
|
@ -9634,6 +9586,41 @@ mlan_status wlan_ret_rxabortcfg_ext(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of nav mitigation
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||
* @param pioctl_buf A pointer to mlan_ioctl_req structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_ret_nav_mitigation(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
HostCmd_DS_CMD_NAV_MITIGATION_CFG *cfg_cmd =
|
||||
(HostCmd_DS_CMD_NAV_MITIGATION_CFG *)&resp->params
|
||||
.nav_mitigation;
|
||||
mlan_ds_misc_cfg *misc_cfg = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_buf) {
|
||||
misc_cfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||
misc_cfg->param.nav_mitigation.start_nav_mitigation =
|
||||
wlan_le16_to_cpu(cfg_cmd->start_nav_mitigation);
|
||||
misc_cfg->param.nav_mitigation.threshold =
|
||||
wlan_le16_to_cpu(cfg_cmd->threshold);
|
||||
misc_cfg->param.nav_mitigation.detect_cnt =
|
||||
wlan_le16_to_cpu(cfg_cmd->detect_cnt);
|
||||
misc_cfg->param.nav_mitigation.stop_cnt =
|
||||
wlan_le16_to_cpu(cfg_cmd->stop_cnt);
|
||||
}
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function sets the hal/phy cfg params
|
||||
*
|
||||
|
@ -10056,7 +10043,7 @@ mlan_status wlan_cmd_get_chan_trpc_config(pmlan_private pmpriv,
|
|||
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CHANNEL_TRPC_CONFIG);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_CHANNEL_TRPC_CONFIG);
|
||||
trpc_cfg->action = wlan_cpu_to_le16(cmd_action);
|
||||
cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_CHANNEL_TRPC_CONFIG) +
|
||||
S_DS_GEN);
|
||||
|
@ -10339,7 +10326,7 @@ mlan_status wlan_cmd_get_sensor_temp(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_DS_GET_SENSOR_TEMP);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_DS_GET_SENSOR_TEMP);
|
||||
cmd->size = wlan_cpu_to_le16(S_DS_GEN + 4);
|
||||
|
||||
LEAVE();
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define _MLAN_DECL_H_
|
||||
|
||||
/** MLAN release version */
|
||||
#define MLAN_RELEASE_VERSION "391.p3"
|
||||
#define MLAN_RELEASE_VERSION "408"
|
||||
|
||||
/** Re-define generic data types for MLAN/MOAL */
|
||||
/** Signed char (1-byte) */
|
||||
|
@ -157,6 +157,10 @@ typedef t_s32 t_sval;
|
|||
/** This is current limit on Maximum Rx AMPDU allowed */
|
||||
#define MLAN_MAX_RX_BASTREAM_SUPPORTED 16
|
||||
|
||||
#ifndef UINT_MAX
|
||||
#define UINT_MAX (~0U)
|
||||
#endif
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/** Default Win size attached during ADDBA request */
|
||||
#define MLAN_STA_AMPDU_DEF_TXWINSIZE 64
|
||||
|
@ -269,6 +273,10 @@ typedef t_s32 t_sval;
|
|||
/** pcie inband reset */
|
||||
#define FW_RELOAD_PCIE_INBAND_RESET 6
|
||||
|
||||
#ifdef PCIE
|
||||
/* Interrupt type */
|
||||
enum { RX_DATA, RX_EVENT, TX_COMPLETE, RX_CMD_RESP };
|
||||
#endif
|
||||
#ifdef USB
|
||||
#define MLAN_USB_BLOCK_SIZE (512)
|
||||
#define MLAN_USB_AGGR_MODE_NUM (0)
|
||||
|
@ -374,7 +382,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
/** 8801 card type */
|
||||
#define CARD_TYPE_8801 0x0a
|
||||
/** OWL card type */
|
||||
#define CARD_TYPE_IW62X 0x0b
|
||||
#define CARD_TYPE_IW624 0x0b
|
||||
/** Black bird card type */
|
||||
#define CARD_TYPE_AW693 0x0c
|
||||
|
||||
|
@ -408,9 +416,9 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_SD9177 (CARD_TYPE_9177 | (INTF_SD << 8))
|
||||
/** SD8801 card type */
|
||||
#define CARD_TYPE_SD8801 (CARD_TYPE_8801 | (INTF_SD << 8))
|
||||
/** SD_IW62X card type */
|
||||
#define CARD_TYPE_SDIW62X (CARD_TYPE_IW62X | (INTF_SD << 8))
|
||||
/** SD_IW62X card type */
|
||||
/** SD_IW624 card type */
|
||||
#define CARD_TYPE_SDIW624 (CARD_TYPE_IW624 | (INTF_SD << 8))
|
||||
/** SD_IW624 card type */
|
||||
#define CARD_TYPE_SDAW693 (CARD_TYPE_AW693 | (INTF_SD << 8))
|
||||
|
||||
#define IS_SD8887(ct) (CARD_TYPE_SD8887 == (ct))
|
||||
|
@ -423,7 +431,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_SD9098(ct) (CARD_TYPE_SD9098 == (ct))
|
||||
#define IS_SD9177(ct) (CARD_TYPE_SD9177 == (ct))
|
||||
#define IS_SD8801(ct) (CARD_TYPE_SD8801 == (ct))
|
||||
#define IS_SDIW62X(ct) (CARD_TYPE_SDIW62X == (ct))
|
||||
#define IS_SDIW624(ct) (CARD_TYPE_SDIW624 == (ct))
|
||||
#define IS_SDAW693(ct) (CARD_TYPE_SDAW693 == (ct))
|
||||
|
||||
/** SD8887 Card */
|
||||
|
@ -446,8 +454,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_SD9177 "SDIW612"
|
||||
/** SD8801 Card */
|
||||
#define CARD_SD8801 "SD8801"
|
||||
/** SDIW62X Card */
|
||||
#define CARD_SDIW62X "SDIW62X"
|
||||
/** SDIW624 Card */
|
||||
#define CARD_SDIW624 "SDIW624"
|
||||
/** SDAW693 Card */
|
||||
#define CARD_SDAW693 "SDAW693"
|
||||
#endif
|
||||
|
@ -461,8 +469,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_PCIE9097 (CARD_TYPE_9097 | (INTF_PCIE << 8))
|
||||
/** PCIE9098 card type */
|
||||
#define CARD_TYPE_PCIE9098 (CARD_TYPE_9098 | (INTF_PCIE << 8))
|
||||
/** PCIEIW62X card type */
|
||||
#define CARD_TYPE_PCIEIW62X (CARD_TYPE_IW62X | (INTF_PCIE << 8))
|
||||
/** PCIEIW624 card type */
|
||||
#define CARD_TYPE_PCIEIW624 (CARD_TYPE_IW624 | (INTF_PCIE << 8))
|
||||
/** PCIEAW693 card type */
|
||||
#define CARD_TYPE_PCIEAW693 (CARD_TYPE_AW693 | (INTF_PCIE << 8))
|
||||
|
||||
|
@ -470,7 +478,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_PCIE8997(ct) (CARD_TYPE_PCIE8997 == (ct))
|
||||
#define IS_PCIE9097(ct) (CARD_TYPE_PCIE9097 == (ct))
|
||||
#define IS_PCIE9098(ct) (CARD_TYPE_PCIE9098 == (ct))
|
||||
#define IS_PCIEIW62X(ct) (CARD_TYPE_PCIEIW62X == (ct))
|
||||
#define IS_PCIEIW624(ct) (CARD_TYPE_PCIEIW624 == (ct))
|
||||
#define IS_PCIEAW693(ct) (CARD_TYPE_PCIEAW693 == (ct))
|
||||
|
||||
/** PCIE8897 Card */
|
||||
|
@ -485,8 +493,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_PCIE9098 "PCIE9098"
|
||||
/** PCIEAW690 Card */
|
||||
#define CARD_PCIEAW690 "PCIEAW690"
|
||||
/** PCIEIW62X Card */
|
||||
#define CARD_PCIEIW62X "PCIEIW62X"
|
||||
/** PCIEIW624 Card */
|
||||
#define CARD_PCIEIW624 "PCIEIW624"
|
||||
/** PCIEAW693 Card */
|
||||
#define CARD_PCIEAW693 "PCIEAW693"
|
||||
/** PCIEIW629 Card */
|
||||
|
@ -506,8 +514,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_USB9098 (CARD_TYPE_9098 | (INTF_USB << 8))
|
||||
/** USB9097 card type */
|
||||
#define CARD_TYPE_USB9097 (CARD_TYPE_9097 | (INTF_USB << 8))
|
||||
/** USBIW62X card type */
|
||||
#define CARD_TYPE_USBIW62X (CARD_TYPE_IW62X | (INTF_USB << 8))
|
||||
/** USBIW624 card type */
|
||||
#define CARD_TYPE_USBIW624 (CARD_TYPE_IW624 | (INTF_USB << 8))
|
||||
|
||||
#define IS_USB8801(ct) (CARD_TYPE_USB8801 == (ct))
|
||||
#define IS_USB8897(ct) (CARD_TYPE_USB8897 == (ct))
|
||||
|
@ -515,7 +523,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_USB8978(ct) (CARD_TYPE_USB8978 == (ct))
|
||||
#define IS_USB9098(ct) (CARD_TYPE_USB9098 == (ct))
|
||||
#define IS_USB9097(ct) (CARD_TYPE_USB9097 == (ct))
|
||||
#define IS_USBIW62X(ct) (CARD_TYPE_USBIW62X == (ct))
|
||||
#define IS_USBIW624(ct) (CARD_TYPE_USBIW624 == (ct))
|
||||
|
||||
/** USB8801 Card */
|
||||
#define CARD_USB8801 "USB8801"
|
||||
|
@ -529,8 +537,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_USB9098 "USB9098"
|
||||
/** USB9097 Card */
|
||||
#define CARD_USB9097 "USBIW620"
|
||||
/** USBIW62X Card */
|
||||
#define CARD_USBIW62X "USBIW62X"
|
||||
/** USBIW624 Card */
|
||||
#define CARD_USBIW624 "USBIW624"
|
||||
#endif
|
||||
|
||||
#define IS_CARD8801(ct) (CARD_TYPE_8801 == ((ct)&0xf))
|
||||
|
@ -542,7 +550,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_CARD9098(ct) (CARD_TYPE_9098 == ((ct)&0xf))
|
||||
#define IS_CARD9097(ct) (CARD_TYPE_9097 == ((ct)&0xf))
|
||||
#define IS_CARD9177(ct) (CARD_TYPE_9177 == ((ct)&0xf))
|
||||
#define IS_CARDIW62X(ct) (CARD_TYPE_IW62X == ((ct)&0xf))
|
||||
#define IS_CARDIW624(ct) (CARD_TYPE_IW624 == ((ct)&0xf))
|
||||
#define IS_CARDAW693(ct) (CARD_TYPE_AW693 == ((ct)&0xf))
|
||||
|
||||
typedef struct _card_type_entry {
|
||||
|
@ -613,8 +621,6 @@ typedef enum {
|
|||
|
||||
#define MLAN_BUF_FLAG_TX_CTRL MBIT(14)
|
||||
|
||||
#define MLAN_BUF_FLAG_EASYMESH MBIT(16)
|
||||
|
||||
#define MLAN_BUF_FLAG_MC_AGGR_PKT MBIT(17)
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
|
@ -701,7 +707,6 @@ typedef enum _mlan_buf_type {
|
|||
MLAN_BUF_TYPE_EVENT,
|
||||
MLAN_BUF_TYPE_RAW_DATA,
|
||||
#ifdef SDIO
|
||||
MLAN_BUF_TYPE_SPA_DATA,
|
||||
#endif
|
||||
} mlan_buf_type;
|
||||
|
||||
|
@ -844,6 +849,13 @@ typedef enum _mlan_event_id {
|
|||
MLAN_EVENT_ID_DRV_DISCONNECT_LOGGER = 0x80000028,
|
||||
MLAN_EVENT_ID_DRV_WIFI_STATUS = 0x80000029,
|
||||
MLAN_EVENT_ID_STORE_HOST_CMD_RESP = 0x80000030,
|
||||
MLAN_EVENT_ID_DRV_ADDBA_TIMEOUT = 0x80000031,
|
||||
#ifdef PCIE
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_DATA = 0x80000032,
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_EVENT = 0x80000033,
|
||||
MLAN_EVENT_ID_DRV_DEFER_CMDRESP = 0x80000034,
|
||||
MLAN_EVENT_ID_DRV_DEFER_TX_COMPLTE = 0x80000035,
|
||||
#endif
|
||||
} mlan_event_id;
|
||||
|
||||
/** Data Structures */
|
||||
|
@ -985,14 +997,14 @@ typedef enum _dfs_moe_t {
|
|||
/** Band_Config_t */
|
||||
typedef MLAN_PACK_START struct _Band_Config_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=user*/
|
||||
t_u8 scanMode : 2;
|
||||
/** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */
|
||||
t_u8 chan2Offset : 2;
|
||||
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
|
||||
t_u8 chanWidth : 2;
|
||||
/** Band Info - (00)=2.4GHz, (01)=5GHz, (10)=6GHz */
|
||||
t_u8 chanBand : 2;
|
||||
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=user*/
|
||||
t_u8 scanMode : 2;
|
||||
/** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */
|
||||
t_u8 chan2Offset : 2;
|
||||
#else
|
||||
/** Band Info - (00)=2.4GHz, (01)=5GHz, (10)=6GHz */
|
||||
t_u8 chanBand : 2;
|
||||
|
@ -1323,8 +1335,6 @@ typedef struct _mlan_buffer {
|
|||
t_u32 extra_ts_sec;
|
||||
/** Time stamp when packet is dequed from rx_q(micro seconds) */
|
||||
t_u32 extra_ts_usec;
|
||||
/** When TX ra mac address, When Rx Ta mac address*/
|
||||
t_u8 mac[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Fields below are valid for MLAN module only */
|
||||
/** Pointer to parent mlan_buffer */
|
||||
struct _mlan_buffer *pparent;
|
||||
|
@ -1715,6 +1725,14 @@ typedef struct _tdls_tear_down_event {
|
|||
t_u16 reason_code;
|
||||
} tdls_tear_down_event;
|
||||
|
||||
/** Event structure for addba timeout */
|
||||
typedef struct _addba_timeout_event {
|
||||
/** Peer mac address */
|
||||
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Tid */
|
||||
t_u8 tid;
|
||||
} addba_timeout_event;
|
||||
|
||||
/** channel width */
|
||||
typedef enum wifi_channel_width {
|
||||
WIFI_CHAN_WIDTH_20 = 0,
|
||||
|
@ -2516,12 +2534,6 @@ typedef struct _mlan_callbacks {
|
|||
t_void (*moal_updata_peer_signal)(t_void *pmoal, t_u32 bss_index,
|
||||
t_u8 *peer_addr, t_s8 snr, t_s8 nflr);
|
||||
t_u64 (*moal_do_div)(t_u64 num, t_u32 base);
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
mlan_status (*moal_wait_hostcmd_complete)(t_void *pmoal,
|
||||
t_u32 bss_index);
|
||||
mlan_status (*moal_notify_hostcmd_complete)(t_void *pmoal,
|
||||
t_u32 bss_index);
|
||||
#endif
|
||||
void (*moal_tp_accounting)(t_void *pmoal, t_void *buf,
|
||||
t_u32 drop_point);
|
||||
void (*moal_tp_accounting_rx_param)(t_void *pmoal, unsigned int type,
|
||||
|
@ -2610,8 +2622,6 @@ typedef struct _mlan_device {
|
|||
/** SDIO MPA Rx */
|
||||
t_u32 mpa_rx_cfg;
|
||||
#ifdef SDIO
|
||||
/** SDIO Single port rx aggr */
|
||||
t_u8 sdio_rx_aggr_enable;
|
||||
/* see blk_queue_max_segment_size */
|
||||
t_u32 max_seg_size;
|
||||
/* see blk_queue_max_segments */
|
||||
|
@ -2680,6 +2690,8 @@ typedef struct _mlan_device {
|
|||
t_u8 mcs32;
|
||||
/** second mac flag */
|
||||
t_u8 second_mac;
|
||||
/** napi */
|
||||
t_u8 napi;
|
||||
} mlan_device, *pmlan_device;
|
||||
|
||||
/** MLAN API function prototype */
|
||||
|
@ -2760,6 +2772,9 @@ MLAN_API t_u8 mlan_select_wmm_queue(t_void *padapter, t_u8 bss_num, t_u8 tid);
|
|||
MLAN_API mlan_status mlan_disable_host_int(t_void *padapter);
|
||||
/** mlan unmask host interrupt */
|
||||
MLAN_API mlan_status mlan_enable_host_int(t_void *padapter);
|
||||
#ifdef PCIE
|
||||
MLAN_API void mlan_process_pcie_interrupt_cb(t_void *pmadapter, int type);
|
||||
#endif
|
||||
|
||||
#define CSI_SIGNATURE 0xABCD
|
||||
|
||||
|
|
217
mxm_wifiex/wlan_src/mlan/mlan_event_ids.h
Normal file
217
mxm_wifiex/wlan_src/mlan/mlan_event_ids.h
Normal file
|
@ -0,0 +1,217 @@
|
|||
/** @file mlan_event_ids.h
|
||||
*
|
||||
* @brief This file contains FW event ID definitions.
|
||||
*
|
||||
*
|
||||
* Copyright 2023 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
/* include guard is absent intentionally */
|
||||
|
||||
/* FW -> Host Event ID Constants */
|
||||
|
||||
/** Card Event definition : Dummy host wakeup signal */
|
||||
ENUM_ELEMENT(EVENT_DUMMY_HOST_WAKEUP_SIGNAL, 0x0001),
|
||||
/** Card Event definition : Link lost */
|
||||
ENUM_ELEMENT(EVENT_LINK_LOST, 0x0003),
|
||||
/** Card Event definition : Link sensed */
|
||||
ENUM_ELEMENT(EVENT_LINK_SENSED, 0x0004),
|
||||
/** Card Event definition : MIB changed */
|
||||
ENUM_ELEMENT(EVENT_MIB_CHANGED, 0x0006),
|
||||
/** Card Event definition : Init done */
|
||||
ENUM_ELEMENT(EVENT_INIT_DONE, 0x0007),
|
||||
/** Card Event definition : Deauthenticated */
|
||||
ENUM_ELEMENT(EVENT_DEAUTHENTICATED, 0x0008),
|
||||
/** Card Event definition : Disassociated */
|
||||
ENUM_ELEMENT(EVENT_DISASSOCIATED, 0x0009),
|
||||
/** Card Event definition : Power save awake */
|
||||
ENUM_ELEMENT(EVENT_PS_AWAKE, 0x000a),
|
||||
/** Card Event definition : Power save sleep */
|
||||
ENUM_ELEMENT(EVENT_PS_SLEEP, 0x000b),
|
||||
/** Card Event definition : MIC error multicast */
|
||||
ENUM_ELEMENT(EVENT_MIC_ERR_MULTICAST, 0x000d),
|
||||
/** Card Event definition : MIC error unicast */
|
||||
ENUM_ELEMENT(EVENT_MIC_ERR_UNICAST, 0x000e),
|
||||
|
||||
/** Card Event definition : Ad-Hoc BCN lost */
|
||||
ENUM_ELEMENT(EVENT_ADHOC_BCN_LOST, 0x0011),
|
||||
|
||||
/** Card Event definition : Stop Tx */
|
||||
ENUM_ELEMENT(EVENT_STOP_TX, 0x0013),
|
||||
/** Card Event definition : Start Tx */
|
||||
ENUM_ELEMENT(EVENT_START_TX, 0x0014),
|
||||
/** Card Event definition : Channel switch */
|
||||
ENUM_ELEMENT(EVENT_CHANNEL_SWITCH, 0x0015),
|
||||
|
||||
/** Card Event definition : MEAS report ready */
|
||||
ENUM_ELEMENT(EVENT_MEAS_REPORT_RDY, 0x0016),
|
||||
|
||||
/** Card Event definition : WMM status change */
|
||||
ENUM_ELEMENT(EVENT_WMM_STATUS_CHANGE, 0x0017),
|
||||
|
||||
/** Card Event definition : BG scan report */
|
||||
ENUM_ELEMENT(EVENT_BG_SCAN_REPORT, 0x0018),
|
||||
/** Card Event definition : BG scan stopped */
|
||||
ENUM_ELEMENT(EVENT_BG_SCAN_STOPPED, 0x0065),
|
||||
|
||||
/** Card Event definition : Beacon RSSI low */
|
||||
ENUM_ELEMENT(EVENT_RSSI_LOW, 0x0019),
|
||||
/** Card Event definition : Beacon SNR low */
|
||||
ENUM_ELEMENT(EVENT_SNR_LOW, 0x001a),
|
||||
/** Card Event definition : Maximum fail */
|
||||
ENUM_ELEMENT(EVENT_MAX_FAIL, 0x001b),
|
||||
/** Card Event definition : Beacon RSSI high */
|
||||
ENUM_ELEMENT(EVENT_RSSI_HIGH, 0x001c),
|
||||
/** Card Event definition : Beacon SNR high */
|
||||
ENUM_ELEMENT(EVENT_SNR_HIGH, 0x001d),
|
||||
|
||||
/** Card Event definition : IBSS coalsced */
|
||||
ENUM_ELEMENT(EVENT_IBSS_COALESCED, 0x001e),
|
||||
|
||||
/** Event definition : IBSS station connected */
|
||||
ENUM_ELEMENT(EVENT_IBSS_STATION_CONNECT, 0x0020),
|
||||
/** Event definition : IBSS station dis-connected */
|
||||
ENUM_ELEMENT(EVENT_IBSS_STATION_DISCONNECT, 0x0021),
|
||||
|
||||
/** Card Event definition : Data RSSI low */
|
||||
ENUM_ELEMENT(EVENT_DATA_RSSI_LOW, 0x0024),
|
||||
/** Card Event definition : Data SNR low */
|
||||
ENUM_ELEMENT(EVENT_DATA_SNR_LOW, 0x0025),
|
||||
/** Card Event definition : Data RSSI high */
|
||||
ENUM_ELEMENT(EVENT_DATA_RSSI_HIGH, 0x0026),
|
||||
/** Card Event definition : Data SNR high */
|
||||
ENUM_ELEMENT(EVENT_DATA_SNR_HIGH, 0x0027),
|
||||
|
||||
/** Card Event definition : Link Quality */
|
||||
ENUM_ELEMENT(EVENT_LINK_QUALITY, 0x0028),
|
||||
|
||||
/** Card Event definition : Port release event */
|
||||
ENUM_ELEMENT(EVENT_PORT_RELEASE, 0x002b),
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Event ID: STA deauth */
|
||||
ENUM_ELEMENT(EVENT_MICRO_AP_STA_DEAUTH, 0x002c),
|
||||
/** Event ID: STA assoicated */
|
||||
ENUM_ELEMENT(EVENT_MICRO_AP_STA_ASSOC, 0x002d),
|
||||
/** Event ID: BSS started */
|
||||
ENUM_ELEMENT(EVENT_MICRO_AP_BSS_START, 0x002e),
|
||||
/** Event ID: BSS idle event */
|
||||
ENUM_ELEMENT(EVENT_MICRO_AP_BSS_IDLE, 0x0043),
|
||||
/** Event ID: BSS active event */
|
||||
ENUM_ELEMENT(EVENT_MICRO_AP_BSS_ACTIVE, 0x0044),
|
||||
|
||||
/** Event ID: MIC countermeasures event */
|
||||
ENUM_ELEMENT(EVENT_MICRO_AP_MIC_COUNTERMEASURES, 0x004c),
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
/** Card Event definition : Pre-Beacon Lost */
|
||||
ENUM_ELEMENT(EVENT_PRE_BEACON_LOST, 0x0031),
|
||||
|
||||
ENUM_ELEMENT(EVENT_WATCHDOG_TMOUT, 0x0032),
|
||||
|
||||
/** Card Event definition : Add BA event */
|
||||
ENUM_ELEMENT(EVENT_ADDBA, 0x0033),
|
||||
/** Card Event definition : Del BA event */
|
||||
ENUM_ELEMENT(EVENT_DELBA, 0x0034),
|
||||
/** Card Event definition: BA stream timeout*/
|
||||
ENUM_ELEMENT(EVENT_BA_STREAM_TIMEOUT, 0x0037),
|
||||
|
||||
/** Card Event definition : AMSDU aggr control */
|
||||
ENUM_ELEMENT(EVENT_AMSDU_AGGR_CTRL, 0x0042),
|
||||
|
||||
/** Card Event definition: WEP ICV error */
|
||||
ENUM_ELEMENT(EVENT_WEP_ICV_ERR, 0x0046),
|
||||
|
||||
/** Card Event definition : Host sleep enable */
|
||||
ENUM_ELEMENT(EVENT_HS_ACT_REQ, 0x0047),
|
||||
|
||||
/** Card Event definition : BW changed */
|
||||
ENUM_ELEMENT(EVENT_BW_CHANGE, 0x0048),
|
||||
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
/** WIFIDIRECT generic event */
|
||||
ENUM_ELEMENT(EVENT_WIFIDIRECT_GENERIC_EVENT, 0x0049),
|
||||
/** WIFIDIRECT service discovery event */
|
||||
ENUM_ELEMENT(EVENT_WIFIDIRECT_SERVICE_DISCOVERY, 0x004a),
|
||||
#endif
|
||||
/** Remain on Channel expired event */
|
||||
ENUM_ELEMENT(EVENT_REMAIN_ON_CHANNEL_EXPIRED, 0x005f),
|
||||
|
||||
/** TDLS generic event */
|
||||
ENUM_ELEMENT(EVENT_TDLS_GENERIC_EVENT, 0x0052),
|
||||
|
||||
ENUM_ELEMENT(EVENT_MEF_HOST_WAKEUP, 0x004f),
|
||||
|
||||
/** Card Event definition: Channel switch pending announcment */
|
||||
ENUM_ELEMENT(EVENT_CHANNEL_SWITCH_ANN, 0x0050),
|
||||
|
||||
/** Event definition: Radar Detected by card */
|
||||
ENUM_ELEMENT(EVENT_RADAR_DETECTED, 0x0053),
|
||||
|
||||
/** Event definition: Radar Detected by card */
|
||||
ENUM_ELEMENT(EVENT_CHANNEL_REPORT_RDY, 0x0054),
|
||||
|
||||
/** Event definition: Scan results through event */
|
||||
ENUM_ELEMENT(EVENT_EXT_SCAN_REPORT, 0x0058),
|
||||
/** Enhance ext scan done event */
|
||||
ENUM_ELEMENT(EVENT_EXT_SCAN_STATUS_REPORT, 0x007f),
|
||||
|
||||
/** Event definition: RXBA_SYNC */
|
||||
ENUM_ELEMENT(EVENT_RXBA_SYNC, 0x0059),
|
||||
|
||||
/** Event ID: TX data pause event */
|
||||
ENUM_ELEMENT(EVENT_TX_DATA_PAUSE, 0x0055),
|
||||
|
||||
/** Event definition : FW debug information */
|
||||
ENUM_ELEMENT(EVENT_FW_DEBUG_INFO, 0x0063),
|
||||
|
||||
/** Event ID: SAD Report */
|
||||
ENUM_ELEMENT(EVENT_SAD_REPORT, 0x0066),
|
||||
|
||||
/** Event ID: Multi Chan Info*/
|
||||
ENUM_ELEMENT(EVENT_MULTI_CHAN_INFO, 0x006a),
|
||||
|
||||
ENUM_ELEMENT(EVENT_FW_DUMP_INFO, 0x0073),
|
||||
/** Event ID: Tx status */
|
||||
ENUM_ELEMENT(EVENT_TX_STATUS_REPORT, 0x0074),
|
||||
|
||||
ENUM_ELEMENT(EVENT_BT_COEX_WLAN_PARA_CHANGE, 0x0076),
|
||||
|
||||
ENUM_ELEMENT(EVENT_VDLL_IND, 0x0081),
|
||||
|
||||
ENUM_ELEMENT(EVENT_ROAM_OFFLOAD, 0x0083),
|
||||
|
||||
ENUM_ELEMENT(EVENT_WLS_FTM_COMPLETE, 0x0086),
|
||||
|
||||
ENUM_ELEMENT(EVENT_EXCEED_MAX_P2P_CONN, 0x0089),
|
||||
|
||||
#if defined(PCIE)
|
||||
ENUM_ELEMENT(EVENT_SSU_DUMP_DMA, 0x008C),
|
||||
#endif
|
||||
|
||||
ENUM_ELEMENT(EVENT_CSI, 0x008D),
|
||||
ENUM_ELEMENT(EVENT_FW_HANG_REPORT, 0x008F),
|
||||
/** Card Event definition : RESET PN */
|
||||
|
||||
ENUM_ELEMENT(EVENT_ASSOC_REQ_IE, 0x0095),
|
||||
|
||||
ENUM_ELEMENT(EVENT_CHAN_LOAD, 0x0099),
|
||||
|
||||
ENUM_ELEMENT(EVENT_IMD3_CAL_START, 0x00A0),
|
||||
ENUM_ELEMENT(EVENT_IMD3_CAL_END, 0x00A1),
|
||||
|
||||
/* Always keep this last */
|
File diff suppressed because it is too large
Load diff
449
mxm_wifiex/wlan_src/mlan/mlan_hostcmd_ids.h
Normal file
449
mxm_wifiex/wlan_src/mlan/mlan_hostcmd_ids.h
Normal file
|
@ -0,0 +1,449 @@
|
|||
/** @file mlan_hostcmd_ids.h
|
||||
*
|
||||
* @brief This file contains host command ID definitions.
|
||||
*
|
||||
*
|
||||
* Copyright 2023 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
/* include guard is absent intentionally */
|
||||
|
||||
/** Firmware Host Command ID Constants */
|
||||
/** Host Command ID : Get hardware specifications */
|
||||
ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
||||
/** Host Command ID : 802.11 scan */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_SCAN, 0x0006),
|
||||
/** Host Command ID : 802.11 get log */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_GET_LOG, 0x000b),
|
||||
|
||||
/** Host Command id: GET_TX_RX_PKT_STATS */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TX_RX_PKT_STATS, 0x008d),
|
||||
|
||||
/** Host Command ID : 802.11 get/set link layer statistic */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_LINK_STATS, 0x0256),
|
||||
|
||||
/** Host Command ID : MAC multicast address */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MAC_MULTICAST_ADR, 0x0010),
|
||||
/** Host Command ID : 802.11 EEPROM access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_EEPROM_ACCESS, 0x0059),
|
||||
/** Host Command ID : 802.11 associate */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_ASSOCIATE, 0x0012),
|
||||
|
||||
/** Host Command ID : 802.11 SNMP MIB */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_SNMP_MIB, 0x0016),
|
||||
/** Host Command ID : MAC register access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MAC_REG_ACCESS, 0x0019),
|
||||
/** Host Command ID : BBP register access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_BBP_REG_ACCESS, 0x001a),
|
||||
/** Host Command ID : RF register access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_RF_REG_ACCESS, 0x001b),
|
||||
|
||||
/** Host Command ID : 802.11 radio control */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_RADIO_CONTROL, 0x001c),
|
||||
/** Host Command ID : 802.11 RF channel */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_RF_CHANNEL, 0x001d),
|
||||
/** Host Command ID : 802.11 RF Tx power */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_RF_TX_POWER, 0x001e),
|
||||
|
||||
/** Host Command ID : 802.11 RF antenna */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_RF_ANTENNA, 0x0020),
|
||||
|
||||
/** Host Command ID : 802.11 deauthenticate */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_DEAUTHENTICATE, 0x0024),
|
||||
/** Host Command ID: 802.11 disassoicate */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_DISASSOCIATE, 0x0026),
|
||||
/** Host Command ID : MAC control */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MAC_CONTROL, 0x0028),
|
||||
/** Host Command ID : 802.11 Ad-Hoc start */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_AD_HOC_START, 0x002b),
|
||||
/** Host Command ID : 802.11 Ad-Hoc join */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_AD_HOC_JOIN, 0x002c),
|
||||
|
||||
/** Host Command ID: CW Mode */
|
||||
ENUM_ELEMENT(HostCmd_CMD_CW_MODE_CTRL, 0x0239),
|
||||
/** Host Command ID : 802.11 key material */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_KEY_MATERIAL, 0x005e),
|
||||
|
||||
/** Host Command ID : 802.11 Ad-Hoc stop */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_AD_HOC_STOP, 0x0040),
|
||||
|
||||
/** Host Command ID : 802.22 MAC address */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_MAC_ADDRESS, 0x004D),
|
||||
|
||||
/** Host Command ID : LED control config */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_LED_CONTROL, 0x004E),
|
||||
|
||||
/** Host Command ID : WMM Traffic Stream Status */
|
||||
ENUM_ELEMENT(HostCmd_CMD_WMM_TS_STATUS, 0x005d),
|
||||
|
||||
/** Host Command ID : 802.11 D domain information */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11D_DOMAIN_INFO, 0x005b),
|
||||
|
||||
/*This command gets/sets the Transmit Rate-based Power Control (TRPC)
|
||||
* channel configuration.*/
|
||||
ENUM_ELEMENT(HostCmd_CMD_CHANNEL_TRPC_CONFIG, 0x00fb),
|
||||
|
||||
/** Host Command ID : 802.11 TPC information */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_TPC_INFO, 0x005f),
|
||||
/** Host Command ID : 802.11 TPC adapt req */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_TPC_ADAPT_REQ, 0x0060),
|
||||
/** Host Command ID : 802.11 channel SW ann */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_CHAN_SW_ANN, 0x0061),
|
||||
|
||||
/** Host Command ID : Measurement request */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MEASUREMENT_REQUEST, 0x0062),
|
||||
/** Host Command ID : Measurement report */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MEASUREMENT_REPORT, 0x0063),
|
||||
|
||||
/** Host Command ID : 802.11 sleep parameters */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_SLEEP_PARAMS, 0x0066),
|
||||
|
||||
/** Host Command ID : 802.11 ps inactivity timeout */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_PS_INACTIVITY_TIMEOUT, 0x0067),
|
||||
|
||||
/** Host Command ID : 802.11 sleep period */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_SLEEP_PERIOD, 0x0068),
|
||||
|
||||
/** Host Command ID: 802.11 BG scan config */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_BG_SCAN_CONFIG, 0x006b),
|
||||
/** Host Command ID : 802.11 BG scan query */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_BG_SCAN_QUERY, 0x006c),
|
||||
|
||||
/** Host Command ID : WMM ADDTS req */
|
||||
ENUM_ELEMENT(HostCmd_CMD_WMM_ADDTS_REQ, 0x006E),
|
||||
/** Host Command ID : WMM DELTS req */
|
||||
ENUM_ELEMENT(HostCmd_CMD_WMM_DELTS_REQ, 0x006F),
|
||||
/** Host Command ID : WMM queue configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_WMM_QUEUE_CONFIG, 0x0070),
|
||||
/** Host Command ID : 802.11 get status */
|
||||
ENUM_ELEMENT(HostCmd_CMD_WMM_GET_STATUS, 0x0071),
|
||||
|
||||
/** Host Command ID : 802.11 subscribe event */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_SUBSCRIBE_EVENT, 0x0075),
|
||||
|
||||
/** Host Command ID : 802.11 Tx rate query */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_TX_RATE_QUERY, 0x007f),
|
||||
/** Host Command ID :Get timestamp value */
|
||||
ENUM_ELEMENT(HostCmd_CMD_GET_TSF, 0x0080),
|
||||
|
||||
/** Host Command ID : WMM queue stats */
|
||||
ENUM_ELEMENT(HostCmd_CMD_WMM_QUEUE_STATS, 0x0081),
|
||||
|
||||
/** Host Command ID : KEEP ALIVE command */
|
||||
ENUM_ELEMENT(HostCmd_CMD_AUTO_TX, 0x0082),
|
||||
|
||||
/** Host Command ID : 802.11 IBSS coalescing status */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, 0x0083),
|
||||
|
||||
/** Host Command ID : Memory access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MEM_ACCESS, 0x0086),
|
||||
|
||||
#if defined(SDIO)
|
||||
/** Host Command ID : SDIO GPIO interrupt configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_SDIO_GPIO_INT_CONFIG, 0x0088),
|
||||
#endif
|
||||
|
||||
/** Host Command ID : Mfg command */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MFG_COMMAND, 0x0089),
|
||||
/** Host Command ID : Inactivity timeout ext */
|
||||
ENUM_ELEMENT(HostCmd_CMD_INACTIVITY_TIMEOUT_EXT, 0x008a),
|
||||
|
||||
/** Host Command ID : DBGS configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_DBGS_CFG, 0x008b),
|
||||
/** Host Command ID : Get memory */
|
||||
ENUM_ELEMENT(HostCmd_CMD_GET_MEM, 0x008c),
|
||||
|
||||
/** Host Command ID : Cal data dnld */
|
||||
ENUM_ELEMENT(HostCmd_CMD_CFG_DATA, 0x008f),
|
||||
|
||||
/** Host Command ID : SDIO pull control */
|
||||
ENUM_ELEMENT(HostCmd_CMD_SDIO_PULL_CTRL, 0x0093),
|
||||
|
||||
/** Host Command ID : ECL system clock configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_ECL_SYSTEM_CLOCK_CONFIG, 0x0094),
|
||||
|
||||
/** Host Command ID : Extended version */
|
||||
ENUM_ELEMENT(HostCmd_CMD_VERSION_EXT, 0x0097),
|
||||
|
||||
/** Host Command ID : MEF configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MEF_CFG, 0x009a),
|
||||
/** Host Command ID : 802.11 RSSI INFO*/
|
||||
ENUM_ELEMENT(HostCmd_CMD_RSSI_INFO, 0x00a4),
|
||||
/** Host Command ID : Function initialization */
|
||||
ENUM_ELEMENT(HostCmd_CMD_FUNC_INIT, 0x00a9),
|
||||
/** Host Command ID : Function shutdown */
|
||||
ENUM_ELEMENT(HostCmd_CMD_FUNC_SHUTDOWN, 0x00aa),
|
||||
|
||||
#ifdef OPCHAN
|
||||
ENUM_ELEMENT(HostCmd_CMD_OPCHAN_CONFIG, 0x00f8),
|
||||
ENUM_ELEMENT(HostCmd_CMD_OPCHAN_CHANGROUP_CONFIG, 0x00f9),
|
||||
#endif
|
||||
|
||||
/** Host Command ID : Robustcoex */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_ROBUSTCOEX, 0x00e0),
|
||||
|
||||
/** Host Command ID :EAPOL PKT */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_EAPOL_PKT, 0x012e),
|
||||
|
||||
/** Host Command ID :MIMO SWITCH **/
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_MIMO_SWITCH, 0x0235),
|
||||
|
||||
/** Host Command ID : 802.11 RSSI INFO EXT*/
|
||||
ENUM_ELEMENT(HostCmd_CMD_RSSI_INFO_EXT, 0x0237),
|
||||
/** Host Command ID : ROAMING OFFLOAD TO FW*/
|
||||
ENUM_ELEMENT(HostCmd_CMD_ROAM_OFFLOAD, 0x0245),
|
||||
|
||||
/** Host Command ID: Multi chan config */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MULTI_CHAN_CONFIG, 0x011e),
|
||||
/** Host Command ID: Multi chan policy */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MULTI_CHAN_POLICY, 0x0121),
|
||||
/** Host Command ID: DRCS config */
|
||||
ENUM_ELEMENT(HostCmd_CMD_DRCS_CONFIG, 0x024a),
|
||||
|
||||
/** Host Command ID : Channel report request */
|
||||
ENUM_ELEMENT(HostCmd_CMD_CHAN_REPORT_REQUEST, 0x00dd),
|
||||
|
||||
/** Host Command ID: SUPPLICANT_PMK */
|
||||
ENUM_ELEMENT(HostCmd_CMD_SUPPLICANT_PMK, 0x00c4),
|
||||
/** Host Command ID: SUPPLICANT_PROFILE */
|
||||
ENUM_ELEMENT(HostCmd_CMD_SUPPLICANT_PROFILE, 0x00c5),
|
||||
|
||||
/** Host Command ID : Add Block Ack Request */
|
||||
ENUM_ELEMENT(HostCmd_CMD_11N_ADDBA_REQ, 0x00ce),
|
||||
/** Host Command ID : Delete a Block Ack Request */
|
||||
ENUM_ELEMENT(HostCmd_CMD_11N_CFG, 0x00cd),
|
||||
/** Host Command ID : Add Block Ack Response */
|
||||
ENUM_ELEMENT(HostCmd_CMD_11N_ADDBA_RSP, 0x00cf),
|
||||
/** Host Command ID : Delete a Block Ack Request */
|
||||
ENUM_ELEMENT(HostCmd_CMD_11N_DELBA, 0x00d0),
|
||||
/** Host Command ID: Configure Tx Buf size */
|
||||
ENUM_ELEMENT(HostCmd_CMD_RECONFIGURE_TX_BUFF, 0x00d9),
|
||||
/** Host Command ID: AMSDU Aggr Ctrl */
|
||||
ENUM_ELEMENT(HostCmd_CMD_AMSDU_AGGR_CTRL, 0x00df),
|
||||
/** Host Command ID: 11AC config */
|
||||
ENUM_ELEMENT(HostCmd_CMD_11AC_CFG, 0x0112),
|
||||
/** Host Command ID: Configure TX Beamforming capability */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TX_BF_CFG, 0x0104),
|
||||
|
||||
/** Host Command ID : 802.11 TX power configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TXPWR_CFG, 0x00d1),
|
||||
|
||||
/** Host Command ID : Soft Reset */
|
||||
ENUM_ELEMENT(HostCmd_CMD_SOFT_RESET, 0x00d5),
|
||||
|
||||
/** Host Command ID : 802.11 b/g/n rate configration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TX_RATE_CFG, 0x00d6),
|
||||
|
||||
/** Host Command ID : Enhanced PS mode */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_PS_MODE_ENH, 0x00e4),
|
||||
|
||||
/** Host command action : Host sleep configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_HS_CFG_ENH, 0x00e5),
|
||||
|
||||
/** Host Command ID : CAU register access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_CAU_REG_ACCESS, 0x00ed),
|
||||
|
||||
/** Host Command ID : mgmt IE list */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MGMT_IE_LIST, 0x00f2),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_BAND_STEERING, 0x026f),
|
||||
/*** Host Command ID " MC_AGGR_CFG */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MC_AGGR_CFG, 0x027a),
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_STATS, 0x0014),
|
||||
ENUM_ELEMENT(HostCmd_CMD_GET_CH_LOAD, 0x027b),
|
||||
|
||||
/** Host Command ID: CROSS CHIP SYNCH */
|
||||
ENUM_ELEMENT(HostCmd_CMD_CROSS_CHIP_SYNCH, 0x027d),
|
||||
|
||||
/** Host Command ID : TDLS configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TDLS_CONFIG, 0x0100),
|
||||
/** Host Command ID : TDLS operation */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TDLS_OPERATION, 0x0122),
|
||||
|
||||
/** Host Command ID : Packet aggregation over host interface */
|
||||
ENUM_ELEMENT(HostCmd_CMD_PACKET_AGGR_OVER_HOST_INTERFACE, 0x0117),
|
||||
|
||||
#ifdef SDIO
|
||||
#endif
|
||||
|
||||
/** Host Command ID : Extended scan support */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_SCAN_EXT, 0x0107),
|
||||
|
||||
/** Host Command ID : Forward mgmt frame */
|
||||
ENUM_ELEMENT(HostCmd_CMD_RX_MGMT_IND, 0x010c),
|
||||
|
||||
#ifdef PCIE
|
||||
/** Host Command ID: Host buffer description */
|
||||
ENUM_ELEMENT(HostCmd_CMD_PCIE_HOST_BUF_DETAILS, 0x00fa),
|
||||
#endif
|
||||
|
||||
/** Host Command ID : Set BSS_MODE */
|
||||
ENUM_ELEMENT(HostCmd_CMD_SET_BSS_MODE, 0x00f7),
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Host Command id: SYS_INFO */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_SYS_INFO, 0x00ae),
|
||||
/** Host Command id: sys_reset */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_SYS_RESET, 0x00af),
|
||||
/** Host Command id: SYS_CONFIGURE */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_SYS_CONFIGURE, 0x00b0),
|
||||
/** Host Command id: BSS_START */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_BSS_START, 0x00b1),
|
||||
/** Host Command id: BSS_STOP */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_BSS_STOP, 0x00b2),
|
||||
/** Host Command id: sta_list */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_STA_LIST, 0x00b3),
|
||||
/** Host Command id: STA_DEAUTH */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_STA_DEAUTH, 0x00b5),
|
||||
|
||||
/** Host Command id: REPORT_MIC */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_REPORT_MIC, 0x00ee),
|
||||
/** Host Command id: UAP_OPER_CTRL */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_OPER_CTRL, 0x0233),
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
/** Host Command id: PMIC CONFIGURE*/
|
||||
ENUM_ELEMENT(HostCmd_CMD_PMIC_CONFIGURE, 0x23E),
|
||||
|
||||
/** Host Command ID: 802.11 Network Monitor */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_NET_MONITOR, 0x0102),
|
||||
|
||||
/** Host Command ID: Tx data pause */
|
||||
ENUM_ELEMENT(HostCmd_CMD_CFG_TX_DATA_PAUSE, 0x0103),
|
||||
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
/** Host Command ID: P2P PARAMS CONFIG */
|
||||
ENUM_ELEMENT(HostCmd_CMD_P2P_PARAMS_CONFIG, 0x00ea),
|
||||
/** Host Command ID: WIFI_DIRECT_MODE_CONFIG */
|
||||
ENUM_ELEMENT(HostCmd_CMD_WIFI_DIRECT_MODE_CONFIG, 0x00eb),
|
||||
#endif
|
||||
|
||||
/** Host Command ID: GPIO TSF LATCH */
|
||||
ENUM_ELEMENT(HostCmd_CMD_GPIO_TSF_LATCH_PARAM_CONFIG, 0x0278),
|
||||
/** Host Command ID: Remain On Channel */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_REMAIN_ON_CHANNEL, 0x010d),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_COALESCE_CFG, 0x010a),
|
||||
|
||||
/** Host Command ID: GTK REKEY OFFLOAD CFG */
|
||||
ENUM_ELEMENT(HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG, 0x010f),
|
||||
|
||||
/** Host Command ID : OTP user data */
|
||||
ENUM_ELEMENT(HostCmd_CMD_OTP_READ_USER_DATA, 0x0114),
|
||||
|
||||
/** Host Command ID: fw auto reconnect */
|
||||
ENUM_ELEMENT(HostCmd_CMD_FW_AUTO_RECONNECT, 0x0115),
|
||||
|
||||
/** Host Command ID: HS wakeup reason */
|
||||
ENUM_ELEMENT(HostCmd_CMD_HS_WAKEUP_REASON, 0x0116),
|
||||
|
||||
/** Host Command ID: reject addba request */
|
||||
ENUM_ELEMENT(HostCmd_CMD_REJECT_ADDBA_REQ, 0x0119),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_FW_DUMP_EVENT, 0x0125),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_CONFIG_LOW_POWER_MODE, 0x0128),
|
||||
|
||||
/** Host Command ID : Target device access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TARGET_ACCESS, 0x012a),
|
||||
|
||||
/** Host Command ID: BCA device access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_BCA_REG_ACCESS, 0x0272),
|
||||
/** Host Command ID: register device access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_REG_ACCESS, 0x027C),
|
||||
|
||||
/** Host Command ID: DFS repeater mode */
|
||||
ENUM_ELEMENT(HostCmd_CMD_DFS_REPEATER_MODE, 0x012b),
|
||||
|
||||
/** Host Command ID: ACS scan */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_ACS_SCAN, 0x0224),
|
||||
|
||||
/** Host Command ID: Get sensor temp*/
|
||||
ENUM_ELEMENT(HostCmd_CMD_DS_GET_SENSOR_TEMP, 0x0227),
|
||||
|
||||
/** Host Command ID : Configure ADHOC_OVER_IP parameters */
|
||||
ENUM_ELEMENT(HostCmd_CMD_WMM_PARAM_CONFIG, 0x023a),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_IPV6_RA_OFFLOAD_CFG, 0x0238),
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/** Host Command ID : set/get sta configure */
|
||||
ENUM_ELEMENT(HostCmd_CMD_STA_CONFIGURE, 0x023f),
|
||||
#endif
|
||||
|
||||
/** Host Command ID : GPIO independent reset configure */
|
||||
ENUM_ELEMENT(HostCmd_CMD_INDEPENDENT_RESET_CFG, 0x0243),
|
||||
|
||||
/** use to query chan region cfg setting in firmware */
|
||||
ENUM_ELEMENT(HostCmd_CMD_CHAN_REGION_CFG, 0x0242),
|
||||
/** used in hostcmd to download region power cfg setting to firmware */
|
||||
ENUM_ELEMENT(HostCmd_CMD_REGION_POWER_CFG, 0x0249),
|
||||
|
||||
/** Host Command ID : Packet aggregation CTRL */
|
||||
ENUM_ELEMENT(HostCmd_CMD_PACKET_AGGR_CTRL, 0x0251),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_DYN_BW, 0x0252),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_BOOT_SLEEP, 0x0258),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_RX_ABORT_CFG, 0x0261),
|
||||
ENUM_ELEMENT(HostCmd_CMD_RX_ABORT_CFG_EXT, 0x0262),
|
||||
ENUM_ELEMENT(HostCmd_CMD_TX_AMPDU_PROT_MODE, 0x0263),
|
||||
ENUM_ELEMENT(HostCmd_CMD_RATE_ADAPT_CFG, 0x0264),
|
||||
ENUM_ELEMENT(HostCmd_CMD_CCK_DESENSE_CFG, 0x0265),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_FTM_CONFIG_SESSION_PARAMS, 0x024d),
|
||||
ENUM_ELEMENT(HostCmd_CMD_FTM_SESSION_CTRL, 0x024e),
|
||||
ENUM_ELEMENT(HostCmd_CMD_FTM_FEATURE_CTRL, 0x024f),
|
||||
ENUM_ELEMENT(HostCmd_CMD_WLS_REQ_FTM_RANGE, 0x0250),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_FTM_CONFIG_RESPONDER, 0x0255),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_VDLL, 0x0240),
|
||||
#if defined(PCIE)
|
||||
ENUM_ELEMENT(HostCmd_CMD_SSU, 0x0259),
|
||||
#endif
|
||||
ENUM_ELEMENT(HostCmd_CMD_CSI, 0x025b),
|
||||
|
||||
#if defined(UAP_SUPPORT)
|
||||
/** Host Command ID : Add New Station */
|
||||
ENUM_ELEMENT(HostCmd_CMD_ADD_NEW_STATION, 0x025f),
|
||||
#endif
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_DMCS_CONFIG, 0x0260),
|
||||
|
||||
/** Host Command ID: 11AX config */
|
||||
ENUM_ELEMENT(HostCmd_CMD_11AX_CFG, 0x0266),
|
||||
/** Host Command ID: 11AX command */
|
||||
ENUM_ELEMENT(HostCmd_CMD_11AX_CMD, 0x026d),
|
||||
/** Host Command ID: Range ext command */
|
||||
ENUM_ELEMENT(HostCmd_CMD_RANGE_EXT, 0x0274),
|
||||
/** Host Command ID: TWT cfg command */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TWT_CFG, 0x0270),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_LOW_POWER_MODE_CFG, 0x026e),
|
||||
ENUM_ELEMENT(HostCmd_CMD_UAP_BEACON_STUCK_CFG, 0x0271),
|
||||
ENUM_ELEMENT(HostCmd_CMD_ARB_CONFIG, 0x0273),
|
||||
ENUM_ELEMENT(HostCmd_CMD_DOT11MC_UNASSOC_FTM_CFG, 0x0275),
|
||||
ENUM_ELEMENT(HostCmd_CMD_HAL_PHY_CFG, 0x0276),
|
||||
|
||||
/** Host Command ID : IPS Config */
|
||||
ENUM_ELEMENT(HostCmd_CMD_IPS_CONFIG, 0x0279),
|
||||
ENUM_ELEMENT(HostCmd_CMD_OFDM_DESENSE_CFG, 0x027f),
|
||||
ENUM_ELEMENT(HostCmd_CMD_NAV_MITIGATION_CFG, 0x0282),
|
||||
|
||||
/* Always keep this last */
|
|
@ -45,9 +45,6 @@ Change log:
|
|||
#ifdef PCIE
|
||||
#include "mlan_pcie.h"
|
||||
#endif /* PCIE */
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
#include "hostsa_init.h"
|
||||
#endif
|
||||
#include "mlan_11ax.h"
|
||||
|
||||
/********************************************************
|
||||
|
@ -610,7 +607,7 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
}
|
||||
#endif
|
||||
priv->user_rxwinsize = priv->add_ba_param.rx_win_size;
|
||||
memset(pmadapter, priv->rx_seq, 0, sizeof(priv->rx_seq));
|
||||
memset(pmadapter, priv->rx_seq, 0xff, sizeof(priv->rx_seq));
|
||||
priv->port_ctrl_mode = MTRUE;
|
||||
priv->port_open = MFALSE;
|
||||
priv->prior_port_status = MFALSE;
|
||||
|
@ -618,7 +615,6 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
priv->hotspot_cfg = 0;
|
||||
|
||||
priv->intf_hr_len = pmadapter->ops.intf_header_len;
|
||||
priv->multi_ap_flag = 0;
|
||||
memset(pmadapter, &priv->chan_rep_req, 0, sizeof(priv->chan_rep_req));
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
|
@ -633,9 +629,6 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
}
|
||||
#endif
|
||||
ret = wlan_add_bsspriotbl(priv);
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
hostsa_init(priv);
|
||||
#endif
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -883,7 +876,12 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->is_hs_configured = MFALSE;
|
||||
pmadapter->hs_cfg.conditions = HOST_SLEEP_DEF_COND;
|
||||
pmadapter->hs_cfg.gpio = HOST_SLEEP_DEF_GPIO;
|
||||
pmadapter->hs_cfg.gap = HOST_SLEEP_DEF_GAP;
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type))
|
||||
pmadapter->hs_cfg.gap = HOST_SLEEP_GAP_SPECIAL;
|
||||
else
|
||||
#endif
|
||||
pmadapter->hs_cfg.gap = HOST_SLEEP_DEF_GAP;
|
||||
pmadapter->hs_activated = MFALSE;
|
||||
pmadapter->min_wake_holdoff = HOST_SLEEP_DEF_WAKE_HOLDOFF;
|
||||
pmadapter->hs_inactivity_timeout = HOST_SLEEP_DEF_INACTIVITY_TIMEOUT;
|
||||
|
@ -952,6 +950,9 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->upld_len = 0;
|
||||
pmadapter->event_cause = 0;
|
||||
pmadapter->pmlan_buffer_event = MNULL;
|
||||
pmadapter->flush_time_ac_vi_vo = DEF_FLUSH_TIME_AC_VI_VO;
|
||||
pmadapter->flush_time_ac_be_bk = DEF_FLUSH_TIME_AC_BE_BK;
|
||||
|
||||
memset(pmadapter, &pmadapter->region_channel, 0,
|
||||
sizeof(pmadapter->region_channel));
|
||||
pmadapter->region_code = 0;
|
||||
|
@ -1144,6 +1145,33 @@ mlan_status wlan_init_lock_list(pmlan_adapter pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
#ifdef PCIE
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_rx_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_tx_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_event_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_pcie_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
|
@ -1225,6 +1253,20 @@ t_void wlan_free_lock_list(pmlan_adapter pmadapter)
|
|||
if (pmadapter->pmlan_cmd_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_cmd_lock);
|
||||
#ifdef PCIE
|
||||
if (pmadapter->pmlan_rx_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
if (pmadapter->pmlan_tx_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
if (pmadapter->pmlan_event_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
if (pmadapter->pmlan_pcie_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
#endif
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
|
@ -1893,10 +1935,6 @@ t_void wlan_free_priv(mlan_private *pmpriv)
|
|||
wlan_free_curr_bcn(pmpriv);
|
||||
#endif /* STA_SUPPORT */
|
||||
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
hostsa_cleanup(pmpriv);
|
||||
#endif /*EMBEDDED AUTHENTICATOR*/
|
||||
|
||||
wlan_delete_station_list(pmpriv);
|
||||
LEAVE();
|
||||
}
|
||||
|
|
|
@ -357,7 +357,6 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
||||
MLAN_OID_MISC_HAL_PHY_CFG = 0x0020007E,
|
||||
MLAN_OID_MISC_RF_TEST_HE_POWER = 0X0020007F,
|
||||
MLAN_OID_MISC_MULTI_AP_CFG = 0x00200080,
|
||||
#ifdef UAP_SUPPORT
|
||||
MLAN_OID_MISC_WACP_MODE = 0x00200081,
|
||||
#endif
|
||||
|
@ -373,6 +372,9 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_CROSS_CHIP_SYNCH = 0x0020008B,
|
||||
MLAN_OID_MISC_RF_TEST_CONFIG_TRIGGER_FRAME = 0x0020008C,
|
||||
MLAN_OID_MISC_OFDM_DESENSE_CFG = 0x0020008D,
|
||||
MLAN_OID_MISC_REORDER_FLUSH_TIME = 0x0020008F,
|
||||
MLAN_OID_MISC_NAV_MITIGATION = 0x00200090,
|
||||
MLAN_OID_MISC_LED_CONFIG = 0x00200091,
|
||||
};
|
||||
|
||||
/** Sub command size */
|
||||
|
@ -924,6 +926,12 @@ typedef struct _mlan_deauth_param {
|
|||
#define PROTOCOL_WAPI 0x80
|
||||
/** WPA3 SAE */
|
||||
#define PROTOCOL_WPA3_SAE 0x100
|
||||
/* hunting-and-pecking loop only */
|
||||
#define SAE_PWE_HUNT_AND_PECK 0
|
||||
/** hash-to-element only */
|
||||
#define SAE_PWE_HASH_TO_ELEMENT 1
|
||||
/** both hunting-and-pecking loop and hash-to-element */
|
||||
#define SAE_PWE_BOTH 2
|
||||
/** OWE */
|
||||
#define PROTOCOL_OWE 0x200
|
||||
|
||||
|
@ -995,6 +1003,10 @@ typedef struct _wpa_param {
|
|||
t_u32 length;
|
||||
/** passphrase */
|
||||
t_u8 passphrase[64];
|
||||
/** SAE Password length */
|
||||
t_u32 sae_password_length;
|
||||
/** Passphrase */
|
||||
t_u8 sae_password[255];
|
||||
/**group key rekey time in seconds */
|
||||
t_u32 gk_rekey_time;
|
||||
} wpa_param;
|
||||
|
@ -1173,8 +1185,6 @@ typedef struct _mlan_uap_bss_param {
|
|||
|
||||
/** uap host based config */
|
||||
t_u32 uap_host_based_config;
|
||||
/** multi ap flag */
|
||||
t_u8 multi_ap_flag;
|
||||
} mlan_uap_bss_param, *pmlan_uap_bss_param;
|
||||
|
||||
/** mlan_uap_scan_channels */
|
||||
|
@ -1708,8 +1718,10 @@ typedef struct _mlan_ds_get_stats {
|
|||
/** Rx Stuck Related Info*/
|
||||
/** Rx Stuck Issue count */
|
||||
t_u32 rx_stuck_issue_cnt[2];
|
||||
/** Rx Stuck Recovery count */
|
||||
t_u32 rx_stuck_recovery_cnt;
|
||||
/** Rx Stuck Recovery count polling based */
|
||||
t_u32 rx_stuck_poll_recovery_cnt;
|
||||
/** Rx Stuck Recovery count interrupt based */
|
||||
t_u32 rx_stuck_intr_recovery_cnt;
|
||||
/** Rx Stuck TSF */
|
||||
t_u64 rx_stuck_tsf[2];
|
||||
/** Tx Watchdog Recovery Related Info */
|
||||
|
@ -1970,87 +1982,7 @@ typedef struct _mlan_ver_ext {
|
|||
/** Extended Capabilities Data */
|
||||
typedef struct MLAN_PACK_START _ExtCap_t {
|
||||
/** Extended Capabilities value */
|
||||
t_u8 rsvdBit87 : 1; /* bit 87 */
|
||||
t_u8 rsvdBit86 : 1; /* bit 86 */
|
||||
t_u8 rsvdBit85 : 1; /* bit 85 */
|
||||
t_u8 beacon_prot : 1; /* bit 84 */
|
||||
t_u8 rsvdBit83 : 1; /* bit 83 */
|
||||
t_u8 rsvdBit82 : 1; /* bit 82 */
|
||||
t_u8 rsvdBit81 : 1; /* bit 81 */
|
||||
t_u8 rsvdBit80 : 1; /* bit 80 */
|
||||
t_u8 rsvdBit79 : 1; /* bit 79 */
|
||||
t_u8 TWTResp : 1; /* bit 78 */
|
||||
t_u8 TWTReq : 1; /* bit 77 */
|
||||
t_u8 rsvdBit76 : 1; /* bit 76 */
|
||||
t_u8 rsvdBit75 : 1; /* bit 75 */
|
||||
t_u8 rsvdBit74 : 1; /* bit 74 */
|
||||
t_u8 rsvdBit73 : 1; /* bit 73 */
|
||||
t_u8 FILS : 1; /* bit 72 */
|
||||
t_u8 FTMI : 1; /* bit 71 */
|
||||
t_u8 FTMR : 1; /* bit 70 */
|
||||
t_u8 CAQ : 1; /* bit 69 */
|
||||
t_u8 rsvdBit68 : 1; /* bit 68 */
|
||||
t_u8 NCC : 1; /* bit 67 */
|
||||
t_u8 rsvdBit66 : 1; /* bit 66 */
|
||||
t_u8 chanSchedMgnt : 1; /* bit 65 */
|
||||
t_u8 MaxAMSDU1 : 1; /* bit 64 */
|
||||
t_u8 MaxAMSDU0 : 1; /* bit 63 */
|
||||
t_u8 OperModeNtf : 1; /* bit 62 */
|
||||
t_u8 TDLSWildBandwidth : 1; /* bit 61 */
|
||||
t_u8 rsvdBit60 : 1; /* bit 60 */
|
||||
t_u8 rsvdBit59 : 1; /* bit 59 */
|
||||
t_u8 rsvdBit58 : 1; /* bit 58 */
|
||||
t_u8 rsvdBit57 : 1; /* bit 57 */
|
||||
t_u8 rsvdBit56 : 1; /* bit 56 */
|
||||
t_u8 rsvdBit55 : 1; /* bit 55 */
|
||||
t_u8 rsvdBit54 : 1; /* bit 54 */
|
||||
t_u8 rsvdBit53 : 1; /* bit 53 */
|
||||
t_u8 rsvdBit52 : 1; /* bit 52 */
|
||||
t_u8 rsvdBit51 : 1; /* bit 51 */
|
||||
t_u8 rsvdBit50 : 1; /* bit 50 */
|
||||
t_u8 rsvdBit49 : 1; /* bit 49 */
|
||||
t_u8 rsvdBit48 : 1; /* bit 48 */
|
||||
t_u8 rsvdBit47 : 1; /* bit 47 */
|
||||
t_u8 rsvdBit46 : 1; /* bit 46 */
|
||||
t_u8 rsvdBit45 : 1; /* bit 45 */
|
||||
t_u8 rsvdBit44 : 1; /* bit 44 */
|
||||
t_u8 rsvdBit43 : 1; /* bit 43 */
|
||||
t_u8 rsvdBit42 : 1; /* bit 42 */
|
||||
t_u8 rsvdBit41 : 1; /* bit 41 */
|
||||
t_u8 rsvdBit40 : 1; /* bit 40 */
|
||||
t_u8 TDLSChlSwitchProhib : 1; /* bit 39 */
|
||||
t_u8 TDLSProhibited : 1; /* bit 38 */
|
||||
t_u8 TDLSSupport : 1; /* bit 37 */
|
||||
t_u8 MSGCF_Capa : 1; /* bit 36 */
|
||||
t_u8 Reserved35 : 1; /* bit 35 */
|
||||
t_u8 SSPN_Interface : 1; /* bit 34 */
|
||||
t_u8 EBR : 1; /* bit 33 */
|
||||
t_u8 Qos_Map : 1; /* bit 32 */
|
||||
t_u8 Interworking : 1; /* bit 31 */
|
||||
t_u8 TDLSChannelSwitching : 1; /* bit 30 */
|
||||
t_u8 TDLSPeerPSMSupport : 1; /* bit 29 */
|
||||
t_u8 TDLSPeerUAPSDSupport : 1; /* bit 28 */
|
||||
t_u8 UTC : 1; /* bit 27 */
|
||||
t_u8 DMS : 1; /* bit 26 */
|
||||
t_u8 SSID_List : 1; /* bit 25 */
|
||||
t_u8 ChannelUsage : 1; /* bit 24 */
|
||||
t_u8 TimingMeasurement : 1; /* bit 23 */
|
||||
t_u8 MultipleBSSID : 1; /* bit 22 */
|
||||
t_u8 AC_StationCount : 1; /* bit 21 */
|
||||
t_u8 QoSTrafficCap : 1; /* bit 20 */
|
||||
t_u8 BSS_Transition : 1; /* bit 19 */
|
||||
t_u8 TIM_Broadcast : 1; /* bit 18 */
|
||||
t_u8 WNM_Sleep : 1; /* bit 17 */
|
||||
t_u8 TFS : 1; /* bit 16 */
|
||||
t_u8 GeospatialLocation : 1; /* bit 15 */
|
||||
t_u8 CivicLocation : 1; /* bit 14 */
|
||||
t_u8 CollocatedIntf : 1; /* bit 13 */
|
||||
t_u8 ProxyARPService : 1; /* bit 12 */
|
||||
t_u8 FMS : 1; /* bit 11 */
|
||||
t_u8 LocationTracking : 1; /* bit 10 */
|
||||
t_u8 MulticastDiagnostics : 1; /* bit 9 */
|
||||
t_u8 Diagnostics : 1; /* bit 8 */
|
||||
t_u8 Event : 1; /* bit 7 */
|
||||
t_u8 Event : 1; /* bit 7 */ /* Byte 1 */
|
||||
t_u8 SPSMP_Support : 1; /* bit 6 */
|
||||
t_u8 Reserved5 : 1; /* bit 5 */
|
||||
t_u8 PSMP_Capable : 1; /* bit 4 */
|
||||
|
@ -2058,6 +1990,86 @@ typedef struct MLAN_PACK_START _ExtCap_t {
|
|||
t_u8 ExtChanSwitching : 1; /* bit 2 */
|
||||
t_u8 Reserved1 : 1; /* bit 1 */
|
||||
t_u8 BSS_CoexistSupport : 1; /* bit 0 */
|
||||
t_u8 GeospatialLocation : 1; /* bit 15 */ /* Byte 2 */
|
||||
t_u8 CivicLocation : 1; /* bit 14 */
|
||||
t_u8 CollocatedIntf : 1; /* bit 13 */
|
||||
t_u8 ProxyARPService : 1; /* bit 12 */
|
||||
t_u8 FMS : 1; /* bit 11 */
|
||||
t_u8 LocationTracking : 1; /* bit 10 */
|
||||
t_u8 MulticastDiagnostics : 1; /* bit 9 */
|
||||
t_u8 Diagnostics : 1; /* bit 8 */
|
||||
t_u8 TimingMeasurement : 1; /* bit 23 */ /* Byte 3 */
|
||||
t_u8 MultipleBSSID : 1; /* bit 22 */
|
||||
t_u8 AC_StationCount : 1; /* bit 21 */
|
||||
t_u8 QoSTrafficCap : 1; /* bit 20 */
|
||||
t_u8 BSS_Transition : 1; /* bit 19 */
|
||||
t_u8 TIM_Broadcast : 1; /* bit 18 */
|
||||
t_u8 WNM_Sleep : 1; /* bit 17 */
|
||||
t_u8 TFS : 1; /* bit 16 */
|
||||
t_u8 Interworking : 1; /* bit 31 */ /* Byte 4 */
|
||||
t_u8 TDLSChannelSwitching : 1; /* bit 30 */
|
||||
t_u8 TDLSPeerPSMSupport : 1; /* bit 29 */
|
||||
t_u8 TDLSPeerUAPSDSupport : 1; /* bit 28 */
|
||||
t_u8 UTC : 1; /* bit 27 */
|
||||
t_u8 DMS : 1; /* bit 26 */
|
||||
t_u8 SSID_List : 1; /* bit 25 */
|
||||
t_u8 ChannelUsage : 1; /* bit 24 */
|
||||
t_u8 TDLSChlSwitchProhib : 1; /* bit 39 */ /* Byte 5 */
|
||||
t_u8 TDLSProhibited : 1; /* bit 38 */
|
||||
t_u8 TDLSSupport : 1; /* bit 37 */
|
||||
t_u8 MSGCF_Capa : 1; /* bit 36 */
|
||||
t_u8 Reserved35 : 1; /* bit 35 */
|
||||
t_u8 SSPN_Interface : 1; /* bit 34 */
|
||||
t_u8 EBR : 1; /* bit 33 */
|
||||
t_u8 Qos_Map : 1; /* bit 32 */
|
||||
t_u8 rsvdBit47 : 1; /* bit 47 */ /* Byte 6 */
|
||||
t_u8 rsvdBit46 : 1; /* bit 46 */
|
||||
t_u8 rsvdBit45 : 1; /* bit 45 */
|
||||
t_u8 rsvdBit44 : 1; /* bit 44 */
|
||||
t_u8 rsvdBit43 : 1; /* bit 43 */
|
||||
t_u8 rsvdBit42 : 1; /* bit 42 */
|
||||
t_u8 rsvdBit41 : 1; /* bit 41 */
|
||||
t_u8 rsvdBit40 : 1; /* bit 40 */
|
||||
t_u8 rsvdBit55 : 1; /* bit 55 */ /* Byte 7 */
|
||||
t_u8 rsvdBit54 : 1; /* bit 54 */
|
||||
t_u8 rsvdBit53 : 1; /* bit 53 */
|
||||
t_u8 rsvdBit52 : 1; /* bit 52 */
|
||||
t_u8 rsvdBit51 : 1; /* bit 51 */
|
||||
t_u8 rsvdBit50 : 1; /* bit 50 */
|
||||
t_u8 rsvdBit49 : 1; /* bit 49 */
|
||||
t_u8 rsvdBit48 : 1; /* bit 48 */
|
||||
t_u8 MaxAMSDU0 : 1; /* bit 63 */ /* Byte 8 */
|
||||
t_u8 OperModeNtf : 1; /* bit 62 */
|
||||
t_u8 TDLSWildBandwidth : 1; /* bit 61 */
|
||||
t_u8 rsvdBit60 : 1; /* bit 60 */
|
||||
t_u8 rsvdBit59 : 1; /* bit 59 */
|
||||
t_u8 rsvdBit58 : 1; /* bit 58 */
|
||||
t_u8 rsvdBit57 : 1; /* bit 57 */
|
||||
t_u8 rsvdBit56 : 1; /* bit 56 */
|
||||
t_u8 FTMI : 1; /* bit 71 */ /* Byte 9 */
|
||||
t_u8 FTMR : 1; /* bit 70 */
|
||||
t_u8 CAQ : 1; /* bit 69 */
|
||||
t_u8 rsvdBit68 : 1; /* bit 68 */
|
||||
t_u8 NCC : 1; /* bit 67 */
|
||||
t_u8 rsvdBit66 : 1; /* bit 66 */
|
||||
t_u8 chanSchedMgnt : 1; /* bit 65 */
|
||||
t_u8 MaxAMSDU1 : 1; /* bit 64 */
|
||||
t_u8 rsvdBit79 : 1; /* bit 79 */ /* Byte 10 */
|
||||
t_u8 TWTResp : 1; /* bit 78 */
|
||||
t_u8 TWTReq : 1; /* bit 77 */
|
||||
t_u8 rsvdBit76 : 1; /* bit 76 */
|
||||
t_u8 rsvdBit75 : 1; /* bit 75 */
|
||||
t_u8 rsvdBit74 : 1; /* bit 74 */
|
||||
t_u8 rsvdBit73 : 1; /* bit 73 */
|
||||
t_u8 FILS : 1; /* bit 72 */
|
||||
t_u8 rsvdBit87 : 1; /* bit 87 */ /* Byte 11 */
|
||||
t_u8 rsvdBit86 : 1; /* bit 86 */
|
||||
t_u8 rsvdBit85 : 1; /* bit 85 */
|
||||
t_u8 beacon_prot : 1; /* bit 84 */
|
||||
t_u8 rsvdBit83 : 1; /* bit 83 */
|
||||
t_u8 rsvdBit82 : 1; /* bit 82 */
|
||||
t_u8 rsvdBit81 : 1; /* bit 81 */
|
||||
t_u8 rsvdBit80 : 1; /* bit 80 */
|
||||
} MLAN_PACK_END ExtCap_t, *pExtCap_t;
|
||||
#else
|
||||
/** Extended Capabilities Data */
|
||||
|
@ -2397,8 +2409,6 @@ typedef struct _mlan_debug_info {
|
|||
t_u32 last_int_status;
|
||||
/** number of interrupt receive */
|
||||
t_u32 num_of_irq;
|
||||
/** flag for sdio rx aggr */
|
||||
t_u8 sdio_rx_aggr;
|
||||
/** FW update port number */
|
||||
t_u32 mp_update[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX * 2];
|
||||
/** Invalid port update count */
|
||||
|
@ -2473,6 +2483,12 @@ typedef struct _mlan_debug_info {
|
|||
t_u16 last_event_index;
|
||||
/** Number of no free command node */
|
||||
t_u16 num_no_cmd_node;
|
||||
/** num_assoc_cmd_error, count result 4 error */
|
||||
t_u16 num_assoc_err;
|
||||
/** num_scan_cmd_error, count result 4 error */
|
||||
t_u16 num_scan_err;
|
||||
/** num_remain_on_channel_cmd_error, count result 4 error */
|
||||
t_u16 num_remain_chan_err;
|
||||
/** pending command id */
|
||||
t_u16 pending_cmd;
|
||||
/** time stamp for dnld last cmd */
|
||||
|
@ -2853,51 +2869,6 @@ typedef struct _mlan_ds_sec_cfg {
|
|||
} param;
|
||||
} mlan_ds_sec_cfg, *pmlan_ds_sec_cfg;
|
||||
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
#define BIT_TLV_TYPE_CRYPTO_KEY (1 << 0)
|
||||
#define BIT_TLV_TYPE_CRYPTO_KEY_IV (1 << 1)
|
||||
#define BIT_TLV_TYPE_CRYPTO_KEY_PREFIX (1 << 2)
|
||||
#define BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK (1 << 3)
|
||||
|
||||
/** Type definition of mlan_ds_sup_cfg */
|
||||
typedef struct _mlan_ds_sup_cfg {
|
||||
/** Sub-command */
|
||||
t_u8 sub_command;
|
||||
/** output length */
|
||||
t_u16 output_len;
|
||||
/** number of data blks */
|
||||
t_u16 data_blks_nr;
|
||||
/** sub action code */
|
||||
t_u8 sub_action_code;
|
||||
/** skip bytes */
|
||||
t_u16 skip_bytes;
|
||||
/** iteration */
|
||||
t_u32 iteration;
|
||||
/** count */
|
||||
t_u32 count;
|
||||
/** pointer to output */
|
||||
t_u8 *output;
|
||||
/** key length */
|
||||
t_u16 key_len;
|
||||
/** pointer to key */
|
||||
t_u8 *key;
|
||||
/** key iv length */
|
||||
t_u16 key_iv_len;
|
||||
/** pointer to key iv */
|
||||
t_u8 *key_iv;
|
||||
/** key prefix length */
|
||||
t_u16 key_prefix_len;
|
||||
/** pointer to key prefix */
|
||||
t_u8 *key_prefix;
|
||||
/** pointer to data blk length array */
|
||||
t_u32 *key_data_blk_len;
|
||||
/** pointer to key data blk pointer array */
|
||||
t_u8 **key_data_blk;
|
||||
/** callback */
|
||||
t_u8 call_back;
|
||||
} mlan_ds_sup_cfg, *pmlan_ds_sup_cfg;
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------*/
|
||||
/** Rate Configuration Group */
|
||||
/*-----------------------------------------------------------------*/
|
||||
|
@ -3122,6 +3093,8 @@ typedef struct _mlan_ds_beacon_stuck_param_cfg {
|
|||
|
||||
/** Host sleep config GPIO : Default */
|
||||
#define HOST_SLEEP_DEF_GPIO 0xff
|
||||
/** Host sleep config gap : Special setting (host acknowledge required) */
|
||||
#define HOST_SLEEP_GAP_SPECIAL 0xff
|
||||
/** Host sleep config gap : Default */
|
||||
#define HOST_SLEEP_DEF_GAP 200
|
||||
/** Host sleep config min wake holdoff */
|
||||
|
@ -3143,7 +3116,7 @@ typedef struct _mlan_ds_hs_cfg {
|
|||
/** GPIO pin or 0xff for interface */
|
||||
t_u32 gpio;
|
||||
/** Gap in milliseconds or or 0xff for special
|
||||
* setting when GPIO is used to wakeup host
|
||||
* setting (host acknowledge required)
|
||||
*/
|
||||
t_u32 gap;
|
||||
/** Host sleep wake interval */
|
||||
|
@ -3240,6 +3213,8 @@ typedef struct _mlan_ds_inactivity_to {
|
|||
t_u32 mcast_timeout;
|
||||
/** Timeout for additional Rx traffic after Null PM1 packet exchange */
|
||||
t_u32 ps_entry_timeout;
|
||||
/** Inactivity timeout for cmd */
|
||||
t_u32 ps_cmd_timeout;
|
||||
} mlan_ds_inactivity_to, *pmlan_ds_inactivity_to;
|
||||
|
||||
/** Minimum sleep period in milliseconds */
|
||||
|
@ -4027,6 +4002,8 @@ typedef struct _mlan_ds_11ax_cfg {
|
|||
#define MLAN_11AXCMD_CFG_ID_TXOP_RTS 5
|
||||
#define MLAN_11AXCMD_CFG_ID_TX_OMI 6
|
||||
#define MLAN_11AXCMD_CFG_ID_OBSSNBRU_TOLTIME 7
|
||||
#define MLAN_11AXCMD_CFG_ID_SET_BSRP 8
|
||||
#define MLAN_11AXCMD_CFG_ID_LLDE 9
|
||||
|
||||
#define MLAN_11AXCMD_SR_SUBID 0x102
|
||||
#define MLAN_11AXCMD_BEAM_SUBID 0x103
|
||||
|
@ -4034,6 +4011,8 @@ typedef struct _mlan_ds_11ax_cfg {
|
|||
#define MLAN_11AXCMD_TXOMI_SUBID 0x105
|
||||
#define MLAN_11AXCMD_OBSS_TOLTIME_SUBID 0x106
|
||||
#define MLAN_11AXCMD_TXOPRTS_SUBID 0x108
|
||||
#define MLAN_11AXCMD_SET_BSRP_SUBID 0x109
|
||||
#define MLAN_11AXCMD_LLDE_SUBID 0x110
|
||||
|
||||
#define MLAN_11AX_TWT_SETUP_SUBID 0x114
|
||||
#define MLAN_11AX_TWT_TEARDOWN_SUBID 0x115
|
||||
|
@ -4108,6 +4087,29 @@ typedef struct _mlan_ds_11ax_toltime_cmd {
|
|||
t_u32 tol_time;
|
||||
} mlan_ds_11ax_toltime_cmd, *pmlan_ds_11ax_toltime_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_set_bsrp_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_set_bsrp_cmd {
|
||||
/** command value: 1 is enable, 0 is disable*/
|
||||
t_u8 value;
|
||||
} mlan_ds_11ax_set_bsrp_cmd, *pmlan_ds_11ax_set_bsrp_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_llde_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_llde_cmd {
|
||||
t_u8 llde; // Uplink LLDE: enable=1,disable=0
|
||||
t_u8 mode; // operation mode: default=0,carplay=1,gameplay=2
|
||||
t_u8 fixrate; // trigger frame rate: auto=0xff
|
||||
t_u8 triggerlimit; // cap airtime limit index: auto=0xff
|
||||
t_u8 peakULrate; // cap peak UL rate
|
||||
t_u8 dl_llde; // Downlink LLDE: enable=1,disable=0
|
||||
t_u16 triggerinterval; // Set trigger frame interval(us): auto=0
|
||||
t_u16 mu_rts_successcnt;
|
||||
t_u16 mu_rts_failcnt;
|
||||
t_u16 basic_trigger_successcnt;
|
||||
t_u16 basic_trigger_failcnt;
|
||||
t_u16 tbppdu_nullcnt;
|
||||
t_u16 tbppdu_datacnt;
|
||||
} mlan_ds_11ax_llde_cmd, *pmlan_ds_11ax_llde_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_cmd_cfg for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_cmd_cfg {
|
||||
/** Sub-command */
|
||||
|
@ -4129,6 +4131,10 @@ typedef struct _mlan_ds_11ax_cmd_cfg {
|
|||
/** OBSS tolerance time configuration for
|
||||
* MLAN_11AXCMD_TOLTIME_SUBID */
|
||||
mlan_ds_11ax_toltime_cmd toltime_cfg;
|
||||
/** SET_BSRP configuration for MLAN_11AXCMD_SET_BSRP_SUBID */
|
||||
mlan_ds_11ax_set_bsrp_cmd setbsrp_cfg;
|
||||
/* MLAN_11AXCMD_LLDE_SUBID */
|
||||
mlan_ds_11ax_llde_cmd llde_cfg;
|
||||
} param;
|
||||
} mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg;
|
||||
|
||||
|
@ -4583,6 +4589,39 @@ typedef struct _mlan_ds_misc_rx_abort_cfg_ext {
|
|||
t_u8 edmac_enable;
|
||||
} mlan_ds_misc_rx_abort_cfg_ext;
|
||||
|
||||
/** Type definition of mlan_ds_misc_nav_mitigation
|
||||
* for MLAN_OID_MISC_NAV_MITIGATION
|
||||
*/
|
||||
typedef struct _mlan_ds_misc_nav_mitigation {
|
||||
/** start/stop nav mitigation */
|
||||
t_u16 start_nav_mitigation;
|
||||
/** Duration value in us to set as threshold in ACT_SET action */
|
||||
t_u16 threshold;
|
||||
/** Counter for NAV mitigation detected */
|
||||
t_u16 detect_cnt;
|
||||
/** Counter for NAV mitigation stopped */
|
||||
t_u16 stop_cnt;
|
||||
|
||||
} mlan_ds_misc_nav_mitigation;
|
||||
|
||||
#define MAX_FW_STATES 6
|
||||
typedef struct _mlan_ds_led_behavior {
|
||||
t_u8 firmwarestate;
|
||||
t_u8 ledstate;
|
||||
t_u8 ledargs;
|
||||
} mlan_ds_misc_led_behavior;
|
||||
|
||||
/** Type definition of mlan_ds_misc_led_cfg
|
||||
* for MLAN_OID_MISC_LED_CONFIG
|
||||
*/
|
||||
typedef struct _mlan_ds_misc_led_cfg {
|
||||
t_u32 sub_command;
|
||||
t_u8 enable;
|
||||
/** tlv len */
|
||||
t_u16 led_cfg_len;
|
||||
mlan_ds_misc_led_behavior misc_led_behvr[MAX_FW_STATES];
|
||||
} mlan_ds_misc_led_cfg;
|
||||
|
||||
/** Type definition of mlan_ds_misc_rx_abort_cfg_ext
|
||||
* for MLAN_OID_MISC_TX_AMDPU_PROT_MODE
|
||||
*/
|
||||
|
@ -6075,6 +6114,13 @@ typedef struct _mlan_ds_cross_chip_synch {
|
|||
t_u32 init_tsf_high;
|
||||
} mlan_ds_cross_chip_synch;
|
||||
|
||||
typedef struct _mlan_ds_reorder_flush_time {
|
||||
/** AC BK/BE_flush time*/
|
||||
t_u16 flush_time_ac_be_bk;
|
||||
/** AC VI/VO flush time */
|
||||
t_u16 flush_time_ac_vi_vo;
|
||||
} mlan_ds_reorder_flush_time;
|
||||
|
||||
/** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */
|
||||
typedef struct _mlan_ds_misc_cfg {
|
||||
/** Sub-command */
|
||||
|
@ -6142,8 +6188,6 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
#endif
|
||||
/** Hotspot config param set */
|
||||
t_u32 hotspot_cfg;
|
||||
/** Multi AP flag */
|
||||
t_u8 multi_ap_flag;
|
||||
#ifdef STA_SUPPORT
|
||||
ExtCap_t ext_cap;
|
||||
#endif
|
||||
|
@ -6214,6 +6258,8 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
mlan_ds_misc_rx_abort_cfg rx_abort_cfg;
|
||||
mlan_ds_misc_ofdm_desense_cfg ofdm_desense_cfg;
|
||||
mlan_ds_misc_rx_abort_cfg_ext rx_abort_cfg_ext;
|
||||
mlan_ds_misc_nav_mitigation nav_mitigation;
|
||||
mlan_ds_misc_led_cfg led_config;
|
||||
mlan_ds_misc_tx_ampdu_prot_mode tx_ampdu_prot_mode;
|
||||
mlan_ds_misc_rate_adapt_cfg rate_adapt_cfg;
|
||||
mlan_ds_misc_cck_desense_cfg cck_desense_cfg;
|
||||
|
@ -6242,6 +6288,7 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
t_u32 ips_ctrl;
|
||||
mlan_ds_ch_load ch_load;
|
||||
mlan_ds_cross_chip_synch cross_chip_synch;
|
||||
mlan_ds_reorder_flush_time flush_time;
|
||||
} param;
|
||||
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;
|
||||
|
||||
|
|
|
@ -39,9 +39,6 @@ Change log:
|
|||
#include "mlan_11ac.h"
|
||||
#include "mlan_11ax.h"
|
||||
#include "mlan_11h.h"
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
#include "authenticator_api.h"
|
||||
#endif
|
||||
/********************************************************
|
||||
Local Constants
|
||||
********************************************************/
|
||||
|
@ -1041,9 +1038,6 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
t_u32 rates_size;
|
||||
t_u16 tmp_cap;
|
||||
t_u8 *pos;
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
void *rsn_wpa_ie_tmp = MNULL;
|
||||
#endif
|
||||
t_u8 ft_akm = 0;
|
||||
t_u8 oper_class;
|
||||
t_u8 oper_class_flag = MFALSE;
|
||||
|
@ -1051,7 +1045,6 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
MrvlIEtypes_HostMlme_t *host_mlme_tlv = MNULL;
|
||||
MrvlIEtypes_PrevBssid_t *prev_bssid_tlv = MNULL;
|
||||
t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = {0};
|
||||
MrvlIEtypes_MultiAp_t *multi_ap_tlv = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -1258,25 +1251,11 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
psecurity_cfg_ie->header.len;
|
||||
psecurity_cfg_ie->header.len =
|
||||
wlan_cpu_to_le16(psecurity_cfg_ie->header.len);
|
||||
}
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
else if (supplicantIsEnabled(pmpriv->psapriv)) {
|
||||
supplicantClrEncryptKey(pmpriv->psapriv);
|
||||
|
||||
if (pbss_desc->prsn_ie)
|
||||
rsn_wpa_ie_tmp = pbss_desc->prsn_ie;
|
||||
else if (pbss_desc->pwpa_ie)
|
||||
rsn_wpa_ie_tmp = pbss_desc->pwpa_ie;
|
||||
prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos;
|
||||
pos += supplicantFormatRsnWpaTlv(
|
||||
pmpriv->psapriv, rsn_wpa_ie_tmp, prsn_ie_tlv);
|
||||
}
|
||||
#endif
|
||||
else if (pmpriv->sec_info.ewpa_enabled ||
|
||||
(pbss_desc->owe_transition_mode ==
|
||||
OWE_TRANS_MODE_OWE) ||
|
||||
(pmpriv->sec_info.authentication_mode ==
|
||||
MLAN_AUTH_MODE_OWE)) {
|
||||
} else if (pmpriv->sec_info.ewpa_enabled ||
|
||||
(pbss_desc->owe_transition_mode ==
|
||||
OWE_TRANS_MODE_OWE) ||
|
||||
(pmpriv->sec_info.authentication_mode ==
|
||||
MLAN_AUTH_MODE_OWE)) {
|
||||
prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos;
|
||||
if (pbss_desc->pwpa_ie) {
|
||||
prsn_ie_tlv->header.type =
|
||||
|
@ -1448,6 +1427,13 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
wlan_11ax_bandconfig_allowed(pmpriv, pbss_desc))
|
||||
wlan_cmd_append_11ax_tlv(pmpriv, pbss_desc, &pos);
|
||||
|
||||
if ((!pbss_desc->disable_11n) &&
|
||||
(ISSUPP_11NENABLED(pmadapter->fw_cap_info) ||
|
||||
ISSUPP_11ACENABLED(pmadapter->fw_cap_info) ||
|
||||
IS_FW_SUPPORT_11AX(pmadapter))) {
|
||||
PRINTM(MCMND, "STBC NOT supported, Will be disabled\n");
|
||||
}
|
||||
|
||||
wlan_wmm_process_association_req(pmpriv, &pos, &pbss_desc->wmm_ie);
|
||||
if (pmpriv->sec_info.wapi_enabled && pmpriv->wapi_ie_len)
|
||||
wlan_cmd_append_wapi_ie(pmpriv, &pos);
|
||||
|
@ -1488,18 +1474,6 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
pos += sizeof(prev_bssid_tlv->header) + MLAN_MAC_ADDR_LENGTH;
|
||||
}
|
||||
|
||||
if (pmpriv->multi_ap_flag) {
|
||||
multi_ap_tlv = (MrvlIEtypes_MultiAp_t *)pos;
|
||||
multi_ap_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_MULTI_AP);
|
||||
multi_ap_tlv->header.len = sizeof(multi_ap_tlv->flag);
|
||||
multi_ap_tlv->flag = pmpriv->multi_ap_flag;
|
||||
PRINTM(MINFO, " TLV multi_ap_flag : 0x%x\n",
|
||||
multi_ap_tlv->flag);
|
||||
pos += sizeof(multi_ap_tlv->header) + multi_ap_tlv->header.len;
|
||||
multi_ap_tlv->header.len =
|
||||
wlan_cpu_to_le16(sizeof(multi_ap_tlv->flag));
|
||||
}
|
||||
|
||||
if (wlan_11d_create_dnld_countryinfo(pmpriv, pbss_desc->bss_band)) {
|
||||
PRINTM(MERROR, "Dnld_countryinfo_11d failed\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
@ -1715,7 +1689,6 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
|||
|
||||
/* Send a Media Connected event, according to the Spec */
|
||||
pmpriv->media_connected = MTRUE;
|
||||
pmpriv->multi_ap_flag = 0;
|
||||
pmpriv->adapter->pps_uapsd_mode = MFALSE;
|
||||
pmpriv->adapter->tx_lock_flag = MFALSE;
|
||||
pmpriv->adapter->delay_null_pkt = MFALSE;
|
||||
|
@ -1857,11 +1830,7 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
|||
|
||||
if (!pmpriv->sec_info.wpa_enabled && !pmpriv->sec_info.wpa2_enabled &&
|
||||
!pmpriv->sec_info.ewpa_enabled && !pmpriv->sec_info.wapi_enabled &&
|
||||
!pmpriv->wps.session_enable && !pmpriv->sec_info.osen_enabled
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
&& !supplicantIsEnabled(pmpriv->psapriv)
|
||||
#endif
|
||||
) {
|
||||
!pmpriv->wps.session_enable && !pmpriv->sec_info.osen_enabled) {
|
||||
/* We are in Open/WEP mode, open port immediately */
|
||||
if (pmpriv->port_ctrl_mode == MTRUE) {
|
||||
pmpriv->port_open = MTRUE;
|
||||
|
@ -1870,22 +1839,9 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
|||
}
|
||||
if (pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.wpa2_enabled ||
|
||||
pmpriv->sec_info.ewpa_enabled || pmpriv->sec_info.wapi_enabled ||
|
||||
pmpriv->wps.session_enable || pmpriv->sec_info.osen_enabled
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
|| (supplicantIsEnabled(pmpriv->psapriv))
|
||||
#endif
|
||||
)
|
||||
pmpriv->wps.session_enable || pmpriv->sec_info.osen_enabled)
|
||||
pmpriv->adapter->scan_block = MTRUE;
|
||||
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
supplicantInitSession(
|
||||
pmpriv->psapriv,
|
||||
(t_u8 *)&pmpriv->curr_bss_params.bss_descriptor.ssid.ssid,
|
||||
pmpriv->curr_bss_params.bss_descriptor.ssid.ssid_len,
|
||||
(t_u8 *)&pmpriv->curr_bss_params.bss_descriptor.mac_address,
|
||||
(t_u8 *)&pmpriv->curr_addr);
|
||||
#endif
|
||||
|
||||
pevent = (mlan_event *)event_buf;
|
||||
memset(pmadapter, event_buf, 0, sizeof(event_buf));
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* in MLAN module.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2022 NXP
|
||||
* Copyright 2008-2023 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
@ -558,14 +558,6 @@ extern t_void (*assert_callback)(t_void *pmoal_handle, t_u32 cond);
|
|||
/** Type vdll */
|
||||
#define MLAN_TYPE_VDLL 4
|
||||
#ifdef SDIO
|
||||
/** Type single port aggr data */
|
||||
#define MLAN_TYPE_SPA_DATA 10
|
||||
/** OFFSET of 512 block number */
|
||||
#define OFFSET_OF_BLOCK_NUMBER 15
|
||||
/** OFFSET of SDIO Header */
|
||||
#define OFFSET_OF_SDIO_HEADER 28
|
||||
/** sdio max rx size for cmd53, 255 * 256, reserve 1 block for DMA alignment */
|
||||
#define SDIO_CMD53_MAX_SIZE 65280
|
||||
#define MAX_SUPPORT_AMSDU_SIZE 4096
|
||||
/** Maximum numbfer of registers to read for multiple port */
|
||||
#define MAX_MP_REGS 196
|
||||
|
@ -668,6 +660,12 @@ typedef struct _wlan_dbg {
|
|||
t_u16 last_event_index;
|
||||
/** Number of no free command node */
|
||||
t_u16 num_no_cmd_node;
|
||||
/** num_assoc_cmd_error, count result 4 error */
|
||||
t_u16 num_assoc_err;
|
||||
/** num_scan_cmd_error, count result 4 error */
|
||||
t_u16 num_scan_err;
|
||||
/** num_remain_on_channel_cmd_error, count result 4 error */
|
||||
t_u16 num_remain_chan_err;
|
||||
} wlan_dbg;
|
||||
|
||||
/** Hardware status codes */
|
||||
|
@ -702,11 +700,6 @@ typedef enum _PS_STATE {
|
|||
PS_STATE_SLEEP
|
||||
} PS_STATE;
|
||||
|
||||
/** Minimum flush timer for win size of 1 is 50 ms */
|
||||
#define MIN_FLUSH_TIMER_MS 50
|
||||
/** Minimum flush timer for win size of 1 is 15 ms */
|
||||
#define MIN_FLUSH_TIMER_15_MS 15
|
||||
|
||||
/** Tx BA stream table */
|
||||
typedef struct _TxBAStreamTbl TxBAStreamTbl;
|
||||
|
||||
|
@ -740,7 +733,9 @@ typedef struct _txAggr_t {
|
|||
typedef enum _baStatus_e {
|
||||
BA_STREAM_NOT_SETUP = 0,
|
||||
BA_STREAM_SETUP_INPROGRESS,
|
||||
BA_STREAM_SETUP_COMPLETE
|
||||
BA_STREAM_SETUP_SENT_ADDBA,
|
||||
BA_STREAM_SETUP_COMPLETE,
|
||||
BA_STREAM_SENT_DELBA,
|
||||
} baStatus_e;
|
||||
|
||||
/** RA list table */
|
||||
|
@ -1332,7 +1327,6 @@ typedef struct _mlan_private {
|
|||
/** IP address */
|
||||
t_u8 ip_addr[IPADDR_LEN];
|
||||
t_u32 hotspot_cfg;
|
||||
t_u8 multi_ap_flag;
|
||||
#ifdef STA_SUPPORT
|
||||
ExtCap_t ext_cap;
|
||||
ExtCap_t def_ext_cap;
|
||||
|
@ -1347,9 +1341,6 @@ typedef struct _mlan_private {
|
|||
#endif
|
||||
/** Control TX AMPDU on infra link */
|
||||
t_u8 txaggrctrl;
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
t_void *psapriv;
|
||||
#endif
|
||||
/** rx per packet info */
|
||||
t_u8 rx_pkt_info;
|
||||
/** received amsdu count*/
|
||||
|
@ -1406,12 +1397,14 @@ typedef struct {
|
|||
mlan_private *priv;
|
||||
} reorder_tmr_cnxt_t;
|
||||
|
||||
#define MLAN_SET_BIT(x, val) ((x) |= (1U << (val)))
|
||||
#define MLAN_CLEAR_BIT(x, val) ((x) &= ~(1U << (val)))
|
||||
#define MLAN_SET_BIT(x, val) ((x) |= (1UL << (val)))
|
||||
#define MLAN_CLEAR_BIT(x, val) ((x) &= ~(1UL << (val)))
|
||||
/** default RX reorder table flush time 128 ms for AC_VI, AC_VO*/
|
||||
#define DEF_FLUSH_TIME_AC_VI_VO 128
|
||||
/** default RX reorder table flush time 500 ms for AC_BE, AC_BK*/
|
||||
#define DEF_FLUSH_TIME_AC_BE_BK 500
|
||||
/** default RX reorder table flush time 512 ms for AC_BE, AC_BK*/
|
||||
#define DEF_FLUSH_TIME_AC_BE_BK 512
|
||||
/** minimal AMPDU flush time */
|
||||
#define MIN_FLUSH_TIME 100
|
||||
/** RX reorder table */
|
||||
struct _RxReorderTbl {
|
||||
/** RxReorderTbl previous node */
|
||||
|
@ -1586,12 +1579,7 @@ struct _sta_node {
|
|||
t_u8 tx_pause;
|
||||
/** station band mode */
|
||||
t_u16 bandmode;
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
t_void *cm_connectioninfo;
|
||||
#endif
|
||||
sta_stats stats;
|
||||
/** station aid */
|
||||
t_u16 aid;
|
||||
};
|
||||
|
||||
/** 802.11h State information kept in the 'mlan_adapter' driver structure */
|
||||
|
@ -2104,10 +2092,6 @@ typedef struct _mlan_sdio_card {
|
|||
/** GPIO interrupt pin number */
|
||||
t_u32 gpio_pin;
|
||||
|
||||
/** flag for sdio rx aggr */
|
||||
t_bool sdio_rx_aggr_enable;
|
||||
/** fw rx block size */
|
||||
t_u16 sdio_rx_block_size;
|
||||
} mlan_sdio_card, *pmlan_sdio_card;
|
||||
#endif
|
||||
|
||||
|
@ -2307,7 +2291,7 @@ typedef struct _adapter_operations {
|
|||
/**interrupt handler*/
|
||||
mlan_status (*interrupt)(t_u16 msg_id, pmlan_adapter pmadapter);
|
||||
/**INT process handler*/
|
||||
mlan_status (*process_int_status)(pmlan_adapter pmadapter);
|
||||
mlan_status (*process_int_status)(pmlan_adapter pmadapter, t_u8 type);
|
||||
/**host to card handler*/
|
||||
mlan_status (*host_to_card)(pmlan_private pmpriv, t_u8 type,
|
||||
mlan_buffer *pmbuf,
|
||||
|
@ -2358,6 +2342,16 @@ struct _mlan_adapter {
|
|||
t_void *pmlan_lock;
|
||||
/** main_proc_lock for main_process */
|
||||
t_void *pmain_proc_lock;
|
||||
#ifdef PCIE
|
||||
/** rx data lock to synchronize wlan_pcie_process_recv_data */
|
||||
t_void *pmlan_rx_lock;
|
||||
/** tx data lock to synchronize send_data and send_data_complete */
|
||||
t_void *pmlan_tx_lock;
|
||||
/** event lock to synchronize process_event and event_ready */
|
||||
t_void *pmlan_event_lock;
|
||||
/** pcie lock to synchronize rxbd_wr_ptr and txbd_wr_ptr */
|
||||
t_void *pmlan_pcie_lock;
|
||||
#endif
|
||||
/** mlan_processing */
|
||||
t_u32 mlan_processing;
|
||||
/** main_process_cnt */
|
||||
|
@ -2376,6 +2370,10 @@ struct _mlan_adapter {
|
|||
t_u32 more_task_flag;
|
||||
/** delay task flag */
|
||||
t_u32 delay_task_flag;
|
||||
#ifdef PCIE
|
||||
/** delay rx data */
|
||||
t_u32 delay_rx_data_flag;
|
||||
#endif
|
||||
/** Max tx buf size */
|
||||
t_u16 max_tx_buf_size;
|
||||
/** Tx buf size */
|
||||
|
@ -2859,21 +2857,25 @@ struct _mlan_adapter {
|
|||
t_u8 tx_power_table_a_cols;
|
||||
/**mlan adapter operations*/
|
||||
mlan_adapter_operations ops;
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
/** authenticator_priv */
|
||||
pmlan_private authenticator_priv;
|
||||
#endif
|
||||
/** TP accounting mode 1-enable 0-disable */
|
||||
t_u32 tp_state_on;
|
||||
/** Packet drop point */
|
||||
t_u32 tp_state_drop_point;
|
||||
/** second mac flag */
|
||||
t_u8 second_mac;
|
||||
/** napi */
|
||||
t_u8 napi;
|
||||
/* lower 8 bytes of uuid */
|
||||
t_u64 uuid_lo;
|
||||
|
||||
/* higher 8 bytes of uuid */
|
||||
t_u64 uuid_hi;
|
||||
/** AC BK/BE_flush time*/
|
||||
t_u16 flush_time_ac_be_bk;
|
||||
/** AC VI/VO flush time */
|
||||
t_u16 flush_time_ac_vi_vo;
|
||||
/** remain_on_channel flag */
|
||||
t_u8 remain_on_channel;
|
||||
};
|
||||
|
||||
/** Check if stream 2X2 enabled */
|
||||
|
@ -3475,6 +3477,9 @@ mlan_status wlan_cmd_802_11_scan(pmlan_private pmpriv, HostCmd_DS_COMMAND *pcmd,
|
|||
mlan_status wlan_ret_802_11_scan(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
t_void *pioctl_buf);
|
||||
|
||||
mlan_status wlan_scan_ioctl(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
t_u8 wlan_get_ext_scan_state(HostCmd_DS_COMMAND *pcmd);
|
||||
/** Extended scan command handler */
|
||||
mlan_status wlan_cmd_802_11_scan_ext(pmlan_private pmpriv,
|
||||
|
@ -3628,9 +3633,19 @@ mlan_status wlan_ret_ofdmdesense_cfg(pmlan_private pmpriv,
|
|||
mlan_status wlan_cmd_rxabortcfg_ext(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action,
|
||||
t_void *pdata_buf);
|
||||
mlan_status wlan_cmd_nav_mitigation(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action,
|
||||
t_void *pdata_buf);
|
||||
mlan_status wlan_cmd_led_config(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf);
|
||||
mlan_status wlan_ret_rxabortcfg_ext(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
mlan_status wlan_ret_nav_mitigation(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
mlan_status wlan_ret_led_config(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
mlan_status wlan_cmd_tx_ampdu_prot_mode(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf);
|
||||
|
@ -3677,6 +3692,10 @@ mlan_status wlan_misc_ioctl_ofdmdesense_cfg(pmlan_adapter pmadapter,
|
|||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_misc_ioctl_rxabortcfg_ext(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_misc_ioctl_nav_mitigation(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_misc_ioctl_led(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_misc_ioctl_tx_ampdu_prot_mode(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_misc_ioctl_dot11mc_unassoc_ftm_cfg(pmlan_adapter pmadapter,
|
||||
|
@ -3781,6 +3800,10 @@ mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, t_u16 band,
|
|||
mlan_status wlan_11d_cfg_domain_info(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req);
|
||||
|
||||
/** This functionn set/get reorder flush time */
|
||||
mlan_status wlan_misc_ioctl_reorder_flush_time(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req);
|
||||
|
||||
/** This function converts region string to CFP table code */
|
||||
mlan_status wlan_misc_country_2_cfp_table_code(pmlan_adapter pmadapter,
|
||||
t_u8 *country_code, t_u8 *cfp_bg,
|
||||
|
@ -3926,8 +3949,6 @@ static inline t_u8 wlan_is_port_ready(pmlan_adapter pmadapter, t_u32 port_index)
|
|||
return MTRUE;
|
||||
}
|
||||
#endif
|
||||
mlan_status wlan_check_easymesh_pkt(mlan_private *priv, pmlan_buffer pmbuf,
|
||||
RxPD *prx_pd);
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
mlan_status wlan_process_uap_rx_packet(mlan_private *priv, pmlan_buffer pmbuf);
|
||||
|
@ -3948,10 +3969,6 @@ mlan_status wlan_cmd_get_hw_spec(pmlan_private pmpriv,
|
|||
mlan_status wlan_ret_get_hw_spec(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
t_void *pioctl_buf);
|
||||
#ifdef SDIO
|
||||
mlan_status wlan_cmd_sdio_rx_aggr_cfg(HostCmd_DS_COMMAND *pcmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf);
|
||||
mlan_status wlan_ret_sdio_rx_aggr_cfg(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp);
|
||||
#endif
|
||||
|
||||
mlan_status wlan_misc_ioctl_mac_control(pmlan_adapter pmadapter,
|
||||
|
@ -4079,15 +4096,10 @@ mlan_status wlan_set_drvdbg(pmlan_adapter pmadapter,
|
|||
mlan_status wlan_misc_hotspot_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
mlan_status wlan_misc_multi_ap_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
mlan_status wlan_misc_ext_capa_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
t_u32 wlan_is_ext_capa_support(mlan_private *pmpriv);
|
||||
#endif
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
void wlan_add_ext_capa_info_ie(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||
|
@ -4100,14 +4112,6 @@ mlan_status wlan_cmd_boot_sleep(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
mlan_status wlan_ret_boot_sleep(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
mlan_status wlan_cmd_crypto(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_u16 *pdata_buf);
|
||||
|
||||
mlan_status wlan_ret_crypto(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
#endif
|
||||
|
||||
#define BW_20MHZ 0
|
||||
#define BW_40MHZ 1
|
||||
#define BW_80MHZ 2
|
||||
|
@ -4426,6 +4430,23 @@ static INLINE t_u32 wlan_isspace(t_u8 chr)
|
|||
return chr <= ' ' && (chr == ' ' || (chr <= 13 && chr >= 9));
|
||||
}
|
||||
|
||||
static INLINE const char *wlan_str_skip_prefix(const char *str,
|
||||
const char *prefix)
|
||||
{
|
||||
const char *substr = str;
|
||||
|
||||
while (*substr && *substr == *prefix) {
|
||||
substr++;
|
||||
prefix++;
|
||||
}
|
||||
|
||||
if (*substr && !*prefix) {
|
||||
str = substr;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
/** delay unit */
|
||||
typedef enum _delay_unit {
|
||||
USEC,
|
||||
|
|
|
@ -39,9 +39,6 @@ Change Log:
|
|||
#ifdef UAP_SUPPORT
|
||||
#include "mlan_uap.h"
|
||||
#endif
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
#include "authenticator_api.h"
|
||||
#endif
|
||||
/********************************************************
|
||||
Local Variables
|
||||
********************************************************/
|
||||
|
@ -564,8 +561,6 @@ mlan_status wlan_get_info_debug_info(pmlan_adapter pmadapter,
|
|||
debug_info->mpa_buf = pmadapter->pcard_sd->mpa_buf;
|
||||
debug_info->mpa_buf_size =
|
||||
pmadapter->pcard_sd->mpa_buf_size;
|
||||
debug_info->sdio_rx_aggr =
|
||||
pmadapter->pcard_sd->sdio_rx_aggr_enable;
|
||||
memcpy_ext(pmadapter, debug_info->mpa_rx_count,
|
||||
pmadapter->pcard_sd->mpa_rx_count,
|
||||
sizeof(pmadapter->pcard_sd->mpa_rx_count),
|
||||
|
@ -1603,7 +1598,7 @@ mlan_status wlan_misc_ioctl_custom_ie_list(pmlan_adapter pmadapter,
|
|||
#ifdef UAP_SUPPORT
|
||||
else if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) {
|
||||
ret = wlan_prepare_cmd(
|
||||
pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, cmd_action, 0,
|
||||
pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE, cmd_action, 0,
|
||||
(send_ioctl) ? (t_void *)pioctl_req : MNULL,
|
||||
(send_ioctl) ? MNULL : &misc->param.cust_ie);
|
||||
}
|
||||
|
@ -1839,12 +1834,6 @@ sta_node *wlan_add_station_entry(mlan_private *priv, t_u8 *mac)
|
|||
(pmlan_linked_list)sta_ptr,
|
||||
priv->adapter->callbacks.moal_spin_lock,
|
||||
priv->adapter->callbacks.moal_spin_unlock);
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) &&
|
||||
IsAuthenticatorEnabled(priv->psapriv))
|
||||
authenticator_init_client(priv->psapriv,
|
||||
&sta_ptr->cm_connectioninfo, mac);
|
||||
#endif
|
||||
done:
|
||||
LEAVE();
|
||||
return sta_ptr;
|
||||
|
@ -1865,12 +1854,6 @@ t_void wlan_delete_station_entry(mlan_private *priv, t_u8 *mac)
|
|||
ENTER();
|
||||
sta_ptr = wlan_get_station_entry(priv, mac);
|
||||
if (sta_ptr) {
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) &&
|
||||
IsAuthenticatorEnabled(priv->psapriv))
|
||||
authenticator_free_client(priv->psapriv,
|
||||
sta_ptr->cm_connectioninfo);
|
||||
#endif
|
||||
util_unlink_list(priv->adapter->pmoal_handle, &priv->sta_list,
|
||||
(pmlan_linked_list)sta_ptr,
|
||||
priv->adapter->callbacks.moal_spin_lock,
|
||||
|
@ -1899,12 +1882,6 @@ t_void wlan_delete_station_list(pmlan_private priv)
|
|||
priv->adapter->pmoal_handle, &priv->sta_list,
|
||||
priv->adapter->callbacks.moal_spin_lock,
|
||||
priv->adapter->callbacks.moal_spin_unlock))) {
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) &&
|
||||
IsAuthenticatorEnabled(priv->psapriv))
|
||||
authenticator_free_client(priv->psapriv,
|
||||
sta_ptr->cm_connectioninfo);
|
||||
#endif
|
||||
priv->adapter->callbacks.moal_mfree(priv->adapter->pmoal_handle,
|
||||
(t_u8 *)sta_ptr);
|
||||
}
|
||||
|
@ -2946,7 +2923,7 @@ exit:
|
|||
mlan_status wlan_config_rtt(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
pmlan_private pmpriv = MNULL;
|
||||
mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
@ -2957,6 +2934,8 @@ mlan_status wlan_config_rtt(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
|
||||
pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
|
||||
/* Send request to firmware */
|
||||
|
@ -2983,7 +2962,7 @@ exit:
|
|||
mlan_status wlan_cancel_rtt(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
pmlan_private pmpriv = MNULL;
|
||||
mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
@ -2994,6 +2973,8 @@ mlan_status wlan_cancel_rtt(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
|
||||
pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
|
||||
/* Send request to firmware */
|
||||
|
@ -3021,7 +3002,7 @@ mlan_status wlan_rtt_responder_cfg(pmlan_adapter pmadapter,
|
|||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
pmlan_private pmpriv = MNULL;
|
||||
mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
@ -3032,6 +3013,8 @@ mlan_status wlan_rtt_responder_cfg(pmlan_adapter pmadapter,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
|
||||
pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
|
||||
/* Send request to firmware */
|
||||
|
@ -3065,7 +3048,7 @@ mlan_status wlan_get_tx_rx_histogram(pmlan_adapter pmadapter,
|
|||
ENTER();
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_TX_RX_PKT_STATS,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TX_RX_PKT_STATS,
|
||||
HostCmd_ACT_GEN_GET, 0, (t_void *)pioctl_req,
|
||||
&(pmisc->param.tx_rx_histogram));
|
||||
|
||||
|
@ -3426,7 +3409,6 @@ mlan_status wlan_process_802dot11_mgmt_pkt(mlan_private *priv, t_u8 *payload,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/**
|
||||
* @brief Extended capabilities configuration
|
||||
*
|
||||
|
@ -3487,7 +3469,6 @@ t_u32 wlan_is_ext_capa_support(mlan_private *pmpriv)
|
|||
return MFALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set hotspot enable/disable
|
||||
|
@ -3515,32 +3496,6 @@ mlan_status wlan_misc_hotspot_cfg(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set multi ap flag
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
mlan_status wlan_misc_multi_ap_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (MLAN_ACT_GET == pioctl_req->action)
|
||||
misc->param.multi_ap_flag = pmpriv->multi_ap_flag;
|
||||
else if (MLAN_ACT_SET == pioctl_req->action)
|
||||
pmpriv->multi_ap_flag = misc->param.multi_ap_flag;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/**
|
||||
* @brief This function check if we should enable beacon protection support
|
||||
|
@ -3856,13 +3811,6 @@ void wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent,
|
|||
sta_ptr->bandmode = BAND_G;
|
||||
} else
|
||||
sta_ptr->bandmode = BAND_A;
|
||||
#endif
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (IsAuthenticatorEnabled(priv->psapriv))
|
||||
authenticator_get_sta_security_info(
|
||||
priv->psapriv,
|
||||
sta_ptr->cm_connectioninfo,
|
||||
assoc_req_ie, ie_len);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -4144,7 +4092,7 @@ mlan_status wlan_radio_ioctl_ant_cfg(pmlan_adapter pmadapter,
|
|||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type) ||
|
||||
IS_CARDIW62X(pmadapter->card_type)) {
|
||||
IS_CARDIW624(pmadapter->card_type)) {
|
||||
ant_cfg->tx_antenna &= 0x0303;
|
||||
ant_cfg->rx_antenna &= 0x0303;
|
||||
/** 2G antcfg TX */
|
||||
|
@ -4742,6 +4690,16 @@ mlan_status wlan_radio_ioctl_remain_chan_cfg(pmlan_adapter pmadapter,
|
|||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET) {
|
||||
if (pmpriv->adapter->remain_on_channel &&
|
||||
!radio_cfg->param.remain_chan.remove) {
|
||||
PRINTM(MCMND, "Ignore New Remain on channe: chan=%d\n",
|
||||
radio_cfg->param.remain_chan.channel);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_REMAIN_ON_CHANNEL,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
|
@ -4782,7 +4740,7 @@ mlan_status wlan_bss_ioctl_wifi_direct_mode(pmlan_adapter pmadapter,
|
|||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_WIFI_DIRECT_MODE_CONFIG,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WIFI_DIRECT_MODE_CONFIG,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&bss->param.wfd_mode);
|
||||
|
||||
|
@ -4818,8 +4776,8 @@ mlan_status wlan_misc_p2p_config(pmlan_adapter pmadapter,
|
|||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_P2P_PARAMS_CONFIG, cmd_action,
|
||||
0, (t_void *)pioctl_req,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_P2P_PARAMS_CONFIG,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&misc_cfg->param.p2p_config);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -4855,7 +4813,7 @@ mlan_status wlan_misc_gpio_tsf_latch_config(pmlan_adapter pmadapter,
|
|||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_GPIO_TSF_LATCH_PARAM_CONFIG,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&misc_cfg->param.gpio_tsf_latch_config);
|
||||
|
||||
|
@ -4888,7 +4846,7 @@ mlan_status wlan_misc_get_tsf_info(pmlan_adapter pmadapter,
|
|||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_GPIO_TSF_LATCH_PARAM_CONFIG,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&misc_cfg->param.tsf_info);
|
||||
|
||||
|
@ -5283,8 +5241,9 @@ mlan_status wlan_misc_ioctl_dfs_repeater_cfg(pmlan_adapter pmadapter,
|
|||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_DFS_REPEATER_MODE, cmd_action, 0,
|
||||
(t_void *)pioctl_req, &misc->param.dfs_repeater);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_DFS_REPEATER_MODE,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&misc->param.dfs_repeater);
|
||||
|
||||
done:
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -5314,7 +5273,7 @@ mlan_status wlan_misc_ioctl_low_pwr_mode(pmlan_adapter pmadapter,
|
|||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCMD_CONFIG_LOW_POWER_MODE,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_CONFIG_LOW_POWER_MODE,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
&misc->param.low_pwr_mode);
|
||||
|
||||
|
@ -5342,7 +5301,7 @@ mlan_status wlan_misc_ioctl_pmic_configure(pmlan_adapter pmadapter,
|
|||
ENTER();
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_PMIC_CONFIGURE,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_PMIC_CONFIGURE,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
MNULL);
|
||||
|
||||
|
@ -5955,8 +5914,8 @@ mlan_status wlan_misc_ioctl_mef_flt_cfg(pmlan_adapter pmadapter,
|
|||
pmadapter))
|
||||
PRINTM(MERROR,
|
||||
"Set MEF Entries Error\n");
|
||||
} else if (!(mef_cfg->op_code &
|
||||
MLAN_IPADDR_OP_IP_REMOVE)) {
|
||||
} else if (mef_cfg->op_code ==
|
||||
MLAN_IPADDR_OP_IP_REMOVE) {
|
||||
pmef->enable_autoarp_entry = 0;
|
||||
pmef->num_wowlan_entry = 0;
|
||||
pmef->num_ipv6_ns_offload = 0;
|
||||
|
@ -6015,24 +5974,6 @@ mlan_status wlan_sec_ioctl_passphrase(pmlan_adapter pmadapter,
|
|||
ENTER();
|
||||
|
||||
sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf;
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA &&
|
||||
!IS_FW_SUPPORT_SUPPLICANT(pmpriv->adapter)) {
|
||||
if (sec->param.passphrase.psk_type == MLAN_PSK_QUERY)
|
||||
SupplicantQueryPassphrase(
|
||||
pmpriv->psapriv,
|
||||
(void *)&sec->param.passphrase);
|
||||
else if (sec->param.passphrase.psk_type == MLAN_PSK_CLEAR)
|
||||
SupplicantClearPMK(pmpriv->psapriv,
|
||||
(void *)&sec->param.passphrase);
|
||||
else
|
||||
SupplicantSetPassphrase(pmpriv->psapriv,
|
||||
(void *)&sec->param.passphrase);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!IS_FW_SUPPORT_SUPPLICANT(pmpriv->adapter)) {
|
||||
LEAVE();
|
||||
|
@ -6254,6 +6195,7 @@ mlan_status wlan_misc_chan_reg_cfg(pmlan_adapter pmadapter,
|
|||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_misc_cfg *misc_cfg = MNULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u16 cmd_action = 0;
|
||||
|
||||
|
@ -6263,9 +6205,25 @@ mlan_status wlan_misc_chan_reg_cfg(pmlan_adapter pmadapter,
|
|||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
else {
|
||||
PRINTM(MERROR, "No support set channel region cfg!");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
misc_cfg = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
if (misc_cfg &&
|
||||
misc_cfg->param.custom_reg_domain.region.country_code[0] != '\0' &&
|
||||
misc_cfg->param.custom_reg_domain.region.country_code[1] != '\0') {
|
||||
/* Copy the driver country code in the custom_reg_domain. The
|
||||
* cmd cmd response handler will use it to compare with the FW
|
||||
* country code
|
||||
*/
|
||||
pmadapter->country_code[0] =
|
||||
misc_cfg->param.custom_reg_domain.region.country_code[0];
|
||||
pmadapter->country_code[1] =
|
||||
misc_cfg->param.custom_reg_domain.region.country_code[1];
|
||||
pmadapter->country_code[2] = '\0';
|
||||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_CHAN_REGION_CFG, cmd_action,
|
||||
0, (t_void *)pioctl_req, MNULL);
|
||||
|
@ -6471,8 +6429,8 @@ mlan_status wlan_get_chan_trpc_cfg(pmlan_adapter pmadapter,
|
|||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CHANNEL_TRPC_CONFIG, cmd_action,
|
||||
0, (t_void *)pioctl_req,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_CHANNEL_TRPC_CONFIG,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
(t_void *)&misc->param.trpc_cfg);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -6874,6 +6832,71 @@ mlan_status wlan_misc_ioctl_rxabortcfg_ext(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief nav mitigation parameter
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
mlan_status wlan_misc_ioctl_nav_mitigation(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_misc_cfg *pmisc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u16 cmd_action = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_NAV_MITIGATION_CFG,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&(pmisc->param.nav_mitigation));
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief led config parameter
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
mlan_status wlan_misc_ioctl_led(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_misc_cfg *pmisc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u16 cmd_action = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_LED_CONTROL,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&(pmisc->param.led_config));
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dot11mc unassociated FTM CFG
|
||||
*
|
||||
|
@ -7356,8 +7379,8 @@ mlan_status wlan_misc_ioctl_wacp_mode(IN pmlan_adapter pmadapter,
|
|||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, cmd_action,
|
||||
0, (t_void *)pioctl_req,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
(t_void *)&misc->param.wacp_mode);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -7386,8 +7409,8 @@ mlan_status wlan_misc_ioctl_get_sensor_temp(pmlan_adapter pmadapter,
|
|||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_DS_GET_SENSOR_TEMP, cmd_action,
|
||||
0, (t_void *)pioctl_req, MNULL);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_DS_GET_SENSOR_TEMP,
|
||||
cmd_action, 0, (t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
@ -7464,3 +7487,41 @@ done:
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get/set rx flush time
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req Pointer to the IOCTL request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status wlan_misc_ioctl_reorder_flush_time(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req)
|
||||
{
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET) {
|
||||
if (misc->param.flush_time.flush_time_ac_be_bk >=
|
||||
MIN_FLUSH_TIME)
|
||||
pmadapter->flush_time_ac_be_bk =
|
||||
misc->param.flush_time.flush_time_ac_be_bk;
|
||||
if (misc->param.flush_time.flush_time_ac_vi_vo >=
|
||||
MIN_FLUSH_TIME)
|
||||
pmadapter->flush_time_ac_vi_vo =
|
||||
misc->param.flush_time.flush_time_ac_vi_vo;
|
||||
}
|
||||
misc->param.flush_time.flush_time_ac_be_bk =
|
||||
pmadapter->flush_time_ac_be_bk;
|
||||
misc->param.flush_time.flush_time_ac_vi_vo =
|
||||
pmadapter->flush_time_ac_vi_vo;
|
||||
PRINTM(MCMND, "flush time: BE/BK=%d ms VI/VO=%d ms\n",
|
||||
pmadapter->flush_time_ac_be_bk, pmadapter->flush_time_ac_vi_vo);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,9 @@ Change log:
|
|||
#include <linux/module.h>
|
||||
#include "mlan_decl.h"
|
||||
#include "mlan_ioctl.h"
|
||||
|
||||
#ifdef PCIE
|
||||
EXPORT_SYMBOL(mlan_process_pcie_interrupt_cb);
|
||||
#endif
|
||||
EXPORT_SYMBOL(mlan_register);
|
||||
EXPORT_SYMBOL(mlan_unregister);
|
||||
EXPORT_SYMBOL(mlan_init_fw);
|
||||
|
|
|
@ -154,7 +154,7 @@ static const struct _mlan_pcie_card_reg mlan_reg_pcieaw693 = {
|
|||
.msi_int_wr_clr = MTRUE,
|
||||
};
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIEIW62X)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIEIW624)
|
||||
static const struct _mlan_pcie_card_reg mlan_reg_pcie9097_b0 = {
|
||||
.reg_txbd_rdptr = PCIE9098_TXBD_RDPTR,
|
||||
.reg_txbd_wrptr = PCIE9098_TXBD_WRPTR,
|
||||
|
@ -794,7 +794,7 @@ static mlan_status wlan_disable_pcie_host_int(mlan_adapter *pmadapter)
|
|||
return ret;
|
||||
}
|
||||
if ((pmadapter->card_type == CARD_TYPE_PCIE9098) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIEIW62X) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIEIW624) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIEAW693) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIE9097)) {
|
||||
ret = wlan_pcie_set_host_int_select_mask(pmadapter, MFALSE);
|
||||
|
@ -871,7 +871,7 @@ static mlan_status wlan_enable_pcie_host_int(mlan_adapter *pmadapter)
|
|||
return ret;
|
||||
}
|
||||
if ((pmadapter->card_type == CARD_TYPE_PCIE9098) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIEIW62X) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIEIW624) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIEAW693) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIE9097)) {
|
||||
ret = wlan_pcie_set_host_int_select_mask(pmadapter, MTRUE);
|
||||
|
@ -1871,6 +1871,7 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
|||
adma_dual_desc_buf *padma_bd_buf = MNULL;
|
||||
const t_u32 num_tx_buffs = pmadapter->pcard_pcie->txrx_bd_size;
|
||||
mlan_status ret = MLAN_STATUS_PENDING;
|
||||
mlan_status status;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
t_u32 rxbd_val = 0;
|
||||
t_u32 wrindx;
|
||||
|
@ -1936,6 +1937,9 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
|||
ptx_bd_buf->offset = 0;
|
||||
pmadapter->pcard_pcie->last_tx_pkt_size[wrindx] =
|
||||
pmbuf->data_len;
|
||||
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
pmadapter->pcard_pcie->txbd_wrptr++;
|
||||
if ((pmadapter->pcard_pcie->txbd_wrptr &
|
||||
txrx_rw_ptr_mask) == num_tx_buffs)
|
||||
|
@ -1977,15 +1981,24 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
|||
((pmadapter->pcard_pcie->txbd_wrptr << wr_ptr_start) |
|
||||
rxbd_val));
|
||||
/* Write the TX ring write pointer in to REG_TXBD_WRPTR */
|
||||
if (pcb->moal_write_reg(pmadapter->pmoal_handle, reg_txbd_wrptr,
|
||||
(pmadapter->pcard_pcie->txbd_wrptr
|
||||
<< wr_ptr_start) |
|
||||
rxbd_val)) {
|
||||
status = pcb->moal_write_reg(
|
||||
pmadapter->pmoal_handle, reg_txbd_wrptr,
|
||||
(pmadapter->pcard_pcie->txbd_wrptr << wr_ptr_start) |
|
||||
rxbd_val);
|
||||
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
if (!pmadapter->pcard_pcie->reg->use_adma) {
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
}
|
||||
#endif
|
||||
if (status) {
|
||||
PRINTM(MERROR,
|
||||
"SEND DATA: failed to write REG_TXBD_WRPTR\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done_unmap;
|
||||
}
|
||||
|
||||
PRINTM(MINFO, "SEND DATA: Updated <Rd: %#x, Wr: %#x>\n",
|
||||
pmadapter->pcard_pcie->txbd_rdptr,
|
||||
pmadapter->pcard_pcie->txbd_wrptr);
|
||||
|
@ -2318,6 +2331,9 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
|||
txrx_rw_ptr_rollover_ind);
|
||||
}
|
||||
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
|
||||
/* update rxbd's wrptrs */
|
||||
if ((++pmadapter->pcard_pcie->rxbd_wrptr &
|
||||
txrx_rw_ptr_mask) ==
|
||||
|
@ -2356,10 +2372,18 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
|||
pmadapter->pcard_pcie->rxbd_wrptr, rdptr);
|
||||
|
||||
/* Write the RX ring write pointer in to REG_RXBD_WRPTR */
|
||||
if (pcb->moal_write_reg(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_pcie->reg->reg_rxbd_wrptr,
|
||||
pmadapter->pcard_pcie->rxbd_wrptr | txbd_val)) {
|
||||
ret = pcb->moal_write_reg(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_pcie->reg->reg_rxbd_wrptr,
|
||||
pmadapter->pcard_pcie->rxbd_wrptr | txbd_val);
|
||||
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
if (!pmadapter->pcard_pcie->reg->use_adma) {
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
}
|
||||
#endif
|
||||
if (ret) {
|
||||
PRINTM(MERROR,
|
||||
"RECV DATA: failed to write REG_RXBD_WRPTR\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
@ -2586,6 +2610,7 @@ static mlan_status wlan_pcie_process_cmd_resp(mlan_adapter *pmadapter)
|
|||
pmlan_buffer pmbuf = pmadapter->pcard_pcie->cmdrsp_buf;
|
||||
pmlan_buffer cmd_buf = MNULL;
|
||||
t_u16 resp_len = 0;
|
||||
t_u8 cmd_resp_received = MFALSE;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -2653,7 +2678,7 @@ static mlan_status wlan_pcie_process_cmd_resp(mlan_adapter *pmadapter)
|
|||
pmadapter->upld_len, MRVDRV_SIZE_OF_CMD_BUFFER);
|
||||
|
||||
} else {
|
||||
pmadapter->cmd_resp_received = MTRUE;
|
||||
cmd_resp_received = MTRUE;
|
||||
pmbuf->data_len = pmadapter->upld_len;
|
||||
pmbuf->data_offset += PCIE_INTF_HEADER_LEN;
|
||||
pmadapter->curr_cmd->respbuf = pmbuf;
|
||||
|
@ -2699,6 +2724,11 @@ static mlan_status wlan_pcie_process_cmd_resp(mlan_adapter *pmadapter)
|
|||
}
|
||||
|
||||
done:
|
||||
if (cmd_resp_received) {
|
||||
wlan_request_cmd_lock(pmadapter);
|
||||
pmadapter->cmd_resp_received = cmd_resp_received;
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
}
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
@ -2779,7 +2809,7 @@ static mlan_status wlan_pcie_process_event_ready(mlan_adapter *pmadapter)
|
|||
adma_dual_desc_buf *padma_bd_buf;
|
||||
ENTER();
|
||||
|
||||
if (pmadapter->event_received) {
|
||||
if (pmadapter->event_received || pmadapter->event_cause) {
|
||||
PRINTM(MINFO, "Event being processed, do not "
|
||||
"process this interrupt just yet\n");
|
||||
LEAVE();
|
||||
|
@ -2922,9 +2952,15 @@ static mlan_status wlan_pcie_event_complete(mlan_adapter *pmadapter,
|
|||
adma_dual_desc_buf *padma_bd_buf;
|
||||
|
||||
ENTER();
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
|
||||
pmadapter->event_cause = 0;
|
||||
pmadapter->pmlan_buffer_event = MNULL;
|
||||
|
||||
if (!pmbuf) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (wrptr >= MLAN_MAX_EVT_BD) {
|
||||
|
@ -2954,8 +2990,8 @@ static mlan_status wlan_pcie_event_complete(mlan_adapter *pmadapter,
|
|||
&pmbuf->buf_pa, MAX_EVENT_SIZE,
|
||||
PCI_DMA_FROMDEVICE)) {
|
||||
PRINTM(MERROR, "EvtCom: failed to moal_map_memory\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
pmadapter->pcard_pcie->evt_buf_list[wrptr] = pmbuf;
|
||||
|
@ -3026,6 +3062,8 @@ done:
|
|||
|
||||
PRINTM(MINFO, "EvtCom: Check Events Again\n");
|
||||
ret = wlan_pcie_process_event_ready(pmadapter);
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -3236,8 +3274,8 @@ static mlan_status wlan_pcie_prog_fw_w_helper(mlan_adapter *pmadapter,
|
|||
if (IS_PCIE9097(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
#if defined(PCIEIW62X)
|
||||
if (IS_PCIEIW62X(pmadapter->card_type))
|
||||
#if defined(PCIEIW624)
|
||||
if (IS_PCIEIW624(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
|
||||
|
@ -3448,20 +3486,18 @@ mlan_status wlan_get_pcie_device(pmlan_adapter pmadapter)
|
|||
pmadapter->pcard_pcie->txrx_bd_size = MAX_TXRX_BD;
|
||||
break;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIEIW62X)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIEIW624)
|
||||
case CARD_TYPE_PCIE9097:
|
||||
case CARD_TYPE_PCIE9098:
|
||||
case CARD_TYPE_PCIEIW62X:
|
||||
case CARD_TYPE_PCIEIW624:
|
||||
pmadapter->pcard_pcie->reg = &mlan_reg_pcie9098;
|
||||
pmadapter->pcard_info = &mlan_card_info_pcie9098;
|
||||
pmadapter->pcard_pcie->txrx_bd_size = ADMA_DEF_TXRX_BD;
|
||||
pmadapter->pcard_pcie->txrx_num_desc = TXRX_DEF_NUM_DESC;
|
||||
#if defined(PCIE9097) || defined(PCIEIW62X)
|
||||
if ((card_type == CARD_TYPE_PCIE9097 &&
|
||||
pmadapter->card_rev == CHIP_9097_REV_B0) ||
|
||||
(card_type == CARD_TYPE_PCIEIW62X))
|
||||
(card_type == CARD_TYPE_PCIEIW624))
|
||||
pmadapter->pcard_pcie->reg = &mlan_reg_pcie9097_b0;
|
||||
#endif
|
||||
|
||||
break;
|
||||
#endif
|
||||
|
@ -3619,30 +3655,26 @@ mlan_status wlan_process_msix_int(mlan_adapter *pmadapter)
|
|||
|
||||
if (pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_dnld_done) {
|
||||
PRINTM(MINFO, "<--- DATA sent Interrupt --->\n");
|
||||
ret = wlan_pcie_send_data_complete(pmadapter);
|
||||
if (ret)
|
||||
goto done;
|
||||
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_TX_COMPLTE, MNULL);
|
||||
}
|
||||
if (pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_upld_rdy) {
|
||||
PRINTM(MINFO, "Rx DATA\n");
|
||||
ret = wlan_pcie_process_recv_data(pmadapter);
|
||||
if (ret)
|
||||
goto done;
|
||||
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_DATA, MNULL);
|
||||
}
|
||||
if (pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_event_rdy) {
|
||||
PRINTM(MINFO, "Rx EVENT\n");
|
||||
ret = wlan_pcie_process_event_ready(pmadapter);
|
||||
if (ret)
|
||||
goto done;
|
||||
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_EVENT, MNULL);
|
||||
}
|
||||
if (pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_cmd_done) {
|
||||
if (pmadapter->cmd_sent && !pmadapter->vdll_ctrl.vdll_len) {
|
||||
PRINTM(MINFO, "<--- CMD sent Interrupt --->\n");
|
||||
pmadapter->cmd_sent = MFALSE;
|
||||
}
|
||||
ret = wlan_pcie_process_cmd_resp(pmadapter);
|
||||
if (ret)
|
||||
goto done;
|
||||
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_CMDRESP, MNULL);
|
||||
}
|
||||
if (pmadapter->pcard_pcie->reg->host_intr_cmd_dnld &&
|
||||
(pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_cmd_dnld)) {
|
||||
|
@ -3655,7 +3687,6 @@ mlan_status wlan_process_msix_int(mlan_adapter *pmadapter)
|
|||
PRINTM(MINFO, "cmd_sent=%d data_sent=%d\n", pmadapter->cmd_sent,
|
||||
pmadapter->data_sent);
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
@ -3729,10 +3760,9 @@ static mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
|
|||
PRINTM(MINFO, "<--- DATA sent Interrupt --->\n");
|
||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 3, 0);
|
||||
|
||||
ret = wlan_pcie_send_data_complete(pmadapter);
|
||||
if (ret)
|
||||
goto done;
|
||||
wlan_recv_event(
|
||||
wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_TX_COMPLTE, MNULL);
|
||||
}
|
||||
if (pcie_ireg &
|
||||
pmadapter->pcard_pcie->reg->host_intr_upld_rdy) {
|
||||
|
@ -3741,18 +3771,18 @@ static mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
|
|||
PRINTM(MINFO, "Rx DATA\n");
|
||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 0, 0);
|
||||
ret = wlan_pcie_process_recv_data(pmadapter);
|
||||
if (ret)
|
||||
goto done;
|
||||
wlan_recv_event(wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_DATA, MNULL);
|
||||
}
|
||||
if (pcie_ireg &
|
||||
pmadapter->pcard_pcie->reg->host_intr_event_rdy) {
|
||||
pcie_ireg &=
|
||||
~pmadapter->pcard_pcie->reg->host_intr_event_rdy;
|
||||
PRINTM(MINFO, "Rx EVENT\n");
|
||||
ret = wlan_pcie_process_event_ready(pmadapter);
|
||||
if (ret)
|
||||
goto done;
|
||||
wlan_recv_event(
|
||||
wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_EVENT, MNULL);
|
||||
}
|
||||
if (pcie_ireg &
|
||||
pmadapter->pcard_pcie->reg->host_intr_cmd_done) {
|
||||
|
@ -3763,9 +3793,9 @@ static mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
|
|||
PRINTM(MINFO, "<--- CMD sent Interrupt --->\n");
|
||||
pmadapter->cmd_sent = MFALSE;
|
||||
}
|
||||
ret = wlan_pcie_process_cmd_resp(pmadapter);
|
||||
if (ret)
|
||||
goto done;
|
||||
wlan_recv_event(wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_CMDRESP, MNULL);
|
||||
}
|
||||
if (pmadapter->pcard_pcie->reg->host_intr_cmd_dnld &&
|
||||
(pcie_ireg &
|
||||
|
@ -4049,6 +4079,7 @@ mlan_status wlan_pcie_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -4057,9 +4088,15 @@ mlan_status wlan_pcie_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
if (type == MLAN_TYPE_DATA)
|
||||
if (type == MLAN_TYPE_DATA) {
|
||||
/* synchronize with send_data_complete to sync both txbd_rdptr
|
||||
* and txbd_wrptr */
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
ret = wlan_pcie_send_data(pmadapter, type, pmbuf, tx_param);
|
||||
else if (type == MLAN_TYPE_CMD)
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
} else if (type == MLAN_TYPE_CMD)
|
||||
ret = wlan_pcie_send_cmd(pmadapter, pmbuf);
|
||||
else if (type == MLAN_TYPE_VDLL)
|
||||
ret = wlan_pcie_send_vdll(pmadapter, pmbuf);
|
||||
|
@ -4188,7 +4225,7 @@ mlan_status wlan_alloc_pcie_ring_buf(pmlan_adapter pmadapter)
|
|||
|
||||
ENTER();
|
||||
if ((pmadapter->card_type == CARD_TYPE_PCIE9098) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIEIW62X) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIEIW624) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIEAW693) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIE9097)) {
|
||||
wlan_pcie_init_adma_ring_size(pmadapter);
|
||||
|
@ -4246,7 +4283,7 @@ mlan_status wlan_free_pcie_ring_buf(pmlan_adapter pmadapter)
|
|||
if ((pmadapter->card_type == CARD_TYPE_PCIE9098) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIEAW693) ||
|
||||
(pmadapter->card_type ==
|
||||
CARD_TYPE_PCIEIW62X)(pmadapter->card_type == CARD_TYPE_PCIE9097))
|
||||
CARD_TYPE_PCIEIW624)(pmadapter->card_type == CARD_TYPE_PCIE9097))
|
||||
wlan_pcie_free_rdptrs(pmadapter);
|
||||
#endif
|
||||
|
||||
|
@ -4465,10 +4502,79 @@ static mlan_status wlan_pcie_data_complete(pmlan_adapter pmadapter,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function checks the interrupt status and
|
||||
* handle it accordingly.
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status wlan_pcie_interrupt_ext(t_u16 msg_id,
|
||||
pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
ENTER();
|
||||
ret = wlan_pcie_interrupt(msg_id, pmadapter);
|
||||
if (ret == MLAN_STATUS_SUCCESS) {
|
||||
wlan_process_pcie_int_status(pmadapter);
|
||||
}
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function checks the interrupt status and
|
||||
* handle it accordingly.
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status wlan_process_pcie_int_status_ext(mlan_adapter *pmadapter,
|
||||
t_u8 type)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
switch (type) {
|
||||
case RX_DATA: // Rx Data
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
wlan_pcie_process_recv_data(pmadapter);
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
break;
|
||||
case RX_EVENT: // Rx event
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
wlan_pcie_process_event_ready(pmadapter);
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
break;
|
||||
case TX_COMPLETE: // Tx data complete
|
||||
/* synchronize with send_data to sync both txbd_rdptr and
|
||||
* txbd_wrptr */
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
wlan_pcie_send_data_complete(pmadapter);
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
break;
|
||||
case RX_CMD_RESP: // Rx CMD Resp
|
||||
wlan_pcie_process_cmd_resp(pmadapter);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
mlan_adapter_operations mlan_pcie_ops = {
|
||||
.dnld_fw = wlan_pcie_dnld_fw,
|
||||
.interrupt = wlan_pcie_interrupt,
|
||||
.process_int_status = wlan_process_pcie_int_status,
|
||||
.interrupt = wlan_pcie_interrupt_ext,
|
||||
.process_int_status = wlan_process_pcie_int_status_ext,
|
||||
.host_to_card = wlan_pcie_host_to_card,
|
||||
.wakeup_card = wlan_pm_pcie_wakeup_card,
|
||||
.reset_card = wlan_pcie_wakeup,
|
||||
|
|
|
@ -37,9 +37,6 @@ Change log:
|
|||
#include "mlan_11ac.h"
|
||||
#include "mlan_11ax.h"
|
||||
#include "mlan_11h.h"
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
#include "authenticator_api.h"
|
||||
#endif
|
||||
/********************************************************
|
||||
Local Constants
|
||||
********************************************************/
|
||||
|
@ -3854,11 +3851,8 @@ t_s32 wlan_is_network_compatible(mlan_private *pmpriv, t_u32 index, t_u32 mode)
|
|||
}
|
||||
|
||||
if ((pbss_desc->bss_mode == mode) &&
|
||||
(pmpriv->sec_info.ewpa_enabled == MTRUE
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
|| supplicantIsEnabled(pmpriv->psapriv)
|
||||
#endif
|
||||
|| pmpriv->sec_info.authentication_mode == MLAN_AUTH_MODE_OWE ||
|
||||
(pmpriv->sec_info.ewpa_enabled == MTRUE ||
|
||||
pmpriv->sec_info.authentication_mode == MLAN_AUTH_MODE_OWE ||
|
||||
pbss_desc->owe_transition_mode == OWE_TRANS_MODE_OWE)) {
|
||||
if (((pbss_desc->pwpa_ie) &&
|
||||
((*(pbss_desc->pwpa_ie)).vend_hdr.element_id == WPA_IE)) ||
|
||||
|
@ -5394,7 +5388,7 @@ static t_void wlan_parse_non_trans_bssid_profile(
|
|||
IEEEtypes_NotxBssCap_t *pcap =
|
||||
(IEEEtypes_NotxBssCap_t *)pbss_profile->profile_data;
|
||||
t_u8 *pos = pbss_profile->profile_data;
|
||||
t_s8 left_len = pbss_profile->ieee_hdr.len;
|
||||
t_u8 left_len = pbss_profile->ieee_hdr.len;
|
||||
t_u8 ret = MFALSE;
|
||||
mlan_callbacks *pcb = (pmlan_callbacks)&pmadapter->callbacks;
|
||||
BSSDescriptor_t *bss_new_entry = MNULL;
|
||||
|
|
|
@ -311,8 +311,8 @@ static const struct _mlan_card_info mlan_card_info_sd9097 = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef SDIW62X
|
||||
static const struct _mlan_card_info mlan_card_info_sdiw62x = {
|
||||
#ifdef SDIW624
|
||||
static const struct _mlan_card_info mlan_card_info_sdiw624 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.v17_fw_api = 1,
|
||||
|
@ -1050,7 +1050,7 @@ static mlan_status wlan_sdio_prog_fw_w_helper(pmlan_adapter pmadapter, t_u8 *fw,
|
|||
}
|
||||
#endif
|
||||
if (IS_SD9097(pmadapter->card_type) ||
|
||||
IS_SDIW62X(pmadapter->card_type) ||
|
||||
IS_SDIW624(pmadapter->card_type) ||
|
||||
IS_SDAW693(pmadapter->card_type) || IS_SD9177(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
|
||||
|
@ -1264,32 +1264,6 @@ static mlan_status wlan_decode_rx_packet(mlan_adapter *pmadapter,
|
|||
ENTER();
|
||||
|
||||
switch (upld_typ) {
|
||||
case MLAN_TYPE_SPA_DATA:
|
||||
PRINTM(MINFO, "--- Rx: SPA Data packet ---\n");
|
||||
pmbuf->data_len = pmadapter->upld_len;
|
||||
if (pmadapter->rx_work_flag) {
|
||||
pmbuf->buf_type = MLAN_BUF_TYPE_SPA_DATA;
|
||||
if (lock_flag)
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
util_enqueue_list_tail(pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_data_queue,
|
||||
(pmlan_linked_list)pmbuf, MNULL,
|
||||
MNULL);
|
||||
pmadapter->rx_pkts_queued++;
|
||||
if (lock_flag)
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
} else {
|
||||
wlan_decode_spa_buffer(pmadapter,
|
||||
pmbuf->pbuf + pmbuf->data_offset,
|
||||
pmbuf->data_len);
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
}
|
||||
pmadapter->data_received = MTRUE;
|
||||
break;
|
||||
case MLAN_TYPE_DATA:
|
||||
PRINTM(MINFO, "--- Rx: Data packet ---\n");
|
||||
if (pmadapter->upld_len > pmbuf->data_len) {
|
||||
|
@ -1385,8 +1359,9 @@ static mlan_status wlan_decode_rx_packet(mlan_adapter *pmadapter,
|
|||
|
||||
case MLAN_TYPE_EVENT:
|
||||
PRINTM(MINFO, "--- Rx: Event ---\n");
|
||||
event = *(t_u32 *)&pmbuf->pbuf[pmbuf->data_offset +
|
||||
SDIO_INTF_HEADER_LEN];
|
||||
|
||||
event = *(t_u32 *)&pmbuf->pbuf[MIN(
|
||||
pmbuf->data_offset + SDIO_INTF_HEADER_LEN, UINT_MAX)];
|
||||
pmadapter->event_cause = wlan_le32_to_cpu(event);
|
||||
if ((pmadapter->upld_len > MLAN_EVENT_HEADER_LEN) &&
|
||||
((pmadapter->upld_len - MLAN_EVENT_HEADER_LEN) <
|
||||
|
@ -1443,7 +1418,7 @@ static mlan_status wlan_receive_single_packet(mlan_adapter *pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
if (pkt_type != MLAN_TYPE_DATA && pkt_type != MLAN_TYPE_SPA_DATA) {
|
||||
if (pkt_type != MLAN_TYPE_DATA) {
|
||||
PRINTM(MERROR,
|
||||
"receive a wrong pkt from DATA PORT: type=%d, len=%dd\n",
|
||||
pkt_type, pmbuf->data_len);
|
||||
|
@ -1577,8 +1552,7 @@ static mlan_status wlan_receive_mp_aggr_buf(mlan_adapter *pmadapter)
|
|||
/* copy pkt to deaggr buf */
|
||||
mbuf_deaggr =
|
||||
pmadapter->pcard_sd->mpa_rx.mbuf_arr[pind];
|
||||
if ((pkt_type == MLAN_TYPE_DATA ||
|
||||
pkt_type == MLAN_TYPE_SPA_DATA) &&
|
||||
if ((pkt_type == MLAN_TYPE_DATA) &&
|
||||
(pkt_len <=
|
||||
pmadapter->pcard_sd->mpa_rx.len_arr[pind])) {
|
||||
memcpy_ext(pmadapter,
|
||||
|
@ -1739,8 +1713,7 @@ rx_curr_single:
|
|||
goto done;
|
||||
}
|
||||
if (new_mode || (port != CTRL_PORT)) {
|
||||
if (pkt_type != MLAN_TYPE_DATA &&
|
||||
pkt_type != MLAN_TYPE_SPA_DATA) {
|
||||
if (pkt_type != MLAN_TYPE_DATA) {
|
||||
PRINTM(MERROR,
|
||||
"receive a wrong pkt from DATA PORT: type=%d, len=%dd\n",
|
||||
pkt_type, pmbuf->data_len);
|
||||
|
@ -2432,10 +2405,10 @@ mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter)
|
|||
pmadapter->pcard_info = &mlan_card_info_sd9097;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SDIW62X
|
||||
case CARD_TYPE_SDIW62X:
|
||||
#ifdef SDIW624
|
||||
case CARD_TYPE_SDIW624:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sdiw62x;
|
||||
pmadapter->pcard_info = &mlan_card_info_sdiw624;
|
||||
break;
|
||||
#endif
|
||||
case CARD_TYPE_SDAW693:
|
||||
|
@ -2598,6 +2571,7 @@ static mlan_status wlan_sdio_interrupt(t_u16 msg_id, pmlan_adapter pmadapter)
|
|||
* Clear the interrupt status register
|
||||
*/
|
||||
PRINTM(MINTR, "wlan_interrupt: sdio_ireg = 0x%x\n", sdio_ireg);
|
||||
pmadapter->pm_wakeup_timeout = 0;
|
||||
pmadapter->pcard_sd->num_of_irq++;
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pint_lock);
|
||||
|
@ -2651,7 +2625,7 @@ static mlan_status wlan_sdio_card_to_host_recovery(mlan_adapter *pmadapter,
|
|||
pmadapter->pcard_sd->ioport + port)) {
|
||||
PRINTM(MERROR, "Recovery: Fail to do cmd53\n");
|
||||
}
|
||||
if (pkt_type != MLAN_TYPE_DATA && pkt_type != MLAN_TYPE_SPA_DATA) {
|
||||
if (pkt_type != MLAN_TYPE_DATA) {
|
||||
PRINTM(MERROR,
|
||||
"Recovery: Receive a wrong pkt: type=%d, len=%d\n",
|
||||
pkt_type, pmadapter->upld_len);
|
||||
|
@ -2661,12 +2635,6 @@ static mlan_status wlan_sdio_card_to_host_recovery(mlan_adapter *pmadapter,
|
|||
// TODO fill the hole in Rx reorder table
|
||||
PRINTM(MDATA, "Recovery: Drop Data packet\n");
|
||||
pmadapter->dbg.num_pkt_dropped++;
|
||||
} else if (pkt_type == MLAN_TYPE_SPA_DATA) {
|
||||
PRINTM(MDATA, "Recovery: SPA Data packet len=%d\n",
|
||||
pmadapter->upld_len);
|
||||
wlan_decode_spa_buffer(pmadapter, pmadapter->pcard_sd->rx_buf,
|
||||
pmadapter->upld_len);
|
||||
pmadapter->data_received = MTRUE;
|
||||
}
|
||||
PRINTM(MMSG, "wlan: Success handle rx port=%d, rx_len=%d \n", port,
|
||||
rx_len);
|
||||
|
@ -2680,9 +2648,11 @@ done:
|
|||
* @brief This function checks the interrupt status and handle it accordingly.
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param type interrupt type, not used in SDIO
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||
static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter,
|
||||
t_u8 type)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
@ -2880,7 +2850,7 @@ static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
|||
MLAN_SDIO_BLOCK_SIZE;
|
||||
if (rx_len <= SDIO_INTF_HEADER_LEN ||
|
||||
(rx_blocks * MLAN_SDIO_BLOCK_SIZE) >
|
||||
pmadapter->pcard_sd->mpa_rx.buf_size) {
|
||||
ALLOC_BUF_SIZE) {
|
||||
PRINTM(MERROR, "invalid rx_len=%d\n", rx_len);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
|
@ -3124,94 +3094,6 @@ static mlan_status wlan_sdio_host_to_card_ext(pmlan_private pmpriv, t_u8 type,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Deaggregate single port aggregation packet
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param buf A pointer to aggregated data packet
|
||||
* @param len
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void wlan_decode_spa_buffer(mlan_adapter *pmadapter, t_u8 *buf, t_u32 len)
|
||||
{
|
||||
int total_pkt_len;
|
||||
t_u8 block_num = 0;
|
||||
t_u16 block_size = 0;
|
||||
t_u8 *data;
|
||||
t_u32 pkt_len;
|
||||
mlan_buffer *mbuf_deaggr = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
data = (t_u8 *)buf;
|
||||
total_pkt_len = len;
|
||||
if (total_pkt_len < pmadapter->pcard_sd->sdio_rx_block_size) {
|
||||
PRINTM(MERROR, "Invalid sp aggr packet size=%d\n",
|
||||
total_pkt_len);
|
||||
goto done;
|
||||
}
|
||||
while (total_pkt_len >=
|
||||
(OFFSET_OF_SDIO_HEADER + SDIO_INTF_HEADER_LEN)) {
|
||||
block_num = *(data + OFFSET_OF_BLOCK_NUMBER);
|
||||
block_size =
|
||||
pmadapter->pcard_sd->sdio_rx_block_size * block_num;
|
||||
if (block_size > total_pkt_len) {
|
||||
PRINTM(MERROR,
|
||||
"Error in pkt, block_num=%d, pkt_len=%d\n",
|
||||
block_num, total_pkt_len);
|
||||
break;
|
||||
}
|
||||
pkt_len = wlan_le16_to_cpu(
|
||||
*(t_u16 *)(data + OFFSET_OF_SDIO_HEADER));
|
||||
if ((pkt_len + OFFSET_OF_SDIO_HEADER) > block_size) {
|
||||
PRINTM(MERROR,
|
||||
"Error in pkt, pkt_len=%d, block_size=%d\n",
|
||||
pkt_len, block_size);
|
||||
break;
|
||||
}
|
||||
mbuf_deaggr = wlan_alloc_mlan_buffer(
|
||||
pmadapter, pkt_len - SDIO_INTF_HEADER_LEN,
|
||||
MLAN_RX_HEADER_LEN, MOAL_ALLOC_MLAN_BUFFER);
|
||||
if (mbuf_deaggr == MNULL) {
|
||||
PRINTM(MERROR, "Error allocating daggr mlan_buffer\n");
|
||||
break;
|
||||
}
|
||||
memcpy_ext(pmadapter,
|
||||
mbuf_deaggr->pbuf + mbuf_deaggr->data_offset,
|
||||
data + OFFSET_OF_SDIO_HEADER + SDIO_INTF_HEADER_LEN,
|
||||
pkt_len - SDIO_INTF_HEADER_LEN,
|
||||
pkt_len - SDIO_INTF_HEADER_LEN);
|
||||
mbuf_deaggr->data_len = pkt_len - SDIO_INTF_HEADER_LEN;
|
||||
wlan_handle_rx_packet(pmadapter, mbuf_deaggr);
|
||||
data += block_size;
|
||||
total_pkt_len -= block_size;
|
||||
if (total_pkt_len < pmadapter->pcard_sd->sdio_rx_block_size)
|
||||
break;
|
||||
}
|
||||
done:
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function deaggr rx pkt
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pmbuf A pointer to the SDIO mpa data
|
||||
* @return N/A
|
||||
*/
|
||||
t_void wlan_sdio_deaggr_rx_pkt(pmlan_adapter pmadapter, mlan_buffer *pmbuf)
|
||||
{
|
||||
if (pmbuf->buf_type == MLAN_BUF_TYPE_SPA_DATA) {
|
||||
wlan_decode_spa_buffer(pmadapter,
|
||||
pmbuf->pbuf + pmbuf->data_offset,
|
||||
pmbuf->data_len);
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
} else
|
||||
wlan_handle_rx_packet(pmadapter, pmbuf);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function allocates buffer for the SDIO aggregation buffer
|
||||
* related members of adapter structure
|
||||
|
@ -3320,80 +3202,6 @@ mlan_status wlan_free_sdio_mpa_buffers(mlan_adapter *pmadapter)
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function re-allocate rx mpa buffer
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_re_alloc_sdio_rx_mpa_buffer(mlan_adapter *pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
t_u8 mp_aggr_pkt_limit = pmadapter->pcard_sd->mp_aggr_pkt_limit;
|
||||
t_u32 mpa_rx_buf_size = pmadapter->pcard_sd->mp_tx_aggr_buf_size;
|
||||
|
||||
if (pmadapter->pcard_sd->mpa_rx.buf) {
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_sd->mpa_rx.head_ptr);
|
||||
pmadapter->pcard_sd->mpa_rx.head_ptr = MNULL;
|
||||
pmadapter->pcard_sd->mpa_rx.buf = MNULL;
|
||||
pmadapter->pcard_sd->mpa_rx.buf_size = 0;
|
||||
}
|
||||
if (pmadapter->pcard_sd->sdio_rx_aggr_enable) {
|
||||
mpa_rx_buf_size = MAX(mpa_rx_buf_size, SDIO_CMD53_MAX_SIZE);
|
||||
/** reallocate rx buffer for recover when single port rx
|
||||
* aggregation enabled */
|
||||
if (pmadapter->pcard_sd->rx_buffer) {
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_sd->rx_buffer);
|
||||
pmadapter->pcard_sd->rx_buffer = MNULL;
|
||||
pmadapter->pcard_sd->rx_buf = MNULL;
|
||||
}
|
||||
ret = pmadapter->callbacks.moal_malloc(
|
||||
pmadapter->pmoal_handle,
|
||||
SDIO_CMD53_MAX_SIZE + DMA_ALIGNMENT,
|
||||
MLAN_MEM_DEF | MLAN_MEM_DMA,
|
||||
(t_u8 **)&pmadapter->pcard_sd->rx_buffer);
|
||||
|
||||
if (ret != MLAN_STATUS_SUCCESS ||
|
||||
!pmadapter->pcard_sd->rx_buffer) {
|
||||
PRINTM(MERROR, "Failed to allocate receive buffer\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
pmadapter->pcard_sd->rx_buf = (t_u8 *)ALIGN_ADDR(
|
||||
pmadapter->pcard_sd->rx_buffer, DMA_ALIGNMENT);
|
||||
}
|
||||
if ((pmadapter->pcard_sd->max_segs < mp_aggr_pkt_limit) ||
|
||||
(pmadapter->pcard_sd->max_seg_size <
|
||||
pmadapter->pcard_sd->max_sp_rx_size)) {
|
||||
ret = pcb->moal_malloc(
|
||||
pmadapter->pmoal_handle,
|
||||
mpa_rx_buf_size + DMA_ALIGNMENT,
|
||||
MLAN_MEM_DEF | MLAN_MEM_DMA,
|
||||
(t_u8 **)&pmadapter->pcard_sd->mpa_rx.head_ptr);
|
||||
if (ret != MLAN_STATUS_SUCCESS ||
|
||||
!pmadapter->pcard_sd->mpa_rx.head_ptr) {
|
||||
PRINTM(MERROR,
|
||||
"Could not allocate buffer for SDIO MP RX aggr\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
pmadapter->pcard_sd->mpa_rx.buf = (t_u8 *)ALIGN_ADDR(
|
||||
pmadapter->pcard_sd->mpa_rx.head_ptr, DMA_ALIGNMENT);
|
||||
} else {
|
||||
PRINTM(MMSG, "wlan: Enable RX SG mode\n");
|
||||
pmadapter->pcard_sd->mpa_rx.head_ptr = MNULL;
|
||||
pmadapter->pcard_sd->mpa_rx.buf = MNULL;
|
||||
}
|
||||
pmadapter->pcard_sd->mpa_rx.buf_size = mpa_rx_buf_size;
|
||||
PRINTM(MMSG, "mpa_rx_buf_size=%d\n", mpa_rx_buf_size);
|
||||
error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function wakes up the card.
|
||||
*
|
||||
|
@ -3595,8 +3403,8 @@ mlan_status wlan_reset_fw(pmlan_adapter pmadapter)
|
|||
#ifdef SD9097
|
||||
|| IS_SD9097(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SDIW62X
|
||||
|| IS_SDIW62X(pmadapter->card_type)
|
||||
#ifdef SDIW624
|
||||
|| IS_SDIW624(pmadapter->card_type)
|
||||
#endif
|
||||
|| IS_SDAW693(pmadapter->card_type)
|
||||
#ifdef SD9177
|
||||
|
@ -3638,13 +3446,34 @@ done:
|
|||
* @param pmbuf A pointer to the mlan_buffer
|
||||
* @return N/A
|
||||
*/
|
||||
static mlan_status wlan_sdio_data_evt_complete(pmlan_adapter pmadapter,
|
||||
static mlan_status wlan_sdio_evt_complete(pmlan_adapter pmadapter,
|
||||
mlan_buffer *pmbuf,
|
||||
mlan_status status)
|
||||
{
|
||||
ENTER();
|
||||
pmadapter->event_cause = 0;
|
||||
pmadapter->pmlan_buffer_event = MNULL;
|
||||
if (pmbuf)
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handle data/cmd complete
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pmbuf A pointer to the mlan_buffer
|
||||
* @return N/A
|
||||
*/
|
||||
static mlan_status wlan_sdio_data_cmd_complete(pmlan_adapter pmadapter,
|
||||
mlan_buffer *pmbuf,
|
||||
mlan_status status)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
if (pmbuf)
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
@ -3662,7 +3491,7 @@ static mlan_status wlan_sdio_handle_rx_packet(mlan_adapter *pmadapter,
|
|||
{
|
||||
ENTER();
|
||||
|
||||
wlan_sdio_deaggr_rx_pkt(pmadapter, pmbuf);
|
||||
wlan_handle_rx_packet(pmadapter, pmbuf);
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
@ -3675,9 +3504,9 @@ mlan_adapter_operations mlan_sdio_ops = {
|
|||
.host_to_card = wlan_sdio_host_to_card_ext,
|
||||
.wakeup_card = wlan_pm_sdio_wakeup_card,
|
||||
.reset_card = wlan_pm_sdio_reset_card,
|
||||
.event_complete = wlan_sdio_data_evt_complete,
|
||||
.data_complete = wlan_sdio_data_evt_complete,
|
||||
.cmdrsp_complete = wlan_sdio_data_evt_complete,
|
||||
.event_complete = wlan_sdio_evt_complete,
|
||||
.data_complete = wlan_sdio_data_cmd_complete,
|
||||
.cmdrsp_complete = wlan_sdio_data_cmd_complete,
|
||||
.handle_rx_packet = wlan_sdio_handle_rx_packet,
|
||||
.disable_host_int = wlan_disable_sdio_host_int,
|
||||
.enable_host_int = wlan_enable_sdio_host_int,
|
||||
|
|
|
@ -358,10 +358,6 @@ mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter);
|
|||
|
||||
mlan_status wlan_send_mp_aggr_buf(mlan_adapter *pmadapter);
|
||||
|
||||
mlan_status wlan_re_alloc_sdio_rx_mpa_buffer(mlan_adapter *pmadapter);
|
||||
|
||||
void wlan_decode_spa_buffer(mlan_adapter *pmadapter, t_u8 *buf, t_u32 len);
|
||||
t_void wlan_sdio_deaggr_rx_pkt(pmlan_adapter pmadapter, mlan_buffer *pmbuf);
|
||||
/** Transfer data to card */
|
||||
mlan_status wlan_sdio_host_to_card(mlan_adapter *pmadapter, t_u8 type,
|
||||
mlan_buffer *mbuf, mlan_tx_param *tx_param);
|
||||
|
|
|
@ -44,9 +44,6 @@ Change log:
|
|||
#endif
|
||||
#include "mlan_11h.h"
|
||||
#include "mlan_11n_rxreorder.h"
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
#include "authenticator_api.h"
|
||||
#endif
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
|
@ -363,8 +360,6 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
|
||||
pmadapter->init_para.mpa_tx_cfg = pmdevice->mpa_tx_cfg;
|
||||
pmadapter->init_para.mpa_rx_cfg = pmdevice->mpa_rx_cfg;
|
||||
pmadapter->pcard_sd->sdio_rx_aggr_enable =
|
||||
pmdevice->sdio_rx_aggr_enable;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -442,6 +437,7 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
pmadapter->inact_tmo = pmdevice->inact_tmo;
|
||||
pmadapter->init_para.drcs_chantime_mode = pmdevice->drcs_chantime_mode;
|
||||
pmadapter->second_mac = pmdevice->second_mac;
|
||||
pmadapter->napi = pmdevice->napi;
|
||||
pmadapter->hs_wake_interval = pmdevice->hs_wake_interval;
|
||||
if (pmdevice->indication_gpio != 0xff) {
|
||||
pmadapter->ind_gpio = pmdevice->indication_gpio & 0x0f;
|
||||
|
@ -1054,18 +1050,6 @@ mlan_status mlan_rx_process(t_void *padapter, t_u8 *rx_pkts)
|
|||
rx_process_start:
|
||||
/* Check for Rx data */
|
||||
while (MTRUE) {
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (pmadapter->authenticator_priv) {
|
||||
if (IsAuthenticatorEnabled(
|
||||
pmadapter->authenticator_priv->psapriv)) {
|
||||
AuthenticatorKeyMgmtInit(
|
||||
pmadapter->authenticator_priv->psapriv,
|
||||
pmadapter->authenticator_priv
|
||||
->curr_addr);
|
||||
pmadapter->authenticator_priv = MNULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (pmadapter->flush_data) {
|
||||
pmadapter->flush_data = MFALSE;
|
||||
wlan_flush_rxreorder_tbl(pmadapter);
|
||||
|
@ -1109,6 +1093,16 @@ rx_process_start:
|
|||
pmadapter->delay_task_flag = MFALSE;
|
||||
mlan_queue_main_work(pmadapter);
|
||||
}
|
||||
#ifdef PCIE
|
||||
if (pmadapter->delay_rx_data_flag &&
|
||||
(pmadapter->rx_pkts_queued < LOW_RX_PENDING)) {
|
||||
PRINTM(MEVENT, "Run\n");
|
||||
pmadapter->delay_rx_data_flag = MFALSE;
|
||||
wlan_recv_event(wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_DATA, MNULL);
|
||||
}
|
||||
#endif
|
||||
pmadapter->ops.handle_rx_packet(pmadapter, pmbuf);
|
||||
if (limit && rx_num >= limit)
|
||||
break;
|
||||
|
@ -1180,7 +1174,7 @@ process_start:
|
|||
pmadapter->pending_disconnect_priv, MTRUE);
|
||||
pmadapter->pending_disconnect_priv = MNULL;
|
||||
}
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
#if defined(SDIO)
|
||||
if (!IS_USB(pmadapter->card_type)) {
|
||||
if (pmadapter->rx_pkts_queued > HIGH_RX_PENDING) {
|
||||
pcb->moal_tp_accounting_rx_param(
|
||||
|
@ -1194,7 +1188,7 @@ process_start:
|
|||
if (pmadapter->ireg) {
|
||||
if (pmadapter->hs_activated == MTRUE)
|
||||
wlan_process_hs_config(pmadapter);
|
||||
pmadapter->ops.process_int_status(pmadapter);
|
||||
pmadapter->ops.process_int_status(pmadapter, 0);
|
||||
if (pmadapter->data_received)
|
||||
mlan_queue_rx_work(pmadapter);
|
||||
}
|
||||
|
@ -1291,7 +1285,6 @@ process_start:
|
|||
pmadapter->event_received = MFALSE;
|
||||
wlan_process_event(pmadapter);
|
||||
}
|
||||
|
||||
/* Check if we need to confirm Sleep Request received previously
|
||||
*/
|
||||
if (pmadapter->ps_state == PS_STATE_PRE_SLEEP)
|
||||
|
@ -1859,4 +1852,54 @@ t_void mlan_set_int_mode(t_void *adapter, t_u32 int_mode, t_u8 func_num)
|
|||
pmadapter->pcard_pcie->func_num = func_num;
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handle RX/EVENT/CMDRESP/TX_COMPLETE interrupt.
|
||||
*
|
||||
* @param adapter A pointer to mlan_adapter structure
|
||||
* @param type interrupt type
|
||||
* @return N/A
|
||||
*/
|
||||
void mlan_process_pcie_interrupt_cb(t_void *padapter, int type)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (type == RX_DATA) {
|
||||
if (pmadapter->rx_pkts_queued > HIGH_RX_PENDING) {
|
||||
pcb->moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 2, 0);
|
||||
PRINTM(MEVENT, "Pause\n");
|
||||
pmadapter->delay_rx_data_flag = MTRUE;
|
||||
if (pmadapter->napi)
|
||||
mlan_queue_rx_work(pmadapter);
|
||||
else
|
||||
mlan_rx_process(pmadapter, MNULL);
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
}
|
||||
pmadapter->ops.process_int_status(pmadapter, type);
|
||||
switch (type) {
|
||||
case RX_DATA: // Rx Data
|
||||
if (pmadapter->data_received) {
|
||||
if (pmadapter->napi)
|
||||
mlan_queue_rx_work(pmadapter);
|
||||
else
|
||||
mlan_rx_process(pmadapter, MNULL);
|
||||
}
|
||||
break;
|
||||
case RX_EVENT: // Rx event
|
||||
case TX_COMPLETE: // Tx data complete
|
||||
case RX_CMD_RESP: // Rx CMD Resp
|
||||
mlan_main_process(pmadapter);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* it is ready.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2022 NXP
|
||||
* Copyright 2008-2023 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
@ -1002,6 +1002,10 @@ static mlan_status wlan_cmd_mac_multicast_adr(pmlan_private pmpriv,
|
|||
HostCmd_DS_MAC_MULTICAST_ADR *pmc_addr = &cmd->params.mc_addr;
|
||||
|
||||
ENTER();
|
||||
if (!pdata_buf) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_MAC_MULTICAST_ADR) +
|
||||
S_DS_GEN);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_MAC_MULTICAST_ADR);
|
||||
|
@ -2689,6 +2693,8 @@ static mlan_status wlan_cmd_inactivity_timeout(HostCmd_DS_COMMAND *cmd,
|
|||
wlan_cpu_to_le16((t_u16)inac_to->mcast_timeout);
|
||||
cmd_inac_to->ps_entry_timeout =
|
||||
wlan_cpu_to_le16((t_u16)inac_to->ps_entry_timeout);
|
||||
cmd_inac_to->ps_cmd_timeout =
|
||||
wlan_cpu_to_le16((t_u16)inac_to->ps_cmd_timeout);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
|
@ -3720,9 +3726,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_get_hw_spec(pmpriv, cmd_ptr);
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG:
|
||||
ret = wlan_cmd_sdio_rx_aggr_cfg(cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_CFG_DATA:
|
||||
ret = wlan_cmd_cfg_data(pmpriv, cmd_ptr, cmd_action, cmd_oid,
|
||||
|
@ -3791,7 +3794,7 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_ips_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HOST_CMD_PMIC_CONFIGURE:
|
||||
case HostCmd_CMD_PMIC_CONFIGURE:
|
||||
cmd_ptr->command = wlan_cpu_to_le16(cmd_no);
|
||||
cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN);
|
||||
break;
|
||||
|
@ -4082,7 +4085,7 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
pdata_buf);
|
||||
break;
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
case HOST_CMD_WIFI_DIRECT_MODE_CONFIG:
|
||||
case HostCmd_CMD_WIFI_DIRECT_MODE_CONFIG:
|
||||
ret = wlan_cmd_wifi_direct_mode(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
|
@ -4127,10 +4130,10 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_DRCS_CONFIG:
|
||||
ret = wlan_cmd_drcs_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HostCMD_CONFIG_LOW_POWER_MODE:
|
||||
case HostCmd_CMD_CONFIG_LOW_POWER_MODE:
|
||||
ret = wlan_cmd_low_pwr_mode(pmpriv, cmd_ptr, pdata_buf);
|
||||
break;
|
||||
case HostCmd_DFS_REPEATER_MODE:
|
||||
case HostCmd_CMD_DFS_REPEATER_MODE:
|
||||
ret = wlan_cmd_dfs_repeater_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
|
@ -4138,7 +4141,7 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_coalesce_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_DS_GET_SENSOR_TEMP:
|
||||
case HostCmd_CMD_DS_GET_SENSOR_TEMP:
|
||||
ret = wlan_cmd_get_sensor_temp(pmpriv, cmd_ptr, cmd_action);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_MIMO_SWITCH:
|
||||
|
@ -4176,7 +4179,7 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_auto_tx(pmpriv, cmd_ptr, cmd_action, cmd_oid,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HOST_CMD_TX_RX_PKT_STATS:
|
||||
case HostCmd_CMD_TX_RX_PKT_STATS:
|
||||
ret = wlan_cmd_tx_rx_pkt_stats(pmpriv, cmd_ptr,
|
||||
(pmlan_ioctl_req)pioctl_buf,
|
||||
pdata_buf);
|
||||
|
@ -4193,11 +4196,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_fw_dump_event(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
#if defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
case HostCmd_CMD_CRYPTO:
|
||||
ret = wlan_cmd_crypto(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_11AX_CFG:
|
||||
ret = wlan_cmd_11ax_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
|
@ -4211,7 +4209,7 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_TWT_CFG:
|
||||
ret = wlan_cmd_twt_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
case HostCmd_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
ret = wlan_cmd_gpio_tsf_latch(pmpriv, cmd_ptr, cmd_action,
|
||||
pioctl_buf, pdata_buf);
|
||||
break;
|
||||
|
@ -4227,6 +4225,14 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_rxabortcfg_ext(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_NAV_MITIGATION_CFG:
|
||||
ret = wlan_cmd_nav_mitigation(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_LED_CONTROL:
|
||||
ret = wlan_cmd_led_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_ARB_CONFIG:
|
||||
ret = wlan_cmd_arb_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
|
@ -4246,7 +4252,7 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_cck_desense_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CHANNEL_TRPC_CONFIG:
|
||||
case HostCmd_CMD_CHANNEL_TRPC_CONFIG:
|
||||
ret = wlan_cmd_get_chan_trpc_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* responses generated by firmware.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2022 NXP
|
||||
* Copyright 2008-2023 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
@ -181,6 +181,8 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
|
|||
} break;
|
||||
case HostCmd_CMD_802_11_SCAN_EXT:
|
||||
case HostCmd_CMD_802_11_SCAN:
|
||||
if (resp->result == HostCmd_RESULT_BUSY)
|
||||
pmadapter->dbg.num_scan_err++;
|
||||
/* Cancel all pending scan command */
|
||||
wlan_flush_scan_queue(pmadapter);
|
||||
|
||||
|
@ -258,13 +260,15 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
|
|||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_802_11_ASSOCIATE:
|
||||
if (resp->result == HostCmd_RESULT_BUSY)
|
||||
pmadapter->dbg.num_assoc_err++;
|
||||
wlan_reset_connect_state(pmpriv, MTRUE);
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG:
|
||||
pmadapter->pcard_sd->sdio_rx_aggr_enable = MFALSE;
|
||||
PRINTM(MMSG, "FW don't support SDIO single port rx aggr\n");
|
||||
case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL:
|
||||
if (resp->result == HostCmd_RESULT_BUSY)
|
||||
pmadapter->dbg.num_remain_chan_err++;
|
||||
break;
|
||||
#ifdef SDIO
|
||||
#endif
|
||||
|
||||
case HostCmd_CMD_MGMT_IE_LIST: {
|
||||
|
@ -331,12 +335,6 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
|
|||
ret = MLAN_STATUS_SUCCESS;
|
||||
PRINTM(MCMND, "FW don't support chan region cfg command!\n");
|
||||
break;
|
||||
#if defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
case HostCmd_CMD_CRYPTO:
|
||||
PRINTM(MCMND, "crypto cmd result=0x%x!\n", resp->result);
|
||||
ret = wlan_ret_crypto(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -720,8 +718,10 @@ static mlan_status wlan_ret_get_log(pmlan_private pmpriv,
|
|||
wlan_le32_to_cpu(pget_log->rx_stuck_issue_cnt[0]);
|
||||
pget_info->param.stats.rx_stuck_issue_cnt[1] =
|
||||
wlan_le32_to_cpu(pget_log->rx_stuck_issue_cnt[1]);
|
||||
pget_info->param.stats.rx_stuck_recovery_cnt =
|
||||
wlan_le32_to_cpu(pget_log->rx_stuck_recovery_cnt);
|
||||
pget_info->param.stats.rx_stuck_poll_recovery_cnt =
|
||||
wlan_le32_to_cpu(pget_log->rx_stuck_poll_recovery_cnt);
|
||||
pget_info->param.stats.rx_stuck_intr_recovery_cnt =
|
||||
wlan_le32_to_cpu(pget_log->rx_stuck_intr_recovery_cnt);
|
||||
pget_info->param.stats.rx_stuck_tsf[0] =
|
||||
wlan_le64_to_cpu(pget_log->rx_stuck_tsf[0]);
|
||||
pget_info->param.stats.rx_stuck_tsf[1] =
|
||||
|
@ -2128,6 +2128,8 @@ static mlan_status wlan_ret_inactivity_timeout(pmlan_private pmpriv,
|
|||
wlan_le16_to_cpu(cmd_inac_to->mcast_timeout);
|
||||
inac_to->ps_entry_timeout =
|
||||
wlan_le16_to_cpu(cmd_inac_to->ps_entry_timeout);
|
||||
inac_to->ps_cmd_timeout =
|
||||
wlan_le16_to_cpu(cmd_inac_to->ps_cmd_timeout);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
|
@ -3226,9 +3228,6 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
ret = wlan_ret_get_hw_spec(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG:
|
||||
ret = wlan_ret_sdio_rx_aggr_cfg(pmpriv, resp);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_CFG_DATA:
|
||||
ret = wlan_ret_cfg_data(pmpriv, resp, pioctl_buf);
|
||||
|
@ -3539,7 +3538,7 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
ret = wlan_ret_remain_on_channel(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
case HOST_CMD_WIFI_DIRECT_MODE_CONFIG:
|
||||
case HostCmd_CMD_WIFI_DIRECT_MODE_CONFIG:
|
||||
ret = wlan_ret_wifi_direct_mode(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#endif
|
||||
|
@ -3576,9 +3575,9 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_DRCS_CONFIG:
|
||||
ret = wlan_ret_drcs_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCMD_CONFIG_LOW_POWER_MODE:
|
||||
case HostCmd_CMD_CONFIG_LOW_POWER_MODE:
|
||||
break;
|
||||
case HostCmd_DFS_REPEATER_MODE:
|
||||
case HostCmd_CMD_DFS_REPEATER_MODE:
|
||||
ret = wlan_ret_dfs_repeater_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_COALESCE_CFG:
|
||||
|
@ -3586,7 +3585,7 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
break;
|
||||
case HostCmd_CMD_MEF_CFG:
|
||||
break;
|
||||
case HostCmd_DS_GET_SENSOR_TEMP:
|
||||
case HostCmd_CMD_DS_GET_SENSOR_TEMP:
|
||||
ret = wlan_ret_get_sensor_temp(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_MIMO_SWITCH:
|
||||
|
@ -3597,7 +3596,7 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_STA_CONFIGURE:
|
||||
ret = wlan_ret_sta_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HOST_CMD_PMIC_CONFIGURE:
|
||||
case HostCmd_CMD_PMIC_CONFIGURE:
|
||||
break;
|
||||
case HostCmd_CMD_INDEPENDENT_RESET_CFG:
|
||||
ret = wlan_ret_ind_rst_cfg(pmpriv, resp, pioctl_buf);
|
||||
|
@ -3616,7 +3615,7 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_AUTO_TX:
|
||||
ret = wlan_ret_auto_tx(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HOST_CMD_TX_RX_PKT_STATS:
|
||||
case HostCmd_CMD_TX_RX_PKT_STATS:
|
||||
ret = wlan_ret_tx_rx_pkt_stats(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_DYN_BW:
|
||||
|
@ -3625,11 +3624,6 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_BOOT_SLEEP:
|
||||
ret = wlan_ret_boot_sleep(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#if defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
case HostCmd_CMD_CRYPTO:
|
||||
ret = wlan_ret_crypto(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_11AX_CFG:
|
||||
ret = wlan_ret_11ax_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
@ -3642,7 +3636,7 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_TWT_CFG:
|
||||
ret = wlan_ret_twt_report(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
case HostCmd_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
ret = wlan_ret_gpio_tsf_latch(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_RX_ABORT_CFG:
|
||||
|
@ -3654,6 +3648,12 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_RX_ABORT_CFG_EXT:
|
||||
ret = wlan_ret_rxabortcfg_ext(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_NAV_MITIGATION_CFG:
|
||||
ret = wlan_ret_nav_mitigation(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_LED_CONTROL:
|
||||
ret = wlan_ret_led_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_ARB_CONFIG:
|
||||
ret = wlan_ret_arb_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
@ -3676,7 +3676,7 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_CCK_DESENSE_CFG:
|
||||
ret = wlan_ret_cck_desense_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CHANNEL_TRPC_CONFIG:
|
||||
case HostCmd_CMD_CHANNEL_TRPC_CONFIG:
|
||||
ret = wlan_ret_get_chan_trpc_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_LOW_POWER_MODE_CFG:
|
||||
|
|
|
@ -33,9 +33,6 @@ Change log:
|
|||
#include "mlan_wmm.h"
|
||||
#include "mlan_11n.h"
|
||||
#include "mlan_11h.h"
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
#include "authenticator_api.h"
|
||||
#endif
|
||||
#ifdef PCIE
|
||||
#include "mlan_pcie.h"
|
||||
#endif /* PCIE */
|
||||
|
@ -380,6 +377,10 @@ t_void wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
|||
else
|
||||
#endif
|
||||
wlan_11h_check_update_radar_det_state(priv);
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
wlan_resync_usb_port(pmadapter);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (priv->port_ctrl_mode == MTRUE) {
|
||||
|
@ -405,18 +406,12 @@ t_void wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
|||
priv->rxpd_rate_info = 0;
|
||||
priv->max_amsdu = 0;
|
||||
priv->amsdu_disable = MFALSE;
|
||||
priv->multi_ap_flag = 0;
|
||||
wlan_coex_ampdu_rxwinsize(pmadapter);
|
||||
|
||||
priv->sec_info.ewpa_enabled = MFALSE;
|
||||
priv->sec_info.wpa_enabled = MFALSE;
|
||||
priv->sec_info.wpa2_enabled = MFALSE;
|
||||
priv->wpa_ie_len = 0;
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
supplicantStopSessionTimer(priv->psapriv);
|
||||
supplicantClrEncryptKey(priv->psapriv);
|
||||
supplicantDisable(priv->psapriv);
|
||||
#endif
|
||||
|
||||
priv->sec_info.wapi_enabled = MFALSE;
|
||||
priv->wapi_ie_len = 0;
|
||||
|
@ -896,6 +891,10 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_PORT_RELEASE, MNULL);
|
||||
/* Send OBSS scan param to the application */
|
||||
wlan_2040_coex_event(pmpriv);
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
wlan_resync_usb_port(pmadapter);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case EVENT_STOP_TX:
|
||||
|
@ -1127,18 +1126,17 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
break;
|
||||
case EVENT_ADDBA:
|
||||
PRINTM(MEVENT, "EVENT: ADDBA Request\n");
|
||||
if (pmpriv->media_connected == MTRUE)
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_11N_ADDBA_RSP,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL,
|
||||
pmadapter->event_body);
|
||||
if (pmpriv->media_connected == MTRUE &&
|
||||
!pmpriv->adapter->remain_on_channel)
|
||||
wlan_11n_add_bastream(pmpriv, pmadapter->event_body);
|
||||
else
|
||||
PRINTM(MERROR,
|
||||
"Ignore ADDBA Request event in disconnected state\n");
|
||||
break;
|
||||
case EVENT_DELBA:
|
||||
PRINTM(MEVENT, "EVENT: DELBA Request\n");
|
||||
if (pmpriv->media_connected == MTRUE)
|
||||
if (pmpriv->media_connected == MTRUE &&
|
||||
!pmpriv->adapter->remain_on_channel)
|
||||
wlan_11n_delete_bastream(pmpriv, pmadapter->event_body);
|
||||
else
|
||||
PRINTM(MERROR,
|
||||
|
@ -1146,7 +1144,8 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
break;
|
||||
case EVENT_BA_STREAM_TIMEOUT:
|
||||
PRINTM(MEVENT, "EVENT: BA Stream timeout\n");
|
||||
if (pmpriv->media_connected == MTRUE)
|
||||
if (pmpriv->media_connected == MTRUE &&
|
||||
!pmpriv->adapter->remain_on_channel)
|
||||
wlan_11n_ba_stream_timeout(
|
||||
pmpriv, (HostCmd_DS_11N_BATIMEOUT *)
|
||||
pmadapter->event_body);
|
||||
|
@ -1233,6 +1232,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
PRINTM_NETINTF(MEVENT, pmpriv);
|
||||
PRINTM(MEVENT, "EVENT: REMAIN_ON_CHANNEL_EXPIRED reason=%d\n",
|
||||
*(t_u16 *)pmadapter->event_body);
|
||||
pmpriv->adapter->remain_on_channel = MFALSE;
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_FLUSH_RX_WORK, MNULL);
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED,
|
||||
MNULL);
|
||||
|
@ -1419,7 +1419,13 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
pmadapter->fw_hang_report = MTRUE;
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DBG_DUMP, MNULL);
|
||||
break;
|
||||
case CHAN_LOAD_EVENT: {
|
||||
case EVENT_IMD3_CAL_START:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_IMD3_CAL_START\n");
|
||||
break;
|
||||
case EVENT_IMD3_CAL_END:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_IMD3_CAL_END\n");
|
||||
break;
|
||||
case EVENT_CHAN_LOAD: {
|
||||
t_u8 *ptr = MNULL;
|
||||
HostCmd_DS_GET_CH_LOAD *cfg_cmd = MNULL;
|
||||
ptr = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
|
|
|
@ -35,9 +35,6 @@ Change log:
|
|||
#include "mlan_11ac.h"
|
||||
#include "mlan_11ax.h"
|
||||
#include "mlan_11h.h"
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
#include "authenticator_api.h"
|
||||
#endif
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
|
@ -1403,10 +1400,6 @@ static mlan_status wlan_bss_ioctl_find_bss(pmlan_adapter pmadapter,
|
|||
{
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
mlan_ds_bss *bss = MNULL;
|
||||
mlan_ssid_bssid *ssid_bssid = MNULL;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -1418,14 +1411,6 @@ static mlan_status wlan_bss_ioctl_find_bss(pmlan_adapter pmadapter,
|
|||
return MLAN_STATUS_PENDING;
|
||||
}
|
||||
}
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
if (!IS_FW_SUPPORT_SUPPLICANT(pmpriv->adapter)) {
|
||||
bss = (mlan_ds_bss *)pioctl_req->pbuf;
|
||||
ssid_bssid = &bss->param.ssid_bssid;
|
||||
supplicantQueryPassphraseAndEnable(pmpriv->psapriv,
|
||||
(t_u8 *)ssid_bssid);
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = wlan_find_bss(pmpriv, pioctl_req);
|
||||
|
||||
|
@ -5179,9 +5164,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_HOTSPOT_CFG:
|
||||
status = wlan_misc_hotspot_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_MULTI_AP_CFG:
|
||||
status = wlan_misc_multi_ap_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_OTP_USER_DATA:
|
||||
status = wlan_misc_otp_user_data(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
@ -5200,11 +5182,9 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_TXCONTROL:
|
||||
status = wlan_misc_ioctl_txcontrol(pmadapter, pioctl_req);
|
||||
break;
|
||||
#ifdef STA_SUPPORT
|
||||
case MLAN_OID_MISC_EXT_CAP_CFG:
|
||||
status = wlan_misc_ext_capa_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
#endif
|
||||
case MLAN_OID_MISC_PMFCFG:
|
||||
status = wlan_misc_pmfcfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
@ -5351,6 +5331,12 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_RX_ABORT_CFG_EXT:
|
||||
status = wlan_misc_ioctl_rxabortcfg_ext(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_NAV_MITIGATION:
|
||||
status = wlan_misc_ioctl_nav_mitigation(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_LED_CONFIG:
|
||||
status = wlan_misc_ioctl_led(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_TX_AMPDU_PROT_MODE:
|
||||
status = wlan_misc_ioctl_tx_ampdu_prot_mode(pmadapter,
|
||||
pioctl_req);
|
||||
|
@ -5393,6 +5379,11 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_IPS_CFG:
|
||||
status = wlan_misc_ioctl_ips_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_REORDER_FLUSH_TIME:
|
||||
status = wlan_misc_ioctl_reorder_flush_time(pmadapter,
|
||||
pioctl_req);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (pioctl_req)
|
||||
pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID;
|
||||
|
@ -5477,8 +5468,7 @@ static mlan_status wlan_set_get_scan_cfg(pmlan_adapter pmadapter,
|
|||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success,
|
||||
* otherwise fail
|
||||
*/
|
||||
static mlan_status wlan_scan_ioctl(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
mlan_status wlan_scan_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
|
|
@ -34,9 +34,6 @@ Change log:
|
|||
#include "mlan_11n_aggr.h"
|
||||
#include "mlan_11n_rxreorder.h"
|
||||
#include "mlan_11ax.h"
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
#include "authenticator_api.h"
|
||||
#endif
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
|
@ -510,9 +507,6 @@ mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
t_u8 appletalk_aarp_type[2] = {0x80, 0xf3};
|
||||
t_u8 ipx_snap_type[2] = {0x81, 0x37};
|
||||
t_u8 tdls_action_type[2] = {0x89, 0x0d};
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
t_u8 eapol_type[2] = {0x88, 0x8e};
|
||||
#endif
|
||||
t_u8 ext_rate_info = 0;
|
||||
|
||||
ENTER();
|
||||
|
@ -632,23 +626,6 @@ mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
if (supplicantIsEnabled(priv->psapriv) &&
|
||||
(!memcmp(pmadapter, &prx_pkt->eth803_hdr.h803_len, eapol_type,
|
||||
sizeof(eapol_type)))) {
|
||||
// BML_SET_OFFSET(bufDesc, offset);
|
||||
if (ProcessEAPoLPkt(priv->psapriv, pmbuf)) {
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
PRINTM(MMSG,
|
||||
"host supplicant eapol pkt process done.\n");
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
mon_process:
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_NET_MONITOR) {
|
||||
// Use some rxpd space to save rxpd info for radiotap header
|
||||
|
@ -711,7 +688,8 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
wlan_802_11_header *pwlan_hdr;
|
||||
IEEEtypes_FrameCtl_t *frmctl;
|
||||
pmlan_buffer pmbuf2 = MNULL;
|
||||
mlan_802_11_mac_addr src_addr, dest_addr;
|
||||
mlan_802_11_mac_addr dest_addr = {0x00};
|
||||
mlan_802_11_mac_addr src_addr = {0x00};
|
||||
t_u16 hdr_len;
|
||||
t_u8 snap_eth_hdr[5] = {0xaa, 0xaa, 0x03, 0x00, 0x00};
|
||||
pmlan_private priv = pmadapter->priv[pmbuf->bss_index];
|
||||
|
@ -741,13 +719,6 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
rxpd_rate_info_orig, prx_pd->rate_info);
|
||||
}
|
||||
rx_pkt_type = prx_pd->rx_pkt_type;
|
||||
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH) {
|
||||
PRINTM_NETINTF(MDAT_D, priv);
|
||||
PRINTM(MDAT_D, "Easymesh flags : 0x%x\n", prx_pd->flags);
|
||||
ret = wlan_check_easymesh_pkt(priv, pmbuf, prx_pd);
|
||||
if (ret != MLAN_STATUS_SUCCESS)
|
||||
goto done;
|
||||
}
|
||||
prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset);
|
||||
|
||||
if ((prx_pd->rx_pkt_offset + prx_pd->rx_pkt_length) !=
|
||||
|
|
|
@ -127,11 +127,6 @@ t_void *wlan_ops_sta_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
}
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_TDLS)
|
||||
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TDLS_PACKET;
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_EASYMESH;
|
||||
memcpy_ext(pmpriv->adapter, plocal_tx_pd->ra_mac, pmbuf->mac,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
}
|
||||
/* Offset of actual data */
|
||||
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
||||
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
||||
|
|
|
@ -446,57 +446,3 @@ t_void wlan_process_bypass_tx(pmlan_adapter pmadapter)
|
|||
!wlan_bypass_tx_list_empty(pmadapter));
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function will convert 802.11 header to 802.3 header
|
||||
and save the backhaul station aid to pmbuf
|
||||
*
|
||||
* @param priv A pointer to mlan_private
|
||||
* @param pmbuf A pointer to mlan_buffer
|
||||
* @param prx_pd A pointer to RxPD
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
mlan_status wlan_check_easymesh_pkt(mlan_private *priv, pmlan_buffer pmbuf,
|
||||
RxPD *prx_pd)
|
||||
{
|
||||
Eth803Hdr_t *eth_header = MNULL;
|
||||
sta_node *sta_ptr = MNULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u8 *pos = MNULL;
|
||||
t_u32 tmp = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
pos = (t_u8 *)prx_pd + prx_pd->rx_pkt_offset;
|
||||
eth_header = (Eth803Hdr_t *)pos;
|
||||
|
||||
PRINTM(MDAT_D,
|
||||
"Rx Easymesh ETH header destination address: " FULL_MACSTR
|
||||
"\nETH header source address: " FULL_MACSTR "\n",
|
||||
FULL_MAC2STR(eth_header->dest_addr),
|
||||
FULL_MAC2STR(eth_header->src_addr));
|
||||
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_UAP) {
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_EASYMESH;
|
||||
memcpy_ext(priv->adapter, pmbuf->mac, prx_pd->ta_mac,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
|
||||
sta_ptr = wlan_get_station_entry(priv, prx_pd->ta_mac);
|
||||
if (!sta_ptr) {
|
||||
PRINTM(MERROR,
|
||||
"Easymesh Error! Can't find station in the station list\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Save station aid to pmbuf and send it to moal */
|
||||
tmp = (t_u32)sta_ptr->aid;
|
||||
pmbuf->priority |= (tmp << 24);
|
||||
PRINTM(MDAT_D, "Easymesh: Rx for VLAN " FULL_MACSTR "\n",
|
||||
FULL_MAC2STR(prx_pd->ta_mac));
|
||||
}
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -40,9 +40,6 @@ Change log:
|
|||
#include "mlan_11h.h"
|
||||
#include "mlan_11ac.h"
|
||||
#include "mlan_11ax.h"
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
#include "authenticator_api.h"
|
||||
#endif
|
||||
#ifdef PCIE
|
||||
#include "mlan_pcie.h"
|
||||
#endif /* PCIE */
|
||||
|
@ -210,13 +207,9 @@ static mlan_status uap_process_cmdresp_error(mlan_private *pmpriv,
|
|||
*/
|
||||
switch (resp->command) {
|
||||
#ifdef SDIO
|
||||
case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG:
|
||||
pmadapter->pcard_sd->sdio_rx_aggr_enable = MFALSE;
|
||||
PRINTM(MMSG, "FW don't support SDIO single port rx aggr\n");
|
||||
break;
|
||||
#endif
|
||||
|
||||
case HOST_CMD_APCMD_SYS_CONFIGURE: {
|
||||
case HostCmd_CMD_APCMD_SYS_CONFIGURE: {
|
||||
HostCmd_DS_SYS_CONFIG *sys_config =
|
||||
(HostCmd_DS_SYS_CONFIG *)&resp->params.sys_config;
|
||||
t_u16 resp_len = 0, travel_len = 0, index;
|
||||
|
@ -298,10 +291,14 @@ static mlan_status uap_process_cmdresp_error(mlan_private *pmpriv,
|
|||
ret = MLAN_STATUS_SUCCESS;
|
||||
PRINTM(MCMND, "FW don't support chan region cfg command!\n");
|
||||
break;
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR)
|
||||
case HostCmd_CMD_CRYPTO:
|
||||
PRINTM(MCMND, "crypto cmd result=0x%x!\n", resp->result);
|
||||
ret = wlan_ret_crypto(pmpriv, resp, pioctl_buf);
|
||||
case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL:
|
||||
if (resp->result == HostCmd_RESULT_BUSY)
|
||||
pmadapter->dbg.num_remain_chan_err++;
|
||||
break;
|
||||
#ifdef STA_SUPPORT
|
||||
case HostCmd_CMD_802_11_SCAN_EXT:
|
||||
if (resp->result == HostCmd_RESULT_BUSY)
|
||||
pmadapter->dbg.num_scan_err++;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
@ -708,7 +705,6 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
MrvlIETypes_HTCap_t *tlv_htcap = MNULL;
|
||||
MrvlIEtypes_wmm_parameter_t *tlv_wmm_parameter = MNULL;
|
||||
MrvlIEtypes_preamble_t *tlv_preamble = MNULL;
|
||||
MrvlIEtypes_MultiAp_t *tlv_multi_ap = MNULL;
|
||||
|
||||
t_u32 cmd_size = 0;
|
||||
t_u8 zero_mac[] = {0, 0, 0, 0, 0, 0};
|
||||
|
@ -724,7 +720,7 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
|
||||
bss = (mlan_ds_bss *)pioctl_buf->pbuf;
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_APCMD_SYS_CONFIGURE);
|
||||
sys_config->action = wlan_cpu_to_le16(cmd_action);
|
||||
cmd_size = sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN;
|
||||
|
||||
|
@ -966,67 +962,60 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
tlv += sizeof(MrvlIEtypes_retry_limit_t);
|
||||
}
|
||||
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (IS_FW_SUPPORT_AUTHENTICATOR(pmpriv->adapter)) {
|
||||
#endif
|
||||
if (bss->param.bss_config.pairwise_update_timeout <
|
||||
(MAX_VALID_DWORD)) {
|
||||
tlv_pairwise_timeout =
|
||||
(MrvlIEtypes_eapol_pwk_hsk_timeout_t *)tlv;
|
||||
tlv_pairwise_timeout->header.type = wlan_cpu_to_le16(
|
||||
TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT);
|
||||
tlv_pairwise_timeout->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u32));
|
||||
tlv_pairwise_timeout
|
||||
->pairwise_update_timeout = wlan_cpu_to_le32(
|
||||
if (bss->param.bss_config.pairwise_update_timeout < (MAX_VALID_DWORD)) {
|
||||
tlv_pairwise_timeout =
|
||||
(MrvlIEtypes_eapol_pwk_hsk_timeout_t *)tlv;
|
||||
tlv_pairwise_timeout->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT);
|
||||
tlv_pairwise_timeout->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u32));
|
||||
tlv_pairwise_timeout->pairwise_update_timeout =
|
||||
wlan_cpu_to_le32(
|
||||
bss->param.bss_config.pairwise_update_timeout);
|
||||
cmd_size += sizeof(MrvlIEtypes_eapol_pwk_hsk_timeout_t);
|
||||
tlv += sizeof(MrvlIEtypes_eapol_pwk_hsk_timeout_t);
|
||||
}
|
||||
|
||||
if (bss->param.bss_config.pwk_retries < (MAX_VALID_DWORD)) {
|
||||
tlv_pairwise_retries =
|
||||
(MrvlIEtypes_eapol_pwk_hsk_retries_t *)tlv;
|
||||
tlv_pairwise_retries->header.type = wlan_cpu_to_le16(
|
||||
TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES);
|
||||
tlv_pairwise_retries->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u32));
|
||||
tlv_pairwise_retries->pwk_retries = wlan_cpu_to_le32(
|
||||
bss->param.bss_config.pwk_retries);
|
||||
cmd_size += sizeof(MrvlIEtypes_eapol_pwk_hsk_retries_t);
|
||||
tlv += sizeof(MrvlIEtypes_eapol_pwk_hsk_retries_t);
|
||||
}
|
||||
|
||||
if (bss->param.bss_config.groupwise_update_timeout <
|
||||
(MAX_VALID_DWORD)) {
|
||||
tlv_groupwise_timeout =
|
||||
(MrvlIEtypes_eapol_gwk_hsk_timeout_t *)tlv;
|
||||
tlv_groupwise_timeout->header.type = wlan_cpu_to_le16(
|
||||
TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT);
|
||||
tlv_groupwise_timeout->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u32));
|
||||
tlv_groupwise_timeout
|
||||
->groupwise_update_timeout = wlan_cpu_to_le32(
|
||||
bss->param.bss_config.groupwise_update_timeout);
|
||||
cmd_size += sizeof(MrvlIEtypes_eapol_gwk_hsk_timeout_t);
|
||||
tlv += sizeof(MrvlIEtypes_eapol_gwk_hsk_timeout_t);
|
||||
}
|
||||
|
||||
if (bss->param.bss_config.gwk_retries < (MAX_VALID_DWORD)) {
|
||||
tlv_groupwise_retries =
|
||||
(MrvlIEtypes_eapol_gwk_hsk_retries_t *)tlv;
|
||||
tlv_groupwise_retries->header.type = wlan_cpu_to_le16(
|
||||
TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES);
|
||||
tlv_groupwise_retries->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u32));
|
||||
tlv_groupwise_retries->gwk_retries = wlan_cpu_to_le32(
|
||||
bss->param.bss_config.gwk_retries);
|
||||
cmd_size += sizeof(MrvlIEtypes_eapol_gwk_hsk_retries_t);
|
||||
tlv += sizeof(MrvlIEtypes_eapol_gwk_hsk_retries_t);
|
||||
}
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
cmd_size += sizeof(MrvlIEtypes_eapol_pwk_hsk_timeout_t);
|
||||
tlv += sizeof(MrvlIEtypes_eapol_pwk_hsk_timeout_t);
|
||||
}
|
||||
|
||||
if (bss->param.bss_config.pwk_retries < (MAX_VALID_DWORD)) {
|
||||
tlv_pairwise_retries =
|
||||
(MrvlIEtypes_eapol_pwk_hsk_retries_t *)tlv;
|
||||
tlv_pairwise_retries->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES);
|
||||
tlv_pairwise_retries->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u32));
|
||||
tlv_pairwise_retries->pwk_retries =
|
||||
wlan_cpu_to_le32(bss->param.bss_config.pwk_retries);
|
||||
cmd_size += sizeof(MrvlIEtypes_eapol_pwk_hsk_retries_t);
|
||||
tlv += sizeof(MrvlIEtypes_eapol_pwk_hsk_retries_t);
|
||||
}
|
||||
|
||||
if (bss->param.bss_config.groupwise_update_timeout <
|
||||
(MAX_VALID_DWORD)) {
|
||||
tlv_groupwise_timeout =
|
||||
(MrvlIEtypes_eapol_gwk_hsk_timeout_t *)tlv;
|
||||
tlv_groupwise_timeout->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT);
|
||||
tlv_groupwise_timeout->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u32));
|
||||
tlv_groupwise_timeout->groupwise_update_timeout =
|
||||
wlan_cpu_to_le32(
|
||||
bss->param.bss_config.groupwise_update_timeout);
|
||||
cmd_size += sizeof(MrvlIEtypes_eapol_gwk_hsk_timeout_t);
|
||||
tlv += sizeof(MrvlIEtypes_eapol_gwk_hsk_timeout_t);
|
||||
}
|
||||
|
||||
if (bss->param.bss_config.gwk_retries < (MAX_VALID_DWORD)) {
|
||||
tlv_groupwise_retries =
|
||||
(MrvlIEtypes_eapol_gwk_hsk_retries_t *)tlv;
|
||||
tlv_groupwise_retries->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES);
|
||||
tlv_groupwise_retries->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u32));
|
||||
tlv_groupwise_retries->gwk_retries =
|
||||
wlan_cpu_to_le32(bss->param.bss_config.gwk_retries);
|
||||
cmd_size += sizeof(MrvlIEtypes_eapol_gwk_hsk_retries_t);
|
||||
tlv += sizeof(MrvlIEtypes_eapol_gwk_hsk_retries_t);
|
||||
}
|
||||
#endif
|
||||
if ((bss->param.bss_config.filter.filter_mode <=
|
||||
MAC_FILTER_MODE_BLOCK_MAC) &&
|
||||
(bss->param.bss_config.filter.mac_count <= MAX_MAC_FILTER_NUM)) {
|
||||
|
@ -1100,6 +1089,10 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
tlv_auth_type->header.len =
|
||||
wlan_cpu_to_le16(sizeof(MrvlIEtypes_auth_type_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
tlv_auth_type->PWE_derivation =
|
||||
bss->param.bss_config.pwe_derivation;
|
||||
tlv_auth_type->transition_disable =
|
||||
bss->param.bss_config.transition_disable;
|
||||
tlv_auth_type->auth_type =
|
||||
(t_u8)bss->param.bss_config.auth_mode;
|
||||
cmd_size += sizeof(MrvlIEtypes_auth_type_t);
|
||||
|
@ -1190,49 +1183,34 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
tlv += sizeof(MrvlIEtypes_rsn_replay_prot_t);
|
||||
}
|
||||
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (IS_FW_SUPPORT_AUTHENTICATOR(pmpriv->adapter)) {
|
||||
#endif
|
||||
if (bss->param.bss_config.wpa_cfg.length) {
|
||||
tlv_passphrase =
|
||||
(MrvlIEtypes_passphrase_t *)tlv;
|
||||
tlv_passphrase->header.type = wlan_cpu_to_le16(
|
||||
TLV_TYPE_UAP_WPA_PASSPHRASE);
|
||||
tlv_passphrase->header
|
||||
.len = (t_u16)wlan_cpu_to_le16(
|
||||
bss->param.bss_config.wpa_cfg.length);
|
||||
memcpy_ext(
|
||||
pmpriv->adapter,
|
||||
tlv_passphrase->passphrase,
|
||||
bss->param.bss_config.wpa_cfg.passphrase,
|
||||
bss->param.bss_config.wpa_cfg.length,
|
||||
bss->param.bss_config.wpa_cfg.length);
|
||||
cmd_size +=
|
||||
sizeof(MrvlIEtypesHeader_t) +
|
||||
bss->param.bss_config.wpa_cfg.length;
|
||||
tlv += sizeof(MrvlIEtypesHeader_t) +
|
||||
bss->param.bss_config.wpa_cfg.length;
|
||||
}
|
||||
|
||||
if (bss->param.bss_config.wpa_cfg.gk_rekey_time <
|
||||
MAX_GRP_TIMER) {
|
||||
tlv_rekey_time =
|
||||
(MrvlIEtypes_group_rekey_time_t *)tlv;
|
||||
tlv_rekey_time->header.type = wlan_cpu_to_le16(
|
||||
TLV_TYPE_UAP_GRP_REKEY_TIME);
|
||||
tlv_rekey_time->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u32));
|
||||
tlv_rekey_time->gk_rekey_time =
|
||||
wlan_cpu_to_le32(
|
||||
bss->param.bss_config.wpa_cfg
|
||||
.gk_rekey_time);
|
||||
cmd_size +=
|
||||
sizeof(MrvlIEtypes_group_rekey_time_t);
|
||||
tlv += sizeof(MrvlIEtypes_group_rekey_time_t);
|
||||
}
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (bss->param.bss_config.wpa_cfg.length) {
|
||||
tlv_passphrase = (MrvlIEtypes_passphrase_t *)tlv;
|
||||
tlv_passphrase->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_UAP_WPA_PASSPHRASE);
|
||||
tlv_passphrase->header.len = (t_u16)wlan_cpu_to_le16(
|
||||
bss->param.bss_config.wpa_cfg.length);
|
||||
memcpy_ext(pmpriv->adapter, tlv_passphrase->passphrase,
|
||||
bss->param.bss_config.wpa_cfg.passphrase,
|
||||
bss->param.bss_config.wpa_cfg.length,
|
||||
bss->param.bss_config.wpa_cfg.length);
|
||||
cmd_size += sizeof(MrvlIEtypesHeader_t) +
|
||||
bss->param.bss_config.wpa_cfg.length;
|
||||
tlv += sizeof(MrvlIEtypesHeader_t) +
|
||||
bss->param.bss_config.wpa_cfg.length;
|
||||
}
|
||||
|
||||
if (bss->param.bss_config.wpa_cfg.gk_rekey_time <
|
||||
MAX_GRP_TIMER) {
|
||||
tlv_rekey_time = (MrvlIEtypes_group_rekey_time_t *)tlv;
|
||||
tlv_rekey_time->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_UAP_GRP_REKEY_TIME);
|
||||
tlv_rekey_time->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u32));
|
||||
tlv_rekey_time->gk_rekey_time = wlan_cpu_to_le32(
|
||||
bss->param.bss_config.wpa_cfg.gk_rekey_time);
|
||||
cmd_size += sizeof(MrvlIEtypes_group_rekey_time_t);
|
||||
tlv += sizeof(MrvlIEtypes_group_rekey_time_t);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
if ((bss->param.bss_config.wep_cfg.key0.length) &&
|
||||
((bss->param.bss_config.wep_cfg.key0.length == 5) ||
|
||||
|
@ -1342,7 +1320,7 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
bss->param.bss_config.supported_mcs_set, 16,
|
||||
sizeof(tlv_htcap->ht_cap.supported_mcs_set));
|
||||
if (IS_CARD9098(pmpriv->adapter->card_type) ||
|
||||
IS_CARDIW62X(pmpriv->adapter->card_type) ||
|
||||
IS_CARDIW624(pmpriv->adapter->card_type) ||
|
||||
IS_CARD9097(pmpriv->adapter->card_type)) {
|
||||
if (bss->param.bss_config.supported_mcs_set[0]) {
|
||||
if (bss->param.bss_config.bandcfg.chanBand ==
|
||||
|
@ -1441,11 +1419,6 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
cmd_size += sizeof(MrvlIEtypes_wmm_parameter_t);
|
||||
tlv += sizeof(MrvlIEtypes_wmm_parameter_t);
|
||||
}
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (!IS_FW_SUPPORT_AUTHENTICATOR(pmpriv->adapter))
|
||||
AuthenticatorBssConfig(pmpriv->psapriv,
|
||||
(t_u8 *)&bss->param.bss_config, 0, 0, 0);
|
||||
#endif
|
||||
if (pmpriv->adapter->pcard_info->v17_fw_api &&
|
||||
bss->param.bss_config.preamble_type) {
|
||||
tlv_preamble = (MrvlIEtypes_preamble_t *)tlv;
|
||||
|
@ -1460,16 +1433,6 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
cmd_size += sizeof(MrvlIEtypes_preamble_t);
|
||||
tlv += sizeof(MrvlIEtypes_preamble_t);
|
||||
}
|
||||
if (bss->param.bss_config.multi_ap_flag) {
|
||||
/** Add multi AP tlv here */
|
||||
tlv_multi_ap = (MrvlIEtypes_MultiAp_t *)tlv;
|
||||
tlv_multi_ap->header.type = wlan_cpu_to_le16(TLV_TYPE_MULTI_AP);
|
||||
tlv_multi_ap->header.len =
|
||||
wlan_cpu_to_le16(sizeof(tlv_multi_ap->flag));
|
||||
tlv_multi_ap->flag = bss->param.bss_config.multi_ap_flag;
|
||||
cmd_size += sizeof(MrvlIEtypes_MultiAp_t);
|
||||
tlv += sizeof(MrvlIEtypes_MultiAp_t);
|
||||
}
|
||||
cmd->size = (t_u16)wlan_cpu_to_le16(cmd_size);
|
||||
PRINTM(MCMND, "AP config: cmd_size=%d\n", cmd_size);
|
||||
LEAVE();
|
||||
|
@ -1526,7 +1489,7 @@ static mlan_status wlan_uap_cmd_sys_configure(pmlan_private pmpriv,
|
|||
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_APCMD_SYS_CONFIGURE);
|
||||
sys_config->action = wlan_cpu_to_le16(cmd_action);
|
||||
cmd->size =
|
||||
wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN);
|
||||
|
@ -2036,6 +1999,7 @@ static mlan_status wlan_uap_ret_cmd_ap_config(pmlan_private pmpriv,
|
|||
MrvlIEtypes_gwk_cipher_t *tlv_gwk_cipher = MNULL;
|
||||
MrvlIEtypes_rsn_replay_prot_t *tlv_rsn_prot = MNULL;
|
||||
MrvlIEtypes_passphrase_t *tlv_passphrase = MNULL;
|
||||
MrvlIEtypes_SAE_Password_t *tlv_sae_password = MNULL;
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
MrvlIEtypes_psk_t *tlv_psk = MNULL;
|
||||
#endif /* WIFI_DIRECT_SUPPORT */
|
||||
|
@ -2327,6 +2291,18 @@ static mlan_status wlan_uap_ret_cmd_ap_config(pmlan_private pmpriv,
|
|||
sizeof(bss->param.bss_config.wpa_cfg
|
||||
.passphrase));
|
||||
break;
|
||||
case TLV_TYPE_SAE_PASSWORD:
|
||||
tlv_sae_password = (MrvlIEtypes_SAE_Password_t *)tlv;
|
||||
bss->param.bss_config.wpa_cfg.sae_password_length =
|
||||
MIN(MLAN_PMK_HEXSTR_LENGTH, tlv_len);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
bss->param.bss_config.wpa_cfg.sae_password,
|
||||
tlv_sae_password->sae_password,
|
||||
bss->param.bss_config.wpa_cfg
|
||||
.sae_password_length,
|
||||
sizeof(bss->param.bss_config.wpa_cfg
|
||||
.sae_password));
|
||||
break;
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
case TLV_TYPE_UAP_PSK:
|
||||
tlv_psk = (MrvlIEtypes_psk_t *)tlv;
|
||||
|
@ -2428,11 +2404,6 @@ static mlan_status wlan_uap_ret_cmd_ap_config(pmlan_private pmpriv,
|
|||
tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len +
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
}
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (!IS_FW_SUPPORT_AUTHENTICATOR(pmpriv->adapter))
|
||||
AuthenticatorBssConfig(pmpriv->psapriv,
|
||||
(t_u8 *)&bss->param.bss_config, 0, 0, 1);
|
||||
#endif
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -3027,7 +2998,7 @@ static mlan_status wlan_uap_cmd_bss_start(pmlan_private pmpriv,
|
|||
MrvlIEtypes_HostMlme_t *tlv;
|
||||
|
||||
ENTER();
|
||||
cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_BSS_START);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_APCMD_BSS_START);
|
||||
cmd->size = S_DS_GEN;
|
||||
if (pmpriv->uap_host_based & UAP_FLAG_HOST_MLME) {
|
||||
tlv = (MrvlIEtypes_HostMlme_t *)((t_u8 *)cmd + cmd->size);
|
||||
|
@ -3265,8 +3236,10 @@ static mlan_status wlan_uap_ret_get_log(pmlan_private pmpriv,
|
|||
wlan_le32_to_cpu(pget_log->rx_stuck_issue_cnt[0]);
|
||||
pget_info->param.stats.rx_stuck_issue_cnt[1] =
|
||||
wlan_le32_to_cpu(pget_log->rx_stuck_issue_cnt[1]);
|
||||
pget_info->param.stats.rx_stuck_recovery_cnt =
|
||||
wlan_le32_to_cpu(pget_log->rx_stuck_recovery_cnt);
|
||||
pget_info->param.stats.rx_stuck_poll_recovery_cnt =
|
||||
wlan_le32_to_cpu(pget_log->rx_stuck_poll_recovery_cnt);
|
||||
pget_info->param.stats.rx_stuck_intr_recovery_cnt =
|
||||
wlan_le32_to_cpu(pget_log->rx_stuck_intr_recovery_cnt);
|
||||
pget_info->param.stats.rx_stuck_tsf[0] =
|
||||
wlan_le64_to_cpu(pget_log->rx_stuck_tsf[0]);
|
||||
pget_info->param.stats.rx_stuck_tsf[1] =
|
||||
|
@ -3428,7 +3401,7 @@ static mlan_status wlan_uap_cmd_sta_deauth(pmlan_private pmpriv,
|
|||
mlan_deauth_param *deauth = (mlan_deauth_param *)pdata_buf;
|
||||
|
||||
ENTER();
|
||||
cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_STA_DEAUTH);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_APCMD_STA_DEAUTH);
|
||||
cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(HostCmd_DS_STA_DEAUTH));
|
||||
memcpy_ext(pmpriv->adapter, pcmd_sta_deauth->mac, deauth->mac_addr,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
|
@ -3437,6 +3410,34 @@ static mlan_status wlan_uap_cmd_sta_deauth(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function send deauth command
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param sta_addr A pointer to sta mac address
|
||||
* @param reason_code reason code
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status wlan_send_deauth_cmd(pmlan_private pmpriv, t_u8 *sta_addr,
|
||||
t_u16 reason_code)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_deauth_param param;
|
||||
|
||||
ENTER();
|
||||
|
||||
param.reason_code = reason_code;
|
||||
memcpy_ext(pmpriv->adapter, param.mac_addr, sta_addr,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_STA_DEAUTH,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL, (t_void *)¶m);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command of report mic_err
|
||||
*
|
||||
|
@ -3453,7 +3454,7 @@ static mlan_status wlan_uap_cmd_report_mic(pmlan_private pmpriv,
|
|||
(HostCmd_DS_REPORT_MIC *)&cmd->params.report_mic;
|
||||
|
||||
ENTER();
|
||||
cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_REPORT_MIC);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_APCMD_REPORT_MIC);
|
||||
cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(HostCmd_DS_REPORT_MIC));
|
||||
memcpy_ext(pmpriv->adapter, pcmd_report_mic->mac, pdata_buf,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
|
@ -3909,6 +3910,10 @@ static void wlan_check_uap_capability(pmlan_private priv, pmlan_buffer pevent)
|
|||
priv->is_11ax_enabled = MTRUE;
|
||||
}
|
||||
}
|
||||
if (priv->is_11n_enabled || priv->is_11ac_enabled ||
|
||||
priv->is_11ax_enabled) {
|
||||
PRINTM(MCMND, "STBC NOT supported, Will be disabled\n");
|
||||
}
|
||||
|
||||
if (tlv_type == VENDOR_SPECIFIC_221) {
|
||||
if (!memcmp(priv->adapter,
|
||||
|
@ -3986,7 +3991,7 @@ static void wlan_check_uap_capability(pmlan_private priv, pmlan_buffer pevent)
|
|||
bandwidth;
|
||||
|
||||
ret = wlan_prepare_cmd(
|
||||
priv, HOST_CMD_APCMD_SYS_CONFIGURE,
|
||||
priv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL,
|
||||
&chan_bw_oper);
|
||||
if (ret != MLAN_STATUS_SUCCESS &&
|
||||
|
@ -4209,7 +4214,7 @@ static mlan_status wlan_uap_cmd_oper_ctrl(pmlan_private pmpriv,
|
|||
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_OPER_CTRL);
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_APCMD_OPER_CTRL);
|
||||
cmd->size =
|
||||
wlan_cpu_to_le16(sizeof(HostCmd_DS_UAP_OPER_CTRL) + S_DS_GEN);
|
||||
poper_ctl->action = wlan_cpu_to_le16(cmd_action);
|
||||
|
@ -4364,8 +4369,6 @@ static mlan_status wlan_uap_cmd_add_station(pmlan_private pmpriv,
|
|||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
/* Save station aid for multi-ap */
|
||||
sta_ptr->aid = bss->param.sta_info.aid;
|
||||
memcpy_ext(pmadapter, new_sta->peer_mac, bss->param.sta_info.peer_mac,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
if (cmd_action != HostCmd_ACT_ADD_STA)
|
||||
|
@ -4470,16 +4473,16 @@ static mlan_status wlan_uap_cmd_add_station(pmlan_private pmpriv,
|
|||
if (pext_tlv == MNULL) {
|
||||
tlv = (MrvlIEtypesHeader_t *)pos;
|
||||
tlv->type = wlan_cpu_to_le16(EXTENSION);
|
||||
tlv->len = wlan_cpu_to_le16(
|
||||
MIN(sta_ptr->he_cap.ieee_hdr.len,
|
||||
sizeof(IEEEtypes_HECap_t) -
|
||||
sizeof(IEEEtypes_Header_t)));
|
||||
tlv->len = MIN(sta_ptr->he_cap.ieee_hdr.len,
|
||||
sizeof(IEEEtypes_HECap_t) -
|
||||
sizeof(IEEEtypes_Header_t));
|
||||
|
||||
pos += sizeof(MrvlIEtypesHeader_t);
|
||||
memcpy_ext(pmadapter, pos,
|
||||
(t_u8 *)&sta_ptr->he_cap.ext_id, tlv->len,
|
||||
tlv->len);
|
||||
travel_len += sizeof(MrvlIEtypesHeader_t) + tlv->len;
|
||||
tlv->len = wlan_cpu_to_le16(tlv->len);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4523,6 +4526,34 @@ done:
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief clean up station's ralist and rx_reordering table.
|
||||
*
|
||||
* @param pmpriv A pointer to pmlan_private structure
|
||||
* @param sta_addr A pointer to station mac address
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
static void wlan_clean_up_station(pmlan_private pmpriv, t_u8 *sta_addr)
|
||||
{
|
||||
if (pmpriv->is_11n_enabled || pmpriv->is_11ax_enabled) {
|
||||
wlan_cleanup_reorder_tbl(pmpriv, sta_addr);
|
||||
wlan_11n_cleanup_txbastream_tbl(pmpriv, sta_addr);
|
||||
}
|
||||
wlan_wmm_delete_peer_ralist(pmpriv, sta_addr);
|
||||
return;
|
||||
}
|
||||
|
||||
static mlan_status wlan_ret_add_station(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
HostCmd_DS_ADD_STATION *add_sta = &resp->params.sta_info;
|
||||
|
||||
wlan_clean_up_station(pmpriv, add_sta->peer_mac);
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command of per peer stats
|
||||
*
|
||||
|
@ -4628,23 +4659,19 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
|
||||
/* Prepare command */
|
||||
switch (cmd_no) {
|
||||
case HostCMD_APCMD_ACS_SCAN:
|
||||
case HostCmd_CMD_APCMD_ACS_SCAN:
|
||||
case HostCmd_CMD_SOFT_RESET:
|
||||
case HOST_CMD_APCMD_BSS_STOP:
|
||||
case HOST_CMD_APCMD_SYS_INFO:
|
||||
case HOST_CMD_APCMD_SYS_RESET:
|
||||
case HOST_CMD_APCMD_STA_LIST:
|
||||
case HostCmd_CMD_APCMD_BSS_STOP:
|
||||
case HostCmd_CMD_APCMD_SYS_INFO:
|
||||
case HostCmd_CMD_APCMD_SYS_RESET:
|
||||
case HostCmd_CMD_APCMD_STA_LIST:
|
||||
cmd_ptr->command = wlan_cpu_to_le16(cmd_no);
|
||||
cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN);
|
||||
break;
|
||||
case HOST_CMD_APCMD_BSS_START:
|
||||
case HostCmd_CMD_APCMD_BSS_START:
|
||||
ret = wlan_uap_cmd_bss_start(pmpriv, cmd_ptr);
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (IsAuthenticatorEnabled(pmpriv->psapriv))
|
||||
AuthenticatorBssConfig(pmpriv->psapriv, MNULL, 1, 0, 0);
|
||||
#endif
|
||||
break;
|
||||
case HOST_CMD_APCMD_SYS_CONFIGURE:
|
||||
case HostCmd_CMD_APCMD_SYS_CONFIGURE:
|
||||
ret = wlan_uap_cmd_sys_configure(pmpriv, cmd_ptr, cmd_action,
|
||||
(pmlan_ioctl_req)pioctl_buf,
|
||||
pdata_buf);
|
||||
|
@ -4694,10 +4721,10 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_CHAN_REPORT_REQUEST:
|
||||
ret = wlan_11h_cmd_process(pmpriv, cmd_ptr, pdata_buf);
|
||||
break;
|
||||
case HOST_CMD_APCMD_STA_DEAUTH:
|
||||
case HostCmd_CMD_APCMD_STA_DEAUTH:
|
||||
ret = wlan_uap_cmd_sta_deauth(pmpriv, cmd_ptr, pdata_buf);
|
||||
break;
|
||||
case HOST_CMD_APCMD_REPORT_MIC:
|
||||
case HostCmd_CMD_APCMD_REPORT_MIC:
|
||||
ret = wlan_uap_cmd_report_mic(pmpriv, cmd_ptr, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_KEY_MATERIAL:
|
||||
|
@ -4708,9 +4735,6 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_get_hw_spec(pmpriv, cmd_ptr);
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG:
|
||||
ret = wlan_cmd_sdio_rx_aggr_cfg(cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_802_11_HS_CFG_ENH:
|
||||
ret = wlan_uap_cmd_802_11_hs_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
|
@ -4818,16 +4842,16 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
pdata_buf);
|
||||
break;
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
case HOST_CMD_WIFI_DIRECT_MODE_CONFIG:
|
||||
case HostCmd_CMD_WIFI_DIRECT_MODE_CONFIG:
|
||||
ret = wlan_cmd_wifi_direct_mode(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HOST_CMD_P2P_PARAMS_CONFIG:
|
||||
case HostCmd_CMD_P2P_PARAMS_CONFIG:
|
||||
ret = wlan_cmd_p2p_params_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
case HostCmd_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
ret = wlan_cmd_gpio_tsf_latch(pmpriv, cmd_ptr, cmd_action,
|
||||
pioctl_buf, pdata_buf);
|
||||
break;
|
||||
|
@ -4873,7 +4897,7 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_DRCS_CONFIG:
|
||||
ret = wlan_cmd_drcs_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HOST_CMD_APCMD_OPER_CTRL:
|
||||
case HostCmd_CMD_APCMD_OPER_CTRL:
|
||||
ret = wlan_uap_cmd_oper_ctrl(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
|
@ -4912,7 +4936,7 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
break;
|
||||
#endif
|
||||
#endif
|
||||
case HOST_CMD_TX_RX_PKT_STATS:
|
||||
case HostCmd_CMD_TX_RX_PKT_STATS:
|
||||
ret = wlan_cmd_tx_rx_pkt_stats(pmpriv, cmd_ptr,
|
||||
(pmlan_ioctl_req)pioctl_buf,
|
||||
pdata_buf);
|
||||
|
@ -4933,11 +4957,6 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_boot_sleep(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR)
|
||||
case HostCmd_CMD_CRYPTO:
|
||||
ret = wlan_cmd_crypto(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_11AX_CFG:
|
||||
ret = wlan_cmd_11ax_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
|
@ -4960,6 +4979,14 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_rxabortcfg_ext(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_NAV_MITIGATION_CFG:
|
||||
ret = wlan_cmd_nav_mitigation(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_LED_CONTROL:
|
||||
ret = wlan_cmd_led_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_TX_AMPDU_PROT_MODE:
|
||||
ret = wlan_cmd_tx_ampdu_prot_mode(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
|
@ -4976,7 +5003,7 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_cck_desense_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CHANNEL_TRPC_CONFIG:
|
||||
case HostCmd_CMD_CHANNEL_TRPC_CONFIG:
|
||||
ret = wlan_cmd_get_chan_trpc_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
|
@ -5011,9 +5038,14 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_cross_chip_synch(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_DS_GET_SENSOR_TEMP:
|
||||
case HostCmd_CMD_DS_GET_SENSOR_TEMP:
|
||||
wlan_cmd_get_sensor_temp(pmpriv, cmd_ptr, cmd_action);
|
||||
break;
|
||||
#ifdef STA_SUPPORT
|
||||
case HostCmd_CMD_802_11_SCAN_EXT:
|
||||
ret = wlan_cmd_802_11_scan_ext(pmpriv, cmd_ptr, pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no);
|
||||
if (pioctl_req)
|
||||
|
@ -5060,7 +5092,7 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
|
||||
/* Command successful, handle response */
|
||||
switch (cmdresp_no) {
|
||||
case HOST_CMD_APCMD_BSS_STOP:
|
||||
case HostCmd_CMD_APCMD_BSS_STOP:
|
||||
pmpriv->uap_bss_started = MFALSE;
|
||||
/* Timestamp update is required because bss_start after skip_cac
|
||||
* enabled should not select non-current channel just because
|
||||
|
@ -5085,15 +5117,13 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
if (pmpriv->adapter->state_rdh.stage == RDH_STOP_INTFS)
|
||||
wlan_11h_radar_detected_callback((t_void *)pmpriv);
|
||||
wlan_coex_ampdu_rxwinsize(pmadapter);
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (IsAuthenticatorEnabled(pmpriv->psapriv)) {
|
||||
AuthenticatorBssConfig(pmpriv->psapriv, MNULL, 0, 1, 0);
|
||||
AuthenticatorkeyClear(pmpriv->psapriv);
|
||||
}
|
||||
#endif
|
||||
pmpriv->uap_host_based = 0;
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
wlan_resync_usb_port(pmadapter);
|
||||
#endif
|
||||
break;
|
||||
case HOST_CMD_APCMD_BSS_START:
|
||||
case HostCmd_CMD_APCMD_BSS_START:
|
||||
if (!pmpriv->intf_state_11h.is_11h_host &&
|
||||
pmpriv->adapter->state_rdh.stage == RDH_RESTART_INTFS)
|
||||
wlan_11h_radar_detected_callback((t_void *)pmpriv);
|
||||
|
@ -5107,20 +5137,21 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
pmpriv->msdu_in_rx_amsdu_cnt = 0;
|
||||
pmpriv->msdu_in_tx_amsdu_cnt = 0;
|
||||
break;
|
||||
case HOST_CMD_APCMD_SYS_RESET:
|
||||
case HostCmd_CMD_APCMD_SYS_RESET:
|
||||
pmpriv->uap_bss_started = MFALSE;
|
||||
pmpriv->uap_host_based = 0;
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
AuthenitcatorInitBssConfig(pmpriv->psapriv);
|
||||
#endif
|
||||
ret = wlan_uap_ret_sys_reset(pmpriv, resp, pioctl_buf);
|
||||
wlan_reset_all_chan_dfs_state(priv, BAND_A, DFS_USABLE);
|
||||
wlan_11h_reset_dfs_checking_chan_dfs_state(priv, DFS_USABLE);
|
||||
wlan_11h_check_update_radar_det_state(pmpriv);
|
||||
wlan_coex_ampdu_rxwinsize(pmadapter);
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
wlan_resync_usb_port(pmadapter);
|
||||
#endif
|
||||
break;
|
||||
case HOST_CMD_APCMD_SYS_INFO:
|
||||
case HostCmd_CMD_APCMD_SYS_INFO:
|
||||
break;
|
||||
case HOST_CMD_APCMD_SYS_CONFIGURE:
|
||||
case HostCmd_CMD_APCMD_SYS_CONFIGURE:
|
||||
ret = wlan_uap_ret_sys_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_PS_MODE_ENH:
|
||||
|
@ -5145,22 +5176,19 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_CHAN_REPORT_REQUEST:
|
||||
ret = wlan_11h_cmdresp_process(pmpriv, resp);
|
||||
break;
|
||||
case HOST_CMD_APCMD_STA_DEAUTH:
|
||||
case HostCmd_CMD_APCMD_STA_DEAUTH:
|
||||
break;
|
||||
case HOST_CMD_APCMD_REPORT_MIC:
|
||||
case HostCmd_CMD_APCMD_REPORT_MIC:
|
||||
break;
|
||||
case HostCmd_CMD_802_11_KEY_MATERIAL:
|
||||
break;
|
||||
case HOST_CMD_APCMD_STA_LIST:
|
||||
case HostCmd_CMD_APCMD_STA_LIST:
|
||||
ret = wlan_uap_ret_sta_list(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_GET_HW_SPEC:
|
||||
ret = wlan_ret_get_hw_spec(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG:
|
||||
ret = wlan_ret_sdio_rx_aggr_cfg(pmpriv, resp);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_CFG_DATA:
|
||||
ret = wlan_ret_cfg_data(pmpriv, resp, pioctl_buf);
|
||||
|
@ -5278,14 +5306,14 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
ret = wlan_ret_remain_on_channel(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
case HOST_CMD_WIFI_DIRECT_MODE_CONFIG:
|
||||
case HostCmd_CMD_WIFI_DIRECT_MODE_CONFIG:
|
||||
ret = wlan_ret_wifi_direct_mode(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HOST_CMD_P2P_PARAMS_CONFIG:
|
||||
case HostCmd_CMD_P2P_PARAMS_CONFIG:
|
||||
ret = wlan_ret_p2p_params_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#endif
|
||||
case HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
case HostCmd_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
ret = wlan_ret_gpio_tsf_latch(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_RF_ANTENNA:
|
||||
|
@ -5325,10 +5353,10 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_DRCS_CONFIG:
|
||||
ret = wlan_ret_drcs_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCMD_APCMD_ACS_SCAN:
|
||||
case HostCmd_CMD_APCMD_ACS_SCAN:
|
||||
ret = wlan_ret_cmd_uap_acs_scan(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HOST_CMD_APCMD_OPER_CTRL:
|
||||
case HostCmd_CMD_APCMD_OPER_CTRL:
|
||||
ret = wlan_uap_ret_oper_ctrl(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_INDEPENDENT_RESET_CFG:
|
||||
|
@ -5353,7 +5381,7 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
break;
|
||||
#endif
|
||||
#endif
|
||||
case HOST_CMD_TX_RX_PKT_STATS:
|
||||
case HostCmd_CMD_TX_RX_PKT_STATS:
|
||||
ret = wlan_ret_tx_rx_pkt_stats(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_LINK_STATS:
|
||||
|
@ -5363,12 +5391,8 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
ret = wlan_ret_boot_sleep(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_ADD_NEW_STATION:
|
||||
ret = wlan_ret_add_station(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR)
|
||||
case HostCmd_CMD_CRYPTO:
|
||||
ret = wlan_ret_crypto(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_11AX_CFG:
|
||||
ret = wlan_ret_11ax_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
@ -5381,6 +5405,12 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_RX_ABORT_CFG:
|
||||
ret = wlan_ret_rxabortcfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_NAV_MITIGATION_CFG:
|
||||
ret = wlan_ret_nav_mitigation(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_LED_CONTROL:
|
||||
ret = wlan_ret_led_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_OFDM_DESENSE_CFG:
|
||||
ret = wlan_ret_ofdmdesense_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
@ -5403,7 +5433,7 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_CCK_DESENSE_CFG:
|
||||
ret = wlan_ret_cck_desense_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CHANNEL_TRPC_CONFIG:
|
||||
case HostCmd_CMD_CHANNEL_TRPC_CONFIG:
|
||||
ret = wlan_ret_get_chan_trpc_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_LOW_POWER_MODE_CFG:
|
||||
|
@ -5430,9 +5460,16 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_CROSS_CHIP_SYNCH:
|
||||
ret = wlan_ret_cross_chip_synch(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_DS_GET_SENSOR_TEMP:
|
||||
case HostCmd_CMD_DS_GET_SENSOR_TEMP:
|
||||
ret = wlan_ret_get_sensor_temp(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#ifdef STA_SUPPORT
|
||||
case HostCmd_CMD_802_11_SCAN_EXT:
|
||||
ret = wlan_ret_802_11_scan_ext(pmpriv, resp, pioctl_buf);
|
||||
pioctl_buf = MNULL;
|
||||
pmadapter->curr_cmd->pioctl_buf = MNULL;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
PRINTM(MERROR, "CMD_RESP: Unknown command response %#x\n",
|
||||
resp->command);
|
||||
|
@ -5462,6 +5499,7 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
t_u8 *event_buf = MNULL;
|
||||
mlan_event *pevent = MNULL;
|
||||
t_u8 sta_addr[MLAN_MAC_ADDR_LENGTH];
|
||||
t_u16 reason_code = 0;
|
||||
sta_node *sta_ptr = MNULL;
|
||||
t_u8 i = 0;
|
||||
t_u8 channel = 0;
|
||||
|
@ -5514,15 +5552,12 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
pevent->event_id = MLAN_EVENT_ID_UAP_FW_BSS_START;
|
||||
wlan_check_uap_capability(pmpriv, pmbuf);
|
||||
wlan_coex_ampdu_rxwinsize(pmadapter);
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
if (IsAuthenticatorEnabled(pmpriv->psapriv)) {
|
||||
pmadapter->authenticator_priv = pmpriv;
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DEFER_RX_WORK,
|
||||
MNULL);
|
||||
}
|
||||
#endif
|
||||
if (wlan_11h_radar_detect_required(pmpriv, pmpriv->uap_channel))
|
||||
wlan_11h_update_dfs_master_state_by_uap(pmpriv);
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
wlan_resync_usb_port(pmadapter);
|
||||
#endif
|
||||
break;
|
||||
case EVENT_MICRO_AP_BSS_ACTIVE:
|
||||
PRINTM(MEVENT, "EVENT: MICRO_AP_BSS_ACTIVE\n");
|
||||
|
@ -5582,11 +5617,7 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
if (!sta_ptr)
|
||||
break;
|
||||
wlan_check_sta_capability(pmpriv, pmbuf, sta_ptr);
|
||||
if (pmpriv->is_11n_enabled || pmpriv->is_11ax_enabled
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
|| IsAuthenticatorEnabled(pmpriv->psapriv)
|
||||
#endif
|
||||
) {
|
||||
if (pmpriv->is_11n_enabled || pmpriv->is_11ax_enabled) {
|
||||
for (i = 0; i < MAX_NUM_TID; i++) {
|
||||
if (sta_ptr->is_11n_enabled ||
|
||||
sta_ptr->is_11ax_enabled)
|
||||
|
@ -5602,12 +5633,6 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
}
|
||||
if (pmpriv->sec_info.wapi_enabled)
|
||||
wlan_update_wapi_info_tlv(pmpriv, pmbuf);
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
/**enter authenticator*/
|
||||
if (IsAuthenticatorEnabled(pmpriv->psapriv))
|
||||
AuthenticatorSendEapolPacket(
|
||||
pmpriv->psapriv, sta_ptr->cm_connectioninfo);
|
||||
#endif
|
||||
pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU;
|
||||
break;
|
||||
case EVENT_MICRO_AP_STA_DEAUTH:
|
||||
|
@ -5621,10 +5646,19 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
wlan_recv_event(pmpriv, pevent->event_id, pevent);
|
||||
memcpy_ext(pmadapter, sta_addr, pmadapter->event_body + 2,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
reason_code = *(t_u16 *)pmadapter->event_body;
|
||||
sta_ptr = wlan_get_station_entry(pmpriv, sta_addr);
|
||||
|
||||
PRINTM_NETINTF(MMSG, pmpriv);
|
||||
PRINTM(MMSG, "wlan: EVENT: MICRO_AP_STA_DEAUTH " MACSTR "\n",
|
||||
MAC2STR(sta_addr));
|
||||
PRINTM(MMSG,
|
||||
"wlan: EVENT: MICRO_AP_STA_DEAUTH reason=0x%x " MACSTR
|
||||
"\n",
|
||||
reason_code, MAC2STR(sta_addr));
|
||||
if (pmpriv->uap_host_based & UAP_FLAG_HOST_MLME && sta_ptr) {
|
||||
if (!(reason_code & MBIT(14)))
|
||||
wlan_send_deauth_cmd(pmpriv, sta_addr,
|
||||
reason_code);
|
||||
}
|
||||
if (pmpriv->is_11n_enabled || pmpriv->is_11ax_enabled) {
|
||||
wlan_cleanup_reorder_tbl(pmpriv, sta_addr);
|
||||
wlan_11n_cleanup_txbastream_tbl(pmpriv, sta_addr);
|
||||
|
@ -5640,18 +5674,17 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
break;
|
||||
case EVENT_ADDBA:
|
||||
PRINTM(MEVENT, "EVENT: ADDBA Request\n");
|
||||
if (pmpriv->media_connected == MTRUE)
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_11N_ADDBA_RSP,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL,
|
||||
pmadapter->event_body);
|
||||
if (pmpriv->media_connected == MTRUE &&
|
||||
!pmpriv->adapter->remain_on_channel)
|
||||
wlan_11n_add_bastream(pmpriv, pmadapter->event_body);
|
||||
else
|
||||
PRINTM(MERROR,
|
||||
"Ignore ADDBA Request event in BSS idle state\n");
|
||||
break;
|
||||
case EVENT_DELBA:
|
||||
PRINTM(MEVENT, "EVENT: DELBA Request\n");
|
||||
if (pmpriv->media_connected == MTRUE)
|
||||
if (pmpriv->media_connected == MTRUE &&
|
||||
!pmpriv->adapter->remain_on_channel)
|
||||
wlan_11n_delete_bastream(pmpriv, pmadapter->event_body);
|
||||
else
|
||||
PRINTM(MERROR,
|
||||
|
@ -5659,7 +5692,8 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
break;
|
||||
case EVENT_BA_STREAM_TIMEOUT:
|
||||
PRINTM(MEVENT, "EVENT: BA Stream timeout\n");
|
||||
if (pmpriv->media_connected == MTRUE)
|
||||
if (pmpriv->media_connected == MTRUE &&
|
||||
!pmpriv->adapter->remain_on_channel)
|
||||
wlan_11n_ba_stream_timeout(
|
||||
pmpriv, (HostCmd_DS_11N_BATIMEOUT *)
|
||||
pmadapter->event_body);
|
||||
|
@ -5837,6 +5871,12 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
pmpriv->uap_state_chan_cb.bandcfg = pchan_info->bandcfg;
|
||||
if (wlan_11h_radar_detect_required(pmpriv, pchan_info->channel))
|
||||
wlan_11h_update_dfs_master_state_by_uap(pmpriv);
|
||||
else {
|
||||
PRINTM(MCMND,
|
||||
"Disable DFS master operation after channel switch\n");
|
||||
wlan_11h_config_master_radar_det(pmpriv, MFALSE);
|
||||
wlan_11h_check_update_radar_det_state(pmpriv);
|
||||
}
|
||||
if ((pmpriv->adapter->state_rdh.stage != RDH_OFF &&
|
||||
!pmpriv->intf_state_11h.is_11h_host) ||
|
||||
pmpriv->adapter->dfs_test_params.no_channel_change_on_radar ||
|
||||
|
@ -5887,6 +5927,7 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
PRINTM_NETINTF(MEVENT, pmpriv);
|
||||
PRINTM(MEVENT, "EVENT: REMAIN_ON_CHANNEL_EXPIRED reason=%d\n",
|
||||
*(t_u16 *)pmadapter->event_body);
|
||||
pmpriv->adapter->remain_on_channel = MFALSE;
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_FLUSH_RX_WORK, MNULL);
|
||||
pevent->event_id = MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED;
|
||||
break;
|
||||
|
@ -5977,7 +6018,7 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
sizeof(eventcause),
|
||||
sizeof(t_u16), sizeof(t_u16));
|
||||
break;
|
||||
case CHAN_LOAD_EVENT: {
|
||||
case EVENT_CHAN_LOAD: {
|
||||
t_u8 *ptr = MNULL;
|
||||
HostCmd_DS_GET_CH_LOAD *cfg_cmd = MNULL;
|
||||
ptr = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
|
@ -5992,6 +6033,21 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
PRINTM(MINFO, "EVENT: Dump FW info\n");
|
||||
pevent->event_id = MLAN_EVENT_ID_FW_DUMP_INFO;
|
||||
break;
|
||||
#ifdef STA_SUPPORT
|
||||
case EVENT_EXT_SCAN_REPORT:
|
||||
PRINTM(MEVENT, "EVENT: EXT_SCAN Report (%d)\n",
|
||||
pmbuf->data_len);
|
||||
if (pmadapter->pscan_ioctl_req && pmadapter->ext_scan)
|
||||
ret = wlan_handle_event_ext_scan_report(priv, pmbuf);
|
||||
break;
|
||||
case EVENT_EXT_SCAN_STATUS_REPORT:
|
||||
PRINTM(MEVENT, "EVENT: EXT_SCAN status report (%d)\n",
|
||||
pmbuf->data_len);
|
||||
pmadapter->ext_scan_timeout = MFALSE;
|
||||
ret = wlan_handle_event_ext_scan_status(priv, pmbuf);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU;
|
||||
break;
|
||||
|
@ -6032,7 +6088,7 @@ static mlan_status wlan_uap_set_uap_max_sta(pmlan_private pmpriv,
|
|||
wlan_cpu_to_le16(TLV_TYPE_UAP_MAX_STA_CNT_PER_CHIP);
|
||||
tlv_uap_max_sta.header.len = wlan_cpu_to_le16(sizeof(t_u16));
|
||||
tlv_uap_max_sta.uap_max_sta = wlan_cpu_to_le16(uap_max_sta);
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL, &tlv_uap_max_sta);
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -6070,13 +6126,13 @@ mlan_status wlan_ops_uap_init_cmd(t_void *priv, t_u8 first_bss)
|
|||
wlan_uap_set_uap_max_sta(
|
||||
pmpriv, pmpriv->adapter->init_para.uap_max_sta);
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
HostCmd_ACT_GEN_GET, 0, MNULL, MNULL);
|
||||
if (ret) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
last_cmd = HOST_CMD_APCMD_SYS_CONFIGURE;
|
||||
last_cmd = HostCmd_CMD_APCMD_SYS_CONFIGURE;
|
||||
/** set last_init_cmd */
|
||||
if (last_cmd) {
|
||||
pmpriv->adapter->last_init_cmd = last_cmd;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains the handling of AP mode ioctls
|
||||
*
|
||||
*
|
||||
* Copyright 2009-2022 NXP
|
||||
* Copyright 2009-2023 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
@ -62,7 +62,7 @@ static mlan_status wlan_uap_bss_ioctl_stop(pmlan_adapter pmadapter,
|
|||
|
||||
ENTER();
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_BSS_STOP,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_BSS_STOP,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
MNULL);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -253,7 +253,7 @@ static mlan_status wlan_uap_callback_bss_ioctl_start(t_void *priv)
|
|||
|
||||
prep_bss_start:
|
||||
/* else okay to send command: not DFS channel or no radar */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_BSS_START,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_BSS_START,
|
||||
HostCmd_ACT_GEN_SET, 0,
|
||||
(t_void *)puap_state_chan_cb->pioctl_req_curr,
|
||||
MNULL);
|
||||
|
@ -304,7 +304,7 @@ static mlan_status wlan_uap_bss_ioctl_start(pmlan_adapter pmadapter,
|
|||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
} else {
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_BSS_START,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_BSS_START,
|
||||
HostCmd_ACT_GEN_SET, 0,
|
||||
(t_void *)pioctl_req, MNULL);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -355,7 +355,7 @@ static mlan_status wlan_uap_bss_ioctl_reset(pmlan_adapter pmadapter,
|
|||
pmpriv->addba_reject[6] = pmpriv->addba_reject[7] =
|
||||
ADDBA_RSP_STATUS_REJECT;
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_RESET,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_RESET,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
MNULL);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -418,8 +418,8 @@ static mlan_status wlan_uap_bss_ioctl_mac_address(pmlan_adapter pmadapter,
|
|||
} else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, cmd_action,
|
||||
0, (t_void *)pioctl_req, MNULL);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
cmd_action, 0, (t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
@ -450,8 +450,8 @@ static mlan_status wlan_uap_bss_ioctl_uap_wmm_param(pmlan_adapter pmadapter,
|
|||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, cmd_action,
|
||||
0, (t_void *)pioctl_req, MNULL);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
cmd_action, 0, (t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
@ -481,8 +481,8 @@ wlan_uap_bss_ioctl_action_chan_switch(pmlan_adapter pmadapter,
|
|||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, cmd_action,
|
||||
0, (t_void *)pioctl_req, MNULL);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
cmd_action, 0, (t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
@ -514,8 +514,8 @@ wlan_uap_bss_ioctl_uap_scan_channels(pmlan_adapter pmadapter,
|
|||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, cmd_action,
|
||||
0, (t_void *)pioctl_req, MNULL);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
cmd_action, 0, (t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
@ -546,8 +546,8 @@ static mlan_status wlan_uap_bss_ioctl_uap_channel(pmlan_adapter pmadapter,
|
|||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, cmd_action,
|
||||
0, (t_void *)pioctl_req, MNULL);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
cmd_action, 0, (t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
@ -580,7 +580,7 @@ static mlan_status wlan_uap_bss_ioctl_uap_oper_ctrl(pmlan_adapter pmadapter,
|
|||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_OPER_CTRL,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_OPER_CTRL,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
(t_void *)pioctl_req->pbuf);
|
||||
|
||||
|
@ -690,8 +690,8 @@ static mlan_status wlan_uap_bss_ioctl_config(pmlan_adapter pmadapter,
|
|||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, cmd_action,
|
||||
0, (t_void *)pioctl_req, MNULL);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
cmd_action, 0, (t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
@ -718,7 +718,7 @@ static mlan_status wlan_uap_bss_ioctl_deauth_sta(pmlan_adapter pmadapter,
|
|||
ENTER();
|
||||
|
||||
bss = (mlan_ds_bss *)pioctl_req->pbuf;
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_STA_DEAUTH,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_STA_DEAUTH,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
(t_void *)&bss->param.deauth_param);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -745,7 +745,7 @@ static mlan_status wlan_uap_get_sta_list(pmlan_adapter pmadapter,
|
|||
ENTER();
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_STA_LIST,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_STA_LIST,
|
||||
HostCmd_ACT_GEN_GET, 0, (t_void *)pioctl_req,
|
||||
MNULL);
|
||||
|
||||
|
@ -908,7 +908,7 @@ static mlan_status wlan_uap_set_wapi_ie(mlan_private *priv,
|
|||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(priv, HOST_CMD_APCMD_SYS_CONFIGURE,
|
||||
ret = wlan_prepare_cmd(priv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
MNULL);
|
||||
|
||||
|
@ -1013,7 +1013,7 @@ wlan_uap_sec_ioctl_report_mic_error(pmlan_adapter pmadapter,
|
|||
ENTER();
|
||||
|
||||
sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf;
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_REPORT_MIC,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_REPORT_MIC,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
(t_void *)sec->param.sta_mac);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -1735,7 +1735,7 @@ static mlan_status wlan_uap_bss_ioctl_acs_scan(pmlan_adapter pmadapter,
|
|||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCMD_APCMD_ACS_SCAN,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_ACS_SCAN,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
MNULL);
|
||||
|
||||
|
@ -1768,7 +1768,7 @@ mlan_status wlan_uap_get_channel(pmlan_private pmpriv)
|
|||
tlv_chan_band.header.len = sizeof(MrvlIEtypes_channel_band_t) -
|
||||
sizeof(MrvlIEtypesHeader_t);
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
HostCmd_ACT_GEN_GET, 0, MNULL, &tlv_chan_band);
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -1797,7 +1797,7 @@ mlan_status wlan_uap_set_channel(pmlan_private pmpriv,
|
|||
tlv_chan_band.bandcfg = uap_band_cfg;
|
||||
tlv_chan_band.channel = channel;
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL, &tlv_chan_band);
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -1833,7 +1833,7 @@ mlan_status wlan_uap_get_beacon_dtim(pmlan_private pmpriv)
|
|||
ptlv_dtim_pd->header.len =
|
||||
sizeof(MrvlIEtypes_dtim_period_t) - sizeof(MrvlIEtypesHeader_t);
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE,
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
HostCmd_ACT_GEN_GET, 0, MNULL, tlv_buffer);
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -1971,9 +1971,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
mlan_ds_rate *rate = MNULL;
|
||||
mlan_ds_reg_mem *reg_mem = MNULL;
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
pmlan_ds_scan pscan;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
switch (pioctl_req->req_id) {
|
||||
|
@ -2038,25 +2035,9 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
status = wlan_uap_bss_ioctl_action_chan_switch(
|
||||
pmadapter, pioctl_req);
|
||||
break;
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
#ifdef STA_SUPPORT
|
||||
case MLAN_IOCTL_SCAN:
|
||||
pscan = (mlan_ds_scan *)pioctl_req->pbuf;
|
||||
if ((pscan->sub_command == MLAN_OID_SCAN_NORMAL) &&
|
||||
(pioctl_req->action == MLAN_ACT_GET)) {
|
||||
PRINTM(MIOCTL, "Get scan table in uap\n");
|
||||
pscan->param.scan_resp.pscan_table =
|
||||
(t_u8 *)pmadapter->pscan_table;
|
||||
pscan->param.scan_resp.num_in_scan_table =
|
||||
pmadapter->num_in_scan_table;
|
||||
pscan->param.scan_resp.age_in_secs =
|
||||
pmadapter->age_in_secs;
|
||||
pioctl_req->data_read_written =
|
||||
sizeof(mlan_scan_resp) + MLAN_SUB_COMMAND_SIZE;
|
||||
pscan->param.scan_resp.pchan_stats =
|
||||
(t_u8 *)pmadapter->pchan_stats;
|
||||
pscan->param.scan_resp.num_in_chan_stats =
|
||||
pmadapter->num_in_chan_stats;
|
||||
}
|
||||
status = wlan_scan_ioctl(pmadapter, pioctl_req);
|
||||
break;
|
||||
#endif
|
||||
case MLAN_IOCTL_GET_INFO:
|
||||
|
@ -2276,6 +2257,11 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
if (misc->sub_command == MLAN_OID_MISC_RX_ABORT_CFG_EXT)
|
||||
status = wlan_misc_ioctl_rxabortcfg_ext(pmadapter,
|
||||
pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_NAV_MITIGATION)
|
||||
status = wlan_misc_ioctl_nav_mitigation(pmadapter,
|
||||
pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_LED_CONFIG)
|
||||
status = wlan_misc_ioctl_led(pmadapter, pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_TX_AMPDU_PROT_MODE)
|
||||
status = wlan_misc_ioctl_tx_ampdu_prot_mode(pmadapter,
|
||||
pioctl_req);
|
||||
|
@ -2330,6 +2316,11 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
if (misc->sub_command == MLAN_OID_MISC_COUNTRY_CODE)
|
||||
status = wlan_misc_ioctl_country_code(pmadapter,
|
||||
pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_REORDER_FLUSH_TIME)
|
||||
status = wlan_misc_ioctl_reorder_flush_time(pmadapter,
|
||||
pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_EXT_CAP_CFG)
|
||||
status = wlan_misc_ext_capa_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_IOCTL_POWER_CFG:
|
||||
power = (mlan_ds_power_cfg *)pioctl_req->pbuf;
|
||||
|
|
|
@ -36,9 +36,6 @@ Change log:
|
|||
#include "mlan_wmm.h"
|
||||
#include "mlan_11n_aggr.h"
|
||||
#include "mlan_11n_rxreorder.h"
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
#include "authenticator_api.h"
|
||||
#endif
|
||||
|
||||
/********************************************************
|
||||
Local Functions
|
||||
|
@ -249,11 +246,6 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
plocal_tx_pd->tx_pkt_type = (t_u16)pkt_type;
|
||||
plocal_tx_pd->tx_control = tx_control;
|
||||
}
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_EASYMESH;
|
||||
memcpy_ext(pmpriv->adapter, plocal_tx_pd->ra_mac, pmbuf->mac,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
}
|
||||
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_TX_CTRL) {
|
||||
if (pmbuf->u.tx_info.data_rate) {
|
||||
|
@ -346,9 +338,6 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
t_u8 ta[MLAN_MAC_ADDR_LENGTH];
|
||||
t_u16 rx_pkt_type = 0;
|
||||
sta_node *sta_ptr = MNULL;
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
t_u8 eapol_type[2] = {0x88, 0x8e};
|
||||
#endif
|
||||
t_u16 adj_rx_rate = 0;
|
||||
t_u8 antenna = 0;
|
||||
|
||||
|
@ -359,7 +348,8 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
wlan_802_11_header *pwlan_hdr;
|
||||
IEEEtypes_FrameCtl_t *frmctl;
|
||||
pmlan_buffer pmbuf2 = MNULL;
|
||||
mlan_802_11_mac_addr src_addr, dest_addr;
|
||||
mlan_802_11_mac_addr src_addr = {0x00};
|
||||
mlan_802_11_mac_addr dest_addr = {0x00};
|
||||
t_u16 hdr_len;
|
||||
t_u8 snap_eth_hdr[5] = {0xaa, 0xaa, 0x03, 0x00, 0x00};
|
||||
t_u8 ext_rate_info = 0;
|
||||
|
@ -398,14 +388,6 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
|
||||
rx_pkt_type = prx_pd->rx_pkt_type;
|
||||
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH) {
|
||||
PRINTM_NETINTF(MDAT_D, priv);
|
||||
PRINTM(MDAT_D, "UAP Rx Easymesh pkt flags : 0x%x\n",
|
||||
prx_pd->flags);
|
||||
ret = wlan_check_easymesh_pkt(priv, pmbuf, prx_pd);
|
||||
if (ret != MLAN_STATUS_SUCCESS)
|
||||
goto done;
|
||||
}
|
||||
prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset);
|
||||
|
||||
PRINTM(MINFO,
|
||||
|
@ -567,11 +549,7 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
}
|
||||
|
||||
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH)
|
||||
sta_ptr = wlan_get_station_entry(priv, prx_pd->ta_mac);
|
||||
else
|
||||
sta_ptr = wlan_get_station_entry(priv,
|
||||
prx_pkt->eth803_hdr.src_addr);
|
||||
sta_ptr = wlan_get_station_entry(priv, prx_pkt->eth803_hdr.src_addr);
|
||||
if (sta_ptr) {
|
||||
sta_ptr->snr = prx_pd->snr;
|
||||
sta_ptr->nf = prx_pd->nf;
|
||||
|
@ -585,33 +563,14 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DRV_EMBEDDED_AUTHENTICATOR
|
||||
/**process eapol packet for uap*/
|
||||
if (IsAuthenticatorEnabled(priv->psapriv) &&
|
||||
(!memcmp(pmadapter, &prx_pkt->eth803_hdr.h803_len, eapol_type,
|
||||
sizeof(eapol_type)))) {
|
||||
ret = AuthenticatorProcessEapolPacket(
|
||||
priv->psapriv, ((t_u8 *)prx_pd + prx_pd->rx_pkt_offset),
|
||||
prx_pd->rx_pkt_length);
|
||||
if (ret == MLAN_STATUS_SUCCESS) {
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
pmbuf->priority |= prx_pd->priority;
|
||||
if (pmadapter->enable_net_mon &&
|
||||
(prx_pd->rx_pkt_type == PKT_TYPE_802DOT11)) {
|
||||
wlan_process_uap_rx_packet(priv, pmbuf);
|
||||
goto done;
|
||||
}
|
||||
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH)
|
||||
memcpy_ext(pmadapter, ta, prx_pd->ta_mac, MLAN_MAC_ADDR_LENGTH,
|
||||
MLAN_MAC_ADDR_LENGTH);
|
||||
else
|
||||
memcpy_ext(pmadapter, ta, prx_pkt->eth803_hdr.src_addr,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
memcpy_ext(pmadapter, ta, prx_pkt->eth803_hdr.src_addr,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
if ((rx_pkt_type != PKT_TYPE_BAR) && (prx_pd->priority < MAX_NUM_TID)) {
|
||||
sta_ptr = wlan_get_station_entry(priv, ta);
|
||||
if (sta_ptr) {
|
||||
|
|
|
@ -99,8 +99,8 @@ static const struct _mlan_card_info mlan_card_info_usb9097 = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef USBIW62X
|
||||
static const struct _mlan_card_info mlan_card_info_usbIW62X = {
|
||||
#ifdef USBIW624
|
||||
static const struct _mlan_card_info mlan_card_info_usbIW624 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.v17_fw_api = 1,
|
||||
|
@ -262,8 +262,8 @@ static mlan_status wlan_usb_prog_fw_w_helper(pmlan_adapter pmadapter,
|
|||
if (IS_USB9097(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
#if defined(USBIW62X)
|
||||
if (IS_USBIW62X(pmadapter->card_type))
|
||||
#if defined(USBIW624)
|
||||
if (IS_USBIW624(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
|
||||
|
@ -806,9 +806,9 @@ mlan_status wlan_get_usb_device(pmlan_adapter pmadapter)
|
|||
pmadapter->pcard_info = &mlan_card_info_usb9097;
|
||||
break;
|
||||
#endif
|
||||
#ifdef USBIW62X
|
||||
case CARD_TYPE_USBIW62X:
|
||||
pmadapter->pcard_info = &mlan_card_info_usbIW62X;
|
||||
#ifdef USBIW624
|
||||
case CARD_TYPE_USBIW624:
|
||||
pmadapter->pcard_info = &mlan_card_info_usbIW624;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
@ -1305,7 +1305,7 @@ static mlan_status wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
if (type == MLAN_TYPE_CMD
|
||||
#if (defined(USB9098) || defined(USB9097) || defined(USBIW62X))
|
||||
#if (defined(USB9098) || defined(USB9097) || defined(USBIW624))
|
||||
|| type == MLAN_TYPE_VDLL
|
||||
#endif
|
||||
) {
|
||||
|
@ -1356,18 +1356,36 @@ static mlan_status wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief This function handle event/cmd complete
|
||||
* @brief This function handle event complete
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pmbuf A pointer to the mlan_buffer
|
||||
* @return N/A
|
||||
*/
|
||||
static mlan_status wlan_usb_cmdevt_complete(pmlan_adapter pmadapter,
|
||||
mlan_buffer *pmbuf,
|
||||
mlan_status status)
|
||||
static mlan_status wlan_usb_evt_complete(pmlan_adapter pmadapter,
|
||||
mlan_buffer *pmbuf, mlan_status status)
|
||||
{
|
||||
ENTER();
|
||||
pmadapter->event_cause = 0;
|
||||
pmadapter->pmlan_buffer_event = MNULL;
|
||||
pmadapter->callbacks.moal_recv_complete(pmadapter->pmoal_handle, pmbuf,
|
||||
pmadapter->rx_cmd_ep, status);
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handle cmd complete
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pmbuf A pointer to the mlan_buffer
|
||||
* @return N/A
|
||||
*/
|
||||
static mlan_status wlan_usb_cmd_complete(pmlan_adapter pmadapter,
|
||||
mlan_buffer *pmbuf, mlan_status status)
|
||||
{
|
||||
ENTER();
|
||||
pmadapter->callbacks.moal_recv_complete(pmadapter->pmoal_handle, pmbuf,
|
||||
pmadapter->rx_cmd_ep, status);
|
||||
|
||||
|
@ -1419,9 +1437,9 @@ mlan_adapter_operations mlan_usb_ops = {
|
|||
.dnld_fw = wlan_usb_dnld_fw,
|
||||
.host_to_card = wlan_usb_host_to_card,
|
||||
.wakeup_card = wlan_pm_usb_wakeup_card,
|
||||
.event_complete = wlan_usb_cmdevt_complete,
|
||||
.event_complete = wlan_usb_evt_complete,
|
||||
.data_complete = wlan_usb_data_complete,
|
||||
.cmdrsp_complete = wlan_usb_cmdevt_complete,
|
||||
.cmdrsp_complete = wlan_usb_cmd_complete,
|
||||
.handle_rx_packet = wlan_usb_handle_rx_packet,
|
||||
|
||||
.intf_header_len = USB_INTF_HEADER_LEN,
|
||||
|
|
|
@ -47,6 +47,11 @@ typedef struct _mlan_list_head {
|
|||
t_void *plock;
|
||||
} mlan_list_head, *pmlan_list_head;
|
||||
|
||||
struct reflective_enum_element {
|
||||
int id;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
/** MLAN MNULL pointer */
|
||||
#define MNULL ((void *)0)
|
||||
|
||||
|
@ -497,4 +502,17 @@ static INLINE t_u32 bitcount(t_u32 num)
|
|||
return count;
|
||||
}
|
||||
|
||||
static INLINE const char *
|
||||
reflective_enum_lookup_name(const struct reflective_enum_element *elements,
|
||||
int id)
|
||||
{
|
||||
const struct reflective_enum_element *elem = elements;
|
||||
|
||||
while (elem->name && elem->id != id) {
|
||||
elem++;
|
||||
}
|
||||
|
||||
return elem->name;
|
||||
}
|
||||
|
||||
#endif /* !_MLAN_UTIL_H_ */
|
||||
|
|
|
@ -1122,7 +1122,7 @@ static int wlan_dequeue_tx_packet(pmlan_adapter pmadapter)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!ptr->is_wmm_enabled ||
|
||||
if (!ptr->is_wmm_enabled || priv->adapter->remain_on_channel ||
|
||||
(ptr->ba_status || ptr->del_ba_count >= DEL_BA_THRESHOLD)
|
||||
#ifdef STA_SUPPORT
|
||||
|| priv->wps.session_enable
|
||||
|
@ -1148,7 +1148,7 @@ static int wlan_dequeue_tx_packet(pmlan_adapter pmadapter)
|
|||
priv, tid, ptr->ra, MFALSE)) {
|
||||
wlan_11n_create_txbastream_tbl(
|
||||
priv, ptr->ra, tid,
|
||||
BA_STREAM_SETUP_INPROGRESS);
|
||||
BA_STREAM_SETUP_SENT_ADDBA);
|
||||
wlan_send_addba(priv, tid, ptr->ra);
|
||||
}
|
||||
} else if (wlan_find_stream_to_delete(priv, ptr, tid,
|
||||
|
@ -1160,6 +1160,9 @@ static int wlan_dequeue_tx_packet(pmlan_adapter pmadapter)
|
|||
wlan_11n_create_txbastream_tbl(
|
||||
priv, ptr->ra, tid,
|
||||
BA_STREAM_SETUP_INPROGRESS);
|
||||
wlan_11n_set_txbastream_status(
|
||||
priv, tid_del, ra,
|
||||
BA_STREAM_SENT_DELBA, MFALSE);
|
||||
wlan_send_delba(priv, MNULL, tid_del,
|
||||
ra, 1);
|
||||
}
|
||||
|
@ -2156,13 +2159,8 @@ t_void wlan_wmm_add_buf_txqueue(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
&priv->wmm.tid_tbl_ptr[tid_down].ra_list, MNULL,
|
||||
MNULL);
|
||||
} else {
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH)
|
||||
memcpy_ext(pmadapter, ra, pmbuf->mac,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
else
|
||||
memcpy_ext(pmadapter, ra,
|
||||
pmbuf->pbuf + pmbuf->data_offset,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
memcpy_ext(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
/** put multicast/broadcast packet in the same ralist */
|
||||
if (ra[0] & 0x01)
|
||||
memset(pmadapter, ra, 0xff, sizeof(ra));
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define _MLAN_DECL_H_
|
||||
|
||||
/** MLAN release version */
|
||||
#define MLAN_RELEASE_VERSION "391.p3"
|
||||
#define MLAN_RELEASE_VERSION "408"
|
||||
|
||||
/** Re-define generic data types for MLAN/MOAL */
|
||||
/** Signed char (1-byte) */
|
||||
|
@ -157,6 +157,10 @@ typedef t_s32 t_sval;
|
|||
/** This is current limit on Maximum Rx AMPDU allowed */
|
||||
#define MLAN_MAX_RX_BASTREAM_SUPPORTED 16
|
||||
|
||||
#ifndef UINT_MAX
|
||||
#define UINT_MAX (~0U)
|
||||
#endif
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/** Default Win size attached during ADDBA request */
|
||||
#define MLAN_STA_AMPDU_DEF_TXWINSIZE 64
|
||||
|
@ -269,6 +273,10 @@ typedef t_s32 t_sval;
|
|||
/** pcie inband reset */
|
||||
#define FW_RELOAD_PCIE_INBAND_RESET 6
|
||||
|
||||
#ifdef PCIE
|
||||
/* Interrupt type */
|
||||
enum { RX_DATA, RX_EVENT, TX_COMPLETE, RX_CMD_RESP };
|
||||
#endif
|
||||
#ifdef USB
|
||||
#define MLAN_USB_BLOCK_SIZE (512)
|
||||
#define MLAN_USB_AGGR_MODE_NUM (0)
|
||||
|
@ -374,7 +382,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
/** 8801 card type */
|
||||
#define CARD_TYPE_8801 0x0a
|
||||
/** OWL card type */
|
||||
#define CARD_TYPE_IW62X 0x0b
|
||||
#define CARD_TYPE_IW624 0x0b
|
||||
/** Black bird card type */
|
||||
#define CARD_TYPE_AW693 0x0c
|
||||
|
||||
|
@ -408,9 +416,9 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_SD9177 (CARD_TYPE_9177 | (INTF_SD << 8))
|
||||
/** SD8801 card type */
|
||||
#define CARD_TYPE_SD8801 (CARD_TYPE_8801 | (INTF_SD << 8))
|
||||
/** SD_IW62X card type */
|
||||
#define CARD_TYPE_SDIW62X (CARD_TYPE_IW62X | (INTF_SD << 8))
|
||||
/** SD_IW62X card type */
|
||||
/** SD_IW624 card type */
|
||||
#define CARD_TYPE_SDIW624 (CARD_TYPE_IW624 | (INTF_SD << 8))
|
||||
/** SD_IW624 card type */
|
||||
#define CARD_TYPE_SDAW693 (CARD_TYPE_AW693 | (INTF_SD << 8))
|
||||
|
||||
#define IS_SD8887(ct) (CARD_TYPE_SD8887 == (ct))
|
||||
|
@ -423,7 +431,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_SD9098(ct) (CARD_TYPE_SD9098 == (ct))
|
||||
#define IS_SD9177(ct) (CARD_TYPE_SD9177 == (ct))
|
||||
#define IS_SD8801(ct) (CARD_TYPE_SD8801 == (ct))
|
||||
#define IS_SDIW62X(ct) (CARD_TYPE_SDIW62X == (ct))
|
||||
#define IS_SDIW624(ct) (CARD_TYPE_SDIW624 == (ct))
|
||||
#define IS_SDAW693(ct) (CARD_TYPE_SDAW693 == (ct))
|
||||
|
||||
/** SD8887 Card */
|
||||
|
@ -446,8 +454,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_SD9177 "SDIW612"
|
||||
/** SD8801 Card */
|
||||
#define CARD_SD8801 "SD8801"
|
||||
/** SDIW62X Card */
|
||||
#define CARD_SDIW62X "SDIW62X"
|
||||
/** SDIW624 Card */
|
||||
#define CARD_SDIW624 "SDIW624"
|
||||
/** SDAW693 Card */
|
||||
#define CARD_SDAW693 "SDAW693"
|
||||
#endif
|
||||
|
@ -461,8 +469,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_PCIE9097 (CARD_TYPE_9097 | (INTF_PCIE << 8))
|
||||
/** PCIE9098 card type */
|
||||
#define CARD_TYPE_PCIE9098 (CARD_TYPE_9098 | (INTF_PCIE << 8))
|
||||
/** PCIEIW62X card type */
|
||||
#define CARD_TYPE_PCIEIW62X (CARD_TYPE_IW62X | (INTF_PCIE << 8))
|
||||
/** PCIEIW624 card type */
|
||||
#define CARD_TYPE_PCIEIW624 (CARD_TYPE_IW624 | (INTF_PCIE << 8))
|
||||
/** PCIEAW693 card type */
|
||||
#define CARD_TYPE_PCIEAW693 (CARD_TYPE_AW693 | (INTF_PCIE << 8))
|
||||
|
||||
|
@ -470,7 +478,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_PCIE8997(ct) (CARD_TYPE_PCIE8997 == (ct))
|
||||
#define IS_PCIE9097(ct) (CARD_TYPE_PCIE9097 == (ct))
|
||||
#define IS_PCIE9098(ct) (CARD_TYPE_PCIE9098 == (ct))
|
||||
#define IS_PCIEIW62X(ct) (CARD_TYPE_PCIEIW62X == (ct))
|
||||
#define IS_PCIEIW624(ct) (CARD_TYPE_PCIEIW624 == (ct))
|
||||
#define IS_PCIEAW693(ct) (CARD_TYPE_PCIEAW693 == (ct))
|
||||
|
||||
/** PCIE8897 Card */
|
||||
|
@ -485,8 +493,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_PCIE9098 "PCIE9098"
|
||||
/** PCIEAW690 Card */
|
||||
#define CARD_PCIEAW690 "PCIEAW690"
|
||||
/** PCIEIW62X Card */
|
||||
#define CARD_PCIEIW62X "PCIEIW62X"
|
||||
/** PCIEIW624 Card */
|
||||
#define CARD_PCIEIW624 "PCIEIW624"
|
||||
/** PCIEAW693 Card */
|
||||
#define CARD_PCIEAW693 "PCIEAW693"
|
||||
/** PCIEIW629 Card */
|
||||
|
@ -506,8 +514,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_USB9098 (CARD_TYPE_9098 | (INTF_USB << 8))
|
||||
/** USB9097 card type */
|
||||
#define CARD_TYPE_USB9097 (CARD_TYPE_9097 | (INTF_USB << 8))
|
||||
/** USBIW62X card type */
|
||||
#define CARD_TYPE_USBIW62X (CARD_TYPE_IW62X | (INTF_USB << 8))
|
||||
/** USBIW624 card type */
|
||||
#define CARD_TYPE_USBIW624 (CARD_TYPE_IW624 | (INTF_USB << 8))
|
||||
|
||||
#define IS_USB8801(ct) (CARD_TYPE_USB8801 == (ct))
|
||||
#define IS_USB8897(ct) (CARD_TYPE_USB8897 == (ct))
|
||||
|
@ -515,7 +523,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_USB8978(ct) (CARD_TYPE_USB8978 == (ct))
|
||||
#define IS_USB9098(ct) (CARD_TYPE_USB9098 == (ct))
|
||||
#define IS_USB9097(ct) (CARD_TYPE_USB9097 == (ct))
|
||||
#define IS_USBIW62X(ct) (CARD_TYPE_USBIW62X == (ct))
|
||||
#define IS_USBIW624(ct) (CARD_TYPE_USBIW624 == (ct))
|
||||
|
||||
/** USB8801 Card */
|
||||
#define CARD_USB8801 "USB8801"
|
||||
|
@ -529,8 +537,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_USB9098 "USB9098"
|
||||
/** USB9097 Card */
|
||||
#define CARD_USB9097 "USBIW620"
|
||||
/** USBIW62X Card */
|
||||
#define CARD_USBIW62X "USBIW62X"
|
||||
/** USBIW624 Card */
|
||||
#define CARD_USBIW624 "USBIW624"
|
||||
#endif
|
||||
|
||||
#define IS_CARD8801(ct) (CARD_TYPE_8801 == ((ct)&0xf))
|
||||
|
@ -542,7 +550,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_CARD9098(ct) (CARD_TYPE_9098 == ((ct)&0xf))
|
||||
#define IS_CARD9097(ct) (CARD_TYPE_9097 == ((ct)&0xf))
|
||||
#define IS_CARD9177(ct) (CARD_TYPE_9177 == ((ct)&0xf))
|
||||
#define IS_CARDIW62X(ct) (CARD_TYPE_IW62X == ((ct)&0xf))
|
||||
#define IS_CARDIW624(ct) (CARD_TYPE_IW624 == ((ct)&0xf))
|
||||
#define IS_CARDAW693(ct) (CARD_TYPE_AW693 == ((ct)&0xf))
|
||||
|
||||
typedef struct _card_type_entry {
|
||||
|
@ -613,8 +621,6 @@ typedef enum {
|
|||
|
||||
#define MLAN_BUF_FLAG_TX_CTRL MBIT(14)
|
||||
|
||||
#define MLAN_BUF_FLAG_EASYMESH MBIT(16)
|
||||
|
||||
#define MLAN_BUF_FLAG_MC_AGGR_PKT MBIT(17)
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
|
@ -701,7 +707,6 @@ typedef enum _mlan_buf_type {
|
|||
MLAN_BUF_TYPE_EVENT,
|
||||
MLAN_BUF_TYPE_RAW_DATA,
|
||||
#ifdef SDIO
|
||||
MLAN_BUF_TYPE_SPA_DATA,
|
||||
#endif
|
||||
} mlan_buf_type;
|
||||
|
||||
|
@ -844,6 +849,13 @@ typedef enum _mlan_event_id {
|
|||
MLAN_EVENT_ID_DRV_DISCONNECT_LOGGER = 0x80000028,
|
||||
MLAN_EVENT_ID_DRV_WIFI_STATUS = 0x80000029,
|
||||
MLAN_EVENT_ID_STORE_HOST_CMD_RESP = 0x80000030,
|
||||
MLAN_EVENT_ID_DRV_ADDBA_TIMEOUT = 0x80000031,
|
||||
#ifdef PCIE
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_DATA = 0x80000032,
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_EVENT = 0x80000033,
|
||||
MLAN_EVENT_ID_DRV_DEFER_CMDRESP = 0x80000034,
|
||||
MLAN_EVENT_ID_DRV_DEFER_TX_COMPLTE = 0x80000035,
|
||||
#endif
|
||||
} mlan_event_id;
|
||||
|
||||
/** Data Structures */
|
||||
|
@ -985,14 +997,14 @@ typedef enum _dfs_moe_t {
|
|||
/** Band_Config_t */
|
||||
typedef MLAN_PACK_START struct _Band_Config_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=user*/
|
||||
t_u8 scanMode : 2;
|
||||
/** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */
|
||||
t_u8 chan2Offset : 2;
|
||||
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
|
||||
t_u8 chanWidth : 2;
|
||||
/** Band Info - (00)=2.4GHz, (01)=5GHz, (10)=6GHz */
|
||||
t_u8 chanBand : 2;
|
||||
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=user*/
|
||||
t_u8 scanMode : 2;
|
||||
/** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */
|
||||
t_u8 chan2Offset : 2;
|
||||
#else
|
||||
/** Band Info - (00)=2.4GHz, (01)=5GHz, (10)=6GHz */
|
||||
t_u8 chanBand : 2;
|
||||
|
@ -1323,8 +1335,6 @@ typedef struct _mlan_buffer {
|
|||
t_u32 extra_ts_sec;
|
||||
/** Time stamp when packet is dequed from rx_q(micro seconds) */
|
||||
t_u32 extra_ts_usec;
|
||||
/** When TX ra mac address, When Rx Ta mac address*/
|
||||
t_u8 mac[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Fields below are valid for MLAN module only */
|
||||
/** Pointer to parent mlan_buffer */
|
||||
struct _mlan_buffer *pparent;
|
||||
|
@ -1715,6 +1725,14 @@ typedef struct _tdls_tear_down_event {
|
|||
t_u16 reason_code;
|
||||
} tdls_tear_down_event;
|
||||
|
||||
/** Event structure for addba timeout */
|
||||
typedef struct _addba_timeout_event {
|
||||
/** Peer mac address */
|
||||
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Tid */
|
||||
t_u8 tid;
|
||||
} addba_timeout_event;
|
||||
|
||||
/** channel width */
|
||||
typedef enum wifi_channel_width {
|
||||
WIFI_CHAN_WIDTH_20 = 0,
|
||||
|
@ -2516,12 +2534,6 @@ typedef struct _mlan_callbacks {
|
|||
t_void (*moal_updata_peer_signal)(t_void *pmoal, t_u32 bss_index,
|
||||
t_u8 *peer_addr, t_s8 snr, t_s8 nflr);
|
||||
t_u64 (*moal_do_div)(t_u64 num, t_u32 base);
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
mlan_status (*moal_wait_hostcmd_complete)(t_void *pmoal,
|
||||
t_u32 bss_index);
|
||||
mlan_status (*moal_notify_hostcmd_complete)(t_void *pmoal,
|
||||
t_u32 bss_index);
|
||||
#endif
|
||||
void (*moal_tp_accounting)(t_void *pmoal, t_void *buf,
|
||||
t_u32 drop_point);
|
||||
void (*moal_tp_accounting_rx_param)(t_void *pmoal, unsigned int type,
|
||||
|
@ -2610,8 +2622,6 @@ typedef struct _mlan_device {
|
|||
/** SDIO MPA Rx */
|
||||
t_u32 mpa_rx_cfg;
|
||||
#ifdef SDIO
|
||||
/** SDIO Single port rx aggr */
|
||||
t_u8 sdio_rx_aggr_enable;
|
||||
/* see blk_queue_max_segment_size */
|
||||
t_u32 max_seg_size;
|
||||
/* see blk_queue_max_segments */
|
||||
|
@ -2680,6 +2690,8 @@ typedef struct _mlan_device {
|
|||
t_u8 mcs32;
|
||||
/** second mac flag */
|
||||
t_u8 second_mac;
|
||||
/** napi */
|
||||
t_u8 napi;
|
||||
} mlan_device, *pmlan_device;
|
||||
|
||||
/** MLAN API function prototype */
|
||||
|
@ -2760,6 +2772,9 @@ MLAN_API t_u8 mlan_select_wmm_queue(t_void *padapter, t_u8 bss_num, t_u8 tid);
|
|||
MLAN_API mlan_status mlan_disable_host_int(t_void *padapter);
|
||||
/** mlan unmask host interrupt */
|
||||
MLAN_API mlan_status mlan_enable_host_int(t_void *padapter);
|
||||
#ifdef PCIE
|
||||
MLAN_API void mlan_process_pcie_interrupt_cb(t_void *pmadapter, int type);
|
||||
#endif
|
||||
|
||||
#define CSI_SIGNATURE 0xABCD
|
||||
|
||||
|
|
|
@ -357,7 +357,6 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
||||
MLAN_OID_MISC_HAL_PHY_CFG = 0x0020007E,
|
||||
MLAN_OID_MISC_RF_TEST_HE_POWER = 0X0020007F,
|
||||
MLAN_OID_MISC_MULTI_AP_CFG = 0x00200080,
|
||||
#ifdef UAP_SUPPORT
|
||||
MLAN_OID_MISC_WACP_MODE = 0x00200081,
|
||||
#endif
|
||||
|
@ -373,6 +372,9 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_CROSS_CHIP_SYNCH = 0x0020008B,
|
||||
MLAN_OID_MISC_RF_TEST_CONFIG_TRIGGER_FRAME = 0x0020008C,
|
||||
MLAN_OID_MISC_OFDM_DESENSE_CFG = 0x0020008D,
|
||||
MLAN_OID_MISC_REORDER_FLUSH_TIME = 0x0020008F,
|
||||
MLAN_OID_MISC_NAV_MITIGATION = 0x00200090,
|
||||
MLAN_OID_MISC_LED_CONFIG = 0x00200091,
|
||||
};
|
||||
|
||||
/** Sub command size */
|
||||
|
@ -924,6 +926,12 @@ typedef struct _mlan_deauth_param {
|
|||
#define PROTOCOL_WAPI 0x80
|
||||
/** WPA3 SAE */
|
||||
#define PROTOCOL_WPA3_SAE 0x100
|
||||
/* hunting-and-pecking loop only */
|
||||
#define SAE_PWE_HUNT_AND_PECK 0
|
||||
/** hash-to-element only */
|
||||
#define SAE_PWE_HASH_TO_ELEMENT 1
|
||||
/** both hunting-and-pecking loop and hash-to-element */
|
||||
#define SAE_PWE_BOTH 2
|
||||
/** OWE */
|
||||
#define PROTOCOL_OWE 0x200
|
||||
|
||||
|
@ -995,6 +1003,10 @@ typedef struct _wpa_param {
|
|||
t_u32 length;
|
||||
/** passphrase */
|
||||
t_u8 passphrase[64];
|
||||
/** SAE Password length */
|
||||
t_u32 sae_password_length;
|
||||
/** Passphrase */
|
||||
t_u8 sae_password[255];
|
||||
/**group key rekey time in seconds */
|
||||
t_u32 gk_rekey_time;
|
||||
} wpa_param;
|
||||
|
@ -1173,8 +1185,6 @@ typedef struct _mlan_uap_bss_param {
|
|||
|
||||
/** uap host based config */
|
||||
t_u32 uap_host_based_config;
|
||||
/** multi ap flag */
|
||||
t_u8 multi_ap_flag;
|
||||
} mlan_uap_bss_param, *pmlan_uap_bss_param;
|
||||
|
||||
/** mlan_uap_scan_channels */
|
||||
|
@ -1708,8 +1718,10 @@ typedef struct _mlan_ds_get_stats {
|
|||
/** Rx Stuck Related Info*/
|
||||
/** Rx Stuck Issue count */
|
||||
t_u32 rx_stuck_issue_cnt[2];
|
||||
/** Rx Stuck Recovery count */
|
||||
t_u32 rx_stuck_recovery_cnt;
|
||||
/** Rx Stuck Recovery count polling based */
|
||||
t_u32 rx_stuck_poll_recovery_cnt;
|
||||
/** Rx Stuck Recovery count interrupt based */
|
||||
t_u32 rx_stuck_intr_recovery_cnt;
|
||||
/** Rx Stuck TSF */
|
||||
t_u64 rx_stuck_tsf[2];
|
||||
/** Tx Watchdog Recovery Related Info */
|
||||
|
@ -1970,87 +1982,7 @@ typedef struct _mlan_ver_ext {
|
|||
/** Extended Capabilities Data */
|
||||
typedef struct MLAN_PACK_START _ExtCap_t {
|
||||
/** Extended Capabilities value */
|
||||
t_u8 rsvdBit87 : 1; /* bit 87 */
|
||||
t_u8 rsvdBit86 : 1; /* bit 86 */
|
||||
t_u8 rsvdBit85 : 1; /* bit 85 */
|
||||
t_u8 beacon_prot : 1; /* bit 84 */
|
||||
t_u8 rsvdBit83 : 1; /* bit 83 */
|
||||
t_u8 rsvdBit82 : 1; /* bit 82 */
|
||||
t_u8 rsvdBit81 : 1; /* bit 81 */
|
||||
t_u8 rsvdBit80 : 1; /* bit 80 */
|
||||
t_u8 rsvdBit79 : 1; /* bit 79 */
|
||||
t_u8 TWTResp : 1; /* bit 78 */
|
||||
t_u8 TWTReq : 1; /* bit 77 */
|
||||
t_u8 rsvdBit76 : 1; /* bit 76 */
|
||||
t_u8 rsvdBit75 : 1; /* bit 75 */
|
||||
t_u8 rsvdBit74 : 1; /* bit 74 */
|
||||
t_u8 rsvdBit73 : 1; /* bit 73 */
|
||||
t_u8 FILS : 1; /* bit 72 */
|
||||
t_u8 FTMI : 1; /* bit 71 */
|
||||
t_u8 FTMR : 1; /* bit 70 */
|
||||
t_u8 CAQ : 1; /* bit 69 */
|
||||
t_u8 rsvdBit68 : 1; /* bit 68 */
|
||||
t_u8 NCC : 1; /* bit 67 */
|
||||
t_u8 rsvdBit66 : 1; /* bit 66 */
|
||||
t_u8 chanSchedMgnt : 1; /* bit 65 */
|
||||
t_u8 MaxAMSDU1 : 1; /* bit 64 */
|
||||
t_u8 MaxAMSDU0 : 1; /* bit 63 */
|
||||
t_u8 OperModeNtf : 1; /* bit 62 */
|
||||
t_u8 TDLSWildBandwidth : 1; /* bit 61 */
|
||||
t_u8 rsvdBit60 : 1; /* bit 60 */
|
||||
t_u8 rsvdBit59 : 1; /* bit 59 */
|
||||
t_u8 rsvdBit58 : 1; /* bit 58 */
|
||||
t_u8 rsvdBit57 : 1; /* bit 57 */
|
||||
t_u8 rsvdBit56 : 1; /* bit 56 */
|
||||
t_u8 rsvdBit55 : 1; /* bit 55 */
|
||||
t_u8 rsvdBit54 : 1; /* bit 54 */
|
||||
t_u8 rsvdBit53 : 1; /* bit 53 */
|
||||
t_u8 rsvdBit52 : 1; /* bit 52 */
|
||||
t_u8 rsvdBit51 : 1; /* bit 51 */
|
||||
t_u8 rsvdBit50 : 1; /* bit 50 */
|
||||
t_u8 rsvdBit49 : 1; /* bit 49 */
|
||||
t_u8 rsvdBit48 : 1; /* bit 48 */
|
||||
t_u8 rsvdBit47 : 1; /* bit 47 */
|
||||
t_u8 rsvdBit46 : 1; /* bit 46 */
|
||||
t_u8 rsvdBit45 : 1; /* bit 45 */
|
||||
t_u8 rsvdBit44 : 1; /* bit 44 */
|
||||
t_u8 rsvdBit43 : 1; /* bit 43 */
|
||||
t_u8 rsvdBit42 : 1; /* bit 42 */
|
||||
t_u8 rsvdBit41 : 1; /* bit 41 */
|
||||
t_u8 rsvdBit40 : 1; /* bit 40 */
|
||||
t_u8 TDLSChlSwitchProhib : 1; /* bit 39 */
|
||||
t_u8 TDLSProhibited : 1; /* bit 38 */
|
||||
t_u8 TDLSSupport : 1; /* bit 37 */
|
||||
t_u8 MSGCF_Capa : 1; /* bit 36 */
|
||||
t_u8 Reserved35 : 1; /* bit 35 */
|
||||
t_u8 SSPN_Interface : 1; /* bit 34 */
|
||||
t_u8 EBR : 1; /* bit 33 */
|
||||
t_u8 Qos_Map : 1; /* bit 32 */
|
||||
t_u8 Interworking : 1; /* bit 31 */
|
||||
t_u8 TDLSChannelSwitching : 1; /* bit 30 */
|
||||
t_u8 TDLSPeerPSMSupport : 1; /* bit 29 */
|
||||
t_u8 TDLSPeerUAPSDSupport : 1; /* bit 28 */
|
||||
t_u8 UTC : 1; /* bit 27 */
|
||||
t_u8 DMS : 1; /* bit 26 */
|
||||
t_u8 SSID_List : 1; /* bit 25 */
|
||||
t_u8 ChannelUsage : 1; /* bit 24 */
|
||||
t_u8 TimingMeasurement : 1; /* bit 23 */
|
||||
t_u8 MultipleBSSID : 1; /* bit 22 */
|
||||
t_u8 AC_StationCount : 1; /* bit 21 */
|
||||
t_u8 QoSTrafficCap : 1; /* bit 20 */
|
||||
t_u8 BSS_Transition : 1; /* bit 19 */
|
||||
t_u8 TIM_Broadcast : 1; /* bit 18 */
|
||||
t_u8 WNM_Sleep : 1; /* bit 17 */
|
||||
t_u8 TFS : 1; /* bit 16 */
|
||||
t_u8 GeospatialLocation : 1; /* bit 15 */
|
||||
t_u8 CivicLocation : 1; /* bit 14 */
|
||||
t_u8 CollocatedIntf : 1; /* bit 13 */
|
||||
t_u8 ProxyARPService : 1; /* bit 12 */
|
||||
t_u8 FMS : 1; /* bit 11 */
|
||||
t_u8 LocationTracking : 1; /* bit 10 */
|
||||
t_u8 MulticastDiagnostics : 1; /* bit 9 */
|
||||
t_u8 Diagnostics : 1; /* bit 8 */
|
||||
t_u8 Event : 1; /* bit 7 */
|
||||
t_u8 Event : 1; /* bit 7 */ /* Byte 1 */
|
||||
t_u8 SPSMP_Support : 1; /* bit 6 */
|
||||
t_u8 Reserved5 : 1; /* bit 5 */
|
||||
t_u8 PSMP_Capable : 1; /* bit 4 */
|
||||
|
@ -2058,6 +1990,86 @@ typedef struct MLAN_PACK_START _ExtCap_t {
|
|||
t_u8 ExtChanSwitching : 1; /* bit 2 */
|
||||
t_u8 Reserved1 : 1; /* bit 1 */
|
||||
t_u8 BSS_CoexistSupport : 1; /* bit 0 */
|
||||
t_u8 GeospatialLocation : 1; /* bit 15 */ /* Byte 2 */
|
||||
t_u8 CivicLocation : 1; /* bit 14 */
|
||||
t_u8 CollocatedIntf : 1; /* bit 13 */
|
||||
t_u8 ProxyARPService : 1; /* bit 12 */
|
||||
t_u8 FMS : 1; /* bit 11 */
|
||||
t_u8 LocationTracking : 1; /* bit 10 */
|
||||
t_u8 MulticastDiagnostics : 1; /* bit 9 */
|
||||
t_u8 Diagnostics : 1; /* bit 8 */
|
||||
t_u8 TimingMeasurement : 1; /* bit 23 */ /* Byte 3 */
|
||||
t_u8 MultipleBSSID : 1; /* bit 22 */
|
||||
t_u8 AC_StationCount : 1; /* bit 21 */
|
||||
t_u8 QoSTrafficCap : 1; /* bit 20 */
|
||||
t_u8 BSS_Transition : 1; /* bit 19 */
|
||||
t_u8 TIM_Broadcast : 1; /* bit 18 */
|
||||
t_u8 WNM_Sleep : 1; /* bit 17 */
|
||||
t_u8 TFS : 1; /* bit 16 */
|
||||
t_u8 Interworking : 1; /* bit 31 */ /* Byte 4 */
|
||||
t_u8 TDLSChannelSwitching : 1; /* bit 30 */
|
||||
t_u8 TDLSPeerPSMSupport : 1; /* bit 29 */
|
||||
t_u8 TDLSPeerUAPSDSupport : 1; /* bit 28 */
|
||||
t_u8 UTC : 1; /* bit 27 */
|
||||
t_u8 DMS : 1; /* bit 26 */
|
||||
t_u8 SSID_List : 1; /* bit 25 */
|
||||
t_u8 ChannelUsage : 1; /* bit 24 */
|
||||
t_u8 TDLSChlSwitchProhib : 1; /* bit 39 */ /* Byte 5 */
|
||||
t_u8 TDLSProhibited : 1; /* bit 38 */
|
||||
t_u8 TDLSSupport : 1; /* bit 37 */
|
||||
t_u8 MSGCF_Capa : 1; /* bit 36 */
|
||||
t_u8 Reserved35 : 1; /* bit 35 */
|
||||
t_u8 SSPN_Interface : 1; /* bit 34 */
|
||||
t_u8 EBR : 1; /* bit 33 */
|
||||
t_u8 Qos_Map : 1; /* bit 32 */
|
||||
t_u8 rsvdBit47 : 1; /* bit 47 */ /* Byte 6 */
|
||||
t_u8 rsvdBit46 : 1; /* bit 46 */
|
||||
t_u8 rsvdBit45 : 1; /* bit 45 */
|
||||
t_u8 rsvdBit44 : 1; /* bit 44 */
|
||||
t_u8 rsvdBit43 : 1; /* bit 43 */
|
||||
t_u8 rsvdBit42 : 1; /* bit 42 */
|
||||
t_u8 rsvdBit41 : 1; /* bit 41 */
|
||||
t_u8 rsvdBit40 : 1; /* bit 40 */
|
||||
t_u8 rsvdBit55 : 1; /* bit 55 */ /* Byte 7 */
|
||||
t_u8 rsvdBit54 : 1; /* bit 54 */
|
||||
t_u8 rsvdBit53 : 1; /* bit 53 */
|
||||
t_u8 rsvdBit52 : 1; /* bit 52 */
|
||||
t_u8 rsvdBit51 : 1; /* bit 51 */
|
||||
t_u8 rsvdBit50 : 1; /* bit 50 */
|
||||
t_u8 rsvdBit49 : 1; /* bit 49 */
|
||||
t_u8 rsvdBit48 : 1; /* bit 48 */
|
||||
t_u8 MaxAMSDU0 : 1; /* bit 63 */ /* Byte 8 */
|
||||
t_u8 OperModeNtf : 1; /* bit 62 */
|
||||
t_u8 TDLSWildBandwidth : 1; /* bit 61 */
|
||||
t_u8 rsvdBit60 : 1; /* bit 60 */
|
||||
t_u8 rsvdBit59 : 1; /* bit 59 */
|
||||
t_u8 rsvdBit58 : 1; /* bit 58 */
|
||||
t_u8 rsvdBit57 : 1; /* bit 57 */
|
||||
t_u8 rsvdBit56 : 1; /* bit 56 */
|
||||
t_u8 FTMI : 1; /* bit 71 */ /* Byte 9 */
|
||||
t_u8 FTMR : 1; /* bit 70 */
|
||||
t_u8 CAQ : 1; /* bit 69 */
|
||||
t_u8 rsvdBit68 : 1; /* bit 68 */
|
||||
t_u8 NCC : 1; /* bit 67 */
|
||||
t_u8 rsvdBit66 : 1; /* bit 66 */
|
||||
t_u8 chanSchedMgnt : 1; /* bit 65 */
|
||||
t_u8 MaxAMSDU1 : 1; /* bit 64 */
|
||||
t_u8 rsvdBit79 : 1; /* bit 79 */ /* Byte 10 */
|
||||
t_u8 TWTResp : 1; /* bit 78 */
|
||||
t_u8 TWTReq : 1; /* bit 77 */
|
||||
t_u8 rsvdBit76 : 1; /* bit 76 */
|
||||
t_u8 rsvdBit75 : 1; /* bit 75 */
|
||||
t_u8 rsvdBit74 : 1; /* bit 74 */
|
||||
t_u8 rsvdBit73 : 1; /* bit 73 */
|
||||
t_u8 FILS : 1; /* bit 72 */
|
||||
t_u8 rsvdBit87 : 1; /* bit 87 */ /* Byte 11 */
|
||||
t_u8 rsvdBit86 : 1; /* bit 86 */
|
||||
t_u8 rsvdBit85 : 1; /* bit 85 */
|
||||
t_u8 beacon_prot : 1; /* bit 84 */
|
||||
t_u8 rsvdBit83 : 1; /* bit 83 */
|
||||
t_u8 rsvdBit82 : 1; /* bit 82 */
|
||||
t_u8 rsvdBit81 : 1; /* bit 81 */
|
||||
t_u8 rsvdBit80 : 1; /* bit 80 */
|
||||
} MLAN_PACK_END ExtCap_t, *pExtCap_t;
|
||||
#else
|
||||
/** Extended Capabilities Data */
|
||||
|
@ -2397,8 +2409,6 @@ typedef struct _mlan_debug_info {
|
|||
t_u32 last_int_status;
|
||||
/** number of interrupt receive */
|
||||
t_u32 num_of_irq;
|
||||
/** flag for sdio rx aggr */
|
||||
t_u8 sdio_rx_aggr;
|
||||
/** FW update port number */
|
||||
t_u32 mp_update[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX * 2];
|
||||
/** Invalid port update count */
|
||||
|
@ -2473,6 +2483,12 @@ typedef struct _mlan_debug_info {
|
|||
t_u16 last_event_index;
|
||||
/** Number of no free command node */
|
||||
t_u16 num_no_cmd_node;
|
||||
/** num_assoc_cmd_error, count result 4 error */
|
||||
t_u16 num_assoc_err;
|
||||
/** num_scan_cmd_error, count result 4 error */
|
||||
t_u16 num_scan_err;
|
||||
/** num_remain_on_channel_cmd_error, count result 4 error */
|
||||
t_u16 num_remain_chan_err;
|
||||
/** pending command id */
|
||||
t_u16 pending_cmd;
|
||||
/** time stamp for dnld last cmd */
|
||||
|
@ -2853,51 +2869,6 @@ typedef struct _mlan_ds_sec_cfg {
|
|||
} param;
|
||||
} mlan_ds_sec_cfg, *pmlan_ds_sec_cfg;
|
||||
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
#define BIT_TLV_TYPE_CRYPTO_KEY (1 << 0)
|
||||
#define BIT_TLV_TYPE_CRYPTO_KEY_IV (1 << 1)
|
||||
#define BIT_TLV_TYPE_CRYPTO_KEY_PREFIX (1 << 2)
|
||||
#define BIT_TLV_TYPE_CRYPTO_KEY_DATA_BLK (1 << 3)
|
||||
|
||||
/** Type definition of mlan_ds_sup_cfg */
|
||||
typedef struct _mlan_ds_sup_cfg {
|
||||
/** Sub-command */
|
||||
t_u8 sub_command;
|
||||
/** output length */
|
||||
t_u16 output_len;
|
||||
/** number of data blks */
|
||||
t_u16 data_blks_nr;
|
||||
/** sub action code */
|
||||
t_u8 sub_action_code;
|
||||
/** skip bytes */
|
||||
t_u16 skip_bytes;
|
||||
/** iteration */
|
||||
t_u32 iteration;
|
||||
/** count */
|
||||
t_u32 count;
|
||||
/** pointer to output */
|
||||
t_u8 *output;
|
||||
/** key length */
|
||||
t_u16 key_len;
|
||||
/** pointer to key */
|
||||
t_u8 *key;
|
||||
/** key iv length */
|
||||
t_u16 key_iv_len;
|
||||
/** pointer to key iv */
|
||||
t_u8 *key_iv;
|
||||
/** key prefix length */
|
||||
t_u16 key_prefix_len;
|
||||
/** pointer to key prefix */
|
||||
t_u8 *key_prefix;
|
||||
/** pointer to data blk length array */
|
||||
t_u32 *key_data_blk_len;
|
||||
/** pointer to key data blk pointer array */
|
||||
t_u8 **key_data_blk;
|
||||
/** callback */
|
||||
t_u8 call_back;
|
||||
} mlan_ds_sup_cfg, *pmlan_ds_sup_cfg;
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------*/
|
||||
/** Rate Configuration Group */
|
||||
/*-----------------------------------------------------------------*/
|
||||
|
@ -3122,6 +3093,8 @@ typedef struct _mlan_ds_beacon_stuck_param_cfg {
|
|||
|
||||
/** Host sleep config GPIO : Default */
|
||||
#define HOST_SLEEP_DEF_GPIO 0xff
|
||||
/** Host sleep config gap : Special setting (host acknowledge required) */
|
||||
#define HOST_SLEEP_GAP_SPECIAL 0xff
|
||||
/** Host sleep config gap : Default */
|
||||
#define HOST_SLEEP_DEF_GAP 200
|
||||
/** Host sleep config min wake holdoff */
|
||||
|
@ -3143,7 +3116,7 @@ typedef struct _mlan_ds_hs_cfg {
|
|||
/** GPIO pin or 0xff for interface */
|
||||
t_u32 gpio;
|
||||
/** Gap in milliseconds or or 0xff for special
|
||||
* setting when GPIO is used to wakeup host
|
||||
* setting (host acknowledge required)
|
||||
*/
|
||||
t_u32 gap;
|
||||
/** Host sleep wake interval */
|
||||
|
@ -3240,6 +3213,8 @@ typedef struct _mlan_ds_inactivity_to {
|
|||
t_u32 mcast_timeout;
|
||||
/** Timeout for additional Rx traffic after Null PM1 packet exchange */
|
||||
t_u32 ps_entry_timeout;
|
||||
/** Inactivity timeout for cmd */
|
||||
t_u32 ps_cmd_timeout;
|
||||
} mlan_ds_inactivity_to, *pmlan_ds_inactivity_to;
|
||||
|
||||
/** Minimum sleep period in milliseconds */
|
||||
|
@ -4027,6 +4002,8 @@ typedef struct _mlan_ds_11ax_cfg {
|
|||
#define MLAN_11AXCMD_CFG_ID_TXOP_RTS 5
|
||||
#define MLAN_11AXCMD_CFG_ID_TX_OMI 6
|
||||
#define MLAN_11AXCMD_CFG_ID_OBSSNBRU_TOLTIME 7
|
||||
#define MLAN_11AXCMD_CFG_ID_SET_BSRP 8
|
||||
#define MLAN_11AXCMD_CFG_ID_LLDE 9
|
||||
|
||||
#define MLAN_11AXCMD_SR_SUBID 0x102
|
||||
#define MLAN_11AXCMD_BEAM_SUBID 0x103
|
||||
|
@ -4034,6 +4011,8 @@ typedef struct _mlan_ds_11ax_cfg {
|
|||
#define MLAN_11AXCMD_TXOMI_SUBID 0x105
|
||||
#define MLAN_11AXCMD_OBSS_TOLTIME_SUBID 0x106
|
||||
#define MLAN_11AXCMD_TXOPRTS_SUBID 0x108
|
||||
#define MLAN_11AXCMD_SET_BSRP_SUBID 0x109
|
||||
#define MLAN_11AXCMD_LLDE_SUBID 0x110
|
||||
|
||||
#define MLAN_11AX_TWT_SETUP_SUBID 0x114
|
||||
#define MLAN_11AX_TWT_TEARDOWN_SUBID 0x115
|
||||
|
@ -4108,6 +4087,29 @@ typedef struct _mlan_ds_11ax_toltime_cmd {
|
|||
t_u32 tol_time;
|
||||
} mlan_ds_11ax_toltime_cmd, *pmlan_ds_11ax_toltime_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_set_bsrp_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_set_bsrp_cmd {
|
||||
/** command value: 1 is enable, 0 is disable*/
|
||||
t_u8 value;
|
||||
} mlan_ds_11ax_set_bsrp_cmd, *pmlan_ds_11ax_set_bsrp_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_llde_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_llde_cmd {
|
||||
t_u8 llde; // Uplink LLDE: enable=1,disable=0
|
||||
t_u8 mode; // operation mode: default=0,carplay=1,gameplay=2
|
||||
t_u8 fixrate; // trigger frame rate: auto=0xff
|
||||
t_u8 triggerlimit; // cap airtime limit index: auto=0xff
|
||||
t_u8 peakULrate; // cap peak UL rate
|
||||
t_u8 dl_llde; // Downlink LLDE: enable=1,disable=0
|
||||
t_u16 triggerinterval; // Set trigger frame interval(us): auto=0
|
||||
t_u16 mu_rts_successcnt;
|
||||
t_u16 mu_rts_failcnt;
|
||||
t_u16 basic_trigger_successcnt;
|
||||
t_u16 basic_trigger_failcnt;
|
||||
t_u16 tbppdu_nullcnt;
|
||||
t_u16 tbppdu_datacnt;
|
||||
} mlan_ds_11ax_llde_cmd, *pmlan_ds_11ax_llde_cmd;
|
||||
|
||||
/** Type definition of mlan_ds_11ax_cmd_cfg for MLAN_OID_11AX_CMD_CFG */
|
||||
typedef struct _mlan_ds_11ax_cmd_cfg {
|
||||
/** Sub-command */
|
||||
|
@ -4129,6 +4131,10 @@ typedef struct _mlan_ds_11ax_cmd_cfg {
|
|||
/** OBSS tolerance time configuration for
|
||||
* MLAN_11AXCMD_TOLTIME_SUBID */
|
||||
mlan_ds_11ax_toltime_cmd toltime_cfg;
|
||||
/** SET_BSRP configuration for MLAN_11AXCMD_SET_BSRP_SUBID */
|
||||
mlan_ds_11ax_set_bsrp_cmd setbsrp_cfg;
|
||||
/* MLAN_11AXCMD_LLDE_SUBID */
|
||||
mlan_ds_11ax_llde_cmd llde_cfg;
|
||||
} param;
|
||||
} mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg;
|
||||
|
||||
|
@ -4583,6 +4589,39 @@ typedef struct _mlan_ds_misc_rx_abort_cfg_ext {
|
|||
t_u8 edmac_enable;
|
||||
} mlan_ds_misc_rx_abort_cfg_ext;
|
||||
|
||||
/** Type definition of mlan_ds_misc_nav_mitigation
|
||||
* for MLAN_OID_MISC_NAV_MITIGATION
|
||||
*/
|
||||
typedef struct _mlan_ds_misc_nav_mitigation {
|
||||
/** start/stop nav mitigation */
|
||||
t_u16 start_nav_mitigation;
|
||||
/** Duration value in us to set as threshold in ACT_SET action */
|
||||
t_u16 threshold;
|
||||
/** Counter for NAV mitigation detected */
|
||||
t_u16 detect_cnt;
|
||||
/** Counter for NAV mitigation stopped */
|
||||
t_u16 stop_cnt;
|
||||
|
||||
} mlan_ds_misc_nav_mitigation;
|
||||
|
||||
#define MAX_FW_STATES 6
|
||||
typedef struct _mlan_ds_led_behavior {
|
||||
t_u8 firmwarestate;
|
||||
t_u8 ledstate;
|
||||
t_u8 ledargs;
|
||||
} mlan_ds_misc_led_behavior;
|
||||
|
||||
/** Type definition of mlan_ds_misc_led_cfg
|
||||
* for MLAN_OID_MISC_LED_CONFIG
|
||||
*/
|
||||
typedef struct _mlan_ds_misc_led_cfg {
|
||||
t_u32 sub_command;
|
||||
t_u8 enable;
|
||||
/** tlv len */
|
||||
t_u16 led_cfg_len;
|
||||
mlan_ds_misc_led_behavior misc_led_behvr[MAX_FW_STATES];
|
||||
} mlan_ds_misc_led_cfg;
|
||||
|
||||
/** Type definition of mlan_ds_misc_rx_abort_cfg_ext
|
||||
* for MLAN_OID_MISC_TX_AMDPU_PROT_MODE
|
||||
*/
|
||||
|
@ -6075,6 +6114,13 @@ typedef struct _mlan_ds_cross_chip_synch {
|
|||
t_u32 init_tsf_high;
|
||||
} mlan_ds_cross_chip_synch;
|
||||
|
||||
typedef struct _mlan_ds_reorder_flush_time {
|
||||
/** AC BK/BE_flush time*/
|
||||
t_u16 flush_time_ac_be_bk;
|
||||
/** AC VI/VO flush time */
|
||||
t_u16 flush_time_ac_vi_vo;
|
||||
} mlan_ds_reorder_flush_time;
|
||||
|
||||
/** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */
|
||||
typedef struct _mlan_ds_misc_cfg {
|
||||
/** Sub-command */
|
||||
|
@ -6142,8 +6188,6 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
#endif
|
||||
/** Hotspot config param set */
|
||||
t_u32 hotspot_cfg;
|
||||
/** Multi AP flag */
|
||||
t_u8 multi_ap_flag;
|
||||
#ifdef STA_SUPPORT
|
||||
ExtCap_t ext_cap;
|
||||
#endif
|
||||
|
@ -6214,6 +6258,8 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
mlan_ds_misc_rx_abort_cfg rx_abort_cfg;
|
||||
mlan_ds_misc_ofdm_desense_cfg ofdm_desense_cfg;
|
||||
mlan_ds_misc_rx_abort_cfg_ext rx_abort_cfg_ext;
|
||||
mlan_ds_misc_nav_mitigation nav_mitigation;
|
||||
mlan_ds_misc_led_cfg led_config;
|
||||
mlan_ds_misc_tx_ampdu_prot_mode tx_ampdu_prot_mode;
|
||||
mlan_ds_misc_rate_adapt_cfg rate_adapt_cfg;
|
||||
mlan_ds_misc_cck_desense_cfg cck_desense_cfg;
|
||||
|
@ -6242,6 +6288,7 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
t_u32 ips_ctrl;
|
||||
mlan_ds_ch_load ch_load;
|
||||
mlan_ds_cross_chip_synch cross_chip_synch;
|
||||
mlan_ds_reorder_flush_time flush_time;
|
||||
} param;
|
||||
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;
|
||||
|
||||
|
|
|
@ -2999,7 +2999,7 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
|
|||
|
||||
/* pkt_type + tx_control */
|
||||
#define HEADER_SIZE 8
|
||||
packet_len = (t_u16)len + MLAN_MAC_ADDR_LENGTH;
|
||||
packet_len = (t_u16)(len + MLAN_MAC_ADDR_LENGTH);
|
||||
pmbuf = woal_alloc_mlan_buffer(priv->phandle,
|
||||
MLAN_MIN_DATA_HEADER_LEN + HEADER_SIZE +
|
||||
packet_len + sizeof(packet_len));
|
||||
|
@ -3399,10 +3399,10 @@ done:
|
|||
*
|
||||
* @return out IE length
|
||||
*/
|
||||
static t_u16 woal_get_specific_ie(const t_u8 *ie, int len, t_u8 *ie_out,
|
||||
static t_u16 woal_get_specific_ie(const t_u8 *ie, size_t len, t_u8 *ie_out,
|
||||
t_u32 ie_out_len, t_u16 mask)
|
||||
{
|
||||
int left_len = len;
|
||||
size_t left_len = len;
|
||||
const t_u8 *pos = ie;
|
||||
int length;
|
||||
t_u8 id = 0;
|
||||
|
@ -3825,9 +3825,9 @@ static t_u8 is_selected_registrar_on(const t_u8 *ie, int len)
|
|||
*
|
||||
* @return MTRUE/MFALSE
|
||||
*/
|
||||
static t_u16 woal_is_selected_registrar_on(const t_u8 *ie, int len)
|
||||
static t_u16 woal_is_selected_registrar_on(const t_u8 *ie, size_t len)
|
||||
{
|
||||
int left_len = len;
|
||||
size_t left_len = len;
|
||||
const t_u8 *pos = ie;
|
||||
int length;
|
||||
t_u8 id = 0;
|
||||
|
@ -5081,6 +5081,8 @@ void woal_cfg80211_notify_channel(moal_private *priv,
|
|||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
|
||||
cfg80211_ch_switch_notify(priv->netdev, &chandef, 0, 0);
|
||||
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && IMX_ANDROID_13))
|
||||
cfg80211_ch_switch_notify(priv->netdev, &chandef, 0, 0);
|
||||
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || \
|
||||
IMX_ANDROID_13 || IMX_ANDROID_12_BACKPORT)
|
||||
cfg80211_ch_switch_notify(priv->netdev, &chandef, 0);
|
||||
|
@ -5091,6 +5093,7 @@ void woal_cfg80211_notify_channel(moal_private *priv,
|
|||
mutex_unlock(&priv->wdev->mtx);
|
||||
#endif
|
||||
priv->channel = pchan_info->channel;
|
||||
priv->bandwidth = pchan_info->bandcfg.chanWidth;
|
||||
#ifdef UAP_CFG80211
|
||||
moal_memcpy_ext(priv->phandle, &priv->chan, &chandef,
|
||||
sizeof(struct cfg80211_chan_def),
|
||||
|
@ -5108,6 +5111,7 @@ void woal_cfg80211_notify_channel(moal_private *priv,
|
|||
return;
|
||||
}
|
||||
priv->channel = pchan_info->channel;
|
||||
priv->bandwidth = pchan_info->bandcfg.chanWidth;
|
||||
freq = ieee80211_channel_to_frequency(pchan_info->channel, band);
|
||||
switch (pchan_info->bandcfg.chanWidth) {
|
||||
case CHAN_BW_20MHZ:
|
||||
|
|
|
@ -66,10 +66,6 @@
|
|||
|
||||
#define MRVL_PKT_TYPE_MGMT_FRAME 0xE5
|
||||
|
||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
#define MRVL_PKT_TYPE_MGMT_EASYMESH 0xCF
|
||||
#endif
|
||||
|
||||
mlan_status woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep,
|
||||
t_u32 cipher, const t_u8 *key, int key_len,
|
||||
const t_u8 *seq, int seq_len, t_u8 key_index,
|
||||
|
|
|
@ -144,6 +144,7 @@ static const struct nla_policy woal_attr_policy[ATTR_WIFI_MAX + 1] = {
|
|||
[ATTR_SCAN_MAC_OUI_SET] = {.type = NLA_STRING, .len = 3},
|
||||
[ATTR_NODFS_VALUE] = {.type = NLA_U32},
|
||||
[ATTR_GET_CONCURRENCY_MATRIX_SET_SIZE_MAX] = {.type = NLA_U32},
|
||||
[ATTR_SCAN_BAND_SET] = {.type = NLA_U8},
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
|
@ -785,6 +786,9 @@ static int woal_cfg80211_subcmd_get_drv_dump(struct wiphy *wiphy,
|
|||
int ret = MLAN_STATUS_SUCCESS;
|
||||
int length = 0;
|
||||
char driver_dump_file[128];
|
||||
#ifndef DUMP_TO_PROC
|
||||
char path_name[64];
|
||||
#endif
|
||||
struct sk_buff *skb = NULL;
|
||||
|
||||
ENTER();
|
||||
|
@ -796,6 +800,7 @@ static int woal_cfg80211_subcmd_get_drv_dump(struct wiphy *wiphy,
|
|||
dev = wdev->netdev;
|
||||
priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
handle = priv->phandle;
|
||||
#ifdef DUMP_TO_PROC
|
||||
memset(driver_dump_file, 0, sizeof(driver_dump_file));
|
||||
snprintf(driver_dump_file, sizeof(driver_dump_file), "/proc/mwlan/");
|
||||
if (handle->handle_idx)
|
||||
|
@ -804,6 +809,15 @@ static int woal_cfg80211_subcmd_get_drv_dump(struct wiphy *wiphy,
|
|||
else
|
||||
snprintf(driver_dump_file, sizeof(driver_dump_file),
|
||||
"drv_dump");
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
woal_create_dump_dir(handle, path_name, sizeof(path_name));
|
||||
PRINTM(MMSG, "driver dump path name is %s\n", path_name);
|
||||
woal_dump_drv_info(handle, path_name);
|
||||
memset(driver_dump_file, 0, sizeof(driver_dump_file));
|
||||
snprintf(driver_dump_file, sizeof(driver_dump_file), "%s/%s", path_name,
|
||||
"file_drv_info");
|
||||
#endif
|
||||
PRINTM(MMSG, "driver dump file is %s\n", driver_dump_file);
|
||||
length = sizeof(driver_dump_file);
|
||||
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, length);
|
||||
|
@ -2795,7 +2809,7 @@ int woal_filter_packet(moal_private *priv, t_u8 *data, t_u32 len,
|
|||
unsigned long flags;
|
||||
|
||||
ENTER();
|
||||
pkt_filter = priv->packet_filter;
|
||||
pkt_filter = (packet_filter *)priv->packet_filter;
|
||||
if (!unlikely(pkt_filter)) {
|
||||
PRINTM(MINFO, "packet_filter not init\n");
|
||||
goto done;
|
||||
|
@ -3342,12 +3356,12 @@ void woal_cfg80211_rssi_monitor_event(moal_private *priv, t_s16 rssi)
|
|||
priv->conn_bssid) ||
|
||||
nla_put_s8(skb, ATTR_RSSI_MONITOR_CUR_RSSI, rssi_value)) {
|
||||
PRINTM(MERROR, "nla_put failed!\n");
|
||||
kfree(skb);
|
||||
dev_kfree_skb(skb);
|
||||
goto done;
|
||||
}
|
||||
woal_cfg80211_vendor_event(priv, event_rssi_monitor, (t_u8 *)skb->data,
|
||||
skb->len);
|
||||
kfree(skb);
|
||||
dev_kfree_skb(skb);
|
||||
done:
|
||||
LEAVE();
|
||||
}
|
||||
|
@ -3376,7 +3390,7 @@ void woal_cfg80211_driver_hang_event(moal_private *priv, t_u8 reload_mode)
|
|||
if (nla_put_u8(skb, ATTR_FW_RELOAD_MODE, reload_mode)) {
|
||||
PRINTM(MERROR,
|
||||
"woal_cfg80211_driver_hang_event: nla_put failed!\n");
|
||||
kfree(skb);
|
||||
dev_kfree_skb(skb);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -3386,7 +3400,7 @@ void woal_cfg80211_driver_hang_event(moal_private *priv, t_u8 reload_mode)
|
|||
woal_cfg80211_vendor_event(priv, event_hang, (t_u8 *)skb->data,
|
||||
skb->len);
|
||||
|
||||
kfree(skb);
|
||||
dev_kfree_skb(skb);
|
||||
done:
|
||||
LEAVE();
|
||||
}
|
||||
|
@ -3917,6 +3931,57 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vendor command to set scan band
|
||||
*
|
||||
* @param wiphy A pointer to wiphy struct
|
||||
* @param wdev A pointer to wireless_dev struct
|
||||
* @param data a pointer to data
|
||||
* @param data_len data length
|
||||
*
|
||||
* @return 0: success <0: fail
|
||||
*/
|
||||
static int woal_cfg80211_subcmd_set_scan_band(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int data_len)
|
||||
{
|
||||
struct net_device *dev = NULL;
|
||||
moal_private *priv = NULL;
|
||||
struct nlattr *tb_vendor[ATTR_WIFI_MAX + 1];
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!wdev || !wdev->netdev) {
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
dev = wdev->netdev;
|
||||
priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
|
||||
nla_parse(tb_vendor, ATTR_WIFI_MAX, (struct nlattr *)data, data_len,
|
||||
NULL
|
||||
#if KERNEL_VERSION(4, 12, 0) <= CFG80211_VERSION_CODE
|
||||
,
|
||||
NULL
|
||||
#endif
|
||||
);
|
||||
if (!tb_vendor[ATTR_SCAN_BAND_SET]) {
|
||||
PRINTM(MERROR, "%s: ATTR_SCAN_BAND_SET not found\n", __func__);
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
priv->scan_setband_mask =
|
||||
*(u8 *)nla_data(tb_vendor[ATTR_SCAN_BAND_SET]);
|
||||
PRINTM(MMSG,
|
||||
"woal_cfg80211_subcmd_set_scan_band: scan_setband_mask :%d",
|
||||
priv->scan_setband_mask);
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vendor command to start keep alive
|
||||
*
|
||||
|
@ -4430,7 +4495,7 @@ static int woal_cfg80211_subcmd_rtt_range_cancel(struct wiphy *wiphy,
|
|||
t_u8 rtt_config_num = handle->rtt_params.rtt_config_num;
|
||||
struct nlattr *tb[ATTR_RTT_MAX + 1];
|
||||
t_u32 target_num = 0;
|
||||
t_u8 addr[MAX_RTT_CONFIG_NUM][MLAN_MAC_ADDR_LENGTH];
|
||||
t_u8 addr[MAX_RTT_CONFIG_NUM][MLAN_MAC_ADDR_LENGTH] = {0x00};
|
||||
int i = 0, j = 0;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
int err = 0;
|
||||
|
@ -4569,7 +4634,7 @@ mlan_status woal_cfg80211_event_rtt_result(moal_private *priv, t_u8 *data,
|
|||
|
||||
complete = *pos;
|
||||
nla_put(skb, ATTR_RTT_RESULT_COMPLETE, sizeof(complete), &complete);
|
||||
pos++;
|
||||
pos = (t_u8 *)(pos + 1);
|
||||
event_left_len--;
|
||||
|
||||
while (event_left_len > sizeof(wifi_rtt_result_element)) {
|
||||
|
@ -5256,6 +5321,13 @@ static mlan_status woal_save_csi_dump_to_file(char *dir_name, char *file_name,
|
|||
t_u8 format, char *name)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifndef DUMP_TO_PROC
|
||||
struct file *pfile = NULL;
|
||||
loff_t pos;
|
||||
char dw_string[10];
|
||||
int i = 0;
|
||||
t_u32 *tmp = NULL;
|
||||
#endif
|
||||
ENTER();
|
||||
|
||||
if (!dir_name || !file_name || !buf) {
|
||||
|
@ -5263,6 +5335,55 @@ static mlan_status woal_save_csi_dump_to_file(char *dir_name, char *file_name,
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#ifndef DUMP_TO_PROC
|
||||
snprintf(name, MAX_BUF_LEN, "%s/%s", dir_name, file_name);
|
||||
pfile = filp_open(name, O_CREAT | O_RDWR | O_APPEND, 0644);
|
||||
|
||||
if (IS_ERR(pfile)) {
|
||||
PRINTM(MMSG,
|
||||
"Create file %s error, try to save dump file in /var\n",
|
||||
name);
|
||||
snprintf(name, MAX_BUF_LEN, "%s/%s", "/var", file_name);
|
||||
pfile = filp_open(name, O_CREAT | O_RDWR | O_APPEND, 0644);
|
||||
}
|
||||
if (IS_ERR(pfile)) {
|
||||
PRINTM(MERROR, "Create Dump file for %s error\n", name);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
PRINTM(MMSG, "Dump data %s saved in %s\n", file_name, name);
|
||||
|
||||
pos = 0;
|
||||
/* Save CSI dump directly to file */
|
||||
if (format == 1) {
|
||||
#if KERNEL_VERSION(4, 14, 0) > LINUX_VERSION_CODE
|
||||
vfs_write(pfile, (const char __user *)buf, buf_len, &pos);
|
||||
#else
|
||||
kernel_write(pfile, buf, buf_len, &pos);
|
||||
#endif
|
||||
} else {
|
||||
tmp = (t_u32 *)buf;
|
||||
for (i = 0; i < buf_len / 4; i++) {
|
||||
if ((i + 1) % 8 == 0)
|
||||
snprintf(dw_string, sizeof(dw_string), "%08x\n",
|
||||
*tmp);
|
||||
else
|
||||
snprintf(dw_string, sizeof(dw_string), "%08x ",
|
||||
*tmp);
|
||||
#if KERNEL_VERSION(4, 14, 0) > LINUX_VERSION_CODE
|
||||
vfs_write(pfile, (const char __user *)dw_string, 9,
|
||||
&pos);
|
||||
#else
|
||||
kernel_write(pfile, dw_string, 9, &pos);
|
||||
#endif
|
||||
tmp++;
|
||||
}
|
||||
}
|
||||
filp_close(pfile, NULL);
|
||||
|
||||
PRINTM(MMSG, "Dump data saved in %s successfully\n", name);
|
||||
#endif
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -5350,6 +5471,19 @@ static const struct wiphy_vendor_command vendor_commands[] = {
|
|||
#if KERNEL_VERSION(5, 3, 0) <= CFG80211_VERSION_CODE
|
||||
.policy = woal_attr_policy,
|
||||
.maxattr = ATTR_WIFI_MAX,
|
||||
#endif
|
||||
},
|
||||
{
|
||||
.info = {
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = sub_cmd_set_scan_band,
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
.doit = woal_cfg80211_subcmd_set_scan_band,
|
||||
#if KERNEL_VERSION(5, 3, 0) <= CFG80211_VERSION_CODE
|
||||
.policy = woal_attr_policy,
|
||||
.maxattr = ATTR_WIFI_MAX,
|
||||
#endif
|
||||
},
|
||||
{
|
||||
|
|
|
@ -612,6 +612,7 @@ typedef enum wifi_attr {
|
|||
ATTR_GET_CONCURRENCY_MATRIX_SET_SIZE_MAX = 8,
|
||||
ATTR_GET_CONCURRENCY_MATRIX_SET_SIZE = 9,
|
||||
ATTR_GET_CONCURRENCY_MATRIX_SET = 10,
|
||||
ATTR_SCAN_BAND_SET = 11,
|
||||
ATTR_WIFI_AFTER_LAST,
|
||||
ATTR_WIFI_MAX = ATTR_WIFI_AFTER_LAST - 1
|
||||
} wifi_attr_t;
|
||||
|
@ -707,6 +708,7 @@ enum vendor_sub_command {
|
|||
sub_cmd_stop_keep_alive = 0x0004,
|
||||
sub_cmd_dfs_capability = 0x0005,
|
||||
sub_cmd_set_scan_mac_oui = 0x0007,
|
||||
sub_cmd_set_scan_band = 0x0008,
|
||||
sub_cmd_set_packet_filter = 0x0011,
|
||||
sub_cmd_get_packet_filter_capability,
|
||||
sub_cmd_nd_offload = 0x0100,
|
||||
|
|
|
@ -162,8 +162,6 @@ static struct debug_data items[] = {
|
|||
INFO_ADDR | (INTF_SD << 8)},
|
||||
{"mp_invalid_update", item_size(mp_invalid_update),
|
||||
item_addr(mp_invalid_update), INFO_ADDR | (INTF_SD << 8)},
|
||||
{"sdio_rx_aggr", item_size(sdio_rx_aggr), item_addr(sdio_rx_aggr),
|
||||
INFO_ADDR | (INTF_SD << 8)},
|
||||
{"mpa_sent_last_pkt", item_size(mpa_sent_last_pkt),
|
||||
item_addr(mpa_sent_last_pkt), INFO_ADDR | (INTF_SD << 8)},
|
||||
{"mpa_sent_no_ports", item_size(mpa_sent_no_ports),
|
||||
|
@ -361,8 +359,6 @@ static struct debug_data uap_items[] = {
|
|||
INFO_ADDR | (INTF_SD << 8)},
|
||||
{"mp_invalid_update", item_size(mp_invalid_update),
|
||||
item_addr(mp_invalid_update), INFO_ADDR | (INTF_SD << 8)},
|
||||
{"sdio_rx_aggr", item_size(sdio_rx_aggr), item_addr(sdio_rx_aggr),
|
||||
INFO_ADDR | (INTF_SD << 8)},
|
||||
{"mpa_sent_last_pkt", item_size(mpa_sent_last_pkt),
|
||||
item_addr(mpa_sent_last_pkt), INFO_ADDR | (INTF_SD << 8)},
|
||||
{"mpa_sent_no_ports", item_size(mpa_sent_no_ports),
|
||||
|
|
|
@ -450,7 +450,7 @@ static int woal_setget_priv_11axcmdcfg(moal_private *priv, t_u8 *respbuf,
|
|||
int ret = 0;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
int header_len = 0, user_data_len = 0;
|
||||
int data[4] = {0};
|
||||
int data[8] = {0};
|
||||
ENTER();
|
||||
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11ax_cmd_cfg));
|
||||
|
@ -470,7 +470,7 @@ static int woal_setget_priv_11axcmdcfg(moal_private *priv, t_u8 *respbuf,
|
|||
PRINTM(MINFO, "data_len=%d,data=%d,%d,%d\n", user_data_len, data[0],
|
||||
data[1], data[2]);
|
||||
|
||||
if (user_data_len > 4 || user_data_len == 0) {
|
||||
if (user_data_len > 8 || user_data_len == 0) {
|
||||
PRINTM(MERROR, "Invalid parameters\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
|
@ -514,6 +514,20 @@ static int woal_setget_priv_11axcmdcfg(moal_private *priv, t_u8 *respbuf,
|
|||
cfg->sub_id = MLAN_11AXCMD_OBSS_TOLTIME_SUBID;
|
||||
cfg->param.toltime_cfg.tol_time = data[1];
|
||||
break;
|
||||
case MLAN_11AXCMD_CFG_ID_SET_BSRP:
|
||||
cfg->sub_id = MLAN_11AXCMD_SET_BSRP_SUBID;
|
||||
cfg->param.setbsrp_cfg.value = data[1];
|
||||
break;
|
||||
case MLAN_11AXCMD_CFG_ID_LLDE:
|
||||
cfg->sub_id = MLAN_11AXCMD_LLDE_SUBID;
|
||||
cfg->param.llde_cfg.llde = data[1];
|
||||
cfg->param.llde_cfg.mode = data[2];
|
||||
cfg->param.llde_cfg.fixrate = data[3];
|
||||
cfg->param.llde_cfg.triggerlimit = data[4];
|
||||
cfg->param.llde_cfg.peakULrate = data[5];
|
||||
cfg->param.llde_cfg.dl_llde = data[6];
|
||||
cfg->param.llde_cfg.triggerinterval = data[7];
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "unknown 11axcmd\n");
|
||||
ret = -EFAULT;
|
||||
|
@ -2899,116 +2913,6 @@ done:
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(UAP_SUPPORT)
|
||||
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||
/**
|
||||
* @brief easymesh uap Set/Get multi AP mode handler
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param req A pointer to ifreq structure
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int woal_uap_set_multiap_mode(moal_private *priv, t_u8 *respbuf,
|
||||
t_u32 respbuflen)
|
||||
{
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_misc_cfg *misc = NULL;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
int mode[1] = {0};
|
||||
int ret = 0;
|
||||
int header_len = 0;
|
||||
int user_data_len = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!respbuf) {
|
||||
PRINTM(MERROR, "response buffer is not available!\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
header_len = strlen(CMD_NXP) + strlen(PRIV_CMD_SETMODE);
|
||||
user_data_len = strlen(respbuf) - header_len;
|
||||
|
||||
/* Allocate an IOCTL request buffer */
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (req == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Fill request buffer */
|
||||
misc = (mlan_ds_misc_cfg *)req->pbuf;
|
||||
misc->sub_command = MLAN_OID_MISC_MULTI_AP_CFG;
|
||||
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
|
||||
if ((int)strlen(respbuf) == header_len) {
|
||||
/* GET operation */
|
||||
user_data_len = 0;
|
||||
req->action = MLAN_ACT_GET;
|
||||
} else {
|
||||
/* SET operation */
|
||||
parse_arguments(respbuf + header_len, mode, ARRAY_SIZE(mode),
|
||||
&user_data_len);
|
||||
if (user_data_len > 1) {
|
||||
PRINTM(MERROR, "Invalid number of args!\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
if ((mode[0] != EASY_MESH_MULTI_AP_BSS_MODE_3) &&
|
||||
(mode[0] != EASY_MESH_MULTI_AP_BSS_MODE_2) &&
|
||||
(mode[0] != EASY_MESH_MULTI_AP_BSS_MODE_1)) {
|
||||
PRINTM(MERROR, "Invalid setmode value\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (mode[0] == EASY_MESH_MULTI_AP_BSS_MODE_3)
|
||||
/* Supports backhaul and fronthaul BSS */
|
||||
priv->multi_ap_flag = EASY_MESH_MULTI_AP_BH_AND_FH_BSS;
|
||||
else if (mode[0] == EASY_MESH_MULTI_AP_BSS_MODE_2)
|
||||
/* Supports backhaul BSS */
|
||||
priv->multi_ap_flag = EASY_MESH_MULTI_AP_BH_BSS;
|
||||
else if (mode[0] == EASY_MESH_MULTI_AP_BSS_MODE_1)
|
||||
/* Supports fronthaul BSS */
|
||||
priv->multi_ap_flag = EASY_MESH_MULTI_AP_FH_BSS;
|
||||
PRINTM(MINFO, "[EM:%s:%d] priv->multi_ap_flag 0x%x\n", __func__,
|
||||
__LINE__, priv->multi_ap_flag);
|
||||
|
||||
req->action = MLAN_ACT_SET;
|
||||
}
|
||||
|
||||
/* Send IOCTL request to MLAN */
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (req->action == MLAN_ACT_GET) {
|
||||
if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_BH_AND_FH_BSS)
|
||||
mode[0] = EASY_MESH_MULTI_AP_BSS_MODE_3;
|
||||
else if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_BH_BSS)
|
||||
mode[0] = EASY_MESH_MULTI_AP_BSS_MODE_2;
|
||||
else if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_FH_BSS)
|
||||
mode[0] = EASY_MESH_MULTI_AP_BSS_MODE_1;
|
||||
|
||||
PRINTM(MINFO, "[EM:%s:%d] setmode to 0x%x\n", __func__,
|
||||
__LINE__, mode[0]);
|
||||
moal_memcpy_ext(priv->phandle, respbuf, (t_u8 *)mode,
|
||||
sizeof(mode), respbuflen);
|
||||
ret = sizeof(mode);
|
||||
}
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
/**
|
||||
|
@ -3401,6 +3305,110 @@ done:
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @brief Set/Get reorder flush time
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param action Action set or get
|
||||
* @param data A pointer to the data buf
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --
|
||||
* success, otherwise fail
|
||||
*/
|
||||
static mlan_status woal_set_get_reorder_flush_time(moal_private *priv,
|
||||
t_u32 action, int *data)
|
||||
{
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_misc_cfg *misc = NULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
/* Allocate an IOCTL request buffer */
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (req == NULL) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Fill request buffer */
|
||||
misc = (mlan_ds_misc_cfg *)req->pbuf;
|
||||
misc->sub_command = MLAN_OID_MISC_REORDER_FLUSH_TIME;
|
||||
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
req->action = action;
|
||||
|
||||
if (action == MLAN_ACT_SET) {
|
||||
misc->param.flush_time.flush_time_ac_be_bk = (t_u16)data[0];
|
||||
misc->param.flush_time.flush_time_ac_vi_vo = (t_u16)data[1];
|
||||
}
|
||||
|
||||
/* Send IOCTL request to MLAN */
|
||||
ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (ret == MLAN_STATUS_SUCCESS) {
|
||||
data[0] = misc->param.flush_time.flush_time_ac_be_bk;
|
||||
data[1] = misc->param.flush_time.flush_time_ac_vi_vo;
|
||||
}
|
||||
done:
|
||||
if (ret != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get AMPDU reordering flush time configurations
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param respbuf A pointer to response buffer
|
||||
* @param respbuflen Available length of response buffer
|
||||
*
|
||||
* @return Number of bytes written, negative for failure.
|
||||
*/
|
||||
static int woal_priv_set_get_reorder_flush_time(moal_private *priv,
|
||||
t_u8 *respbuf, t_u32 respbuflen)
|
||||
{
|
||||
t_u32 data[2];
|
||||
int ret = 0;
|
||||
int user_data_len = 0;
|
||||
t_u8 action;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (strlen(respbuf) ==
|
||||
(strlen(CMD_NXP) + strlen(PRIV_CMD_REORDER_FLUSH_TIME))) {
|
||||
/* GET operation */
|
||||
user_data_len = 0;
|
||||
} else {
|
||||
/* SET operation */
|
||||
memset((char *)data, 0, sizeof(data));
|
||||
parse_arguments(respbuf + strlen(CMD_NXP) +
|
||||
strlen(PRIV_CMD_REORDER_FLUSH_TIME),
|
||||
data, ARRAY_SIZE(data), &user_data_len);
|
||||
}
|
||||
|
||||
if (user_data_len >= 3) {
|
||||
PRINTM(MERROR, "Too many arguments\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (user_data_len == 0)
|
||||
action = MLAN_ACT_GET;
|
||||
else
|
||||
action = MLAN_ACT_SET;
|
||||
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_set_get_reorder_flush_time(priv, action, data)) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
sprintf(respbuf, "BE/BK=%d VI/VO=%d", data[0], data[1]);
|
||||
ret = strlen(respbuf) + 1;
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get deep sleep mode configurations
|
||||
*
|
||||
|
@ -5545,8 +5553,6 @@ static int woal_priv_set_get_usbaggrctrl(moal_private *priv, t_u8 *respbuf,
|
|||
if (cardp->rx_data_list[i].urb) {
|
||||
usb_kill_urb(
|
||||
cardp->rx_data_list[i].urb);
|
||||
usb_init_urb(
|
||||
cardp->rx_data_list[i].urb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10639,7 +10645,7 @@ done:
|
|||
static int woal_priv_inactivity_timeout_ext(moal_private *priv, t_u8 *respbuf,
|
||||
t_u32 respbuflen)
|
||||
{
|
||||
int data[4];
|
||||
int data[5];
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_pm_cfg *pmcfg = NULL;
|
||||
pmlan_ds_inactivity_to inac_to = NULL;
|
||||
|
@ -10660,7 +10666,8 @@ static int woal_priv_inactivity_timeout_ext(moal_private *priv, t_u8 *respbuf,
|
|||
&user_data_len);
|
||||
}
|
||||
|
||||
if (user_data_len != 0 && user_data_len != 3 && user_data_len != 4) {
|
||||
if (user_data_len != 0 && user_data_len != 3 && user_data_len != 4 &&
|
||||
user_data_len != 5) {
|
||||
PRINTM(MERROR, "Invalid number of parameters\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
|
@ -10689,6 +10696,8 @@ static int woal_priv_inactivity_timeout_ext(moal_private *priv, t_u8 *respbuf,
|
|||
inac_to->mcast_timeout = data[2];
|
||||
if (user_data_len == 4)
|
||||
inac_to->ps_entry_timeout = data[3];
|
||||
if (user_data_len == 5)
|
||||
inac_to->ps_cmd_timeout = data[4];
|
||||
req->action = MLAN_ACT_SET;
|
||||
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
|
@ -10701,6 +10710,7 @@ static int woal_priv_inactivity_timeout_ext(moal_private *priv, t_u8 *respbuf,
|
|||
data[1] = inac_to->unicast_timeout;
|
||||
data[2] = inac_to->mcast_timeout;
|
||||
data[3] = inac_to->ps_entry_timeout;
|
||||
data[4] = inac_to->ps_cmd_timeout;
|
||||
|
||||
moal_memcpy_ext(priv->phandle, respbuf, (t_u8 *)data,
|
||||
sizeof(data), respbuflen);
|
||||
|
@ -12072,9 +12082,11 @@ static int woal_channel_switch(moal_private *priv, t_u8 block_tx,
|
|||
|
||||
priv->phandle->chsw_wait_q_woken = MFALSE;
|
||||
/* wait for channel switch to complete */
|
||||
wait_event_interruptible_timeout(
|
||||
priv->phandle->chsw_wait_q, priv->phandle->chsw_wait_q_woken,
|
||||
(u32)HZ * (switch_count + 2) * 110 / 1000);
|
||||
if (!wait_event_interruptible_timeout(priv->phandle->chsw_wait_q,
|
||||
priv->phandle->chsw_wait_q_woken,
|
||||
(u32)HZ * (switch_count + 2) *
|
||||
110 / 1000))
|
||||
PRINTM(MMSG, "chsw_wait_q failed to wakeup\n");
|
||||
|
||||
pcust_chansw_ie->ie_index = 0xffff; /*Auto index */
|
||||
pcust_chansw_ie->mgmt_subtype_mask = 0;
|
||||
|
@ -12159,8 +12171,9 @@ static void woal_get_dfs_chan_list(moal_private *priv)
|
|||
sband = wiphy->bands[NL80211_BAND_5GHZ];
|
||||
if (sband) {
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
if (sband->channels[i].flags &
|
||||
IEEE80211_CHAN_RADAR) {
|
||||
if ((sband->channels[i].flags &
|
||||
IEEE80211_CHAN_RADAR) &&
|
||||
(priv->auto_dfs_cfg.num_of_chan <= 0xFF)) {
|
||||
priv->auto_dfs_cfg.dfs_chan_list
|
||||
[priv->auto_dfs_cfg.num_of_chan] =
|
||||
sband->channels[i].hw_value;
|
||||
|
@ -13305,7 +13318,7 @@ static int woal_priv_set_get_tx_rx_ant(moal_private *priv, t_u8 *respbuf,
|
|||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
if (IS_CARD9098(priv->phandle->card_type) ||
|
||||
IS_CARD9097(priv->phandle->card_type) ||
|
||||
IS_CARDIW62X(priv->phandle->card_type)) {
|
||||
IS_CARDIW624(priv->phandle->card_type)) {
|
||||
woal_cfg80211_notify_antcfg(
|
||||
priv, priv->phandle->wiphy, radio);
|
||||
}
|
||||
|
@ -14387,7 +14400,7 @@ static int woal_priv_robustcoex(moal_private *priv, t_u8 *respbuf,
|
|||
robust_coex_cfg = (mlan_ds_misc_cfg *)req->pbuf;
|
||||
while (respbuf[0] == ' ') {
|
||||
/** skip space */
|
||||
respbuf++;
|
||||
respbuf = (t_u8 *)(respbuf + 1);
|
||||
}
|
||||
|
||||
if (strncmp(respbuf, "gpiocfg", strlen("gpiocfg")) == 0) {
|
||||
|
@ -16852,6 +16865,79 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the new CSA parameter for target channel and backup
|
||||
* channel
|
||||
*
|
||||
* @param priv Pointer to moal_private structure
|
||||
* @param respbuf Pointer to response buffer
|
||||
* @param resplen Response buffer length
|
||||
*
|
||||
* @return Number of bytes written, negative for failure.
|
||||
*/
|
||||
static int woal_priv_set_channel_switch_param(moal_private *priv, t_u8 *respbuf,
|
||||
t_u32 respbuflen)
|
||||
{
|
||||
int ret = 0;
|
||||
int user_data_len = 0;
|
||||
int data[2] = {0};
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!priv || !priv->phandle || (priv->bss_role != MLAN_BSS_ROLE_UAP)) {
|
||||
PRINTM(MERROR,
|
||||
"priv or handle is null or interface is not AP/GO\n");
|
||||
ret = -EFAULT;
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (strlen(respbuf) ==
|
||||
(strlen(CMD_NXP) + strlen(PRIV_CMD_SET_CHAN_SWITCH_PARAM))) {
|
||||
/* GET operation */
|
||||
respbuf[0] = priv->chan_mode;
|
||||
respbuf[1] = priv->chan_num_pkts;
|
||||
ret = 2;
|
||||
goto done;
|
||||
} else {
|
||||
parse_arguments(respbuf + strlen(CMD_NXP) +
|
||||
strlen(PRIV_CMD_SET_CHAN_SWITCH_PARAM),
|
||||
data, ARRAY_SIZE(data), &user_data_len);
|
||||
}
|
||||
|
||||
if (sizeof(int) * user_data_len > sizeof(data)) {
|
||||
PRINTM(MERROR, "Too many arguments\n");
|
||||
ret = -EINVAL;
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
if (user_data_len < 2) {
|
||||
PRINTM(MERROR, "Too few arguments\n");
|
||||
ret = -EINVAL;
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (data[0] && (data[0] < 0 || data[0] > 3)) {
|
||||
PRINTM(MERROR,
|
||||
"Wrong channel switch parameter <mode> for ucast action frame!\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!data[0] && (data[1] < 0 || data[1] > MAX_NUM_PKTS)) {
|
||||
PRINTM(MERROR, "Bcast action frame count exceeds maximum %d!\n",
|
||||
MAX_NUM_PKTS);
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
priv->chan_mode = data[0] & DEFAULT_CHAN_MODE_MASK;
|
||||
priv->chan_num_pkts = data[1];
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief P2P extended channel switch
|
||||
*
|
||||
|
@ -18684,6 +18770,222 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get NAV mitigation config parameters
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param respbuf A pointer to response buffer
|
||||
* @param respbuflen Available length of response buffer
|
||||
*
|
||||
* @return Number of bytes written, negative for failure.
|
||||
*/
|
||||
static int woal_priv_nav_mitigation(moal_private *priv, t_u8 *respbuf,
|
||||
t_u32 respbuflen)
|
||||
{
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_misc_cfg *misc = NULL;
|
||||
int ret = 0;
|
||||
int data[4] = {0};
|
||||
int header_len = 0, user_data_len = 0;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!respbuf) {
|
||||
PRINTM(MERROR, "response buffer is not available!\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
header_len = strlen(CMD_NXP) + strlen(PRIV_CMD_NAV_MITIGATION);
|
||||
user_data_len = strlen(respbuf) - header_len;
|
||||
|
||||
/* Allocate an IOCTL request buffer */
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (req == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Fill request buffer */
|
||||
misc = (mlan_ds_misc_cfg *)req->pbuf;
|
||||
misc->sub_command = MLAN_OID_MISC_NAV_MITIGATION;
|
||||
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
if ((int)strlen(respbuf) == header_len) {
|
||||
/* GET operation */
|
||||
user_data_len = 0;
|
||||
req->action = MLAN_ACT_GET;
|
||||
} else {
|
||||
/* SET operation */
|
||||
parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data),
|
||||
&user_data_len);
|
||||
if (user_data_len > 2 ||
|
||||
(user_data_len == 1 && data[0] != MFALSE)) {
|
||||
PRINTM(MERROR, "Invalid number of args!\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
misc->param.nav_mitigation.start_nav_mitigation = data[0];
|
||||
if (data[0] == MTRUE)
|
||||
misc->param.nav_mitigation.threshold = data[1];
|
||||
else
|
||||
misc->param.nav_mitigation.threshold = 0;
|
||||
|
||||
// Not used for MLAN_ACT_SET, Set to 0
|
||||
misc->param.nav_mitigation.detect_cnt = 0;
|
||||
misc->param.nav_mitigation.stop_cnt = 0;
|
||||
req->action = MLAN_ACT_SET;
|
||||
}
|
||||
/* Send IOCTL request to MLAN */
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (req->action == MLAN_ACT_GET) {
|
||||
data[0] = misc->param.nav_mitigation.start_nav_mitigation;
|
||||
data[1] = misc->param.nav_mitigation.threshold;
|
||||
data[2] = misc->param.nav_mitigation.detect_cnt;
|
||||
data[3] = misc->param.nav_mitigation.stop_cnt;
|
||||
moal_memcpy_ext(priv->phandle, respbuf, (t_u8 *)data,
|
||||
sizeof(data), respbuflen);
|
||||
}
|
||||
ret = sizeof(data);
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get LED config parameters
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param respbuf A pointer to response buffer
|
||||
* @param respbuflen Available length of response buffer
|
||||
*
|
||||
* @return Number of bytes written, negative for failure.
|
||||
*/
|
||||
static int woal_priv_led(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen)
|
||||
{
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_misc_cfg *misc = NULL;
|
||||
int ret = 0, config_count = 0, i = 0, j = 0;
|
||||
int data[25] = {0};
|
||||
int header_len = 0, user_data_len = 0;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!respbuf) {
|
||||
PRINTM(MERROR, "response buffer is not available!\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
header_len = strlen(CMD_NXP) + strlen(PRIV_CMD_LED);
|
||||
user_data_len = strlen(respbuf) - header_len;
|
||||
|
||||
/* Allocate an IOCTL request buffer */
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (req == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
/* Fill request buffer */
|
||||
memset(req->pbuf, 0, sizeof(mlan_ds_misc_cfg));
|
||||
misc = (mlan_ds_misc_cfg *)req->pbuf;
|
||||
misc->sub_command = MLAN_OID_MISC_LED_CONFIG;
|
||||
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
|
||||
if ((int)strlen(respbuf) == header_len) {
|
||||
/* GET operation */
|
||||
user_data_len = 0;
|
||||
req->action = MLAN_ACT_GET;
|
||||
} else {
|
||||
/* SET operation */
|
||||
parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data),
|
||||
&user_data_len);
|
||||
|
||||
req->action = MLAN_ACT_SET;
|
||||
misc->param.led_config.enable = data[0];
|
||||
misc->param.led_config.led_cfg_len = 0;
|
||||
if (user_data_len > 1) {
|
||||
/* Calculate the number of LED config passed */
|
||||
i = 1;
|
||||
while (i < user_data_len) {
|
||||
if (data[i + 1] < 5)
|
||||
i += 2;
|
||||
else
|
||||
i += 4;
|
||||
config_count++;
|
||||
}
|
||||
misc->param.led_config.led_cfg_len = config_count;
|
||||
|
||||
j = 1;
|
||||
i = 0;
|
||||
while (i < config_count && j < user_data_len) {
|
||||
if (data[j + 1] < 5) {
|
||||
misc->param.led_config.misc_led_behvr[i]
|
||||
.firmwarestate = data[j];
|
||||
misc->param.led_config.misc_led_behvr[i]
|
||||
.ledstate = data[j + 1];
|
||||
misc->param.led_config.misc_led_behvr[i]
|
||||
.ledargs = 0x0000; // keep empty
|
||||
j += 2;
|
||||
} else {
|
||||
if (data[j + 3] > 4) {
|
||||
PRINTM(MERROR,
|
||||
"Invalid value passed for Duty cycle index %d!\n",
|
||||
data[j + 3]);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
misc->param.led_config.misc_led_behvr[i]
|
||||
.firmwarestate = data[j];
|
||||
misc->param.led_config.misc_led_behvr[i]
|
||||
.ledstate = data[j + 1];
|
||||
misc->param.led_config.misc_led_behvr[i]
|
||||
.ledargs =
|
||||
(((data[j + 3] & 0x0F) << 4) |
|
||||
(data[j + 2] & 0x0F));
|
||||
j += 4;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Send IOCTL request to MLAN */
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (req->action == MLAN_ACT_GET) {
|
||||
respbuf[0] = misc->param.led_config.enable;
|
||||
if (misc->param.led_config.enable == 1) {
|
||||
moal_memcpy_ext(
|
||||
priv->phandle, &respbuf[1],
|
||||
(t_u8 *)misc->param.led_config.misc_led_behvr,
|
||||
(MAX_FW_STATES *
|
||||
sizeof(mlan_ds_misc_led_behavior)),
|
||||
respbuflen);
|
||||
ret = ((MAX_FW_STATES *
|
||||
sizeof(mlan_ds_misc_led_behavior)) +
|
||||
1);
|
||||
} else
|
||||
ret = 1;
|
||||
}
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable/Disable Un-associated Dot11mc FTM Frame exchanges
|
||||
*
|
||||
|
@ -19732,16 +20034,6 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
|
|||
priv_cmd.total_len);
|
||||
goto handled;
|
||||
#endif
|
||||
#if defined(UAP_SUPPORT)
|
||||
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_SETMODE,
|
||||
strlen(PRIV_CMD_SETMODE)) == 0) {
|
||||
/* Set multi_ap mode */
|
||||
len = woal_uap_set_multiap_mode(priv, buf,
|
||||
priv_cmd.total_len);
|
||||
goto handled;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_BSSROLE,
|
||||
|
@ -19791,6 +20083,13 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
|
|||
len = woal_priv_setgetdeepsleep(priv, buf,
|
||||
priv_cmd.total_len);
|
||||
goto handled;
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP),
|
||||
PRIV_CMD_REORDER_FLUSH_TIME,
|
||||
strlen(PRIV_CMD_REORDER_FLUSH_TIME)) == 0) {
|
||||
/* reorder flush time */
|
||||
len = woal_priv_set_get_reorder_flush_time(
|
||||
priv, buf, priv_cmd.total_len);
|
||||
goto handled;
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_IPADDR,
|
||||
strlen(PRIV_CMD_IPADDR)) == 0) {
|
||||
/* IP address */
|
||||
|
@ -19981,6 +20280,18 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
|
|||
len = woal_priv_rx_abort_cfg_ext(priv, buf,
|
||||
priv_cmd.total_len);
|
||||
goto handled;
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP),
|
||||
PRIV_CMD_NAV_MITIGATION,
|
||||
strlen(PRIV_CMD_NAV_MITIGATION)) == 0) {
|
||||
/* dconfigure nav mitigate */
|
||||
len = woal_priv_nav_mitigation(priv, buf,
|
||||
priv_cmd.total_len);
|
||||
goto handled;
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_LED,
|
||||
strlen(PRIV_CMD_LED)) == 0) {
|
||||
/* dconfigure nav mitigate */
|
||||
len = woal_priv_led(priv, buf, priv_cmd.total_len);
|
||||
goto handled;
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP),
|
||||
PRIV_CMD_RX_ABORT_CFG,
|
||||
strlen(PRIV_CMD_RX_ABORT_CFG)) == 0) {
|
||||
|
@ -20750,6 +21061,14 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
|
|||
len = woal_priv_extend_channel_switch(
|
||||
priv, buf, priv_cmd.total_len);
|
||||
goto handled;
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP),
|
||||
PRIV_CMD_SET_CHAN_SWITCH_PARAM,
|
||||
strlen(PRIV_CMD_SET_CHAN_SWITCH_PARAM)) ==
|
||||
0) {
|
||||
/* set CSA/ECSA parameters */
|
||||
len = woal_priv_set_channel_switch_param(
|
||||
priv, buf, priv_cmd.total_len);
|
||||
goto handled;
|
||||
#endif
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_DYN_BW,
|
||||
strlen(PRIV_CMD_DYN_BW)) == 0) {
|
||||
|
@ -21118,6 +21437,12 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
|
|||
len = snprintf(buf, CMD_BUF_LEN, "OK\n") + 1;
|
||||
} else if (strncmp(buf, "BGSCAN-CONFIG", strlen("BGSCAN-CONFIG")) ==
|
||||
0) {
|
||||
#ifdef STA_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME))
|
||||
goto done;
|
||||
#endif
|
||||
#endif
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_set_bg_scan(priv, buf, priv_cmd.total_len)) {
|
||||
ret = -EFAULT;
|
||||
|
@ -21127,6 +21452,13 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
|
|||
priv->bg_scan_reported = MFALSE;
|
||||
len = snprintf(buf, CMD_BUF_LEN, "OK\n") + 1;
|
||||
} else if (strncmp(buf, "BGSCAN-STOP", strlen("BGSCAN-STOP")) == 0) {
|
||||
#ifdef STA_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME))
|
||||
goto done;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (priv->bg_scan_start && !priv->scan_cfg.rssi_threshold) {
|
||||
if (MLAN_STATUS_FAILURE ==
|
||||
woal_stop_bg_scan(priv, MOAL_NO_WAIT)) {
|
||||
|
|
|
@ -82,9 +82,6 @@ Change log:
|
|||
#define PRIV_CMD_GET_STA_LIST "getstalist"
|
||||
#define PRIV_CMD_BSS_CONFIG "bssconfig"
|
||||
#endif
|
||||
#if defined(UAP_SUPPORT)
|
||||
#define PRIV_CMD_SETMODE "setmode"
|
||||
#endif
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
#define PRIV_CMD_BSSROLE "bssrole"
|
||||
|
@ -103,6 +100,8 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_EXTCAPCFG "extcapcfg"
|
||||
#define PRIV_CMD_CANCELSCAN "cancelscan"
|
||||
#endif
|
||||
#define PRIV_CMD_REORDER_FLUSH_TIME "flush_time"
|
||||
|
||||
#define PRIV_CMD_DEEPSLEEP "deepsleep"
|
||||
#define PRIV_CMD_IPADDR "ipaddr"
|
||||
#define PRIV_CMD_WPSSESSION "wpssession"
|
||||
|
@ -274,6 +273,7 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_GET_CFG_CHAN_LIST "getcfgchanlist"
|
||||
#if defined(UAP_SUPPORT)
|
||||
#define PRIV_CMD_EXTEND_CHAN_SWITCH "channel_switch"
|
||||
#define PRIV_CMD_SET_CHAN_SWITCH_PARAM "chanswitch_param"
|
||||
#endif
|
||||
|
||||
#define PRIV_CMD_TDLS_IDLE_TIME "tdls_idle_time"
|
||||
|
@ -310,6 +310,9 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_OFDM_DESENSE_CFG "ofdm_desense_cfg"
|
||||
/**Private command to configure dynamic rx abort config */
|
||||
#define PRIV_CMD_RX_ABORT_CFG_EXT "rx_abort_cfg_ext"
|
||||
/** configure NAV mitigation parameters. */
|
||||
#define PRIV_CMD_NAV_MITIGATION "nav_mitigation"
|
||||
#define PRIV_CMD_LED "led"
|
||||
#define TX_AMPDU_RTS_CTS 0
|
||||
#define TX_AMPDU_CTS_2_SELF 1
|
||||
#define TX_AMPDU_DISABLE_PROTECTION 2
|
||||
|
|
|
@ -275,7 +275,6 @@ static int indrstcfg = 0xffffffff;
|
|||
#define DEFAULT_DEV_CAP_MASK 0xffffffff
|
||||
static t_u32 dev_cap_mask = DEFAULT_DEV_CAP_MASK;
|
||||
#ifdef SDIO
|
||||
static int sdio_rx_aggr = MTRUE;
|
||||
#endif
|
||||
|
||||
/** The global variable of scan beacon buffer **/
|
||||
|
@ -343,8 +342,8 @@ static card_type_entry card_type_map_tbl[] = {
|
|||
#ifdef SD9177
|
||||
{CARD_TYPE_SD9177, 0, CARD_SD9177},
|
||||
#endif
|
||||
#ifdef SDIW62X
|
||||
{CARD_TYPE_SDIW62X, 0, CARD_SDIW62X},
|
||||
#ifdef SDIW624
|
||||
{CARD_TYPE_SDIW624, 0, CARD_SDIW624},
|
||||
#endif
|
||||
{CARD_TYPE_SDAW693, 0, CARD_SDAW693},
|
||||
#ifdef PCIE8897
|
||||
|
@ -360,8 +359,8 @@ static card_type_entry card_type_map_tbl[] = {
|
|||
{CARD_TYPE_PCIE9098, 0, CARD_PCIE9098},
|
||||
#endif
|
||||
{CARD_TYPE_PCIEAW693, 0, CARD_PCIEAW693},
|
||||
#ifdef PCIEIW62X
|
||||
{CARD_TYPE_PCIEIW62X, 0, CARD_PCIEIW62X},
|
||||
#ifdef PCIEIW624
|
||||
{CARD_TYPE_PCIEIW624, 0, CARD_PCIEIW624},
|
||||
#endif
|
||||
#ifdef USB8801
|
||||
{CARD_TYPE_USB8801, 0, CARD_USB8801},
|
||||
|
@ -382,8 +381,8 @@ static card_type_entry card_type_map_tbl[] = {
|
|||
#ifdef USB9097
|
||||
{CARD_TYPE_USB9097, 0, CARD_USB9097},
|
||||
#endif
|
||||
#ifdef USBIW62X
|
||||
{CARD_TYPE_USBIW62X, 0, CARD_USBIW62X},
|
||||
#ifdef USBIW624
|
||||
{CARD_TYPE_USBIW624, 0, CARD_USBIW624},
|
||||
#endif
|
||||
|
||||
};
|
||||
|
@ -1078,20 +1077,6 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
PRINTM(MMSG, "dev_cap_mask=%d\n", params->dev_cap_mask);
|
||||
}
|
||||
#ifdef SDIO
|
||||
else if (strncmp(line, "sdio_rx_aggr",
|
||||
strlen("sdio_rx_aggr")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
if (out_data)
|
||||
moal_extflg_set(handle, EXT_SDIO_RX_AGGR);
|
||||
else
|
||||
moal_extflg_clear(handle, EXT_SDIO_RX_AGGR);
|
||||
PRINTM(MMSG, "sdio_rx_aggr %s\n",
|
||||
moal_extflg_isset(handle, EXT_SDIO_RX_AGGR) ?
|
||||
"on" :
|
||||
"off");
|
||||
}
|
||||
#endif
|
||||
else if (strncmp(line, "pmic", strlen("pmic")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
|
@ -1704,8 +1689,6 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
if (params)
|
||||
handle->params.dev_cap_mask = params->dev_cap_mask;
|
||||
#ifdef SDIO
|
||||
if (sdio_rx_aggr)
|
||||
moal_extflg_set(handle, EXT_SDIO_RX_AGGR);
|
||||
#endif
|
||||
if (pmic)
|
||||
moal_extflg_set(handle, EXT_PMIC);
|
||||
|
@ -2484,7 +2467,7 @@ mlan_status woal_init_module_param(moal_handle *handle)
|
|||
}
|
||||
PRINTM(MMSG, "%s: init module param from usr cfg\n",
|
||||
card_type_map_tbl[i].name);
|
||||
size = handle->param_data->size;
|
||||
size = (t_u32)handle->param_data->size;
|
||||
data = (t_u8 *)handle->param_data->data;
|
||||
while ((int)parse_cfg_get_line(data, size, line) != -1) {
|
||||
if (line[0] == '#')
|
||||
|
@ -2762,9 +2745,6 @@ MODULE_PARM_DESC(amsdu_deaggr,
|
|||
"0: default; 1: Try to avoid buf copy in amsud deaggregation");
|
||||
|
||||
#ifdef SDIO
|
||||
module_param(sdio_rx_aggr, int, 0);
|
||||
MODULE_PARM_DESC(sdio_rx_aggr,
|
||||
"1: Enable SDIO rx aggr; 0: Disable SDIO rx aggr");
|
||||
#endif
|
||||
|
||||
module_param(pmic, int, 0);
|
||||
|
|
|
@ -1211,7 +1211,10 @@ void woal_check_mc_connection(moal_private *priv, t_u8 wait_option,
|
|||
#endif
|
||||
t_u16 enable = 0;
|
||||
|
||||
woal_mc_policy_cfg(priv, &enable, wait_option, MLAN_ACT_GET);
|
||||
if (woal_mc_policy_cfg(priv, &enable, wait_option, MLAN_ACT_GET)) {
|
||||
PRINTM(MERROR, "Get multi-channel policy failed\n");
|
||||
}
|
||||
|
||||
if (!enable)
|
||||
return;
|
||||
#ifdef UAP_SUPPORT
|
||||
|
@ -3643,7 +3646,9 @@ mlan_status woal_cancel_hs(moal_private *priv, t_u8 wait_option)
|
|||
if (priv->phandle->fw_roam_enable == ROAM_OFFLOAD_WITH_BSSID ||
|
||||
priv->phandle->fw_roam_enable == ROAM_OFFLOAD_WITH_SSID ||
|
||||
priv->phandle->fw_roam_enable == AUTO_RECONNECT)
|
||||
woal_config_fw_roaming(priv, ROAM_OFFLOAD_RESUME_CFG, NULL);
|
||||
if (woal_config_fw_roaming(priv, ROAM_OFFLOAD_RESUME_CFG, NULL))
|
||||
PRINTM(MERROR,
|
||||
"config fw roaming ROAM_OFFLOAD_RESUME_CFG failed\n");
|
||||
#ifdef STA_CFG80211
|
||||
if (priv->phandle->fw_roam_enable == AUTO_RECONNECT)
|
||||
woal_set_clear_pmk(priv, MLAN_ACT_CLEAR);
|
||||
|
@ -3719,12 +3724,16 @@ static int woal_set_fw_roaming_params(moal_private *priv)
|
|||
#endif
|
||||
|
||||
/*Enable fw roaming*/
|
||||
woal_config_fw_roaming(priv, ROAM_OFFLOAD_ENABLE, NULL);
|
||||
if (woal_config_fw_roaming(priv, ROAM_OFFLOAD_ENABLE, NULL))
|
||||
PRINTM(MERROR,
|
||||
"config fw roaming ROAM_OFFLOAD_ENABLE failed\n");
|
||||
/*Download fw roaming parameters*/
|
||||
woal_config_fw_roaming(priv, ROAM_OFFLOAD_PARAM_CFG,
|
||||
&priv->phandle->fw_roam_params);
|
||||
if (woal_config_fw_roaming(priv, ROAM_OFFLOAD_PARAM_CFG,
|
||||
&priv->phandle->fw_roam_params))
|
||||
PRINTM(MERROR,
|
||||
"config fw roaming ROAM_OFFLOAD_PARAM_CFG failed\n");
|
||||
|
||||
/*Download userset passphrase key and current connection's PMK*/
|
||||
/*Download userset passphrase key and current connection's PMK*/
|
||||
#ifdef STA_CFG80211
|
||||
if (!priv->phandle->fw_roam_params.userset_passphrase) {
|
||||
woal_set_clear_pmk(priv, MLAN_ACT_SET);
|
||||
|
@ -3761,7 +3770,10 @@ static int woal_set_fw_roaming_params(moal_private *priv)
|
|||
}
|
||||
#endif
|
||||
/*Set userset to mlan adapter*/
|
||||
woal_config_fw_roaming(priv, ROAM_OFFLOAD_ENABLE, &roam_offload_cfg);
|
||||
if (woal_config_fw_roaming(priv, ROAM_OFFLOAD_ENABLE,
|
||||
&roam_offload_cfg))
|
||||
PRINTM(MERROR,
|
||||
"config fw roaming ROAM_OFFLOAD_ENABLE failed\n");
|
||||
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
|
@ -3953,7 +3965,10 @@ int woal_enable_hs(moal_private *priv)
|
|||
if (handle->fw_roam_enable == ROAM_OFFLOAD_WITH_BSSID ||
|
||||
handle->fw_roam_enable == ROAM_OFFLOAD_WITH_SSID ||
|
||||
handle->fw_roam_enable == AUTO_RECONNECT) {
|
||||
woal_config_fw_roaming(priv, ROAM_OFFLOAD_SUSPEND_CFG, NULL);
|
||||
if (woal_config_fw_roaming(priv, ROAM_OFFLOAD_SUSPEND_CFG,
|
||||
NULL))
|
||||
PRINTM(MERROR,
|
||||
"config fw roaming ROAM_OFFLOAD_SUSPEND_CFG failed\n");
|
||||
#ifdef STA_CFG80211
|
||||
if (priv->phandle->fw_roam_enable == AUTO_RECONNECT)
|
||||
woal_set_clear_pmk(priv, MLAN_ACT_SET);
|
||||
|
@ -4069,7 +4084,8 @@ int woal_enable_hs(moal_private *priv)
|
|||
#ifdef SDIO_SUSPEND_RESUME
|
||||
else if (IS_SD(handle->card_type)) {
|
||||
handle->suspend_fail = MTRUE;
|
||||
woal_get_pm_info(priv, &pm_info);
|
||||
if (woal_get_pm_info(priv, &pm_info))
|
||||
PRINTM(MCMND, "get pm info failed\n");
|
||||
if (pm_info.is_suspend_allowed == MTRUE) {
|
||||
#ifdef MMC_PM_FUNC_SUSPENDED
|
||||
woal_wlan_is_suspended(priv->phandle);
|
||||
|
@ -6084,9 +6100,9 @@ mlan_status woal_cancel_scan(moal_private *priv, t_u8 wait_option)
|
|||
}
|
||||
spin_unlock_irqrestore(&handle->scan_req_lock, flags);
|
||||
#endif
|
||||
/* add 10ms delay, incase firmware delay 0x7f event after scan cancel
|
||||
/* add 300ms delay, incase firmware delay 0x7f event after scan cancel
|
||||
* command response */
|
||||
woal_sched_timeout(10);
|
||||
woal_sched_timeout(300);
|
||||
handle->scan_priv = NULL;
|
||||
done:
|
||||
if (ret != MLAN_STATUS_PENDING)
|
||||
|
@ -7537,8 +7553,6 @@ mlan_status woal_usb_aggr_init(moal_handle *handle)
|
|||
if (cardp->rx_data_list[i].urb) {
|
||||
usb_kill_urb(
|
||||
cardp->rx_data_list[i].urb);
|
||||
usb_init_urb(
|
||||
cardp->rx_data_list[i].urb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7609,48 +7623,6 @@ done:
|
|||
return status;
|
||||
}
|
||||
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
/**
|
||||
* @brief Set multi ap flag to mlan layer
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param wait_option wait_option of ioctl
|
||||
* @param flag multi ap flag
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS -- success, otherwise fail
|
||||
*/
|
||||
mlan_status woal_multi_ap_cfg(moal_private *priv, t_u8 wait_option, t_u8 flag)
|
||||
{
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_misc_cfg *cfg = NULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (req == NULL) {
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
cfg = (mlan_ds_misc_cfg *)req->pbuf;
|
||||
cfg->param.multi_ap_flag = flag;
|
||||
cfg->sub_command = MLAN_OID_MISC_MULTI_AP_CFG;
|
||||
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
req->action = MLAN_ACT_SET;
|
||||
|
||||
status = woal_request_ioctl(priv, req, wait_option);
|
||||
if (status != MLAN_STATUS_SUCCESS)
|
||||
goto done;
|
||||
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set hotspot configuration value to mlan layer
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains wlan driver specific defines etc.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2022 NXP
|
||||
* Copyright 2008-2023 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
@ -44,6 +44,9 @@ Change log:
|
|||
#include <linux/mm.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/sched.h>
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 10, 17)
|
||||
#include <uapi/linux/sched/types.h>
|
||||
#endif
|
||||
#include <linux/timer.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/pci.h>
|
||||
|
@ -160,7 +163,9 @@ Change log:
|
|||
#define IMX_ANDROID_12_BACKPORT 0
|
||||
|
||||
#if defined(IMX_SUPPORT)
|
||||
|
||||
#if defined(IMX_ANDROID)
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 15, 52)
|
||||
#undef IMX_ANDROID_13
|
||||
#define IMX_ANDROID_13 1
|
||||
|
@ -251,12 +256,13 @@ Change log:
|
|||
/** country rgpower mode */
|
||||
#define CNTRY_RGPOWER_MODE 2
|
||||
|
||||
#define DEF_NICE 20
|
||||
/** Define BOOLEAN */
|
||||
typedef t_u8 BOOLEAN;
|
||||
|
||||
#define INTF_CARDTYPE "----------%s-MM"
|
||||
|
||||
#define KERN_VERSION "5X"
|
||||
#define KERN_VERSION "6X"
|
||||
|
||||
#define V14 "14"
|
||||
#define V15 "15"
|
||||
|
@ -282,6 +288,12 @@ typedef t_u8 BOOLEAN;
|
|||
#define CARD_TYPE_PCIE_USB 7
|
||||
/** card type SD9177_UART */
|
||||
#define CARD_TYPE_SD9177_UART 1 // As per datasheet/SoC design
|
||||
/** card type SDIW624_UART */
|
||||
#define CARD_TYPE_SDIW624_UART 0 // As per datasheet/SoC design
|
||||
/** card type PCIEIW624_USB */
|
||||
#define CARD_TYPE_PCIEIW624_USB 4 // As per datasheet/SoC design
|
||||
/** card type PCIEIW624_UART */
|
||||
#define CARD_TYPE_PCIEIW624_UART 7 // As per datasheet/SoC design
|
||||
|
||||
/* Max buffer size */
|
||||
#define MAX_BUF_LEN 512
|
||||
|
@ -825,6 +837,8 @@ out:
|
|||
/** Custom event : Deep Sleep awake */
|
||||
#define CUS_EVT_DEEP_SLEEP_AWAKE "EVENT=DS_AWAKE"
|
||||
|
||||
#define CUS_EVT_ADDBA_TIMEOUT "EVENT=ADDBA_TIMEOUT"
|
||||
|
||||
#define CUS_EVT_TOD_TOA "EVENT=TOD-TOA"
|
||||
|
||||
/** Custom event : Host Sleep activated */
|
||||
|
@ -1417,25 +1431,13 @@ typedef struct _auto_zero_dfs_cfg {
|
|||
t_u8 dfs_chan_list[MAX_DFS_CHAN_LIST];
|
||||
} __ATTRIB_PACK__ auto_zero_dfs_cfg;
|
||||
|
||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
typedef struct _station_node {
|
||||
/** station aid */
|
||||
t_u16 aid;
|
||||
/** station mac address */
|
||||
t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
|
||||
/** net_device that station is bind to */
|
||||
struct net_device *netdev;
|
||||
/** is valid flag */
|
||||
t_u8 is_valid;
|
||||
} station_node;
|
||||
|
||||
#define EASY_MESH_MULTI_AP_FH_BSS (t_u8)(0x20)
|
||||
#define EASY_MESH_MULTI_AP_BH_BSS (t_u8)(0x40)
|
||||
#define EASY_MESH_MULTI_AP_BH_AND_FH_BSS (t_u8)(0x60)
|
||||
|
||||
#define EASY_MESH_MULTI_AP_BSS_MODE_1 (t_u8)(0x01)
|
||||
#define EASY_MESH_MULTI_AP_BSS_MODE_2 (t_u8)(0x02)
|
||||
#define EASY_MESH_MULTI_AP_BSS_MODE_3 (t_u8)(0x03)
|
||||
#ifdef STA_SUPPORT
|
||||
enum scan_set_band {
|
||||
SCAN_SETBAND_AUTO = 0,
|
||||
SCAN_SETBAND_2G = BIT(0),
|
||||
SCAN_SETBAND_5G = BIT(1),
|
||||
SCAN_SETBAND_6G = BIT(2),
|
||||
};
|
||||
#endif
|
||||
|
||||
/** Private structure for MOAL */
|
||||
|
@ -1529,6 +1531,10 @@ struct _moal_private {
|
|||
#ifdef STA_SUPPORT
|
||||
/** scan type */
|
||||
t_u8 scan_type;
|
||||
|
||||
/** set band for scan */
|
||||
t_u8 scan_setband_mask;
|
||||
|
||||
/** extended capabilities */
|
||||
ExtCap_t extended_capabilities;
|
||||
/** bg_scan_start */
|
||||
|
@ -1588,6 +1594,8 @@ struct _moal_private {
|
|||
struct net_device *pa_netdev;
|
||||
/** channel parameter for UAP/GO */
|
||||
t_u16 channel;
|
||||
/** bandwidth parameter for UAP/GO */
|
||||
t_u8 bandwidth;
|
||||
#ifdef UAP_SUPPORT
|
||||
/** wep key */
|
||||
wep_key uap_wep_key[4];
|
||||
|
@ -1798,23 +1806,9 @@ struct _moal_private {
|
|||
char csi_dump_path[64];
|
||||
/** CSI config */
|
||||
mlan_ds_csi_params csi_config;
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
/** hostcmd_wait_q */
|
||||
wait_queue_head_t hostcmd_wait_q __ATTRIB_ALIGN__;
|
||||
/** hostcmd_wait_condition */
|
||||
t_bool hostcmd_wait_condition;
|
||||
#endif
|
||||
void *rings[RING_ID_MAX];
|
||||
t_u8 pkt_fate_monitor_enable;
|
||||
void *packet_filter;
|
||||
#ifdef UAP_SUPPORT
|
||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
t_u8 multi_ap_flag;
|
||||
station_node *vlan_sta_ptr;
|
||||
station_node *vlan_sta_list[MAX_STA_COUNT];
|
||||
moal_private *parent_priv;
|
||||
#endif
|
||||
#endif
|
||||
/** txwatchdog disable */
|
||||
t_u8 txwatchdog_disable;
|
||||
|
||||
|
@ -1894,6 +1888,7 @@ typedef struct _card_info {
|
|||
#endif
|
||||
t_u8 sniffer_support;
|
||||
t_u8 per_pkt_cfg_support;
|
||||
t_u8 host_mlme_required;
|
||||
} card_info;
|
||||
|
||||
/** channel_field.flags */
|
||||
|
@ -2329,7 +2324,6 @@ enum ext_mod_params {
|
|||
EXT_AGGR_CTRL,
|
||||
EXT_LOW_PW_MODE,
|
||||
#ifdef SDIO
|
||||
EXT_SDIO_RX_AGGR,
|
||||
#endif
|
||||
EXT_PMIC,
|
||||
EXT_DISCONNECT_ON_SUSPEND,
|
||||
|
@ -2697,14 +2691,30 @@ struct _moal_handle {
|
|||
/** Host Mlme Work struct**/
|
||||
struct work_struct host_mlme_work;
|
||||
#endif
|
||||
/** Driver workqueue */
|
||||
struct workqueue_struct *rx_workqueue;
|
||||
/** main work */
|
||||
struct work_struct rx_work;
|
||||
/** Driver event workqueue */
|
||||
struct workqueue_struct *evt_workqueue;
|
||||
/** event work */
|
||||
struct work_struct evt_work;
|
||||
#if defined(SDIO) || defined(USB)
|
||||
/** Driver workqueue */
|
||||
struct workqueue_struct *rx_workqueue;
|
||||
/** main work */
|
||||
struct work_struct rx_work;
|
||||
#endif
|
||||
#ifdef PCIE
|
||||
/** Driver pcie rx event workqueue */
|
||||
struct workqueue_struct *pcie_rx_event_workqueue;
|
||||
/** pcie rx event work */
|
||||
struct work_struct pcie_rx_event_work;
|
||||
/** Driver pcie rx cmd resp workqueue */
|
||||
struct workqueue_struct *pcie_cmd_resp_workqueue;
|
||||
/** pcie rx cmd resp work */
|
||||
struct work_struct pcie_cmd_resp_work;
|
||||
/* pcie rx data tasklet */
|
||||
struct tasklet_struct pcie_rx_task;
|
||||
/* pcie tx complete tasklet */
|
||||
struct tasklet_struct pcie_tx_complete_task;
|
||||
#endif
|
||||
/** event spin lock */
|
||||
spinlock_t evt_lock;
|
||||
/** event queue */
|
||||
|
@ -2713,6 +2723,7 @@ struct _moal_handle {
|
|||
struct workqueue_struct *tx_workqueue;
|
||||
/** tx work */
|
||||
struct work_struct tx_work;
|
||||
|
||||
/** remain on channel flag */
|
||||
t_u8 remain_on_channel;
|
||||
/** bss index for remain on channel */
|
||||
|
@ -2847,6 +2858,7 @@ struct _moal_handle {
|
|||
struct delayed_work scan_timeout_work;
|
||||
/** scan timeout time */
|
||||
t_u32 scan_timeout;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
/** main state */
|
||||
|
@ -2857,10 +2869,12 @@ struct _moal_handle {
|
|||
t_u8 driver_state;
|
||||
/** ioctl timeout */
|
||||
t_u8 ioctl_timeout;
|
||||
#ifdef DUMP_TO_PROC
|
||||
/** Pointer of fw dump buffer */
|
||||
t_u8 *drv_dump_buf;
|
||||
/** drv dump len */
|
||||
t_u32 drv_dump_len;
|
||||
#endif
|
||||
/** FW dump state */
|
||||
t_u8 fw_dump;
|
||||
/** event fw dump */
|
||||
|
@ -2873,8 +2887,10 @@ struct _moal_handle {
|
|||
t_u64 fw_dump_len;
|
||||
/** fw dump status for each chip, useful in multichip drive */
|
||||
BOOLEAN fw_dump_status;
|
||||
#ifdef DUMP_TO_PROC
|
||||
/** Pointer of fw dump buffer */
|
||||
t_u8 *fw_dump_buf;
|
||||
#endif
|
||||
/** FW dump full name */
|
||||
t_u8 firmware_dump_file[128];
|
||||
|
||||
|
@ -3580,6 +3596,7 @@ void woal_update_firmware_name(moal_handle *handle);
|
|||
/** cancel all works in the queue */
|
||||
void woal_terminate_workqueue(moal_handle *handle);
|
||||
void woal_flush_workqueue(moal_handle *handle);
|
||||
void woal_queue_rx_task(moal_handle *handle);
|
||||
/** initializes firmware */
|
||||
mlan_status woal_init_fw(moal_handle *handle);
|
||||
/** frees the structure of moal_handle */
|
||||
|
@ -3707,6 +3724,7 @@ int woal_enable_hs(moal_private *priv);
|
|||
mlan_status woal_get_wakeup_reason(moal_private *priv,
|
||||
mlan_ds_hs_wakeup_reason *wakeup_reason);
|
||||
int woal_process_proc_hssetpara(moal_handle *handle, t_u8 *buf);
|
||||
#ifdef DUMP_TO_PROC
|
||||
#define FW_DUMP_INFO_LEN 0x280000
|
||||
/** mem dump header */
|
||||
typedef struct {
|
||||
|
@ -3725,6 +3743,14 @@ int woal_save_dump_info_to_buf(moal_handle *phandle, t_u8 *src, t_u32 len,
|
|||
t_u32 type);
|
||||
void woal_append_end_block(moal_handle *phandle);
|
||||
t_u8 *woal_dump_drv_info(moal_handle *phandle, t_u32 *dump_len);
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
void woal_create_dump_dir(moal_handle *phandle, char *dir_buf, int buf_size);
|
||||
#endif
|
||||
mlan_status woal_save_dump_info_to_file(char *dir_name, char *file_name,
|
||||
t_u8 *buf, t_u32 buf_len);
|
||||
void woal_dump_drv_info(moal_handle *phandle, t_u8 *dir_name);
|
||||
#endif
|
||||
|
||||
#define FW_DUMP_TYPE_ENDED 0x002
|
||||
#define FW_DUMP_TYPE_MEM_ITCM 0x004
|
||||
|
@ -3744,6 +3770,14 @@ void woal_dump_firmware_info_v3(moal_handle *phandle);
|
|||
void woal_store_firmware_dump(moal_handle *phandle, pmlan_event pmevent);
|
||||
void woal_send_fw_dump_complete_event(moal_private *priv);
|
||||
|
||||
#ifndef DUMP_TO_PROC
|
||||
#if defined(PCIE)
|
||||
void woal_store_ssu_dump(moal_handle *phandle, pmlan_event pmevent);
|
||||
#endif /* SSU_SUPPORT */
|
||||
/** save hostcmd response to file */
|
||||
t_void woal_save_host_cmdresp(moal_handle *phandle, mlan_cmdresp_event *pevent);
|
||||
#endif
|
||||
|
||||
int woal_pre_warmreset(moal_private *priv);
|
||||
int woal_warmreset(moal_private *priv);
|
||||
|
||||
|
@ -3970,10 +4004,18 @@ void woal_reassoc_timer_func(void *context);
|
|||
|
||||
void woal_fw_dump_timer_func(void *context);
|
||||
|
||||
t_void woal_main_work_queue(struct work_struct *work);
|
||||
#if defined(USB) || defined(SDIO)
|
||||
t_void woal_rx_work_queue(struct work_struct *work);
|
||||
#endif
|
||||
t_void woal_main_work_queue(struct work_struct *work);
|
||||
t_void woal_evt_work_queue(struct work_struct *work);
|
||||
t_void woal_mclist_work_queue(struct work_struct *work);
|
||||
|
||||
#ifdef PCIE
|
||||
t_void woal_pcie_rx_event_work_queue(struct work_struct *work);
|
||||
t_void woal_pcie_cmd_resp_work_queue(struct work_struct *work);
|
||||
#endif
|
||||
|
||||
#ifdef STA_CFG80211
|
||||
t_void woal_scan_timeout_handler(struct work_struct *work);
|
||||
#endif
|
||||
|
@ -4093,10 +4135,6 @@ void woal_hist_data_add(moal_private *priv, t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
|||
mlan_status woal_set_hotspotcfg(moal_private *priv, t_u8 wait_option,
|
||||
t_u32 hotspotcfg);
|
||||
|
||||
#if defined(STA_CFG80211)
|
||||
mlan_status woal_multi_ap_cfg(moal_private *priv, t_u8 wait_option, t_u8 flag);
|
||||
#endif
|
||||
|
||||
mlan_status woal_set_get_wowlan_config(moal_private *priv, t_u16 action,
|
||||
t_u8 wait_option,
|
||||
mlan_ds_misc_mef_flt_cfg *mefcfg);
|
||||
|
|
|
@ -132,10 +132,10 @@ static const struct pci_device_id wlan_ids[] = {
|
|||
0,
|
||||
0,
|
||||
},
|
||||
#ifdef PCIEIW62X
|
||||
#ifdef PCIEIW624
|
||||
{
|
||||
PCIE_VENDOR_ID_NXP,
|
||||
PCIE_DEVICE_ID_88WIW62X,
|
||||
PCIE_DEVICE_ID_88WIW624,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
|
@ -238,11 +238,11 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
#ifdef PCIEIW62X
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_88WIW62X) {
|
||||
card_type = CARD_TYPE_PCIEIW62X;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_PCIEIW62X,
|
||||
strlen(CARD_PCIEIW62X), strlen(driver_version));
|
||||
#ifdef PCIEIW624
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_88WIW624) {
|
||||
card_type = CARD_TYPE_PCIEIW624;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_PCIEIW624,
|
||||
strlen(CARD_PCIEIW624), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
|
@ -298,7 +298,7 @@ static mlan_status woal_do_flr(moal_handle *handle, bool prepare, bool flr_flag)
|
|||
|
||||
if (!IS_PCIE8997(handle->card_type) &&
|
||||
!IS_PCIE9097(handle->card_type) &&
|
||||
!IS_PCIEIW62X(handle->card_type) &&
|
||||
!IS_PCIEIW624(handle->card_type) &&
|
||||
!IS_PCIEAW693(handle->card_type) &&
|
||||
!IS_PCIE9098(handle->card_type)) {
|
||||
LEAVE();
|
||||
|
@ -598,7 +598,7 @@ static void woal_pcie_shutdown(struct pci_dev *dev)
|
|||
handle = card->handle;
|
||||
if (handle->second_mac)
|
||||
goto done;
|
||||
if (IS_PCIE9098(handle->card_type) || IS_PCIEIW62X(handle->card_type) ||
|
||||
if (IS_PCIE9098(handle->card_type) || IS_PCIEIW624(handle->card_type) ||
|
||||
IS_PCIEAW693(handle->card_type) || IS_PCIE9097(handle->card_type)) {
|
||||
if (RDWR_STATUS_FAILURE !=
|
||||
woal_pcie_rdwr_firmware(handle, 0, 1))
|
||||
|
@ -1130,8 +1130,6 @@ static irqreturn_t woal_pcie_interrupt(int irq, void *dev_id)
|
|||
PRINTM(MINTR, "Receive interrupt in hs_suspended\n");
|
||||
goto exit;
|
||||
}
|
||||
queue_work(handle->workqueue, &handle->main_work);
|
||||
|
||||
exit:
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
return IRQ_HANDLED;
|
||||
|
@ -1637,7 +1635,7 @@ static int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
#endif
|
||||
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
reg = PCIE9098_SCRATCH_12_REG;
|
||||
|
@ -1680,7 +1678,7 @@ static int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
i++;
|
||||
}
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
drv_ptr += sprintf(
|
||||
|
@ -1702,7 +1700,7 @@ static int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
drv_ptr += sprintf(drv_ptr, "%s\n", buf);
|
||||
}
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
drv_ptr += sprintf(drv_ptr,
|
||||
|
@ -1779,7 +1777,7 @@ static void woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
#endif
|
||||
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
reg = PCIE9098_SCRATCH_12_REG;
|
||||
|
@ -1817,7 +1815,7 @@ static void woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
i++;
|
||||
}
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
PRINTM(MMSG, "PCIE registers from offset 0x1c20 to 0x1c9c:\n");
|
||||
|
@ -1837,7 +1835,7 @@ static void woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
PRINTM(MMSG, "%s\n", buf);
|
||||
}
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
PRINTM(MMSG, "ADMA Tx/Rx/Event/Cmd/CmdResp registers:\n");
|
||||
|
@ -1960,7 +1958,7 @@ static rdwr_status woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag,
|
|||
#endif
|
||||
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump)
|
||||
|
@ -1979,7 +1977,7 @@ static rdwr_status woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag,
|
|||
return RDWR_STATUS_FAILURE;
|
||||
}
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump || resetflag)
|
||||
|
@ -2050,6 +2048,9 @@ static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
t_u8 read_reg = 0;
|
||||
t_u32 memory_size = 0;
|
||||
t_u32 memdump_finsh = 0;
|
||||
#ifndef DUMP_TO_PROC
|
||||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
#endif
|
||||
t_u8 *end_ptr = NULL;
|
||||
memory_type_mapping *mem_type_mapping_tbl = mem_type_mapping_tbl_8897;
|
||||
|
||||
|
@ -2057,6 +2058,7 @@ static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
#ifdef DUMP_TO_PROC
|
||||
if (!phandle->fw_dump_buf) {
|
||||
ret = moal_vmalloc(phandle, FW_DUMP_INFO_LEN,
|
||||
&(phandle->fw_dump_buf));
|
||||
|
@ -2068,6 +2070,18 @@ static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
memset(phandle->fw_dump_buf, 0x00, FW_DUMP_INFO_LEN);
|
||||
}
|
||||
phandle->fw_dump_len = 0;
|
||||
#else
|
||||
memdump_finsh = DEBUG_MEMDUMP_FINISH_8897;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directory*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strcpy(path_name, "/data");
|
||||
#endif
|
||||
PRINTM(MMSG, "Directory name is %s\n", path_name);
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
#endif
|
||||
/* start dump fw memory */
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "====PCIE DEBUG MODE OUTPUT START: %u.%06u ====\n", sec,
|
||||
|
@ -2157,11 +2171,25 @@ static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
(unsigned int)(dbg_ptr -
|
||||
mem_type_mapping_tbl[idx]
|
||||
.mem_Ptr));
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_save_dump_info_to_buf(
|
||||
phandle,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr,
|
||||
memory_size,
|
||||
mem_type_mapping_tbl[idx].type);
|
||||
#else
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s%s", "file_pcie_",
|
||||
mem_type_mapping_tbl[idx].mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr,
|
||||
memory_size))
|
||||
PRINTM(MMSG,
|
||||
"Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
#endif
|
||||
moal_vfree(phandle,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr);
|
||||
mem_type_mapping_tbl[idx].mem_Ptr = NULL;
|
||||
|
@ -2169,11 +2197,20 @@ static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
}
|
||||
} while (1);
|
||||
}
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_append_end_block(phandle);
|
||||
#endif
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "====PCIE DEBUG MODE OUTPUT END: %u.%06u ====\n", sec,
|
||||
usec);
|
||||
/* end dump fw memory */
|
||||
#ifndef DUMP_TO_PROC
|
||||
memset(firmware_dump_file, 0, sizeof(firmware_dump_file));
|
||||
sprintf(firmware_dump_file, "%s/%s", path_name, file_name);
|
||||
moal_memcpy_ext(phandle, phandle->firmware_dump_file,
|
||||
firmware_dump_file, sizeof(firmware_dump_file),
|
||||
sizeof(phandle->firmware_dump_file));
|
||||
#endif
|
||||
done:
|
||||
for (idx = 0;
|
||||
idx < dump_num && idx < ARRAY_SIZE(mem_type_mapping_tbl_8897);
|
||||
|
@ -2206,6 +2243,10 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
t_u8 doneflag = 0;
|
||||
rdwr_status stat;
|
||||
t_u32 memory_size = 0;
|
||||
#ifndef DUMP_TO_PROC
|
||||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
moal_handle *ref_handle;
|
||||
#endif
|
||||
t_u8 *end_ptr = NULL;
|
||||
memory_type_mapping *mem_type_mapping_tbl = &mem_type_mapping_tbl_8997;
|
||||
t_u32 dump_start_reg = 0;
|
||||
|
@ -2216,7 +2257,7 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
return;
|
||||
}
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump) {
|
||||
|
@ -2228,6 +2269,20 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifndef DUMP_TO_PROC
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directory*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strcpy(path_name, "/data");
|
||||
#endif
|
||||
PRINTM(MMSG, "Create DUMP directory success:dir_name=%s\n", path_name);
|
||||
ref_handle = (moal_handle *)phandle->pref_mac;
|
||||
if (ref_handle)
|
||||
woal_dump_drv_info(ref_handle, path_name);
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
#endif
|
||||
|
||||
/* start dump fw memory */
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
|
@ -2238,7 +2293,7 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
woal_pcie_rdwr_firmware(phandle, doneflag, 0))
|
||||
goto done;
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
dump_start_reg = PCIE9098_DUMP_START_REG;
|
||||
|
@ -2326,6 +2381,7 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
mem_type_mapping_tbl->mem_name,
|
||||
dbg_ptr - mem_type_mapping_tbl->mem_Ptr);
|
||||
#endif
|
||||
#ifdef DUMP_TO_PROC
|
||||
if (phandle->fw_dump_buf) {
|
||||
moal_vfree(phandle, phandle->fw_dump_buf);
|
||||
phandle->fw_dump_buf = NULL;
|
||||
|
@ -2335,6 +2391,20 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
phandle->fw_dump_len =
|
||||
dbg_ptr - mem_type_mapping_tbl->mem_Ptr;
|
||||
mem_type_mapping_tbl->mem_Ptr = NULL;
|
||||
#else
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s%s", "file_pcie_",
|
||||
mem_type_mapping_tbl->mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
mem_type_mapping_tbl->mem_Ptr,
|
||||
dbg_ptr - mem_type_mapping_tbl->mem_Ptr))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
moal_vfree(phandle, mem_type_mapping_tbl->mem_Ptr);
|
||||
mem_type_mapping_tbl->mem_Ptr = NULL;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
} while (1);
|
||||
|
@ -2342,6 +2412,13 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
PRINTM(MMSG, "====PCIE DEBUG MODE OUTPUT END: %u.%06u ====\n", sec,
|
||||
usec);
|
||||
/* end dump fw memory */
|
||||
#ifndef DUMP_TO_PROC
|
||||
memset(firmware_dump_file, 0, sizeof(firmware_dump_file));
|
||||
sprintf(firmware_dump_file, "%s/%s", path_name, file_name);
|
||||
moal_memcpy_ext(phandle, phandle->firmware_dump_file,
|
||||
firmware_dump_file, sizeof(firmware_dump_file),
|
||||
sizeof(phandle->firmware_dump_file));
|
||||
#endif
|
||||
done:
|
||||
if (mem_type_mapping_tbl->mem_Ptr) {
|
||||
moal_vfree(phandle, mem_type_mapping_tbl->mem_Ptr);
|
||||
|
@ -2369,10 +2446,12 @@ static t_u8 woal_pcie_is_second_mac(moal_handle *handle)
|
|||
|
||||
static void woal_pcie_dump_fw_info(moal_handle *phandle)
|
||||
{
|
||||
#ifdef DUMP_TO_PROC
|
||||
if (phandle->fw_dump_buf) {
|
||||
PRINTM(MERROR, "FW dump already exist\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
mlan_pm_wakeup_card(phandle->pmlan_adapter, MTRUE);
|
||||
phandle->fw_dump = MTRUE;
|
||||
#ifdef PCIE8897
|
||||
|
@ -2381,7 +2460,7 @@ static void woal_pcie_dump_fw_info(moal_handle *phandle)
|
|||
#endif
|
||||
if (IS_PCIE8997(phandle->card_type) ||
|
||||
IS_PCIEAW693(phandle->card_type) ||
|
||||
IS_PCIEIW62X(phandle->card_type) ||
|
||||
IS_PCIEIW624(phandle->card_type) ||
|
||||
IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
woal_pcie_dump_fw_info_v2(phandle);
|
||||
|
@ -2416,7 +2495,7 @@ static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
|||
t_u32 magic_reg = handle->card_info->magic_reg;
|
||||
t_u32 strap = 0;
|
||||
t_u32 magic = 0;
|
||||
#ifdef PCIEIW62X
|
||||
#ifdef PCIEIW624
|
||||
t_u32 boot_mode_reg = handle->card_info->boot_mode_reg;
|
||||
t_u32 boot_mode;
|
||||
#endif
|
||||
|
@ -2601,8 +2680,8 @@ static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef PCIEIW62X
|
||||
if (IS_PCIEIW62X(handle->card_type)) {
|
||||
#ifdef PCIEIW624
|
||||
if (IS_PCIEIW624(handle->card_type)) {
|
||||
woal_pcie_read_reg(handle, rev_id_reg, &revision_id);
|
||||
woal_pcie_read_reg(handle, host_strap_reg, &strap);
|
||||
woal_pcie_read_reg(handle, magic_reg, &magic);
|
||||
|
@ -2615,13 +2694,13 @@ static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
|||
"magic=0x%x boot_mode=0x%x, strap=0x%x, revision_id=0x%x\n",
|
||||
magic, boot_mode, strap, revision_id);
|
||||
if (boot_mode == 0x03)
|
||||
PRINTM(MMSG, "wlan: PCIE-IW62X in secure-boot mode\n");
|
||||
if (strap == CARD_TYPE_PCIE_UART)
|
||||
PRINTM(MMSG, "wlan: PCIE-IW624 in secure-boot mode\n");
|
||||
if (strap == CARD_TYPE_PCIEIW624_UART)
|
||||
strcpy(handle->card_info->fw_name,
|
||||
PCIEUARTIW62X_DEFAULT_COMBO_FW_NAME);
|
||||
PCIEUARTIW624_DEFAULT_COMBO_FW_NAME);
|
||||
else
|
||||
strcpy(handle->card_info->fw_name,
|
||||
PCIEUSBIW62X_DEFAULT_COMBO_FW_NAME);
|
||||
PCIEUSBIW624_DEFAULT_COMBO_FW_NAME);
|
||||
}
|
||||
#endif
|
||||
done:
|
||||
|
|
|
@ -52,9 +52,9 @@ Change log:
|
|||
/** PCIE device ID for 9098 card FN1 */
|
||||
#define PCIE_DEVICE_ID_88W9098P_FN1 (0x2b44)
|
||||
|
||||
#ifdef PCIEIW62X
|
||||
/** PCIE device ID for IW62X card FN0 */
|
||||
#define PCIE_DEVICE_ID_88WIW62X (0x3000)
|
||||
#ifdef PCIEIW624
|
||||
/** PCIE device ID for IW624 card FN0 */
|
||||
#define PCIE_DEVICE_ID_88WIW624 (0x3000)
|
||||
#endif
|
||||
|
||||
/** PCIE device ID for AW693 card FN0 */
|
||||
|
@ -120,12 +120,12 @@ Change log:
|
|||
#define PCIE9097_WLAN_V1_FW_NAME "nxp/pcieiw620_wlan_v1.bin"
|
||||
#endif /* PCIE9097 */
|
||||
|
||||
#ifdef PCIEIW62X
|
||||
#define PCIEIW62X_DEFAULT_COMBO_FW_NAME "nxp/pcieusbiw62x_combo.bin"
|
||||
#define PCIEUARTIW62X_DEFAULT_COMBO_FW_NAME "nxp/pcieuartiw62x_combo.bin"
|
||||
#define PCIEUSBIW62X_DEFAULT_COMBO_FW_NAME "nxp/pcieusbiw62x_combo.bin"
|
||||
#define PCIEIW62X_DEFAULT_WLAN_FW_NAME "nxp/pcieiw62x_wlan.bin"
|
||||
#endif /* PCIEIW62X */
|
||||
#ifdef PCIEIW624
|
||||
#define PCIEIW624_DEFAULT_COMBO_FW_NAME "nxp/pcieusbiw624_combo.bin"
|
||||
#define PCIEUARTIW624_DEFAULT_COMBO_FW_NAME "nxp/pcieuartiw624_combo.bin"
|
||||
#define PCIEUSBIW624_DEFAULT_COMBO_FW_NAME "nxp/pcieusbiw624_combo.bin"
|
||||
#define PCIEIW624_DEFAULT_WLAN_FW_NAME "nxp/pcieiw624_wlan.bin"
|
||||
#endif /* PCIEIW624 */
|
||||
|
||||
#define PCIE_NUM_MSIX_VECTORS 32
|
||||
|
||||
|
|
|
@ -566,7 +566,7 @@ mlan_status woal_priv_set_tx_rx_ant(moal_handle *handle, char *line)
|
|||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
if (IS_CARD9098(priv->phandle->card_type) ||
|
||||
IS_CARD9097(priv->phandle->card_type) ||
|
||||
IS_CARDIW62X(priv->phandle->card_type)) {
|
||||
IS_CARDIW624(priv->phandle->card_type)) {
|
||||
woal_cfg80211_notify_antcfg(priv, priv->phandle->wiphy,
|
||||
radio);
|
||||
}
|
||||
|
@ -1081,6 +1081,7 @@ static const struct file_operations config_proc_fops = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef DUMP_TO_PROC
|
||||
static int woal_drv_dump_read(struct seq_file *sfp, void *data)
|
||||
{
|
||||
moal_handle *handle = (moal_handle *)sfp->private;
|
||||
|
@ -1234,6 +1235,7 @@ static const struct file_operations fw_dump_fops = {
|
|||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief wifi status proc read function
|
||||
|
@ -1305,11 +1307,11 @@ int woal_string_to_number(char *s)
|
|||
|
||||
if (!strncmp(s, "-", 1)) {
|
||||
pn = -1;
|
||||
s++;
|
||||
s = (char *)(s + 1);
|
||||
}
|
||||
if (!strncmp(s, "0x", 2) || !strncmp(s, "0X", 2)) {
|
||||
base = 16;
|
||||
s += 2;
|
||||
s = (char *)(s + 2);
|
||||
} else
|
||||
base = 10;
|
||||
|
||||
|
@ -1387,8 +1389,10 @@ void woal_proc_init(moal_handle *handle)
|
|||
struct proc_dir_entry *pde = proc_mwlan;
|
||||
#endif
|
||||
char config_proc_dir[20];
|
||||
#ifdef DUMP_TO_PROC
|
||||
char drv_dump_dir[20];
|
||||
char fw_dump_dir[20];
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -1444,6 +1448,7 @@ void woal_proc_init(moal_handle *handle)
|
|||
if (!r)
|
||||
PRINTM(MERROR, "Fail to create proc config\n");
|
||||
|
||||
#ifdef DUMP_TO_PROC
|
||||
strncpy(drv_dump_dir, "drv_dump", sizeof(drv_dump_dir));
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
|
||||
r = proc_create_data(drv_dump_dir, 0644, handle->proc_wlan,
|
||||
|
@ -1471,6 +1476,7 @@ void woal_proc_init(moal_handle *handle)
|
|||
#endif
|
||||
if (!r)
|
||||
PRINTM(MERROR, "Failed to create proc fw dump\n");
|
||||
#endif
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
|
@ -1486,8 +1492,10 @@ done:
|
|||
void woal_proc_exit(moal_handle *handle)
|
||||
{
|
||||
char config_proc_dir[20];
|
||||
#ifdef DUMP_TO_PROC
|
||||
char drv_dump_dir[20];
|
||||
char fw_dump_dir[20];
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -1495,10 +1503,12 @@ void woal_proc_exit(moal_handle *handle)
|
|||
if (handle->proc_wlan) {
|
||||
strncpy(config_proc_dir, "config", sizeof(config_proc_dir));
|
||||
remove_proc_entry(config_proc_dir, handle->proc_wlan);
|
||||
#ifdef DUMP_TO_PROC
|
||||
strncpy(drv_dump_dir, "drv_dump", sizeof(drv_dump_dir));
|
||||
remove_proc_entry(drv_dump_dir, handle->proc_wlan);
|
||||
strncpy(fw_dump_dir, "fw_dump", sizeof(fw_dump_dir));
|
||||
remove_proc_entry(fw_dump_dir, handle->proc_wlan);
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
|
||||
/* Remove only if we are the only instance using this */
|
||||
|
@ -1516,6 +1526,7 @@ void woal_proc_exit(moal_handle *handle)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef DUMP_TO_PROC
|
||||
if (handle->fw_dump_buf) {
|
||||
moal_vfree(handle, handle->fw_dump_buf);
|
||||
handle->fw_dump_buf = NULL;
|
||||
|
@ -1526,6 +1537,7 @@ void woal_proc_exit(moal_handle *handle)
|
|||
handle->drv_dump_len = 0;
|
||||
handle->drv_dump_buf = NULL;
|
||||
}
|
||||
#endif
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
|
|
|
@ -139,12 +139,12 @@ Change log:
|
|||
#define SD9097_WLAN_V1_FW_NAME "nxp/sdiw620_wlan_v1.bin"
|
||||
#endif /* SD9097 */
|
||||
|
||||
#ifdef SDIW62X
|
||||
#define SDIW62X_DEFAULT_COMBO_FW_NAME "nxp/sdsd_iw62x.bin"
|
||||
#define SDUARTIW62X_COMBO_FW_NAME "nxp/sduart_iw62x.bin"
|
||||
#define SDSDIW62X_COMBO_FW_NAME "sdsd_iw62x.bin"
|
||||
#define SDIW62X_DEFAULT_WLAN_FW_NAME "nxp/sd_iw62x.bin"
|
||||
#endif /* SDIW62X */
|
||||
#ifdef SDIW624
|
||||
#define SDIW624_DEFAULT_COMBO_FW_NAME "nxp/sdsdiw624_combo.bin"
|
||||
#define SDUARTIW624_COMBO_FW_NAME "nxp/sduartiw624_combo.bin"
|
||||
#define SDSDIW624_COMBO_FW_NAME "sdsdiw624_combo.bin"
|
||||
#define SDIW624_DEFAULT_WLAN_FW_NAME "nxp/sdiw624_wlan.bin"
|
||||
#endif /* SDIW624 */
|
||||
|
||||
#define SDAW693_DEFAULT_COMBO_FW_NAME "nxp/sdsd_aw693.bin"
|
||||
#define SDUARTAW693_COMBO_FW_NAME "nxp/sduart_aw693.bin"
|
||||
|
|
|
@ -89,9 +89,9 @@ static moal_if_ops sdiommc_ops;
|
|||
/** Device ID for SD9177 */
|
||||
#define SD_DEVICE_ID_9177 (0x0205)
|
||||
#endif
|
||||
#ifdef SDIW62X
|
||||
/** Device ID for SDIW62X */
|
||||
#define SD_DEVICE_ID_IW62X (0x020D)
|
||||
#ifdef SDIW624
|
||||
/** Device ID for SDIW624 */
|
||||
#define SD_DEVICE_ID_IW624 (0x020D)
|
||||
#endif
|
||||
|
||||
/** WLAN IDs */
|
||||
|
@ -129,8 +129,8 @@ static const struct sdio_device_id wlan_ids[] = {
|
|||
#ifdef SD9177
|
||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_9177)},
|
||||
#endif
|
||||
#ifdef SDIW62X
|
||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_IW62X)},
|
||||
#ifdef SDIW624
|
||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_IW624)},
|
||||
#endif
|
||||
{},
|
||||
};
|
||||
|
@ -248,6 +248,7 @@ static void woal_sdio_interrupt(struct sdio_func *func)
|
|||
{
|
||||
moal_handle *handle;
|
||||
struct sdio_mmc_card *card;
|
||||
mlan_status status;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -269,7 +270,10 @@ static void woal_sdio_interrupt(struct sdio_func *func)
|
|||
PRINTM(MINTR, "*\n");
|
||||
|
||||
/* call mlan_interrupt to read int status */
|
||||
mlan_interrupt(0, handle->pmlan_adapter);
|
||||
status = mlan_interrupt(0, handle->pmlan_adapter);
|
||||
if (status == MLAN_STATUS_FAILURE) {
|
||||
PRINTM(MINTR, "mlan interrupt failed\n");
|
||||
}
|
||||
#ifdef SDIO_SUSPEND_RESUME
|
||||
if (handle->is_suspended) {
|
||||
PRINTM(MINTR, "Receive interrupt in hs_suspended\n");
|
||||
|
@ -279,7 +283,10 @@ static void woal_sdio_interrupt(struct sdio_func *func)
|
|||
#endif
|
||||
handle->main_state = MOAL_START_MAIN_PROCESS;
|
||||
/* Call MLAN main process */
|
||||
mlan_main_process(handle->pmlan_adapter);
|
||||
status = mlan_main_process(handle->pmlan_adapter);
|
||||
if (status == MLAN_STATUS_FAILURE) {
|
||||
PRINTM(MINTR, "mlan main process exited with failure\n");
|
||||
}
|
||||
handle->main_state = MOAL_END_MAIN_PROCESS;
|
||||
LEAVE();
|
||||
}
|
||||
|
@ -396,11 +403,11 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SDIW62X
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_IW62X) {
|
||||
card_type = CARD_TYPE_SDIW62X;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SDIW62X,
|
||||
strlen(CARD_SDIW62X), strlen(driver_version));
|
||||
#ifdef SDIW624
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_IW624) {
|
||||
card_type = CARD_TYPE_SDIW624;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SDIW624,
|
||||
strlen(CARD_SDIW624), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
|
@ -663,9 +670,12 @@ void woal_sdio_shutdown(struct device *dev)
|
|||
) {
|
||||
PRINTM(MIOCTL,
|
||||
"disconnect on suspend\n");
|
||||
woal_disconnect(handle->priv[i],
|
||||
MOAL_NO_WAIT, NULL,
|
||||
DEF_DEAUTH_REASON_CODE);
|
||||
if (woal_disconnect(
|
||||
handle->priv[i],
|
||||
MOAL_NO_WAIT, NULL,
|
||||
DEF_DEAUTH_REASON_CODE))
|
||||
PRINTM(MERROR,
|
||||
"failed to disconnect on suspend\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1578,17 +1588,17 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef SDIW62X
|
||||
if (IS_SDIW62X(handle->card_type)) {
|
||||
#ifdef SDIW624
|
||||
if (IS_SDIW624(handle->card_type)) {
|
||||
magic &= 0x03;
|
||||
if (magic == 0x03)
|
||||
PRINTM(MMSG, "wlan: SDIW62X in secure-boot mode\n");
|
||||
if (strap == CARD_TYPE_SD_UART)
|
||||
PRINTM(MMSG, "wlan: SDIW624 in secure-boot mode\n");
|
||||
if (strap == CARD_TYPE_SDIW624_UART)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUARTIW62X_COMBO_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
SDUARTIW624_COMBO_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDSDIW62X_COMBO_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
SDSDIW624_COMBO_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1660,6 +1670,9 @@ done:
|
|||
#define DEBUG_MEMDUMP_FINISH 0xFE
|
||||
#define MAX_POLL_TRIES 100
|
||||
|
||||
#define HOST_TO_CARD_EVENT_REG 0x00
|
||||
#define HOST_TO_CARD_EVENT MBIT(3)
|
||||
|
||||
typedef enum {
|
||||
DUMP_TYPE_ITCM = 0,
|
||||
DUMP_TYPE_DTCM = 1,
|
||||
|
@ -1712,10 +1725,12 @@ static memory_type_mapping mem_type_mapping_tbl_8977_8997 = {"DUMP", NULL, NULL,
|
|||
*
|
||||
* @param phandle A pointer to moal_handle
|
||||
* @param doneflag A flag
|
||||
* @param trigger trigger FW dump flag
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
||||
static rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag,
|
||||
t_u8 trigger)
|
||||
{
|
||||
int ret = 0;
|
||||
int tries = 0;
|
||||
|
@ -1734,6 +1749,16 @@ static rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
|||
PRINTM(MERROR, "SDIO Write ERR\n");
|
||||
return RDWR_STATUS_FAILURE;
|
||||
}
|
||||
if (trigger) {
|
||||
PRINTM(MMSG, "Trigger FW dump...\n");
|
||||
ret = woal_sdio_writeb(phandle, HOST_TO_CARD_EVENT_REG,
|
||||
HOST_TO_CARD_EVENT);
|
||||
if (ret) {
|
||||
PRINTM(MERROR, "Fail to set HOST_TO_CARD_EVENT_REG\n");
|
||||
return RDWR_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SD9177
|
||||
if (IS_SD9177(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump)
|
||||
|
@ -1797,6 +1822,9 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
{
|
||||
int ret = 0;
|
||||
unsigned int reg, reg_start, reg_end;
|
||||
#ifndef DUMP_TO_PROC
|
||||
t_u8 path_name[64], file_name[32];
|
||||
#endif
|
||||
t_u8 *ITCM_Ptr = NULL;
|
||||
t_u8 *DTCM_Ptr = NULL;
|
||||
t_u8 *SQRAM_Ptr = NULL;
|
||||
|
@ -1812,6 +1840,7 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
#ifdef DUMP_TO_PROC
|
||||
if (!phandle->fw_dump_buf) {
|
||||
ret = moal_vmalloc(phandle, FW_DUMP_INFO_LEN,
|
||||
&(phandle->fw_dump_buf));
|
||||
|
@ -1823,6 +1852,17 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
memset(phandle->fw_dump_buf, 0x00, FW_DUMP_INFO_LEN);
|
||||
}
|
||||
phandle->fw_dump_len = 0;
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directort*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strncpy(path_name, "/data", sizeof(path_name));
|
||||
#endif
|
||||
PRINTM(MMSG, "Directory name is %s\n", path_name);
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
|
||||
sdio_claim_host(((struct sdio_mmc_card *)phandle->card)->func);
|
||||
|
@ -1920,8 +1960,19 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
PRINTM(MMSG, "ITCM done: size=0x%x\n",
|
||||
dbg_ptr - ITCM_Ptr);
|
||||
#endif
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_save_dump_info_to_buf(phandle, ITCM_Ptr, ITCM_SIZE,
|
||||
FW_DUMP_TYPE_MEM_ITCM);
|
||||
#else
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
snprintf(file_name, sizeof(file_name), "%s",
|
||||
"file_sdio_ITCM");
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
ITCM_Ptr, ITCM_SIZE))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
#endif
|
||||
dbg_ptr = DTCM_Ptr;
|
||||
end_ptr = DTCM_Ptr + dtcm_size;
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
|
@ -1937,8 +1988,19 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
PRINTM(MMSG, "DTCM done: size=0x%x\n",
|
||||
dbg_ptr - DTCM_Ptr);
|
||||
#endif
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_save_dump_info_to_buf(phandle, ITCM_Ptr, dtcm_size,
|
||||
FW_DUMP_TYPE_MEM_DTCM);
|
||||
#else
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
snprintf(file_name, sizeof(file_name), "%s",
|
||||
"file_sdio_DTCM");
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
DTCM_Ptr, dtcm_size))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
#endif
|
||||
dbg_ptr = SQRAM_Ptr;
|
||||
end_ptr = SQRAM_Ptr + sqram_size;
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
|
@ -1954,9 +2016,20 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
PRINTM(MMSG, "SQRAM done: size=0x%x\n",
|
||||
dbg_ptr - SQRAM_Ptr);
|
||||
#endif
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_save_dump_info_to_buf(phandle, SQRAM_Ptr,
|
||||
sqram_size,
|
||||
FW_DUMP_TYPE_MEM_SQRAM);
|
||||
#else
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
snprintf(file_name, sizeof(file_name), "%s",
|
||||
"file_sdio_SQRAM");
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
SQRAM_Ptr, sqram_size))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
#endif
|
||||
PRINTM(MMSG, "End output!\n");
|
||||
break;
|
||||
default:
|
||||
|
@ -1964,7 +2037,9 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
}
|
||||
} while (ctrl_data != DEBUG_SQRAM_DONE);
|
||||
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_append_end_block(phandle);
|
||||
#endif
|
||||
PRINTM(MMSG,
|
||||
"The output ITCM/DTCM/SQRAM have been saved to files successfully!\n");
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
|
@ -2005,6 +2080,9 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
t_u8 i = 0;
|
||||
t_u8 read_reg = 0;
|
||||
t_u32 memory_size = 0;
|
||||
#ifndef DUMP_TO_PROC
|
||||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
#endif
|
||||
t_u8 *end_ptr = NULL;
|
||||
t_u8 dbg_dump_start_reg = 0;
|
||||
t_u8 dbg_dump_end_reg = 0;
|
||||
|
@ -2019,6 +2097,7 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
dbg_dump_end_reg = phandle->card_info->dump_fw_end_reg;
|
||||
dbg_dump_ctrl_reg = phandle->card_info->dump_fw_ctrl_reg;
|
||||
|
||||
#ifdef DUMP_TO_PROC
|
||||
if (!phandle->fw_dump_buf) {
|
||||
ret = moal_vmalloc(phandle, FW_DUMP_INFO_LEN,
|
||||
&(phandle->fw_dump_buf));
|
||||
|
@ -2030,12 +2109,25 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
memset(phandle->fw_dump_buf, 0x00, FW_DUMP_INFO_LEN);
|
||||
}
|
||||
phandle->fw_dump_len = 0;
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directort*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strncpy(path_name, "/data", sizeof(path_name));
|
||||
#endif
|
||||
PRINTM(MMSG, "Directory name is %s\n", path_name);
|
||||
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
#endif
|
||||
|
||||
/* start dump fw memory */
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "==== DEBUG MODE OUTPUT START: %u.%06u ====\n", sec, usec);
|
||||
/* read the number of the memories which will dump */
|
||||
if (RDWR_STATUS_FAILURE == woal_cmd52_rdwr_firmware(phandle, doneflag))
|
||||
if (RDWR_STATUS_FAILURE ==
|
||||
woal_cmd52_rdwr_firmware(phandle, doneflag, MTRUE))
|
||||
goto done;
|
||||
reg = dbg_dump_start_reg;
|
||||
ret = woal_sdio_readb(phandle, reg, &dump_num);
|
||||
|
@ -2047,7 +2139,7 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
/* read the length of every memory which will dump */
|
||||
for (idx = 0; idx < dump_num; idx++) {
|
||||
if (RDWR_STATUS_FAILURE ==
|
||||
woal_cmd52_rdwr_firmware(phandle, doneflag))
|
||||
woal_cmd52_rdwr_firmware(phandle, doneflag, MFALSE))
|
||||
goto done;
|
||||
memory_size = 0;
|
||||
reg = dbg_dump_start_reg;
|
||||
|
@ -2091,7 +2183,8 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
PRINTM(MMSG, "Start %s output %u.%06u, please wait...\n",
|
||||
mem_type_mapping_tbl[idx].mem_name, sec, usec);
|
||||
do {
|
||||
stat = woal_cmd52_rdwr_firmware(phandle, doneflag);
|
||||
stat = woal_cmd52_rdwr_firmware(phandle, doneflag,
|
||||
MFALSE);
|
||||
if (RDWR_STATUS_FAILURE == stat)
|
||||
goto done;
|
||||
reg_start = dbg_dump_start_reg;
|
||||
|
@ -2124,11 +2217,26 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
dbg_ptr - mem_type_mapping_tbl[idx]
|
||||
.mem_Ptr);
|
||||
#endif
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_save_dump_info_to_buf(
|
||||
phandle,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr,
|
||||
memory_size,
|
||||
mem_type_mapping_tbl[idx].type);
|
||||
#else
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
snprintf(file_name, sizeof(file_name), "%s%s",
|
||||
"file_sdio_",
|
||||
mem_type_mapping_tbl[idx].mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr,
|
||||
memory_size))
|
||||
PRINTM(MERROR,
|
||||
"Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
#endif
|
||||
moal_vfree(phandle,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr);
|
||||
mem_type_mapping_tbl[idx].mem_Ptr = NULL;
|
||||
|
@ -2136,10 +2244,20 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
}
|
||||
} while (1);
|
||||
}
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_append_end_block(phandle);
|
||||
#endif
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "==== DEBUG MODE OUTPUT END: %u.%06u ====\n", sec, usec);
|
||||
/* end dump fw memory */
|
||||
#ifndef DUMP_TO_PROC
|
||||
memset(firmware_dump_file, 0, sizeof(firmware_dump_file));
|
||||
snprintf(firmware_dump_file, sizeof(firmware_dump_file), "%s/%s",
|
||||
path_name, file_name);
|
||||
moal_memcpy_ext(phandle, phandle->firmware_dump_file,
|
||||
firmware_dump_file, sizeof(firmware_dump_file),
|
||||
sizeof(phandle->firmware_dump_file));
|
||||
#endif
|
||||
done:
|
||||
for (idx = 0; idx < dump_num; idx++) {
|
||||
if (mem_type_mapping_tbl[idx].mem_Ptr) {
|
||||
|
@ -2170,6 +2288,10 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
t_u8 doneflag = 0;
|
||||
rdwr_status stat;
|
||||
t_u32 memory_size = 0;
|
||||
#ifndef DUMP_TO_PROC
|
||||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
moal_handle *ref_handle;
|
||||
#endif
|
||||
t_u8 *end_ptr = NULL;
|
||||
t_u8 dbg_dump_start_reg = 0;
|
||||
t_u8 dbg_dump_end_reg = 0;
|
||||
|
@ -2184,7 +2306,8 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
if (IS_SD9177(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump) {
|
||||
if (RDWR_STATUS_FAILURE !=
|
||||
woal_cmd52_rdwr_firmware(phandle, doneflag)) {
|
||||
woal_cmd52_rdwr_firmware(phandle, doneflag,
|
||||
MTRUE)) {
|
||||
PRINTM(MMSG,
|
||||
"====SDIO FW DUMP EVENT MODE START ====\n");
|
||||
return;
|
||||
|
@ -2196,11 +2319,27 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
dbg_dump_start_reg = phandle->card_info->dump_fw_start_reg;
|
||||
dbg_dump_end_reg = phandle->card_info->dump_fw_end_reg;
|
||||
|
||||
#ifndef DUMP_TO_PROC
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directort*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strncpy(path_name, "/data", sizeof(path_name));
|
||||
#endif
|
||||
PRINTM(MMSG, "Directory name is %s\n", path_name);
|
||||
ref_handle = (moal_handle *)phandle->pref_mac;
|
||||
if (ref_handle)
|
||||
woal_dump_drv_info(ref_handle, path_name);
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
#endif
|
||||
|
||||
/* start dump fw memory */
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "==== DEBUG MODE OUTPUT START: %u.%06u ====\n", sec, usec);
|
||||
/* read the number of the memories which will dump */
|
||||
if (RDWR_STATUS_FAILURE == woal_cmd52_rdwr_firmware(phandle, doneflag))
|
||||
if (RDWR_STATUS_FAILURE ==
|
||||
woal_cmd52_rdwr_firmware(phandle, doneflag, MTRUE))
|
||||
goto done;
|
||||
|
||||
/** check the reg which indicate dump starting */
|
||||
|
@ -2238,7 +2377,7 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
PRINTM(MMSG, "Start %s output %u.%06u, please wait...\n",
|
||||
pmem_type_mapping_tbl->mem_name, sec, usec);
|
||||
do {
|
||||
stat = woal_cmd52_rdwr_firmware(phandle, doneflag);
|
||||
stat = woal_cmd52_rdwr_firmware(phandle, doneflag, MFALSE);
|
||||
if (RDWR_STATUS_FAILURE == stat)
|
||||
goto done;
|
||||
reg_start = dbg_dump_start_reg;
|
||||
|
@ -2294,6 +2433,7 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
dbg_ptr - pmem_type_mapping_tbl->mem_Ptr);
|
||||
|
||||
#endif
|
||||
#ifdef DUMP_TO_PROC
|
||||
if (phandle->fw_dump_buf) {
|
||||
moal_vfree(phandle, phandle->fw_dump_buf);
|
||||
phandle->fw_dump_buf = NULL;
|
||||
|
@ -2303,12 +2443,35 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
phandle->fw_dump_len =
|
||||
dbg_ptr - pmem_type_mapping_tbl->mem_Ptr;
|
||||
pmem_type_mapping_tbl->mem_Ptr = NULL;
|
||||
#else
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
snprintf(file_name, sizeof(file_name), "%s%s",
|
||||
"file_sdio_", pmem_type_mapping_tbl->mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
pmem_type_mapping_tbl->mem_Ptr,
|
||||
dbg_ptr - pmem_type_mapping_tbl->mem_Ptr))
|
||||
PRINTM(MERROR,
|
||||
"Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
moal_vfree(phandle, pmem_type_mapping_tbl->mem_Ptr);
|
||||
pmem_type_mapping_tbl->mem_Ptr = NULL;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
} while (1);
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "==== DEBUG MODE OUTPUT END: %u.%06u ====\n", sec, usec);
|
||||
/* end dump fw memory */
|
||||
#ifndef DUMP_TO_PROC
|
||||
memset(firmware_dump_file, 0, sizeof(firmware_dump_file));
|
||||
snprintf(firmware_dump_file, sizeof(firmware_dump_file), "%s/%s",
|
||||
path_name, file_name);
|
||||
moal_memcpy_ext(phandle, phandle->firmware_dump_file,
|
||||
firmware_dump_file, sizeof(firmware_dump_file),
|
||||
sizeof(phandle->firmware_dump_file));
|
||||
#endif
|
||||
done:
|
||||
if (pmem_type_mapping_tbl->mem_Ptr) {
|
||||
moal_vfree(phandle, pmem_type_mapping_tbl->mem_Ptr);
|
||||
|
@ -2408,10 +2571,12 @@ static void woal_sdiommc_dump_fw_info(moal_handle *phandle)
|
|||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
#ifdef DUMP_TO_PROC
|
||||
if (phandle->fw_dump_buf) {
|
||||
PRINTM(MERROR, "FW dump already exist\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
/** cancel all pending commands */
|
||||
mlan_ioctl(phandle->pmlan_adapter, NULL);
|
||||
|
||||
|
|
|
@ -1886,32 +1886,6 @@ done:
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
/**
|
||||
* @brief This function get binded net_device from station list
|
||||
*
|
||||
* @param priv Pointer to structure moal_private
|
||||
* @param aid station aid from mlan
|
||||
*
|
||||
* @return binded net_device pointer or NULL if not found
|
||||
*/
|
||||
struct net_device *moal_get_netdev_from_stalist(moal_private *priv, t_u16 aid)
|
||||
{
|
||||
station_node *sta_node = NULL;
|
||||
|
||||
ENTER();
|
||||
sta_node = priv->vlan_sta_list[(aid - 1) % MAX_STA_COUNT];
|
||||
if (sta_node) {
|
||||
LEAVE();
|
||||
return sta_node->netdev;
|
||||
}
|
||||
LEAVE();
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function uploads amsdu packet to the network stack
|
||||
*
|
||||
|
@ -2114,11 +2088,6 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
|
|||
int j;
|
||||
struct ethhdr *ethh = NULL;
|
||||
struct net_device *netdev = NULL;
|
||||
#ifdef UAP_SUPPORT
|
||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
t_u16 aid = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
if (pmbuf) {
|
||||
|
@ -2235,23 +2204,6 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
|
|||
priv->deauth_evt_cnt = 0;
|
||||
#endif
|
||||
}
|
||||
#ifdef UAP_SUPPORT
|
||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||
aid = (pmbuf->priority & 0xFF000000) >> 24;
|
||||
if (!priv->vlan_sta_list[(aid - 1) %
|
||||
MAX_STA_COUNT]
|
||||
->is_valid) {
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
priv->stats.rx_dropped++;
|
||||
goto done;
|
||||
}
|
||||
if (aid != 0)
|
||||
netdev = moal_get_netdev_from_stalist(
|
||||
priv, aid);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (!netdev)
|
||||
netdev = priv->netdev;
|
||||
skb->dev = netdev;
|
||||
|
@ -2561,6 +2513,88 @@ static void woal_rx_mgmt_pkt_event(moal_private *priv, t_u8 *pkt, t_u16 len)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function handles defer event receive
|
||||
*
|
||||
* @param handle Pointer to the moal_handle
|
||||
* @param event_id event id
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status wlan_process_defer_event(moal_handle *handle,
|
||||
mlan_event_id event_id)
|
||||
{
|
||||
mlan_status status = MLAN_STATUS_FAILURE;
|
||||
ENTER();
|
||||
switch (event_id) {
|
||||
#ifdef PCIE
|
||||
case MLAN_EVENT_ID_DRV_DEFER_RX_DATA:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
tasklet_schedule(&handle->pcie_rx_task);
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_DEFER_RX_EVENT:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
queue_work(handle->pcie_rx_event_workqueue,
|
||||
&handle->pcie_rx_event_work);
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_DEFER_CMDRESP:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
queue_work(handle->pcie_cmd_resp_workqueue,
|
||||
&handle->pcie_cmd_resp_work);
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_DEFER_TX_COMPLTE:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
tasklet_schedule(&handle->pcie_tx_complete_task);
|
||||
break;
|
||||
#endif /* PCIE */
|
||||
|
||||
case MLAN_EVENT_ID_DRV_FLUSH_RX_WORK:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
if (moal_extflg_isset(handle, EXT_NAPI)) {
|
||||
napi_synchronize(&handle->napi_rx);
|
||||
break;
|
||||
}
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(handle->card_type)) {
|
||||
tasklet_kill(&handle->pcie_rx_task);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#if defined(SDIO) || defined(USB)
|
||||
flush_workqueue(handle->rx_workqueue);
|
||||
#endif
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
flush_workqueue(handle->workqueue);
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_DEFER_HANDLING:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
queue_work(handle->workqueue, &handle->main_work);
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_DEFER_RX_WORK:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
if (moal_extflg_isset(handle, EXT_NAPI)) {
|
||||
napi_schedule(&handle->napi_rx);
|
||||
break;
|
||||
}
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(handle->card_type)) {
|
||||
tasklet_schedule(&handle->pcie_rx_task);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#if defined(USB) || defined(SDIO)
|
||||
queue_work(handle->rx_workqueue, &handle->rx_work);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles event receive
|
||||
*
|
||||
|
@ -2634,6 +2668,8 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
unsigned long wait_time, wait_time_ms, timeout;
|
||||
#endif
|
||||
#endif
|
||||
char iwevent_str[256];
|
||||
addba_timeout_event *evtbuf = NULL;
|
||||
|
||||
t_u8 auto_fw_dump = MFALSE;
|
||||
ENTER();
|
||||
|
@ -2651,16 +2687,23 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
ref_handle->driver_status = MTRUE;
|
||||
goto done;
|
||||
}
|
||||
if ((pmevent->event_id != MLAN_EVENT_ID_DRV_DEFER_RX_WORK) &&
|
||||
(pmevent->event_id != MLAN_EVENT_ID_DRV_DEFER_HANDLING) &&
|
||||
(pmevent->event_id != MLAN_EVENT_ID_DRV_MGMT_FRAME))
|
||||
if (MLAN_STATUS_SUCCESS ==
|
||||
wlan_process_defer_event(handle, pmevent->event_id))
|
||||
goto done;
|
||||
if (pmevent->event_id != MLAN_EVENT_ID_DRV_MGMT_FRAME)
|
||||
PRINTM(MEVENT, "event id:0x%x\n", pmevent->event_id);
|
||||
#if defined(PCIE)
|
||||
if (pmevent->event_id == MLAN_EVENT_ID_SSU_DUMP_FILE) {
|
||||
#ifndef DUMP_TO_PROC
|
||||
woal_store_ssu_dump(pmoal, pmevent);
|
||||
#endif
|
||||
goto done;
|
||||
}
|
||||
#endif /* SSU_SUPPORT */
|
||||
if (pmevent->event_id == MLAN_EVENT_ID_STORE_HOST_CMD_RESP) {
|
||||
#ifndef DUMP_TO_PROC
|
||||
woal_save_host_cmdresp(handle, (mlan_cmdresp_event *)pmevent);
|
||||
#endif
|
||||
goto done;
|
||||
}
|
||||
priv = woal_bss_index_to_priv(pmoal, pmevent->bss_index);
|
||||
|
@ -2998,6 +3041,9 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
*(t_s16 *)pmevent->event_buf,
|
||||
#endif
|
||||
GFP_KERNEL);
|
||||
woal_set_rssi_threshold(priv,
|
||||
MLAN_EVENT_ID_FW_BCN_RSSI_LOW,
|
||||
MOAL_NO_WAIT);
|
||||
priv->last_event |= EVENT_BCN_RSSI_LOW;
|
||||
#endif
|
||||
if (!hw_test && priv->roaming_enabled)
|
||||
|
@ -3212,28 +3258,6 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
woal_broadcast_event(priv, CUS_EVT_WEP_ICV_ERR,
|
||||
strlen(CUS_EVT_WEP_ICV_ERR));
|
||||
break;
|
||||
|
||||
case MLAN_EVENT_ID_DRV_DEFER_HANDLING:
|
||||
queue_work(priv->phandle->workqueue, &priv->phandle->main_work);
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_FLUSH_RX_WORK:
|
||||
if (moal_extflg_isset(priv->phandle, EXT_NAPI)) {
|
||||
napi_synchronize(&priv->phandle->napi_rx);
|
||||
break;
|
||||
}
|
||||
flush_workqueue(priv->phandle->rx_workqueue);
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK:
|
||||
flush_workqueue(priv->phandle->workqueue);
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_DEFER_RX_WORK:
|
||||
if (moal_extflg_isset(priv->phandle, EXT_NAPI)) {
|
||||
napi_schedule(&priv->phandle->napi_rx);
|
||||
break;
|
||||
}
|
||||
queue_work(priv->phandle->rx_workqueue,
|
||||
&priv->phandle->rx_work);
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_DBG_DUMP:
|
||||
priv->phandle->driver_status = MTRUE;
|
||||
ref_handle = (moal_handle *)priv->phandle->pref_mac;
|
||||
|
@ -3626,14 +3650,21 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
}
|
||||
#endif
|
||||
#endif
|
||||
if (priv->channel == pchan_info->channel)
|
||||
/* Block host event only for same channel, same
|
||||
* bandwidth case */
|
||||
if ((priv->channel == pchan_info->channel) &&
|
||||
(priv->bandwidth == pchan_info->bandcfg.chanWidth))
|
||||
break;
|
||||
PRINTM(MMSG, "OLD BW = %d NEW BW = %d", priv->bandwidth,
|
||||
pchan_info->bandcfg.chanWidth);
|
||||
|
||||
#ifdef UAP_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
woal_update_uap_channel_dfs_state(priv);
|
||||
#endif
|
||||
#endif
|
||||
priv->channel = pchan_info->channel;
|
||||
priv->bandwidth = pchan_info->bandcfg.chanWidth;
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
if (MFALSE
|
||||
|
@ -3717,7 +3748,8 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
#endif
|
||||
memset(&pm_info, 0, sizeof(mlan_ds_ps_info));
|
||||
if (priv->phandle->suspend_fail == MFALSE) {
|
||||
woal_get_pm_info(priv, &pm_info);
|
||||
if (woal_get_pm_info(priv, &pm_info))
|
||||
PRINTM(MEVENT, "get pm info failed\n");
|
||||
if (pm_info.is_suspend_allowed == MTRUE) {
|
||||
priv->phandle->hs_activated = MTRUE;
|
||||
#ifdef MMC_PM_FUNC_SUSPENDED
|
||||
|
@ -3790,6 +3822,9 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
|
||||
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0,
|
||||
0);
|
||||
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && IMX_ANDROID_13))
|
||||
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0,
|
||||
0);
|
||||
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || \
|
||||
IMX_ANDROID_13 || IMX_ANDROID_12_BACKPORT)
|
||||
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0);
|
||||
|
@ -3805,7 +3840,11 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
case MLAN_EVENT_ID_DRV_UAP_CHAN_INFO:
|
||||
#ifdef UAP_CFG80211
|
||||
if (IS_UAP_CFG80211(cfg80211_wext)) {
|
||||
struct cfg80211_chan_def chandef;
|
||||
pchan_info = (chan_band_info *)pmevent->event_buf;
|
||||
if (woal_chandef_create(priv, &chandef, pchan_info))
|
||||
PRINTM(MERROR,
|
||||
"Failed to create cfg80211_chan_def structure\n");
|
||||
PRINTM(MEVENT,
|
||||
"UAP: 11n=%d, chan=%d, center_chan=%d, band=%d, width=%d, 2Offset=%d\n",
|
||||
pchan_info->is_11n_enabled, pchan_info->channel,
|
||||
|
@ -3814,7 +3853,9 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
pchan_info->bandcfg.chanWidth,
|
||||
pchan_info->bandcfg.chan2Offset);
|
||||
if (priv->uap_host_based &&
|
||||
(priv->channel != pchan_info->channel))
|
||||
((priv->chan.chan->hw_value !=
|
||||
pchan_info->channel) ||
|
||||
(priv->chan.width != chandef.width)))
|
||||
woal_channel_switch_event(priv, pchan_info);
|
||||
}
|
||||
#endif
|
||||
|
@ -3956,7 +3997,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
memset(&wrqu, 0, sizeof(union iwreq_data));
|
||||
wrqu.data.pointer = (t_u8 __user *)pmevent->event_buf;
|
||||
if ((pmevent->event_len +
|
||||
strlen(CUS_EVT_STA_CONNECTED) + 1) > IW_CUSTOM_MAX)
|
||||
strlen(CUS_EVT_STA_CONNECTED) + 1) > 256)
|
||||
wrqu.data.length =
|
||||
ETH_ALEN +
|
||||
strlen(CUS_EVT_STA_CONNECTED) + 1;
|
||||
|
@ -4565,6 +4606,25 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
woal_cfg80211_event_rtt_result(priv, pmevent->event_buf,
|
||||
pmevent->event_len);
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_ADDBA_TIMEOUT:
|
||||
evtbuf = (addba_timeout_event *)(pmevent->event_buf);
|
||||
DBG_HEXDUMP(MEVT_D, "ADDBA_TIMEOUT", pmevent->event_buf,
|
||||
pmevent->event_len);
|
||||
memset(iwevent_str, 0, sizeof(iwevent_str));
|
||||
snprintf(iwevent_str, sizeof(iwevent_str),
|
||||
"%s, MAC:%02x%02x%02x%02x%02x%02x,TID=%u",
|
||||
CUS_EVT_ADDBA_TIMEOUT, evtbuf->peer_mac_addr[0],
|
||||
evtbuf->peer_mac_addr[1], evtbuf->peer_mac_addr[2],
|
||||
evtbuf->peer_mac_addr[3], evtbuf->peer_mac_addr[4],
|
||||
evtbuf->peer_mac_addr[5], evtbuf->tid);
|
||||
#if defined(STA_SUPPORT) || defined(UAP_SUPPORT)
|
||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||
if (IS_STA_OR_UAP_WEXT(cfg80211_wext)) {
|
||||
woal_send_iwevcustom_event(priv, iwevent_str);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
case MLAN_EVENT_ID_CSI:
|
||||
|
@ -4765,63 +4825,3 @@ t_u64 moal_do_div(t_u64 num, t_u32 base)
|
|||
do_div(val, base);
|
||||
return val;
|
||||
}
|
||||
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
/**
|
||||
* @brief Performs wait event
|
||||
*
|
||||
* @param pmoal t_void
|
||||
* @param bss_index index of priv
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status moal_wait_hostcmd_complete(t_void *pmoal, t_u32 bss_index)
|
||||
{
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
moal_handle *handle = (moal_handle *)pmoal;
|
||||
moal_private *priv = woal_bss_index_to_priv(handle, bss_index);
|
||||
long time_left = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!priv) {
|
||||
PRINTM(MERROR, "moal_wait_event: priv is null!\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
priv->hostcmd_wait_condition = MFALSE;
|
||||
time_left = wait_event_timeout(priv->hostcmd_wait_q,
|
||||
priv->hostcmd_wait_condition,
|
||||
MOAL_IOCTL_TIMEOUT);
|
||||
|
||||
if (!time_left) {
|
||||
PRINTM(MERROR, "moal_wait_event: wait timeout ");
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief wake up esa wait_q
|
||||
*
|
||||
* @param pmoal t_void
|
||||
* @param bss_index index of priv
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status moal_notify_hostcmd_complete(t_void *pmoal, t_u32 bss_index)
|
||||
{
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
moal_handle *handle = (moal_handle *)pmoal;
|
||||
moal_private *priv = woal_bss_index_to_priv(handle, bss_index);
|
||||
|
||||
ENTER();
|
||||
|
||||
priv->hostcmd_wait_condition = MTRUE;
|
||||
wake_up(&priv->hostcmd_wait_q);
|
||||
|
||||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -95,10 +95,6 @@ mlan_status moal_init_lock(t_void *pmoal, t_void **pplock);
|
|||
mlan_status moal_free_lock(t_void *pmoal, t_void *plock);
|
||||
mlan_status moal_spin_lock(t_void *pmoal, t_void *plock);
|
||||
mlan_status moal_spin_unlock(t_void *pmoal, t_void *plock);
|
||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||
mlan_status moal_wait_hostcmd_complete(t_void *pmoal, t_u32 bss_index);
|
||||
mlan_status moal_notify_hostcmd_complete(t_void *pmoal, t_u32 bss_index);
|
||||
#endif
|
||||
t_void moal_print(t_void *pmoal, t_u32 level, char *pformat, IN...);
|
||||
t_void moal_print_netintf(t_void *pmoal, t_u32 bss_index, t_u32 level);
|
||||
t_void moal_assert(t_void *pmoal, t_u32 cond);
|
||||
|
|
|
@ -908,9 +908,6 @@ static int woal_cfg80211_assoc_ies_cfg(moal_private *priv, t_u8 *ie,
|
|||
t_u8 wps_oui[] = {0x00, 0x50, 0xf2, 0x04};
|
||||
t_u8 hs20_oui[] = {0x50, 0x6f, 0x9a, 0x10};
|
||||
|
||||
t_u8 multiap_oui[] = {0x50, 0x6f, 0x9a, 0x1b};
|
||||
t_u8 multiap_flag = 0;
|
||||
|
||||
while (bytes_left >= 2) {
|
||||
element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr));
|
||||
element_len = *((t_u8 *)pcurrent_ptr + 1);
|
||||
|
@ -948,21 +945,6 @@ static int woal_cfg80211_assoc_ies_cfg(moal_private *priv, t_u8 *ie,
|
|||
}
|
||||
}
|
||||
|
||||
if (!memcmp(pvendor_ie->vend_hdr.oui, multiap_oui,
|
||||
sizeof(pvendor_ie->vend_hdr.oui)) &&
|
||||
(pvendor_ie->vend_hdr.oui_type == multiap_oui[3])) {
|
||||
multiap_flag = pvendor_ie->data[0];
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_multi_ap_cfg(priv, wait_option,
|
||||
multiap_flag)) {
|
||||
PRINTM(MERROR,
|
||||
"%s: failed to configure multi ap\n",
|
||||
__func__);
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (!memcmp(pvendor_ie->vend_hdr.oui, hs20_oui,
|
||||
sizeof(pvendor_ie->vend_hdr.oui)) &&
|
||||
(pvendor_ie->vend_hdr.oui_type == hs20_oui[3])) {
|
||||
|
@ -1293,6 +1275,11 @@ static mlan_status woal_send_domain_info_cmd_fw(moal_private *priv,
|
|||
PRINTM(MCMND, "CFG80211: Country=%c%c, band=%d, no_of_sub_band=%d\n",
|
||||
priv->phandle->country_code[0], priv->phandle->country_code[1],
|
||||
priv->phandle->band, cfg_11d->param.domain_info.no_of_sub_band);
|
||||
|
||||
/* skip download the command to FW when “no_of_sub_band = 0” */
|
||||
if (!no_of_sub_band)
|
||||
goto done;
|
||||
|
||||
/* Send domain info command to FW */
|
||||
status = woal_request_ioctl(priv, req, wait_option);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
|
@ -2239,7 +2226,7 @@ static int woal_cfg80211_authenticate(struct wiphy *wiphy,
|
|||
woal_cfg80211_auth_scan(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_find_bssid(priv, req->bss->bssid)) {
|
||||
PRINTM(MMSG, "bssid not find in scan list\n");
|
||||
PRINTM(MMSG, "bssid not found in scan list\n");
|
||||
kfree(ssid_bssid);
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
|
@ -2762,6 +2749,8 @@ static int woal_cfg80211_associate(struct wiphy *wiphy, struct net_device *dev,
|
|||
|
||||
ENTER();
|
||||
|
||||
priv->cfg_disconnect = MFALSE;
|
||||
|
||||
ssid_bssid = kmalloc(sizeof(mlan_ssid_bssid), GFP_KERNEL);
|
||||
if (!ssid_bssid) {
|
||||
LEAVE();
|
||||
|
@ -3925,6 +3914,16 @@ static int woal_update_custom_regdomain(moal_private *priv, struct wiphy *wiphy)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
memset(country_code, 0, sizeof(country_code));
|
||||
if (MTRUE ==
|
||||
is_cfg80211_special_region_code(priv->phandle->country_code)) {
|
||||
country_code[0] = 'W';
|
||||
country_code[1] = 'W';
|
||||
} else {
|
||||
country_code[0] = priv->phandle->country_code[0];
|
||||
country_code[1] = priv->phandle->country_code[1];
|
||||
}
|
||||
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (req == NULL) {
|
||||
ret = -EFAULT;
|
||||
|
@ -3936,20 +3935,15 @@ static int woal_update_custom_regdomain(moal_private *priv, struct wiphy *wiphy)
|
|||
req->action = MLAN_ACT_GET;
|
||||
memset(&misc->param.custom_reg_domain, 0,
|
||||
sizeof(misc->param.custom_reg_domain));
|
||||
|
||||
misc->param.custom_reg_domain.region.country_code[0] = country_code[0];
|
||||
misc->param.custom_reg_domain.region.country_code[1] = country_code[1];
|
||||
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
memset(country_code, 0, sizeof(country_code));
|
||||
if (MTRUE ==
|
||||
is_cfg80211_special_region_code(priv->phandle->country_code)) {
|
||||
country_code[0] = 'W';
|
||||
country_code[1] = 'W';
|
||||
} else {
|
||||
country_code[0] = priv->phandle->country_code[0];
|
||||
country_code[1] = priv->phandle->country_code[1];
|
||||
}
|
||||
if (misc->param.custom_reg_domain.region.country_code[0] == '\0' ||
|
||||
misc->param.custom_reg_domain.region.country_code[1] == '\0') {
|
||||
PRINTM(MCMND, "FW country code not valid\n");
|
||||
|
@ -4186,191 +4180,6 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef UAP_CFG80211
|
||||
/**
|
||||
* @brief Swithces BSS role of interface
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param wait_option Wait option (MOAL_WAIT or MOAL_NO_WAIT)
|
||||
* @param bss_role bss role
|
||||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static mlan_status woal_role_switch(moal_private *priv, t_u8 wait_option,
|
||||
t_u8 bss_role)
|
||||
{
|
||||
int ret = 0;
|
||||
mlan_ds_bss *bss = NULL;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss));
|
||||
if (req == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
bss = (mlan_ds_bss *)req->pbuf;
|
||||
bss->sub_command = MLAN_OID_BSS_ROLE;
|
||||
req->req_id = MLAN_IOCTL_BSS;
|
||||
req->action = MLAN_ACT_SET;
|
||||
bss->param.bss_role = bss_role;
|
||||
|
||||
status = woal_request_ioctl(priv, req, wait_option);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief set/get bandcfg
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param action get or set action
|
||||
* @param band_cfg A pointer to mlan_ds_band_cfg structure
|
||||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
static int woal_setget_bandcfg(moal_private *priv, t_u8 action,
|
||||
mlan_ds_band_cfg *band_cfg)
|
||||
{
|
||||
int ret = 0;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_radio_cfg *radio_cfg = NULL;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg));
|
||||
if (req == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
radio_cfg = (mlan_ds_radio_cfg *)req->pbuf;
|
||||
radio_cfg->sub_command = MLAN_OID_BAND_CFG;
|
||||
req->req_id = MLAN_IOCTL_RADIO_CFG;
|
||||
req->action = action;
|
||||
|
||||
if (req->action == MLAN_ACT_SET)
|
||||
moal_memcpy_ext(priv->phandle, &radio_cfg->param.band_cfg,
|
||||
band_cfg, sizeof(mlan_ds_band_cfg),
|
||||
sizeof(radio_cfg->param.band_cfg));
|
||||
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto error;
|
||||
}
|
||||
moal_memcpy_ext(priv->phandle, band_cfg, &radio_cfg->param.band_cfg,
|
||||
sizeof(mlan_ds_band_cfg), sizeof(mlan_ds_band_cfg));
|
||||
error:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief request scan
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param scan_cfg A pointer to wlan_user_scan_cfg structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS -- success, otherwise fail
|
||||
*/
|
||||
static mlan_status woal_uap_scan(moal_private *priv,
|
||||
wlan_user_scan_cfg *scan_cfg)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
moal_handle *handle = priv->phandle;
|
||||
moal_private *tmp_priv;
|
||||
u8 role;
|
||||
mlan_ds_band_cfg org_bandcfg;
|
||||
mlan_ds_band_cfg bandcfg;
|
||||
u8 band_change = MFALSE;
|
||||
ENTER();
|
||||
memset(&org_bandcfg, 0, sizeof(mlan_ds_band_cfg));
|
||||
memset(&bandcfg, 0, sizeof(mlan_ds_band_cfg));
|
||||
|
||||
if (priv->bss_index > 0)
|
||||
tmp_priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY);
|
||||
else
|
||||
tmp_priv = priv;
|
||||
if (!tmp_priv) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
role = GET_BSS_ROLE(tmp_priv);
|
||||
if (role == MLAN_BSS_ROLE_UAP) {
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_role_switch(tmp_priv, MOAL_IOCTL_WAIT,
|
||||
MLAN_BSS_ROLE_STA)) {
|
||||
PRINTM(MERROR, "role switch from uap to sta fail\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
if (tmp_priv != priv) {
|
||||
if (woal_setget_bandcfg(priv, MLAN_ACT_GET, &bandcfg)) {
|
||||
PRINTM(MERROR, "get bandcfg fail\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
if (woal_setget_bandcfg(tmp_priv, MLAN_ACT_GET, &org_bandcfg)) {
|
||||
PRINTM(MERROR, "get bandcfg fail\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
if (bandcfg.config_bands != org_bandcfg.config_bands) {
|
||||
if (woal_setget_bandcfg(tmp_priv, MLAN_ACT_SET,
|
||||
&bandcfg)) {
|
||||
PRINTM(MERROR, "set bandcfg fail\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
band_change = MTRUE;
|
||||
}
|
||||
}
|
||||
#ifdef REASSOCIATION
|
||||
if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->reassoc_sem)) {
|
||||
PRINTM(MERROR, "Acquire semaphore error, woal_do_combo_scan\n");
|
||||
goto done;
|
||||
}
|
||||
#endif /* REASSOCIATION */
|
||||
tmp_priv->report_scan_result = MTRUE;
|
||||
ret = woal_request_userscan(tmp_priv, MOAL_IOCTL_WAIT, scan_cfg);
|
||||
woal_sched_timeout(5);
|
||||
#ifdef REASSOCIATION
|
||||
MOAL_REL_SEMAPHORE(&handle->reassoc_sem);
|
||||
#endif
|
||||
done:
|
||||
if (role == MLAN_BSS_ROLE_UAP) {
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_role_switch(tmp_priv, MOAL_IOCTL_WAIT,
|
||||
MLAN_BSS_ROLE_UAP)) {
|
||||
PRINTM(MERROR, "role switch back to uap fail\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
if (band_change) {
|
||||
if (woal_setget_bandcfg(tmp_priv, MLAN_ACT_SET, &org_bandcfg)) {
|
||||
PRINTM(MERROR, "restore bandcfg fail\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int woal_find_wps_ie_in_probereq(const t_u8 *ie, size_t len)
|
||||
{
|
||||
int left_len = len;
|
||||
|
@ -4467,6 +4276,48 @@ t_u8 wlan_check_scan_table_ageout(moal_private *priv)
|
|||
LEAVE();
|
||||
return MTRUE;
|
||||
}
|
||||
/**
|
||||
* @brief This function check if scan is allowed on specified band
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param chan ieee80211_channel
|
||||
*
|
||||
* @return MTRUE/MFALSE
|
||||
*/
|
||||
static t_u8 is_scan_band_allowed(moal_private *priv,
|
||||
struct ieee80211_channel *chan)
|
||||
{
|
||||
t_u8 ret = MTRUE;
|
||||
t_u8 band_mask = 0;
|
||||
|
||||
ENTER();
|
||||
if (!priv->scan_setband_mask) {
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
switch (chan->band) {
|
||||
case IEEE80211_BAND_5GHZ:
|
||||
band_mask = SCAN_SETBAND_5G;
|
||||
break;
|
||||
case IEEE80211_BAND_2GHZ:
|
||||
band_mask = SCAN_SETBAND_2G;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (band_mask & priv->scan_setband_mask) {
|
||||
ret = MTRUE;
|
||||
} else {
|
||||
PRINTM(MINFO, "is_scan_band_allowed: Avoid scan on band %d\n",
|
||||
chan->band);
|
||||
ret = MFALSE;
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||
/**
|
||||
|
@ -4510,7 +4361,7 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
|
|||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
|
||||
t_u8 buf[ETH_ALEN];
|
||||
#endif
|
||||
int ret = 0, i;
|
||||
int ret = 0, i, num_chans;
|
||||
unsigned long flags;
|
||||
|
||||
ENTER();
|
||||
|
@ -4646,66 +4497,76 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
|
|||
}
|
||||
#endif
|
||||
#endif
|
||||
for (i = 0; i < (int)MIN(WLAN_USER_SCAN_CHAN_MAX,
|
||||
priv->phandle->scan_request->n_channels);
|
||||
if (priv->scan_setband_mask) {
|
||||
PRINTM(MCMD_D,
|
||||
"cfg80211_scan: scan_setband mask is set to %d\n",
|
||||
priv->scan_setband_mask);
|
||||
}
|
||||
for (i = 0, num_chans = 0;
|
||||
i < (int)MIN(WLAN_USER_SCAN_CHAN_MAX,
|
||||
priv->phandle->scan_request->n_channels);
|
||||
i++) {
|
||||
chan = priv->phandle->scan_request->channels[i];
|
||||
scan_req->chan_list[i].chan_number = chan->hw_value;
|
||||
scan_req->chan_list[i].radio_type =
|
||||
if (MFALSE == is_scan_band_allowed(priv, chan))
|
||||
continue;
|
||||
scan_req->chan_list[num_chans].chan_number = chan->hw_value;
|
||||
scan_req->chan_list[num_chans].radio_type =
|
||||
woal_ieee_band_to_radio_type(chan->band);
|
||||
if ((chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) ||
|
||||
!priv->phandle->scan_request->n_ssids)
|
||||
scan_req->chan_list[i].scan_type =
|
||||
scan_req->chan_list[num_chans].scan_type =
|
||||
MLAN_SCAN_TYPE_PASSIVE;
|
||||
else if (chan->flags & IEEE80211_CHAN_RADAR)
|
||||
scan_req->chan_list[i].scan_type =
|
||||
scan_req->chan_list[num_chans].scan_type =
|
||||
MLAN_SCAN_TYPE_PASSIVE_TO_ACTIVE;
|
||||
else
|
||||
scan_req->chan_list[i].scan_type =
|
||||
scan_req->chan_list[num_chans].scan_type =
|
||||
MLAN_SCAN_TYPE_ACTIVE;
|
||||
PRINTM(MCMD_D, "cfg80211_scan: chan=%d chan->flag=0x%x\n",
|
||||
chan->hw_value, chan->flags);
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
|
||||
scan_req->chan_list[i].scan_time =
|
||||
scan_req->chan_list[num_chans].scan_time =
|
||||
priv->phandle->scan_request->duration;
|
||||
#else
|
||||
scan_req->chan_list[i].scan_time = 0;
|
||||
scan_req->chan_list[num_chans].scan_time = 0;
|
||||
#endif
|
||||
#if defined(WIFI_DIRECT_SUPPORT)
|
||||
#if CFG80211_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT &&
|
||||
priv->phandle->scan_request->n_ssids) {
|
||||
if (!memcmp(scan_req->ssid_list[0].ssid, "DIRECT-", 7))
|
||||
scan_req->chan_list[i].scan_time =
|
||||
scan_req->chan_list[num_chans].scan_time =
|
||||
MIN_SPECIFIC_SCAN_CHAN_TIME;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
if (priv->phandle->miracast_mode)
|
||||
scan_req->chan_list[i].scan_time =
|
||||
scan_req->chan_list[num_chans].scan_time =
|
||||
priv->phandle->miracast_scan_time;
|
||||
else if (woal_is_any_interface_active(priv->phandle)) {
|
||||
if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN)
|
||||
scan_req->chan_list[i].scan_time =
|
||||
scan_req->chan_list[num_chans].scan_time =
|
||||
INIT_PASSIVE_SCAN_CHAN_TIME;
|
||||
else
|
||||
scan_req->chan_list[i].scan_time = MIN(
|
||||
scan_req->chan_list[num_chans].scan_time = MIN(
|
||||
MIN_SPECIFIC_SCAN_CHAN_TIME,
|
||||
scan_cfg.scan_time.specific_scan_time);
|
||||
}
|
||||
#endif
|
||||
#ifdef UAP_CFG80211
|
||||
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) {
|
||||
scan_req->scan_chan_gap = 0;
|
||||
if (!woal_is_uap_scan_result_expired(priv))
|
||||
scan_req->chan_list[i].scan_time =
|
||||
scan_req->chan_list[num_chans].scan_time =
|
||||
MIN_SPECIFIC_SCAN_CHAN_TIME;
|
||||
|
||||
else
|
||||
scan_req->chan_list[i].scan_time =
|
||||
scan_req->chan_list[num_chans].scan_time =
|
||||
PASSIVE_SCAN_CHAN_TIME;
|
||||
}
|
||||
#endif
|
||||
num_chans++;
|
||||
}
|
||||
if (priv->phandle->scan_request->ie &&
|
||||
priv->phandle->scan_request->ie_len) {
|
||||
|
@ -4740,20 +4601,6 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef UAP_CFG80211
|
||||
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) {
|
||||
/** use sync scan for uap */
|
||||
ret = woal_uap_scan(priv, scan_req);
|
||||
if (!ret) {
|
||||
kfree(scan_req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
} else {
|
||||
PRINTM(MERROR, "Uap SCAN failure\n");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
|
||||
if (request->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
|
||||
PRINTM(MIOCTL, "NL80211_SCAN_FLAG_RANDOM_ADDR is set\n");
|
||||
|
@ -5487,6 +5334,7 @@ static int woal_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev,
|
|||
t_u16 reason_code)
|
||||
{
|
||||
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
PRINTM(MMSG,
|
||||
|
@ -5535,6 +5383,15 @@ static int woal_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (priv->phandle->remain_on_channel) {
|
||||
if (woal_cfg80211_remain_on_channel_cfg(priv, MOAL_IOCTL_WAIT,
|
||||
MTRUE, (t_u8 *)&status,
|
||||
NULL, 0, 0)) {
|
||||
PRINTM(MERROR, "Fail to cancel remain on channel\n");
|
||||
}
|
||||
priv->phandle->remain_on_channel = MFALSE;
|
||||
}
|
||||
|
||||
/** cancel pending scan */
|
||||
woal_cancel_scan(priv, MOAL_IOCTL_WAIT);
|
||||
priv->cfg_disconnect = MTRUE;
|
||||
|
@ -6081,6 +5938,7 @@ static int woal_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy,
|
|||
priv->cqm_rssi_thold = rssi_thold;
|
||||
priv->cqm_rssi_high_thold = rssi_thold;
|
||||
priv->cqm_rssi_hyst = rssi_hyst;
|
||||
priv->mrvl_rssi_low = 0;
|
||||
|
||||
PRINTM(MIOCTL, "rssi_thold=%d rssi_hyst=%d\n", (int)rssi_thold,
|
||||
(int)rssi_hyst);
|
||||
|
@ -6814,8 +6672,7 @@ int woal_cfg80211_resume(struct wiphy *wiphy)
|
|||
|
||||
done:
|
||||
handle->cfg80211_suspend = MFALSE;
|
||||
queue_work(handle->rx_workqueue, &handle->rx_work);
|
||||
|
||||
woal_queue_rx_task(handle);
|
||||
PRINTM(MCMND, "<--- Leave woal_cfg80211_resume --->\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -6912,7 +6769,9 @@ int woal_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow)
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (!priv || !priv->media_connected) {
|
||||
if ((!priv || ((priv->bss_role == MLAN_BSS_ROLE_STA) &&
|
||||
!priv->media_connected)) ||
|
||||
((priv->bss_role == MLAN_BSS_ROLE_UAP) && !priv->bss_started)) {
|
||||
PRINTM(MERROR,
|
||||
"Can not configure WOWLAN in disconnected state\n");
|
||||
ret = 0;
|
||||
|
@ -8614,41 +8473,8 @@ static int woal_cfg80211_change_station(struct wiphy *wiphy,
|
|||
struct station_parameters *params)
|
||||
{
|
||||
int ret = 0;
|
||||
#ifdef UAP_SUPPORT
|
||||
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
moal_private *vlan_priv = NULL;
|
||||
station_node *sta_node = NULL;
|
||||
int i = 0;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Bind the station to uap virtual interface and
|
||||
save the station info in moal_private */
|
||||
if (params->vlan) {
|
||||
if (params->vlan->ieee80211_ptr &&
|
||||
params->vlan->ieee80211_ptr->iftype ==
|
||||
NL80211_IFTYPE_AP_VLAN) {
|
||||
vlan_priv = (moal_private *)woal_get_netdev_priv(
|
||||
params->vlan);
|
||||
for (i = 0; i < MAX_STA_COUNT; i++) {
|
||||
sta_node = priv->vlan_sta_list[i];
|
||||
if (sta_node &&
|
||||
!moal_memcmp(priv->phandle,
|
||||
sta_node->peer_mac, mac,
|
||||
MLAN_MAC_ADDR_LENGTH)) {
|
||||
PRINTM(MCMND,
|
||||
"wlan: Easymesh change station aid=%d\n",
|
||||
sta_node->aid);
|
||||
sta_node->netdev = params->vlan;
|
||||
sta_node->is_valid = MTRUE;
|
||||
vlan_priv->vlan_sta_ptr = sta_node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/**do nothing*/
|
||||
|
||||
LEAVE();
|
||||
|
@ -8679,29 +8505,12 @@ static int woal_cfg80211_add_station(struct wiphy *wiphy,
|
|||
{
|
||||
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
int ret = 0;
|
||||
station_node *sta_node = NULL;
|
||||
|
||||
ENTER();
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
#ifdef UAP_SUPPORT
|
||||
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME) &&
|
||||
(priv->bss_role == MLAN_BSS_ROLE_UAP)) {
|
||||
sta_node = kmalloc(sizeof(station_node), GFP_KERNEL);
|
||||
if (!sta_node) {
|
||||
PRINTM(MERROR,
|
||||
"Failed to alloc memory for station node\n");
|
||||
LEAVE();
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(sta_node, 0, sizeof(*sta_node));
|
||||
moal_memcpy_ext(priv->phandle, sta_node->peer_mac, mac,
|
||||
MLAN_MAC_ADDR_LENGTH, ETH_ALEN);
|
||||
sta_node->netdev = dev;
|
||||
sta_node->aid = params->aid;
|
||||
sta_node->is_valid = MFALSE;
|
||||
/** AID should start from 1 to MAX_STA_COUNT */
|
||||
priv->vlan_sta_list[(params->aid - 1) % MAX_STA_COUNT] =
|
||||
sta_node;
|
||||
ret = woal_cfg80211_uap_add_station(wiphy, dev, (u8 *)mac,
|
||||
params);
|
||||
LEAVE();
|
||||
|
@ -9021,7 +8830,8 @@ static int woal_update_okc_roaming_ie(moal_private *priv,
|
|||
}
|
||||
|
||||
if (!priv->okc_roaming_ie) {
|
||||
int okc_ie_len = sme->ie_len + sizeof(t_u16) + PMKID_LEN;
|
||||
int okc_ie_len =
|
||||
MIN(INT_MAX, sme->ie_len + sizeof(t_u16) + PMKID_LEN);
|
||||
|
||||
/** Alloc new buffer for okc roaming ie */
|
||||
priv->okc_roaming_ie = kzalloc(okc_ie_len, GFP_KERNEL);
|
||||
|
@ -9927,7 +9737,7 @@ static mlan_status woal_cfg80211_init_wiphy(moal_private *priv,
|
|||
#endif
|
||||
if (IS_CARD9098(priv->phandle->card_type) ||
|
||||
IS_CARD9097(priv->phandle->card_type) ||
|
||||
IS_CARDIW62X(priv->phandle->card_type)) {
|
||||
IS_CARDIW624(priv->phandle->card_type)) {
|
||||
woal_cfg80211_notify_antcfg(priv, wiphy, radio);
|
||||
}
|
||||
wiphy->available_antennas_tx = radio->param.ant_cfg.tx_antenna;
|
||||
|
@ -10107,9 +9917,8 @@ mlan_status woal_register_cfg80211(moal_private *priv)
|
|||
wiphy->max_scan_ssids = MRVDRV_MAX_SSID_LIST_LENGTH;
|
||||
wiphy->max_scan_ie_len = MAX_IE_SIZE;
|
||||
wiphy->interface_modes = 0;
|
||||
wiphy->interface_modes = MBIT(NL80211_IFTYPE_STATION) |
|
||||
MBIT(NL80211_IFTYPE_AP_VLAN) |
|
||||
MBIT(NL80211_IFTYPE_AP);
|
||||
wiphy->interface_modes =
|
||||
MBIT(NL80211_IFTYPE_STATION) | MBIT(NL80211_IFTYPE_AP);
|
||||
wiphy->interface_modes |= MBIT(NL80211_IFTYPE_MONITOR);
|
||||
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
|
@ -10271,8 +10080,6 @@ mlan_status woal_register_cfg80211(moal_private *priv)
|
|||
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME))
|
||||
wiphy->features |= NL80211_FEATURE_SAE;
|
||||
#endif
|
||||
wiphy->flags |= WIPHY_FLAG_4ADDR_AP;
|
||||
wiphy->flags |= WIPHY_FLAG_4ADDR_STATION;
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
wiphy->features |= NL80211_FEATURE_NEED_OBSS_SCAN;
|
||||
#endif
|
||||
|
|
|
@ -1928,7 +1928,7 @@ static int woal_uap_antenna_cfg(struct net_device *dev, struct ifreq *req)
|
|||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
if (IS_CARD9098(priv->phandle->card_type) ||
|
||||
IS_CARD9097(priv->phandle->card_type) ||
|
||||
IS_CARDIW62X(priv->phandle->card_type)) {
|
||||
IS_CARDIW624(priv->phandle->card_type)) {
|
||||
if (IS_STA_CFG80211(
|
||||
priv->phandle->params.cfg80211_wext))
|
||||
woal_cfg80211_notify_antcfg(
|
||||
|
@ -4111,61 +4111,6 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if defined(UAP_CFG80211)
|
||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||
/**
|
||||
* @brief Set/Get multi AP mode
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param wrq A pointer to structure iwreq
|
||||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
int woal_uap_set_get_multi_ap_mode(moal_private *priv, struct iwreq *wrq)
|
||||
{
|
||||
int ret = 0;
|
||||
int mode = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (wrq->u.data.length) {
|
||||
if (wrq->u.data.length > 1) {
|
||||
PRINTM(MERROR, "Invalid no of arguments!\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
if (copy_from_user(&mode, wrq->u.data.pointer, sizeof(int))) {
|
||||
PRINTM(MERROR, "copy from user failed\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
if (mode == EASY_MESH_MULTI_AP_BSS_MODE_3)
|
||||
/* Supports backhaul and fronthaul BSS */
|
||||
priv->multi_ap_flag = EASY_MESH_MULTI_AP_BH_AND_FH_BSS;
|
||||
else if (mode == EASY_MESH_MULTI_AP_BSS_MODE_2)
|
||||
/* Supports backhaul BSS */
|
||||
priv->multi_ap_flag = EASY_MESH_MULTI_AP_BH_BSS;
|
||||
else if (mode == EASY_MESH_MULTI_AP_BSS_MODE_1)
|
||||
/* Supports fronthaul BSS */
|
||||
priv->multi_ap_flag = EASY_MESH_MULTI_AP_FH_BSS;
|
||||
} else {
|
||||
if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_BH_AND_FH_BSS)
|
||||
mode = EASY_MESH_MULTI_AP_BSS_MODE_3;
|
||||
else if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_BH_BSS)
|
||||
mode = EASY_MESH_MULTI_AP_BSS_MODE_2;
|
||||
else if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_FH_BSS)
|
||||
mode = EASY_MESH_MULTI_AP_BSS_MODE_1;
|
||||
wrq->u.data.length = 1;
|
||||
if (copy_to_user(wrq->u.data.pointer, &mode, sizeof(int)))
|
||||
ret = -EFAULT;
|
||||
}
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set AP configuration
|
||||
*
|
||||
|
|
|
@ -588,12 +588,6 @@ mlan_status woal_set_get_ap_wmm_para(moal_private *priv, t_u16 action,
|
|||
wmm_parameter_t *ap_wmm_para);
|
||||
int woal_uap_set_ap_cfg(moal_private *priv, t_u8 *data, int len);
|
||||
|
||||
#if defined(UAP_CFG80211)
|
||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||
int woal_uap_set_get_multi_ap_mode(moal_private *priv, struct iwreq *wrq);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int woal_uap_set_11ac_status(moal_private *priv, t_u8 action, t_u8 vht20_40,
|
||||
IEEEtypes_VHTCap_t *vhtcap_ie);
|
||||
int woal_11ax_cfg(moal_private *priv, t_u8 action, mlan_ds_11ax_he_cfg *he_cfg,
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
/********************************************************
|
||||
Global Variables
|
||||
********************************************************/
|
||||
extern const struct net_device_ops woal_uap_netdev_ops;
|
||||
/********************************************************
|
||||
Local Functions
|
||||
********************************************************/
|
||||
|
@ -889,6 +888,8 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
|||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)
|
||||
mlan_ds_11h_chan_nop_info chan_nop_info;
|
||||
#endif
|
||||
t_u8 wpa3_sae = 0;
|
||||
t_u8 *rsnx_ie = NULL;
|
||||
ENTER();
|
||||
|
||||
if (!params) {
|
||||
|
@ -1012,6 +1013,8 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
|||
priv->channel, chan_nop_info.new_chan.channel);
|
||||
priv->chan_under_nop = chan_nop_info.chan_under_nop;
|
||||
priv->channel = chan_nop_info.new_chan.channel;
|
||||
priv->bandwidth =
|
||||
chan_nop_info.new_chan.bandcfg.chanWidth;
|
||||
woal_chandef_create(priv, &priv->chan,
|
||||
&chan_nop_info.new_chan);
|
||||
}
|
||||
|
@ -1236,8 +1239,43 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
|||
case WLAN_AKM_SUITE_PSK:
|
||||
sys_config->key_mgmt |= KEY_MGMT_PSK;
|
||||
break;
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
|
||||
case WLAN_AKM_SUITE_SAE:
|
||||
case WLAN_AKM_SUITE_FT_OVER_SAE:
|
||||
wpa3_sae = MTRUE;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (wpa3_sae) {
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)
|
||||
rsnx_ie = (t_u8 *)woal_parse_ie_tlv(params->beacon.tail, ie_len,
|
||||
RSNX_IE);
|
||||
#else
|
||||
rsnx_ie = (t_u8 *)woal_parse_ie_tlv(params->tail, ie_len,
|
||||
RSNX_IE);
|
||||
#endif
|
||||
if (rsnx_ie)
|
||||
sys_config->pwe_derivation = SAE_PWE_BOTH;
|
||||
else
|
||||
sys_config->pwe_derivation = SAE_PWE_HUNT_AND_PECK;
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
|
||||
switch (params->crypto.sae_pwe) {
|
||||
case NL80211_SAE_PWE_HUNT_AND_PECK:
|
||||
sys_config->pwe_derivation = SAE_PWE_HUNT_AND_PECK;
|
||||
break;
|
||||
case NL80211_SAE_PWE_HASH_TO_ELEMENT:
|
||||
sys_config->pwe_derivation = SAE_PWE_HASH_TO_ELEMENT;
|
||||
break;
|
||||
case NL80211_SAE_PWE_BOTH:
|
||||
sys_config->pwe_derivation = SAE_PWE_BOTH;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
sys_config->wpa_cfg.pairwise_cipher_wpa = 0;
|
||||
sys_config->wpa_cfg.pairwise_cipher_wpa2 = 0;
|
||||
for (i = 0; i < params->crypto.n_ciphers_pairwise; i++) {
|
||||
|
@ -1444,11 +1482,6 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
|||
sys_config->sta_ageout_timer, sys_config->ps_sta_ageout_timer);
|
||||
#endif
|
||||
|
||||
if (priv->multi_ap_flag) {
|
||||
sys_config->multi_ap_flag = priv->multi_ap_flag;
|
||||
PRINTM(MINFO, "%s: multi_ap_flag is 0x%x\n", __func__,
|
||||
sys_config->multi_ap_flag);
|
||||
}
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_SET,
|
||||
MOAL_IOCTL_WAIT,
|
||||
sys_config)) {
|
||||
|
@ -1633,167 +1666,6 @@ fail:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function setup the multi-ap virtual interface
|
||||
*
|
||||
* @param dev A pointer to structure net_device
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void woal_vlan_virt_if_setup(struct net_device *dev)
|
||||
{
|
||||
ENTER();
|
||||
ether_setup(dev);
|
||||
dev->netdev_ops = &woal_uap_netdev_ops;
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 11, 9)
|
||||
dev->needs_free_netdev = true;
|
||||
#else
|
||||
dev->destructor = free_netdev;
|
||||
#endif
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
|
||||
/**
|
||||
* @brief Request the driver to add a multi-ap virtual interface
|
||||
*
|
||||
* @param wiphy A pointer to wiphy structure
|
||||
* @param name Virtual interface name
|
||||
* @param name_assign_type Interface name assignment type
|
||||
* @param flags Flags for the virtual interface
|
||||
* @param params A pointer to vif_params structure
|
||||
* @param new_dev new net_device to return
|
||||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
static int woal_cfg80211_add_vlan_vir_if(struct wiphy *wiphy, const char *name,
|
||||
unsigned char name_assign_type,
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
||||
u32 *flags,
|
||||
#endif
|
||||
struct vif_params *params,
|
||||
struct net_device **new_dev)
|
||||
#else
|
||||
/**
|
||||
* @brief Request the driver to add a multi-ap virtual interface
|
||||
*
|
||||
* @param wiphy A pointer to wiphy structure
|
||||
* @param name Virtual interface name
|
||||
* @param flags Flags for the virtual interface
|
||||
* @param params A pointer to vif_params structure
|
||||
* @param new_dev new net_device to return
|
||||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
static int woal_cfg80211_add_vlan_vir_if(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
|
||||
const
|
||||
#endif
|
||||
char *name,
|
||||
u32 *flags, struct vif_params *params,
|
||||
struct net_device **new_dev)
|
||||
#endif
|
||||
{
|
||||
int ret = 0;
|
||||
moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy);
|
||||
moal_private *priv =
|
||||
(moal_private *)woal_get_priv(handle, MLAN_BSS_ROLE_UAP);
|
||||
moal_private *new_priv = NULL;
|
||||
struct net_device *ndev = NULL;
|
||||
|
||||
ENTER();
|
||||
ASSERT_RTNL();
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||
#ifndef MAX_WMM_QUEUE
|
||||
#define MAX_WMM_QUEUE 4
|
||||
#endif
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
|
||||
ndev = alloc_netdev_mq(sizeof(moal_private), name, name_assign_type,
|
||||
woal_vlan_virt_if_setup, 1);
|
||||
#else
|
||||
ndev = alloc_netdev_mq(sizeof(moal_private), name, NET_NAME_UNKNOWN,
|
||||
woal_vlan_virt_if_setup, 1);
|
||||
#endif
|
||||
#else
|
||||
ndev = alloc_netdev_mq(sizeof(moal_private), name,
|
||||
woal_vlan_virt_if_setup, 1);
|
||||
#endif
|
||||
#else
|
||||
ndev = alloc_netdev_mq(sizeof(moal_private), name,
|
||||
woal_vlan_virt_if_setup);
|
||||
#endif
|
||||
if (!ndev) {
|
||||
PRINTM(MFATAL, "Init virtual ethernet device failed\n");
|
||||
ret = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = dev_alloc_name(ndev, ndev->name);
|
||||
if (ret < 0) {
|
||||
PRINTM(MFATAL, "Net device alloc name fail.\n");
|
||||
ret = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
dev_net_set(ndev, wiphy_net(wiphy));
|
||||
|
||||
moal_memcpy_ext(handle, ndev->perm_addr, wiphy->perm_addr, ETH_ALEN,
|
||||
sizeof(ndev->perm_addr));
|
||||
moal_memcpy_ext(handle, ndev->perm_addr, priv->current_addr, ETH_ALEN,
|
||||
sizeof(ndev->perm_addr));
|
||||
moal_memcpy_ext(handle, (t_void *)ndev->dev_addr, ndev->perm_addr,
|
||||
ETH_ALEN, MAX_ADDR_LEN);
|
||||
|
||||
SET_NETDEV_DEV(ndev, wiphy_dev(wiphy));
|
||||
ndev->watchdog_timeo = MRVDRV_DEFAULT_UAP_WATCHDOG_TIMEOUT;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
|
||||
ndev->needed_headroom += MLAN_MIN_DATA_HEADER_LEN +
|
||||
sizeof(mlan_buffer) + priv->extra_tx_head_len;
|
||||
#else
|
||||
ndev->hard_header_len += MLAN_MIN_DATA_HEADER_LEN +
|
||||
sizeof(mlan_buffer) + priv->extra_tx_head_len;
|
||||
#endif
|
||||
|
||||
ndev->flags |= IFF_BROADCAST | IFF_MULTICAST;
|
||||
|
||||
new_priv = netdev_priv(ndev);
|
||||
|
||||
ndev->ieee80211_ptr = &new_priv->w_dev;
|
||||
|
||||
new_priv->wdev = &new_priv->w_dev;
|
||||
new_priv->netdev = ndev;
|
||||
new_priv->extra_tx_head_len = priv->extra_tx_head_len;
|
||||
|
||||
moal_memcpy_ext(priv->phandle, new_priv->current_addr,
|
||||
priv->current_addr, ETH_ALEN, ETH_ALEN);
|
||||
|
||||
new_priv->phandle = handle;
|
||||
new_priv->wdev->wiphy = handle->wiphy;
|
||||
new_priv->bss_type = MLAN_BSS_TYPE_UAP;
|
||||
new_priv->bss_role = MLAN_BSS_ROLE_UAP;
|
||||
new_priv->bss_index = priv->bss_index;
|
||||
new_priv->parent_priv = priv;
|
||||
new_priv->wdev->iftype = NL80211_IFTYPE_AP_VLAN;
|
||||
|
||||
ndev->ieee80211_ptr->use_4addr = params->use_4addr;
|
||||
|
||||
ret = register_netdevice(ndev);
|
||||
if (ret) {
|
||||
PRINTM(MFATAL, "register net_device failed, ret=%d\n", ret);
|
||||
free_netdev(ndev);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (new_dev)
|
||||
*new_dev = ndev;
|
||||
fail:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if CFG80211_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION
|
||||
/**
|
||||
|
@ -2476,20 +2348,6 @@ woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, const char *name,
|
|||
ret = -EFAULT;
|
||||
}
|
||||
break;
|
||||
case NL80211_IFTYPE_AP_VLAN:
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
||||
ret = woal_cfg80211_add_vlan_vir_if(
|
||||
wiphy, name, name_assign_type, flags, params, &ndev);
|
||||
#else
|
||||
ret = woal_cfg80211_add_vlan_vir_if(
|
||||
wiphy, name, name_assign_type, params, &ndev);
|
||||
#endif
|
||||
#else
|
||||
ret = woal_cfg80211_add_vlan_vir_if(wiphy, name, flags, params,
|
||||
&ndev);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
PRINTM(MWARN, "Not supported if type: %d\n", type);
|
||||
ret = -EFAULT;
|
||||
|
@ -2546,9 +2404,6 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
|
|||
struct net_device *dev = wdev->netdev;
|
||||
#endif
|
||||
|
||||
moal_private *vlan_priv = NULL;
|
||||
t_u16 aid = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
PRINTM(MIOCTL, "del virtual intf %s\n", dev->name);
|
||||
|
@ -2573,26 +2428,6 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/**
|
||||
* For multi-ap virtual interface, unregister netdevice
|
||||
* directly for now. Will add more in the future.
|
||||
*/
|
||||
if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP_VLAN) {
|
||||
/* stop network before doing cleanup */
|
||||
if (netif_carrier_ok(dev))
|
||||
netif_carrier_off(dev);
|
||||
vlan_priv = (moal_private *)netdev_priv(dev);
|
||||
aid = vlan_priv->vlan_sta_ptr->aid;
|
||||
PRINTM(MCMND, "wlan: Easymesh del Vlan aid=%d\n", aid);
|
||||
vlan_priv->parent_priv->vlan_sta_list[(aid - 1) % MAX_STA_COUNT]
|
||||
->is_valid = MFALSE;
|
||||
unregister_netdevice(dev);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP) {
|
||||
for (i = 0; i < handle->priv_num; i++) {
|
||||
vir_priv = handle->priv[i];
|
||||
|
@ -2737,6 +2572,7 @@ int woal_cfg80211_add_beacon(struct wiphy *wiphy, struct net_device *dev,
|
|||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
priv->channel = ieee80211_frequency_to_channel(
|
||||
params->chandef.chan->center_freq);
|
||||
priv->bandwidth = params->chandef.width;
|
||||
#else
|
||||
priv->channel =
|
||||
ieee80211_frequency_to_channel(params->channel->center_freq);
|
||||
|
@ -2925,7 +2761,6 @@ int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
|
|||
#ifdef STA_SUPPORT
|
||||
moal_private *pmpriv = NULL;
|
||||
#endif
|
||||
int i;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -3006,19 +2841,7 @@ int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
|
|||
priv->cipher = 0;
|
||||
memset(priv->uap_wep_key, 0, sizeof(priv->uap_wep_key));
|
||||
priv->channel = 0;
|
||||
#ifdef UAP_SUPPORT
|
||||
priv->multi_ap_flag = 0;
|
||||
/* Clear the whole backhaul station list in moal */
|
||||
for (i = 0; i < MAX_STA_COUNT; i++) {
|
||||
if (priv->vlan_sta_list[i]) {
|
||||
if (priv->vlan_sta_list[i]->is_valid)
|
||||
unregister_netdevice(
|
||||
priv->vlan_sta_list[i]->netdev);
|
||||
kfree(priv->vlan_sta_list[i]);
|
||||
}
|
||||
priv->vlan_sta_list[i] = NULL;
|
||||
}
|
||||
#endif
|
||||
priv->bandwidth = 0;
|
||||
PRINTM(MMSG, "wlan: AP stopped\n");
|
||||
done:
|
||||
LEAVE();
|
||||
|
@ -3723,11 +3546,16 @@ static void woal_switch_uap_channel(moal_private *priv, t_u8 wait_option)
|
|||
}
|
||||
PRINTM(MMSG, "CSA: old chan %d => new chan %d \n", priv->channel,
|
||||
uap_channel.channel);
|
||||
PRINTM(MMSG, "CSA: old BW %d => new BW %d \n", priv->bandwidth,
|
||||
uap_channel.bandcfg.chanWidth);
|
||||
priv->channel = uap_channel.channel;
|
||||
priv->bandwidth = uap_channel.bandcfg.chanWidth;
|
||||
moal_memcpy_ext(priv->phandle, &priv->chan, &priv->csa_chan,
|
||||
sizeof(struct cfg80211_chan_def), sizeof(priv->chan));
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
|
||||
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0, 0);
|
||||
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && IMX_ANDROID_13))
|
||||
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0, 0);
|
||||
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || \
|
||||
IMX_ANDROID_13 || IMX_ANDROID_12_BACKPORT)
|
||||
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0);
|
||||
|
|
|
@ -119,16 +119,6 @@ int woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
|||
ret = woal_set_get_bss_role(priv, wrq);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#if defined(UAP_CFG80211)
|
||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||
case WOAL_UAP_SET_MODE:
|
||||
PRINTM(MINFO,
|
||||
"%s: setting multi_ap flag through user command\n",
|
||||
__func__);
|
||||
ret = woal_uap_set_get_multi_ap_mode(priv, wrq);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
|
|
@ -65,11 +65,6 @@ Change log:
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(UAP_CFG80211)
|
||||
/** Private command ID for set multi-AP BSS mode */
|
||||
#define WOAL_UAP_SET_MODE 27
|
||||
#endif
|
||||
|
||||
/** Private command ID for hostcmd */
|
||||
#define WOAL_UAP_HOST_CMD (WOAL_UAP_IOCTL + 17)
|
||||
|
||||
|
|
|
@ -84,10 +84,6 @@ static const struct iw_priv_args woal_uap_priv_args[] = {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(UAP_CFG80211)
|
||||
{WOAL_UAP_SET_MODE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"setmode"},
|
||||
#endif
|
||||
{WOAL_UAP_SET_GET_256_CHAR, IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256, ""},
|
||||
{WOAL_WL_FW_RELOAD, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||
|
|
|
@ -35,7 +35,7 @@ extern struct semaphore AddRemoveCardSem;
|
|||
********************************************************/
|
||||
|
||||
#if defined(USB8997) || defined(USB9098) || defined(USB9097) || \
|
||||
defined(USB8978) || defined(USBIW62X)
|
||||
defined(USB8978) || defined(USBIW624)
|
||||
/** Card-type detection frame response */
|
||||
typedef struct {
|
||||
/** 32-bit ACK+WINNER field */
|
||||
|
@ -95,10 +95,10 @@ static struct usb_device_id woal_usb_table[] = {
|
|||
{NXP_USB_DEVICE(USB9097_VID_1, USB9097_PID_1, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB9097_VID_1, USB9097_PID_2, "NXP WLAN USB Adapter")},
|
||||
#endif
|
||||
#ifdef USBIW62X
|
||||
{NXP_USB_DEVICE(USBIW62X_VID_1, USBIW62X_PID_1,
|
||||
#ifdef USBIW624
|
||||
{NXP_USB_DEVICE(USBIW624_VID_1, USBIW624_PID_1,
|
||||
"NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USBIW62X_VID_1, USBIW62X_PID_2,
|
||||
{NXP_USB_DEVICE(USBIW624_VID_1, USBIW624_PID_2,
|
||||
"NXP WLAN USB Adapter")},
|
||||
#endif
|
||||
/* Terminating entry */
|
||||
|
@ -128,8 +128,8 @@ static struct usb_device_id woal_usb_table_skip_fwdnld[] = {
|
|||
#ifdef USB9097
|
||||
{NXP_USB_DEVICE(USB9097_VID_1, USB9097_PID_2, "NXP WLAN USB Adapter")},
|
||||
#endif
|
||||
#ifdef USBIW62X
|
||||
{NXP_USB_DEVICE(USBIW62X_VID_1, USBIW62X_PID_2,
|
||||
#ifdef USBIW624
|
||||
{NXP_USB_DEVICE(USBIW624_VID_1, USBIW624_PID_2,
|
||||
"NXP WLAN USB Adapter")},
|
||||
#endif
|
||||
/* Terminating entry */
|
||||
|
@ -497,7 +497,7 @@ rx_ret:
|
|||
********************************************************/
|
||||
|
||||
#if defined(USB8997) || defined(USB9098) || defined(USB9097) || \
|
||||
defined(USB8978) || defined(USBIW62X)
|
||||
defined(USB8978) || defined(USBIW624)
|
||||
/**
|
||||
* @brief Check chip revision
|
||||
*
|
||||
|
@ -810,14 +810,14 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
strlen(KERN_VERSION));
|
||||
}
|
||||
#endif
|
||||
#ifdef USBIW62X
|
||||
#ifdef USBIW624
|
||||
if (woal_cpu_to_le16(cardp_usb->udev->descriptor.idProduct) ==
|
||||
(__force __le16)USBIW62X_PID_1 ||
|
||||
(__force __le16)USBIW624_PID_1 ||
|
||||
woal_cpu_to_le16(cardp_usb->udev->descriptor.idProduct) ==
|
||||
(__force __le16)USBIW62X_PID_2) {
|
||||
card_type = CARD_TYPE_USBIW62X;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_USBIW62X,
|
||||
strlen(CARD_USBIW62X), strlen(driver_version));
|
||||
(__force __le16)USBIW624_PID_2) {
|
||||
card_type = CARD_TYPE_USBIW624;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_USBIW624,
|
||||
strlen(CARD_USBIW624), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
|
@ -893,9 +893,9 @@ static int woal_usb_probe(struct usb_interface *intf,
|
|||
#ifdef USB9097
|
||||
case (__force __le16)USB9097_PID_1:
|
||||
#endif /* USB9097 */
|
||||
#ifdef USBIW62X
|
||||
case (__force __le16)USBIW62X_PID_1:
|
||||
#endif /* USBIW62X */
|
||||
#ifdef USBIW624
|
||||
case (__force __le16)USBIW624_PID_1:
|
||||
#endif /* USBIW624 */
|
||||
|
||||
/* If skip FW is set, we must return error so
|
||||
* the next driver can download the FW */
|
||||
|
@ -923,9 +923,9 @@ static int woal_usb_probe(struct usb_interface *intf,
|
|||
#ifdef USB9097
|
||||
case (__force __le16)USB9097_PID_2:
|
||||
#endif /* USB9097 */
|
||||
#ifdef USBIW62X
|
||||
case (__force __le16)USBIW62X_PID_2:
|
||||
#endif /* USBIW62X */
|
||||
#ifdef USBIW624
|
||||
case (__force __le16)USBIW624_PID_2:
|
||||
#endif /* USBIW624 */
|
||||
|
||||
usb_cardp->boot_state = USB_FW_READY;
|
||||
break;
|
||||
|
@ -1283,7 +1283,6 @@ static int woal_usb_suspend(struct usb_interface *intf, pm_message_t message)
|
|||
for (i = 0; i < MVUSB_RX_DATA_URB; i++) {
|
||||
if (cardp->rx_data_list[i].urb) {
|
||||
usb_kill_urb(cardp->rx_data_list[i].urb);
|
||||
usb_init_urb(cardp->rx_data_list[i].urb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2043,7 +2042,7 @@ static mlan_status woal_usb_get_fw_name(moal_handle *handle)
|
|||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#if defined(USB8997) || defined(USB9098) || defined(USB9097) || \
|
||||
defined(USB8978) || defined(USBIW62X)
|
||||
defined(USB8978) || defined(USBIW624)
|
||||
t_u32 revision_id = 0;
|
||||
t_u32 strap = 0;
|
||||
t_u32 boot_mode = 0;
|
||||
|
@ -2064,7 +2063,7 @@ static mlan_status woal_usb_get_fw_name(moal_handle *handle)
|
|||
#endif
|
||||
|
||||
#if defined(USB8997) || defined(USB9098) || defined(USB9097) || \
|
||||
defined(USB8978) || defined(USBIW62X)
|
||||
defined(USB8978) || defined(USBIW624)
|
||||
ret = woal_check_chip_revision(handle, &revision_id, &strap,
|
||||
&boot_mode);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
|
@ -2170,16 +2169,16 @@ static mlan_status woal_usb_get_fw_name(moal_handle *handle)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef USBIW62X
|
||||
if (IS_USBIW62X(handle->card_type)) {
|
||||
#ifdef USBIW624
|
||||
if (IS_USBIW624(handle->card_type)) {
|
||||
if (boot_mode == 0x03)
|
||||
PRINTM(MMSG, "wlan: USB-IW62X in secure-boot mode\n");
|
||||
PRINTM(MMSG, "wlan: USB-IW624 in secure-boot mode\n");
|
||||
if (strap == CARD_TYPE_USB_UART)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
USBUARTIW62X_COMBO_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
USBUARTIW624_COMBO_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
USBUSBIW62X_COMBO_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
USBUSBIW624_COMBO_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -89,14 +89,14 @@ Change Log:
|
|||
#define USB9097_PID_2 0x2061
|
||||
#endif /* USB9097 */
|
||||
|
||||
#ifdef USBIW62X
|
||||
#ifdef USBIW624
|
||||
/** USB VID 1 */
|
||||
#define USBIW62X_VID_1 0x0471
|
||||
#define USBIW624_VID_1 0x0471
|
||||
/** USB PID 1 */
|
||||
#define USBIW62X_PID_1 0x020E
|
||||
#define USBIW624_PID_1 0x020E
|
||||
/** USB PID 2 */
|
||||
#define USBIW62X_PID_2 0x020F
|
||||
#endif /* USBIW62X */
|
||||
#define USBIW624_PID_2 0x020F
|
||||
#endif /* USBIW624 */
|
||||
|
||||
/** Boot state: FW download */
|
||||
#define USB_FW_DNLD 1
|
||||
|
@ -110,7 +110,7 @@ Change Log:
|
|||
#define MVUSB_RX_DATA_URB 6
|
||||
|
||||
#if defined(USB8997) || defined(USB9098) || defined(USB9097) || \
|
||||
defined(USB8978) || defined(USB8801) || defined(USBIW62X)
|
||||
defined(USB8978) || defined(USB8801) || defined(USBIW624)
|
||||
/* Transmit buffer size for chip revision check */
|
||||
#define CHIP_REV_TX_BUF_SIZE 16
|
||||
/* Receive buffer size for chip revision check */
|
||||
|
@ -172,12 +172,12 @@ Change Log:
|
|||
#define USBUSB9097_COMBO_V1_FW_NAME "nxp/usbusbiw620_combo_v1.bin"
|
||||
#endif /* USB9097 */
|
||||
|
||||
#ifdef USBIW62X
|
||||
#define USBIW62X_DEFAULT_COMBO_FW_NAME "nxp/usbusbiw62x_combo.bin"
|
||||
#define USBUARTIW62X_COMBO_FW_NAME "nxp/usbuartiw62x_combo.bin"
|
||||
#define USBUSBIW62X_COMBO_FW_NAME "nxp/usbusbiw62x_combo.bin"
|
||||
#define USBIW62X_DEFAULT_WLAN_FW_NAME "nxp/usbiw62x_wlan.bin"
|
||||
#endif /* USBIW62X */
|
||||
#ifdef USBIW624
|
||||
#define USBIW624_DEFAULT_COMBO_FW_NAME "nxp/usbusbiw624_combo.bin"
|
||||
#define USBUARTIW624_COMBO_FW_NAME "nxp/usbusbiw624_combo.bin"
|
||||
#define USBUSBIW624_COMBO_FW_NAME "nxp/usbusbiw624_combo.bin"
|
||||
#define USBIW624_DEFAULT_WLAN_FW_NAME "nxp/usbiw624_wlan.bin"
|
||||
#endif /* USBIW624 */
|
||||
|
||||
/** urb context */
|
||||
typedef struct _urb_context {
|
||||
|
|
|
@ -3408,7 +3408,7 @@ static const iw_handler woal_private_handler[] = {
|
|||
void woal_send_iwevcustom_event(moal_private *priv, char *str)
|
||||
{
|
||||
union iwreq_data iwrq;
|
||||
char buf[IW_CUSTOM_MAX];
|
||||
char buf[256];
|
||||
|
||||
ENTER();
|
||||
/* Check register_netdevice is completed before sending*/
|
||||
|
|
Loading…
Reference in a new issue