mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2026-11-20 18:39:49 -05:00
Driver commit for release MM6X18540 2025-07-13_16:06:22
Firmware version for commit: W8997-16.92.21.p153 W9098-17.92.1.p149.74 IW416-16.92.21.p153 W8987-16.92.21.p153 IW612-18.99.3.p26.1 IW610-18.99.5.p70 AW693-18.99.2.p145.70
This commit is contained in:
parent
7d13b9dc29
commit
1e8b968f43
45 changed files with 1361 additions and 1925 deletions
2
Makefile
2
Makefile
|
|
@ -175,7 +175,7 @@ APPDIR= $(shell if test -d "mapp"; then echo mapp; fi)
|
|||
#############################################################################
|
||||
|
||||
ccflags-y += -I$(KERNELDIR)/include
|
||||
ccflags-y += -DMLAN_RELEASE_VERSION='"537.p15"'
|
||||
ccflags-y += -DMLAN_RELEASE_VERSION='"540"'
|
||||
|
||||
ccflags-y += -DFPNUM='"92"'
|
||||
|
||||
|
|
|
|||
6
README
6
README
|
|
@ -1,6 +1,6 @@
|
|||
# MXM Wi-Fi Driver
|
||||
|
||||
===============================================================================
|
||||
================================================================================
|
||||
U S E R M A N U A L
|
||||
|
||||
Copyright 2008-2025 NXP
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
Goto source code directory.
|
||||
make [clean] build
|
||||
The driver and utility binaries can be found in bin_wlan directory.
|
||||
The driver source code is compatible with hosts running Linux kernel versions ranging from 2.6.32 to 6.14.2.
|
||||
The driver source code is compatible with hosts running Linux kernel versions ranging from 2.6.32 to 6.15.0.
|
||||
|
||||
2) FOR DRIVER INSTALL
|
||||
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
uap_name: Name of the uAP interface (default: "uap")
|
||||
max_wfd_bss: Maximum number of WIFIDIRECT BSS (default 1, max 1)
|
||||
wfd_name: Name of the WIFIDIRECT interface (default: "wfd")
|
||||
max_vir_bss: Number of Virtual interfaces (default 0)
|
||||
max_vir_bss: Number of Virtual interfaces (default 1)
|
||||
nan_name: Name of the NAN interface (default: "nan")
|
||||
max_nan_bss: Number of NAN interfaces (default 1)
|
||||
uap_oper_ctrl: uAP operation control when in-STA disconnect with ext-AP
|
||||
|
|
|
|||
|
|
@ -844,18 +844,6 @@ int wlan_cmd_append_116e_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
return ret_len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function checks whether the operation class is a 6G
|
||||
*
|
||||
* @param op_class global operation class
|
||||
*
|
||||
* @return 0--not allowed, other value allowed
|
||||
*/
|
||||
t_bool is_6ghz_op_class(t_u8 op_class)
|
||||
{
|
||||
return op_class >= 131 && op_class <= 137;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function check if 11AX is allowed in bandcfg
|
||||
*
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains the functions for station ioctl.
|
||||
*
|
||||
*
|
||||
* Copyright 2018-2022, 2025 NXP
|
||||
* Copyright 2018-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -69,7 +69,6 @@ int wlan_cmd_append_116e_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
t_u8 **ppbuffer);
|
||||
t_u8 wlan_get_6g_ap_bandconfig(BSSDescriptor_t *pbss_desc,
|
||||
Band_Config_t *bandcfg);
|
||||
t_bool is_6ghz_op_class(t_u8 op_class);
|
||||
|
||||
int wlan_cmd_append_11ax_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||
t_u8 **ppbuffer);
|
||||
|
|
|
|||
|
|
@ -2517,8 +2517,8 @@ typedef struct _oper_bw_chan {
|
|||
t_u8 global_oper_class;
|
||||
/*bandwidth 0-20M 1-40M 2-80M 3-160M*/
|
||||
t_u8 bandwidth;
|
||||
/*channel list, includes 6G*/
|
||||
t_u8 channel_list[59]; /*size is based current largest channel array*/
|
||||
/*channel list*/
|
||||
t_u8 channel_list[13];
|
||||
} oper_bw_chan;
|
||||
|
||||
/** oper class table for US*/
|
||||
|
|
@ -2548,35 +2548,6 @@ static oper_bw_chan oper_bw_chan_us[] = {
|
|||
{128, 128, 2, {42, 58, 106, 122, 138, 155}},
|
||||
{129, 129, 3, {50, 114}},
|
||||
{130, 130, 2, {42, 58, 106, 122, 138, 155}},
|
||||
/* 6G 20MHz */
|
||||
{131, 131, 0, {1, 5, 9, 13, 17, 21, 25, 29, 33, 37,
|
||||
41, 45, 49, 53, 57, 61, 65, 69, 73, 77,
|
||||
81, 85, 89, 93, 97, 101, 105, 109, 113, 117,
|
||||
121, 125, 129, 133, 137, 141, 145, 149, 153, 157,
|
||||
161, 165, 169, 173, 177, 181, 185, 189, 193, 197,
|
||||
201, 205, 209, 213, 217, 221, 225, 229, 233}},
|
||||
/* 6G 40MHz */
|
||||
{132, 132, 1, {1, 5, 9, 13, 17, 21, 25, 29, 33, 37,
|
||||
41, 45, 49, 53, 57, 61, 65, 69, 73, 77,
|
||||
81, 85, 89, 93, 97, 101, 105, 109, 113, 117,
|
||||
121, 125, 129, 133, 137, 141, 145, 149, 153, 157,
|
||||
161, 165, 169, 173, 177, 181, 185, 189, 193, 197,
|
||||
201, 205, 209, 213, 217, 221, 225, 229, 233}},
|
||||
/* 6G 80MHz */
|
||||
{133, 133, 2, {1, 5, 9, 13, 17, 21, 25, 29, 33, 37,
|
||||
41, 45, 49, 53, 57, 61, 65, 69, 73, 77,
|
||||
81, 85, 89, 93, 97, 101, 105, 109, 113, 117,
|
||||
121, 125, 129, 133, 137, 141, 145, 149, 153, 157,
|
||||
161, 165, 169, 173, 177, 181, 185, 189, 193, 197,
|
||||
201, 205, 209, 213, 217, 221, 225, 229, 233}},
|
||||
/* 6G 160MHz */
|
||||
{134, 134, 3, {15, 47, 79, 111, 143, 175, 207}},
|
||||
/* 6G 80+ MHz */
|
||||
{135,
|
||||
135,
|
||||
0,
|
||||
{7, 23, 39, 55, 71, 87, 103, 119, 135, 151, 167, 183, 199, 215}},
|
||||
{136, 136, 0, {2}},
|
||||
};
|
||||
/** oper class table for EU*/
|
||||
static oper_bw_chan oper_bw_chan_eu[] = {
|
||||
|
|
@ -2597,20 +2568,6 @@ static oper_bw_chan oper_bw_chan_eu[] = {
|
|||
{128, 128, 2, {42, 58, 106, 122, 138, 155}},
|
||||
{129, 129, 3, {50, 114}},
|
||||
{130, 130, 2, {42, 58, 106, 122, 138, 155}},
|
||||
/* 6G 20MHz */
|
||||
{131, 131, 0, {1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45,
|
||||
49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93}},
|
||||
/* 6G 40MHz */
|
||||
{132, 132, 1, {1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45,
|
||||
49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93}},
|
||||
/* 6G 80MHz */
|
||||
{133, 133, 2, {1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45,
|
||||
49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93}},
|
||||
/* 6G 160MHz */
|
||||
{134, 134, 3, {15, 47, 79}},
|
||||
/* 6G 80+ MHz */
|
||||
{135, 135, 0, {7, 23, 39, 55, 71, 87}},
|
||||
{136, 136, 0, {2}},
|
||||
};
|
||||
/** oper class table for Japan*/
|
||||
static oper_bw_chan oper_bw_chan_jp[] = {
|
||||
|
|
@ -2638,20 +2595,6 @@ static oper_bw_chan oper_bw_chan_jp[] = {
|
|||
{128, 128, 2, {42, 58, 106, 122, 138, 155}},
|
||||
{129, 129, 3, {50, 114}},
|
||||
{130, 130, 2, {42, 58, 106, 122, 138, 155}},
|
||||
/* 6G 20MHz */
|
||||
{131, 131, 0, {1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45,
|
||||
49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93}},
|
||||
/* 6G 40MHz */
|
||||
{132, 132, 1, {1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45,
|
||||
49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93}},
|
||||
/* 6G 80MHz */
|
||||
{133, 133, 2, {1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45,
|
||||
49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93}},
|
||||
/* 6G 160MHz */
|
||||
{134, 134, 3, {15, 47, 79}},
|
||||
/* 6G 80+ MHz */
|
||||
{135, 135, 0, {7, 23, 39, 55, 71, 87}},
|
||||
{136, 136, 0, {2}},
|
||||
};
|
||||
/** oper class table for China*/
|
||||
static oper_bw_chan oper_bw_chan_cn[] = {
|
||||
|
|
@ -2822,8 +2765,7 @@ mlan_status wlan_check_operclass_validation(mlan_private *pmpriv, t_u8 channel,
|
|||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
mlan_status wlan_get_curr_oper_class(mlan_private *pmpriv, t_u8 channel,
|
||||
t_u8 bw, t_u8 *oper_class,
|
||||
t_u8 *global_oper_class)
|
||||
t_u8 bw, t_u8 *oper_class)
|
||||
{
|
||||
oper_bw_chan *poper_bw_chan = MNULL;
|
||||
t_u8 center_freq_idx = 0;
|
||||
|
|
@ -2863,9 +2805,6 @@ mlan_status wlan_get_curr_oper_class(mlan_private *pmpriv, t_u8 channel,
|
|||
channel) {
|
||||
*oper_class =
|
||||
poper_bw_chan[i].oper_class;
|
||||
*global_oper_class =
|
||||
poper_bw_chan[i]
|
||||
.global_oper_class;
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1472,7 +1472,6 @@ static mlan_status wlan_dnld_cmd_to_fw(mlan_private *pmpriv,
|
|||
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);
|
||||
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
|
|
@ -2359,20 +2358,14 @@ done:
|
|||
* @return N/A
|
||||
*/
|
||||
static void wlan_handle_cmd_error_in_pre_aleep(mlan_adapter *pmadapter,
|
||||
t_u16 cmd_no,
|
||||
HostCmd_DS_COMMAND *rsp)
|
||||
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) {
|
||||
if (!IS_USB(pmadapter->card_type)) {
|
||||
pcmd_node->cmdbuf->data_offset +=
|
||||
|
|
@ -2388,7 +2381,6 @@ static void wlan_handle_cmd_error_in_pre_aleep(mlan_adapter *pmadapter,
|
|||
}
|
||||
wlan_insert_cmd_to_pending_q(pmadapter, pcmd_node, MFALSE);
|
||||
}
|
||||
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
LEAVE();
|
||||
}
|
||||
|
|
@ -2449,7 +2441,6 @@ mlan_status wlan_process_cmdresp(mlan_adapter *pmadapter)
|
|||
|
||||
resp = (HostCmd_DS_COMMAND *)(pmadapter->curr_cmd->respbuf->pbuf +
|
||||
pmadapter->curr_cmd->respbuf->data_offset);
|
||||
|
||||
orig_cmdresp_no = wlan_le16_to_cpu(resp->command);
|
||||
cmdresp_no = (orig_cmdresp_no & HostCmd_CMD_ID_MASK);
|
||||
if (pmadapter->curr_cmd->cmd_no != cmdresp_no) {
|
||||
|
|
@ -2555,7 +2546,7 @@ mlan_status wlan_process_cmdresp(mlan_adapter *pmadapter)
|
|||
if (!IS_USB(pmadapter->card_type) && pmadapter->curr_cmd &&
|
||||
cmdresp_result == HostCmd_RESULT_PRE_ASLEEP) {
|
||||
wlan_handle_cmd_error_in_pre_aleep(pmadapter,
|
||||
cmdresp_no, resp);
|
||||
cmdresp_no);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
|
@ -2569,7 +2560,7 @@ mlan_status wlan_process_cmdresp(mlan_adapter *pmadapter)
|
|||
if (!IS_USB(pmadapter->card_type) && pmadapter->curr_cmd &&
|
||||
cmdresp_result == HostCmd_RESULT_PRE_ASLEEP) {
|
||||
wlan_handle_cmd_error_in_pre_aleep(pmadapter,
|
||||
cmdresp_no, resp);
|
||||
cmdresp_no);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
|
@ -2675,9 +2666,6 @@ mlan_status wlan_process_cmdresp(mlan_adapter *pmadapter)
|
|||
(HostCmd_CMD_GET_HW_SPEC == cmdresp_no)) {
|
||||
pmadapter->hw_status = WlanHardwareStatusGetHwSpecdone;
|
||||
}
|
||||
#if defined(PCIEAW693)
|
||||
#endif
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
|
@ -4813,6 +4801,16 @@ mlan_status wlan_cmd_csi(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
csi_cfg_cmd->csi_channel_bandconfig.csi_monitor_enable =
|
||||
csi_params->csi_monitor_enable;
|
||||
csi_cfg_cmd->csi_channel_bandconfig.ra4us = csi_params->ra4us;
|
||||
|
||||
csi_cfg_cmd->csi_agc_config.header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_CSI_AGC_CONFIG);
|
||||
csi_cfg_cmd->csi_agc_config.header.len =
|
||||
sizeof(MrvlIEtypes_csi_agc_conf_t) -
|
||||
sizeof(MrvlIEtypesHeader_t);
|
||||
csi_cfg_cmd->csi_agc_config.commonAGCflag =
|
||||
csi_params->commonAGCflag;
|
||||
csi_cfg_cmd->csi_agc_config.csiformat = csi_params->csiformat;
|
||||
|
||||
csi_cfg_cmd->csi_filter_cnt = csi_params->csi_filter_cnt;
|
||||
if (csi_cfg_cmd->csi_filter_cnt > CSI_FILTER_MAX)
|
||||
csi_cfg_cmd->csi_filter_cnt = CSI_FILTER_MAX;
|
||||
|
|
@ -5318,11 +5316,15 @@ mlan_status wlan_adapter_get_hw_spec(pmlan_adapter pmadapter)
|
|||
/*
|
||||
* This should be issued in the very first to config
|
||||
* SDIO_GPIO interrupt mode.
|
||||
*
|
||||
* For SDIO over SPI, this GPIO interrupt source is from SD data[1]
|
||||
* So don't need to configure other OOB GPIO
|
||||
*/
|
||||
if (IS_SD(pmadapter->card_type) &&
|
||||
(wlan_set_sdio_gpio_int(priv) != MLAN_STATUS_SUCCESS)) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
if (IS_SD(pmadapter->card_type) && (!pmadapter->pcard_sd->spi_mode)) {
|
||||
if (wlan_set_sdio_gpio_int(priv) != MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -5340,7 +5342,6 @@ mlan_status wlan_adapter_get_hw_spec(pmlan_adapter pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/** DPD data dnld cmd prepare */
|
||||
if ((pmadapter->pdpd_data) && (pmadapter->dpd_data_len > 0)) {
|
||||
ret = wlan_process_hostcmd_cfg(priv, CFG_TYPE_DPDFILE,
|
||||
|
|
@ -6763,10 +6764,6 @@ mlan_status wlan_ret_get_hw_spec(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
pmadapter->fw_bands |= BAND_AN;
|
||||
if (!(pmadapter->fw_bands & BAND_G) && (pmadapter->fw_bands & BAND_GN))
|
||||
pmadapter->fw_bands &= ~BAND_GN;
|
||||
if (!(pmadapter->fw_bands & BAND_A) && (pmadapter->fw_bands & BAND_AAC))
|
||||
pmadapter->fw_bands &= ~BAND_AAC;
|
||||
if (!(pmadapter->fw_bands & BAND_G) && (pmadapter->fw_bands & BAND_GAC))
|
||||
pmadapter->fw_bands &= ~BAND_GAC;
|
||||
|
||||
pmadapter->config_bands = pmadapter->fw_bands;
|
||||
for (i = 0; i < pmadapter->priv_num; i++) {
|
||||
|
|
|
|||
|
|
@ -477,8 +477,6 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_SDAW693 "SDAW693"
|
||||
/** SDIW610 Card */
|
||||
#define CARD_SDIW610 "SDIW610"
|
||||
/** SDIW623 Card */
|
||||
#define CARD_SDIW623 "SDIW623"
|
||||
#endif
|
||||
|
||||
#ifdef PCIE
|
||||
|
|
@ -514,14 +512,16 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_PCIE9098 "PCIE9098"
|
||||
/** PCIEAW690 Card */
|
||||
#define CARD_PCIEAW690 "PCIEAW690"
|
||||
/** PCIEAW590 Card */
|
||||
#define CARD_PCIEAW590 "PCIEAW590"
|
||||
/** PCIEAW592 Card */
|
||||
#define CARD_PCIEAW592 "PCIEAW592"
|
||||
/** PCIEIW624 Card */
|
||||
#define CARD_PCIEIW624 "PCIEIW624"
|
||||
/** PCIEAW693 Card */
|
||||
#define CARD_PCIEAW693 "PCIEAW693"
|
||||
/** PCIEIW629 Card */
|
||||
#define CARD_PCIEIW629 "PCIEIW629"
|
||||
/** PCIEIW623 Card */
|
||||
#define CARD_PCIEIW623 "PCIEIW623"
|
||||
#endif
|
||||
|
||||
#ifdef USB
|
||||
|
|
@ -671,6 +671,7 @@ typedef enum {
|
|||
#define MIOCTL MBIT(7)
|
||||
#define MREG_D MBIT(9)
|
||||
#define MREG MBIT(10)
|
||||
#define MLSTATS MBIT(11)
|
||||
|
||||
#define MMPA_D MBIT(15)
|
||||
#define MDAT_D MBIT(16)
|
||||
|
|
@ -780,29 +781,6 @@ typedef struct _assoc_logger {
|
|||
#define SCAN_STATE_EXT_SCAN_STATUS MBIT(9)
|
||||
#define SCAN_STATE_SCAN_COMPLETE MBIT(10)
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/* Agiled channel switch state */
|
||||
typedef enum _agcs_state {
|
||||
/** AGCS is desabled */
|
||||
AGCS_STATE_IDLE = 0,
|
||||
/** AGCS is enabled */
|
||||
AGCS_STATE_START = 1,
|
||||
/**When FW sends AGCS event to notify the driver to prepare for channel
|
||||
switch.*/
|
||||
AGCS_STATE_TRIGGERED = 2,
|
||||
/** Start to scan the candidate channels */
|
||||
AGCS_STATE_IN_SCAN = 3,
|
||||
/** Receives the scan report */
|
||||
AGCS_STATE_SCAN_REPORT = 4,
|
||||
/** All candidate channels scanned done */
|
||||
AGCS_STATE_SCAN_DONE = 5,
|
||||
/** Start Channel Switch */
|
||||
AGCS_STATE_CSA_START = 6,
|
||||
/** Channel Switch Completed */
|
||||
AGCS_STATE_COMPLETE = 7,
|
||||
} agcs_state;
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
#ifdef USB
|
||||
/** mlan_usb_ep */
|
||||
typedef enum _mlan_usb_ep {
|
||||
|
|
@ -901,10 +879,6 @@ typedef enum _mlan_event_id {
|
|||
#endif /* SSU_SUPPORT */
|
||||
MLAN_EVENT_ID_CSI = 0x00000040,
|
||||
MLAN_EVENT_ID_FW_TX_BULK_STATUS = 0x00000043,
|
||||
#ifdef UAP_SUPPORT
|
||||
/* Agiled channel switch triggered */
|
||||
MLAN_EVENT_ID_FW_AGCS_TRIGGER = 0x00000044,
|
||||
#endif /* UAP_SUPPORT */
|
||||
/* Event generated by MLAN driver (MSB=1) */
|
||||
MLAN_EVENT_ID_DRV_CONNECTED = 0x80000001,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING = 0x80000002,
|
||||
|
|
@ -1076,6 +1050,15 @@ typedef enum _dfs_state_t {
|
|||
/** start freq for 5G */
|
||||
#define START_FREQ_11A_BAND 5000
|
||||
|
||||
typedef enum {
|
||||
TSP_STREAM_1X1 = 0,
|
||||
DTM_DC_THROTTLE_START = 1,
|
||||
TSP_PWR_BACKOFF_START = 2,
|
||||
DTM_DC_THROTTLE_END = 3,
|
||||
TSP_PWR_BACKOFF_END = 4,
|
||||
TSP_STREAM_2X2 = 5
|
||||
} tsp_state_t;
|
||||
|
||||
typedef enum _dfs_w53_cfg_t {
|
||||
/** DFS W53 Default Fw Value */
|
||||
DFS_W53_DEFAULT_FW = 0,
|
||||
|
|
@ -2827,6 +2810,8 @@ typedef struct _mlan_device {
|
|||
t_u32 max_seg_size;
|
||||
/* see blk_queue_max_segments */
|
||||
t_u16 max_segs;
|
||||
/** SDIO bus mode (0: Non-SPI mode, 1: SPI mode) */
|
||||
t_u8 spi_mode;
|
||||
#endif
|
||||
/** Auto deep sleep */
|
||||
t_u32 auto_ds;
|
||||
|
|
@ -2937,6 +2922,9 @@ MLAN_API mlan_status mlan_init_fw(t_void *padapter);
|
|||
/** Firmware Shutdown */
|
||||
MLAN_API mlan_status mlan_shutdown_fw(t_void *padapter);
|
||||
|
||||
/** Set driver status */
|
||||
MLAN_API t_void mlan_set_driver_status(t_void *adapter, t_u8 driver_status);
|
||||
|
||||
/** Main Process */
|
||||
MLAN_API mlan_status mlan_main_process(t_void *padapter);
|
||||
|
||||
|
|
|
|||
|
|
@ -223,10 +223,7 @@ ENUM_ELEMENT(EVENT_DUMMY_HOST_WAKEUP_SIGNAL, 0x0001),
|
|||
|
||||
ENUM_ELEMENT(EVENT_EMERGENCY_TEMP_REACHED, 0x00A9),
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Event ID: Agiled Channel Switch report */
|
||||
ENUM_ELEMENT(EVENT_AGCS_REPORT, 0x00AA),
|
||||
#endif /* UAP_SUPPORT */
|
||||
ENUM_ELEMENT(EVENT_TSP_CONFIG, 0x00AB),
|
||||
|
||||
#if defined(PCIE) || defined(SDIO)
|
||||
/** Card Event definition : In Band reset triggered by FW */
|
||||
|
|
|
|||
|
|
@ -933,8 +933,6 @@ enum host_cmd_id {
|
|||
#define FW_CAPINFO_EASY_MESH MBIT(21)
|
||||
/** FW cap info bit 22: ADDBA support with scan */
|
||||
#define FW_CAPINFO_ALLOW_ADDBA_RESP_ON_SCAN MBIT(22)
|
||||
/** FW cap info bit 23: MAC2 is not available */
|
||||
#define FW_CAPINFO_EXT_NO_MAC2 MBIT(23)
|
||||
|
||||
/** Check if 5G 1x1 only is supported by firmware */
|
||||
#define IS_FW_SUPPORT_5G_1X1_ONLY(_adapter) \
|
||||
|
|
@ -3706,6 +3704,16 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_csi_channel_bandcfg_t {
|
|||
t_u8 channel;
|
||||
} MLAN_PACK_END MrvlIEtypes_csi_channel_bandcfg_t;
|
||||
|
||||
/** MrvlIEtypes_csi_agc_conf */
|
||||
typedef MLAN_PACK_START struct _MrvlIEtypes_csi_agc_conf_t {
|
||||
/** Header */
|
||||
MrvlIEtypesHeader_t header;
|
||||
/** flag to Enable common AGC */
|
||||
t_u8 commonAGCflag;
|
||||
/** CSI format value */
|
||||
t_u8 csiformat;
|
||||
} MLAN_PACK_END MrvlIEtypes_csi_agc_conf_t;
|
||||
|
||||
/** HostCmd_CMD_CSI_START */
|
||||
typedef MLAN_PACK_START struct _HostCmd_DS_CSI_CFG {
|
||||
/** Action */
|
||||
|
|
@ -3722,6 +3730,8 @@ typedef MLAN_PACK_START struct _HostCmd_DS_CSI_CFG {
|
|||
mlan_csi_filter_t csi_filter[CSI_FILTER_MAX];
|
||||
/**channel and bandconfig*/
|
||||
MrvlIEtypes_csi_channel_bandcfg_t csi_channel_bandconfig;
|
||||
/**Common AGC flag and csi format config */
|
||||
MrvlIEtypes_csi_agc_conf_t csi_agc_config;
|
||||
} MLAN_PACK_END HostCmd_DS_CSI_CFG;
|
||||
|
||||
typedef MLAN_PACK_START struct _HostCmd_DS_HAL_PHY_CFG {
|
||||
|
|
@ -7550,7 +7560,7 @@ typedef MLAN_PACK_START struct _HostCmd_CMD_802_11_STA_TX_RATE {
|
|||
|
||||
/** actual number of entries in array */
|
||||
t_u16 num_entries;
|
||||
} MLAN_PACK_END HostCmd_CMD_802_11_STA_TX_RATE;
|
||||
} HostCmd_CMD_802_11_STA_TX_RATE;
|
||||
|
||||
/** HostCmd_MCLIENT_SCHEDULE_CFG */
|
||||
typedef MLAN_PACK_START struct _HostCmd_MCLIENT_SCHEDULE_CFG {
|
||||
|
|
@ -7562,42 +7572,7 @@ typedef MLAN_PACK_START struct _HostCmd_MCLIENT_SCHEDULE_CFG {
|
|||
|
||||
/** enable PS mode change reporting */
|
||||
t_u8 ps_mode_change_report;
|
||||
} MLAN_PACK_END HostCmd_MCLIENT_SCHEDULE_CFG;
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** HostCmd_DS_AGCS_CFG */
|
||||
typedef MLAN_PACK_START struct _HostCmd_DS_AGCS_CFG {
|
||||
/** action - get/set */
|
||||
t_u16 action;
|
||||
|
||||
/* BIT0 - Enable Agile channel switching in CarPlay
|
||||
* BIT1 - no specific interference type check, but only check Tx or Rx
|
||||
* throughput drop
|
||||
*/
|
||||
t_u32 features;
|
||||
|
||||
/* Adjust the weight of TX/RX average packet count */
|
||||
t_u8 avg_threshold_percentage;
|
||||
|
||||
/* The conservative amount of rx packet per second */
|
||||
t_u16 rx_min_pkt_count;
|
||||
|
||||
/* The conservative amount of tx packet per second */
|
||||
t_u16 tx_min_pkt_count;
|
||||
|
||||
/* Unit is ms */
|
||||
t_u32 sample_time;
|
||||
|
||||
/* The latest sampled windows size */
|
||||
t_u8 sample_count_window;
|
||||
|
||||
/* Continuous drop rapidly times */
|
||||
t_u8 continuous_hit_count;
|
||||
|
||||
/* Make sure a reasonable rate can be sustained. */
|
||||
t_s8 nf_margin;
|
||||
} MLAN_PACK_END HostCmd_DS_AGCS_CFG;
|
||||
#endif /* UAP_SUPPORT */
|
||||
} HostCmd_MCLIENT_SCHEDULE_CFG;
|
||||
|
||||
/** HostCmd_DS_COMMAND */
|
||||
typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND {
|
||||
|
|
@ -7899,10 +7874,6 @@ typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND {
|
|||
/** Auth, (Re)Assoc timeout configuration */
|
||||
HostCmd_DS_AUTH_ASSOC_TIMEOUT_CFG auth_assoc_cfg;
|
||||
t_u8 assoc_rsp_buf[ASSOC_RSP_BUF_SIZE];
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Agiled channel switch configuration */
|
||||
HostCmd_DS_AGCS_CFG agcs_cfg;
|
||||
#endif /* UAP_SUPPORT */
|
||||
} params;
|
||||
} MLAN_PACK_END HostCmd_DS_COMMAND, *pHostCmd_DS_COMMAND;
|
||||
|
||||
|
|
@ -7999,26 +7970,6 @@ typedef enum _BLOCK_6G_CHAN_SWITCH_REASON {
|
|||
BLOCK_6G_CHAN_SWITCH_REASON_STA_RX_ECSA = 4,
|
||||
} BLOCK_6G_CHAN_SWITCH_REASON;
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** FW trigger the agiled channel switch */
|
||||
#define AGCS_TYPE_CS_TRIGGER 0
|
||||
/** FW send current channel statistics */
|
||||
#define AGCS_TYPE_STATS_REPORT 1
|
||||
|
||||
/* Fw agcs statistics structure */
|
||||
typedef MLAN_PACK_START struct _agcs_stats_info_t {
|
||||
/** This is STATS_REPORT or CS_TRIGGER */
|
||||
t_u16 type;
|
||||
/** Channel utilization in the last 100ms */
|
||||
t_u16 ch_load;
|
||||
/** noise in the last 100ms */
|
||||
t_s16 noise;
|
||||
/** nf_threshold is used to check the noise floor of candidate channels
|
||||
*/
|
||||
t_s16 nf_threshold;
|
||||
} MLAN_PACK_END agcs_stats_info_t;
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
#ifdef PRAGMA_PACK
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -482,12 +482,6 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
/** Host Command ID : HS Event masking configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_HS_EVENT_MASK, 0x028a),
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Host Command ID : Agiled channel switch configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_AGCS_CFG, 0x0293),
|
||||
#endif
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_NAV_MITIGATION_HW_CFG, 0x0294),
|
||||
|
||||
/* Always keep this last */
|
||||
ENUM_ELEMENT_LAST(__HostCmd_CMD_Last)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* definitions used in MLAN and MOAL module.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2024 NXP
|
||||
* Copyright 2008-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
|
|||
|
|
@ -1584,7 +1584,6 @@ mlan_status wlan_init_fw(pmlan_adapter pmadapter)
|
|||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (((pmadapter->card_type) & 0xff) == CARD_TYPE_AW693) {
|
||||
ret = wlan_prepare_cmd(priv, HostCmd_CMD_FUNC_INIT,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL, MNULL);
|
||||
|
|
@ -1645,10 +1644,7 @@ static void wlan_update_hw_spec(pmlan_adapter pmadapter)
|
|||
pmadapter->fw_bands |= BAND_AN;
|
||||
if (!(pmadapter->fw_bands & BAND_G) && (pmadapter->fw_bands & BAND_GN))
|
||||
pmadapter->fw_bands &= ~BAND_GN;
|
||||
if (!(pmadapter->fw_bands & BAND_A) && (pmadapter->fw_bands & BAND_AAC))
|
||||
pmadapter->fw_bands &= ~BAND_AAC;
|
||||
if (!(pmadapter->fw_bands & BAND_G) && (pmadapter->fw_bands & BAND_GAC))
|
||||
pmadapter->fw_bands &= ~BAND_GAC;
|
||||
|
||||
pmadapter->config_bands = pmadapter->fw_bands;
|
||||
for (i = 0; i < pmadapter->priv_num; i++) {
|
||||
if (pmadapter->priv[i]) {
|
||||
|
|
|
|||
|
|
@ -396,11 +396,8 @@ enum _mlan_ioctl_req_id {
|
|||
|
||||
MLAN_OID_MISC_PREV_ASSOC_INFO = 0x0020009A,
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
MLAN_OID_MISC_AGCS_CONFIG = 0x0020009C,
|
||||
#endif /* UAP_SUPPORT */
|
||||
MLAN_OID_MISC_NAV_MITIGATION_HW = 0x0020009C,
|
||||
|
||||
MLAN_OID_MISC_NAV_MITIGATION_HW = 0x0020009D,
|
||||
};
|
||||
|
||||
/** Sub command size */
|
||||
|
|
@ -6010,6 +6007,10 @@ typedef MLAN_PACK_START struct _mlan_ds_csi_params {
|
|||
/** CSI data received in cfg channel with mac addr filter, not only RA
|
||||
* is us or other*/
|
||||
t_u8 ra4us;
|
||||
/** flag to enable common AGC */
|
||||
t_u8 commonAGCflag;
|
||||
/** CSI format */
|
||||
t_u8 csiformat;
|
||||
/** CSI filters */
|
||||
mlan_csi_filter_t csi_filter[CSI_FILTER_MAX];
|
||||
} MLAN_PACK_END mlan_ds_csi_params;
|
||||
|
|
@ -6585,33 +6586,6 @@ typedef struct _mlan_ds_auth_assoc_timeout_cfg {
|
|||
t_u16 retry_timeout;
|
||||
} mlan_ds_auth_assoc_timeout_cfg;
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Agiled channel switch configuration parameters */
|
||||
typedef struct _mlan_ds_agcs_cfg {
|
||||
/**agcs cfg action 0-GET, 1-SET */
|
||||
t_u16 action;
|
||||
/* BIT0 - Enable Agile channel switching in CarPlay
|
||||
* BIT1 - no specific interference type check, but only check Tx or Rx
|
||||
* throughput drop
|
||||
*/
|
||||
t_u32 features;
|
||||
/* Adjust the weight of TX/RX average packet count */
|
||||
t_u8 avg_threshold_percentage;
|
||||
/* The requires at least average rx packets per second */
|
||||
t_u16 rx_min_pkt_count;
|
||||
/* The requires at least average tx packets per second */
|
||||
t_u16 tx_min_pkt_count;
|
||||
/* Unit is ms */
|
||||
t_u32 sample_time;
|
||||
/* The latest sampled windows size */
|
||||
t_u8 sample_count_window;
|
||||
/* Continuous drop rapidly times */
|
||||
t_u8 continuous_hit_count;
|
||||
/* Make sure a reasonable rate can be sustained. */
|
||||
t_s8 nf_margin;
|
||||
} mlan_ds_agcs_cfg;
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
/** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */
|
||||
typedef struct _mlan_ds_misc_cfg {
|
||||
/** Sub-command */
|
||||
|
|
@ -6793,10 +6767,6 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
mlan_ds_ed_mac_cfg edmac_cfg;
|
||||
mlan_ds_gpio_cfg_ops gpio_cfg_ops;
|
||||
mlan_ds_auth_assoc_timeout_cfg auth_assoc_cfg;
|
||||
#ifdef UAP_SUPPORT
|
||||
/** config AGCS for MLAN_OID_MISC_AGCS_CONFIG */
|
||||
mlan_ds_agcs_cfg agcs_cfg;
|
||||
#endif /* UAP_SUPPORT */
|
||||
} param;
|
||||
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;
|
||||
|
||||
|
|
@ -6835,34 +6805,4 @@ typedef struct _mlan_cfpinfo {
|
|||
#define MLAN_REASON_CLASS3_FRAME_FROM_NOASSOC_STA 7
|
||||
#define MLAN_REASON_DISASSOC_STA_HAS_LEFT 8
|
||||
#define MLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/* Processing AGCS report */
|
||||
#define AGCS_EVENT_TYPE_PROCESS_EVENT 1
|
||||
/* After AGCS scan, select and switch to new channel */
|
||||
#define AGCS_EVENT_TYPE_SEL_CHANNEL 2
|
||||
|
||||
/** Type definition of agcs_stats for agcs_event */
|
||||
typedef struct _agcs_stats {
|
||||
/** All STAs support ECS */
|
||||
t_u8 all_sta_ecs;
|
||||
/** All STAs support 6g */
|
||||
t_u8 all_sta_6g;
|
||||
/** ch_load of current channel */
|
||||
t_u16 ch_load;
|
||||
/** noise of current channel */
|
||||
t_s16 noise;
|
||||
/** The noise floor threshold currently used by fw */
|
||||
t_s16 nf_threshold;
|
||||
} agcs_stats, *pagcs_stats;
|
||||
|
||||
/** Type definition of agcs_event for WOAL_EVENT_AGCS */
|
||||
typedef struct _agcs_event {
|
||||
/** AGCS_EVENT_TYPE_PROCESS_EVENT or AGCS_EVENT_TYPE_SEL_CHANNEL */
|
||||
t_u32 type;
|
||||
/** AGCS stats info */
|
||||
agcs_stats stats;
|
||||
} agcs_event, *pagcs_event;
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
#endif /* !_MLAN_IOCTL_H_ */
|
||||
|
|
|
|||
|
|
@ -1063,7 +1063,6 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
IEEEtypes_CapInfo_t *pcap_info;
|
||||
t_u8 ft_akm = 0;
|
||||
t_u8 oper_class;
|
||||
t_u8 global_oper_class;
|
||||
t_u8 oper_class_flag = MFALSE;
|
||||
t_u8 akm_type = 0;
|
||||
MrvlIEtypes_HostMlme_t *host_mlme_tlv = MNULL;
|
||||
|
|
@ -1474,8 +1473,7 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
pmpriv,
|
||||
pbss_desc->phy_param_set.ds_param_set
|
||||
.current_chan,
|
||||
pbss_desc->curr_bandwidth, &oper_class,
|
||||
&global_oper_class))
|
||||
pbss_desc->curr_bandwidth, &oper_class))
|
||||
wlan_add_supported_oper_class_ie(pmpriv, &pos,
|
||||
oper_class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -610,9 +610,9 @@ extern t_void (*assert_callback)(t_void *pmoal_handle, t_u32 cond);
|
|||
#define MIN_BA_THRESHOLD 16
|
||||
|
||||
/** High threshold at which to start drop packets */
|
||||
#define RX_HIGH_THRESHOLD 8192
|
||||
#define RX_HIGH_THRESHOLD 1024
|
||||
/** Low threshold to allow Rx BA */
|
||||
#define RX_LOW_THRESHOLD 1024
|
||||
#define RX_LOW_THRESHOLD 128
|
||||
|
||||
#define MFG_CMD_SET_TEST_MODE 1
|
||||
#define MFG_CMD_UNSET_TEST_MODE 0
|
||||
|
|
@ -1651,6 +1651,8 @@ struct _sta_node {
|
|||
IEEEtypes_HTInfo_t HTInfo;
|
||||
/** peer BSSCO_20_40*/
|
||||
IEEEtypes_2040BSSCo_t BSSCO_20_40;
|
||||
/*Extended capability*/
|
||||
IEEEtypes_ExtCap_t ExtCap;
|
||||
/*RSN IE*/
|
||||
IEEEtypes_Generic_t rsn_ie;
|
||||
/**Link ID*/
|
||||
|
|
@ -1682,10 +1684,6 @@ struct _sta_node {
|
|||
t_u8 vendor_oui[VENDOR_OUI_LEN * MAX_VENDOR_OUI_NUM];
|
||||
/** vendor OUI count */
|
||||
t_u8 vendor_oui_count;
|
||||
/* Support operating class IE */
|
||||
IEEEtypes_Generic_t OperClass;
|
||||
/*Extended capability*/
|
||||
IEEEtypes_ExtCap_t ExtCap;
|
||||
};
|
||||
|
||||
/** 802.11h State information kept in the 'mlan_adapter' driver structure */
|
||||
|
|
@ -2244,6 +2242,8 @@ typedef struct _mlan_sdio_card {
|
|||
t_bool sdio_rx_aggr_enable;
|
||||
/** fw rx block size */
|
||||
t_u16 sdio_rx_block_size;
|
||||
/** SDIO bus mode (0: Non-SPI mode, 1: SPI mode) */
|
||||
t_u8 spi_mode;
|
||||
} mlan_sdio_card, *pmlan_sdio_card;
|
||||
#endif
|
||||
|
||||
|
|
@ -2509,6 +2509,7 @@ struct _mlan_adapter {
|
|||
t_void *pmlan_lock;
|
||||
/** main_proc_lock for main_process */
|
||||
t_void *pmain_proc_lock;
|
||||
/** selected mlan bss */
|
||||
mlan_private *selected_mlan_bss;
|
||||
#ifdef PCIE
|
||||
/** rx data lock to synchronize wlan_pcie_process_recv_data */
|
||||
|
|
@ -2534,6 +2535,8 @@ struct _mlan_adapter {
|
|||
/** pcie lock to synchronize rxbd_wr_ptr and txbd_wr_ptr */
|
||||
t_void *pmlan_pcie_lock;
|
||||
#endif
|
||||
/** driver status */
|
||||
t_u8 driver_status;
|
||||
/** mlan_processing */
|
||||
t_u32 mlan_processing;
|
||||
/** main_process_cnt */
|
||||
|
|
@ -3112,7 +3115,7 @@ struct _mlan_adapter {
|
|||
/** LLDE enable/disable */
|
||||
t_u8 llde_enabled;
|
||||
/** LLDE modes 0 - default; 1 - carplay; 2 - gameplay; 3 - sound bar, 4
|
||||
* - validation, 5- event driven */
|
||||
* <EFBFBD> validation, 5- event driven */
|
||||
t_u8 llde_mode;
|
||||
/** high priority data packet type. 0: All traffic, 1: ping, 2: TCP ACK,
|
||||
* 4: TCP Data, 8: UDP */
|
||||
|
|
@ -3128,10 +3131,6 @@ struct _mlan_adapter {
|
|||
/** iPhone device list */
|
||||
t_u8 llde_iphonefilters[MAX_IPHONE_FILTER_ENTRIES *
|
||||
MLAN_MAC_ADDR_LENGTH];
|
||||
#ifdef UAP_SUPPORT
|
||||
/** agiled channel switch info */
|
||||
agcs_stats agcs_info;
|
||||
#endif /* UAP_SUPPORT */
|
||||
};
|
||||
|
||||
/** IPv4 ARP request header */
|
||||
|
|
@ -4543,8 +4542,7 @@ mlan_status wlan_ret_boot_sleep(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
int wlan_add_supported_oper_class_ie(mlan_private *pmpriv, t_u8 **pptlv_out,
|
||||
t_u8 curr_oper_class);
|
||||
mlan_status wlan_get_curr_oper_class(mlan_private *pmpriv, t_u8 channel,
|
||||
t_u8 bw, t_u8 *oper_class,
|
||||
t_u8 *global_oper_class);
|
||||
t_u8 bw, t_u8 *oper_class);
|
||||
mlan_status wlan_check_operclass_validation(mlan_private *pmpriv, t_u8 channel,
|
||||
t_u8 oper_class, t_u8 bandwidth);
|
||||
mlan_status wlan_misc_ioctl_operclass_validation(pmlan_adapter pmadapter,
|
||||
|
|
@ -4901,12 +4899,6 @@ typedef enum _delay_unit {
|
|||
SEC,
|
||||
} t_delay_unit;
|
||||
|
||||
enum tls_message_id {
|
||||
TLS_HOST_HELLO = 1,
|
||||
TLS_DEVICE_HELLO = 2,
|
||||
TLS_HOST_FINISHED = 3,
|
||||
};
|
||||
|
||||
/** delay function */
|
||||
t_void wlan_delay_func(mlan_adapter *pmadapter, t_u32 delay, t_delay_unit u);
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ t_u8 fw_data_dpd_current_opt[FW_DATA_DPD_CURRENT_OPT_LEN] = {
|
|||
0x93, 0xCC, 0x0E, 0xB8, 0xF8, 0xAF, 0x00, 0xB0, 0xCC, 0x1B, 0x6A, 0x41,
|
||||
0xFC, 0xAF, 0x00, 0xB0, 0x01, 0x00, 0x00, 0x00, 0xF5, 0x1D, 0xBA, 0x80};
|
||||
#endif
|
||||
|
||||
#define FCS_SIZE (4)
|
||||
/********************************************************
|
||||
Local Functions
|
||||
********************************************************/
|
||||
|
|
@ -3413,6 +3413,8 @@ mlan_status wlan_process_802dot11_mgmt_pkt(mlan_private *priv, t_u8 *payload,
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
if (pmadapter->enable_net_mon)
|
||||
payload_len -= FCS_SIZE;
|
||||
switch (sub_type) {
|
||||
case SUBTYPE_ASSOC_REQUEST:
|
||||
case SUBTYPE_REASSOC_REQUEST:
|
||||
|
|
@ -4168,8 +4170,6 @@ void wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent,
|
|||
(MrvlIEtypesHeader_t *)(pevent->pbuf + pevent->data_offset +
|
||||
ASSOC_EVENT_FIX_SIZE);
|
||||
MrvlIETypes_MgmtFrameSet_t *mgmt_tlv = MNULL;
|
||||
IEEEtypes_ExtCap_t *pExtCap = MNULL;
|
||||
IEEEtypes_Generic_t *pOperClass = MNULL;
|
||||
|
||||
ENTER();
|
||||
while (tlv_buf_left >= (int)sizeof(MrvlIEtypesHeader_t)) {
|
||||
|
|
@ -4365,57 +4365,6 @@ void wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent,
|
|||
priv->adapter, assoc_req_ie, ie_len,
|
||||
&sta_ptr->multi_ap_ie);
|
||||
#endif
|
||||
pExtCap = (IEEEtypes_ExtCap_t *)
|
||||
wlan_get_specific_ie(priv, assoc_req_ie,
|
||||
ie_len,
|
||||
EXT_CAPABILITY, 0);
|
||||
if (pExtCap) {
|
||||
memcpy_ext(
|
||||
priv->adapter,
|
||||
(t_u8 *)&sta_ptr->ExtCap,
|
||||
pExtCap,
|
||||
pExtCap->ieee_hdr.len +
|
||||
sizeof(IEEEtypes_Header_t),
|
||||
sizeof(IEEEtypes_ExtCap_t));
|
||||
sta_ptr->ExtCap.ieee_hdr.len = MIN(
|
||||
pExtCap->ieee_hdr.len,
|
||||
sizeof(IEEEtypes_ExtCap_t) -
|
||||
sizeof(IEEEtypes_Header_t));
|
||||
PRINTM(MCMND,
|
||||
"Check STA capab mac_addr" MACSTR
|
||||
" ExtChanSwitching:%d\n",
|
||||
MAC2STR(sta_ptr->mac_addr),
|
||||
sta_ptr->ExtCap.ext_cap
|
||||
.ExtChanSwitching);
|
||||
} else {
|
||||
PRINTM(MCMND,
|
||||
"STA doesn't support EXT_CAPABILITY\n");
|
||||
}
|
||||
|
||||
pOperClass = (IEEEtypes_Generic_t *)
|
||||
wlan_get_specific_ie(priv, assoc_req_ie,
|
||||
ie_len,
|
||||
REGULATORY_CLASS,
|
||||
0);
|
||||
if (pOperClass) {
|
||||
memcpy_ext(
|
||||
priv->adapter,
|
||||
(t_u8 *)&sta_ptr->OperClass,
|
||||
pOperClass,
|
||||
pOperClass->ieee_hdr.len +
|
||||
sizeof(MrvlIEtypesHeader_t),
|
||||
sizeof(IEEEtypes_Generic_t));
|
||||
sta_ptr->OperClass.ieee_hdr.len = MIN(
|
||||
pOperClass->ieee_hdr.len,
|
||||
sizeof(IEEEtypes_Generic_t) -
|
||||
sizeof(IEEEtypes_Header_t));
|
||||
PRINTM(MCMND,
|
||||
"Check STA capab OperClass:%d",
|
||||
sta_ptr->OperClass.data[0]);
|
||||
} else {
|
||||
PRINTM(MCMND,
|
||||
"STA doesn't support REGULATORY_CLASS\n");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -7337,7 +7286,7 @@ mlan_status wlan_misc_ioctl_oper_class(pmlan_adapter pmadapter,
|
|||
{
|
||||
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
t_u8 channel, bandwidth, oper_class = 0, global_oper_class = 0;
|
||||
t_u8 channel, bandwidth, oper_class = 0;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
|
@ -7361,7 +7310,7 @@ mlan_status wlan_misc_ioctl_oper_class(pmlan_adapter pmadapter,
|
|||
|
||||
if (pioctl_req->action == MLAN_ACT_GET) {
|
||||
ret = wlan_get_curr_oper_class(pmpriv, channel, bandwidth,
|
||||
&oper_class, &global_oper_class);
|
||||
&oper_class);
|
||||
misc->param.bw_chan_oper.oper_class = oper_class;
|
||||
} else {
|
||||
PRINTM(MERROR, "Unsupported cmd_action\n");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file declares the exported symbols from MLAN.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2021, 2025 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,7 @@ EXPORT_SYMBOL(mlan_recv);
|
|||
#endif
|
||||
EXPORT_SYMBOL(mlan_send_packet);
|
||||
EXPORT_SYMBOL(mlan_ioctl);
|
||||
EXPORT_SYMBOL(mlan_set_driver_status);
|
||||
EXPORT_SYMBOL(mlan_main_process);
|
||||
EXPORT_SYMBOL(mlan_rx_process);
|
||||
EXPORT_SYMBOL(mlan_select_wmm_queue);
|
||||
|
|
|
|||
|
|
@ -965,6 +965,11 @@ static t_u8 wlan_scan_create_channel_list(
|
|||
if (cfp->dynamic.flags & NXP_CHANNEL_DISABLED)
|
||||
continue;
|
||||
|
||||
/* Make sure null channel entries are not added into
|
||||
* pscan_chan_list */
|
||||
if (!cfp->channel)
|
||||
continue;
|
||||
|
||||
if ((pscan_region->band == BAND_6G) &&
|
||||
(pmadapter->wifi_6g_scan_coloc_ap)) {
|
||||
if (!wlan_scan_add_6g_chan(
|
||||
|
|
@ -1943,7 +1948,6 @@ static mlan_status wlan_scan_setup_scan_config(
|
|||
if (pmpriv->adapter->ecsa_enable) {
|
||||
t_u8 bandwidth = BW_20MHZ;
|
||||
t_u8 oper_class = 1;
|
||||
t_u8 global_oper_class = 0;
|
||||
t_u32 usr_dot_11n_dev_cap;
|
||||
if (pmpriv->media_connected) {
|
||||
if (pmpriv->config_bands & BAND_A)
|
||||
|
|
@ -1962,7 +1966,7 @@ static mlan_status wlan_scan_setup_scan_config(
|
|||
wlan_get_curr_oper_class(
|
||||
pmpriv,
|
||||
pmpriv->curr_bss_params.bss_descriptor.channel,
|
||||
bandwidth, &oper_class, &global_oper_class);
|
||||
bandwidth, &oper_class);
|
||||
}
|
||||
wlan_add_supported_oper_class_ie(pmpriv, &ptlv_pos, oper_class);
|
||||
}
|
||||
|
|
@ -8693,7 +8697,6 @@ mlan_status wlan_cmd_bgscan_config(mlan_private *pmpriv,
|
|||
t_u8 bandwidth = BW_20MHZ;
|
||||
t_u8 oper_class = 1;
|
||||
t_u32 usr_dot_11n_dev_cap;
|
||||
t_u8 global_oper_class = 0;
|
||||
if (pmpriv->media_connected) {
|
||||
if (pmpriv->config_bands & BAND_A)
|
||||
usr_dot_11n_dev_cap =
|
||||
|
|
@ -8711,7 +8714,7 @@ mlan_status wlan_cmd_bgscan_config(mlan_private *pmpriv,
|
|||
wlan_get_curr_oper_class(
|
||||
pmpriv,
|
||||
pmpriv->curr_bss_params.bss_descriptor.channel,
|
||||
bandwidth, &oper_class, &global_oper_class);
|
||||
bandwidth, &oper_class);
|
||||
}
|
||||
len = wlan_add_supported_oper_class_ie(pmpriv, &tlv,
|
||||
oper_class);
|
||||
|
|
|
|||
|
|
@ -363,6 +363,7 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
}
|
||||
pmadapter->pcard_sd->max_blk_count = pmdevice->max_blk_count;
|
||||
pmadapter->pcard_sd->sdio_blk_size = pmdevice->sdio_blk_size;
|
||||
pmadapter->pcard_sd->spi_mode = pmdevice->spi_mode;
|
||||
pmadapter->pcard_sd->max_segs = pmdevice->max_segs;
|
||||
pmadapter->pcard_sd->max_seg_size = pmdevice->max_seg_size;
|
||||
|
||||
|
|
@ -373,6 +374,10 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* By default BA timeout is supported unless FW reports it as not
|
||||
* supported in multi-client capabilites */
|
||||
pmadapter->tx_ba_timeout_support = 1;
|
||||
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type)) {
|
||||
MASSERT(pcb->moal_malloc_consistent);
|
||||
|
|
@ -579,6 +584,7 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
pmadapter->driver_status = MFALSE;
|
||||
/* Return pointer of mlan_adapter to MOAL */
|
||||
*ppmlan_adapter = pmadapter;
|
||||
|
||||
|
|
@ -1374,7 +1380,7 @@ process_start:
|
|||
(pmadapter->tx_lock_flag == MTRUE))
|
||||
break;
|
||||
|
||||
if (pmadapter->data_sent ||
|
||||
if (pmadapter->data_sent || pmadapter->driver_status ||
|
||||
wlan_is_tdls_link_chan_switching(
|
||||
pmadapter->tdls_status) ||
|
||||
(wlan_bypass_tx_list_empty(pmadapter) &&
|
||||
|
|
@ -1432,6 +1438,8 @@ process_start:
|
|||
wlan_release_event_lock(pmadapter);
|
||||
}
|
||||
#endif
|
||||
if (pmadapter->driver_status)
|
||||
continue;
|
||||
/* Check if we need to confirm Sleep Request received previously
|
||||
*/
|
||||
if (pmadapter->ps_state == PS_STATE_PRE_SLEEP)
|
||||
|
|
@ -2067,6 +2075,22 @@ void mlan_process_deaggr_pkt(t_void *padapter, pmlan_buffer pmbuf, t_u8 *drop)
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set driver status
|
||||
*
|
||||
* @param padapter A pointer to mlan_adapter structure
|
||||
* @param driver_status Driver status
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void mlan_set_driver_status(t_void *adapter, t_u8 driver_status)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)adapter;
|
||||
ENTER();
|
||||
pmadapter->driver_status = driver_status;
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
/**
|
||||
* @brief This function gets interrupt status.
|
||||
|
|
|
|||
|
|
@ -4501,7 +4501,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_auth_assoc_timeout_cfg(pmpriv, cmd_ptr,
|
||||
cmd_action, pdata_buf);
|
||||
break;
|
||||
|
||||
default:
|
||||
PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
|
|
|||
|
|
@ -737,6 +737,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
t_u16 enable = 0;
|
||||
Event_Link_Lost *link_lost_evt = MNULL;
|
||||
remain_on_channel_info *roc_info = MNULL;
|
||||
t_u8 tsp_status = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -1558,6 +1559,35 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
PRINTM(MEVENT, "EVENT: EVENT_IMD3_CAL_END\n");
|
||||
break;
|
||||
|
||||
case EVENT_TSP_CONFIG:
|
||||
evt_buf =
|
||||
(pmbuf->pbuf + pmbuf->data_offset + sizeof(eventcause));
|
||||
tsp_status = evt_buf[4];
|
||||
switch (tsp_status) {
|
||||
case TSP_PWR_BACKOFF_START:
|
||||
PRINTM(MEVENT,
|
||||
"EVENT: EVENT_TSP_POWER_BACKOFF_START\n");
|
||||
break;
|
||||
case TSP_PWR_BACKOFF_END:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_TSP_POWER_BACKOFF_END\n");
|
||||
break;
|
||||
case TSP_STREAM_1X1:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_NOTIFY_STREAM_1X1\n");
|
||||
break;
|
||||
case TSP_STREAM_2X2:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_NOTIFY_STREAM_2X2\n");
|
||||
break;
|
||||
case DTM_DC_THROTTLE_START:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_DTM_DC_THROTTLE_ENABLE\n");
|
||||
break;
|
||||
case DTM_DC_THROTTLE_END:
|
||||
PRINTM(MEVENT,
|
||||
"EVENT: EVENT_DTM_DC_THROTTLE_DISABLE\n");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case EVENT_EMERGENCY_TEMP_REACHED:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_EMERGENCY_TEMP_REACHED\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -680,6 +680,7 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
/* Endian conversion */
|
||||
endian_convert_RxPD(prx_pd);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains TLV ID definitions.
|
||||
*
|
||||
*
|
||||
* Copyright 2023-2024 NXP
|
||||
* Copyright 2023-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -506,5 +506,6 @@
|
|||
|
||||
#define VENDOR_IE_OUIS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 357) /* 0x0265 */
|
||||
#define TLV_TYPE_AP_INFO (PROPRIETARY_TLV_BASE_ID + 358) /* 0x0266 */
|
||||
#define TLV_TYPE_CSI_AGC_CONFIG (PROPRIETARY_TLV_BASE_ID + 363) /* 0x026b */
|
||||
|
||||
#endif /* !MLAN_TLV_IDS_H_ */
|
||||
|
|
|
|||
|
|
@ -1621,7 +1621,6 @@ static mlan_status wlan_uap_cmd_sys_configure(pmlan_private pmpriv,
|
|||
MrvlIEtypes_chan_bw_oper_t *poper_class_tlv = MNULL;
|
||||
t_u8 length = 0;
|
||||
t_u8 curr_oper_class = 1;
|
||||
t_u8 global_oper_class = 0;
|
||||
t_u8 *oper_class_ie = (t_u8 *)sys_config->tlv_buffer;
|
||||
t_u16 i = 0;
|
||||
t_u8 ac = 0;
|
||||
|
|
@ -1809,7 +1808,7 @@ static mlan_status wlan_uap_cmd_sys_configure(pmlan_private pmpriv,
|
|||
poper_class_tlv->ds_chan_bw_oper.channel,
|
||||
poper_class_tlv->ds_chan_bw_oper
|
||||
.bandwidth,
|
||||
&curr_oper_class, &global_oper_class);
|
||||
&curr_oper_class);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"Can not get current oper class! bandwidth = %d, channel = %d\n",
|
||||
|
|
@ -4662,6 +4661,7 @@ static mlan_status wlan_uap_cmd_add_station(pmlan_private pmpriv,
|
|||
MrvlIETypes_HTCap_t *phtcap;
|
||||
MrvlIETypes_VHTCap_t *pvhtcap;
|
||||
MrvlIEtypes_Extension_t *pext_tlv = MNULL;
|
||||
MrvlIEtypes_He_6g_cap_t *phe_6g_cap = MNULL;
|
||||
MrvlIEtypes_StaFlag_t *pstaflag;
|
||||
int i;
|
||||
|
||||
|
|
@ -4773,7 +4773,6 @@ static mlan_status wlan_uap_cmd_add_station(pmlan_private pmpriv,
|
|||
sta_ptr->is_11ax_enabled = MTRUE;
|
||||
PRINTM(MCMND, "ADD_STA supports 11ax\n");
|
||||
} else if (pext_tlv->ext_id == HE_6G_CAPABILITY) {
|
||||
MrvlIEtypes_He_6g_cap_t *phe_6g_cap = MNULL;
|
||||
phe_6g_cap = (MrvlIEtypes_He_6g_cap_t *)tlv;
|
||||
if (GET_6G_BAND_CAP_MAXMPDULEN(
|
||||
phe_6g_cap->capa) == 2)
|
||||
|
|
@ -4874,6 +4873,8 @@ static mlan_status wlan_uap_cmd_add_station(pmlan_private pmpriv,
|
|||
sta_ptr->bandmode = BAND_GAX;
|
||||
else
|
||||
sta_ptr->bandmode = BAND_AAX;
|
||||
if (phe_6g_cap)
|
||||
sta_ptr->bandmode = BAND_6G;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_NUM_TID; i++) {
|
||||
|
|
@ -5041,238 +5042,6 @@ static mlan_status wlan_ret_stats(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of uap agcs 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
|
||||
*/
|
||||
static mlan_status wlan_uap_ret_agcs_cfg(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
HostCmd_DS_AGCS_CFG *pcmd_agcs_cfg =
|
||||
(HostCmd_DS_AGCS_CFG *)&resp->params.agcs_cfg;
|
||||
mlan_ds_misc_cfg *misc_cfg = MNULL;
|
||||
mlan_ds_agcs_cfg *pagcs_cfg = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_buf && pioctl_buf->action == MLAN_ACT_GET) {
|
||||
misc_cfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||
pagcs_cfg = (mlan_ds_agcs_cfg *)&misc_cfg->param.agcs_cfg;
|
||||
pagcs_cfg->features = wlan_le32_to_cpu(pcmd_agcs_cfg->features);
|
||||
pagcs_cfg->avg_threshold_percentage =
|
||||
pcmd_agcs_cfg->avg_threshold_percentage;
|
||||
pagcs_cfg->rx_min_pkt_count =
|
||||
wlan_le16_to_cpu(pcmd_agcs_cfg->rx_min_pkt_count);
|
||||
pagcs_cfg->tx_min_pkt_count =
|
||||
wlan_le16_to_cpu(pcmd_agcs_cfg->tx_min_pkt_count);
|
||||
pagcs_cfg->sample_time =
|
||||
wlan_le32_to_cpu(pcmd_agcs_cfg->sample_time);
|
||||
pagcs_cfg->sample_count_window =
|
||||
pcmd_agcs_cfg->sample_count_window;
|
||||
pagcs_cfg->continuous_hit_count =
|
||||
pcmd_agcs_cfg->continuous_hit_count;
|
||||
pagcs_cfg->nf_margin = pcmd_agcs_cfg->nf_margin;
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command of AGCS_CFG
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action
|
||||
* @param pdata_buf A pointer to data buffer
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status wlan_cmd_apcmd_agcs_cfg(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_AGCS_CFG *pcmd_agcs_cfg =
|
||||
(HostCmd_DS_AGCS_CFG *)&cmd->params.agcs_cfg;
|
||||
mlan_ds_agcs_cfg *pagcs_cfg = (mlan_ds_agcs_cfg *)pdata_buf;
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_APCMD_AGCS_CFG);
|
||||
cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_CMD_APCMD_AGCS_CFG) +
|
||||
S_DS_GEN + sizeof(HostCmd_DS_AGCS_CFG));
|
||||
|
||||
pcmd_agcs_cfg->action = wlan_cpu_to_le16(cmd_action);
|
||||
pcmd_agcs_cfg->features = wlan_cpu_to_le32(pagcs_cfg->features);
|
||||
pcmd_agcs_cfg->avg_threshold_percentage =
|
||||
pagcs_cfg->avg_threshold_percentage;
|
||||
pcmd_agcs_cfg->rx_min_pkt_count =
|
||||
wlan_cpu_to_le32(pagcs_cfg->rx_min_pkt_count);
|
||||
pcmd_agcs_cfg->tx_min_pkt_count =
|
||||
wlan_cpu_to_le32(pagcs_cfg->tx_min_pkt_count);
|
||||
pcmd_agcs_cfg->sample_time = wlan_cpu_to_le32(pagcs_cfg->sample_time);
|
||||
pcmd_agcs_cfg->sample_count_window = pagcs_cfg->sample_count_window;
|
||||
pcmd_agcs_cfg->continuous_hit_count = pagcs_cfg->continuous_hit_count;
|
||||
pcmd_agcs_cfg->nf_margin = pagcs_cfg->nf_margin;
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handle the agiled cs event
|
||||
*
|
||||
* @param priv A pointer to mlan_private structure
|
||||
* @param pbuf A pointer to mlan_buffer which has event content.
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status wlan_process_agcs_event(pmlan_private priv,
|
||||
pmlan_buffer pmbuf)
|
||||
{
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
t_u8 *evt_buf = MNULL;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
pmlan_event pevent;
|
||||
pagcs_event pacs_start_event = MNULL;
|
||||
agcs_stats_info_t *stats = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
stats = (agcs_stats_info_t *)(pmbuf->pbuf + pmbuf->data_offset +
|
||||
sizeof(t_u32));
|
||||
|
||||
if (stats->type == AGCS_TYPE_STATS_REPORT) {
|
||||
PRINTM(MMSG,
|
||||
"AGCS stats report ch_load=%d, noise=%d, nf_threshold=%d",
|
||||
stats->ch_load, stats->noise, stats->nf_threshold);
|
||||
goto done;
|
||||
} else if (stats->type == AGCS_TYPE_CS_TRIGGER) {
|
||||
/* Allocate memory for event buffer */
|
||||
status = pcb->moal_malloc(pmadapter->pmoal_handle,
|
||||
MAX_EVENT_SIZE, MLAN_MEM_DEF,
|
||||
&evt_buf);
|
||||
if ((status == MLAN_STATUS_SUCCESS) && evt_buf) {
|
||||
sta_node *sta_ptr;
|
||||
t_u8 oper_class = 0;
|
||||
t_u8 global_oper_class = 0;
|
||||
t_u8 bandwidth;
|
||||
|
||||
if (wlan_is_station_list_empty(priv)) {
|
||||
PRINTM(MERROR, "Not found any connected STA");
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
sta_ptr = (sta_node *)util_peek_list(
|
||||
priv->adapter->pmoal_handle, &priv->sta_list,
|
||||
priv->adapter->callbacks.moal_spin_lock,
|
||||
priv->adapter->callbacks.moal_spin_unlock);
|
||||
if (!sta_ptr) {
|
||||
PRINTM(MERROR, "Not found any connected STA");
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
pevent = (pmlan_event)evt_buf;
|
||||
pacs_start_event = (pagcs_event)pevent->event_buf;
|
||||
pacs_start_event->type = AGCS_EVENT_TYPE_PROCESS_EVENT;
|
||||
pacs_start_event->stats.ch_load =
|
||||
(t_u16)wlan_le16_to_cpu(stats->ch_load);
|
||||
pacs_start_event->stats.noise =
|
||||
(t_s16)wlan_le16_to_cpu(stats->noise);
|
||||
pacs_start_event->stats.nf_threshold =
|
||||
(t_s16)wlan_le16_to_cpu(stats->nf_threshold);
|
||||
pacs_start_event->stats.all_sta_ecs = MTRUE;
|
||||
pacs_start_event->stats.all_sta_6g = MTRUE;
|
||||
switch (priv->uap_bandwidth) {
|
||||
case CHAN_BW_20MHZ:
|
||||
bandwidth = BW_20MHZ;
|
||||
break;
|
||||
case CHAN_BW_40MHZ:
|
||||
bandwidth = BW_40MHZ;
|
||||
break;
|
||||
case CHAN_BW_80MHZ:
|
||||
bandwidth = BW_80MHZ;
|
||||
break;
|
||||
default:
|
||||
bandwidth = BW_20MHZ;
|
||||
break;
|
||||
}
|
||||
|
||||
wlan_get_curr_oper_class(priv, priv->uap_channel,
|
||||
bandwidth, &oper_class,
|
||||
&global_oper_class);
|
||||
while (sta_ptr &&
|
||||
(sta_ptr != (sta_node *)&priv->sta_list)) {
|
||||
PRINTM(MCMND,
|
||||
"AGCS sta mac_addr" MACSTR
|
||||
" ExtChanSwitching:%d is_11ax_enabled:%d OperClass:%d\n",
|
||||
MAC2STR(sta_ptr->mac_addr),
|
||||
sta_ptr->ExtCap.ext_cap.ExtChanSwitching,
|
||||
sta_ptr->is_11ax_enabled,
|
||||
sta_ptr->OperClass.data[0]);
|
||||
|
||||
if ((sta_ptr->ExtCap.ext_cap.ExtChanSwitching ==
|
||||
0) &&
|
||||
(global_oper_class != 128)) {
|
||||
pacs_start_event->stats.all_sta_ecs =
|
||||
MFALSE;
|
||||
}
|
||||
if (sta_ptr->is_11ax_enabled == 0) {
|
||||
pacs_start_event->stats.all_sta_6g =
|
||||
MFALSE;
|
||||
} else {
|
||||
int i;
|
||||
t_bool t_support_6g = MFALSE;
|
||||
|
||||
for (i = 0;
|
||||
i <
|
||||
sta_ptr->OperClass.ieee_hdr.len;
|
||||
i++) {
|
||||
if (is_6ghz_op_class(
|
||||
sta_ptr->OperClass
|
||||
.data[i]) ==
|
||||
MTRUE) {
|
||||
t_support_6g = MTRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
pacs_start_event->stats.all_sta_6g &=
|
||||
t_support_6g;
|
||||
}
|
||||
sta_ptr = sta_ptr->pnext;
|
||||
}
|
||||
PRINTM(MCMND, "AGCS all_sta_ecs:%d all_sta_6g:%d",
|
||||
pacs_start_event->stats.all_sta_ecs,
|
||||
pacs_start_event->stats.all_sta_6g);
|
||||
|
||||
/* Send event to moal */
|
||||
pevent->bss_index = priv->bss_index;
|
||||
pevent->event_id = MLAN_EVENT_ID_FW_AGCS_TRIGGER;
|
||||
/* Event length is the agcs_event length in byte */
|
||||
pevent->event_len = sizeof(agcs_event);
|
||||
/* keep agcs_info in pmadapter */
|
||||
memcpy_ext(pmadapter, &pmadapter->agcs_info,
|
||||
&pacs_start_event->stats, sizeof(agcs_stats),
|
||||
sizeof(agcs_stats));
|
||||
status =
|
||||
wlan_recv_event(priv, pevent->event_id, pevent);
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
|
||||
if (evt_buf)
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle, evt_buf);
|
||||
|
||||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
********************************************************/
|
||||
|
|
@ -5751,11 +5520,6 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
cmd_action, pdata_buf);
|
||||
break;
|
||||
|
||||
case HostCmd_CMD_APCMD_AGCS_CFG:
|
||||
ret = wlan_cmd_apcmd_agcs_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
|
||||
default:
|
||||
PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no);
|
||||
if (pioctl_req)
|
||||
|
|
@ -6228,10 +5992,6 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_MCLIENT_SCHEDULE_CFG:
|
||||
break;
|
||||
|
||||
case HostCmd_CMD_APCMD_AGCS_CFG:
|
||||
ret = wlan_uap_ret_agcs_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
||||
default:
|
||||
PRINTM(MERROR, "CMD_RESP: Unknown command response %#x\n",
|
||||
resp->command);
|
||||
|
|
@ -6839,11 +6599,6 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
wlan_process_sta_ps_change_event(priv, pmbuf);
|
||||
break;
|
||||
|
||||
case EVENT_AGCS_REPORT:
|
||||
PRINTM(MEVENT, "EVENT: AGCS report\n");
|
||||
wlan_process_agcs_event(priv, pmbuf);
|
||||
break;
|
||||
|
||||
default:
|
||||
pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -2026,43 +2026,6 @@ static mlan_status wlan_uap_snmp_mib_chan_track(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get/set Agiled channel switch cfg
|
||||
*
|
||||
* @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_uap_agcs_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u16 cmd_action = 0;
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
if (pioctl_req->action == MLAN_ACT_SET) {
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
} else {
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_AGCS_CFG, cmd_action,
|
||||
0, (t_void *)pioctl_req,
|
||||
(t_void *)&misc->param.agcs_cfg);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MLAN uap ioctl handler
|
||||
*
|
||||
|
|
@ -2472,8 +2435,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
status = wlan_misc_csi(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_MULTI_AP_CFG)
|
||||
status = wlan_misc_multi_ap_cfg(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_AGCS_CONFIG)
|
||||
status = wlan_uap_agcs_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_IOCTL_POWER_CFG:
|
||||
power = (mlan_ds_power_cfg *)pioctl_req->pbuf;
|
||||
|
|
|
|||
32
mlinux/iw610_sdio_over_spi_linux.patch
Executable file
32
mlinux/iw610_sdio_over_spi_linux.patch
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
|
||||
index 0f753367aec1..a5679a0add16 100644
|
||||
--- a/drivers/mmc/core/sdio.c
|
||||
+++ b/drivers/mmc/core/sdio.c
|
||||
@@ -945,7 +945,13 @@ static void mmc_sdio_remove(struct mmc_host *host)
|
||||
*/
|
||||
static int mmc_sdio_alive(struct mmc_host *host)
|
||||
{
|
||||
- return mmc_select_card(host->card);
|
||||
+ u8 data;
|
||||
+
|
||||
+ if (!mmc_host_is_spi(host))
|
||||
+ return mmc_select_card(host->card);
|
||||
+ else
|
||||
+ return mmc_io_rw_direct(host->card, 0, 0, SDIO_CCCR_CCCR, 0,
|
||||
+ &data);
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
|
||||
index 47443fb5eb33..f42d5f9c48c1 100644
|
||||
--- a/drivers/mmc/host/mmc_spi.c
|
||||
+++ b/drivers/mmc/host/mmc_spi.c
|
||||
@@ -563,7 +563,7 @@ mmc_spi_setup_data_message(struct mmc_spi_host *host, bool multiple, bool write)
|
||||
* the next token (next data block, or STOP_TRAN). We can try to
|
||||
* minimize I/O ops by using a single read to collect end-of-busy.
|
||||
*/
|
||||
- if (multiple || write) {
|
||||
+ if (write) {
|
||||
t = &host->early_status;
|
||||
memset(t, 0, sizeof(*t));
|
||||
t->len = write ? sizeof(scratch->status) : 1;
|
||||
|
|
@ -477,8 +477,6 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_SDAW693 "SDAW693"
|
||||
/** SDIW610 Card */
|
||||
#define CARD_SDIW610 "SDIW610"
|
||||
/** SDIW623 Card */
|
||||
#define CARD_SDIW623 "SDIW623"
|
||||
#endif
|
||||
|
||||
#ifdef PCIE
|
||||
|
|
@ -514,14 +512,16 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_PCIE9098 "PCIE9098"
|
||||
/** PCIEAW690 Card */
|
||||
#define CARD_PCIEAW690 "PCIEAW690"
|
||||
/** PCIEAW590 Card */
|
||||
#define CARD_PCIEAW590 "PCIEAW590"
|
||||
/** PCIEAW592 Card */
|
||||
#define CARD_PCIEAW592 "PCIEAW592"
|
||||
/** PCIEIW624 Card */
|
||||
#define CARD_PCIEIW624 "PCIEIW624"
|
||||
/** PCIEAW693 Card */
|
||||
#define CARD_PCIEAW693 "PCIEAW693"
|
||||
/** PCIEIW629 Card */
|
||||
#define CARD_PCIEIW629 "PCIEIW629"
|
||||
/** PCIEIW623 Card */
|
||||
#define CARD_PCIEIW623 "PCIEIW623"
|
||||
#endif
|
||||
|
||||
#ifdef USB
|
||||
|
|
@ -671,6 +671,7 @@ typedef enum {
|
|||
#define MIOCTL MBIT(7)
|
||||
#define MREG_D MBIT(9)
|
||||
#define MREG MBIT(10)
|
||||
#define MLSTATS MBIT(11)
|
||||
|
||||
#define MMPA_D MBIT(15)
|
||||
#define MDAT_D MBIT(16)
|
||||
|
|
@ -780,29 +781,6 @@ typedef struct _assoc_logger {
|
|||
#define SCAN_STATE_EXT_SCAN_STATUS MBIT(9)
|
||||
#define SCAN_STATE_SCAN_COMPLETE MBIT(10)
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/* Agiled channel switch state */
|
||||
typedef enum _agcs_state {
|
||||
/** AGCS is desabled */
|
||||
AGCS_STATE_IDLE = 0,
|
||||
/** AGCS is enabled */
|
||||
AGCS_STATE_START = 1,
|
||||
/**When FW sends AGCS event to notify the driver to prepare for channel
|
||||
switch.*/
|
||||
AGCS_STATE_TRIGGERED = 2,
|
||||
/** Start to scan the candidate channels */
|
||||
AGCS_STATE_IN_SCAN = 3,
|
||||
/** Receives the scan report */
|
||||
AGCS_STATE_SCAN_REPORT = 4,
|
||||
/** All candidate channels scanned done */
|
||||
AGCS_STATE_SCAN_DONE = 5,
|
||||
/** Start Channel Switch */
|
||||
AGCS_STATE_CSA_START = 6,
|
||||
/** Channel Switch Completed */
|
||||
AGCS_STATE_COMPLETE = 7,
|
||||
} agcs_state;
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
#ifdef USB
|
||||
/** mlan_usb_ep */
|
||||
typedef enum _mlan_usb_ep {
|
||||
|
|
@ -901,10 +879,6 @@ typedef enum _mlan_event_id {
|
|||
#endif /* SSU_SUPPORT */
|
||||
MLAN_EVENT_ID_CSI = 0x00000040,
|
||||
MLAN_EVENT_ID_FW_TX_BULK_STATUS = 0x00000043,
|
||||
#ifdef UAP_SUPPORT
|
||||
/* Agiled channel switch triggered */
|
||||
MLAN_EVENT_ID_FW_AGCS_TRIGGER = 0x00000044,
|
||||
#endif /* UAP_SUPPORT */
|
||||
/* Event generated by MLAN driver (MSB=1) */
|
||||
MLAN_EVENT_ID_DRV_CONNECTED = 0x80000001,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING = 0x80000002,
|
||||
|
|
@ -1076,6 +1050,15 @@ typedef enum _dfs_state_t {
|
|||
/** start freq for 5G */
|
||||
#define START_FREQ_11A_BAND 5000
|
||||
|
||||
typedef enum {
|
||||
TSP_STREAM_1X1 = 0,
|
||||
DTM_DC_THROTTLE_START = 1,
|
||||
TSP_PWR_BACKOFF_START = 2,
|
||||
DTM_DC_THROTTLE_END = 3,
|
||||
TSP_PWR_BACKOFF_END = 4,
|
||||
TSP_STREAM_2X2 = 5
|
||||
} tsp_state_t;
|
||||
|
||||
typedef enum _dfs_w53_cfg_t {
|
||||
/** DFS W53 Default Fw Value */
|
||||
DFS_W53_DEFAULT_FW = 0,
|
||||
|
|
@ -2827,6 +2810,8 @@ typedef struct _mlan_device {
|
|||
t_u32 max_seg_size;
|
||||
/* see blk_queue_max_segments */
|
||||
t_u16 max_segs;
|
||||
/** SDIO bus mode (0: Non-SPI mode, 1: SPI mode) */
|
||||
t_u8 spi_mode;
|
||||
#endif
|
||||
/** Auto deep sleep */
|
||||
t_u32 auto_ds;
|
||||
|
|
@ -2937,6 +2922,9 @@ MLAN_API mlan_status mlan_init_fw(t_void *padapter);
|
|||
/** Firmware Shutdown */
|
||||
MLAN_API mlan_status mlan_shutdown_fw(t_void *padapter);
|
||||
|
||||
/** Set driver status */
|
||||
MLAN_API t_void mlan_set_driver_status(t_void *adapter, t_u8 driver_status);
|
||||
|
||||
/** Main Process */
|
||||
MLAN_API mlan_status mlan_main_process(t_void *padapter);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* definitions used in MLAN and MOAL module.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2024 NXP
|
||||
* Copyright 2008-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
|
|||
|
|
@ -396,11 +396,8 @@ enum _mlan_ioctl_req_id {
|
|||
|
||||
MLAN_OID_MISC_PREV_ASSOC_INFO = 0x0020009A,
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
MLAN_OID_MISC_AGCS_CONFIG = 0x0020009C,
|
||||
#endif /* UAP_SUPPORT */
|
||||
MLAN_OID_MISC_NAV_MITIGATION_HW = 0x0020009C,
|
||||
|
||||
MLAN_OID_MISC_NAV_MITIGATION_HW = 0x0020009D,
|
||||
};
|
||||
|
||||
/** Sub command size */
|
||||
|
|
@ -6010,6 +6007,10 @@ typedef MLAN_PACK_START struct _mlan_ds_csi_params {
|
|||
/** CSI data received in cfg channel with mac addr filter, not only RA
|
||||
* is us or other*/
|
||||
t_u8 ra4us;
|
||||
/** flag to enable common AGC */
|
||||
t_u8 commonAGCflag;
|
||||
/** CSI format */
|
||||
t_u8 csiformat;
|
||||
/** CSI filters */
|
||||
mlan_csi_filter_t csi_filter[CSI_FILTER_MAX];
|
||||
} MLAN_PACK_END mlan_ds_csi_params;
|
||||
|
|
@ -6585,33 +6586,6 @@ typedef struct _mlan_ds_auth_assoc_timeout_cfg {
|
|||
t_u16 retry_timeout;
|
||||
} mlan_ds_auth_assoc_timeout_cfg;
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Agiled channel switch configuration parameters */
|
||||
typedef struct _mlan_ds_agcs_cfg {
|
||||
/**agcs cfg action 0-GET, 1-SET */
|
||||
t_u16 action;
|
||||
/* BIT0 - Enable Agile channel switching in CarPlay
|
||||
* BIT1 - no specific interference type check, but only check Tx or Rx
|
||||
* throughput drop
|
||||
*/
|
||||
t_u32 features;
|
||||
/* Adjust the weight of TX/RX average packet count */
|
||||
t_u8 avg_threshold_percentage;
|
||||
/* The requires at least average rx packets per second */
|
||||
t_u16 rx_min_pkt_count;
|
||||
/* The requires at least average tx packets per second */
|
||||
t_u16 tx_min_pkt_count;
|
||||
/* Unit is ms */
|
||||
t_u32 sample_time;
|
||||
/* The latest sampled windows size */
|
||||
t_u8 sample_count_window;
|
||||
/* Continuous drop rapidly times */
|
||||
t_u8 continuous_hit_count;
|
||||
/* Make sure a reasonable rate can be sustained. */
|
||||
t_s8 nf_margin;
|
||||
} mlan_ds_agcs_cfg;
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
/** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */
|
||||
typedef struct _mlan_ds_misc_cfg {
|
||||
/** Sub-command */
|
||||
|
|
@ -6793,10 +6767,6 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
mlan_ds_ed_mac_cfg edmac_cfg;
|
||||
mlan_ds_gpio_cfg_ops gpio_cfg_ops;
|
||||
mlan_ds_auth_assoc_timeout_cfg auth_assoc_cfg;
|
||||
#ifdef UAP_SUPPORT
|
||||
/** config AGCS for MLAN_OID_MISC_AGCS_CONFIG */
|
||||
mlan_ds_agcs_cfg agcs_cfg;
|
||||
#endif /* UAP_SUPPORT */
|
||||
} param;
|
||||
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;
|
||||
|
||||
|
|
@ -6835,34 +6805,4 @@ typedef struct _mlan_cfpinfo {
|
|||
#define MLAN_REASON_CLASS3_FRAME_FROM_NOASSOC_STA 7
|
||||
#define MLAN_REASON_DISASSOC_STA_HAS_LEFT 8
|
||||
#define MLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/* Processing AGCS report */
|
||||
#define AGCS_EVENT_TYPE_PROCESS_EVENT 1
|
||||
/* After AGCS scan, select and switch to new channel */
|
||||
#define AGCS_EVENT_TYPE_SEL_CHANNEL 2
|
||||
|
||||
/** Type definition of agcs_stats for agcs_event */
|
||||
typedef struct _agcs_stats {
|
||||
/** All STAs support ECS */
|
||||
t_u8 all_sta_ecs;
|
||||
/** All STAs support 6g */
|
||||
t_u8 all_sta_6g;
|
||||
/** ch_load of current channel */
|
||||
t_u16 ch_load;
|
||||
/** noise of current channel */
|
||||
t_s16 noise;
|
||||
/** The noise floor threshold currently used by fw */
|
||||
t_s16 nf_threshold;
|
||||
} agcs_stats, *pagcs_stats;
|
||||
|
||||
/** Type definition of agcs_event for WOAL_EVENT_AGCS */
|
||||
typedef struct _agcs_event {
|
||||
/** AGCS_EVENT_TYPE_PROCESS_EVENT or AGCS_EVENT_TYPE_SEL_CHANNEL */
|
||||
t_u32 type;
|
||||
/** AGCS stats info */
|
||||
agcs_stats stats;
|
||||
} agcs_event, *pagcs_event;
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
#endif /* !_MLAN_IOCTL_H_ */
|
||||
|
|
|
|||
|
|
@ -3508,7 +3508,8 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
|
|||
if ((ieee80211_is_action(
|
||||
((const struct ieee80211_mgmt *)buf)->frame_control))
|
||||
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
||||
|| moal_extflg_isset(priv->phandle, EXT_HOST_MLME)
|
||||
|| (moal_extflg_isset(priv->phandle, EXT_HOST_MLME) &&
|
||||
(priv->bss_type != MLAN_BSS_TYPE_STA))
|
||||
#endif
|
||||
) {
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
|
|
@ -3525,16 +3526,6 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
|
|||
woal_remain_timer_func(priv->phandle);
|
||||
}
|
||||
|
||||
if (ieee80211_is_auth(
|
||||
((struct ieee80211_mgmt *)buf)->frame_control) &&
|
||||
(priv->bss_type == MLAN_BSS_TYPE_STA)) {
|
||||
woal_mgmt_frame_register(priv, IEEE80211_STYPE_AUTH,
|
||||
MTRUE);
|
||||
priv->auth_flag = HOST_MLME_AUTH_PENDING;
|
||||
priv->auth_alg = woal_cpu_to_le16(
|
||||
((struct ieee80211_mgmt *)buf)->u.auth.auth_alg);
|
||||
priv->host_mlme = MTRUE;
|
||||
}
|
||||
/* With sd8777 We have difficulty to receive response packet in
|
||||
* 500ms
|
||||
*/
|
||||
|
|
@ -3629,6 +3620,18 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
|
|||
}
|
||||
#endif
|
||||
|
||||
if (ieee80211_is_auth(
|
||||
((const struct ieee80211_mgmt *)buf)->frame_control) &&
|
||||
(priv->bss_type == MLAN_BSS_TYPE_STA)) {
|
||||
woal_mgmt_frame_register(priv, IEEE80211_STYPE_AUTH, MTRUE);
|
||||
woal_cancel_scan(priv, MOAL_IOCTL_WAIT);
|
||||
priv->auth_flag = HOST_MLME_AUTH_PENDING;
|
||||
priv->auth_mgmt_tx = 1;
|
||||
priv->auth_alg = woal_cpu_to_le16(
|
||||
((const struct ieee80211_mgmt *)buf)->u.auth.auth_alg);
|
||||
priv->host_mlme = MTRUE;
|
||||
}
|
||||
|
||||
#if KERNEL_VERSION(3, 8, 0) > LINUX_VERSION_CODE
|
||||
*cookie = random32() | 1;
|
||||
#else
|
||||
|
|
@ -4303,8 +4306,7 @@ static t_u16 woal_filter_beacon_ies(moal_private *priv, const t_u8 *ie,
|
|||
if (!(priv->phandle->fw_bands & BAND_GAX) &&
|
||||
!(priv->phandle->fw_bands & BAND_AAX)
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
|
||||
&& (!(priv->phandle->fw_bands & BAND_6G))
|
||||
|
||||
&& !(priv->phandle->fw_bands & BAND_6G)
|
||||
#endif
|
||||
)
|
||||
break;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -80,6 +80,7 @@ Change log:
|
|||
#ifdef UAP_SUPPORT
|
||||
#define PRIV_CMD_AP_DEAUTH "apdeauth"
|
||||
#define PRIV_CMD_GET_STA_LIST "getstalist"
|
||||
#define PRIV_CMD_PRINT_LINK_STATS "plinkstats"
|
||||
#define PRIV_CMD_BSS_CONFIG "bssconfig"
|
||||
#endif
|
||||
#if defined(UAP_SUPPORT)
|
||||
|
|
@ -794,9 +795,4 @@ typedef struct {
|
|||
} __ATTRIB_PACK__ wlan_ieee80211_chan_list;
|
||||
|
||||
#define PRIV_CMD_TP_STATE "tp_state"
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
#define PRIV_CMD_AGCS "agcs"
|
||||
#endif
|
||||
|
||||
#endif /* _WOAL_ETH_PRIV_H_ */
|
||||
|
|
|
|||
|
|
@ -91,6 +91,10 @@ static int net_rx = 1;
|
|||
/** amsdu deaggr mode */
|
||||
static int amsdu_deaggr = 1;
|
||||
|
||||
/** wifi_reset_config */
|
||||
/**Default reset is after 5 EAPOL failures, 0 disables the reset */
|
||||
static int wifi_reset_config = 5;
|
||||
|
||||
static int tx_budget = 2600;
|
||||
static int mclient_scheduling = 1;
|
||||
|
||||
|
|
@ -916,6 +920,14 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
goto err;
|
||||
params->net_rx = out_data;
|
||||
PRINTM(MMSG, "net_rx = %d\n", params->net_rx);
|
||||
} else if (strncmp(line, "wifi_reset_config",
|
||||
strlen("wifi_reset_config")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
params->wifi_reset_config = out_data;
|
||||
PRINTM(MMSG, "wifi_reset_config = %d\n",
|
||||
params->wifi_reset_config);
|
||||
} else if (strncmp(line, "amsdu_deaggr",
|
||||
strlen("amsdu_deaggr")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
|
|
@ -1774,7 +1786,6 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
{
|
||||
t_u8 addr[ETH_ALEN];
|
||||
bool is_valid_mac_addr = false;
|
||||
unsigned int rps_mask = 0, nr_cpu = 0;
|
||||
if (hw_test)
|
||||
moal_extflg_set(handle, EXT_HW_TEST);
|
||||
#ifdef CONFIG_OF
|
||||
|
|
@ -1907,6 +1918,10 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
if (params)
|
||||
handle->params.net_rx = params->net_rx;
|
||||
|
||||
handle->params.wifi_reset_config = wifi_reset_config;
|
||||
if (params)
|
||||
handle->params.wifi_reset_config = params->wifi_reset_config;
|
||||
|
||||
handle->params.amsdu_deaggr = amsdu_deaggr;
|
||||
if (params)
|
||||
handle->params.amsdu_deaggr = params->amsdu_deaggr;
|
||||
|
|
@ -2108,10 +2123,7 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
|
||||
#if defined(CONFIG_RPS)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
nr_cpu = num_online_cpus();
|
||||
rps_mask = (1U << nr_cpu) - 1;
|
||||
handle->params.rps = rps & RPS_CPU_MASK;
|
||||
handle->params.rps &= rps_mask;
|
||||
PRINTM(MMSG, "rps set to %x from module param\n", handle->params.rps);
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -3092,7 +3104,7 @@ module_param(wfd_name, charp, 0);
|
|||
MODULE_PARM_DESC(wfd_name, "WIFIDIRECT interface name");
|
||||
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||
module_param(max_vir_bss, int, 0);
|
||||
MODULE_PARM_DESC(max_vir_bss, "Number of Virtual interfaces (0)");
|
||||
MODULE_PARM_DESC(max_vir_bss, "Number of Virtual interfaces (1)");
|
||||
#endif
|
||||
#endif /* WIFI_DIRECT_SUPPORT */
|
||||
module_param(nan_name, charp, 0);
|
||||
|
|
@ -3271,6 +3283,10 @@ module_param(net_rx, int, 0);
|
|||
MODULE_PARM_DESC(
|
||||
net_rx,
|
||||
"0: use netif_rx/netif_rx_ni in rx; 1: use netif_receive_skb in rx (default)");
|
||||
module_param(wifi_reset_config, int, 0);
|
||||
MODULE_PARM_DESC(
|
||||
wifi_reset_config,
|
||||
"0: disable Wi-Fi reset, positive integer: max retries before reset (default 5)");
|
||||
module_param(amsdu_deaggr, int, 0);
|
||||
MODULE_PARM_DESC(
|
||||
amsdu_deaggr,
|
||||
|
|
|
|||
|
|
@ -653,6 +653,7 @@ mlan_status woal_request_ioctl(moal_private *priv, mlan_ioctl_req *req,
|
|||
mlan_status status;
|
||||
unsigned long flags;
|
||||
t_u32 sub_command = 0;
|
||||
long wait_rv;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -774,10 +775,18 @@ mlan_status woal_request_ioctl(moal_private *priv, mlan_ioctl_req *req,
|
|||
cac_left_jiffies / HZ);
|
||||
/* blocking timeout set to 1.5 * CAC checking period
|
||||
* left time */
|
||||
wait_event_interruptible_timeout(
|
||||
wait_rv = wait_event_interruptible_timeout(
|
||||
priv->phandle->meas_wait_q,
|
||||
priv->phandle->meas_wait_q_woken,
|
||||
cac_left_jiffies * 3 / 2);
|
||||
if (wait_rv == 0) {
|
||||
PRINTM(MMSG, "meas_wait_q timeout occurred\n");
|
||||
} else if (wait_rv < 0) {
|
||||
PRINTM(MERROR,
|
||||
"meas_wait_q interrupted by signal\n");
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef UAP_CFG80211
|
||||
|
|
@ -2934,9 +2943,13 @@ int woal_send_host_packet(struct net_device *dev, struct ifreq *req)
|
|||
|
||||
mgmt = (IEEE80211_MGMT *)(pmbuf->pbuf + pmbuf->data_offset +
|
||||
PACKET_HEADER_LEN + FRAME_LEN);
|
||||
|
||||
if (priv->phandle->cmd_tx_data &&
|
||||
((mgmt->frame_control & IEEE80211_FC_MGMT_FRAME_TYPE_MASK) == 0)) {
|
||||
(((mgmt->frame_control & IEEE80211_FC_MGMT_FRAME_TYPE_MASK) == 0)
|
||||
// Nighthawk CSI need to send qos null packets via cmd 0x283
|
||||
#if defined(SDIW610) || defined(USBIW610)
|
||||
|| (mgmt->frame_control == 0xc8)
|
||||
#endif
|
||||
)) {
|
||||
status = woal_send_mgmt_packet(priv, pmbuf);
|
||||
woal_free_mlan_buffer(priv->phandle, pmbuf);
|
||||
goto done;
|
||||
|
|
@ -9857,3 +9870,155 @@ done:
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get channel load
|
||||
*
|
||||
* @param priv Pointer to moal_private structure
|
||||
* @param duration Channel utilization sampling time, the unit is ms
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING on success,
|
||||
* otherwise failure code
|
||||
*/
|
||||
mlan_status woal_get_ch_load(moal_private *priv, t_u16 duration)
|
||||
{
|
||||
mlan_ioctl_req *ioctl_req = NULL;
|
||||
mlan_ds_misc_cfg *misc = NULL;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!priv || !priv->phandle) {
|
||||
PRINTM(MERROR, "priv or handle is null\n");
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (ioctl_req == NULL) {
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf;
|
||||
misc->sub_command = MLAN_OID_MISC_CH_LOAD;
|
||||
ioctl_req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
|
||||
ioctl_req->action = MLAN_ACT_GET;
|
||||
/* Because the duration unit of fw is 10ms, it must be divided by 10 */
|
||||
misc->param.ch_load.duration = (duration / 10);
|
||||
status = woal_request_ioctl(priv, ioctl_req, MOAL_NO_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS && status != MLAN_STATUS_PENDING) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(ioctl_req);
|
||||
|
||||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get channel load results
|
||||
*
|
||||
* @param priv Pointer to moal_private structure
|
||||
* @param respbuf Pointer to response buffer
|
||||
* @param resplen Response buffer length
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS on success,
|
||||
* otherwise failure code
|
||||
*/
|
||||
mlan_status woal_get_ch_load_results(moal_private *priv, t_u16 *ch_load,
|
||||
t_s16 *noise)
|
||||
{
|
||||
mlan_ioctl_req *ioctl_req = NULL;
|
||||
mlan_ds_misc_cfg *misc = NULL;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!priv || !priv->phandle) {
|
||||
PRINTM(MERROR, "priv or handle is null\n");
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (ioctl_req == NULL) {
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf;
|
||||
misc->sub_command = MLAN_OID_MISC_CH_LOAD_RESULTS;
|
||||
ioctl_req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
|
||||
ioctl_req->action = MLAN_ACT_GET;
|
||||
status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
*ch_load = misc->param.ch_load.ch_load_param;
|
||||
*noise = misc->param.ch_load.noise;
|
||||
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(ioctl_req);
|
||||
|
||||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/**
|
||||
* @brief uap get station list handler
|
||||
*
|
||||
* @param priv Pointer to moal_private structure
|
||||
* @param sta_list A pointer to station list
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS on success,
|
||||
* otherwise failure code
|
||||
*/
|
||||
mlan_status woal_get_sta_list(moal_private *priv, mlan_ds_sta_list *sta_list)
|
||||
{
|
||||
mlan_ds_get_info *info = NULL;
|
||||
mlan_ioctl_req *ioctl_req = NULL;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
if (priv->media_connected == MFALSE) {
|
||||
PRINTM(MINFO, "cfg80211: Media not connected!\n");
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
/* Allocate an IOCTL request buffer */
|
||||
ioctl_req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(
|
||||
sizeof(mlan_ds_get_info) +
|
||||
(MAX_STA_LIST_IE_SIZE * MAX_NUM_CLIENTS));
|
||||
if (ioctl_req == NULL) {
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
info = (mlan_ds_get_info *)ioctl_req->pbuf;
|
||||
info->sub_command = MLAN_OID_UAP_STA_LIST;
|
||||
ioctl_req->req_id = MLAN_IOCTL_GET_INFO;
|
||||
ioctl_req->action = MLAN_ACT_GET;
|
||||
|
||||
status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT);
|
||||
if ((status != MLAN_STATUS_SUCCESS) ||
|
||||
(!info->param.sta_list.sta_count))
|
||||
goto done;
|
||||
|
||||
moal_memcpy_ext(priv->phandle, sta_list, &info->param.sta_list,
|
||||
sizeof(mlan_ds_sta_list), sizeof(mlan_ds_sta_list));
|
||||
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(ioctl_req);
|
||||
return status;
|
||||
}
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
|
|
|||
|
|
@ -1014,6 +1014,22 @@ static mlan_callbacks woal_callbacks = {
|
|||
.moal_calc_short_ssid = moal_calc_short_ssid,
|
||||
};
|
||||
|
||||
#define PLSTATS_FILTER_TX_BYTES MBIT(0)
|
||||
#define PLSTATS_FILTER_RX_BYTES MBIT(1)
|
||||
#define PLSTATS_FILTER_CHLOAD MBIT(2)
|
||||
#define PLSTATS_FILTER_CHANNEL MBIT(3)
|
||||
#define PLSTATS_FILTER_REGION MBIT(4)
|
||||
#define PLSTATS_FILTER_RETRY_CNT MBIT(5)
|
||||
#define PLSTATS_FILTER_FAILED_CNT MBIT(6)
|
||||
#define PLSTATS_FILTER_RTSFAILURE MBIT(7)
|
||||
#define PLSTATS_FILTER_FCSERROR MBIT(8)
|
||||
#define PLSTATS_FILTER_TXFRAME MBIT(9)
|
||||
#define PLSTATS_FILTER_TX_DROPPED MBIT(10)
|
||||
#define PLSTATS_FILTER_DEAUTH_TX MBIT(11)
|
||||
#define PLSTATS_FILTER_DEAUTH_RX MBIT(12)
|
||||
#define PLSTATS_FILTER_SIGNAL MBIT(13)
|
||||
#define PLSTATS_FILTER_STA_LIST MBIT(14)
|
||||
|
||||
int woal_open(struct net_device *dev);
|
||||
int woal_close(struct net_device *dev);
|
||||
int woal_set_mac_address(struct net_device *dev, void *addr);
|
||||
|
|
@ -1213,6 +1229,7 @@ void woal_clean_up(moal_handle *handle)
|
|||
if (netif_carrier_ok(priv->netdev))
|
||||
netif_carrier_off(priv->netdev);
|
||||
priv->media_connected = MFALSE;
|
||||
priv->plinkstats_cfg.enable = MFALSE;
|
||||
// disconnect
|
||||
moal_connection_status_check_pmqos(priv->phandle);
|
||||
#ifdef STA_CFG80211
|
||||
|
|
@ -1260,6 +1277,12 @@ void woal_clean_up(moal_handle *handle)
|
|||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (handle->is_plinkstats_timer_set) {
|
||||
woal_cancel_timer(&handle->plinkstats_timer);
|
||||
handle->is_plinkstats_timer_set = MFALSE;
|
||||
}
|
||||
|
||||
woal_flush_evt_queue(handle);
|
||||
return;
|
||||
}
|
||||
|
|
@ -2722,6 +2745,12 @@ mlan_status woal_init_sw(moal_handle *handle)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* Initialize the timer for print Wi-Fi link stats*/
|
||||
woal_initialize_timer(&handle->plinkstats_timer,
|
||||
&woal_print_linkstats_event, handle);
|
||||
|
||||
handle->is_plinkstats_timer_set = MFALSE;
|
||||
|
||||
handle->rtt_capa.rtt_one_sided_supported = MTRUE;
|
||||
handle->rtt_capa.rtt_ftm_supported = MTRUE;
|
||||
handle->rtt_capa.lci_support = MTRUE;
|
||||
|
|
@ -2805,6 +2834,11 @@ mlan_status woal_init_sw(moal_handle *handle)
|
|||
device.mpa_tx_cfg = MLAN_INIT_PARA_ENABLED;
|
||||
device.mpa_rx_cfg = MLAN_INIT_PARA_ENABLED;
|
||||
#endif /* SDIO_MMC */
|
||||
device.spi_mode = (((sdio_mmc_card *)handle->card)
|
||||
->func->card->host->caps &
|
||||
MMC_CAP_SPI) ?
|
||||
1 :
|
||||
0;
|
||||
}
|
||||
#endif /* SDIO */
|
||||
device.feature_control = handle->card_info->feature_control;
|
||||
|
|
@ -2878,7 +2912,6 @@ mlan_status woal_init_sw(moal_handle *handle)
|
|||
device.mclient_scheduling = handle->params.mclient_scheduling;
|
||||
/* Clean up the mode_psd_string for 6E Indoor/Outdoor */
|
||||
memset(handle->mode_psd_string, 0, sizeof(handle->mode_psd_string));
|
||||
|
||||
moal_memcpy_ext(handle, &device.callbacks, &woal_callbacks,
|
||||
sizeof(mlan_callbacks), sizeof(mlan_callbacks));
|
||||
if (!handle->params.amsdu_deaggr)
|
||||
|
|
@ -2965,7 +2998,6 @@ void woal_free_moal_handle(moal_handle *handle)
|
|||
kfree(fwdump_fname);
|
||||
fwdump_fname = NULL;
|
||||
}
|
||||
|
||||
/* Free module params */
|
||||
woal_free_module_param(handle);
|
||||
/** clear pref_mac to avoid later crash */
|
||||
|
|
@ -4239,6 +4271,7 @@ done:
|
|||
|
||||
#if defined(CONFIG_RPS)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
#define MAX_SUPPORTED_CPUS 8
|
||||
static ssize_t woal_set_rps_map(struct netdev_rx_queue *queue, const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
|
|
@ -4315,7 +4348,7 @@ static ssize_t woal_set_rps_map(struct netdev_rx_queue *queue, const char *buf,
|
|||
kfree_rcu(old_map, rcu);
|
||||
}
|
||||
|
||||
PRINTM(MMSG, "%s on %s: buf=%s(%u) (%d i=%d)\n", __func__,
|
||||
PRINTM(MINFO, "%s on %s: buf=%s(%u) (%d i=%d)\n", __func__,
|
||||
queue->dev->name, buf, (t_u32)len, nr_cpumask_bits, i);
|
||||
free_cpumask_var(mask);
|
||||
return len;
|
||||
|
|
@ -4341,6 +4374,7 @@ static mlan_status woal_add_card_dpc(moal_handle *handle)
|
|||
int j;
|
||||
moal_private *priv_rps = NULL;
|
||||
t_u8 rps_buf[3];
|
||||
unsigned int rps_mask = 0, nr_cpus = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -4462,6 +4496,9 @@ static mlan_status woal_add_card_dpc(moal_handle *handle)
|
|||
#if defined(CONFIG_RPS)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
if (handle->params.rps) {
|
||||
nr_cpus = MIN(nr_cpumask_bits, MAX_SUPPORTED_CPUS);
|
||||
rps_mask = (1UL << nr_cpus) - 1UL;
|
||||
handle->params.rps &= rps_mask;
|
||||
if (snprintf(rps_buf, sizeof(rps_buf), "%x",
|
||||
handle->params.rps) <= 0)
|
||||
PRINTM(MERROR, "Failed to write into rps_buf\n");
|
||||
|
|
@ -4867,11 +4904,7 @@ static mlan_status woal_init_fw_dpc(moal_handle *handle)
|
|||
PRINTM(MERROR,
|
||||
"WLAN: Fail download FW with nowwait: %u\n",
|
||||
moal_extflg_isset(handle, EXT_REQ_FW_NOWAIT));
|
||||
if (handle->ops.reg_dbg
|
||||
#ifdef PCIE
|
||||
&& !IS_PCIEAW693(handle->card_type)
|
||||
#endif
|
||||
)
|
||||
if (handle->ops.reg_dbg)
|
||||
handle->ops.reg_dbg(handle);
|
||||
goto done;
|
||||
}
|
||||
|
|
@ -4947,19 +4980,11 @@ static mlan_status woal_init_fw_dpc(moal_handle *handle)
|
|||
if (handle->hardware_status != HardwareStatusReady) {
|
||||
wifi_status = WIFI_STATUS_INIT_FW_FAIL;
|
||||
handle->event_fw_dump = MFALSE;
|
||||
if (handle->ops.reg_dbg
|
||||
#ifdef PCIE
|
||||
&& !IS_PCIEAW693(handle->card_type)
|
||||
#endif
|
||||
)
|
||||
if (handle->ops.reg_dbg)
|
||||
handle->ops.reg_dbg(handle);
|
||||
#ifdef DEBUG_LEVEL1
|
||||
if (drvdbg & MFW_D) {
|
||||
if (handle->ops.dump_fw_info
|
||||
#ifdef PCIE
|
||||
&& !IS_PCIEAW693(handle->card_type)
|
||||
#endif
|
||||
) {
|
||||
if (handle->ops.dump_fw_info) {
|
||||
handle->ops.dump_fw_info(handle);
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_print_firmware_dump_buf(
|
||||
|
|
@ -7079,7 +7104,7 @@ int woal_close(struct net_device *dev)
|
|||
|
||||
if ((priv->media_connected == MTRUE)
|
||||
#ifdef UAP_SUPPORT
|
||||
|| (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP)
|
||||
&& (GET_BSS_ROLE(priv) != MLAN_BSS_ROLE_UAP)
|
||||
#endif
|
||||
) {
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
|
|
@ -7616,9 +7641,15 @@ void woal_tx_timeout(struct net_device *dev
|
|||
woal_mlan_debug_info(priv);
|
||||
woal_moal_debug_info(priv, NULL, MFALSE);
|
||||
priv->phandle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(priv->phandle->pmlan_adapter,
|
||||
priv->phandle->driver_status);
|
||||
|
||||
ref_handle = (moal_handle *)priv->phandle->pref_mac;
|
||||
if (ref_handle)
|
||||
if (ref_handle) {
|
||||
ref_handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(ref_handle->pmlan_adapter,
|
||||
ref_handle->driver_status);
|
||||
}
|
||||
if (!auto_fw_dump && !priv->phandle->fw_dump)
|
||||
woal_process_hang(priv->phandle);
|
||||
|
||||
|
|
@ -9598,6 +9629,14 @@ void woal_init_priv(moal_private *priv, t_u8 wait_option)
|
|||
#endif
|
||||
priv->auth_tx_wait_time = AUTH_TX_DEFAULT_WAIT_TIME;
|
||||
woal_set_interface_pending_limits(priv->phandle, priv);
|
||||
|
||||
/* Init plinkstats parameter to default */
|
||||
priv->plinkstats_cfg.filter = PRINT_LINTSTATS_FILTER;
|
||||
priv->plinkstats_cfg.interval = PRINT_LINTSTATS_INTERVAL;
|
||||
priv->plinkstats_cfg.netlink_evt = MFALSE;
|
||||
if (priv->phandle->params.drvdbg & MBIT(11))
|
||||
priv->plinkstats_cfg.enable = MTRUE;
|
||||
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
|
|
@ -11540,11 +11579,7 @@ static int woal_dump_moal_drv_info(moal_handle *phandle, t_u8 *buf)
|
|||
ptr += snprintf(ptr, MAX_BUF_LEN,
|
||||
"------------moal_debug_info End-------------\n");
|
||||
|
||||
if (phandle->ops.dump_reg_info
|
||||
#ifdef PCIE
|
||||
&& !IS_PCIEAW693(phandle->card_type)
|
||||
#endif
|
||||
)
|
||||
if (phandle->ops.dump_reg_info)
|
||||
ptr += phandle->ops.dump_reg_info(phandle, ptr);
|
||||
|
||||
LEAVE();
|
||||
|
|
@ -12467,11 +12502,7 @@ void woal_moal_debug_info(moal_private *priv, moal_handle *handle, u8 flag)
|
|||
#ifdef PCIE
|
||||
if (IS_PCIE(phandle->card_type)) {
|
||||
#ifdef DEBUG_LEVEL1
|
||||
if (phandle->ops.reg_dbg
|
||||
#ifdef PCIE
|
||||
&& !IS_PCIEAW693(phandle->card_type)
|
||||
#endif
|
||||
) {
|
||||
if (phandle->ops.reg_dbg) {
|
||||
phandle->ops.reg_dbg(phandle);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -12482,11 +12513,8 @@ void woal_moal_debug_info(moal_private *priv, moal_handle *handle, u8 flag)
|
|||
if (flag && ((phandle->main_state == MOAL_END_MAIN_PROCESS) ||
|
||||
(phandle->main_state == MOAL_STATE_IDLE))) {
|
||||
#ifdef DEBUG_LEVEL1
|
||||
if (phandle->ops.reg_dbg && (drvdbg & (MREG_D | MFW_D))
|
||||
#ifdef PCIE
|
||||
&& !IS_PCIEAW693(phandle->card_type)
|
||||
#endif
|
||||
) {
|
||||
if (phandle->ops.reg_dbg &&
|
||||
(drvdbg & (MREG_D | MFW_D))) {
|
||||
phandle->ops.reg_dbg(phandle);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -12808,9 +12836,16 @@ t_void woal_scan_timeout_handler(struct work_struct *work)
|
|||
woal_moal_debug_info(priv, NULL, MFALSE);
|
||||
}
|
||||
handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(handle->pmlan_adapter,
|
||||
handle->driver_status);
|
||||
|
||||
ref_handle = (moal_handle *)handle->pref_mac;
|
||||
if (ref_handle)
|
||||
if (ref_handle) {
|
||||
ref_handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(
|
||||
ref_handle->pmlan_adapter,
|
||||
ref_handle->driver_status);
|
||||
}
|
||||
|
||||
if (!auto_fw_dump && !handle->fw_dump && priv)
|
||||
woal_process_hang(priv->phandle);
|
||||
|
|
@ -12850,12 +12885,13 @@ t_void woal_emergency_reset_handler(struct work_struct *work)
|
|||
return;
|
||||
}
|
||||
priv->phandle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(handle->pmlan_adapter, handle->driver_status);
|
||||
ref_handle = (moal_handle *)priv->phandle->pref_mac;
|
||||
if (!ref_handle) {
|
||||
LEAVE();
|
||||
return;
|
||||
if (ref_handle) {
|
||||
ref_handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(ref_handle->pmlan_adapter,
|
||||
ref_handle->driver_status);
|
||||
}
|
||||
ref_handle->driver_status = MTRUE;
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
if (drvdbg & MFW_D)
|
||||
|
|
@ -12875,6 +12911,268 @@ t_void woal_emergency_reset_handler(struct work_struct *work)
|
|||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Process print link statistics
|
||||
*
|
||||
* @param priv a pointer to moal_private structure
|
||||
*
|
||||
* @return N/A
|
||||
*
|
||||
*/
|
||||
void woal_print_linkstats_info(moal_private *priv, bool is_reset)
|
||||
{
|
||||
moal_handle *handle = priv->phandle;
|
||||
mlan_fw_info fw_info;
|
||||
mlan_ds_get_stats stats;
|
||||
mlan_ds_get_signal signal;
|
||||
mlan_ds_sta_list *sta_list = NULL;
|
||||
t_u16 ch_load = 0;
|
||||
t_s16 noise = 0;
|
||||
if ((is_reset == MFALSE) &&
|
||||
(handle->plinkstats_chload_timer == MFALSE)) {
|
||||
/* Not yet to get chload */
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Get Region code from the fw info */
|
||||
memset(&fw_info, 0, sizeof(mlan_fw_info));
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_request_get_fw_info(priv, MOAL_IOCTL_WAIT, &fw_info)) {
|
||||
PRINTM(MERROR, "Fail to get fw info\n");
|
||||
goto done;
|
||||
}
|
||||
/* Get Log from the firmware */
|
||||
memset(&stats, 0, sizeof(mlan_ds_get_stats));
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_get_stats_info(priv, MOAL_IOCTL_WAIT, &stats)) {
|
||||
PRINTM(MERROR, "Error getting stats information\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/*RSSI/SNR, only support in STA mode*/
|
||||
if (priv->bss_role == MLAN_BSS_ROLE_STA) {
|
||||
memset(&signal, 0, sizeof(mlan_ds_get_signal));
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_get_signal_info(priv, MOAL_IOCTL_WAIT, &signal)) {
|
||||
PRINTM(MERROR, "Error getting signal information\n");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
woal_get_ch_load_results(priv, &ch_load, &noise);
|
||||
|
||||
if (is_reset) {
|
||||
memset(&priv->plinkstats, 0, sizeof(moal_priv_linkstats));
|
||||
priv->plinkstats.tx_bytes_base = priv->stats.tx_bytes;
|
||||
priv->plinkstats.tx_packets_base = priv->stats.tx_packets;
|
||||
priv->plinkstats.rx_bytes_base = priv->stats.rx_bytes;
|
||||
priv->plinkstats.rx_packets_base = priv->stats.rx_packets;
|
||||
priv->plinkstats.retry_cnt_base = stats.retry;
|
||||
priv->plinkstats.failed_cnt_base = stats.failed;
|
||||
priv->plinkstats.rtsfailure_base = stats.rts_failure;
|
||||
priv->plinkstats.fcserror_base = stats.fcs_error;
|
||||
priv->plinkstats.txframe_base = stats.tx_frame;
|
||||
priv->plinkstats.tx_dropped_base = priv->stats.tx_dropped;
|
||||
} else {
|
||||
priv->plinkstats.tx_bytes =
|
||||
priv->stats.tx_bytes - priv->plinkstats.tx_bytes_base;
|
||||
priv->plinkstats.tx_packets = priv->stats.tx_packets -
|
||||
priv->plinkstats.tx_packets_base;
|
||||
priv->plinkstats.rx_bytes =
|
||||
priv->stats.rx_bytes - priv->plinkstats.rx_bytes_base;
|
||||
priv->plinkstats.rx_packets = priv->stats.rx_packets -
|
||||
priv->plinkstats.rx_packets_base;
|
||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
priv->plinkstats.channel = priv->channel;
|
||||
#endif
|
||||
priv->plinkstats.region_code = fw_info.region_code;
|
||||
priv->plinkstats.retry_cnt =
|
||||
stats.retry - priv->plinkstats.retry_cnt_base;
|
||||
priv->plinkstats.failed_cnt =
|
||||
stats.failed - priv->plinkstats.failed_cnt_base;
|
||||
priv->plinkstats.rtsfailure =
|
||||
stats.rts_failure - priv->plinkstats.rtsfailure_base;
|
||||
priv->plinkstats.fcserror =
|
||||
stats.fcs_error - priv->plinkstats.fcserror_base;
|
||||
priv->plinkstats.txframe =
|
||||
stats.tx_frame - priv->plinkstats.txframe_base;
|
||||
priv->plinkstats.tx_dropped = priv->stats.tx_dropped -
|
||||
priv->plinkstats.tx_dropped_base;
|
||||
priv->plinkstats.data_rssi = signal.data_rssi_last;
|
||||
priv->plinkstats.data_snr = signal.data_snr_last;
|
||||
priv->plinkstats.data_nf = signal.data_nf_last;
|
||||
priv->plinkstats.chload = ch_load;
|
||||
priv->plinkstats.noise = noise;
|
||||
|
||||
if ((priv->plinkstats_cfg.filter & PLSTATS_FILTER_STA_LIST) &&
|
||||
(priv->bss_role == MLAN_BSS_ROLE_UAP)) {
|
||||
sta_list =
|
||||
kzalloc(sizeof(mlan_ds_sta_list), GFP_ATOMIC);
|
||||
if (!sta_list) {
|
||||
PRINTM(MERROR,
|
||||
"%s: Fail to alloc mlan_ds_sta_list buffer\n",
|
||||
__func__);
|
||||
goto done;
|
||||
}
|
||||
woal_get_sta_list(priv, sta_list);
|
||||
}
|
||||
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_TX_BYTES) {
|
||||
PRINTM(MLSTATS,
|
||||
"Num_tx_bytes = %lu, \t Num_tx_packets = %lu\n",
|
||||
priv->plinkstats.tx_bytes,
|
||||
priv->plinkstats.tx_packets);
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_RX_BYTES) {
|
||||
PRINTM(MLSTATS,
|
||||
"Num_rx_bytes = %lu, \t Num_rx_packets = %lu\n",
|
||||
priv->plinkstats.rx_bytes,
|
||||
priv->plinkstats.rx_packets);
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_CHLOAD) {
|
||||
PRINTM(MLSTATS, "Channel Load = %d %%, noise = %d\n",
|
||||
priv->plinkstats.chload, priv->plinkstats.noise);
|
||||
}
|
||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_CHANNEL) {
|
||||
PRINTM(MLSTATS, "Channel = %d\n",
|
||||
priv->plinkstats.channel);
|
||||
}
|
||||
#endif
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_REGION) {
|
||||
char *region_str = region_code_2_string(
|
||||
priv->plinkstats.region_code);
|
||||
if (region_str)
|
||||
PRINTM(MLSTATS, "Region = %c%c\n",
|
||||
region_str[0], region_str[1]);
|
||||
else
|
||||
PRINTM(MLSTATS, "Region = Unknown\n");
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_RETRY_CNT) {
|
||||
PRINTM(MLSTATS, "Retry count = %lu\n",
|
||||
priv->plinkstats.retry_cnt);
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_FAILED_CNT) {
|
||||
PRINTM(MLSTATS, "Failed count = %lu\n",
|
||||
priv->plinkstats.failed_cnt);
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_RTSFAILURE) {
|
||||
PRINTM(MLSTATS, "RTS failure count = %lu\n",
|
||||
priv->plinkstats.rtsfailure);
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_FCSERROR) {
|
||||
PRINTM(MLSTATS, "FCS error count = %lu\n",
|
||||
priv->plinkstats.fcserror);
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_TXFRAME) {
|
||||
PRINTM(MLSTATS, "Tx frame count = %lu\n",
|
||||
priv->plinkstats.txframe);
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_TX_DROPPED) {
|
||||
PRINTM(MLSTATS, "Tx dropped packets = %lu\n",
|
||||
priv->plinkstats.tx_dropped);
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_DEAUTH_TX) {
|
||||
PRINTM(MLSTATS, "Deauth TX event count = %lu\n",
|
||||
priv->plinkstats.num_evt_deauth_tx);
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_DEAUTH_RX) {
|
||||
PRINTM(MLSTATS, "Deauth RX event count = %lu\n",
|
||||
priv->plinkstats.num_evt_deauth_rx);
|
||||
}
|
||||
if ((priv->plinkstats_cfg.filter & PLSTATS_FILTER_SIGNAL) &&
|
||||
(priv->bss_role == MLAN_BSS_ROLE_STA)) {
|
||||
PRINTM(MLSTATS, "Signal RSSI = %d dBm\n",
|
||||
priv->plinkstats.data_rssi);
|
||||
PRINTM(MLSTATS, "SNR = %d dB\n",
|
||||
priv->plinkstats.data_snr);
|
||||
}
|
||||
if (priv->plinkstats_cfg.filter & PLSTATS_FILTER_STA_LIST) {
|
||||
int sta_idx;
|
||||
int rssi = 0;
|
||||
|
||||
PRINTM(MLSTATS, "Number of STA = %d\n",
|
||||
sta_list->sta_count);
|
||||
for (sta_idx = 0; sta_idx < sta_list->sta_count;
|
||||
sta_idx++) {
|
||||
PRINTM(MLSTATS, "STA %d information:\n",
|
||||
sta_idx + 1);
|
||||
PRINTM(MLSTATS, "=====================\n");
|
||||
PRINTM(MLSTATS, "MAC Address: " MACSTR "\n",
|
||||
MAC2STR(sta_list->info[sta_idx]
|
||||
.mac_address));
|
||||
PRINTM(MLSTATS, "Power mgmt status: %s\n",
|
||||
(sta_list->info[sta_idx]
|
||||
.power_mgmt_status == 0) ?
|
||||
"active" :
|
||||
"power save");
|
||||
PRINTM(MLSTATS, "Mode: %s\n",
|
||||
(sta_list->info[sta_idx].bandmode ==
|
||||
BAND_B) ?
|
||||
"11b," :
|
||||
(sta_list->info[sta_idx].bandmode ==
|
||||
BAND_G) ?
|
||||
"11g," :
|
||||
(sta_list->info[sta_idx].bandmode ==
|
||||
BAND_A) ?
|
||||
"11a," :
|
||||
(sta_list->info[sta_idx].bandmode ==
|
||||
BAND_GN) ?
|
||||
"2.4G_11n," :
|
||||
(sta_list->info[sta_idx].bandmode ==
|
||||
BAND_AN) ?
|
||||
"5G_11n," :
|
||||
(sta_list->info[sta_idx].bandmode ==
|
||||
BAND_GAC) ?
|
||||
"2.4G_11ac," :
|
||||
(sta_list->info[sta_idx].bandmode ==
|
||||
BAND_AAC) ?
|
||||
"5G_11ac," :
|
||||
(sta_list->info[sta_idx].bandmode ==
|
||||
BAND_GAX) ?
|
||||
"2.4G_11ax," :
|
||||
(sta_list->info[sta_idx].bandmode ==
|
||||
BAND_AAX) ?
|
||||
"5G_11ax," :
|
||||
(sta_list->info[sta_idx].bandmode ==
|
||||
BAND_6G) ?
|
||||
"6G_11ax," :
|
||||
"unknown");
|
||||
/** On some platform, s8 is same as unsigned
|
||||
* char*/
|
||||
rssi = (int)sta_list->info[sta_idx].rssi;
|
||||
if (rssi > 0x7f)
|
||||
rssi = -(256 - rssi);
|
||||
PRINTM(MLSTATS, "Rssi : %d dBm\n\n", rssi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
if (sta_list)
|
||||
kfree(sta_list);
|
||||
|
||||
if (!(handle->is_plinkstats_timer_set) &&
|
||||
(priv->plinkstats_cfg.enable == MTRUE)) {
|
||||
handle->plinkstats_chload_timer ^= MTRUE;
|
||||
handle->is_plinkstats_timer_set = MTRUE;
|
||||
if (handle->plinkstats_chload_timer) {
|
||||
/* Set a duration time to get chload from fw */
|
||||
woal_get_ch_load(priv, PRINT_LINTSTATS_CHLOAD_DURATION);
|
||||
woal_mod_timer(&handle->plinkstats_timer,
|
||||
PRINT_LINTSTATS_CHLOAD_DELAY);
|
||||
} else {
|
||||
/* Reserve CHLOAD_DELAY time to call woal_get_ch_load()
|
||||
*/
|
||||
woal_mod_timer(&handle->plinkstats_timer,
|
||||
(priv->plinkstats_cfg.interval *
|
||||
MOAL_TIMER_1S) -
|
||||
PRINT_LINTSTATS_CHLOAD_DELAY);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This workqueue function handles woal event queue
|
||||
*
|
||||
|
|
@ -13009,21 +13307,10 @@ t_void woal_evt_work_queue(struct work_struct *work)
|
|||
"Fail to request country power table\n");
|
||||
}
|
||||
break;
|
||||
#ifdef UAP_SUPPORT
|
||||
case WOAL_EVENT_AGCS:
|
||||
if (evt->agcs_evt.type ==
|
||||
AGCS_EVENT_TYPE_PROCESS_EVENT) {
|
||||
woal_process_agcs_event(
|
||||
(moal_private *)evt->priv,
|
||||
&evt->agcs_evt.stats);
|
||||
} else if (evt->agcs_evt.type ==
|
||||
AGCS_EVENT_TYPE_SEL_CHANNEL) {
|
||||
woal_process_ch_sel_and_switch(
|
||||
(moal_private *)evt->priv,
|
||||
&evt->agcs_evt);
|
||||
}
|
||||
case WOAL_EVENT_PRINT_LINKSTATS:
|
||||
woal_print_linkstats_info((moal_private *)evt->priv,
|
||||
MFALSE);
|
||||
break;
|
||||
#endif /* UAP_SUPPORT */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -13379,11 +13666,7 @@ t_void woal_main_work_queue(struct work_struct *work)
|
|||
}
|
||||
if (handle->reg_dbg == MTRUE) {
|
||||
handle->reg_dbg = MFALSE;
|
||||
if (handle->ops.reg_dbg
|
||||
#ifdef PCIE
|
||||
&& !IS_PCIEAW693(handle->card_type)
|
||||
#endif
|
||||
)
|
||||
if (handle->ops.reg_dbg)
|
||||
handle->ops.reg_dbg(handle);
|
||||
}
|
||||
if (handle->fw_dbg == MTRUE) {
|
||||
|
|
@ -13391,11 +13674,7 @@ t_void woal_main_work_queue(struct work_struct *work)
|
|||
#ifdef DEBUG_LEVEL1
|
||||
drvdbg &= ~MFW_D;
|
||||
#endif
|
||||
if (handle->ops.dump_fw_info
|
||||
#ifdef PCIE
|
||||
&& !IS_PCIEAW693(handle->card_type)
|
||||
#endif
|
||||
)
|
||||
if (handle->ops.dump_fw_info)
|
||||
handle->ops.dump_fw_info(handle);
|
||||
LEAVE();
|
||||
return;
|
||||
|
|
@ -14159,6 +14438,11 @@ mlan_status woal_remove_card(void *card)
|
|||
#endif
|
||||
#endif
|
||||
#endif
|
||||
if (handle->is_plinkstats_timer_set) {
|
||||
woal_cancel_timer(&handle->plinkstats_timer);
|
||||
priv->plinkstats_cfg.enable = MFALSE;
|
||||
handle->is_plinkstats_timer_set = MFALSE;
|
||||
}
|
||||
if (handle->tp_acnt.on) {
|
||||
handle->tp_acnt.on = 0;
|
||||
handle->tp_acnt.drop_point = 0;
|
||||
|
|
|
|||
|
|
@ -340,19 +340,6 @@ typedef t_u8 BOOLEAN;
|
|||
#define MAX_TIME_LEN 128
|
||||
#endif
|
||||
|
||||
/** FW cap info bit 12: 2G Support */
|
||||
#ifndef ISSUPP_11AC2GENABLED
|
||||
#define ISSUPP_11AC2GENABLED(FwCapInfo) (FwCapInfo & MBIT(12))
|
||||
#endif
|
||||
/** FW cap info bit 13: 5G Support */
|
||||
#ifndef ISSUPP_11AC5GENABLED
|
||||
#define ISSUPP_11AC5GENABLED(FwCapInfo) (FwCapInfo & MBIT(13))
|
||||
#endif
|
||||
/** FW cap info Ext bit 14: 6G Support */
|
||||
#ifndef FW_CAPINFO_EXT_6G
|
||||
#define FW_CAPINFO_EXT_6G MBIT(14)
|
||||
#endif
|
||||
|
||||
/** Driver version */
|
||||
extern char driver_version[MLAN_MAX_VER_STR_LEN];
|
||||
|
||||
|
|
@ -587,9 +574,17 @@ static inline void woal_mod_timer(pmoal_drv_timer timer,
|
|||
static inline void woal_cancel_timer(moal_drv_timer *timer)
|
||||
{
|
||||
if (timer->timer_is_periodic || in_atomic() || irqs_disabled())
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
timer_delete(&timer->tl);
|
||||
#else
|
||||
del_timer(&timer->tl);
|
||||
#endif
|
||||
else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
timer_delete_sync(&timer->tl);
|
||||
#else
|
||||
del_timer_sync(&timer->tl);
|
||||
#endif
|
||||
timer->timer_is_canceled = MTRUE;
|
||||
timer->time_period = 0;
|
||||
}
|
||||
|
|
@ -1153,7 +1148,7 @@ typedef struct _wait_queue {
|
|||
/** Default WIFIDIRECT BSS */
|
||||
#define DEF_WIFIDIRECT_BSS 1
|
||||
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||
#define DEF_VIRTUAL_BSS 0
|
||||
#define DEF_VIRTUAL_BSS 1
|
||||
#endif
|
||||
#endif /* WIFI_DIRECT_SUPPORT */
|
||||
/** Driver mode NAN bit */
|
||||
|
|
@ -1299,9 +1294,7 @@ enum woal_event_type {
|
|||
#endif
|
||||
WOAL_EVENT_RGPWR_KEY_MISMATCH,
|
||||
WOAL_EVENT_RESET_WIFI,
|
||||
#ifdef UAP_SUPPORT
|
||||
WOAL_EVENT_AGCS,
|
||||
#endif /* UAP_SUPPORT */
|
||||
WOAL_EVENT_PRINT_LINKSTATS,
|
||||
};
|
||||
|
||||
/** chan_rpt_info */
|
||||
|
|
@ -1335,10 +1328,6 @@ struct woal_event {
|
|||
mlan_deauth_param deauth_info;
|
||||
chan_radar_info radar_info;
|
||||
t_u8 deauth_evt_cnt;
|
||||
#ifdef UAP_SUPPORT
|
||||
/** AGCS event data for WOAL_EVENT_AGCS */
|
||||
agcs_event agcs_evt;
|
||||
#endif /* UAP_SUPPORT */
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -1701,6 +1690,91 @@ struct ipv6addr_entry {
|
|||
t_u8 ipv6_addr[16];
|
||||
};
|
||||
|
||||
/** second */
|
||||
#define PRINT_LINTSTATS_INTERVAL 5
|
||||
#define PRINT_LINTSTATS_FILTER 0xF
|
||||
#define PRINT_LINTSTATS_CHLOAD_DURATION 100 // unit is ms
|
||||
#define PRINT_LINTSTATS_CHLOAD_DELAY \
|
||||
(PRINT_LINTSTATS_CHLOAD_DURATION + 20) // unit is ms
|
||||
|
||||
/** print linkstats parameters */
|
||||
typedef struct _moal_priv_linkstats_cfg {
|
||||
/** enable/disable */
|
||||
t_u8 enable;
|
||||
/** filter for print items */
|
||||
t_u32 filter;
|
||||
/** Periodic time(ms) for print */
|
||||
t_u32 interval;
|
||||
/** netlink event flag */
|
||||
t_u8 netlink_evt;
|
||||
} moal_priv_linkstats_cfg;
|
||||
|
||||
/** print linkstats info */
|
||||
typedef struct _moal_priv_linkstats {
|
||||
/** channel */
|
||||
t_u16 channel;
|
||||
/** region code */
|
||||
t_u32 region_code;
|
||||
|
||||
/* Num TX packets */
|
||||
unsigned long tx_packets;
|
||||
/* Num TX packets base */
|
||||
unsigned long tx_packets_base;
|
||||
/* Num TX packets in bytes */
|
||||
unsigned long tx_bytes;
|
||||
/* Num TX packets in bytes base */
|
||||
unsigned long tx_bytes_base;
|
||||
|
||||
/* Num RX packets */
|
||||
unsigned long rx_packets;
|
||||
/* Num RX packets base */
|
||||
unsigned long rx_packets_base;
|
||||
/* Num RX packets in bytes */
|
||||
unsigned long rx_bytes;
|
||||
/* Num RX packets in bytes base */
|
||||
unsigned long rx_bytes_base;
|
||||
|
||||
/** dot11 retry count */
|
||||
unsigned long retry_cnt;
|
||||
/** dot11 retry base count */
|
||||
unsigned long retry_cnt_base;
|
||||
/** dot11 failed count */
|
||||
unsigned long failed_cnt;
|
||||
/** dot11 failed base count */
|
||||
unsigned long failed_cnt_base;
|
||||
/** dot11 rts failure count */
|
||||
unsigned long rtsfailure;
|
||||
/** dot11 rts base failure count for reset*/
|
||||
unsigned long rtsfailure_base;
|
||||
/** dot11 fcs error count */
|
||||
unsigned long fcserror;
|
||||
/** dot11 fcs base error count */
|
||||
unsigned long fcserror_base;
|
||||
/** dot11 tx frame count */
|
||||
unsigned long txframe;
|
||||
/** dot11 tx frame base count */
|
||||
unsigned long txframe_base;
|
||||
/** dot11 tx frame dropped count */
|
||||
unsigned long tx_dropped;
|
||||
/** dot11 tx frame dropped base count */
|
||||
unsigned long tx_dropped_base;
|
||||
/** Num of deauth sent by our device */
|
||||
unsigned long num_evt_deauth_tx;
|
||||
/** Num of deauth received by our device */
|
||||
unsigned long num_evt_deauth_rx;
|
||||
|
||||
/** Last DATA RSSI in dBm */
|
||||
t_s16 data_rssi;
|
||||
/** SNR of last data packet */
|
||||
t_s16 data_snr;
|
||||
/** Noise floor of last data packet */
|
||||
t_s16 data_nf;
|
||||
/** Channel Load (max = 100) */
|
||||
t_u16 chload;
|
||||
/** Noise floor */
|
||||
t_s16 noise;
|
||||
} moal_priv_linkstats;
|
||||
|
||||
/** Private structure for MOAL */
|
||||
struct _moal_private {
|
||||
/** Handle structure */
|
||||
|
|
@ -1958,6 +2032,8 @@ struct _moal_private {
|
|||
t_u8 delay_deauth_notify;
|
||||
/** notify bssid */
|
||||
t_u8 bssid_notify[ETH_ALEN];
|
||||
/** notify auth from mgmt_tx */
|
||||
t_u8 auth_mgmt_tx;
|
||||
#endif
|
||||
#ifdef CONFIG_PROC_FS
|
||||
/** Proc entry */
|
||||
|
|
@ -2111,6 +2187,9 @@ struct _moal_private {
|
|||
t_u16 auth_tx_wait_time;
|
||||
|
||||
t_u32 rx_pkt_ac[MAX_AC_QUEUES];
|
||||
|
||||
moal_priv_linkstats_cfg plinkstats_cfg;
|
||||
moal_priv_linkstats plinkstats;
|
||||
};
|
||||
|
||||
#ifdef SDIO
|
||||
|
|
@ -2704,6 +2783,7 @@ typedef struct _moal_mod_para {
|
|||
int max_nan_bss;
|
||||
int auto_ds;
|
||||
int net_rx;
|
||||
int wifi_reset_config;
|
||||
int amsdu_deaggr;
|
||||
int tx_budget;
|
||||
int mclient_scheduling;
|
||||
|
|
@ -2865,37 +2945,6 @@ typedef struct _moal_tp_acnt_t {
|
|||
moal_drv_timer timer;
|
||||
} moal_tp_acnt_t;
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
typedef MLAN_PACK_START struct {
|
||||
t_u16 action;
|
||||
/* BIT0 - Enable Agile channel switching in CarPlay
|
||||
* BIT1 - no specific interference type check, but only check Tx or Rx
|
||||
* throughput drop
|
||||
*/
|
||||
t_u32 mode;
|
||||
/* Adjust the weight of TX/RX average packet count */
|
||||
t_u8 avg_threshold_percentage;
|
||||
/* The conservative amount of rx packet per second */
|
||||
t_u16 rx_min_pkt_count;
|
||||
/* The conservative amount of tx packet per second */
|
||||
t_u16 tx_min_pkt_count;
|
||||
/* Unit is ms */
|
||||
t_u32 sample_time;
|
||||
/* The latest sampled windows size */
|
||||
t_u8 sample_count_window;
|
||||
/* Continuous drop rapidly times */
|
||||
t_u8 continuous_hit_count;
|
||||
/* Make sure a reasonable rate can be sustained. */
|
||||
t_s8 nf_margin;
|
||||
/* The channel load threshold that the new channel needs to reach. */
|
||||
t_u8 chload_threshold_percentage;
|
||||
/* channel switch announcement count, default is 5 */
|
||||
t_u8 csa_cnt;
|
||||
/** Variable number (fixed maximum) of channels to scan up */
|
||||
wlan_user_scan_chan chan_list[WLAN_USER_SCAN_CHAN_MAX];
|
||||
} MLAN_PACK_END wlan_agcs_info;
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
/** Handle data structure for MOAL */
|
||||
struct _moal_handle {
|
||||
/** MLAN adapter structure */
|
||||
|
|
@ -3161,6 +3210,12 @@ struct _moal_handle {
|
|||
t_u8 cfg80211_suspend;
|
||||
#endif
|
||||
#endif
|
||||
/** print link stats timer set flag */
|
||||
BOOLEAN is_plinkstats_timer_set;
|
||||
/** print link stats timer */
|
||||
moal_drv_timer plinkstats_timer;
|
||||
/** print link stats timer for getchload or print info */
|
||||
BOOLEAN plinkstats_chload_timer;
|
||||
/** FW debug flag */
|
||||
t_u8 fw_dbg;
|
||||
/** reg debug flag */
|
||||
|
|
@ -3377,17 +3432,6 @@ struct _moal_handle {
|
|||
t_u32 ips_ctrl;
|
||||
BOOLEAN is_edmac_enabled;
|
||||
bool driver_init;
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** agiled channel switch state */
|
||||
t_u32 agcs_state;
|
||||
/** The number of channels in the scan list */
|
||||
t_u32 agcs_num_in_chan_stats;
|
||||
/** Agiled channel switch info from cmd */
|
||||
wlan_agcs_info agcs_info;
|
||||
/* fw cap and cap_ext */
|
||||
mlan_hw_info hw_info;
|
||||
#endif /* UAP_SUPPORT */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -3589,7 +3633,12 @@ extern t_u32 drvdbg;
|
|||
if (drvdbg & MIF_D) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
|
||||
#define PRINTM_MLSTATS(msg...) \
|
||||
do { \
|
||||
woal_print(MLSTATS, msg); \
|
||||
if (drvdbg & MLSTATS) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MREG(msg...) \
|
||||
do { \
|
||||
woal_print(MREG, msg); \
|
||||
|
|
@ -3796,7 +3845,6 @@ static inline moal_private *woal_get_priv(moal_handle *handle,
|
|||
mlan_bss_role bss_role)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) {
|
||||
if (handle->priv[i]) {
|
||||
if (bss_role == MLAN_BSS_ROLE_ANY ||
|
||||
|
|
@ -4701,6 +4749,12 @@ t_bool woal_secure_sub(t_void *datain, t_s32 sub, t_void *dataout,
|
|||
data_type type);
|
||||
|
||||
mlan_status woal_edmac_cfg(moal_private *priv, t_u8 *country_code);
|
||||
void woal_print_linkstats_event(void *context);
|
||||
void woal_print_linkstats_info(moal_private *priv, bool is_reset);
|
||||
mlan_status woal_get_ch_load(moal_private *priv, t_u16 duration);
|
||||
mlan_status woal_get_ch_load_results(moal_private *priv, t_u16 *ch_load,
|
||||
t_s16 *noise);
|
||||
mlan_status woal_get_sta_list(moal_private *priv, mlan_ds_sta_list *sta_list);
|
||||
|
||||
#ifdef DUMP_TO_PROC
|
||||
void woal_print_firmware_dump_buf(t_u8 *pfd_buf, t_u64 fwdump_len);
|
||||
|
|
@ -4744,14 +4798,5 @@ mlan_status woal_ioctl_hostcmd_htc_cap(moal_private *priv, t_u16 action,
|
|||
t_u8 *enable);
|
||||
int woal_getset_regrdwr(moal_private *priv, t_u32 action, t_u32 type,
|
||||
t_u32 offset, t_u32 *value);
|
||||
#ifdef UAP_SUPPORT
|
||||
extern void woal_process_agcs_event(moal_private *priv,
|
||||
pagcs_stats pstart_event);
|
||||
extern void woal_process_ch_sel_and_switch(moal_private *priv,
|
||||
pagcs_event pevent);
|
||||
extern mlan_status moal_agcs_trans_state(moal_private *priv,
|
||||
agcs_state next_state);
|
||||
extern void woal_agcs_event(moal_private *priv, pagcs_event pacs_start_event);
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
#endif /* _MOAL_MAIN_H */
|
||||
|
|
|
|||
|
|
@ -299,7 +299,9 @@ static mlan_status woal_reset_adma(moal_handle *handle)
|
|||
t_u32 value;
|
||||
t_u32 reset_reg = handle->card_info->fw_reset_reg;
|
||||
t_u8 reset_adma_val = 0x97;
|
||||
|
||||
/* wake up device before set the reset reg */
|
||||
handle->ops.read_reg(handle, handle->card_info->fw_wakeup_reg, &value);
|
||||
udelay(100);
|
||||
if (handle->ops.write_reg(handle, reset_reg, reset_adma_val) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR, "Failed to write register.\n");
|
||||
|
|
@ -490,11 +492,7 @@ perform_init:
|
|||
}
|
||||
if (woal_init_fw(handle)) {
|
||||
PRINTM(MFATAL, "Firmware Init Failed\n");
|
||||
#ifdef PCIE
|
||||
if (!IS_PCIEAW693(handle->card_type))
|
||||
#endif
|
||||
woal_pcie_reg_dbg(handle);
|
||||
|
||||
woal_pcie_reg_dbg(handle);
|
||||
if (fw_serial_bkp)
|
||||
moal_extflg_set(handle, EXT_FW_SERIAL);
|
||||
goto err_init_fw;
|
||||
|
|
@ -951,11 +949,6 @@ static void woal_pcie_reset_prepare(struct pci_dev *pdev)
|
|||
pcie_service_card *card;
|
||||
moal_handle *handle;
|
||||
moal_handle *ref_handle = NULL;
|
||||
#if defined(PCIEAW693)
|
||||
pcie_service_card *ref_card = NULL;
|
||||
t_u32 value;
|
||||
t_u32 count = 0;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -991,34 +984,8 @@ static void woal_pcie_reset_prepare(struct pci_dev *pdev)
|
|||
ref_handle = (moal_handle *)handle->pref_mac;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(PCIEAW693)
|
||||
/* WAR to Poll firmware dump flag for 5 seconds */
|
||||
while (count < 50 &&
|
||||
(handle->fw_dump || (ref_handle && ref_handle->fw_dump))) {
|
||||
woal_sched_timeout(100);
|
||||
count++;
|
||||
}
|
||||
|
||||
// This is just WAR for PRC release
|
||||
/* wake up device before set the reset reg */
|
||||
handle->ops.read_reg(handle, handle->card_info->fw_wakeup_reg, &value);
|
||||
mdelay(50);
|
||||
|
||||
/*Disable L1 before start of FLR*/
|
||||
pci_write_config_dword(card->dev, 0x80, 0x40);
|
||||
if (ref_handle)
|
||||
ref_card = (pcie_service_card *)ref_handle->card;
|
||||
if (ref_card)
|
||||
pci_write_config_dword(ref_card->dev, 0x80, 0x40);
|
||||
#endif
|
||||
|
||||
handle->surprise_removed = MTRUE;
|
||||
handle->fw_reseting = MTRUE;
|
||||
if (ref_handle) {
|
||||
ref_handle->surprise_removed = MTRUE;
|
||||
ref_handle->fw_reseting = MTRUE;
|
||||
}
|
||||
// TODO: Can add more chips once the related code has been ported to fw
|
||||
// v18
|
||||
if (IS_PCIE9097(handle->card_type) || IS_PCIE9098(handle->card_type) ||
|
||||
|
|
@ -1028,6 +995,8 @@ static void woal_pcie_reset_prepare(struct pci_dev *pdev)
|
|||
|
||||
woal_do_flr(handle, true, true);
|
||||
if (ref_handle) {
|
||||
ref_handle->surprise_removed = MTRUE;
|
||||
ref_handle->fw_reseting = MTRUE;
|
||||
woal_do_flr(ref_handle, true, true);
|
||||
}
|
||||
|
||||
|
|
@ -1043,9 +1012,6 @@ static void woal_pcie_reset_done(struct pci_dev *pdev)
|
|||
pcie_service_card *card;
|
||||
moal_handle *handle;
|
||||
moal_handle *ref_handle = NULL;
|
||||
#if defined(PCIEAW693)
|
||||
pcie_service_card *ref_card = NULL;
|
||||
#endif
|
||||
ENTER();
|
||||
|
||||
card = pci_get_drvdata(pdev);
|
||||
|
|
@ -1092,17 +1058,6 @@ static void woal_pcie_reset_done(struct pci_dev *pdev)
|
|||
wifi_status = WIFI_STATUS_OK;
|
||||
if (handle)
|
||||
woal_send_auto_recovery_complete_event(handle);
|
||||
|
||||
// This is just WAR for PRC release
|
||||
#if defined(PCIEAW693)
|
||||
/*Re-enable L1 before start of FLR*/
|
||||
pci_write_config_dword(card->dev, 0x80, 0x143);
|
||||
if (ref_handle)
|
||||
ref_card = (pcie_service_card *)ref_handle->card;
|
||||
if (ref_card)
|
||||
pci_write_config_dword(ref_card->dev, 0x80, 0x143);
|
||||
#endif
|
||||
|
||||
LEAVE();
|
||||
}
|
||||
#else
|
||||
|
|
@ -2068,7 +2023,8 @@ static memory_type_mapping mem_type_mapping_tbl_8897[] = {
|
|||
defined(PCIEAW693) || defined(PCIEIW624)
|
||||
#define DEBUG_HOST_READY_8997 0xCC
|
||||
#define DEBUG_HOST_EVENT_READY 0xAA
|
||||
#define DEBUG_HOST_RESET_READY 0x99
|
||||
#define DEBUG_HOST_RESET_READY \
|
||||
0x98 /* 0x98: Reset WiFi only, 0x99: Reset both BT and WiFi */
|
||||
static memory_type_mapping mem_type_mapping_tbl_8997 = {"DUMP", NULL, NULL,
|
||||
0xDD, 0x00};
|
||||
|
||||
|
|
@ -3103,10 +3059,6 @@ static void woal_pcie_work(struct work_struct *work)
|
|||
container_of(work, pcie_service_card, reset_work);
|
||||
moal_handle *handle = NULL;
|
||||
moal_handle *ref_handle = NULL;
|
||||
#if defined(PCIEAW693)
|
||||
pcie_service_card *ref_card = NULL;
|
||||
t_u32 value;
|
||||
#endif
|
||||
handle = card->handle;
|
||||
if (!handle)
|
||||
return;
|
||||
|
|
@ -3128,20 +3080,6 @@ static void woal_pcie_work(struct work_struct *work)
|
|||
mlan_ioctl(ref_handle->pmlan_adapter, NULL);
|
||||
}
|
||||
}
|
||||
// This is just WAR for PRC release
|
||||
#if defined(PCIEAW693)
|
||||
/* wake up device before set the reset reg */
|
||||
handle->ops.read_reg(handle, handle->card_info->fw_wakeup_reg, &value);
|
||||
mdelay(50);
|
||||
|
||||
/*Disable L1 state before start of IN-BAND RESET*/
|
||||
pci_write_config_dword(card->dev, 0x80, 0x40);
|
||||
if (ref_handle)
|
||||
ref_card = (pcie_service_card *)ref_handle->card;
|
||||
if (ref_card)
|
||||
pci_write_config_dword(ref_card->dev, 0x80, 0x40);
|
||||
#endif
|
||||
|
||||
handle->surprise_removed = MTRUE;
|
||||
handle->fw_reseting = MTRUE;
|
||||
// TODO: Can add more chips once the related code has been ported to fw
|
||||
|
|
@ -3186,15 +3124,6 @@ static void woal_pcie_work(struct work_struct *work)
|
|||
card->work_flags = MFALSE;
|
||||
wifi_status = WIFI_STATUS_OK;
|
||||
woal_send_auto_recovery_complete_event(handle);
|
||||
|
||||
// This is just WAR for PRC release
|
||||
#if defined(PCIEAW693)
|
||||
/*Re-enable L1 state once IN-BAND RESET is done*/
|
||||
pci_write_config_dword(card->dev, 0x80, 0x143);
|
||||
if (ref_card)
|
||||
pci_write_config_dword(ref_card->dev, 0x80, 0x143);
|
||||
#endif
|
||||
|
||||
PRINTM(MMSG, "========END IN-BAND RESET===========\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* driver.
|
||||
*
|
||||
*
|
||||
* Copyright 2014-2021, 2024 NXP
|
||||
* Copyright 2014-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
|
|||
|
|
@ -2618,6 +2618,8 @@ static int woal_drv_dbg(moal_private *priv, struct iwreq *wrq)
|
|||
(drvdbg & MREG) ? "X" : "");
|
||||
printk(KERN_ALERT "MREG_D (%08x) %s\n", MREG_D,
|
||||
(drvdbg & MREG_D) ? "X" : "");
|
||||
printk(KERN_ALERT "MLSTATS (%08x) %s\n", MLSTATS,
|
||||
(drvdbg & MLSTATS) ? "X" : "");
|
||||
printk(KERN_ALERT "MIOCTL (%08x) %s\n", MIOCTL,
|
||||
(drvdbg & MIOCTL) ? "X" : "");
|
||||
printk(KERN_ALERT "MINTR (%08x) %s\n", MINTR,
|
||||
|
|
|
|||
|
|
@ -650,6 +650,13 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (handle->fw_reseting) {
|
||||
PRINTM(MERROR,
|
||||
"Firmware reset in progress, ignore proc file write\n");
|
||||
LEAVE();
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
flag = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL;
|
||||
|
||||
if (!woal_secure_add(&count, 1, &tmp_count, TYPE_UINT32)) {
|
||||
|
|
@ -707,9 +714,13 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
|||
if (!IS_USB(handle->card_type))
|
||||
#endif
|
||||
handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(handle->pmlan_adapter,
|
||||
handle->driver_status);
|
||||
ref_handle = (moal_handle *)handle->pref_mac;
|
||||
if (ref_handle) {
|
||||
ref_handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(ref_handle->pmlan_adapter,
|
||||
ref_handle->driver_status);
|
||||
priv = woal_get_priv(ref_handle, MLAN_BSS_ROLE_ANY);
|
||||
if (priv) {
|
||||
ref_handle->fw_dump_status = MTRUE;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* driver.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2022, 2024 NXP
|
||||
* Copyright 2008-2022, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -55,6 +55,9 @@ Change log:
|
|||
#define FIXED_ADDRESS 0
|
||||
#endif
|
||||
|
||||
/** SDIO register card control 3 */
|
||||
#define SD_CARD_CTRL3 0xF3
|
||||
|
||||
#if defined(SD8977)
|
||||
#define SD8977_V0 0x0
|
||||
#define SD8977_V1 0x8
|
||||
|
|
|
|||
|
|
@ -1288,6 +1288,30 @@ static mlan_status woal_sdio_f0_readb(moal_handle *handle, t_u32 reg,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function writes data to card register FN0
|
||||
*
|
||||
* @param handle A Pointer to the moal_handle structure
|
||||
* @param reg Register offset
|
||||
* @param data Value
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status woal_sdio_f0_writeb(moal_handle *handle, t_u32 reg,
|
||||
t_u8 data)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
|
||||
sdio_claim_host(((sdio_mmc_card *)handle->card)->func);
|
||||
sdio_f0_writeb(((sdio_mmc_card *)handle->card)->func, data, reg,
|
||||
(int *)&ret);
|
||||
sdio_release_host(((sdio_mmc_card *)handle->card)->func);
|
||||
|
||||
PRINTM(MREG, "sdio f0 w %x = %x (%x)\n", reg, data, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function use SG mode to read/write data into card memory
|
||||
*
|
||||
|
|
@ -1585,6 +1609,21 @@ static mlan_status woal_sdiommc_register_dev(moal_handle *handle)
|
|||
goto release_host;
|
||||
}
|
||||
ret = woal_sdio_claim_irq(card, woal_sdio_interrupt);
|
||||
/* For SDIO over SPI, set CCCR_IF register bit5 ECSI to enable
|
||||
* IRQ mode. Set CCCR CARD_CTRL3 bit 1 to configure start token
|
||||
* is 0xFE for CMD53 single block write operation.
|
||||
*/
|
||||
if ((((sdio_mmc_card *)handle->card)->func->card->host->caps &
|
||||
MMC_CAP_SPI)) {
|
||||
t_u8 data = 0;
|
||||
woal_sdio_f0_readb(handle, SDIO_CCCR_IF, &data);
|
||||
data |= SDIO_BUS_ECSI;
|
||||
woal_sdio_f0_writeb(handle, SDIO_CCCR_IF, data);
|
||||
|
||||
woal_sdio_f0_readb(handle, SD_CARD_CTRL3, &data);
|
||||
data |= 0x02;
|
||||
woal_sdio_f0_writeb(handle, SD_CARD_CTRL3, data);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
ret = sdio_claim_irq(func, woal_sdio_interrupt);
|
||||
|
|
|
|||
|
|
@ -936,7 +936,7 @@ mlan_status moal_get_hw_spec_complete(t_void *pmoal, mlan_status status,
|
|||
moal_handle *handle = (moal_handle *)pmoal;
|
||||
int i;
|
||||
t_u32 drv_mode = handle->params.drv_mode;
|
||||
#if defined(PCIE9098) || defined(PCIEAW693) || defined(SDAW693)
|
||||
#ifdef PCIE9098
|
||||
size_t drv_ver_len = strlen(driver_version);
|
||||
#endif
|
||||
ENTER();
|
||||
|
|
@ -944,13 +944,26 @@ mlan_status moal_get_hw_spec_complete(t_void *pmoal, mlan_status status,
|
|||
PRINTM(MCMND, "Get Hw Spec done, fw_cap=0x%x\n", phw->fw_cap);
|
||||
#ifdef PCIE9098
|
||||
/** Special/Temporary handling to manage the driver version
|
||||
* string to identify Seahawk/AW690 (skyhawk based) based on
|
||||
* string to identify AW690/AW590/AW592 (skyhawk based) based on
|
||||
* fw_cap_ext value set by Fw */
|
||||
if (phw->fw_cap_ext & MBIT(31) &&
|
||||
if (phw->fw_cap_ext & (MBIT(31) | MBIT(30) | MBIT(29)) &&
|
||||
IS_PCIE9098(handle->card_type)) {
|
||||
moal_memcpy_ext(handle, driver_version, CARD_PCIEAW690,
|
||||
strlen(CARD_PCIEAW690),
|
||||
strlen(driver_version));
|
||||
if (phw->fw_cap_ext & MBIT(29)) {
|
||||
moal_memcpy_ext(handle, driver_version,
|
||||
CARD_PCIEAW592,
|
||||
strlen(CARD_PCIEAW592),
|
||||
strlen(driver_version));
|
||||
} else if (phw->fw_cap_ext & MBIT(30)) {
|
||||
moal_memcpy_ext(handle, driver_version,
|
||||
CARD_PCIEAW590,
|
||||
strlen(CARD_PCIEAW590),
|
||||
strlen(driver_version));
|
||||
} else if (phw->fw_cap_ext & MBIT(31)) {
|
||||
moal_memcpy_ext(handle, driver_version,
|
||||
CARD_PCIEAW690,
|
||||
strlen(CARD_PCIEAW690),
|
||||
strlen(driver_version));
|
||||
}
|
||||
// coverity[string_null:SUPPRESS]
|
||||
// coverity[cert_str32_c_violation:SUPPRESS]
|
||||
moal_memcpy_ext(handle,
|
||||
|
|
@ -971,47 +984,6 @@ mlan_status moal_get_hw_spec_complete(t_void *pmoal, mlan_status status,
|
|||
handle->driver_version[drv_ver_len] = '\0';
|
||||
}
|
||||
#endif
|
||||
#ifdef PCIEAW693
|
||||
/**
|
||||
* Special/Temporary handling to manage the driver version
|
||||
* string to identify AW693/IW623 based on fw_cap value set by
|
||||
* Fw
|
||||
*/
|
||||
if ((phw->fw_cap_ext & MBIT(23)) &&
|
||||
IS_PCIEAW693(handle->card_type)) {
|
||||
moal_memcpy_ext(handle, driver_version, CARD_PCIEIW623,
|
||||
strlen(CARD_PCIEIW623),
|
||||
strlen(driver_version));
|
||||
if (drv_ver_len >= MLAN_MAX_VER_STR_LEN - 1) {
|
||||
drv_ver_len = MLAN_MAX_VER_STR_LEN - 1;
|
||||
}
|
||||
moal_memcpy_ext(handle, handle->driver_version,
|
||||
driver_version, drv_ver_len,
|
||||
MLAN_MAX_VER_STR_LEN - 1);
|
||||
handle->driver_version[drv_ver_len] = '\0';
|
||||
}
|
||||
#endif
|
||||
#ifdef SDAW693
|
||||
/**
|
||||
* Special/Temporary handling to manage the driver version
|
||||
* string to identify AW693/IW623 based on fw_cap value set by
|
||||
* Fw
|
||||
*/
|
||||
if ((phw->fw_cap_ext & MBIT(23)) &&
|
||||
IS_SDAW693(handle->card_type)) {
|
||||
moal_memcpy_ext(handle, driver_version, CARD_SDIW623,
|
||||
strlen(CARD_SDIW623),
|
||||
strlen(driver_version));
|
||||
if (drv_ver_len >= MLAN_MAX_VER_STR_LEN - 1) {
|
||||
drv_ver_len = MLAN_MAX_VER_STR_LEN - 1;
|
||||
}
|
||||
moal_memcpy_ext(handle, handle->driver_version,
|
||||
driver_version, drv_ver_len,
|
||||
MLAN_MAX_VER_STR_LEN - 1);
|
||||
handle->driver_version[drv_ver_len] = '\0';
|
||||
}
|
||||
#endif
|
||||
|
||||
if (phw->fw_cap & FW_CAPINFO_DISABLE_NAN)
|
||||
handle->params.drv_mode &= ~DRV_MODE_NAN;
|
||||
/** FW should only enable DFS on one mac */
|
||||
|
|
@ -1046,9 +1018,6 @@ mlan_status moal_get_hw_spec_complete(t_void *pmoal, mlan_status status,
|
|||
}
|
||||
PRINTM(MCMND, "org_drv_mode=0x%x drv_mode=0x%x\n", drv_mode,
|
||||
handle->params.drv_mode);
|
||||
|
||||
moal_memcpy_ext(handle, &(handle->hw_info), phw,
|
||||
sizeof(mlan_hw_info), sizeof(mlan_hw_info));
|
||||
}
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
|
@ -3247,10 +3216,15 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
wake_up(&handle->init_wait_q);
|
||||
woal_store_firmware_dump(pmoal, pmevent);
|
||||
handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(handle->pmlan_adapter,
|
||||
handle->driver_status);
|
||||
wifi_status = WIFI_STATUS_FW_DUMP;
|
||||
ref_handle = (moal_handle *)handle->pref_mac;
|
||||
if (ref_handle)
|
||||
if (ref_handle) {
|
||||
ref_handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(ref_handle->pmlan_adapter,
|
||||
ref_handle->driver_status);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
if (MLAN_STATUS_SUCCESS ==
|
||||
|
|
@ -3429,7 +3403,6 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
priv->phandle->scan_time_start.time_usec = 0;
|
||||
}
|
||||
|
||||
moal_agcs_trans_state(priv, AGCS_STATE_SCAN_REPORT);
|
||||
break;
|
||||
|
||||
case MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM:
|
||||
|
|
@ -3792,7 +3765,6 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
pmevent->event_len +
|
||||
strlen(FW_DEBUG_INFO) + 1);
|
||||
break;
|
||||
|
||||
case MLAN_EVENT_ID_FW_WMM_CONFIG_CHANGE:
|
||||
#ifdef STA_WEXT
|
||||
if (IS_STA_WEXT(cfg80211_wext))
|
||||
|
|
@ -3824,9 +3796,14 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
break;
|
||||
case MLAN_EVENT_ID_DRV_DBG_DUMP:
|
||||
priv->phandle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(handle->pmlan_adapter,
|
||||
handle->driver_status);
|
||||
ref_handle = (moal_handle *)priv->phandle->pref_mac;
|
||||
if (ref_handle)
|
||||
if (ref_handle) {
|
||||
ref_handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(ref_handle->pmlan_adapter,
|
||||
ref_handle->driver_status);
|
||||
}
|
||||
#ifdef DEBUG_LEVEL1
|
||||
if (drvdbg & MFW_D)
|
||||
auto_fw_dump = MTRUE;
|
||||
|
|
@ -4042,6 +4019,8 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
priv->wdev
|
||||
->cac_time_ms));
|
||||
#endif
|
||||
// coverity violation raised for
|
||||
// kernel's API
|
||||
// coverity[misra_c_2012_rule_10_8_violation:SUPPRESS]
|
||||
if (!time_after_eq(jiffies, timeout)) {
|
||||
/* Exact time to make host and
|
||||
|
|
@ -4263,7 +4242,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
#endif
|
||||
#endif
|
||||
) {
|
||||
PRINTM(MEVENT,
|
||||
PRINTM(MMSG,
|
||||
"CHAN_SWITCH: 11n=%d, chan=%d, center_chan=%d, band=%d, width=%d, 2Offset=%d\n",
|
||||
pchan_info->is_11n_enabled,
|
||||
pchan_info->channel,
|
||||
|
|
@ -4276,9 +4255,6 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
#endif
|
||||
}
|
||||
#endif
|
||||
#ifdef UAP_SUPPORT
|
||||
moal_agcs_trans_state(priv, AGCS_STATE_COMPLETE);
|
||||
#endif /* UAP_SUPPORT */
|
||||
break;
|
||||
case MLAN_EVENT_ID_FW_STOP_TX:
|
||||
woal_stop_queue(priv->netdev);
|
||||
|
|
@ -4434,7 +4410,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
if (woal_chandef_create(priv, &chandef, pchan_info))
|
||||
PRINTM(MERROR,
|
||||
"Failed to create cfg80211_chan_def structure\n");
|
||||
PRINTM(MEVENT,
|
||||
PRINTM(MMSG,
|
||||
"UAP: 11n=%d, chan=%d, center_chan=%d, band=%d, width=%d, 2Offset=%d\n",
|
||||
pchan_info->is_11n_enabled, pchan_info->channel,
|
||||
pchan_info->center_chan,
|
||||
|
|
@ -4458,12 +4434,23 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
woal_broadcast_event(priv, pmevent->event_buf,
|
||||
pmevent->event_len);
|
||||
moal_connection_status_check_pmqos(pmoal);
|
||||
if ((drvdbg & MBIT(11)) &&
|
||||
priv->plinkstats_cfg.enable == MTRUE) {
|
||||
handle->is_plinkstats_timer_set = MTRUE;
|
||||
woal_mod_timer(&handle->plinkstats_timer,
|
||||
priv->plinkstats_cfg.interval *
|
||||
MOAL_TIMER_1S);
|
||||
}
|
||||
break;
|
||||
case MLAN_EVENT_ID_UAP_FW_BSS_IDLE:
|
||||
priv->media_connected = MFALSE;
|
||||
woal_broadcast_event(priv, pmevent->event_buf,
|
||||
pmevent->event_len);
|
||||
moal_connection_status_check_pmqos(pmoal);
|
||||
if (handle->is_plinkstats_timer_set) {
|
||||
woal_cancel_timer(&handle->plinkstats_timer);
|
||||
handle->is_plinkstats_timer_set = MFALSE;
|
||||
}
|
||||
break;
|
||||
case MLAN_EVENT_ID_UAP_FW_MIC_COUNTERMEASURES: {
|
||||
t_u16 status = 0;
|
||||
|
|
@ -4646,6 +4633,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
GFP_KERNEL);
|
||||
|
||||
#endif /* KERNEL_VERSION */
|
||||
priv->plinkstats.num_evt_deauth_rx++;
|
||||
}
|
||||
#endif /* UAP_CFG80211 */
|
||||
memmove((pmevent->event_buf + strlen(CUS_EVT_STA_DISCONNECTED) +
|
||||
|
|
@ -4753,9 +4741,10 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
->frame_control)) {
|
||||
priv->auth_tx_cnt = 0;
|
||||
PRINTM(MEVENT,
|
||||
"HostMlme %s: Received auth frame type = 0x%x\n",
|
||||
"HostMlme %s: Received auth frame type = 0x%x auth_mgmt_tx:%d\n",
|
||||
priv->netdev->name,
|
||||
priv->auth_alg);
|
||||
priv->auth_alg,
|
||||
priv->auth_mgmt_tx);
|
||||
|
||||
if (priv->auth_flag &
|
||||
HOST_MLME_AUTH_PENDING) {
|
||||
|
|
@ -4768,6 +4757,33 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
priv->phandle
|
||||
->host_mlme_priv =
|
||||
priv;
|
||||
|
||||
if (priv->auth_mgmt_tx &&
|
||||
(((struct ieee80211_mgmt
|
||||
*)
|
||||
pkt)
|
||||
->u
|
||||
.auth
|
||||
.auth_alg ==
|
||||
WLAN_AUTH_FT)) {
|
||||
priv->auth_flag =
|
||||
0;
|
||||
priv->auth_mgmt_tx =
|
||||
0;
|
||||
woal_mgmt_frame_register(
|
||||
priv,
|
||||
IEEE80211_STYPE_AUTH,
|
||||
MFALSE);
|
||||
/* Need
|
||||
* to
|
||||
* indicate
|
||||
* using
|
||||
* cfg80211_rx_mgmt
|
||||
*/
|
||||
// coverity[misra_c_2012_rule_15_3_violation:SUPPRESS]
|
||||
goto rx_mgmt;
|
||||
}
|
||||
|
||||
queue_work(
|
||||
priv->phandle
|
||||
->evt_workqueue,
|
||||
|
|
@ -4787,6 +4803,8 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
PRINTM(MEVENT,
|
||||
"HostMlme %s: Receive deauth/disassociate\n",
|
||||
priv->netdev->name);
|
||||
priv->plinkstats
|
||||
.num_evt_deauth_rx++;
|
||||
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || \
|
||||
(defined(ANDROID_SDK_VERSION) && ANDROID_SDK_VERSION >= 31))
|
||||
if (!priv->wdev->connected) {
|
||||
|
|
@ -4805,9 +4823,11 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
/* subtype 12 deauth
|
||||
* packet */
|
||||
priv->deauth_evt_cnt++;
|
||||
#define MAX_DEAUTH_COUNTER 5
|
||||
if (priv->deauth_evt_cnt >=
|
||||
MAX_DEAUTH_COUNTER) {
|
||||
if (handle->params
|
||||
.wifi_reset_config &&
|
||||
priv->deauth_evt_cnt >
|
||||
handle->params
|
||||
.wifi_reset_config) {
|
||||
woal_wifi_reset_event(
|
||||
priv,
|
||||
priv->deauth_evt_cnt);
|
||||
|
|
@ -4869,6 +4889,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
#endif
|
||||
} else
|
||||
#endif
|
||||
rx_mgmt:
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)
|
||||
cfg80211_rx_mgmt(
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||
|
|
@ -5340,11 +5361,6 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
msecs_to_jiffies(fw_reset_time * 1000));
|
||||
|
||||
break;
|
||||
#ifdef UAP_SUPPORT
|
||||
case MLAN_EVENT_ID_FW_AGCS_TRIGGER: {
|
||||
woal_agcs_event(priv, (pagcs_event)pmevent->event_buf);
|
||||
} break;
|
||||
#endif /* UAP_SUPPORT */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,16 +98,16 @@ static const u32 cfg80211_akm_suites[] = {
|
|||
mode_psd_t mode_psd_sta_FCC_6G[] = {
|
||||
{"indoor_", "minus1"},
|
||||
{"sp_", ""},
|
||||
{"vlp_", "minus7"},
|
||||
{"vlp_", "minus5"},
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Band: 6G, Region: EU STA-Mode-PSD Table
|
||||
*/
|
||||
mode_psd_t mode_psd_sta_EU_6G[] = {
|
||||
{"indoor_", "minus1"},
|
||||
{"indoor_", "plus10"},
|
||||
{"sp_", ""},
|
||||
{"vlp_", "minus10"},
|
||||
{"vlp_", "plus1"},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1763,6 +1763,7 @@ mlan_status woal_reset_wifi(moal_handle *handle, t_u8 cnt, char *reason)
|
|||
wifi_timeval ts;
|
||||
t_u64 diff;
|
||||
t_u8 intf_num;
|
||||
moal_handle *ref_handle;
|
||||
|
||||
/* Disconnect all interfaces */
|
||||
for (intf_num = 0; intf_num < handle->priv_num; intf_num++) {
|
||||
|
|
@ -1781,6 +1782,15 @@ mlan_status woal_reset_wifi(moal_handle *handle, t_u8 cnt, char *reason)
|
|||
if (reset_time.time_sec == 0 || diff >= MAX_WIFI_RESET_INTERVAL) {
|
||||
reset_time = ts;
|
||||
PRINTM(MERROR, "WiFi Reset due to %s cnt %d\n", reason, cnt);
|
||||
handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(handle->pmlan_adapter,
|
||||
handle->driver_status);
|
||||
ref_handle = (moal_handle *)handle->pref_mac;
|
||||
if (ref_handle) {
|
||||
ref_handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(ref_handle->pmlan_adapter,
|
||||
ref_handle->driver_status);
|
||||
}
|
||||
/* Do wifi independent reset */
|
||||
woal_process_hang(handle);
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
|
@ -1949,6 +1959,20 @@ static int woal_process_country_ie(moal_private *priv, struct cfg80211_bss *bss)
|
|||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!priv) {
|
||||
PRINTM(MERROR, "%s(): priv is NULL!\n", __func__);
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
|
||||
if (priv->wdev && priv->wdev->wiphy &&
|
||||
(priv->wdev->wiphy->regulatory_flags &
|
||||
REGULATORY_WIPHY_SELF_MANAGED)) {
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
rcu_read_lock();
|
||||
country_ie = (const u8 *)ieee80211_bss_get_ie(bss, WLAN_EID_COUNTRY);
|
||||
if (!country_ie) {
|
||||
|
|
@ -3037,8 +3061,10 @@ void woal_host_mlme_work_queue(struct work_struct *work)
|
|||
(t_u8 *)&status, NULL, 0, 0)) {
|
||||
PRINTM(MERROR,
|
||||
"failed to cancel remain on channel\n");
|
||||
} else {
|
||||
priv->phandle->remain_on_channel =
|
||||
MFALSE;
|
||||
}
|
||||
priv->phandle->remain_on_channel = MFALSE;
|
||||
}
|
||||
PRINTM(MCMND, "wlan: HostMlme %s auth success\n",
|
||||
priv->netdev->name);
|
||||
|
|
@ -3088,7 +3114,8 @@ static mlan_status woal_host_mlme_fallback_to_prev_ap(moal_private *priv)
|
|||
roam_info.resp_ie_len = assoc_info->assoc_resp_len;
|
||||
|
||||
if (priv->conn_ssid_len) {
|
||||
#if (CFG80211_VERSION_CODE > KERNEL_VERSION(5, 19, 1))
|
||||
#if ((CFG80211_VERSION_CODE > KERNEL_VERSION(5, 19, 1)) || \
|
||||
(defined(ANDROID_SDK_VERSION) && ANDROID_SDK_VERSION >= 31))
|
||||
if (priv->wdev->u.client.ssid_len == 0) {
|
||||
priv->wdev->u.client.ssid_len =
|
||||
priv->conn_ssid_len;
|
||||
|
|
@ -3198,6 +3225,30 @@ void woal_host_mlme_process_assoc_timeout(moal_private *priv,
|
|||
cfg80211_assoc_timeout(priv->netdev, bss);
|
||||
mutex_unlock(&priv->wdev->mtx);
|
||||
#endif
|
||||
|
||||
// Issue explicit Disconnect to CFG80211, on Assoc failure.
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
|
||||
if (priv->wdev &&
|
||||
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13 || \
|
||||
IMX_ANDROID_12_BACKPORT)
|
||||
priv->wdev->connected) {
|
||||
#else
|
||||
priv->wdev->current_bss) {
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
if (priv->host_mlme)
|
||||
woal_deauth_event(priv, MLAN_REASON_DEAUTH_LEAVING,
|
||||
priv->cfg_bssid);
|
||||
else
|
||||
#endif
|
||||
cfg80211_disconnected(priv->netdev, 0, NULL, 0,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
true,
|
||||
#endif
|
||||
GFP_KERNEL);
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(priv->cfg_bssid, 0, ETH_ALEN);
|
||||
woal_clear_conn_params(priv);
|
||||
}
|
||||
|
|
@ -4996,32 +5047,29 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
|
|||
moal_memcpy_ext(priv->phandle, region, request->alpha2,
|
||||
sizeof(request->alpha2), sizeof(region));
|
||||
region[2] = ' ';
|
||||
if ((handle->country_code[0] != request->alpha2[0]) ||
|
||||
(handle->country_code[1] != request->alpha2[1])) {
|
||||
if (handle->params.cntry_txpwr) {
|
||||
t_u8 country_code[COUNTRY_CODE_LEN];
|
||||
handle->country_code[0] = request->alpha2[0];
|
||||
handle->country_code[1] = request->alpha2[1];
|
||||
handle->country_code[2] = ' ';
|
||||
memset(country_code, 0, sizeof(country_code));
|
||||
if (MTRUE == is_cfg80211_special_region_code(region)) {
|
||||
country_code[0] = 'W';
|
||||
country_code[1] = 'W';
|
||||
} else {
|
||||
country_code[0] = request->alpha2[0];
|
||||
country_code[1] = request->alpha2[1];
|
||||
}
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_request_country_power_table(
|
||||
priv, country_code, MOAL_IOCTL_WAIT, 0)) {
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
|
||||
return -EFAULT;
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
load_power_table = MTRUE;
|
||||
if (handle->params.cntry_txpwr) {
|
||||
t_u8 country_code[COUNTRY_CODE_LEN];
|
||||
handle->country_code[0] = request->alpha2[0];
|
||||
handle->country_code[1] = request->alpha2[1];
|
||||
handle->country_code[2] = ' ';
|
||||
memset(country_code, 0, sizeof(country_code));
|
||||
if (MTRUE == is_cfg80211_special_region_code(region)) {
|
||||
country_code[0] = 'W';
|
||||
country_code[1] = 'W';
|
||||
} else {
|
||||
country_code[0] = request->alpha2[0];
|
||||
country_code[1] = request->alpha2[1];
|
||||
}
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_request_country_power_table(priv, country_code,
|
||||
MOAL_IOCTL_WAIT, 0)) {
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
|
||||
return -EFAULT;
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
load_power_table = MTRUE;
|
||||
}
|
||||
if (!handle->params.cntry_txpwr) {
|
||||
handle->country_code[0] = request->alpha2[0];
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ static mode_psd_t mode_psd_uap_FCC_6G[] = {
|
|||
* @brief Band: 6G, Region: EU UAP-Mode-PSD Table
|
||||
*/
|
||||
static mode_psd_t mode_psd_uap_EU_6G[] = {
|
||||
{"indoor_", "plus7"},
|
||||
{"indoor_", "plus10"},
|
||||
{"sp_", ""},
|
||||
{"vlp_", "minus5"},
|
||||
{"vlp_", "plus1"},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -536,6 +536,7 @@ static int woal_deauth_station(moal_private *priv, const u8 *mac_addr,
|
|||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
priv->plinkstats.num_evt_deauth_tx++;
|
||||
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
|
|
@ -1867,14 +1868,13 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
|||
->ht_cap.cap &
|
||||
0x13ff)) |
|
||||
0x0c;
|
||||
else if (wiphy->bands[IEEE80211_BAND_5GHZ]) {
|
||||
else
|
||||
sys_config->ht_cap_info =
|
||||
(ht_cap &
|
||||
(wiphy->bands[IEEE80211_BAND_5GHZ]
|
||||
->ht_cap.cap &
|
||||
0x13ff)) |
|
||||
0x0c;
|
||||
}
|
||||
}
|
||||
PRINTM(MCMND,
|
||||
"11n=%d, ht_cap=0x%x, channel=%d, bandcfg:chanBand=0x%x chanWidth=0x%x chan2Offset=0x%x scanMode=0x%x\n",
|
||||
|
|
@ -2371,18 +2371,18 @@ static int woal_cfg80211_add_mon_if(struct wiphy *wiphy,
|
|||
goto fail;
|
||||
}
|
||||
if (woal_is_any_interface_active(handle)) {
|
||||
/* set current band channel config */
|
||||
chan_info.bandcfg.chanBand = mon_if->band_chan_cfg.band;
|
||||
if (mon_if->band_chan_cfg.band &
|
||||
(BAND_B | BAND_G | BAND_GN | BAND_GAC))
|
||||
chan_info.bandcfg.chanBand = BAND_2GHZ;
|
||||
else
|
||||
/* TODO: Add support for BAND_4GHZ */
|
||||
chan_info.bandcfg.chanBand = BAND_5GHZ;
|
||||
chan_info.bandcfg.chanWidth =
|
||||
mon_if->band_chan_cfg.chan_bandwidth;
|
||||
chan_info.channel = mon_if->band_chan_cfg.channel;
|
||||
chan_info.is_11n_enabled = MTRUE;
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_get_active_intf_channel(priv, &chan_info)) {
|
||||
/* stop monitor mode on error */
|
||||
woal_set_net_monitor(priv, MOAL_IOCTL_WAIT, MFALSE, 0,
|
||||
NULL);
|
||||
ret = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
mon_if->band_chan_cfg.band = chan_info.bandcfg.chanBand;
|
||||
mon_if->band_chan_cfg.channel = chan_info.channel;
|
||||
mon_if->band_chan_cfg.chan_bandwidth =
|
||||
chan_info.bandcfg.chanWidth;
|
||||
}
|
||||
if (MLAN_STATUS_FAILURE ==
|
||||
woal_chandef_create(priv, &mon_if->chandef, &chan_info)) {
|
||||
|
|
@ -2749,24 +2749,37 @@ moal_private *woal_alloc_virt_interface(moal_handle *handle, t_u8 bss_index,
|
|||
priv->bss_role = MLAN_BSS_ROLE_STA;
|
||||
|
||||
INIT_LIST_HEAD(&priv->tcp_sess_queue);
|
||||
// Coverity raised warning for kernel API
|
||||
// coverity[useless_call:SUPPRESS]
|
||||
spin_lock_init(&priv->tcp_sess_lock);
|
||||
|
||||
INIT_LIST_HEAD(&priv->tx_stat_queue);
|
||||
// Coverity raised warning for kernel API
|
||||
// coverity[useless_call:SUPPRESS]
|
||||
spin_lock_init(&priv->tx_stat_lock);
|
||||
INIT_LIST_HEAD(&priv->mcast_list);
|
||||
// Coverity raised warning for kernel API
|
||||
// coverity[useless_call:SUPPRESS]
|
||||
spin_lock_init(&priv->mcast_lock);
|
||||
|
||||
#ifdef STA_CFG80211
|
||||
INIT_LIST_HEAD(&priv->dhcp_discover_queue);
|
||||
// Coverity raised warning for kernel API
|
||||
// coverity[useless_call:SUPPRESS]
|
||||
spin_lock_init(&priv->dhcp_discover_lock);
|
||||
// Coverity raised warning for kernel API
|
||||
// coverity[useless_call:SUPPRESS]
|
||||
spin_lock_init(&priv->arp_request_lock);
|
||||
#endif
|
||||
|
||||
#ifdef STA_CFG80211
|
||||
INIT_LIST_HEAD(&priv->ipv6_addrses);
|
||||
// Coverity raised warning for kernel API
|
||||
// coverity[useless_call:SUPPRESS]
|
||||
spin_lock_init(&priv->ipv6addr_lock);
|
||||
#endif
|
||||
// Coverity raised warning for kernel API
|
||||
// coverity[useless_call:SUPPRESS]
|
||||
spin_lock_init(&priv->connect_lock);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue