mxm_wifiex: update to mxm6x17437.p30 release

Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p137.2
PCIE-UART W8997 Firmware version 16.92.21.p137.2
SDIO-UART W8997 Firmware version 16.92.21.p137.2
SDIO-UART IW416 Firmware version 16.92.21.p137.2
SDIO_UART IW612 Firmware version 18.99.3.p15.8
SDIO-UART W8801 Firmware version 14.92.36.p192
SDIO-UART W9098 Firmware version 17.92.1.p149.155
PCIE-UART W9098 Firmware version 17.92.1.p149.155

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
This commit is contained in:
Luke Wang 2024-09-04 14:59:52 +08:00
parent de2411c71c
commit e5c9a169d7
42 changed files with 1791 additions and 1113 deletions

View file

@ -186,7 +186,7 @@ APPDIR= $(shell if test -d "mapp"; then echo mapp; fi)
#############################################################################
ccflags-y += -I$(KERNELDIR)/include
ccflags-y += -DMLAN_RELEASE_VERSION='"437.p24"'
ccflags-y += -DMLAN_RELEASE_VERSION='"437.p30"'
ccflags-y += -DFPNUM='"92"'

12
README
View file

@ -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 code supports Linux kernel from 2.6.32 to 6.8.4.
The driver code supports Linux kernel from 2.6.32 to 6.9.0.
2) FOR DRIVER INSTALL
@ -55,12 +55,21 @@
There are some other parameters for debugging purpose etc. Use modinfo to check details.
drvdbg=<bit mask of driver debug message control>
dev_cap_mask=<Bit mask of the device capability>
This load parameter is uses to configure device features support
Usage:
dev_cap_mask=<value to be configured>
<BIT0-BIT15> : Represents features supported
<BIT16>: Indicates support for 11AX
<BIT17>: Indicates support for 6G
Example:
To disable 11AX and 6G support: dev_cap_mask=0xfffcffff
mac_addr=xx:xx:xx:xx:xx:xx <override the MAC address (in hex)>
auto_ds=0|1|2 <use MLAN default | enable auto deepsleep | disable auto deepsleep>
ext_scan=0|1|2 <use MLAN default | Enable Extended Scan| Enable Enhanced Extended Scan>
net_rx=0|1 <use netif_rx_ni in rx | use netif_receive_skb in rx>
amsdu_deaggr=0|1 <buf copy in amsud deaggregation | avoid buf copy in amsud deaggregation (default)>
bootup_cal_ctrl=0|1 <disable boot time config default | enable boot time config>
ps_mode=0|1|2 <use MLAN default | enable IEEE PS mode | disable IEEE PS mode>
sched_scan=0|1 <disable sched_scan | enable sched_scan default>
max_tx_buf=2048|4096|8192 <maximum AMSDU Tx buffer size>
@ -115,7 +124,6 @@
as module parameters. If wq_sched_policy is (0, 3 or 5), then wq_sched_prio
must be 0. wq_sched_prio should be 1 to 99 otherwise.
rx_work=0|1|2 <default | Enable rx_work_queue | Disable rx_work_queue>
pcie_int_mode=0|1|2 <Legacy mode, MSI mode (default), MSI-X mode>
pcie_int_mode=0|1 <Legacy mode, MSI mode (default)>
ring_size=32|64|128|256|512 <adma ring size for 9097/9098>
aggrctrl=1|0 <enable Tx aggr | disable Tx aggr>

View file

@ -874,6 +874,8 @@ mlan_status wlan_11ax_ioctl_cmd(pmlan_adapter pmadapter,
mlan_ds_11ax_cmd_cfg *cfg = MNULL;
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
t_u16 cmd_action = 0;
mlan_ds_11ax_llde_pkt_filter_cmd *llde_pkt_filter = MNULL;
int mlan_ds_11ax_cmd_cfg_header = 0;
ENTER();
@ -892,6 +894,36 @@ mlan_status wlan_11ax_ioctl_cmd(pmlan_adapter pmadapter,
else
cmd_action = HostCmd_ACT_GEN_GET;
/* update pmadapter structure with llde packet filter parameters */
if ((cfg->sub_id == MLAN_11AXCMD_LLDE_SUBID) &&
(pioctl_req->action == MLAN_ACT_SET)) {
mlan_ds_11ax_cmd_cfg_header = sizeof(t_u32 /*sub_command*/) +
sizeof(t_u32 /*sub_id*/);
llde_pkt_filter =
(mlan_ds_11ax_llde_pkt_filter_cmd
*)((t_u8 *)cfg + mlan_ds_11ax_cmd_cfg_header +
sizeof(mlan_ds_11ax_llde_cmd));
pmadapter->llde_packet_type = llde_pkt_filter->packet_type;
pmadapter->llde_device_filter = llde_pkt_filter->device_filter;
memcpy_ext(pmadapter, pmadapter->llde_macfilter1,
&llde_pkt_filter->macfilter1, MLAN_MAC_ADDR_LENGTH,
MLAN_MAC_ADDR_LENGTH);
memcpy_ext(pmadapter, pmadapter->llde_macfilter2,
&llde_pkt_filter->macfilter2, MLAN_MAC_ADDR_LENGTH,
MLAN_MAC_ADDR_LENGTH);
/* remove llde packet filter parameters from buffer which will
* be passed to fimrware */
/* pass mlan_ds_11ax_llde_cmd params only to fw */
// coverity[bad_memset: SUPPRESS]
memset(pmadapter,
(t_u8 *)cfg + mlan_ds_11ax_cmd_cfg_header +
sizeof(mlan_ds_11ax_llde_cmd),
0, sizeof(mlan_ds_11ax_llde_pkt_filter_cmd));
}
/* Send request to firmware */
status = wlan_prepare_cmd(pmpriv, HostCmd_CMD_11AX_CMD, cmd_action, 0,
(t_void *)pioctl_req, (t_void *)cfg);
@ -1115,6 +1147,7 @@ mlan_status wlan_cmd_twt_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
hostcmd_twt_teardown *twt_teardown_params = MNULL;
hostcmd_twt_report *twt_report_params = MNULL;
hostcmd_twt_information *twt_information_params = MNULL;
hostcmd_btwt_ap_config *btwt_ap_config_params = MNULL;
mlan_status ret = MLAN_STATUS_SUCCESS;
ENTER();
@ -1185,6 +1218,76 @@ mlan_status wlan_cmd_twt_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
ds_twtcfg->param.twt_information.suspend_duration);
cmd->size += sizeof(hostcmd_twtcfg->param.twt_information);
break;
case MLAN_11AX_BTWT_AP_CONFIG_SUBID:
btwt_ap_config_params = &hostcmd_twtcfg->param.btwt_ap_config;
// coverity[bad_memset: SUPPRESS]
memset(pmadapter, btwt_ap_config_params, 0x00,
sizeof(hostcmd_twtcfg->param.btwt_ap_config));
btwt_ap_config_params->ap_bcast_bet_sta_wait =
ds_twtcfg->param.btwt_ap_config.ap_bcast_bet_sta_wait;
btwt_ap_config_params->Ap_Bcast_Offset = wlan_cpu_to_le16(
ds_twtcfg->param.btwt_ap_config.Ap_Bcast_Offset);
btwt_ap_config_params->bcastTWTLI =
ds_twtcfg->param.btwt_ap_config.bcastTWTLI;
btwt_ap_config_params->count =
ds_twtcfg->param.btwt_ap_config.count;
btwt_ap_config_params->BTWT_sets[0].btwtId =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[0].btwtId;
btwt_ap_config_params->BTWT_sets[0].Ap_Bcast_Mantissa =
wlan_cpu_to_le16(
ds_twtcfg->param.btwt_ap_config.BTWT_sets[0]
.Ap_Bcast_Mantissa);
btwt_ap_config_params->BTWT_sets[0].Ap_Bcast_Exponent =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[0]
.Ap_Bcast_Exponent;
btwt_ap_config_params->BTWT_sets[0].nominalwake =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[0].nominalwake;
btwt_ap_config_params->BTWT_sets[1].btwtId =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[1].btwtId;
btwt_ap_config_params->BTWT_sets[1].Ap_Bcast_Mantissa =
wlan_cpu_to_le16(
ds_twtcfg->param.btwt_ap_config.BTWT_sets[1]
.Ap_Bcast_Mantissa);
btwt_ap_config_params->BTWT_sets[1].Ap_Bcast_Exponent =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[1]
.Ap_Bcast_Exponent;
btwt_ap_config_params->BTWT_sets[1].nominalwake =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[1].nominalwake;
btwt_ap_config_params->BTWT_sets[2].btwtId =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[2].btwtId;
btwt_ap_config_params->BTWT_sets[2].Ap_Bcast_Mantissa =
wlan_cpu_to_le16(
ds_twtcfg->param.btwt_ap_config.BTWT_sets[2]
.Ap_Bcast_Mantissa);
btwt_ap_config_params->BTWT_sets[2].Ap_Bcast_Exponent =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[2]
.Ap_Bcast_Exponent;
btwt_ap_config_params->BTWT_sets[2].nominalwake =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[2].nominalwake;
btwt_ap_config_params->BTWT_sets[3].btwtId =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[3].btwtId;
btwt_ap_config_params->BTWT_sets[3].Ap_Bcast_Mantissa =
wlan_cpu_to_le16(
ds_twtcfg->param.btwt_ap_config.BTWT_sets[3]
.Ap_Bcast_Mantissa);
btwt_ap_config_params->BTWT_sets[3].Ap_Bcast_Exponent =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[3]
.Ap_Bcast_Exponent;
btwt_ap_config_params->BTWT_sets[3].nominalwake =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[3].nominalwake;
btwt_ap_config_params->BTWT_sets[4].btwtId =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[4].btwtId;
btwt_ap_config_params->BTWT_sets[4].Ap_Bcast_Mantissa =
wlan_cpu_to_le16(
ds_twtcfg->param.btwt_ap_config.BTWT_sets[4]
.Ap_Bcast_Mantissa);
btwt_ap_config_params->BTWT_sets[4].Ap_Bcast_Exponent =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[4]
.Ap_Bcast_Exponent;
btwt_ap_config_params->BTWT_sets[4].nominalwake =
ds_twtcfg->param.btwt_ap_config.BTWT_sets[4].nominalwake;
cmd->size += sizeof(hostcmd_twtcfg->param.btwt_ap_config);
break;
default:
PRINTM(MERROR, "Unknown subcmd %x\n", ds_twtcfg->sub_id);
ret = MLAN_STATUS_FAILURE;

View file

@ -740,7 +740,9 @@ static t_u8 *wlan_strchr(t_u8 *s, int c)
while (*pos != '\0') {
if (*pos == (t_u8)c)
return pos;
pos++;
if (!wlan_secure_add(&pos, 1, &pos, TYPE_PTR)) {
PRINTM(MERROR, "pos is invalid\n");
}
}
return MNULL;
}
@ -2391,6 +2393,14 @@ mlan_status wlan_process_cmdresp(mlan_adapter *pmadapter)
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_RGPWR_KEY_MISMATCH,
MNULL);
}
if (cmdresp_result == HostCmd_RESULT_EDMAC_RUTABLE_KEY_MISMATCH) {
PRINTM(MERROR,
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
PRINTM(MERROR,
" Security Key Mismatch for edmac and rutable \n");
PRINTM(MERROR,
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
}
if (pmadapter->curr_cmd->cmd_flag & CMD_F_HOSTCMD) {
if (pmadapter->curr_cmd &&
@ -4488,6 +4498,18 @@ mlan_status wlan_cmd_csi(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
csi_cfg_cmd->head_id = wlan_cpu_to_le32(csi_params->head_id);
csi_cfg_cmd->tail_id = wlan_cpu_to_le32(csi_params->tail_id);
csi_cfg_cmd->chip_id = csi_params->chip_id;
csi_cfg_cmd->csi_channel_bandconfig.header.type =
wlan_cpu_to_le16(NXP_CSI_MONITOR_TLV_ID);
csi_cfg_cmd->csi_channel_bandconfig.header.len =
sizeof(MrvlIEtypes_csi_channel_bandcfg_t) -
sizeof(MrvlIEtypesHeader_t);
csi_cfg_cmd->csi_channel_bandconfig.bandconfig =
csi_params->band_config;
csi_cfg_cmd->csi_channel_bandconfig.channel =
csi_params->channel;
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_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;
@ -5837,7 +5859,7 @@ mlan_status wlan_cmd_drcs_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
if (cmd_action == HostCmd_ACT_GEN_SET) {
channel_time_slicing->header.type =
wlan_cpu_to_le16(MRVL_DRCS_TIME_SLICE_TLV_ID);
wlan_cpu_to_le16(NXP_DRCS_TIME_SLICE_TLV_ID);
channel_time_slicing->header.len =
wlan_cpu_to_le16(sizeof(MrvlTypes_DrcsTimeSlice_t) -
sizeof(MrvlIEtypesHeader_t));
@ -5861,7 +5883,7 @@ mlan_status wlan_cmd_drcs_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
drcs_cfg++;
channel_time_slicing = pdrcs_cfg->drcs_buf;
channel_time_slicing->header.type =
wlan_cpu_to_le16(MRVL_DRCS_TIME_SLICE_TLV_ID);
wlan_cpu_to_le16(NXP_DRCS_TIME_SLICE_TLV_ID);
channel_time_slicing->header.len = wlan_cpu_to_le16(
sizeof(MrvlTypes_DrcsTimeSlice_t) -
sizeof(MrvlIEtypesHeader_t));
@ -5916,7 +5938,7 @@ mlan_status wlan_ret_drcs_cfg(pmlan_private pmpriv,
if (pioctl_buf) {
pcfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
if (wlan_le16_to_cpu(channel_time_slicing->header.type) !=
MRVL_DRCS_TIME_SLICE_TLV_ID ||
NXP_DRCS_TIME_SLICE_TLV_ID ||
wlan_le16_to_cpu(channel_time_slicing->header.len) !=
sizeof(MrvlTypes_DrcsTimeSlice_t) -
sizeof(MrvlIEtypesHeader_t)) {
@ -5945,7 +5967,7 @@ mlan_status wlan_ret_drcs_cfg(pmlan_private pmpriv,
channel_time_slicing1 = presp_cfg->drcs_buf;
if (wlan_le16_to_cpu(
channel_time_slicing1->header.type) !=
MRVL_DRCS_TIME_SLICE_TLV_ID ||
NXP_DRCS_TIME_SLICE_TLV_ID ||
wlan_le16_to_cpu(
channel_time_slicing1->header.len) !=
sizeof(MrvlTypes_DrcsTimeSlice_t) -
@ -6289,6 +6311,9 @@ mlan_status wlan_ret_get_hw_spec(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
}
#endif /* STA_SUPPORT */
pmadapter->fw_country_code = wlan_le16_to_cpu(hw_spec->fw_country_code);
PRINTM(MCMND, "GET_HW_SPEC: country_code=0x%X\n",
pmadapter->fw_country_code);
pmadapter->fw_release_number =
wlan_le32_to_cpu(hw_spec->fw_release_number);
pmadapter->number_of_antenna =

View file

@ -648,6 +648,8 @@ typedef enum {
#define MLAN_BUF_FLAG_MC_AGGR_PKT MBIT(17)
#define MLAN_BUF_FLAG_LLDE_PKT_FILTER MBIT(19)
#ifdef DEBUG_LEVEL1
/** Debug level bit definition */
#define MMSG MBIT(0)
@ -882,7 +884,6 @@ typedef enum _mlan_event_id {
MLAN_EVENT_ID_DRV_ADDBA_TIMEOUT = 0x80000031,
#ifdef PCIE
MLAN_EVENT_ID_DRV_DEFER_RX_DATA = 0x80000032,
MLAN_EVENT_ID_DRV_DEFER_RX_EVENT = 0x80000033,
MLAN_EVENT_ID_DRV_DEFER_CMDRESP = 0x80000034,
MLAN_EVENT_ID_DRV_DEFER_TX_COMPLTE = 0x80000035,
MLAN_EVENT_ID_DRV_DELAY_TX_COMPLETE = 0x80000036,

View file

@ -30,6 +30,8 @@ Change log:
#ifndef _MLAN_FW_H_
#define _MLAN_FW_H_
#include "mlan_tlv_ids.h"
/** Interface header length */
#ifdef USB
#define USB_INTF_HEADER_LEN 0
@ -298,257 +300,6 @@ typedef enum _WLAN_802_11_WEP_STATUS {
/** 2K buf size */
#define MLAN_TX_DATA_BUF_SIZE_2K 2048
/** Terminating TLV Type */
#define MRVL_TERMINATE_TLV_ID 0xffff
/** TLV type : SSID */
#define TLV_TYPE_SSID 0x0000
/** TLV type : Rates */
#define TLV_TYPE_RATES 0x0001
/** TLV type : PHY FH */
#define TLV_TYPE_PHY_FH 0x0002
/** TLV type : PHY DS */
#define TLV_TYPE_PHY_DS 0x0003
/** TLV type : CF */
#define TLV_TYPE_CF 0x0004
/** TLV type : Domain */
#define TLV_TYPE_DOMAIN 0x0007
/** TLV type : Power constraint */
#define TLV_TYPE_POWER_CONSTRAINT 0x0020
/** TLV type : Power capability */
#define TLV_TYPE_POWER_CAPABILITY 0x0021
#define TLV_TYPE_HT_CAPABILITY 0x002d
#define TLV_TYPE_EXTENSION_ID 0x00ff
/**TLV type : Host MLME Flag*/
#define TLV_TYPE_HOST_MLME (PROPRIETARY_TLV_BASE_ID + 307)
/** TLV type: MULTI AP Flag */
#define TLV_TYPE_MULTI_AP (PROPRIETARY_TLV_BASE_ID + 326)
/** TLV type : AP wacp mode */
#define TLV_TYPE_UAP_WACP_MODE (PROPRIETARY_TLV_BASE_ID + 0x147) /* 0x0247 */
/** TLV type : Vendor Specific IE */
#define TLV_TYPE_VENDOR_SPECIFIC_IE 0x00dd
/** TLV type : Key material */
#define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0x00) /* 0x0100 */
/** TLV type : Channel list */
#define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 0x01) /* 0x0101 */
/** TLV type : Number of probes */
#define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 0x02) /* 0x0102 */
/** TLV type : Beacon RSSI low */
#define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 0x04) /* 0x0104 */
/** TLV type : Beacon SNR low */
#define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 0x05) /* 0x0105 */
/** TLV type : Fail count */
#define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 0x06) /* 0x0106 */
/** TLV type : BCN miss */
#define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 0x07) /* 0x0107 */
/** TLV type : LED behavior */
#define TLV_TYPE_LEDBEHAVIOR (PROPRIETARY_TLV_BASE_ID + 0x09) /* 0x0109 */
/** TLV type : Passthrough */
#define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 0x0a) /* 0x010a */
/** TLV type : Power TBL 2.4 Ghz */
#define TLV_TYPE_POWER_TBL_2_4GHZ \
(PROPRIETARY_TLV_BASE_ID + 0x0c) /* 0x010c \
*/
/** TLV type : Power TBL 5 GHz */
#define TLV_TYPE_POWER_TBL_5GHZ (PROPRIETARY_TLV_BASE_ID + 0x0d) /* 0x010d */
/** TLV type : WMM queue status */
#define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 0x10) /* 0x0110 */
/** TLV type : Wildcard SSID */
#define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 0x12) /* 0x0112 */
/** TLV type : TSF timestamp */
#define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 0x13) /* 0x0113 */
/** TLV type : ARP filter */
#define TLV_TYPE_ARP_FILTER (PROPRIETARY_TLV_BASE_ID + 0x15) /* 0x0115 */
/** TLV type : Beacon RSSI high */
#define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 0x16) /* 0x0116 */
/** TLV type : Beacon SNR high */
#define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 0x17) /* 0x0117 */
/** TLV type : Start BG scan later */
#define TLV_TYPE_STARTBGSCANLATER \
(PROPRIETARY_TLV_BASE_ID + 0x1e) /* 0x011e \
*/
/** TLV type: BG scan repeat count */
#define TLV_TYPE_REPEAT_COUNT (PROPRIETARY_TLV_BASE_ID + 0xb0) /* 0x01b0 */
/** TLV type : Authentication type */
#define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 0x1f) /* 0x011f */
/** TLV type : BSSID */
#define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 0x23) /* 0x0123 */
/** TLV type : Link Quality */
#define TLV_TYPE_LINK_QUALITY (PROPRIETARY_TLV_BASE_ID + 0x24) /* 0x0124 */
/** TLV type : Data RSSI low */
#define TLV_TYPE_RSSI_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 0x26) /* 0x0126 */
/** TLV type : Data SNR low */
#define TLV_TYPE_SNR_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 0x27) /* 0x0127 */
/** TLV type : Data RSSI high */
#define TLV_TYPE_RSSI_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 0x28) /* 0x0128 */
/** TLV type : Data SNR high */
#define TLV_TYPE_SNR_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 0x29) /* 0x0129 */
/** TLV type : Channel band list */
#define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 0x2a) /* 0x012a */
/** TLV type : Security Cfg */
#define TLV_TYPE_SECURITY_CFG (PROPRIETARY_TLV_BASE_ID + 0x3a) /* 0x013a */
/** TLV type : Passphrase */
#define TLV_TYPE_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 0x3c) /* 0x013c */
/** TLV type : SAE Password */
#define TLV_TYPE_SAE_PASSWORD (PROPRIETARY_TLV_BASE_ID + 0x141) /* 0x0241 */
/** TLV type : SAE PWE Derivation Mode */
#define TLV_TYPE_WPA3_SAE_PWE_DERIVATION_MODE \
(PROPRIETARY_TLV_BASE_ID + 339) /* 0x0100 + 0x153 */
/** TLV type : Encryption Protocol TLV */
#define TLV_TYPE_ENCRYPTION_PROTO \
(PROPRIETARY_TLV_BASE_ID + 0x40) /* 0x0140 \
*/
/** TLV type : Cipher TLV */
#define TLV_TYPE_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x42) /* 0x0142 */
/** TLV type : PMK */
#define TLV_TYPE_PMK (PROPRIETARY_TLV_BASE_ID + 0x44) /* 0x0144 */
/** TLV type : BCN miss */
#define TLV_TYPE_PRE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 0x49) /* 0x0149 */
/** TLV type : ENABLE ROAM IE */
#define TLV_TYPE_ROAM (PROPRIETARY_TLV_BASE_ID + 245)
/** TLV type : AP LIST IE */
#define TLV_TYPE_APLIST (PROPRIETARY_TLV_BASE_ID + 246)
/** TLV type : PMK */
#define TLV_TYPE_PMK_R0 (PROPRIETARY_TLV_BASE_ID + 247)
/** TLV type : PMK */
#define TLV_TYPE_PMK_R0_NAME (PROPRIETARY_TLV_BASE_ID + 248)
/** TLV type : TRIGGER CONDITION*/
#define TLV_TYPE_ROM_TRIGGER (PROPRIETARY_TLV_BASE_ID + 264)
/** TLV type : RETRY_COUNT*/
#define TLV_TYPE_ROM_RETRY_COUNT (PROPRIETARY_TLV_BASE_ID + 265)
/** TLV type : BGSCAN SETTING*/
#define TLV_TYPE_ROM_BGSCAN (PROPRIETARY_TLV_BASE_ID + 266)
/** TLV type : PARA RSSI*/
#define TLV_TYPE_ROM_PARA_RSSI (PROPRIETARY_TLV_BASE_ID + 267)
/** TLV type : BSSID blacklist*/
#define TLV_TYPE_BLACKLIST_BSSID (PROPRIETARY_TLV_BASE_ID + 0x11d)
/** TLV type : BAND & RSSI*/
#define TLV_TYPE_BAND_RSSI (PROPRIETARY_TLV_BASE_ID + 0x11e)
/** TLV type : ESS scan*/
#define TLV_TYPE_ENERGYEFFICIENTSCAN (PROPRIETARY_TLV_BASE_ID + 0xda)
/** TLV type : KEY params*/
#define TLV_TYPE_ROAM_OFFLOAD_USER_SET_PMK (PROPRIETARY_TLV_BASE_ID + 291)
/** TLV type: WAPI IE */
#define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 0x5e) /* 0x015e */
/** TLV type: MGMT IE */
#define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 0x69) /* 0x0169 */
/** TLV type: MAX_MGMT_IE */
#define TLV_TYPE_MAX_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 0xaa) /* 0x01aa */
/** TLV : Region Domain Code */
#define TLV_TYPE_REGION_DOMAIN_CODE \
(PROPRIETARY_TLV_BASE_ID + 0xab) /* 0x01ab */
/** TLV type: key param v2 */
#define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 0x9C) /* 0x019C */
/** TLV type: ps params in hs */
#define TLV_TYPE_PS_PARAMS_IN_HS (PROPRIETARY_TLV_BASE_ID + 0xB5) /* 0x01b5 */
/** TLV type: hs wake hold off */
#define TLV_TYPE_HS_WAKE_HOLDOFF (PROPRIETARY_TLV_BASE_ID + 0xB6) /* 0x01b6 */
/** TLV type: wake up source */
#define TLV_TYPE_HS_WAKEUP_SOURCE_GPIO \
(PROPRIETARY_TLV_BASE_ID + 0x105) /* 0x0205 */
/** TLV type: management filter */
#define TLV_TYPE_MGMT_FRAME_WAKEUP \
(PROPRIETARY_TLV_BASE_ID + 0x116) /* 0x0216 */
/** TLV type: extend wakeup source */
#define TLV_TYPE_WAKEUP_EXTEND (PROPRIETARY_TLV_BASE_ID + 0x118) /* 0x0218 */
/** TLV type: HS antenna mode */
#define TLV_TYPE_HS_ANTMODE (PROPRIETARY_TLV_BASE_ID + 0x119) /* 0x0219 */
/** TLV type: robustcoex mode */
#define TLV_TYPE_ROBUSTCOEX (PROPRIETARY_TLV_BASE_ID + 0x11B) /* 0x021B */
#define TLV_TYPE_DMCS_STATUS (PROPRIETARY_TLV_BASE_ID + 0x13A) /* 0x023A */
/** TLV type : TDLS IDLE TIMEOUT */
#define TLV_TYPE_TDLS_IDLE_TIMEOUT \
(PROPRIETARY_TLV_BASE_ID + 0xC2) /* 0x01C2 \
*/
/** TLV type : HT Capabilities */
#define TLV_TYPE_HT_CAP (PROPRIETARY_TLV_BASE_ID + 0x4a) /* 0x014a */
/** TLV type : HT Information */
#define TLV_TYPE_HT_INFO (PROPRIETARY_TLV_BASE_ID + 0x4b) /* 0x014b */
/** TLV type : Secondary Channel Offset */
#define TLV_SECONDARY_CHANNEL_OFFSET \
(PROPRIETARY_TLV_BASE_ID + 0x4c) /* 0x014c */
/** TLV type : 20/40 BSS Coexistence */
#define TLV_TYPE_2040BSS_COEXISTENCE \
(PROPRIETARY_TLV_BASE_ID + 0x4d) /* 0x014d */
/** TLV type : Overlapping BSS Scan Parameters */
#define TLV_TYPE_OVERLAP_BSS_SCAN_PARAM \
(PROPRIETARY_TLV_BASE_ID + 0x4e) /* 0x014e */
/** TLV type : Extended capabilities */
#define TLV_TYPE_EXTCAP (PROPRIETARY_TLV_BASE_ID + 0x4f) /* 0x014f */
/** TLV type : Set of MCS values that STA desires to use within the BSS */
#define TLV_TYPE_HT_OPERATIONAL_MCS_SET \
(PROPRIETARY_TLV_BASE_ID + 0x50) /* 0x0150 */
/** TLV ID : Management Frame */
#define TLV_TYPE_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 0x68) /* 0x0168 */
/** TLV type : RXBA_SYNC */
#define TLV_TYPE_RXBA_SYNC (PROPRIETARY_TLV_BASE_ID + 0x99) /* 0x0199 */
#ifdef WIFI_DIRECT_SUPPORT
/** TLV type : AP PSK */
#define TLV_TYPE_UAP_PSK (PROPRIETARY_TLV_BASE_ID + 0xa8) /* 0x01a8 */
/** TLV type : p2p NOA */
#define TLV_TYPE_WIFI_DIRECT_NOA (PROPRIETARY_TLV_BASE_ID + 0x83)
/** TLV type : p2p opp ps */
#define TLV_TYPE_WIFI_DIRECT_OPP_PS (PROPRIETARY_TLV_BASE_ID + 0x84)
#endif /* WIFI_DIRECT_SUPPORT */
/** TLV type : GPIO TSF LATCH CONFIG */
#define TLV_TYPE_GPIO_TSF_LATCH_CONFIG (PROPRIETARY_TLV_BASE_ID + 0x154)
/** TLV type : GPIO TSF LATCH REPORT*/
#define TLV_TYPE_GPIO_TSF_LATCH_REPORT (PROPRIETARY_TLV_BASE_ID + 0x155)
/** TLV : 20/40 coex config */
#define TLV_TYPE_2040_BSS_COEX_CONTROL \
(PROPRIETARY_TLV_BASE_ID + 0x98) /* 0x0198 */
/** TLV type : aggr win size */
#define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 0xca)
/** TLV type : scan time */
#define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 0Xcb)
/** TLV type : Ewpa_eapol_pkt */
#define TLV_TYPE_EAPOL_PKT (PROPRIETARY_TLV_BASE_ID + 0xcf)
#define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 0x9a)
/** TLV type : EES Configuration */
#define TLV_TYPE_EES_CFG (PROPRIETARY_TLV_BASE_ID + 0xda)
/** TLV type : EES Network Configuration */
#define TLV_TYPE_EES_NET_CFG (PROPRIETARY_TLV_BASE_ID + 0xdb)
#define TLV_TYPE_LL_STAT_IFACE (PROPRIETARY_TLV_BASE_ID + 300)
#define TLV_TYPE_LL_STAT_RADIO (PROPRIETARY_TLV_BASE_ID + 301)
/** TLV type: fw cap info */
#define TLV_TYPE_FW_CAP_INFO (PROPRIETARY_TLV_BASE_ID + 318)
/** TLV type: secure boot uuid */
#define TLV_TYPE_SECURE_BOOT_UUID (PROPRIETARY_TLV_BASE_ID + 348)
/** ADDBA TID mask */
#define ADDBA_TID_MASK (MBIT(2) | MBIT(3) | MBIT(4) | MBIT(5))
/** DELBA TID mask */
@ -1061,20 +812,6 @@ typedef enum _WLAN_802_11_WEP_STATUS {
(DevMCSMap |= (value & 0x3) << (2 * (nss - 1)))
#define RESET_DEVRXMCSMAP(DevMCSMap) (DevMCSMap &= 0xFFFF0000)
/** TLV type : Rate scope */
#define TLV_TYPE_RATE_DROP_PATTERN \
(PROPRIETARY_TLV_BASE_ID + 0x51) /* 0x0151 \
*/
/** TLV type : Rate drop pattern */
#define TLV_TYPE_RATE_DROP_CONTROL \
(PROPRIETARY_TLV_BASE_ID + 0x52) /* 0x0152 \
*/
/** TLV type : Rate scope */
#define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 0x53) /* 0x0153 */
/** TLV type : Power group */
#define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 0x54) /* 0x0154 */
/** Modulation class for DSSS Rates */
#define MOD_CLASS_HR_DSSS 0x03
/** Modulation class for OFDM Rates */
@ -1090,47 +827,6 @@ typedef enum _WLAN_802_11_WEP_STATUS {
/** HT bandwidth 80 MHz */
#define HT_BW_80 2
/** TLV type : TX RATE CFG, rename from TLV_TYPE_GI_LTF_SIZE to include CMD and
* HE ER SU settings to this tlv */
#define TLV_TYPE_TX_RATE_CFG (PROPRIETARY_TLV_BASE_ID + 319) /* 0x023f */
/** TLV type : Scan Response */
#define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 0x56) /* 0x0156 */
/** TLV type : Scan Response Stats */
#define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 0x57) /* 0x0157 */
/** TLV type : 11h Basic Rpt */
#define TLV_TYPE_CHANRPT_11H_BASIC \
(PROPRIETARY_TLV_BASE_ID + 0x5b) /* 0x015b \
*/
/** TLV type : ZERO DFS Operation */
#define TLV_TYPE_ZERO_DFS_OPERATION (PROPRIETARY_TLV_BASE_ID + 0x13b) // + 315
/** TLV type : DFS W53 Configuration */
#define TLV_TYPE_DFS_W53_CFG (PROPRIETARY_TLV_BASE_ID + 0x145) // + 325
#ifdef OPCHAN
/** TLV type : OpChannel control */
#define TLV_TYPE_OPCHAN_CONTROL_DESC \
(PROPRIETARY_TLV_BASE_ID + 0x79) /* 0x0179 */
/** TLV type : OpChannel channel group control */
#define TLV_TYPE_OPCHAN_CHANGRP_CTRL \
(PROPRIETARY_TLV_BASE_ID + 0x7a) /* 0x017a */
#endif
/** TLV type : Action frame */
#define TLV_TYPE_IEEE_ACTION_FRAME \
(PROPRIETARY_TLV_BASE_ID + 0x8c) /* 0x018c \
*/
/** TLV type : SCAN channel gap */
#define TLV_TYPE_SCAN_CHANNEL_GAP \
(PROPRIETARY_TLV_BASE_ID + 0xc5) /* 0x01c5 \
*/
/** TLV type : Channel statistics */
#define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 0xc6) /* 0x01c6 */
/** TLV type : BSS_MODE */
#define TLV_TYPE_BSS_MODE (PROPRIETARY_TLV_BASE_ID + 0xce) /* 0x01ce */
/** Firmware Host Command ID Constants */
#define ENUM_ELEMENT(name, id) name = id
@ -1141,15 +837,6 @@ enum host_cmd_id {
#undef ENUM_ELEMENT
#undef ENUM_ELEMENT_LAST
/** TLV ID for multi chan info */
#define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 0xb7)
/** TLV ID for multi chan group info */
#define TLV_TYPE_MULTI_CHAN_GROUP_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb8)
/** TLV ID for DRCS TimeSlice */
#define MRVL_DRCS_TIME_SLICE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 263)
#define TLV_TYPE_PREV_BSSID (PROPRIETARY_TLV_BASE_ID + 330)
#ifdef SDIO
/** fw_cap_info bit16 for sdio sp rx aggr flag*/
#define SDIO_SP_RX_AGGR_ENABLE MBIT(16)
@ -1364,8 +1051,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_He_Op_t {
defined(USB9098) || defined(PCIE9097) || defined(USB9097) || \
defined(SDIW624) || defined(PCIEAW693) || defined(PCIEIW624) || \
defined(USBIW624) || defined(SD9097)
/* TLV type: reg type */
#define TLV_TYPE_REG_ACCESS_CTRL (PROPRIETARY_TLV_BASE_ID + 0x13C) /* 0x023c*/
/** MrvlIEtypes_Reg_type_t*/
typedef MLAN_PACK_START struct _MrvlIEtypes_Reg_type_t {
/** Header */
@ -1501,6 +1186,8 @@ typedef enum _ENH_PS_MODES {
#define HostCmd_RESULT_PRE_ASLEEP 0x0007
/** rgpower_XX.bin download failed with security key mismatch */
#define HostCmd_RESULT_RGPWR_KEY_MISMATCH 0x0008
/** rgpower_XX.bin download failed with security key mismatch edmac/rutable */
#define HostCmd_RESULT_EDMAC_RUTABLE_KEY_MISMATCH 0x0009
/* Define action or option for HostCmd_CMD_MAC_CONTROL */
/** MAC action : Rx on */
@ -1799,8 +1486,12 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_TDLS_Idle_Timeout_t {
/** tx_control*/
#ifdef BIG_ENDIAN_SUPPORT
typedef MLAN_PACK_START struct _tx_ctrl {
/** this is not used in driver as of now, fw uses this bit */
t_u32 tx_via_cmd : 1;
/** llde packet filter */
t_u32 llde_pkt_filter : 1;
/** reserved */
t_u32 reserved : 3;
t_u32 reserved : 1;
/** mc retry packet */
t_u32 mc_pkt_retry : 1;
/** end of mc AMPDU */
@ -1867,7 +1558,11 @@ typedef MLAN_PACK_START struct _tx_ctrl {
/** mc retry packet */
t_u32 mc_pkt_retry : 1;
/** reserved */
t_u32 reserved : 3;
t_u32 reserved : 1;
/** llde packet filter */
t_u32 llde_pkt_filter : 1;
/** this is not used in driver as of now, fw uses this bit */
t_u32 tx_via_cmd : 1;
} MLAN_PACK_END tx_ctrl;
#endif
@ -2930,15 +2625,6 @@ typedef MLAN_PACK_START struct _auto_ps_param {
/** fix size for auto ps */
#define AUTO_PS_FIX_SIZE 4
/** TLV type : auto ds param */
#define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 0x71) /* 0x0171 */
/** TLV type : ps param */
#define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 0x72) /* 0x0172 */
/** TLV type : beacon timeout */
#define TLV_TYPE_BCN_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 0x11F) /* 0x011F */
/** TLV type: ps_ext_param */
#define TLV_TYPE_PS_EXT_PARAM (PROPRIETARY_TLV_BASE_ID + 0x15F) /* 0x25F */
/** MrvlIEtypes_auto_ds_param_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_auto_ds_param_t {
/** Header */
@ -3005,9 +2691,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_PS_MODE_ENH {
} params;
} MLAN_PACK_END HostCmd_DS_802_11_PS_MODE_ENH;
/** FW VERSION tlv */
#define TLV_TYPE_FW_VER_INFO (PROPRIETARY_TLV_BASE_ID + 0xC7) /* 0x1C7 */
/** MrvlIEtypes_fw_ver_info_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_fw_ver_info_t {
/** Header */
@ -3051,8 +2734,8 @@ typedef MLAN_PACK_START struct _HostCmd_DS_GET_HW_SPEC {
t_u16 hw_if_version;
/** HW version number */
t_u16 version;
/** Reserved field */
t_u16 reserved;
/** country code from OTP */
t_u16 fw_country_code;
/** Max no of Multicast address */
t_u16 num_of_mcast_adr;
/** MAC address */
@ -3123,9 +2806,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RSSI_INFO_EXT {
t_u8 *tlv_buf[];
} MLAN_PACK_END HostCmd_DS_802_11_RSSI_INFO_EXT;
/** TLV rssi info */
#define TLV_TYPE_RSSI_INFO (PROPRIETARY_TLV_BASE_ID + 0xe5) /* 0x01E5 */
/** MrvlIEtypes_eapol_pkt_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_RSSI_EXT_t {
/** Header */
@ -3286,8 +2966,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_CMD_TX_DATA_PAUSE {
t_u8 pause_tx_count;
} MLAN_PACK_END HostCmd_DS_CMD_TX_DATA_PAUSE;
/** TLV type : TX pause TLV */
#define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 0x94) /* 0x0194 */
/** MrvlIEtypes_SsIdParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_tx_pause_t {
/** Header */
@ -3899,6 +3577,21 @@ typedef MLAN_PACK_START struct _HostCmd_DS_SSU_CFG {
} MLAN_PACK_END HostCmd_DS_SSU_CFG;
#endif
/** MrvlIEtypes_channel_bandcfg_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_csi_channel_bandcfg_t {
/** Header */
MrvlIEtypesHeader_t header;
/** Enable getting CSI data on special channel */
t_u8 csi_monitor_enable;
/** CSI data received in cfg channel with mac addr filter, not only RA
* is us or other*/
t_u8 ra4us;
/** bandconfig*/
t_u8 bandconfig;
/** channel num */
t_u8 channel;
} MLAN_PACK_END MrvlIEtypes_csi_channel_bandcfg_t;
/** HostCmd_CMD_CSI_START */
typedef MLAN_PACK_START struct _HostCmd_DS_CSI_CFG {
/** Action */
@ -3913,6 +3606,8 @@ typedef MLAN_PACK_START struct _HostCmd_DS_CSI_CFG {
t_u8 chip_id;
/** CSI filters */
mlan_csi_filter_t csi_filter[CSI_FILTER_MAX];
/**channel and bandconfig*/
MrvlIEtypes_csi_channel_bandcfg_t csi_channel_bandconfig;
} MLAN_PACK_END HostCmd_DS_CSI_CFG;
typedef MLAN_PACK_START struct _HostCmd_DS_HAL_PHY_CFG {
@ -4253,8 +3948,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_COALESCE_CONFIG {
struct coalesce_receive_filt_rule rule[1];
} MLAN_PACK_END HostCmd_DS_COALESCE_CONFIG;
/** TLV type : FW support max connection TLV */
#define TLV_TYPE_MAX_CONN (PROPRIETARY_TLV_BASE_ID + 0x117) /* 0x0217 */
/** MrvlIEtypes_Max_Conn_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_Max_Conn_t {
/** Header */
@ -4781,7 +4474,7 @@ typedef MLAN_PACK_START struct _hostcmd_twt_report {
t_u8 data[36];
} MLAN_PACK_END hostcmd_twt_report, *phostcmd_twt_report;
/** Type definition of hostcmd_twt_teardown */
/** Type definition of hostcmd_twt_information */
typedef struct MLAN_PACK_START _hostcmd_twt_information {
/** TWT Flow Identifier. Range: [0-7] */
t_u8 flow_identifier;
@ -4796,6 +4489,15 @@ typedef struct MLAN_PACK_START _hostcmd_twt_information {
t_u8 twt_information_state;
} MLAN_PACK_END hostcmd_twt_information, *phostcmd_twt_information;
/** Type definition of hostcmd_btwt_ap_config*/
typedef struct MLAN_PACK_START _hostcmd_btwt_ap_config {
t_u8 ap_bcast_bet_sta_wait;
t_u16 Ap_Bcast_Offset;
t_u8 bcastTWTLI;
t_u8 count;
BTWT_set BTWT_sets[BTWT_AGREEMENT_MAX];
} MLAN_PACK_END hostcmd_btwt_ap_config, *phostcmd_btwt_ap_config;
/** HostCmd_DS_TWT_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_TWT_CFG {
/** Action */
@ -4815,6 +4517,9 @@ typedef MLAN_PACK_START struct _HostCmd_DS_TWT_CFG {
* MLAN_11AX_TWT_INFORMATION_SUBID
*/
hostcmd_twt_information twt_information;
/** BTWT AP config for Sub ID: MLAN_11AX_BTWT_AP_CONFIG_SUBID
*/
hostcmd_btwt_ap_config btwt_ap_config;
} param;
} MLAN_PACK_END HostCmd_DS_TWT_CFG;
@ -5455,10 +5160,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_VERSION_EXT {
char version_str[128];
} MLAN_PACK_END HostCmd_DS_VERSION_EXT;
#define TLV_TYPE_CHAN_ATTR_CFG (PROPRIETARY_TLV_BASE_ID + 237)
#define TLV_TYPE_REGION_INFO (PROPRIETARY_TLV_BASE_ID + 238)
#define TLV_TYPE_POWER_TABLE (PROPRIETARY_TLV_BASE_ID + 262)
#define TLV_TYPE_POWER_TABLE_ATTR (PROPRIETARY_TLV_BASE_ID + 317)
/** HostCmd_DS_CHAN_REGION_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_CHAN_REGION_CFG {
/** Action */
@ -5861,11 +5562,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_802_11_PS_INACTIVITY_TIMEOUT {
t_u16 inact_tmo;
} MLAN_PACK_END HostCmd_DS_802_11_PS_INACTIVITY_TIMEOUT;
/** TLV type : STA Mac address */
#define TLV_TYPE_STA_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 0x20) /* 0x0120 */
#define TLV_TYPE_RANDOM_MAC (PROPRIETARY_TLV_BASE_ID + 0xEC) /*0x01EC*/
/** MrvlIEtypes_MacAddr_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_MacAddr_t {
/** Header */
@ -5875,110 +5571,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_MacAddr_t {
} MLAN_PACK_END MrvlIEtypes_MacAddr_t;
#ifdef UAP_SUPPORT
/** TLV type : AP Channel band Config */
#define TLV_TYPE_UAP_CHAN_BAND_CONFIG \
(PROPRIETARY_TLV_BASE_ID + 0x2a) /* 0x012a */
/** TLV type : AP Mac address */
#define TLV_TYPE_UAP_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 0x2b) /* 0x012b */
/** TLV type : AP Beacon period */
#define TLV_TYPE_UAP_BEACON_PERIOD \
(PROPRIETARY_TLV_BASE_ID + 0x2c) /* 0x012c \
*/
/** TLV type : AP DTIM period */
#define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 0x2d) /* 0x012d */
/** TLV type : AP Tx power */
#define TLV_TYPE_UAP_TX_POWER (PROPRIETARY_TLV_BASE_ID + 0x2f) /* 0x012f */
/** TLV type : AP SSID broadcast control */
#define TLV_TYPE_UAP_BCAST_SSID_CTL \
(PROPRIETARY_TLV_BASE_ID + 0x30) /* 0x0130 */
/** TLV type : AP Preamble control */
#define TLV_TYPE_UAP_PREAMBLE_CTL \
(PROPRIETARY_TLV_BASE_ID + 0x31) /* 0x0131 \
*/
/** TLV type : AP Antenna control */
#define TLV_TYPE_UAP_ANTENNA_CTL (PROPRIETARY_TLV_BASE_ID + 0x32) /* 0x0132 */
/** TLV type : AP RTS threshold */
#define TLV_TYPE_UAP_RTS_THRESHOLD \
(PROPRIETARY_TLV_BASE_ID + 0x33) /* 0x0133 \
*/
/** TLV type : AP Tx data rate */
#define TLV_TYPE_UAP_TX_DATA_RATE \
(PROPRIETARY_TLV_BASE_ID + 0x35) /* 0x0135 \
*/
/** TLV type: AP Packet forwarding control */
#define TLV_TYPE_UAP_PKT_FWD_CTL (PROPRIETARY_TLV_BASE_ID + 0x36) /* 0x0136 */
/** TLV type: STA information */
#define TLV_TYPE_UAP_STA_INFO (PROPRIETARY_TLV_BASE_ID + 0x37) /* 0x0137 */
/** TLV type: AP STA MAC address filter */
#define TLV_TYPE_UAP_STA_MAC_ADDR_FILTER \
(PROPRIETARY_TLV_BASE_ID + 0x38) /* 0x0138 */
/** TLV type: AP STA ageout timer */
#define TLV_TYPE_UAP_STA_AGEOUT_TIMER \
(PROPRIETARY_TLV_BASE_ID + 0x39) /* 0x0139 */
/** TLV type: AP WEP keys */
#define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 0x3b) /* 0x013b */
/** TLV type: AP WPA passphrase */
#define TLV_TYPE_UAP_WPA_PASSPHRASE \
(PROPRIETARY_TLV_BASE_ID + 0x3c) /* 0x013c */
/** TLV type: AP protocol */
#define TLV_TYPE_UAP_ENCRYPT_PROTOCOL \
(PROPRIETARY_TLV_BASE_ID + 0x40) /* 0x0140 */
/** TLV type: AP AKMP */
#define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 0x41) /* 0x0141 */
/** TLV type: AP Fragment threshold */
#define TLV_TYPE_UAP_FRAG_THRESHOLD \
(PROPRIETARY_TLV_BASE_ID + 0x46) /* 0x0146 */
/** TLV type: AP Group rekey timer */
#define TLV_TYPE_UAP_GRP_REKEY_TIME \
(PROPRIETARY_TLV_BASE_ID + 0x47) /* 0x0147 */
/**TLV type : AP Max Station number */
#define TLV_TYPE_UAP_MAX_STA_CNT (PROPRIETARY_TLV_BASE_ID + 0x55) /* 0x0155 */
/**TLV type : AP Max Station number per chip */
#define TLV_TYPE_UAP_MAX_STA_CNT_PER_CHIP \
(PROPRIETARY_TLV_BASE_ID + 0x140) /* 0x0240 */
/**TLV type : AP Retry limit */
#define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 0x5d) /* 0x015d */
/** TLV type : AP MCBC data rate */
#define TLV_TYPE_UAP_MCBC_DATA_RATE \
(PROPRIETARY_TLV_BASE_ID + 0x62) /* 0x0162 */
/**TLV type: AP RSN replay protection */
#define TLV_TYPE_UAP_RSN_REPLAY_PROTECT \
(PROPRIETARY_TLV_BASE_ID + 0x64) /* 0x0164 */
/**TLV type: AP mgmt IE passthru mask */
#define TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK \
(PROPRIETARY_TLV_BASE_ID + 0x70) /* 0x0170 */
/**TLV type: AP pairwise handshake timeout */
#define TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT \
(PROPRIETARY_TLV_BASE_ID + 0x75) /* 0x0175 */
/**TLV type: AP pairwise handshake retries */
#define TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES \
(PROPRIETARY_TLV_BASE_ID + 0x76) /* 0x0176 */
/**TLV type: AP groupwise handshake timeout */
#define TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT \
(PROPRIETARY_TLV_BASE_ID + 0x77) /* 0x0177 */
/**TLV type: AP groupwise handshake retries */
#define TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES \
(PROPRIETARY_TLV_BASE_ID + 0x78) /* 0x0178 */
/** TLV type: AP PS STA ageout timer */
#define TLV_TYPE_UAP_PS_STA_AGEOUT_TIMER \
(PROPRIETARY_TLV_BASE_ID + 0x7b) /* 0x017b */
/** TLV type : Pairwise Cipher */
#define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x91) /* 0x0191 */
/** TLV type : Group Cipher */
#define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x92) /* 0x0192 */
/** TLV type : BSS Status */
#define TLV_TYPE_BSS_STATUS (PROPRIETARY_TLV_BASE_ID + 0x93) /* 0x0193 */
/** TLV type : AP WMM params */
#define TLV_TYPE_AP_WMM_PARAM (PROPRIETARY_TLV_BASE_ID + 0xd0) /* 0x01d0 */
/** TLV type : AP Tx beacon rate */
#define TLV_TYPE_UAP_TX_BEACON_RATE (PROPRIETARY_TLV_BASE_ID + 288) /* 0x0220 \
*/
#define NXP_802_11_PER_PEER_STATS_CFG_TLV_ID \
(PROPRIETARY_TLV_BASE_ID + 346) /* 0x025A */
#define NXP_802_11_PER_PEER_STATS_ENTRY_TLV_ID \
(PROPRIETARY_TLV_BASE_ID + 347) /* 0x025B */
/** MrvlIEtypes_beacon_period_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_beacon_period_t {
/** Header */
@ -6061,8 +5653,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_uap_max_sta_cnt_t {
t_u16 uap_max_sta;
} MLAN_PACK_END MrvlIEtypes_uap_max_sta_cnt_t;
#define MRVL_ACTION_CHAN_SWITCH_ANNOUNCE (PROPRIETARY_TLV_BASE_ID + 342)
/** MrvlIEtypes_uap_chan_switch */
typedef MLAN_PACK_START struct _MrvlIEtypes_action_chan_switch_t {
/** Header */
@ -6354,11 +5944,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_UAP_OPER_CTRL {
/** Host Command id: POWER_MGMT */
#define HOST_CMD_POWER_MGMT_EXT 0x00ef
/** TLV type: AP Sleep param */
#define TLV_TYPE_AP_SLEEP_PARAM (PROPRIETARY_TLV_BASE_ID + 0x6a) /* 0x016a */
/** TLV type: AP Inactivity Sleep param */
#define TLV_TYPE_AP_INACT_SLEEP_PARAM \
(PROPRIETARY_TLV_BASE_ID + 0x6b) /* 0x016b */
/** MrvlIEtypes_sleep_param_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_sleep_param_t {
@ -6423,9 +6008,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_STA_LIST {
t_u8 tlv_buf[];
} MLAN_PACK_END HostCmd_DS_STA_LIST;
/** TLV ID : WAPI Information */
#define TLV_TYPE_AP_WAPI_INFO (PROPRIETARY_TLV_BASE_ID + 0x67) /* 0x0167 */
/** MrvlIEtypes_sta_info_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_wapi_info_t {
/** Header */
@ -6717,11 +6299,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_PACKET_AGGR_AGGR_CTRL {
} MLAN_PACK_END HostCmd_DS_PACKET_AGGR_CTRL;
#ifdef USB
/** TLV ID : USB Aggregation parameters */
#define MRVL_USB_AGGR_PARAM_TLV_ID \
(PROPRIETARY_TLV_BASE_ID + 0xB1) /* 0x1B1 \
*/
/** TLV size : USB Aggregation parameters, except header */
#define MRVL_USB_AGGR_PARAM_TLV_LEN (14)
@ -7222,7 +6799,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_SENSOR_TEMP {
t_u32 temperature;
} MLAN_PACK_END HostCmd_DS_SENSOR_TEMP;
#define TLV_TYPE_IPV6_RA_OFFLOAD (PROPRIETARY_TLV_BASE_ID + 0xE6) /** 0x1E6*/
typedef MLAN_PACK_START struct {
MrvlIEtypesHeader_t Header;
/** ipv6 address buffer */
@ -7269,9 +6845,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_AUTO_TX {
#define OID_CLOUD_KEEP_ALIVE 0
#define EVENT_CLOUD_KEEP_ALIVE_RETRY_FAIL 0x00000085
/** TLV for cloud keep alive control info */
#define TLV_TYPE_CLOUD_KEEP_ALIVE \
(PROPRIETARY_TLV_BASE_ID + 0x102) /* 0x0100 + 258 */
typedef MLAN_PACK_START struct _MrvlIEtypes_Cloud_Keep_Alive_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7283,9 +6856,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_Cloud_Keep_Alive_t {
t_u8 tlv[];
} MLAN_PACK_END MrvlIEtypes_Cloud_Keep_Alive_t;
/** TLV for cloud keep alive control info */
#define TLV_TYPE_KEEP_ALIVE_CTRL \
(PROPRIETARY_TLV_BASE_ID + 0x103) /* 0x0100 + 259 */
typedef MLAN_PACK_START struct _MrvlIEtypes_Keep_Alive_Ctrl_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7297,9 +6867,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_Keep_Alive_Ctrl_t {
t_u16 retry_count;
} MLAN_PACK_END MrvlIEtypes_Keep_Alive_Ctrl_t;
/** TLV for cloud keep alive packet */
#define TLV_TYPE_KEEP_ALIVE_PKT \
(PROPRIETARY_TLV_BASE_ID + 0x104) /* 0x0100 + 260 */
typedef MLAN_PACK_START struct _MrvlIEtypes_Keep_Alive_Pkt_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7310,8 +6877,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_Keep_Alive_Pkt_t {
} MLAN_PACK_END MrvlIEtypes_Keep_Alive_Pkt_t;
#define OID_CLOUD_KEEP_ALIVE_ACK 1
#define TLV_TYPE_CLOUD_KEEP_ALIVE_ACK \
(PROPRIETARY_TLV_BASE_ID + 0x15D) /* 0x0100 + 349 */
typedef MLAN_PACK_START struct _MrvlIEtypes_Cloud_Keep_Alive_Rx_t {
/** Header */
@ -7325,8 +6890,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_Cloud_Keep_Alive_Rx_t {
/** packet buffer*/
t_u8 ip_packet[];
} MLAN_PACK_END MrvlIEtypes_Cloud_Keep_Alive_Rx_t;
/** TLV to indicate firmware only keep probe response while scan */
#define TLV_TYPE_ONLYPROBERESP (PROPRIETARY_TLV_BASE_ID + 0xE9) /* 0x01E9 */
typedef MLAN_PACK_START struct _MrvlIEtypes_OnlyProberesp_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7334,9 +6897,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_OnlyProberesp_t {
t_u8 proberesp_only;
} MLAN_PACK_END MrvlIEtypes_OnlyProberesp_t;
/** TLV for RTT Range Request */
#define TLV_TYPE_RTT_RANGE_REQUEST \
(PROPRIETARY_TLV_BASE_ID + 0x125) /* 0x0100 + 0x125 */
typedef MLAN_PACK_START struct _MrvlIEtypes_RTTRangeRequest_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7373,9 +6933,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_RTTRangeRequest_t {
t_u8 bw;
} MLAN_PACK_END MrvlIEtypes_RTTRangeRequest_t;
/** TLV for RTT Range Cancel */
#define TLV_TYPE_RTT_RANGE_CANCEL \
(PROPRIETARY_TLV_BASE_ID + 0x126) /* 0x0100 + 0x126 */
typedef MLAN_PACK_START struct _MrvlIEtypes_RTTRangeCancel_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7400,9 +6957,6 @@ typedef MLAN_PACK_START struct _WLS_Sub_Event_RTTResults_t {
t_u8 tlv_buffer[];
} MLAN_PACK_END WLS_SUB_EVENT_RTTResults_t;
/** TLV for RTT Result */
#define TLV_TYPE_RTT_RESULT \
(PROPRIETARY_TLV_BASE_ID + 0x127) /* 0x0100 + 0x127 */
typedef MLAN_PACK_START struct _MrvlIEtypes_RTTResult_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7488,9 +7042,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_FTM_CONFIG_RESPONDER {
t_u8 tlv_buffer[];
} MLAN_PACK_END HostCmd_DS_FTM_CONFIG_RESPONDER;
/** TLV for RTTResponderInfo */
#define TLV_TYPE_RTT_RESPONDER_INFO \
(PROPRIETARY_TLV_BASE_ID + 0x128) /* 0x0100 + 0x128 */
typedef MLAN_PACK_START struct _MrvlIEtypes_RTTResponderInfo_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7502,9 +7053,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_RTTResponderInfo_t {
t_u8 preamble;
} MLAN_PACK_END MrvlIEtypes_RTTResponderInfo_t;
/** TLV for RTTResponderEnCfg */
#define TLV_TYPE_RTT_RESPONDER_EN_CFG \
(PROPRIETARY_TLV_BASE_ID + 0x129) /* 0x0100 + 0x129 */
typedef MLAN_PACK_START struct _MrvlIEtypes_RTTResponderEnCfg_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7516,9 +7064,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_RTTResponderEnCfg_t {
t_u32 max_duration_seconds;
} MLAN_PACK_END MrvlIEtypes_RTTResponderEnCfg_t;
/** TLV for RTTLCICfg */
#define TLV_TYPE_RTT_LCI_CFG \
(PROPRIETARY_TLV_BASE_ID + 0x12A) /* 0x0100 + 0x12A */
typedef MLAN_PACK_START struct _MrvlIEtypes_RTTLCICfg_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7544,9 +7089,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_RTTLCICfg_t {
t_u32 height_unc;
} MLAN_PACK_END MrvlIEtypes_RTTLCICfg_t;
/** TLV for RTTLCRCfg */
#define TLV_TYPE_RTT_LCR_CFG \
(PROPRIETARY_TLV_BASE_ID + 0x12B) /* 0x0100 + 0x12B */
typedef MLAN_PACK_START struct _MrvlIEtypes_RTTLCRCfg_t {
/** Header */
MrvlIEtypesHeader_t header;
@ -7579,8 +7121,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_ADD_STATION {
t_u8 tlv[];
} MLAN_PACK_END HostCmd_DS_ADD_STATION;
/** TLV id: station flag */
#define TLV_TYPE_UAP_STA_FLAGS (PROPRIETARY_TLV_BASE_ID + 313)
/**MrvlIEtypes_Sta_Flag_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_StaFlag_t {
/** Header */
@ -8101,6 +7641,7 @@ typedef MLAN_PACK_START struct _vdll_ind {
/*VDLL block size*/
t_u16 block_len;
} MLAN_PACK_END vdll_ind, *pvdll_ind;
#ifdef PRAGMA_PACK
#pragma pack(pop)
#endif

View file

@ -29,6 +29,9 @@ Change log:
#ifndef _MLAN_IEEE_H_
#define _MLAN_IEEE_H_
/** WLAN header size */
#define IEEE80211_HEADER_SIZE 24
/** FIX IES size in beacon buffer */
#define WLAN_802_11_FIXED_IE_SIZE 12
/** WLAN supported rates */
@ -892,8 +895,9 @@ typedef MLAN_PACK_START enum _IEEEtypes_WMM_Tspec_Action_e {
#define NAN_SRVC_CTRL_OFFSET 11
/** Service control field */
#define NAN_SRV_CTRL_TYPE_MASK (BIT(0) | BIT(1))
/** NAN publish frame */
/** NAN service control type */
#define NAN_PUBLISH 0
#define NAN_FOLLOW_UP 2
/** NAN Attribute ID list */
typedef MLAN_PACK_START enum _Nan_AttrId_e {

View file

@ -1980,6 +1980,8 @@ typedef struct _mlan_fw_info {
/* FW support tx data by cmd */
t_u8 cmd_tx_data;
t_u8 sec_rgpower;
/*country code from OTP*/
t_u16 fw_country_code;
} mlan_fw_info, *pmlan_fw_info;
/** Version string buffer length */
@ -2406,6 +2408,14 @@ typedef struct _mlan_debug_info {
t_u32 mlan_rx_processing;
/** rx pkts queued */
t_u32 rx_pkts_queued;
#ifdef PCIE
/** process pcie event interrupt */
t_u8 pcie_event_processing;
/** process pcie tx interrupt */
t_u8 pcie_tx_processing;
/** process pcie rx interrupt */
t_u8 pcie_rx_processing;
#endif
/** Number of host to card command failures */
t_u32 num_cmd_host_to_card_failure;
/** Number of host to card sleep confirm failures */
@ -4056,6 +4066,8 @@ typedef struct _mlan_ds_11ax_cfg {
#define MLAN_11AX_TWT_TEARDOWN_SUBID 0x115
#define MLAN_11AX_TWT_REPORT_SUBID 0x116
#define MLAN_11AX_TWT_INFORMATION_SUBID 0x119
#define MLAN_11AX_BTWT_AP_CONFIG_SUBID 0x120
#define BTWT_AGREEMENT_MAX 5
#define MRVL_DOT11AX_ENABLE_SR_TLV_ID (PROPRIETARY_TLV_BASE_ID + 322)
#define MRVL_DOT11AX_OBSS_PD_OFFSET_TLV_ID (PROPRIETARY_TLV_BASE_ID + 323)
@ -4199,6 +4211,30 @@ typedef struct _mlan_ds_11ax_cmd_cfg {
} param;
} mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg;
/** Type definition of mlan_ds_11ax_llde_pkt_filter_cmd for
* mlan_ds_11ax_llde_pkt_filter_cmd_cfg */
typedef struct _mlan_ds_11ax_llde_pkt_filter_cmd {
/** 0: no preference, 1: iphone (carplay IE in assoc)*/
t_u8 device_filter;
/** make traffic to specific mac address to be high priority, Can have
* max 2 mac address entries */
t_u8 macfilter1[MLAN_MAC_ADDR_LENGTH];
/** make traffic to specific mac address to be high priority, other mac
* filter */
t_u8 macfilter2[MLAN_MAC_ADDR_LENGTH];
/** high priority data packet type. 0: All traffic, 1: ping, 2: TCP ACK,
* 4: TCP Data, 8: UDP */
t_u8 packet_type;
} mlan_ds_11ax_llde_pkt_filter_cmd, *pmlan_ds_11ax_llde_pkt_filter_cmd;
/** Type definition of BTWT_set*/
typedef struct MLAN_PACK_START {
t_u8 btwtId;
t_u16 Ap_Bcast_Mantissa;
t_u8 Ap_Bcast_Exponent;
t_u8 nominalwake;
} MLAN_PACK_END BTWT_set;
/** Type definition of mlan_ds_twt_setup for MLAN_OID_11AX_TWT_CFG */
typedef struct MLAN_PACK_START _mlan_ds_twt_setup {
/** Implicit, 0: TWT session is explicit, 1: Session is implicit */
@ -4264,6 +4300,17 @@ typedef struct MLAN_PACK_START _mlan_ds_twt_information {
t_u32 suspend_duration;
} MLAN_PACK_END mlan_ds_twt_information, *pmlan_ds_twt_information;
/** Type definition of mlan_ds_btwt_ap_config for MLAN_OID_11AX_TWT_CFG */
typedef struct MLAN_PACK_START _mlan_ds_btwt_ap_config {
/** TWT Flow Identifier. Range: [0-7] */
t_u8 ap_bcast_bet_sta_wait;
t_u16 Ap_Bcast_Offset;
t_u8 bcastTWTLI;
t_u8 count;
BTWT_set BTWT_sets[BTWT_AGREEMENT_MAX];
} MLAN_PACK_END mlan_ds_btwt_ap_config, *pmlan_ds_btwt_ap_config;
/** Type definition of mlan_ds_twtcfg for MLAN_OID_11AX_TWT_CFG */
typedef struct MLAN_PACK_START _mlan_ds_twtcfg {
/** Sub-command */
@ -4283,6 +4330,10 @@ typedef struct MLAN_PACK_START _mlan_ds_twtcfg {
* MLAN_11AX_TWT_INFORMATION_SUBID
*/
mlan_ds_twt_information twt_information;
/** BTWT AP config for Sub ID:
* MLAN_11AX_BTWT_AP_CONFIG_SUBID_SUBID
*/
mlan_ds_btwt_ap_config btwt_ap_config;
} param;
} MLAN_PACK_END mlan_ds_twtcfg, *pmlan_ds_twtcfg;
@ -5783,6 +5834,15 @@ typedef MLAN_PACK_START struct _mlan_ds_csi_params {
t_u8 csi_filter_cnt;
/** Chip ID */
t_u8 chip_id;
/** band config */
t_u8 band_config;
/** Channel num */
t_u8 channel;
/** Enable getting CSI data on special channel */
t_u8 csi_monitor_enable;
/** CSI data received in cfg channel with mac addr filter, not only RA
* is us or other*/
t_u8 ra4us;
/** CSI filters */
mlan_csi_filter_t csi_filter[CSI_FILTER_MAX];
} MLAN_PACK_END mlan_ds_csi_params;

View file

@ -7,7 +7,7 @@
* to the firmware.
*
*
* Copyright 2008-2023 NXP
* Copyright 2008-2024 NXP
*
* This software file (the File) is distributed by NXP
* under the terms of the GNU General Public License Version 2, June 1991
@ -1636,12 +1636,16 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
mlan_ds_bss *bss;
IEEEtypes_MgmtHdr_t *hdr;
t_u16 sub_type = 0;
t_u16 assoc_rsp_size = 0;
ENTER();
hdr = (IEEEtypes_MgmtHdr_t *)&resp->params;
sub_type = IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(hdr->FrmCtl);
if (!memcmp(pmpriv->adapter, hdr->BssId,
assoc_rsp_size = resp->size - S_DS_GEN;
if ((assoc_rsp_size >=
(sizeof(IEEEtypes_MgmtHdr_t) + sizeof(IEEEtypes_AssocRsp_t))) &&
!memcmp(pmpriv->adapter, hdr->BssId,
pmpriv->curr_bss_params.attemp_bssid,
MLAN_MAC_ADDR_LENGTH) &&
((sub_type == SUBTYPE_ASSOC_RESP) ||

View file

@ -1578,6 +1578,8 @@ struct _sta_node {
IEEEtypes_HECap_t tdls_he_cap;
/** HE Operations IE */
IEEEtypes_HeOp_t he_op;
IEEEtypes_Generic_t multi_ap_ie;
t_u8 is_multi_ap;
/** wapi key on off flag */
t_u8 wapi_key_on;
/** tx pause status */
@ -1587,6 +1589,8 @@ struct _sta_node {
sta_stats stats;
/** station aid */
t_u16 aid;
/** apple device based on OUI in assoc req */
t_u8 is_apple_sta;
};
/** 802.11h State information kept in the 'mlan_adapter' driver structure */
@ -2385,6 +2389,8 @@ struct _mlan_adapter {
t_u8 pcie_tx_processing;
/** pcie cmd_dnld_int flag */
t_u8 pcie_cmd_dnld_int;
/** pcie event_int flag */
t_u8 pcie_event_int;
/** more_tx_task_flag */
t_u8 more_tx_task_flag;
/** more event flag */
@ -2611,6 +2617,8 @@ struct _mlan_adapter {
wlan_802_11d_domain_reg_t domain_reg;
/** Country Code */
t_u8 country_code[COUNTRY_CODE_LEN];
/**country code from OTP*/
t_u16 fw_country_code;
/** FSM variable for 11h support */
wlan_11h_device_state_t state_11h;
/** FSM variable for DFS support */
@ -2926,6 +2934,10 @@ struct _mlan_adapter {
t_u8 remain_on_channel;
t_u8 llde_enabled;
t_u8 llde_mode;
t_u8 llde_packet_type;
t_u8 llde_device_filter;
t_u8 llde_macfilter1[MLAN_MAC_ADDR_LENGTH];
t_u8 llde_macfilter2[MLAN_MAC_ADDR_LENGTH];
};
/** Check if stream 2X2 enabled */
@ -2954,6 +2966,19 @@ struct _mlan_adapter {
/** IP packet Protocol number offset */
#define MLAN_IP_PROTOCOL_OFFSET (11)
/** IP packet Protocol number for TCP */
#define MLAN_IP_PROTOCOL_TCP (0x06)
/** IP packet Protocol number for UDP */
#define MLAN_IP_PROTOCOL_UDP (0x11)
#define LLDE_FILTER_PKT_ALL 0
#define LLDE_FILTER_PKT_ICMP_PING 1
#define LLDE_FILTER_PKT_TCP_ACK 2
#define LLDE_FILTER_PKT_TCP_DATA 4
#define LLDE_FILTER_PKT_UDP 8
#define MLAN_TCP_ACK_OFFSET 24
#define MLAN_TCP_ACK_HEADER_LEN 52
/** Rx packet Sniffer Operation Mode
*
* MODE1 : Can be enabled only in disconnected state.

View file

@ -477,6 +477,12 @@ mlan_status wlan_get_info_debug_info(pmlan_adapter pmadapter,
debug_info->main_lock_flag = pmadapter->main_lock_flag;
debug_info->main_process_cnt = pmadapter->main_process_cnt;
debug_info->delay_task_flag = pmadapter->delay_task_flag;
#ifdef PCIE
debug_info->pcie_event_processing =
pmadapter->pcie_event_processing;
debug_info->pcie_tx_processing = pmadapter->pcie_tx_processing;
debug_info->pcie_rx_processing = pmadapter->pcie_rx_processing;
#endif
debug_info->num_cmd_host_to_card_failure =
pmadapter->dbg.num_cmd_host_to_card_failure;
debug_info->num_cmd_sleep_cfm_host_to_card_failure =
@ -3727,6 +3733,122 @@ static t_u8 wlan_check_ie_11b_support_rates(pIEEEtypes_Generic_t prates)
}
#endif
/**
* @brief check if Apple ie present.
*
* @param pmadapter A pointer to mlan_adapter structure
* @param pbuf A pointer to IE buffer
* @param buf_len IE buffer len
*
* @return MTRUE/MFALSE
*/
static t_u8 wlan_is_apple_ie_present(pmlan_adapter pmadapter, t_u8 *pbuf,
t_u16 buf_len)
{
t_u16 bytes_left = buf_len;
IEEEtypes_ElementId_e element_id;
t_u8 *pcurrent_ptr = pbuf;
t_u8 element_len;
t_u16 total_ie_len;
IEEEtypes_VendorSpecific_t *pvendor_ie;
const t_u8 apple_oui[4] = {0x00, 0x17, 0xf2, 0x0a};
t_u8 found_apple_ie = MFALSE;
ENTER();
/* Process variable IE */
while (bytes_left >= 2) {
element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr));
element_len = *((t_u8 *)pcurrent_ptr + 1);
total_ie_len = element_len + sizeof(IEEEtypes_Header_t);
if (bytes_left < total_ie_len) {
PRINTM(MERROR, "InterpretIE: Error in processing IE, "
"bytes left < IE length\n");
bytes_left = 0;
continue;
}
switch (element_id) {
case VENDOR_SPECIFIC_221:
pvendor_ie = (IEEEtypes_VendorSpecific_t *)pcurrent_ptr;
if (!memcmp(pmadapter, pvendor_ie->vend_hdr.oui,
apple_oui, sizeof(apple_oui))) {
found_apple_ie = MTRUE;
PRINTM(MINFO, "found Apple IE\n");
}
break;
default:
break;
}
pcurrent_ptr += element_len + 2;
/* Need to account for IE ID and IE Len */
bytes_left -= (element_len + 2);
if (found_apple_ie)
break;
}
LEAVE();
return found_apple_ie;
}
/**
* @brief This function extracts multi-ap IE
*
* @param pmadapter A pointer to mlan_adapter
* @param pbuf A pointer to IE buffer
* @param buf_len IE buffer length
* @param multi_ap_ie A pointer to Vendor IE
*
* @return MTRUE - if multi-ap ie found, MFALSE - otherwise
*/
static t_u8 wlan_get_multi_ap_ie(pmlan_adapter pmadapter, t_u8 *pbuf,
t_u16 buf_len,
IEEEtypes_Generic_t *multi_ap_ie)
{
t_u16 bytes_left = buf_len;
IEEEtypes_ElementId_e element_id;
t_u8 *pcurrent_ptr = pbuf;
t_u8 element_len;
t_u16 total_ie_len;
IEEEtypes_Generic_t *pvendor_ie;
const t_u8 multi_ap_oui[3] = {0x50, 0x6f, 0x9a};
ENTER();
/* Process variable IE */
while (bytes_left >= 2) {
element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr));
element_len = *((t_u8 *)pcurrent_ptr + 1);
total_ie_len = element_len + sizeof(IEEEtypes_Header_t);
if (bytes_left < total_ie_len) {
PRINTM(MERROR, "InterpretIE: Error in processing IE, "
"bytes left < IE length\n");
bytes_left = 0;
continue;
}
if (element_id == VENDOR_SPECIFIC_221) {
pvendor_ie = (IEEEtypes_Generic_t *)pcurrent_ptr;
if (!memcmp(pmadapter, pvendor_ie->data, multi_ap_oui,
sizeof(multi_ap_oui))) {
memcpy_ext(pmadapter, multi_ap_ie, pvendor_ie,
pvendor_ie->ieee_hdr.len +
sizeof(IEEEtypes_Header_t),
sizeof(IEEEtypes_Generic_t));
return MTRUE;
}
}
pcurrent_ptr += element_len + 2;
/* Need to account for IE ID and IE Len */
bytes_left -= (element_len + 2);
}
LEAVE();
return MFALSE;
}
/**
* @brief This function will search for the specific ie
*
@ -3808,6 +3930,12 @@ void wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent,
ie_len);
PRINTM(MCMND, "STA: is_wmm_enabled=%d\n",
sta_ptr->is_wmm_enabled);
sta_ptr->is_apple_sta =
wlan_is_apple_ie_present(priv->adapter,
assoc_req_ie,
ie_len);
PRINTM(MINFO, "STA: is Apple device=%d\n",
sta_ptr->is_apple_sta);
pht_cap = (IEEEtypes_HTCap_t *)
wlan_get_specific_ie(priv, assoc_req_ie,
ie_len,
@ -3912,6 +4040,9 @@ void wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent,
sta_ptr->bandmode = BAND_G;
} else
sta_ptr->bandmode = BAND_A;
sta_ptr->is_multi_ap = wlan_get_multi_ap_ie(
priv->adapter, assoc_req_ie, ie_len,
&sta_ptr->multi_ap_ie);
#endif
break;
}

View file

@ -293,10 +293,8 @@ static mlan_status wlan_init_dma_cfg_registers(mlan_adapter *pmadapter,
if (dma_mode == DMA_MODE_DUAL_DESC) {
if (direction == ADMA_HOST_TO_DEVICE) {
dma_cfg2 |= ADMA_SRC_DMA_DONE_INT_BYPASS_EN;
if (pmadapter->pcard_pcie->pcie_int_mode !=
PCIE_INT_MODE_MSIX)
dma_cfg2 |=
ADMA_MSI_LEGACY_SRC_DMA_DONE_INT_BYPASS_EN;
dma_cfg2 |=
ADMA_MSI_LEGACY_SRC_DMA_DONE_INT_BYPASS_EN;
} else {
/* Read the dma_cfg3 register */
if (pcb->moal_read_reg(pmadapter->pmoal_handle,
@ -316,10 +314,8 @@ static mlan_status wlan_init_dma_cfg_registers(mlan_adapter *pmadapter,
ret = MLAN_STATUS_FAILURE;
}
dma_cfg2 |= ADMA_DST_DMA_DONE_INT_BYPASS_EN;
if (pmadapter->pcard_pcie->pcie_int_mode !=
PCIE_INT_MODE_MSIX)
dma_cfg2 |=
ADMA_MSI_LEGACY_DST_DMA_DONE_INT_BYPASS_EN;
dma_cfg2 |=
ADMA_MSI_LEGACY_DST_DMA_DONE_INT_BYPASS_EN;
}
} else {
if (direction == ADMA_HOST_TO_DEVICE)
@ -327,10 +323,7 @@ static mlan_status wlan_init_dma_cfg_registers(mlan_adapter *pmadapter,
else
dma_cfg2 |= ADMA_DST_ADDR_IS_HOST;
}
if (pmadapter->pcard_pcie->pcie_int_mode == PCIE_INT_MODE_MSIX)
dma_cfg2 |= ADMA_MSIX_ENABLE;
else
dma_cfg2 |= ADMA_MSI_LEGACY_ENABLE;
dma_cfg2 |= ADMA_MSI_LEGACY_ENABLE;
PRINTM(MCMND, "dma_cfg2=0x%x\n", dma_cfg2);
/* enable INT_BYPASS_EN in the dma_cfg2 register */
@ -404,8 +397,6 @@ static mlan_status wlan_init_adma(mlan_adapter *pmadapter, t_u8 type,
t_u32 q_addr = 0;
t_u8 direction = 0;
t_u8 dma_mode = 0;
t_u32 msix_data;
t_u32 msix_vector;
pmlan_callbacks pcb = &pmadapter->callbacks;
ENTER();
if (init)
@ -416,31 +407,26 @@ static mlan_status wlan_init_adma(mlan_adapter *pmadapter, t_u8 type,
q_addr = ADMA_CHAN0_Q0;
direction = ADMA_HOST_TO_DEVICE;
dma_mode = DMA_MODE_DUAL_DESC;
msix_vector = ADMA_VECTOR_CHAN0_Q0;
break;
case ADMA_RX_DATA:
q_addr = ADMA_CHAN1_Q0;
direction = ADMA_DEVICE_TO_HOST;
dma_mode = DMA_MODE_DUAL_DESC;
msix_vector = AMDA_VECTOR_CHAN1_Q0;
break;
case ADMA_EVENT:
q_addr = ADMA_CHAN1_Q1;
direction = ADMA_DEVICE_TO_HOST;
dma_mode = DMA_MODE_DUAL_DESC;
msix_vector = AMDA_VECTOR_CHAN1_Q1;
break;
case ADMA_CMD:
q_addr = ADMA_CHAN2_Q0;
direction = ADMA_HOST_TO_DEVICE;
dma_mode = DMA_MODE_DIRECT;
msix_vector = AMDA_VECTOR_CHAN2_Q0;
break;
case ADMA_CMDRESP:
q_addr = ADMA_CHAN2_Q1;
direction = ADMA_DEVICE_TO_HOST;
dma_mode = DMA_MODE_DIRECT;
msix_vector = AMDA_VECTOR_CHAN2_Q1;
break;
default:
PRINTM(MERROR, "unknow adma type\n");
@ -467,33 +453,6 @@ static mlan_status wlan_init_adma(mlan_adapter *pmadapter, t_u8 type,
ret = MLAN_STATUS_FAILURE;
goto done;
}
if (pmadapter->pcard_pcie->pcie_int_mode ==
PCIE_INT_MODE_MSIX) {
if (pcb->moal_read_reg(pmadapter->pmoal_handle,
q_addr + ADMA_MSIX_DOORBELL_DATA,
&msix_data)) {
PRINTM(MERROR,
"Fail to read DMA MSIX data register\n");
ret = MLAN_STATUS_FAILURE;
goto done;
}
msix_data &= ~ADMA_MSIX_VECTOR_MASK;
msix_data &= ~ADMA_MSIX_PF_MASK;
msix_data |= msix_vector;
msix_data |= pmadapter->pcard_pcie->func_num
<< ADMA_MSIX_PF_BIT;
PRINTM(MCMND, "msix_data=0x%x\n", msix_data);
if (pcb->moal_write_reg(pmadapter->pmoal_handle,
q_addr +
ADMA_MSIX_DOORBELL_DATA,
(t_u32)msix_data)) {
PRINTM(MERROR,
"Failed to write DMA DOORBELL_DATA.\n");
ret = MLAN_STATUS_FAILURE;
goto done;
}
}
}
if (direction == ADMA_HOST_TO_DEVICE) {
@ -1162,8 +1121,6 @@ static mlan_status wlan_clear_pending_int_status(mlan_adapter *pmadapter)
ENTER();
if (pmadapter->pcard_pcie->pcie_int_mode == PCIE_INT_MODE_MSIX)
goto done;
if (pcb->moal_read_reg(pmadapter->pmoal_handle,
pmadapter->pcard_pcie->reg->reg_host_int_status,
&pcie_ireg)) {
@ -3096,6 +3053,9 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
ret = MLAN_STATUS_FAILURE;
goto done;
}
if ((pmadapter->ps_state == PS_STATE_SLEEP) ||
(pmadapter->ps_state == PS_STATE_SLEEP_CFM))
goto done;
/* Read the RX ring read pointer set by firmware */
if (pcb->moal_read_reg(pmadapter->pmoal_handle, reg_rxbd_rdptr,
@ -4223,22 +4183,6 @@ static mlan_status wlan_pcie_interrupt(t_u16 msg_id, pmlan_adapter pmadapter)
pcb->moal_spin_lock(pmoal_handle, pint_lock);
pmadapter->ireg = 1;
pcb->moal_spin_unlock(pmoal_handle, pint_lock);
} else if (pmadapter->pcard_pcie->pcie_int_mode == PCIE_INT_MODE_MSIX) {
pcie_ireg = (1 << msg_id) &
pmadapter->pcard_pcie->reg->host_intr_mask;
if (pcie_ireg) {
if (!pmadapter->pps_uapsd_mode &&
(pmadapter->ps_state == PS_STATE_SLEEP)) {
pmadapter->pm_wakeup_fw_try = MFALSE;
pmadapter->ps_state = PS_STATE_AWAKE;
pmadapter->pm_wakeup_card_req = MFALSE;
}
}
pcb->moal_spin_lock(pmoal_handle, pint_lock);
pmadapter->ireg |= pcie_ireg;
pcb->moal_spin_unlock(pmoal_handle, pint_lock);
PRINTM(MINTR, "ireg: 0x%08x\n", pcie_ireg);
} else {
wlan_pcie_disable_host_int_mask(pmadapter);
if (pcb->moal_read_reg(
@ -4286,77 +4230,6 @@ static mlan_status wlan_pcie_interrupt(t_u16 msg_id, pmlan_adapter pmadapter)
return ret;
}
/**
* @brief This function checks the msix interrupt status and
* handle it accordingly.
*
* @param pmadapter A pointer to mlan_adapter structure
*
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
*/
mlan_status wlan_process_msix_int(mlan_adapter *pmadapter)
{
mlan_status ret = MLAN_STATUS_SUCCESS;
t_u32 pcie_ireg = 0;
pmlan_callbacks pcb = &pmadapter->callbacks;
ENTER();
pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->pint_lock);
pcie_ireg =
pmadapter->ireg & pmadapter->pcard_pcie->reg->host_intr_mask;
pmadapter->ireg = 0;
pcb->moal_spin_unlock(pmadapter->pmoal_handle, pmadapter->pint_lock);
if (pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_dnld_done) {
PRINTM(MINFO, "<--- DATA sent Interrupt --->\n");
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
MLAN_EVENT_ID_DRV_DEFER_TX_COMPLTE, MNULL);
}
if (pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_upld_rdy) {
PRINTM(MINFO, "Rx DATA\n");
pcb->moal_spin_lock(pmadapter->pmoal_handle,
pmadapter->pmlan_rx_lock);
pmadapter->pcard_pcie->rx_pending = MTRUE;
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
pmadapter->pmlan_rx_lock);
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
MLAN_EVENT_ID_DRV_DEFER_RX_DATA, MNULL);
if (wlan_is_tx_pending(pmadapter))
wlan_recv_event(
wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
MLAN_EVENT_ID_DRV_DEFER_TX_COMPLTE, MNULL);
}
if (pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_event_rdy) {
PRINTM(MINFO, "Rx EVENT\n");
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
MLAN_EVENT_ID_DRV_DEFER_RX_EVENT, MNULL);
}
if (pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_cmd_done) {
if (pmadapter->cmd_sent && !pmadapter->vdll_ctrl.vdll_len) {
PRINTM(MINFO, "<--- CMD sent Interrupt --->\n");
pmadapter->cmd_sent = MFALSE;
}
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
MLAN_EVENT_ID_DRV_DEFER_CMDRESP, MNULL);
}
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097) || \
defined(PCIEAW693) || defined(PCIEIW624)
if (pmadapter->pcard_pcie->reg->host_intr_cmd_dnld &&
(pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_cmd_dnld)) {
pmadapter->pcie_cmd_dnld_int = MTRUE;
PRINTM(MINFO, "<--- CMD DNLD DONE Interrupt --->\n");
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL);
}
#endif
PRINTM(MINFO, "cmd_sent=%d data_sent=%d\n", pmadapter->cmd_sent,
pmadapter->data_sent);
LEAVE();
return ret;
}
/**
* @brief This function checks the interrupt status and
* handle it accordingly.
@ -4373,10 +4246,6 @@ static mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
ENTER();
if (pmadapter->pcard_pcie->pcie_int_mode == PCIE_INT_MODE_MSIX) {
wlan_process_msix_int(pmadapter);
goto done;
}
pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->pint_lock);
if (pmadapter->pcard_pcie->pcie_int_mode != PCIE_INT_MODE_MSI)
pcie_ireg = pmadapter->ireg;
@ -4457,9 +4326,10 @@ static mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
pcie_ireg &=
~pmadapter->pcard_pcie->reg->host_intr_event_rdy;
PRINTM(MINFO, "Rx EVENT\n");
pmadapter->pcie_event_int = MTRUE;
wlan_recv_event(
wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
MLAN_EVENT_ID_DRV_DEFER_RX_EVENT, MNULL);
MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL);
}
if (pcie_ireg &
pmadapter->pcard_pcie->reg->host_intr_cmd_done) {

View file

@ -490,7 +490,6 @@ mlan_status wlan_set_drv_ready_reg(mlan_adapter *pmadapter, t_u32 val);
mlan_status wlan_pcie_init(mlan_adapter *pmadapter);
/** Read interrupt status */
mlan_status wlan_process_msix_int(mlan_adapter *pmadapter);
/** Transfer data to card */
mlan_status wlan_pcie_host_to_card(pmlan_private pmpriv, t_u8 type,
mlan_buffer *mbuf, mlan_tx_param *tx_param);

View file

@ -6543,6 +6543,12 @@ mlan_status wlan_cmd_bgscan_config(mlan_private *pmpriv,
.chan_scan_mode.passive_scan,
scan_dur);
if (tlv_chan_list->chan_scan_param[chan_num]
.chan_scan_mode.passive_scan)
tlv_chan_list->chan_scan_param[chan_num]
.chan_scan_mode.passive_to_active_scan =
MTRUE;
tlv_chan_list->chan_scan_param[chan_num].min_scan_time =
wlan_cpu_to_le16(scan_dur);
tlv_chan_list->chan_scan_param[chan_num].max_scan_time =

View file

@ -1210,6 +1210,11 @@ process_start:
pmadapter->pcie_cmd_dnld_int = MFALSE;
mlan_process_pcie_interrupt_cb(pmadapter, RX_CMD_DNLD);
}
if (IS_PCIE(pmadapter->card_type) &&
pmadapter->pcie_event_int) {
pmadapter->pcie_event_int = MFALSE;
mlan_process_pcie_interrupt_cb(pmadapter, RX_EVENT);
}
#endif
/* wake up timeout happened */
@ -1430,6 +1435,71 @@ exit_main_proc:
return ret;
}
/**
* @brief Function to check if llde pkt type matches to defined pkt filter and
* mark those pkts
*
* @param padapter A pointer to mlan_adapter structure
* @param pmbuf A pointer to mlan_buffer structure
*
* @return void
*/
static void mlan_check_llde_pkt_filter(mlan_adapter *pmadapter,
pmlan_buffer pmbuf, t_u8 ip_protocol)
{
mlan_private *pmpriv = pmadapter->priv[pmbuf->bss_index];
t_u8 matched_filter = 0;
if (!(pmadapter->llde_enabled &&
(pmadapter->llde_mode == MLAN_11AXCMD_LLDE_MODE_EVENT_DRIVEN))) {
return;
}
/* match iphone mac addr */
if (pmadapter->llde_device_filter == 1) {
sta_node *sta_ptr = MNULL;
// get station entry from Peer MAC address
sta_ptr = wlan_get_station_entry(
pmpriv, (pmbuf->pbuf + pmbuf->data_offset));
if (sta_ptr && sta_ptr->is_apple_sta) {
matched_filter = 1;
}
}
if (matched_filter == 0) {
/* check mac filter if iphone device filter not matched */
if ((memcmp(pmadapter, pmadapter->llde_macfilter1,
(pmbuf->pbuf + pmbuf->data_offset),
MLAN_MAC_ADDR_LENGTH) == 0) ||
(memcmp(pmadapter, pmadapter->llde_macfilter2,
(pmbuf->pbuf + pmbuf->data_offset),
MLAN_MAC_ADDR_LENGTH) == 0)) {
matched_filter = 1;
}
}
if (matched_filter) {
if ((pmadapter->llde_packet_type == LLDE_FILTER_PKT_ALL) ||
((pmadapter->llde_packet_type == LLDE_FILTER_PKT_UDP) &&
(ip_protocol == MLAN_IP_PROTOCOL_UDP))) {
pmbuf->flags |= MLAN_BUF_FLAG_LLDE_PKT_FILTER;
} else if (((pmadapter->llde_packet_type ==
LLDE_FILTER_PKT_TCP_ACK) ||
(pmadapter->llde_packet_type ==
LLDE_FILTER_PKT_TCP_DATA)) &&
(ip_protocol == MLAN_IP_PROTOCOL_TCP)) {
/*TODO: identify TCP ACK and Data packets and set the
* MLAN_BUF_FLAG_LLDE_PKT_FILTER flag accordingly */
pmbuf->flags |= MLAN_BUF_FLAG_LLDE_PKT_FILTER;
} else if ((pmadapter->llde_packet_type ==
LLDE_FILTER_PKT_ICMP_PING) &&
(ip_protocol == MLAN_IP_PROTOCOL_ICMP)) {
pmbuf->flags |= MLAN_BUF_FLAG_LLDE_PKT_FILTER;
}
}
return;
}
/**
* @brief Function to send packet
*
@ -1487,6 +1557,9 @@ mlan_status mlan_send_packet(t_void *padapter, pmlan_buffer pmbuf)
pmbuf->priority =
WMM_SECOND_HIGHEST_PRIORITY;
}
mlan_check_llde_pkt_filter(pmadapter, pmbuf,
ip_protocol);
}
}
#endif
@ -1738,11 +1811,11 @@ mlan_status mlan_recv(t_void *padapter, pmlan_buffer pmbuf, t_u32 port)
if ((len > 0) && (len < MAX_EVENT_SIZE))
memmove(pmadapter, pmadapter->event_body, pbuf,
len);
pmadapter->event_received = MTRUE;
pmadapter->pmlan_buffer_event = pmbuf;
/* remove 4 byte recv_type */
pmbuf->data_offset += MLAN_TYPE_LEN;
pmbuf->data_len -= MLAN_TYPE_LEN;
pmadapter->event_received = MTRUE;
pmadapter->pmlan_buffer_event = pmbuf;
/* MOAL to call mlan_main_process for processing */
break;
default:
@ -2045,12 +2118,12 @@ void mlan_process_pcie_interrupt_cb(t_void *padapter, int type)
MNULL);
}
break;
case RX_EVENT: // Rx event
case RX_CMD_RESP: // Rx CMD Resp
if (mlan_main_process(pmadapter) == MLAN_STATUS_FAILURE)
PRINTM(MERROR, "mlan_main_process failed.\n");
break;
case RX_CMD_DNLD:
case RX_EVENT:
default:
break;
}

View file

@ -2593,7 +2593,7 @@ wlan_cmd_packet_aggr_over_host_interface(pmlan_private pmpriv,
memset(pmadapter, usb_aggr_param_tlv, 0,
MRVL_USB_AGGR_PARAM_TLV_LEN + sizeof(MrvlIEtypesHeader_t));
usb_aggr_param_tlv->header.type =
wlan_cpu_to_le16(MRVL_USB_AGGR_PARAM_TLV_ID);
wlan_cpu_to_le16(NXP_USB_AGGR_PARAM_TLV_ID);
usb_aggr_param_tlv->header.len =
wlan_cpu_to_le16(MRVL_USB_AGGR_PARAM_TLV_LEN);
cmd->size = wlan_cpu_to_le16(
@ -2698,7 +2698,8 @@ mlan_status wlan_cmd_net_monitor(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
net_mon = (mlan_ds_misc_net_monitor *)pdata_buf;
cmd->size = wlan_cpu_to_le16(S_DS_GEN +
sizeof(HostCmd_DS_802_11_NET_MONITOR));
sizeof(HostCmd_DS_802_11_NET_MONITOR) +
sizeof(ChanBandParamSet_t));
cmd->command = wlan_cpu_to_le16(cmd->command);
cmd_net_mon->action = wlan_cpu_to_le16(cmd_action);
if (cmd_action == HostCmd_ACT_GEN_SET) {

View file

@ -2258,7 +2258,7 @@ wlan_ret_packet_aggr_over_host_interface(pmlan_private pmpriv,
changed = 0;
tlv = (*ptlv_buffer) | (*(ptlv_buffer + 1) << 8);
switch (tlv) {
case MRVL_USB_AGGR_PARAM_TLV_ID:
case NXP_USB_AGGR_PARAM_TLV_ID:
usb_aggr_param_tlv =
(MrvlIETypes_USBAggrParam_t *)ptlv_buffer;
misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;

View file

@ -417,6 +417,9 @@ static mlan_status wlan_get_info_ioctl(pmlan_adapter pmadapter,
pget_info->param.fw_info.force_reg = MTRUE;
else
pget_info->param.fw_info.force_reg = MFALSE;
/**country code from OTP */
pget_info->param.fw_info.fw_country_code =
pmadapter->fw_country_code;
pget_info->param.fw_info.ecsa_enable = pmadapter->ecsa_enable;
pget_info->param.fw_info.getlog_enable =
pmadapter->getlog_enable;

503
mlan/mlan_tlv_ids.h Executable file
View file

@ -0,0 +1,503 @@
/** @file mlan_tlv_ids.h
*
* @brief This file contains TLV ID definitions.
*
*
* Copyright 2024 NXP
*
* This software file (the File) is distributed by NXP
* under the terms of the GNU General Public License Version 2, June 1991
* (the License). You may use, redistribute and/or modify the File in
* accordance with the terms and conditions of the License, a copy of which
* is available by writing to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
*
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
* this warranty disclaimer.
*
*/
#ifndef _MLAN_TLV_IDS_H_
#define _MLAN_TLV_IDS_H_
/* include guard is absent intentionally */
/** Terminating TLV type */
#define NXP_TERMINATE_TLV_ID 0xffff
/** TLV ID Constants */
/** IEEE TLV IDs*/
/** TLV type : SSID */
#define TLV_TYPE_SSID 0x0000
/** TLV type : Rates */
#define TLV_TYPE_RATES 0x0001
/** TLV type : PHY FH */
#define TLV_TYPE_PHY_FH 0x0002
/** TLV type : PHY DS */
#define TLV_TYPE_PHY_DS 0x0003
/** TLV type : CF */
#define TLV_TYPE_CF 0x0004
/** TLV type : Domain */
#define TLV_TYPE_DOMAIN 0x0007
/** TLV type : Power constraint */
#define TLV_TYPE_POWER_CONSTRAINT 0x0020
/** TLV type : Power capability */
#define TLV_TYPE_POWER_CAPABILITY 0x0021
#define TLV_TYPE_HT_CAPABILITY 0x002d
/** TLV type : Vendor Specific IE */
#define TLV_TYPE_VENDOR_SPECIFIC_IE 0x00dd
#define TLV_TYPE_EXTENSION_ID 0x00ff
/** Proprietary TLV IDs */
/** TLV type : Key material */
#define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0) /* 0x0100 */
/** TLV type : Channel list */
#define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1) /* 0x0101 */
/** TLV type : Number of probes */
#define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2) /* 0x0102 */
/** TLV type : Beacon RSSI low */
#define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4) /* 0x0104 */
/** TLV type : Beacon SNR low */
#define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 5) /* 0x0105 */
/** TLV type : Fail count */
#define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 6) /* 0x0106 */
/** TLV type : BCN miss */
#define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 7) /* 0x0107 */
/** TLV type : LED behavior */
#define TLV_TYPE_LEDBEHAVIOR (PROPRIETARY_TLV_BASE_ID + 9) /* 0x0109 */
/** TLV type : Passthrough */
#define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10) /* 0x010a */
/** TLV type : Power TBL 2.4 Ghz */
#define TLV_TYPE_POWER_TBL_2_4GHZ (PROPRIETARY_TLV_BASE_ID + 12) /* 0x010c */
/** TLV type : Power TBL 5 GHz */
#define TLV_TYPE_POWER_TBL_5GHZ (PROPRIETARY_TLV_BASE_ID + 13) /* 0x010d */
/** TLV type : WMM queue status */
#define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16) /* 0x0110 */
/** TLV type : Wildcard SSID */
#define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18) /* 0x0112 */
/** TLV type : TSF timestamp */
#define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19) /* 0x0113 */
/** TLV type : ARP filter */
#define TLV_TYPE_ARP_FILTER (PROPRIETARY_TLV_BASE_ID + 21) /* 0x0115 */
/** TLV type : Beacon RSSI high */
#define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22) /* 0x0116 */
/** TLV type : Beacon SNR high */
#define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 23) /* 0x0117 */
/** TLV type : Start BG scan later */
#define TLV_TYPE_STARTBGSCANLATER (PROPRIETARY_TLV_BASE_ID + 30) /* 0x011e */
/** TLV type : Authentication type */
#define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31) /* 0x011f */
/** TLV type : STA Mac address */
#define TLV_TYPE_STA_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 32) /* 0x0120 */
/** TLV type : BSSID */
#define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 35) /* 0x0123 */
/** TLV type : Link Quality */
#define TLV_TYPE_LINK_QUALITY (PROPRIETARY_TLV_BASE_ID + 36) /* 0x0124 */
/** TLV type : Data RSSI low */
#define TLV_TYPE_RSSI_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 38) /* 0x0126 */
/** TLV type : Data SNR low */
#define TLV_TYPE_SNR_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 39) /* 0x0127 */
/** TLV type : Data RSSI high */
#define TLV_TYPE_RSSI_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 40) /* 0x0128 */
/** TLV type : Data SNR high */
#define TLV_TYPE_SNR_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 41) /* 0x0129 */
/** TLV type : Channel band list */
#define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42) /* 0x012a */
#ifdef UAP_SUPPORT
/** TLV type : AP Channel band Config */
#define TLV_TYPE_UAP_CHAN_BAND_CONFIG \
(PROPRIETARY_TLV_BASE_ID + 42) /* 0x012a */
/** TLV type : AP Mac address */
#define TLV_TYPE_UAP_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 43) /* 0x012b */
/** TLV type : AP Beacon period */
#define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44) /* 0x012c */
/** TLV type : AP DTIM period */
#define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45) /* 0x012d */
/** TLV type : AP Tx power */
#define TLV_TYPE_UAP_TX_POWER (PROPRIETARY_TLV_BASE_ID + 47) /* 0x012f */
/** TLV type : AP SSID broadcast control */
#define TLV_TYPE_UAP_BCAST_SSID_CTL (PROPRIETARY_TLV_BASE_ID + 48) /* 0x0130 \
*/
/** TLV type : AP Preamble control */
#define TLV_TYPE_UAP_PREAMBLE_CTL (PROPRIETARY_TLV_BASE_ID + 49) /* 0x0131 */
/** TLV type : AP Antenna control */
#define TLV_TYPE_UAP_ANTENNA_CTL (PROPRIETARY_TLV_BASE_ID + 50) /* 0x0132 */
/** TLV type : AP RTS threshold */
#define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51) /* 0x0133 */
/** TLV type : AP Tx data rate */
#define TLV_TYPE_UAP_TX_DATA_RATE (PROPRIETARY_TLV_BASE_ID + 53) /* 0x0135 */
/** TLV type: AP Packet forwarding control */
#define TLV_TYPE_UAP_PKT_FWD_CTL (PROPRIETARY_TLV_BASE_ID + 54) /* 0x0136 */
/** TLV type: STA information */
#define TLV_TYPE_UAP_STA_INFO (PROPRIETARY_TLV_BASE_ID + 55) /* 0x0137 */
/** TLV type: AP STA MAC address filter */
#define TLV_TYPE_UAP_STA_MAC_ADDR_FILTER \
(PROPRIETARY_TLV_BASE_ID + 56) /* 0x0138 */
/** TLV type: AP STA ageout timer */
#define TLV_TYPE_UAP_STA_AGEOUT_TIMER \
(PROPRIETARY_TLV_BASE_ID + 57) /* 0x0139 */
#endif /* UAP_SUPPORT */
/** TLV type : Security Cfg */
#define TLV_TYPE_SECURITY_CFG (PROPRIETARY_TLV_BASE_ID + 58) /* 0x013a */
#ifdef UAP_SUPPORT
/** TLV type: AP WEP keys */
#define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 59) /* 0x013b */
#endif /* UAP_SUPPORT */
/** TLV type : Passphrase */
#define TLV_TYPE_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60) /* 0x013c */
#ifdef UAP_SUPPORT
/** TLV type: AP WPA passphrase */
#define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60) /* 0x013c \
*/
#endif /* UAP_SUPPORT */
/** TLV type : Encryption Protocol TLV */
#define TLV_TYPE_ENCRYPTION_PROTO (PROPRIETARY_TLV_BASE_ID + 64) /* 0x0140 */
#ifdef UAP_SUPPORT
/** TLV type: AP protocol */
#define TLV_TYPE_UAP_ENCRYPT_PROTOCOL \
(PROPRIETARY_TLV_BASE_ID + 64) /* 0x0140 */
/** TLV type: AP AKMP */
#define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 65) /* 0x0141 */
#endif /* UAP_SUPPORT */
/** TLV type : Cipher TLV */
#define TLV_TYPE_CIPHER (PROPRIETARY_TLV_BASE_ID + 66) /* 0x0142 */
/** TLV type : PMK */
#define TLV_TYPE_PMK (PROPRIETARY_TLV_BASE_ID + 68) /* 0x0144 */
#ifdef UAP_SUPPORT
/** TLV type: AP Fragment threshold */
#define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70) /* 0x0146 \
*/
/** TLV type: AP Group rekey timer */
#define TLV_TYPE_UAP_GRP_REKEY_TIME (PROPRIETARY_TLV_BASE_ID + 71) /* 0x0147 \
*/
#endif /* UAP_SUPPORT */
/** TLV type : BCN miss */
#define TLV_TYPE_PRE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 73) /* 0x0149 */
/** TLV type : HT Capabilities */
#define TLV_TYPE_HT_CAP (PROPRIETARY_TLV_BASE_ID + 74) /* 0x014a */
/** TLV type : HT Information */
#define TLV_TYPE_HT_INFO (PROPRIETARY_TLV_BASE_ID + 75) /* 0x014b */
/** TLV type : Secondary Channel Offset */
#define TLV_SECONDARY_CHANNEL_OFFSET (PROPRIETARY_TLV_BASE_ID + 76) /* 0x014c \
*/
/** TLV type : 20/40 BSS Coexistence */
#define TLV_TYPE_2040BSS_COEXISTENCE (PROPRIETARY_TLV_BASE_ID + 77) /* 0x014d \
*/
/** TLV type : Overlapping BSS Scan Parameters */
#define TLV_TYPE_OVERLAP_BSS_SCAN_PARAM \
(PROPRIETARY_TLV_BASE_ID + 78) /* 0x014e */
/** TLV type : Extended capabilities */
#define TLV_TYPE_EXTCAP (PROPRIETARY_TLV_BASE_ID + 79) /* 0x014f */
/** TLV type : Set of MCS values that STA desires to use within the BSS */
#define TLV_TYPE_HT_OPERATIONAL_MCS_SET \
(PROPRIETARY_TLV_BASE_ID + 80) /* 0x0150 */
/** TLV type : Rate scope */
#define TLV_TYPE_RATE_DROP_PATTERN (PROPRIETARY_TLV_BASE_ID + 81) /* 0x0151 */
/** TLV type : Rate drop pattern */
#define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82) /* 0x0152 */
/** TLV type : Rate scope */
#define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83) /* 0x0153 */
/** TLV type : Power group */
#define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84) /* 0x0154 */
#ifdef UAP_SUPPORT
/**TLV type : AP Max Station number */
#define TLV_TYPE_UAP_MAX_STA_CNT (PROPRIETARY_TLV_BASE_ID + 85) /* 0x0155 */
#endif /* UAP_SUPPORT */
/** TLV type : Scan Response */
#define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 86) /* 0x0156 */
/** TLV type : Scan Response Stats */
#define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 87) /* 0x0157 */
/** TLV type : 11h Basic Rpt */
#define TLV_TYPE_CHANRPT_11H_BASIC (PROPRIETARY_TLV_BASE_ID + 91) /* 0x015b */
#ifdef UAP_SUPPORT
/**TLV type : AP Retry limit */
#define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 93) /* 0x015d */
#endif /* UAP_SUPPORT */
/** TLV type: WAPI IE */
#define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 94) /* 0x015e */
#ifdef UAP_SUPPORT
/** TLV type : AP MCBC data rate */
#define TLV_TYPE_UAP_MCBC_DATA_RATE (PROPRIETARY_TLV_BASE_ID + 98) /* 0x0162 \
*/
#endif /* UAP_SUPPORT */
#ifdef UAP_SUPPORT
/**TLV type: AP RSN replay protection */
#define TLV_TYPE_UAP_RSN_REPLAY_PROTECT \
(PROPRIETARY_TLV_BASE_ID + 100) /* 0x0164 */
/** TLV ID : WAPI Information */
#define TLV_TYPE_AP_WAPI_INFO (PROPRIETARY_TLV_BASE_ID + 103) /* 0x0167 */
#endif /* UAP_SUPPORT */
/** TLV ID : Management Frame */
#define TLV_TYPE_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 104) /* 0x0168 */
/** TLV type: MGMT IE */
#define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105) /* 0x0169 */
#ifdef UAP_SUPPORT
/** TLV type: AP Sleep param */
#define TLV_TYPE_AP_SLEEP_PARAM (PROPRIETARY_TLV_BASE_ID + 106) /* 0x016a */
/** TLV type: AP Inactivity Sleep param */
#define TLV_TYPE_AP_INACT_SLEEP_PARAM \
(PROPRIETARY_TLV_BASE_ID + 107) /* 0x016b */
/**TLV type: AP mgmt IE passthru mask */
#define TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK \
(PROPRIETARY_TLV_BASE_ID + 112) /* 0x0170 */
#endif /* UAP_SUPPORT */
/** TLV type : auto ds param */
#define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113) /* 0x0171 */
/** TLV type : ps param */
#define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114) /* 0x0172 */
#ifdef UAP_SUPPORT
/**TLV type: AP pairwise handshake timeout */
#define TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT \
(PROPRIETARY_TLV_BASE_ID + 117) /* 0x0175 */
/**TLV type: AP pairwise handshake retries */
#define TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES \
(PROPRIETARY_TLV_BASE_ID + 118) /* 0x0176 */
/**TLV type: AP groupwise handshake timeout */
#define TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT \
(PROPRIETARY_TLV_BASE_ID + 119) /* 0x0177 */
/**TLV type: AP groupwise handshake retries */
#define TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES \
(PROPRIETARY_TLV_BASE_ID + 120) /* 0x0178 */
#endif /* UAP_SUPPORT */
#ifdef OPCHAN
/** TLV type : OpChannel control */
#define TLV_TYPE_OPCHAN_CONTROL_DESC \
(PROPRIETARY_TLV_BASE_ID + 121) /* 0x0179 */
/** TLV type : OpChannel channel group control */
#define TLV_TYPE_OPCHAN_CHANGRP_CTRL \
(PROPRIETARY_TLV_BASE_ID + 122) /* 0x017a */
#endif /* OPCHAN */
#ifdef UAP_SUPPORT
/** TLV type: AP PS STA ageout timer */
#define TLV_TYPE_UAP_PS_STA_AGEOUT_TIMER \
(PROPRIETARY_TLV_BASE_ID + 123) /* 0x017b */
#endif /* UAP_SUPPORT */
#ifdef WIFI_DIRECT_SUPPORT
/** TLV type : p2p NOA */
#define TLV_TYPE_WIFI_DIRECT_NOA (PROPRIETARY_TLV_BASE_ID + 131) /* 0x0183 */
/** TLV type : p2p opp ps */
#define TLV_TYPE_WIFI_DIRECT_OPP_PS (PROPRIETARY_TLV_BASE_ID + 132) /* 0x0184 \
*/
#endif /* WIFI_DIRECT_SUPPORT */
/** TLV type : Action frame */
#define TLV_TYPE_IEEE_ACTION_FRAME (PROPRIETARY_TLV_BASE_ID + 140) /* 0x018c \
*/
#ifdef UAP_SUPPORT
/** TLV type : Pairwise Cipher */
#define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145) /* 0x0191 */
/** TLV type : Group Cipher */
#define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146) /* 0x0192 */
/** TLV type : BSS Status */
#define TLV_TYPE_BSS_STATUS (PROPRIETARY_TLV_BASE_ID + 147) /* 0x0193 */
#endif /* UAP_SUPPORT */
/** TLV type : TX pause TLV */
#define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 148) /* 0x0194 */
/** TLV : 20/40 coex config */
#define TLV_TYPE_2040_BSS_COEX_CONTROL \
(PROPRIETARY_TLV_BASE_ID + 152) /* 0x0198 */
/** TLV type : RXBA_SYNC */
#define TLV_TYPE_RXBA_SYNC (PROPRIETARY_TLV_BASE_ID + 153) /* 0x0199 */
#define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154) /* 0x019a */
/** TLV type: key param v2 */
#define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 156) /* 0x019c */
#ifdef WIFI_DIRECT_SUPPORT
/** TLV type : AP PSK */
#define TLV_TYPE_UAP_PSK (PROPRIETARY_TLV_BASE_ID + 168) /* 0x01a8 */
#endif /* WIFI_DIRECT_SUPPORT */
/** TLV type: MAX_MGMT_IE */
#define TLV_TYPE_MAX_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 170) /* 0x01aa */
/** TLV : Region Domain Code */
#define TLV_TYPE_REGION_DOMAIN_CODE (PROPRIETARY_TLV_BASE_ID + 171) /* 0x01ab \
*/
/** TLV type: BG scan repeat count */
#define TLV_TYPE_REPEAT_COUNT (PROPRIETARY_TLV_BASE_ID + 176) /* 0x01b0 */
#ifdef USB
/** TLV ID : USB Aggregation parameters */
#define NXP_USB_AGGR_PARAM_TLV_ID (PROPRIETARY_TLV_BASE_ID + 177) /* 0x01b1 */
#endif /* USB */
/** TLV type: ps params in hs */
#define TLV_TYPE_PS_PARAMS_IN_HS (PROPRIETARY_TLV_BASE_ID + 181) /* 0x01b5 */
/** TLV type: hs wake hold off */
#define TLV_TYPE_HS_WAKE_HOLDOFF (PROPRIETARY_TLV_BASE_ID + 182) /* 0x01b6 */
/** TLV ID for multi chan info */
#define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 183) /* 0x01b7 */
/** TLV ID for multi chan group info */
#define TLV_TYPE_MULTI_CHAN_GROUP_INFO_TLV_ID \
(PROPRIETARY_TLV_BASE_ID + 184) /* 0x01b8 */
/** TLV type : TDLS IDLE TIMEOUT */
#define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 194) /* 0x01c2 \
*/
/** TLV type : SCAN channel gap */
#define TLV_TYPE_SCAN_CHANNEL_GAP (PROPRIETARY_TLV_BASE_ID + 197) /* 0x01c5 */
/** TLV type : Channel statistics */
#define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 198) /* 0x01c6 */
/** FW VERSION tlv */
#define TLV_TYPE_FW_VER_INFO (PROPRIETARY_TLV_BASE_ID + 199) /* 0x01c7 */
/** TLV type : aggr win size */
#define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 202) /* 0x01ca \
*/
/** TLV type : scan time */
#define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 203) /* 0x01cb */
/** TLV type : BSS_MODE */
#define TLV_TYPE_BSS_MODE (PROPRIETARY_TLV_BASE_ID + 206) /* 0x01ce */
/** TLV type : Ewpa_eapol_pkt */
#define TLV_TYPE_EAPOL_PKT (PROPRIETARY_TLV_BASE_ID + 207) /* 0x01cf */
#ifdef UAP_SUPPORT
/** TLV type : AP WMM params */
#define TLV_TYPE_AP_WMM_PARAM (PROPRIETARY_TLV_BASE_ID + 208) /* 0x01d0 */
#endif /* UAP_SUPPORT */
/** TLV type : ESS scan*/
#define TLV_TYPE_ENERGYEFFICIENTSCAN \
(PROPRIETARY_TLV_BASE_ID + 218) /* 0x01da */
/** TLV type : EES Configuration */
#define TLV_TYPE_EES_CFG (PROPRIETARY_TLV_BASE_ID + 218) /* 0x01da */
/** TLV type : EES Network Configuration */
#define TLV_TYPE_EES_NET_CFG (PROPRIETARY_TLV_BASE_ID + 219) /* 0x01db */
/** TLV rssi info */
#define TLV_TYPE_RSSI_INFO (PROPRIETARY_TLV_BASE_ID + 229) /* 0x01e5 */
#define TLV_TYPE_IPV6_RA_OFFLOAD (PROPRIETARY_TLV_BASE_ID + 230) /* 0x01e6 */
/** TLV to indicate firmware only keep probe response while scan */
#define TLV_TYPE_ONLYPROBERESP (PROPRIETARY_TLV_BASE_ID + 233) /* 0x01e9 */
#define TLV_TYPE_RANDOM_MAC (PROPRIETARY_TLV_BASE_ID + 236) /* 0x01ec */
#define TLV_TYPE_CHAN_ATTR_CFG (PROPRIETARY_TLV_BASE_ID + 237) /* 0x01ed */
#define TLV_TYPE_REGION_INFO (PROPRIETARY_TLV_BASE_ID + 238) /* 0x01ee */
/** TLV type : ENABLE ROAM IE */
#define TLV_TYPE_ROAM (PROPRIETARY_TLV_BASE_ID + 245) /* 0x01f5 */
/** TLV type : AP LIST IE */
#define TLV_TYPE_APLIST (PROPRIETARY_TLV_BASE_ID + 246) /* 0x01f6 */
/** TLV type : PMK */
#define TLV_TYPE_PMK_R0 (PROPRIETARY_TLV_BASE_ID + 247) /* 0x01f7 */
/** TLV type : PMK */
#define TLV_TYPE_PMK_R0_NAME (PROPRIETARY_TLV_BASE_ID + 248) /* 0x01f8 */
/** TLV for cloud keep alive control info */
#define TLV_TYPE_CLOUD_KEEP_ALIVE (PROPRIETARY_TLV_BASE_ID + 258) /* 0x0202 */
/** TLV for cloud keep alive control info */
#define TLV_TYPE_KEEP_ALIVE_CTRL (PROPRIETARY_TLV_BASE_ID + 259) /* 0x0203 */
/** TLV for cloud keep alive packet */
#define TLV_TYPE_KEEP_ALIVE_PKT (PROPRIETARY_TLV_BASE_ID + 260) /* 0x0204 */
/** TLV type: wake up source */
#define TLV_TYPE_HS_WAKEUP_SOURCE_GPIO \
(PROPRIETARY_TLV_BASE_ID + 261) /* 0x0205 */
#define TLV_TYPE_POWER_TABLE (PROPRIETARY_TLV_BASE_ID + 262) /* 0x0206 */
/** TLV ID for DRCS TimeSlice */
#define NXP_DRCS_TIME_SLICE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 263) /* 0x0207 \
*/
/** TLV type : TRIGGER CONDITION*/
#define TLV_TYPE_ROM_TRIGGER (PROPRIETARY_TLV_BASE_ID + 264) /* 0x0208 */
/** TLV type : RETRY_COUNT*/
#define TLV_TYPE_ROM_RETRY_COUNT (PROPRIETARY_TLV_BASE_ID + 265) /* 0x0209 */
/** TLV type : BGSCAN SETTING*/
#define TLV_TYPE_ROM_BGSCAN (PROPRIETARY_TLV_BASE_ID + 266) /* 0x020a */
/** TLV type : PARA RSSI*/
#define TLV_TYPE_ROM_PARA_RSSI (PROPRIETARY_TLV_BASE_ID + 267) /* 0x020b */
/** TLV type: management filter */
#define TLV_TYPE_MGMT_FRAME_WAKEUP (PROPRIETARY_TLV_BASE_ID + 278) /* 0x0216 \
*/
/** TLV type : FW support max connection TLV */
#define TLV_TYPE_MAX_CONN (PROPRIETARY_TLV_BASE_ID + 279) /* 0x0217 */
/** TLV type: extend wakeup source */
#define TLV_TYPE_WAKEUP_EXTEND (PROPRIETARY_TLV_BASE_ID + 280) /* 0x0218 */
/** TLV type: HS antenna mode */
#define TLV_TYPE_HS_ANTMODE (PROPRIETARY_TLV_BASE_ID + 281) /* 0x0219 */
/** TLV type: robustcoex mode */
#define TLV_TYPE_ROBUSTCOEX (PROPRIETARY_TLV_BASE_ID + 283) /* 0x021b */
/** TLV type : BSSID blacklist*/
#define TLV_TYPE_BLACKLIST_BSSID (PROPRIETARY_TLV_BASE_ID + 285) /* 0x021d */
/** TLV type : BAND & RSSI*/
#define TLV_TYPE_BAND_RSSI (PROPRIETARY_TLV_BASE_ID + 286) /* 0x021e */
/** TLV type : beacon timeout */
#define TLV_TYPE_BCN_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 287) /* 0x021f */
#ifdef UAP_SUPPORT
/** TLV type : AP Tx beacon rate */
#define TLV_TYPE_UAP_TX_BEACON_RATE (PROPRIETARY_TLV_BASE_ID + 288) /* 0x0220 \
*/
#endif /* UAP_SUPPORT */
/** TLV type : KEY params*/
#define TLV_TYPE_ROAM_OFFLOAD_USER_SET_PMK \
(PROPRIETARY_TLV_BASE_ID + 291) /* 0x0223 */
/** TLV for RTT Range Request */
#define TLV_TYPE_RTT_RANGE_REQUEST (PROPRIETARY_TLV_BASE_ID + 293) /* 0x0225 \
*/
/** TLV for RTT Range Cancel */
#define TLV_TYPE_RTT_RANGE_CANCEL (PROPRIETARY_TLV_BASE_ID + 294) /* 0x0226 */
/** TLV for RTT Result */
#define TLV_TYPE_RTT_RESULT (PROPRIETARY_TLV_BASE_ID + 295) /* 0x0227 */
/** TLV for RTTResponderInfo */
#define TLV_TYPE_RTT_RESPONDER_INFO (PROPRIETARY_TLV_BASE_ID + 296) /* 0x0228 \
*/
/** TLV for RTTResponderEnCfg */
#define TLV_TYPE_RTT_RESPONDER_EN_CFG \
(PROPRIETARY_TLV_BASE_ID + 297) /* 0x0229 */
/** TLV for RTTLCICfg */
#define TLV_TYPE_RTT_LCI_CFG (PROPRIETARY_TLV_BASE_ID + 298) /* 0x022a */
/** TLV for RTTLCRCfg */
#define TLV_TYPE_RTT_LCR_CFG (PROPRIETARY_TLV_BASE_ID + 299) /* 0x022b */
#define TLV_TYPE_LL_STAT_IFACE (PROPRIETARY_TLV_BASE_ID + 300) /* 0x022c */
#define TLV_TYPE_LL_STAT_RADIO (PROPRIETARY_TLV_BASE_ID + 301) /* 0x022d */
/**TLV type : Host MLME Flag*/
#define TLV_TYPE_HOST_MLME (PROPRIETARY_TLV_BASE_ID + 307) /* 0x0233 */
#ifdef UAP_SUPPORT
/** TLV id: station flag */
#define TLV_TYPE_UAP_STA_FLAGS (PROPRIETARY_TLV_BASE_ID + 313) /* 0x0239 */
#endif /* UAP_SUPPORT */
#define TLV_TYPE_DMCS_STATUS (PROPRIETARY_TLV_BASE_ID + 314) /* 0x023a */
/** TLV type : ZERO DFS Operation */
#define TLV_TYPE_ZERO_DFS_OPERATION (PROPRIETARY_TLV_BASE_ID + 315) /* 0x023b \
*/
#if defined(PCIE9098) || defined(SDAW693) || defined(SD9098) || \
defined(USB9098) || defined(PCIE9097) || defined(USB9097) || \
defined(SDIW624) || defined(PCIEAW693) || defined(PCIEIW624) || \
defined(USBIW624) || defined(SD9097)
/* TLV type: reg type */
#define TLV_TYPE_REG_ACCESS_CTRL (PROPRIETARY_TLV_BASE_ID + 316) /* 0x023c*/
#endif
#define TLV_TYPE_POWER_TABLE_ATTR (PROPRIETARY_TLV_BASE_ID + 317) /* 0x023d */
/** TLV type: fw cap info */
#define TLV_TYPE_FW_CAP_INFO (PROPRIETARY_TLV_BASE_ID + 318) /* 0x023e */
/** TLV type : TX RATE CFG, rename from TLV_TYPE_GI_LTF_SIZE to include CMD and
* HE ER SU settings to this tlv */
#define TLV_TYPE_TX_RATE_CFG (PROPRIETARY_TLV_BASE_ID + 319) /* 0x023f */
#ifdef UAP_SUPPORT
#define TLV_TYPE_UAP_MAX_STA_CNT_PER_CHIP \
(PROPRIETARY_TLV_BASE_ID + 320) /* 0x0240 */
#endif /* UAP_SUPPORT */
/** TLV type : SAE Password */
#define TLV_TYPE_SAE_PASSWORD (PROPRIETARY_TLV_BASE_ID + 321) /* 0x0241 */
/** TLV type : DFS W53 Configuration */
#define TLV_TYPE_DFS_W53_CFG (PROPRIETARY_TLV_BASE_ID + 325) /* 0x0245 */
/** TLV type: MULTI AP Flag */
#define TLV_TYPE_MULTI_AP (PROPRIETARY_TLV_BASE_ID + 326) /* 0x0246 */
/** TLV type : AP wacp mode */
#define TLV_TYPE_UAP_WACP_MODE (PROPRIETARY_TLV_BASE_ID + 327) /* 0x0247 */
#define TLV_TYPE_PREV_BSSID (PROPRIETARY_TLV_BASE_ID + 330) /* 0x024a */
/** TLV type : SAE PWE Derivation Mode */
#define TLV_TYPE_WPA3_SAE_PWE_DERIVATION_MODE \
(PROPRIETARY_TLV_BASE_ID + 339) /* 0x0253 */
/** TLV type : GPIO TSF LATCH CONFIG */
#define TLV_TYPE_GPIO_TSF_LATCH_CONFIG \
(PROPRIETARY_TLV_BASE_ID + 340) /* 0x0254 */
/** TLV type : GPIO TSF LATCH REPORT*/
#define TLV_TYPE_GPIO_TSF_LATCH_REPORT \
(PROPRIETARY_TLV_BASE_ID + 341) /* 0x0255 */
#define NXP_ACTION_CHAN_SWITCH_ANNOUNCE \
(PROPRIETARY_TLV_BASE_ID + 342) /* 0x0256 */
#ifdef UAP_SUPPORT
#define NXP_802_11_PER_PEER_STATS_CFG_TLV_ID \
(PROPRIETARY_TLV_BASE_ID + 346) /* 0x025a */
#define NXP_802_11_PER_PEER_STATS_ENTRY_TLV_ID \
(PROPRIETARY_TLV_BASE_ID + 347) /* 0x025b */
#endif /* UAP_SUPPORT */
/** TLV type: secure boot uuid */
#define TLV_TYPE_SECURE_BOOT_UUID (PROPRIETARY_TLV_BASE_ID + 348) /* 0x025c */
#define TLV_TYPE_CLOUD_KEEP_ALIVE_ACK \
(PROPRIETARY_TLV_BASE_ID + 349) /* 0x025d */
/** TLV type: ps_ext_param */
#define TLV_TYPE_PS_EXT_PARAM (PROPRIETARY_TLV_BASE_ID + 351) /* 0x025f */
#define TLV_TYPE_MCLIENT_FW_CAPS (PROPRIETARY_TLV_BASE_ID + 352) /* 0x0260 */
#define NXP_CSI_MONITOR_TLV_ID (PROPRIETARY_TLV_BASE_ID + 354) /* 0x0262 */
#endif /* !MLAN_TLV_IDS_H_ */

View file

@ -3,7 +3,7 @@
* @brief This file contains the handling of AP mode command and event
*
*
* Copyright 2009-2023 NXP
* Copyright 2009-2024 NXP
*
* This software file (the File) is distributed by NXP
* under the terms of the GNU General Public License Version 2, June 1991
@ -190,6 +190,10 @@ static mlan_status uap_process_cmdresp_error(mlan_private *pmpriv,
mlan_ioctl_req *pioctl_buf)
{
mlan_adapter *pmadapter = pmpriv->adapter;
#ifdef STA_SUPPORT
pmlan_ioctl_req pscan_ioctl_req = MNULL;
mlan_callbacks *pcb = MNULL;
#endif
#if defined(USB)
t_u8 i;
#endif
@ -308,6 +312,26 @@ static mlan_status uap_process_cmdresp_error(mlan_private *pmpriv,
case HostCmd_CMD_802_11_SCAN_EXT:
if (resp->result == HostCmd_RESULT_BUSY)
pmadapter->dbg.num_scan_err++;
/* Cancel all pending scan command */
wlan_flush_scan_queue(pmadapter);
pcb = (pmlan_callbacks)&pmadapter->callbacks;
wlan_request_cmd_lock(pmadapter);
pmadapter->scan_processing = MFALSE;
pscan_ioctl_req = pmadapter->pscan_ioctl_req;
pmadapter->pscan_ioctl_req = MNULL;
/* Need to indicate IOCTL complete */
if (pscan_ioctl_req) {
pscan_ioctl_req->status_code = MLAN_ERROR_NO_ERROR;
/* Indicate ioctl complete */
pcb->moal_ioctl_complete(
pmadapter->pmoal_handle,
(pmlan_ioctl_req)pscan_ioctl_req,
MLAN_STATUS_SUCCESS);
}
wlan_release_cmd_lock(pmadapter);
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_SCAN_REPORT, MNULL);
break;
#endif
default:
@ -1839,7 +1863,7 @@ static mlan_status wlan_uap_cmd_sys_configure(pmlan_private pmpriv,
tlv_chan_switch = (MrvlIEtypes_action_chan_switch_t *)
sys_config->tlv_buffer;
tlv_chan_switch->header.type = wlan_cpu_to_le16(
MRVL_ACTION_CHAN_SWITCH_ANNOUNCE);
NXP_ACTION_CHAN_SWITCH_ANNOUNCE);
tlv_chan_switch->mode = bss->param.chanswitch.mode;
tlv_chan_switch->num_pkt =
bss->param.chanswitch.chan_switch_count;
@ -4528,6 +4552,18 @@ static mlan_status wlan_uap_cmd_add_station(pmlan_private pmpriv,
}
}
if (sta_ptr->is_multi_ap) {
tlv = (MrvlIEtypesHeader_t *)pos;
tlv->type = wlan_cpu_to_le16(VENDOR_SPECIFIC_221);
tlv->len = sta_ptr->multi_ap_ie.ieee_hdr.len;
pos += sizeof(MrvlIEtypesHeader_t);
memcpy_ext(pmadapter, pos, (t_u8 *)&sta_ptr->multi_ap_ie.data,
tlv->len, tlv->len);
travel_len += sizeof(MrvlIEtypesHeader_t) + tlv->len;
tlv->len = wlan_cpu_to_le16(tlv->len);
}
if (sta_ptr->is_11n_enabled) {
if (pmpriv->uap_channel <= 14)
sta_ptr->bandmode = BAND_GN;
@ -5061,6 +5097,9 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
ret = wlan_cmd_range_ext(pmpriv, cmd_ptr, cmd_action,
pdata_buf);
break;
case HostCmd_CMD_TWT_CFG:
ret = wlan_cmd_twt_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
break;
case HostCmd_CMD_RX_ABORT_CFG:
ret = wlan_cmd_rxabortcfg(pmpriv, cmd_ptr, cmd_action,
pdata_buf);
@ -5506,6 +5545,9 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
case HostCmd_CMD_RANGE_EXT:
ret = wlan_ret_range_ext(pmpriv, resp, pioctl_buf);
break;
case HostCmd_CMD_TWT_CFG:
ret = wlan_ret_twt_report(pmpriv, resp, pioctl_buf);
break;
case HostCmd_CMD_RX_ABORT_CFG:
ret = wlan_ret_rxabortcfg(pmpriv, resp, pioctl_buf);
break;

View file

@ -2127,6 +2127,9 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
pget_info->param.fw_info.force_reg = MTRUE;
else
pget_info->param.fw_info.force_reg = MFALSE;
/**country code from OTP */
pget_info->param.fw_info.fw_country_code =
pmadapter->fw_country_code;
pget_info->param.fw_info.fw_supplicant_support =
IS_FW_SUPPORT_SUPPLICANT(pmadapter) ? 0x01 :
0x00;

View file

@ -106,51 +106,6 @@ static mlan_status wlan_upload_uap_rx_packet(pmlan_adapter pmadapter,
return ret;
}
/**
* @brief This function will check if unicast packet need be dropped
*
* @param priv A pointer to mlan_private
* @param mac mac address to find in station list table
*
* @return MLAN_STATUS_FAILURE -- drop packet, otherwise forward to
* network stack
*/
static mlan_status wlan_check_unicast_packet(mlan_private *priv, t_u8 *mac)
{
int j;
sta_node *sta_ptr = MNULL;
pmlan_adapter pmadapter = priv->adapter;
pmlan_private pmpriv = MNULL;
t_u8 pkt_type = 0;
mlan_status ret = MLAN_STATUS_SUCCESS;
ENTER();
for (j = 0; j < MLAN_MAX_BSS_NUM; ++j) {
pmpriv = pmadapter->priv[j];
if (pmpriv) {
if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA)
continue;
sta_ptr = wlan_get_station_entry(pmpriv, mac);
if (sta_ptr) {
if (pmpriv == priv)
pkt_type = PKT_INTRA_UCAST;
else
pkt_type = PKT_INTER_UCAST;
break;
}
}
}
if ((pkt_type == PKT_INTRA_UCAST) &&
(priv->pkt_fwd & PKT_FWD_INTRA_UCAST)) {
PRINTM(MDATA, "Drop INTRA_UCAST packet\n");
ret = MLAN_STATUS_FAILURE;
} else if ((pkt_type == PKT_INTER_UCAST) &&
(priv->pkt_fwd & PKT_FWD_INTER_UCAST)) {
PRINTM(MDATA, "Drop INTER_UCAST packet\n");
ret = MLAN_STATUS_FAILURE;
}
LEAVE();
return ret;
}
/********************************************************
Global Functions
********************************************************/
@ -170,6 +125,7 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
t_u32 pkt_type;
t_u32 tx_control;
t_u8 dst_mac[MLAN_MAC_ADDR_LENGTH];
tx_ctrl *ctrl;
ENTER();
@ -313,6 +269,11 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
mc_ctrl->mc_seq = wlan_cpu_to_le16(pmbuf->u.mc_tx_info.seq_num);
}
if (pmbuf->flags & MLAN_BUF_FLAG_LLDE_PKT_FILTER) {
ctrl = (tx_ctrl *)&plocal_tx_pd->tx_control;
ctrl->llde_pkt_filter = MTRUE;
}
endian_convert_TxPD(plocal_tx_pd);
/* Adjust the data offset and length to include TxPD in pmbuf */
@ -749,13 +710,6 @@ mlan_status wlan_uap_recv_packet(mlan_private *priv, pmlan_buffer pmbuf)
MNULL);
}
goto done;
} else if (MLAN_STATUS_FAILURE ==
wlan_check_unicast_packet(
priv, prx_pkt->eth803_hdr.dest_addr)) {
/* drop packet */
PRINTM(MDATA, "Drop AMSDU dest " MACSTR "\n",
MAC2STR(prx_pkt->eth803_hdr.dest_addr));
goto done;
}
}
upload:
@ -957,14 +911,6 @@ mlan_status wlan_process_uap_rx_packet(mlan_private *priv, pmlan_buffer pmbuf)
wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING,
MNULL);
goto done;
} else if (MLAN_STATUS_FAILURE ==
wlan_check_unicast_packet(
priv, prx_pkt->eth803_hdr.dest_addr)) {
PRINTM(MDATA, "Drop Pkts: Rx dest " MACSTR "\n",
MAC2STR(prx_pkt->eth803_hdr.dest_addr));
pmbuf->status_code = MLAN_ERROR_PKT_INVALID;
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
goto done;
}
}

View file

@ -1389,6 +1389,7 @@ static mlan_status wlan_usb_evt_complete(pmlan_adapter pmadapter,
mlan_buffer *pmbuf, mlan_status status)
{
ENTER();
pmadapter->event_received = MFALSE;
pmadapter->event_cause = 0;
pmadapter->pmlan_buffer_event = MNULL;
pmadapter->callbacks.moal_recv_complete(pmadapter->pmoal_handle, pmbuf,

View file

@ -648,6 +648,8 @@ typedef enum {
#define MLAN_BUF_FLAG_MC_AGGR_PKT MBIT(17)
#define MLAN_BUF_FLAG_LLDE_PKT_FILTER MBIT(19)
#ifdef DEBUG_LEVEL1
/** Debug level bit definition */
#define MMSG MBIT(0)
@ -882,7 +884,6 @@ typedef enum _mlan_event_id {
MLAN_EVENT_ID_DRV_ADDBA_TIMEOUT = 0x80000031,
#ifdef PCIE
MLAN_EVENT_ID_DRV_DEFER_RX_DATA = 0x80000032,
MLAN_EVENT_ID_DRV_DEFER_RX_EVENT = 0x80000033,
MLAN_EVENT_ID_DRV_DEFER_CMDRESP = 0x80000034,
MLAN_EVENT_ID_DRV_DEFER_TX_COMPLTE = 0x80000035,
MLAN_EVENT_ID_DRV_DELAY_TX_COMPLETE = 0x80000036,

View file

@ -29,6 +29,9 @@ Change log:
#ifndef _MLAN_IEEE_H_
#define _MLAN_IEEE_H_
/** WLAN header size */
#define IEEE80211_HEADER_SIZE 24
/** FIX IES size in beacon buffer */
#define WLAN_802_11_FIXED_IE_SIZE 12
/** WLAN supported rates */
@ -892,8 +895,9 @@ typedef MLAN_PACK_START enum _IEEEtypes_WMM_Tspec_Action_e {
#define NAN_SRVC_CTRL_OFFSET 11
/** Service control field */
#define NAN_SRV_CTRL_TYPE_MASK (BIT(0) | BIT(1))
/** NAN publish frame */
/** NAN service control type */
#define NAN_PUBLISH 0
#define NAN_FOLLOW_UP 2
/** NAN Attribute ID list */
typedef MLAN_PACK_START enum _Nan_AttrId_e {

View file

@ -1980,6 +1980,8 @@ typedef struct _mlan_fw_info {
/* FW support tx data by cmd */
t_u8 cmd_tx_data;
t_u8 sec_rgpower;
/*country code from OTP*/
t_u16 fw_country_code;
} mlan_fw_info, *pmlan_fw_info;
/** Version string buffer length */
@ -2406,6 +2408,14 @@ typedef struct _mlan_debug_info {
t_u32 mlan_rx_processing;
/** rx pkts queued */
t_u32 rx_pkts_queued;
#ifdef PCIE
/** process pcie event interrupt */
t_u8 pcie_event_processing;
/** process pcie tx interrupt */
t_u8 pcie_tx_processing;
/** process pcie rx interrupt */
t_u8 pcie_rx_processing;
#endif
/** Number of host to card command failures */
t_u32 num_cmd_host_to_card_failure;
/** Number of host to card sleep confirm failures */
@ -4056,6 +4066,8 @@ typedef struct _mlan_ds_11ax_cfg {
#define MLAN_11AX_TWT_TEARDOWN_SUBID 0x115
#define MLAN_11AX_TWT_REPORT_SUBID 0x116
#define MLAN_11AX_TWT_INFORMATION_SUBID 0x119
#define MLAN_11AX_BTWT_AP_CONFIG_SUBID 0x120
#define BTWT_AGREEMENT_MAX 5
#define MRVL_DOT11AX_ENABLE_SR_TLV_ID (PROPRIETARY_TLV_BASE_ID + 322)
#define MRVL_DOT11AX_OBSS_PD_OFFSET_TLV_ID (PROPRIETARY_TLV_BASE_ID + 323)
@ -4199,6 +4211,30 @@ typedef struct _mlan_ds_11ax_cmd_cfg {
} param;
} mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg;
/** Type definition of mlan_ds_11ax_llde_pkt_filter_cmd for
* mlan_ds_11ax_llde_pkt_filter_cmd_cfg */
typedef struct _mlan_ds_11ax_llde_pkt_filter_cmd {
/** 0: no preference, 1: iphone (carplay IE in assoc)*/
t_u8 device_filter;
/** make traffic to specific mac address to be high priority, Can have
* max 2 mac address entries */
t_u8 macfilter1[MLAN_MAC_ADDR_LENGTH];
/** make traffic to specific mac address to be high priority, other mac
* filter */
t_u8 macfilter2[MLAN_MAC_ADDR_LENGTH];
/** high priority data packet type. 0: All traffic, 1: ping, 2: TCP ACK,
* 4: TCP Data, 8: UDP */
t_u8 packet_type;
} mlan_ds_11ax_llde_pkt_filter_cmd, *pmlan_ds_11ax_llde_pkt_filter_cmd;
/** Type definition of BTWT_set*/
typedef struct MLAN_PACK_START {
t_u8 btwtId;
t_u16 Ap_Bcast_Mantissa;
t_u8 Ap_Bcast_Exponent;
t_u8 nominalwake;
} MLAN_PACK_END BTWT_set;
/** Type definition of mlan_ds_twt_setup for MLAN_OID_11AX_TWT_CFG */
typedef struct MLAN_PACK_START _mlan_ds_twt_setup {
/** Implicit, 0: TWT session is explicit, 1: Session is implicit */
@ -4264,6 +4300,17 @@ typedef struct MLAN_PACK_START _mlan_ds_twt_information {
t_u32 suspend_duration;
} MLAN_PACK_END mlan_ds_twt_information, *pmlan_ds_twt_information;
/** Type definition of mlan_ds_btwt_ap_config for MLAN_OID_11AX_TWT_CFG */
typedef struct MLAN_PACK_START _mlan_ds_btwt_ap_config {
/** TWT Flow Identifier. Range: [0-7] */
t_u8 ap_bcast_bet_sta_wait;
t_u16 Ap_Bcast_Offset;
t_u8 bcastTWTLI;
t_u8 count;
BTWT_set BTWT_sets[BTWT_AGREEMENT_MAX];
} MLAN_PACK_END mlan_ds_btwt_ap_config, *pmlan_ds_btwt_ap_config;
/** Type definition of mlan_ds_twtcfg for MLAN_OID_11AX_TWT_CFG */
typedef struct MLAN_PACK_START _mlan_ds_twtcfg {
/** Sub-command */
@ -4283,6 +4330,10 @@ typedef struct MLAN_PACK_START _mlan_ds_twtcfg {
* MLAN_11AX_TWT_INFORMATION_SUBID
*/
mlan_ds_twt_information twt_information;
/** BTWT AP config for Sub ID:
* MLAN_11AX_BTWT_AP_CONFIG_SUBID_SUBID
*/
mlan_ds_btwt_ap_config btwt_ap_config;
} param;
} MLAN_PACK_END mlan_ds_twtcfg, *pmlan_ds_twtcfg;
@ -5783,6 +5834,15 @@ typedef MLAN_PACK_START struct _mlan_ds_csi_params {
t_u8 csi_filter_cnt;
/** Chip ID */
t_u8 chip_id;
/** band config */
t_u8 band_config;
/** Channel num */
t_u8 channel;
/** Enable getting CSI data on special channel */
t_u8 csi_monitor_enable;
/** CSI data received in cfg channel with mac addr filter, not only RA
* is us or other*/
t_u8 ra4us;
/** CSI filters */
mlan_csi_filter_t csi_filter[CSI_FILTER_MAX];
} MLAN_PACK_END mlan_ds_csi_params;

View file

@ -2666,7 +2666,7 @@ static t_u8 woal_check_mgmt_tx_channel(moal_private *priv,
*/
static int woal_mgmt_tx(moal_private *priv, const u8 *buf, size_t len,
struct ieee80211_channel *chan, u64 cookie,
unsigned int wait)
unsigned int wait, bool send_tx_expired)
{
int ret = 0;
pmlan_buffer pmbuf = NULL;
@ -2688,6 +2688,11 @@ static int woal_mgmt_tx(moal_private *priv, const u8 *buf, size_t len,
ENTER();
if (len < IEEE80211_HEADER_SIZE) {
PRINTM(MERROR, "Invalid tx mgmt info buffer length\n");
goto done;
}
/* pkt_type + tx_control */
#define HEADER_SIZE 8
packet_len = (t_u16)(len + MLAN_MAC_ADDR_LENGTH);
@ -2773,6 +2778,7 @@ static int woal_mgmt_tx(moal_private *priv, const u8 *buf, size_t len,
tx_info->tx_cookie = cookie;
tx_info->tx_skb = skb;
tx_info->tx_seq_num = tx_seq_num;
tx_info->send_tx_expired = send_tx_expired;
if ((priv->bss_role == MLAN_BSS_ROLE_UAP) &&
(priv->phandle->remain_on_channel && !wait))
tx_info->cancel_remain_on_channel =
@ -2897,7 +2903,7 @@ done:
*
* @return true -- success, otherwise false
*/
static BOOLEAN is_nan_publish(const t_u8 *buf)
static BOOLEAN is_nan_action_frame(const t_u8 *buf)
{
t_u8 nan_sdf_oui[4] = {0x50, 0x6f, 0x9a, 0x13};
t_u8 nan_attr_id, nan_srv_ctrl_type;
@ -2906,9 +2912,13 @@ static BOOLEAN is_nan_publish(const t_u8 *buf)
nan_attr_id = *(buf + NAN_SDA_OFFSET);
nan_srv_ctrl_type =
*(buf + NAN_SDA_OFFSET + NAN_SRVC_CTRL_OFFSET);
PRINTM(MINFO, "NAN: attribute%x service ctrl type%x\n",
nan_attr_id, nan_srv_ctrl_type);
if (nan_attr_id == NAN_ATTR_SDA &&
(nan_srv_ctrl_type & NAN_SRV_CTRL_TYPE_MASK) ==
NAN_PUBLISH) {
((nan_srv_ctrl_type & NAN_SRV_CTRL_TYPE_MASK) ==
NAN_PUBLISH ||
(nan_srv_ctrl_type & NAN_SRV_CTRL_TYPE_MASK) ==
NAN_FOLLOW_UP)) {
return MTRUE;
}
}
@ -3072,6 +3082,8 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
t_u8 category, action;
#endif
bool send_tx_expired = false;
ENTER();
if (buf == NULL || len == 0) {
@ -3259,25 +3271,25 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
if (ieee80211_is_action(
if (len > sizeof(moal_802_11_action_header) &&
ieee80211_is_action(
((struct ieee80211_mgmt *)buf)->frame_control)) {
category = *(buf + sizeof(moal_802_11_action_header) - 1);
action = *(buf + sizeof(moal_802_11_action_header));
if (category == IEEE_MGMT_ACTION_CATEGORY_PUBLIC &&
action == IEEE_PUBLIC_ACTION_CATEGORY_VENDOR_SPECIFIC &&
is_nan_publish(buf + sizeof(moal_802_11_action_header))) {
priv->phandle->nan_cookie = *cookie;
if (priv->phandle->is_nan_timer_set) {
woal_cancel_timer(&priv->phandle->nan_timer);
priv->phandle->is_nan_timer_set = MFALSE;
}
priv->phandle->is_nan_timer_set = MTRUE;
woal_mod_timer(&priv->phandle->nan_timer, wait);
is_nan_action_frame(buf +
sizeof(moal_802_11_action_header))) {
PRINTM(MINFO,
"NAN: set tx duration expired for cookie=%llx\n",
*cookie);
send_tx_expired = true;
}
}
#endif
ret = woal_mgmt_tx(priv, buf, len, chan, *cookie, wait);
ret = woal_mgmt_tx(priv, buf, len, chan, *cookie, wait,
send_tx_expired);
done:
LEAVE();
@ -5223,11 +5235,12 @@ void woal_cfg80211_notify_channel(moal_private *priv,
#elif KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
mutex_lock(&priv->wdev->mtx);
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
cfg80211_ch_switch_notify(priv->netdev, &chandef, 0);
#elif CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && \
CFG80211_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
cfg80211_ch_switch_notify(priv->netdev, &chandef, 0, 0);
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && IMX_ANDROID_13))
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && \
IMX_ANDROID_13)) && \
CFG80211_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
cfg80211_ch_switch_notify(priv->netdev, &chandef, 0, 0);
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || \
IMX_ANDROID_13 || IMX_ANDROID_12_BACKPORT)

View file

@ -3,7 +3,7 @@
* @brief This file contains functions for debug proc file.
*
*
* Copyright 2008-2022 NXP
* Copyright 2008-2024 NXP
*
* This software file (the File) is distributed by NXP
* under the terms of the GNU General Public License Version 2, June 1991
@ -78,6 +78,14 @@ static struct debug_data items[] = {
item_addr(mlan_rx_processing), INFO_ADDR},
{"rx_pkts_queued", item_size(rx_pkts_queued), item_addr(rx_pkts_queued),
INFO_ADDR},
#ifdef PCIE
{"pcie_event_processing", item_size(pcie_event_processing),
item_addr(pcie_event_processing), INFO_ADDR},
{"pcie_rx_processing", item_size(pcie_rx_processing),
item_addr(pcie_rx_processing), INFO_ADDR},
{"pcie_tx_processing", item_size(pcie_tx_processing),
item_addr(pcie_tx_processing), INFO_ADDR},
#endif
{"wmm_ac_vo", item_size(wmm_ac_vo), item_addr(wmm_ac_vo), INFO_ADDR},
{"wmm_ac_vi", item_size(wmm_ac_vi), item_addr(wmm_ac_vi), INFO_ADDR},
{"wmm_ac_be", item_size(wmm_ac_be), item_addr(wmm_ac_be), INFO_ADDR},
@ -286,6 +294,14 @@ static struct debug_data uap_items[] = {
item_addr(mlan_rx_processing), INFO_ADDR},
{"rx_pkts_queued", item_size(rx_pkts_queued), item_addr(rx_pkts_queued),
INFO_ADDR},
#ifdef PCIE
{"pcie_event_processing", item_size(pcie_event_processing),
item_addr(pcie_event_processing), INFO_ADDR},
{"pcie_rx_processing", item_size(pcie_rx_processing),
item_addr(pcie_rx_processing), INFO_ADDR},
{"pcie_tx_processing", item_size(pcie_tx_processing),
item_addr(pcie_tx_processing), INFO_ADDR},
#endif
{"wmm_ac_vo", item_size(wmm_ac_vo), item_addr(wmm_ac_vo), INFO_ADDR},
{"wmm_ac_vi", item_size(wmm_ac_vi), item_addr(wmm_ac_vi), INFO_ADDR},
{"wmm_ac_be", item_size(wmm_ac_be), item_addr(wmm_ac_be), INFO_ADDR},
@ -1091,6 +1107,7 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
seq_printf(sfp, "tcp_ack_drop_cnt=%d\n", priv->tcp_ack_drop_cnt);
seq_printf(sfp, "tcp_ack_cnt=%d\n", priv->tcp_ack_cnt);
seq_printf(sfp, "tcp_ack_payload=%d\n", priv->tcp_ack_payload);
seq_printf(sfp, "tcp_sess_cnt=%d\n", priv->tcp_sess_cnt);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
for (i = 0; i < 4; i++)
seq_printf(sfp, "wmm_tx_pending[%d]:%d\n", i,

View file

@ -428,6 +428,101 @@ error:
return ret;
}
#define MAC_STRING_LENGTH 17
/**
* @brief extracts llde pkt filter specific parameters from llde.conf file
*
*
* @param priv Pointer to the mlan_private driver data struct
* @param respbuf A pointer to response buffer
* @param param_buf A pointer to mlan_ds_11ax_llde_pkt_filter_cmd struct
*
* @return returns 0
*/
static int woal_set_priv_11axcmdcfg_llde_pkt_filer_cmd(
moal_private *priv, t_u8 *respbuf,
mlan_ds_11ax_llde_pkt_filter_cmd *param_buf)
{
t_u8 *llde_pkt_filter_pos = NULL;
int llde_cfg_len = 0, llde_pkt_filter_len = 0;
t_u8 mac_pos[MAC_STRING_LENGTH] = {0};
t_u8 peer_mac[ETH_ALEN] = {0};
t_u8 convert_int[2] = {0};
int tmp_val = 0;
t_u8 *tmp_pos = NULL;
/* if llde device_filter or macfilter is not present in config file then
* return */
if (strstr(respbuf, "device_filter") == NULL) {
if (strstr(respbuf, "macfilter") == NULL)
return 0;
}
llde_pkt_filter_pos = strstr(respbuf, "device_filter");
if (llde_pkt_filter_pos) {
llde_cfg_len =
(strlen(respbuf) - (strlen(llde_pkt_filter_pos) + 1));
llde_pkt_filter_len = strlen(llde_pkt_filter_pos);
}
llde_pkt_filter_pos = llde_pkt_filter_pos + strlen("device_filter=");
if (llde_pkt_filter_pos) {
moal_memcpy_ext(priv->phandle, (t_u8 *)convert_int,
(t_u8 *)llde_pkt_filter_pos, 1, 1);
(void)woal_atoi(&tmp_val, convert_int);
param_buf->device_filter = tmp_val;
}
llde_pkt_filter_pos = strstr(respbuf, "macfilter1");
if (llde_pkt_filter_pos)
llde_pkt_filter_pos =
llde_pkt_filter_pos + strlen("macfilter1=");
tmp_pos = llde_pkt_filter_pos + MAC_STRING_LENGTH;
if (llde_pkt_filter_pos && tmp_pos) {
moal_memcpy_ext(priv->phandle, (t_u8 *)mac_pos,
(t_u8 *)llde_pkt_filter_pos, MAC_STRING_LENGTH,
MAC_STRING_LENGTH);
woal_mac2u8(peer_mac, mac_pos);
moal_memcpy_ext(priv->phandle, (t_u8 *)&param_buf->macfilter1,
(t_u8 *)peer_mac, ETH_ALEN, ETH_ALEN);
}
llde_pkt_filter_pos = strstr(respbuf, "macfilter2");
if (llde_pkt_filter_pos)
llde_pkt_filter_pos =
llde_pkt_filter_pos + strlen("macfilter2=");
tmp_pos = llde_pkt_filter_pos + MAC_STRING_LENGTH;
if (llde_pkt_filter_pos && tmp_pos) {
moal_memcpy_ext(priv->phandle, (t_u8 *)mac_pos,
(t_u8 *)llde_pkt_filter_pos, MAC_STRING_LENGTH,
MAC_STRING_LENGTH);
woal_mac2u8(peer_mac, mac_pos);
moal_memcpy_ext(priv->phandle, (t_u8 *)&param_buf->macfilter2,
(t_u8 *)peer_mac, ETH_ALEN, ETH_ALEN);
}
llde_pkt_filter_pos = strstr(respbuf, "packet_type");
if (llde_pkt_filter_pos)
llde_pkt_filter_pos =
llde_pkt_filter_pos + strlen("packet_type=");
if (llde_pkt_filter_pos) {
moal_memcpy_ext(priv->phandle, (t_u8 *)convert_int,
(t_u8 *)llde_pkt_filter_pos, 1, 1);
(void)woal_atoi(&tmp_val, convert_int);
param_buf->packet_type = tmp_val;
}
/* remove llde_pkt_filter parameters from respbuf as they are parsed
above, respbuf will contain llde cfg parameters only which will be later
parsed via parse_arguments() */
memset(respbuf + llde_cfg_len, 0, llde_pkt_filter_len);
LEAVE();
return 0;
}
/**
* @brief configure 11ax HE capability or HE operation
*
@ -444,13 +539,24 @@ static int woal_setget_priv_11axcmdcfg(moal_private *priv, t_u8 *respbuf,
{
mlan_ioctl_req *req = NULL;
mlan_ds_11ax_cmd_cfg *cfg = NULL;
mlan_ds_11ax_llde_pkt_filter_cmd llde_pkt_filter = {0};
int ret = 0;
mlan_status status = MLAN_STATUS_SUCCESS;
int header_len = 0, user_data_len = 0;
int data[10] = {0};
int llde_total_len = 0, alloc_len = 0, mlan_ds_11ax_cmd_cfg_header = 0;
ENTER();
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11ax_cmd_cfg));
llde_total_len = sizeof(mlan_ds_11ax_llde_cmd) +
sizeof(mlan_ds_11ax_llde_pkt_filter_cmd);
mlan_ds_11ax_cmd_cfg_header =
sizeof(t_u32 /*sub_command*/) + sizeof(t_u32 /*sub_id*/);
llde_total_len += mlan_ds_11ax_cmd_cfg_header;
alloc_len = sizeof(mlan_ds_11ax_cmd_cfg) > llde_total_len ?
sizeof(mlan_ds_11ax_cmd_cfg) :
llde_total_len;
req = woal_alloc_mlan_ioctl_req(alloc_len);
if (req == NULL) {
ret = -ENOMEM;
goto done;
@ -462,6 +568,9 @@ static int woal_setget_priv_11axcmdcfg(moal_private *priv, t_u8 *respbuf,
cfg = (mlan_ds_11ax_cmd_cfg *)req->pbuf;
cfg->sub_command = MLAN_OID_11AX_CMD_CFG;
woal_set_priv_11axcmdcfg_llde_pkt_filer_cmd(priv, respbuf,
&llde_pkt_filter);
parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data),
&user_data_len);
PRINTM(MINFO, "data_len=%d,data=%d,%d,%d\n", user_data_len, data[0],
@ -526,6 +635,17 @@ static int woal_setget_priv_11axcmdcfg(moal_private *priv, t_u8 *respbuf,
cfg->param.llde_cfg.pollinterval = data[7];
cfg->param.llde_cfg.txOpDuration = data[8];
cfg->param.llde_cfg.llde_ctrl = data[9];
/* append llde packet filter parameters to ioctl buffer */
if (cfg->param.llde_cfg.llde) {
moal_memcpy_ext(
priv->phandle,
req->pbuf + mlan_ds_11ax_cmd_cfg_header +
sizeof(mlan_ds_11ax_llde_cmd),
&llde_pkt_filter,
sizeof(mlan_ds_11ax_llde_pkt_filter_cmd),
sizeof(mlan_ds_11ax_llde_pkt_filter_cmd));
}
break;
case MLAN_11AXCMD_CFG_ID_RUTXPWR:
cfg->sub_id = MLAN_11AXCMD_RUTXSUBPWR_SUBID;
@ -7673,7 +7793,20 @@ done:
}
/**
* @brief Get TX/RX histogram statistic
* @brief check if 6GHz sub band supported
*
* @param priv A pointer to moal_private structure
*
* @return if supported return 1; otherwise 0
*/
static t_u8 woal_is_6g_sub_band_allowed(moal_private *priv)
{
t_u8 ret = MFALSE;
return ret;
}
/**
* @brief Get Tx power limit table from the FW
*
* @param priv A pointer to moal_private structure
* @param respbuf A pointer to response buffer
@ -7706,6 +7839,12 @@ static int woal_priv_get_txpwrlimit(moal_private *priv, t_u8 *respbuf,
ret = -EINVAL;
goto done;
}
if (trpc_cfg->sub_band >= 0x20 && trpc_cfg->sub_band <= 0x27) {
if (!woal_is_6g_sub_band_allowed(priv)) {
ret = -EINVAL;
goto done;
}
}
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
if (req == NULL) {
ret = -ENOMEM;
@ -11507,6 +11646,8 @@ static int woal_priv_net_monitor_ioctl(moal_private *priv, t_u8 *respbuf,
data[0] = net_mon->enable_net_mon;
data[1] = net_mon->filter_flag;
data[2] = net_mon->band;
if (handle->mon_if)
data[2] = handle->mon_if->band_chan_cfg.band;
data[3] = net_mon->channel;
data[4] = net_mon->chan_bandwidth;
data_length = 5;
@ -15016,10 +15157,17 @@ static int woal_priv_csi_cmd(moal_private *priv, t_u8 *respbuf,
cfg->param.csi_params.csi_enable = data_ptr->csi_enable;
if (data_ptr->csi_enable == 1) {
cfg->param.csi_params.head_id = data_ptr->head_id;
cfg->param.csi_params.tail_id = data_ptr->tail_id;
cfg->param.csi_params.head_id =
woal_cpu_to_le32(data_ptr->head_id);
cfg->param.csi_params.tail_id =
woal_cpu_to_le32(data_ptr->tail_id);
cfg->param.csi_params.csi_filter_cnt = data_ptr->csi_filter_cnt;
cfg->param.csi_params.chip_id = data_ptr->chip_id;
cfg->param.csi_params.band_config = data_ptr->band_config;
cfg->param.csi_params.channel = data_ptr->channel;
cfg->param.csi_params.csi_monitor_enable =
data_ptr->csi_monitor_enable;
cfg->param.csi_params.ra4us = data_ptr->ra4us;
if (cfg->param.csi_params.csi_filter_cnt > CSI_FILTER_MAX)
cfg->param.csi_params.csi_filter_cnt = CSI_FILTER_MAX;
moal_memcpy_ext(priv->phandle, cfg->param.csi_params.csi_filter,
@ -15312,6 +15460,118 @@ done:
return ret;
}
/**
* @brief Configure BTWT AP config
*
* @param priv Pointer to the mlan_private driver data struct
* @param respbuf A pointer to response buffer
* @param len Length used
* @param respbuflen Available length of response buffer
*
* @return Number of bytes written if successful else negative
* value
*/
static int woal_priv_btwt_ap_config_set(moal_private *priv, t_u8 *respbuf,
t_u8 len, t_u32 respbuflen)
{
mlan_ioctl_req *req = NULL;
mlan_ds_twtcfg *cfg = NULL;
int ret = 0;
mlan_status status = MLAN_STATUS_SUCCESS;
ENTER();
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_twtcfg));
if (req == NULL) {
PRINTM(MERROR, "Failed to allocate ioctl_req!\n");
ret = -ENOMEM;
goto done;
}
req->req_id = MLAN_IOCTL_11AX_CFG;
req->action = MLAN_ACT_SET;
cfg = (mlan_ds_twtcfg *)req->pbuf;
cfg->sub_command = MLAN_OID_11AX_TWT_CFG;
cfg->sub_id = MLAN_11AX_BTWT_AP_CONFIG_SUBID;
if (len) {
moal_memcpy_ext(priv->phandle,
(t_u8 *)&cfg->param.btwt_ap_config, respbuf,
len, sizeof(mlan_ds_btwt_ap_config));
}
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
if (status != MLAN_STATUS_SUCCESS) {
PRINTM(MERROR, "woal_request_ioctl failed!\n");
ret = -EFAULT;
goto done;
}
ret = sizeof(mlan_ds_btwt_ap_config);
done:
if (status != MLAN_STATUS_PENDING) {
kfree(req);
}
LEAVE();
return ret;
}
/**
* @brief Configure BTWT AP config
*
* @param priv Pointer to the mlan_private driver data struct
* @param respbuf A pointer to response buffer
* @param len Length used
* @param respbuflen Available length of response buffer
*
* @return Number of bytes written if successful else negative
* value
*/
static int woal_priv_btwt_ap_config_get(moal_private *priv, t_u8 *respbuf,
t_u8 len, t_u32 respbuflen)
{
mlan_ioctl_req *req = NULL;
mlan_ds_twtcfg *cfg = NULL;
int ret = 0;
mlan_status status = MLAN_STATUS_SUCCESS;
ENTER();
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_twtcfg));
if (req == NULL) {
PRINTM(MERROR, "Failed to allocate ioctl_req!\n");
ret = -ENOMEM;
goto done;
}
req->req_id = MLAN_IOCTL_11AX_CFG;
req->action = MLAN_ACT_GET;
cfg = (mlan_ds_twtcfg *)req->pbuf;
cfg->sub_command = MLAN_OID_11AX_TWT_CFG;
cfg->sub_id = MLAN_11AX_BTWT_AP_CONFIG_SUBID;
if (len) {
moal_memcpy_ext(priv->phandle,
(t_u8 *)&cfg->param.btwt_ap_config, respbuf,
len, sizeof(mlan_ds_btwt_ap_config));
}
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
if (status != MLAN_STATUS_SUCCESS) {
PRINTM(MERROR, "woal_request_ioctl failed!\n");
ret = -EFAULT;
goto done;
}
ret = sizeof(mlan_ds_btwt_ap_config);
done:
if (status != MLAN_STATUS_PENDING) {
kfree(req);
}
LEAVE();
return ret;
}
#ifdef WIFI_DIRECT_SUPPORT
#if defined(UAP_CFG80211)
/**
@ -21410,6 +21670,32 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
len += strlen(PRIV_CMD_TWT_INFORMATION) +
strlen(CMD_NXP);
goto handled;
} else if (strnicmp(buf + strlen(CMD_NXP),
PRIV_CMD_BTWT_AP_CONFIG_SET,
strlen(PRIV_CMD_BTWT_AP_CONFIG_SET)) == 0) {
pdata = buf + strlen(CMD_NXP) +
strlen(PRIV_CMD_BTWT_AP_CONFIG_SET);
len = priv_cmd.used_len -
strlen(PRIV_CMD_BTWT_AP_CONFIG_SET) -
strlen(CMD_NXP);
len = woal_priv_btwt_ap_config_set(priv, pdata, len,
priv_cmd.total_len);
len += strlen(PRIV_CMD_BTWT_AP_CONFIG_SET) +
strlen(CMD_NXP);
goto handled;
} else if (strnicmp(buf + strlen(CMD_NXP),
PRIV_CMD_BTWT_AP_CONFIG_GET,
strlen(PRIV_CMD_BTWT_AP_CONFIG_GET)) == 0) {
pdata = buf + strlen(CMD_NXP) +
strlen(PRIV_CMD_BTWT_AP_CONFIG_GET);
len = priv_cmd.used_len -
strlen(PRIV_CMD_BTWT_AP_CONFIG_GET) -
strlen(CMD_NXP);
len = woal_priv_btwt_ap_config_get(priv, pdata, len,
priv_cmd.total_len);
len += strlen(PRIV_CMD_BTWT_AP_CONFIG_GET) +
strlen(CMD_NXP);
goto handled;
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
} else if (strnicmp(buf + strlen(CMD_NXP),

View file

@ -407,6 +407,10 @@ typedef struct _ssu_params_cfg {
#define PRIV_CMD_TWT_REPORT "twt_report"
/** Private command: TWT Information Cfg */
#define PRIV_CMD_TWT_INFORMATION "twt_information"
/** Private command: BTWT AP Cfg Set */
#define PRIV_CMD_BTWT_AP_CONFIG_SET "btwt_AP_config_set"
/** Private command: BTWT AP Cfg Get */
#define PRIV_CMD_BTWT_AP_CONFIG_GET "btwt_AP_config_get"
#define PRIV_CMD_LPM "lpm"

View file

@ -2868,7 +2868,7 @@ module_param(ring_size, int, 0);
MODULE_PARM_DESC(ring_size,
"adma dma ring size: 32/64/128/256/512, default 128");
module_param(pcie_int_mode, int, 0);
MODULE_PARM_DESC(pcie_int_mode, "0: Legacy mode; 1: MSI mode; 2: MSI-X mode");
MODULE_PARM_DESC(pcie_int_mode, "0: Legacy mode; 1: MSI mode");
#endif /* PCIE */
module_param(low_power_mode_enable, int, 0);
MODULE_PARM_DESC(low_power_mode_enable, "0/1: Disable/Enable Low Power Mode");

View file

@ -3229,6 +3229,9 @@ done:
return ret;
}
#define ICMPV6_HEADER_TYPE "\x3a"
#define IPV6_HEADER_TYPE "\x86\xdd"
#define TYPE_NS "\x87"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
/**
* @brief Enable IPv6 Neighbor Solicitation offload
@ -3275,10 +3278,21 @@ static mlan_status woal_set_ipv6_ns_offload(moal_handle *handle, t_u8 enable)
filter->repeat = 1;
filter->offset = 20;
filter->num_byte_seq = 2;
moal_memcpy_ext(handle, filter->byte_seq, "\x86\xdd", 2,
moal_memcpy_ext(handle, filter->byte_seq, IPV6_HEADER_TYPE, 2,
sizeof(filter->byte_seq));
entry->rpn[1] = RPN_TYPE_AND;
filter++;
filter->fill_flag = (FILLING_TYPE | FILLING_REPEAT | FILLING_OFFSET |
FILLING_BYTE_SEQ);
filter->type = TYPE_BYTE_EQ;
filter->repeat = 1;
filter->offset = 28;
filter->num_byte_seq = 1;
moal_memcpy_ext(handle, filter->byte_seq, ICMPV6_HEADER_TYPE, 1,
sizeof(filter->byte_seq));
entry->rpn[2] = RPN_TYPE_AND;
filter++;
filter->fill_flag = (FILLING_TYPE | FILLING_REPEAT | FILLING_OFFSET |
FILLING_BYTE_SEQ);
@ -3286,9 +3300,9 @@ static mlan_status woal_set_ipv6_ns_offload(moal_handle *handle, t_u8 enable)
filter->repeat = 1;
filter->offset = 62;
filter->num_byte_seq = 1;
moal_memcpy_ext(handle, filter->byte_seq, "\x87", 1,
moal_memcpy_ext(handle, filter->byte_seq, TYPE_NS, 1,
sizeof(filter->byte_seq));
entry->filter_num = 2;
entry->filter_num = 3;
if (enable) {
mef_cfg->op_code = MLAN_OP_ADD_IPV6_NS;
} else {

View file

@ -4,7 +4,7 @@
* driver.
*
*
* Copyright 2008-2022, 2024 NXP
* Copyright 2008-2024, 2024 NXP
*
* This software file (the File) is distributed by NXP
* under the terms of the GNU General Public License Version 2, June 1991
@ -60,9 +60,6 @@ Change log:
#include <linux/tcp.h>
#include <net/tcp.h>
#include <net/dsfield.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
#include <net/rps.h>
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
#include <linux/mpls.h>
#endif
@ -1240,12 +1237,6 @@ void woal_clean_up(moal_handle *handle)
#endif
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
if (handle->is_nan_timer_set) {
woal_cancel_timer(&handle->nan_timer);
handle->is_nan_timer_set = MFALSE;
}
#endif
// stop bgscan
#ifdef STA_CFG80211
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
@ -1857,37 +1848,6 @@ BOOLEAN woal_ssid_valid(mlan_802_11_ssid *pssid)
return MTRUE;
}
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
/**
* @brief Tx management timeout for NAN function
*
* @param context A pointer to context
* @return N/A
*/
void woal_nan_timer_func(void *context)
{
moal_handle *handle = (moal_handle *)context;
moal_private *priv = handle->priv[handle->remain_bss_index];
ENTER();
if (!priv->phandle->nan_cookie) {
PRINTM(MWARN, "NAN cookie not set\n");
LEAVE();
return;
}
PRINTM(MEVENT, "NAN timer started.\n");
cfg80211_tx_mgmt_expired(priv->wdev, priv->phandle->nan_cookie,
&priv->phandle->chan, GFP_ATOMIC);
priv->phandle->is_nan_timer_set = MFALSE;
priv->phandle->nan_cookie = 0;
LEAVE();
return;
}
#endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
/**
@ -2549,11 +2509,6 @@ mlan_status woal_init_sw(moal_handle *handle)
handle);
handle->is_remain_timer_set = MFALSE;
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
woal_initialize_timer(&handle->nan_timer, woal_nan_timer_func, handle);
#endif
#endif
#endif
@ -5594,6 +5549,7 @@ moal_private *woal_add_interface(moal_handle *handle, t_u8 bss_index,
INIT_LIST_HEAD(&priv->tcp_sess_queue);
spin_lock_init(&priv->tcp_sess_lock);
priv->tcp_sess_cnt = 0;
#ifdef STA_SUPPORT
INIT_LIST_HEAD(&priv->tdls_list);
spin_lock_init(&priv->tdls_lock);
@ -5910,9 +5866,8 @@ void woal_remove_interface(moal_handle *handle, t_u8 bss_index)
}
#endif
}
woal_flush_tcp_sess_queue(priv);
woal_flush_tx_stat_queue(priv);
woal_flush_tcp_sess_queue(priv);
#ifdef STA_CFG80211
woal_flush_dhcp_discover_queue(priv);
#endif
@ -6311,8 +6266,6 @@ void woal_flush_workqueue(moal_handle *handle)
#endif
#ifdef PCIE
if (IS_PCIE(handle->card_type)) {
if (handle->pcie_rx_event_workqueue)
flush_workqueue(handle->pcie_rx_event_workqueue);
if (handle->pcie_cmd_resp_workqueue)
flush_workqueue(handle->pcie_cmd_resp_workqueue);
cancel_delayed_work_sync(&handle->pcie_delayed_tx_work);
@ -6370,11 +6323,6 @@ void woal_terminate_workqueue(moal_handle *handle)
#endif
#ifdef PCIE
if (IS_PCIE(handle->card_type)) {
if (handle->pcie_rx_event_workqueue) {
flush_workqueue(handle->pcie_rx_event_workqueue);
destroy_workqueue(handle->pcie_rx_event_workqueue);
handle->pcie_rx_event_workqueue = NULL;
}
if (handle->pcie_cmd_resp_workqueue) {
flush_workqueue(handle->pcie_cmd_resp_workqueue);
destroy_workqueue(handle->pcie_cmd_resp_workqueue);
@ -7692,8 +7640,11 @@ void woal_flush_tcp_sess_queue(moal_private *priv)
list_for_each_entry_safe (tcp_sess, tmp_node, &priv->tcp_sess_queue,
link) {
list_del(&tcp_sess->link);
if (atomic_read(&tcp_sess->is_timer_set))
if (atomic_read(&tcp_sess->is_timer_set)) {
spin_unlock_irqrestore(&priv->tcp_sess_lock, flags);
woal_cancel_timer(&tcp_sess->ack_timer);
spin_lock_irqsave(&priv->tcp_sess_lock, flags);
}
skb = (struct sk_buff *)tcp_sess->ack_skb;
if (skb)
dev_kfree_skb_any(skb);
@ -7702,6 +7653,7 @@ void woal_flush_tcp_sess_queue(moal_private *priv)
INIT_LIST_HEAD(&priv->tcp_sess_queue);
priv->tcp_ack_drop_cnt = 0;
priv->tcp_ack_cnt = 0;
priv->tcp_sess_cnt = 0;
spin_unlock_irqrestore(&priv->tcp_sess_lock, flags);
}
@ -7758,6 +7710,7 @@ static void woal_ageout_tcp_sess_queue(moal_private *priv)
PRINTM(MDATA, "wlan: ageout TCP seesion %p\n",
tcp_sess);
list_del(&tcp_sess->link);
priv->tcp_sess_cnt--;
if (atomic_read(&tcp_sess->is_timer_set))
woal_cancel_timer(&tcp_sess->ack_timer);
skb = (struct sk_buff *)tcp_sess->ack_skb;
@ -7843,23 +7796,18 @@ static void woal_tcp_ack_timer_func(void *context)
*
*
* @param priv A pointer to moal_private structure
* @param tcp_session A pointer to tcp_session
* @param skb A pointer to sk_buffer
* @param pmbuf A pointer to mlan_buffer
* @return N/A
*/
static void woal_send_tcp_ack(moal_private *priv, struct tcp_sess *tcp_session)
static void woal_send_tcp_ack(moal_private *priv, struct sk_buff *skb,
mlan_buffer *pmbuf)
{
mlan_status status;
struct sk_buff *skb = (struct sk_buff *)tcp_session->ack_skb;
mlan_buffer *pmbuf = (mlan_buffer *)tcp_session->pmbuf;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
t_u32 index = 0;
#endif
ENTER();
if (atomic_cmpxchg(&tcp_session->is_timer_set, MTRUE, MFALSE)) {
woal_cancel_timer(&tcp_session->ack_timer);
}
tcp_session->ack_skb = NULL;
tcp_session->pmbuf = NULL;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
index = skb_get_queue_mapping(skb);
#endif
@ -7952,7 +7900,12 @@ static int woal_process_tcp_ack(moal_private *priv, mlan_buffer *pmbuf)
if (!tcp_session) {
/* check any aging out sessions can be removed */
woal_ageout_tcp_sess_queue(priv);
if (priv->tcp_sess_cnt >= TCP_ACK_MAX_SESS) {
PRINTM(MINFO, "tcp_sess_cnt reach limit\n");
spin_unlock_irqrestore(&priv->tcp_sess_lock,
flags);
goto done;
}
tcp_session =
kmalloc(sizeof(struct tcp_sess), GFP_ATOMIC);
if (!tcp_session) {
@ -7984,6 +7937,7 @@ static int woal_process_tcp_ack(moal_private *priv, mlan_buffer *pmbuf)
woal_mod_timer(&tcp_session->ack_timer, MOAL_TIMER_1MS);
list_add_tail(&tcp_session->link,
&priv->tcp_sess_queue);
priv->tcp_sess_cnt++;
spin_unlock_irqrestore(&priv->tcp_sess_lock, flags);
ret = HOLD_TCP_ACK;
LEAVE();
@ -8015,9 +7969,32 @@ static int woal_process_tcp_ack(moal_private *priv, mlan_buffer *pmbuf)
tcp_session->ack_seq = ack_seq;
ret = DROP_TCP_ACK;
skb->cb[0]++;
if (skb->cb[0] >= priv->tcp_ack_max_hold)
woal_send_tcp_ack(priv, tcp_session);
spin_unlock_irqrestore(&priv->tcp_sess_lock, flags);
if (skb->cb[0] >= priv->tcp_ack_max_hold) {
struct sk_buff *ack_skb = NULL;
mlan_buffer *ack_pmbuf = NULL;
if (atomic_cmpxchg(&tcp_session->is_timer_set,
MTRUE, MFALSE)) {
spin_unlock_irqrestore(
&priv->tcp_sess_lock, flags);
woal_cancel_timer(
&tcp_session->ack_timer);
spin_lock_irqsave(&priv->tcp_sess_lock,
flags);
}
ack_skb =
(struct sk_buff *)tcp_session->ack_skb;
ack_pmbuf = (mlan_buffer *)tcp_session->pmbuf;
tcp_session->ack_skb = NULL;
tcp_session->pmbuf = NULL;
spin_unlock_irqrestore(&priv->tcp_sess_lock,
flags);
if (ack_skb && ack_pmbuf)
woal_send_tcp_ack(priv, ack_skb,
ack_pmbuf);
} else {
spin_unlock_irqrestore(&priv->tcp_sess_lock,
flags);
}
skb = (struct sk_buff *)pmbuf->pdesc;
dev_kfree_skb_any(skb);
priv->tcp_ack_drop_cnt++;
@ -8305,7 +8282,7 @@ static void woal_start_xmit(moal_private *priv, struct sk_buff *skb)
}
#endif
if (priv->enable_tcp_ack_enh == MTRUE) {
if (priv->enable_tcp_ack_enh && priv->media_connected) {
ret = woal_process_tcp_ack(priv, pmbuf);
if (ret)
goto done;
@ -10069,6 +10046,7 @@ t_void woal_send_disconnect_to_system(moal_private *priv,
woal_stop_queue(priv->netdev);
if (netif_carrier_ok(priv->netdev))
netif_carrier_off(priv->netdev);
woal_flush_tx_stat_queue(priv);
woal_flush_tcp_sess_queue(priv);
#ifdef STA_CFG80211
@ -11661,8 +11639,7 @@ void woal_moal_debug_info(moal_private *priv, moal_handle *handle, u8 flag)
if (IS_PCIE(phandle->card_type)) {
#ifdef DEBUG_LEVEL1
if (phandle->ops.reg_dbg && (drvdbg & (MREG_D | MFW_D))) {
if (!phandle->event_fw_dump)
phandle->ops.reg_dbg(phandle);
phandle->ops.reg_dbg(phandle);
}
#endif
}
@ -11674,18 +11651,15 @@ void woal_moal_debug_info(moal_private *priv, moal_handle *handle, u8 flag)
#ifdef DEBUG_LEVEL1
if (phandle->ops.reg_dbg &&
(drvdbg & (MREG_D | MFW_D))) {
if (!phandle->event_fw_dump)
phandle->ops.reg_dbg(phandle);
phandle->ops.reg_dbg(phandle);
}
#endif
} else {
#ifdef DEBUG_LEVEL1
if (drvdbg & (MREG_D | MFW_D)) {
if (!phandle->event_fw_dump) {
phandle->reg_dbg = MTRUE;
queue_work(phandle->workqueue,
&phandle->main_work);
}
phandle->reg_dbg = MTRUE;
queue_work(phandle->workqueue,
&phandle->main_work);
}
#endif
}
@ -12280,28 +12254,6 @@ t_void woal_pcie_tx_complete_work_queue(struct work_struct *work)
}
#endif
/**
* @brief This workqueue handles rx_event
*
* @param work A pointer to work_struct
*
* @return N/A
*/
t_void woal_pcie_rx_event_work_queue(struct work_struct *work)
{
moal_handle *handle =
container_of(work, moal_handle, pcie_rx_event_work);
ENTER();
if (!handle || handle->surprise_removed == MTRUE) {
LEAVE();
return;
}
mlan_process_pcie_interrupt_cb(handle->pmlan_adapter, RX_EVENT);
LEAVE();
}
/**
* @brief This workqueue handles rx_cmdresp
*
@ -12909,27 +12861,6 @@ moal_handle *woal_add_card(void *card, struct device *dev, moal_if_ops *if_ops,
#ifdef PCIE
if (IS_PCIE(handle->card_type)) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
/* For kernel less than 2.6.14 name can not be
* greater than 10 characters */
handle->pcie_rx_event_workqueue =
create_workqueue("MOAL_PCIE_RX_EVENT_WORKQ");
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
handle->pcie_rx_event_workqueue = alloc_workqueue(
"MOAL_PCIE_RX_EVENT_WORK_QUEUE",
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
#else
handle->pcie_rx_event_workqueue =
create_workqueue("MOAL_PCIE_RX_EVENT_WORK_QUEUE");
#endif
#endif
if (!handle->pcie_rx_event_workqueue) {
woal_terminate_workqueue(handle);
goto err_kmalloc;
}
MLAN_INIT_WORK(&handle->pcie_rx_event_work,
woal_pcie_rx_event_work_queue);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
/* For kernel less than 2.6.14 name can not be
* greater than 10 characters */

View file

@ -124,6 +124,10 @@ Change log:
#include <net/netdev_rx_queue.h>
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
#include <net/rps.h>
#endif
#include "mlan.h"
#include "moal_shim.h"
/* Wireless header */
@ -1160,7 +1164,11 @@ struct debug_data_priv {
/** IP address operation: Remove */
#define IPADDR_OP_REMOVE 0
/* max hold of tcp ack pkt*/
#define TCP_ACK_MAX_HOLD 9
/* max num of tcp session */
#define TCP_ACK_MAX_SESS 100
#define DROP_TCP_ACK 1
#define HOLD_TCP_ACK 2
struct tcp_sess {
@ -1194,6 +1202,8 @@ struct tx_status_info {
t_u8 tx_seq_num;
/** cancel remain on channel when receive tx status */
t_u8 cancel_remain_on_channel;
/** set to notify userspace tx duration expired */
bool send_tx_expired;
/** skb */
void *tx_skb;
};
@ -1896,6 +1906,8 @@ struct _moal_private {
/** tcp session queue */
struct list_head tcp_sess_queue;
/** tcp session count */
t_u8 tcp_sess_cnt;
/** TCP Ack enhance flag */
t_u8 enable_tcp_ack_enh;
/** TCP Ack drop count */
@ -2879,10 +2891,6 @@ struct _moal_handle {
struct work_struct rx_work;
#endif
#ifdef PCIE
/** Driver pcie rx event workqueue */
struct workqueue_struct *pcie_rx_event_workqueue;
/** pcie rx event work */
struct work_struct pcie_rx_event_work;
/** Driver pcie rx cmd resp workqueue */
struct workqueue_struct *pcie_cmd_resp_workqueue;
/** pcie rx cmd resp work */
@ -2949,15 +2957,6 @@ struct _moal_handle {
t_u64 cookie;
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
/** Tx frame wait cancel timer set flag */
BOOLEAN is_nan_timer_set;
/** Tx frame wait timer for nan publish */
moal_drv_timer nan_timer __ATTRIB_ALIGN__;
/** NAN cookie */
t_u64 nan_cookie;
#endif
#ifdef WIFI_DIRECT_SUPPORT
/** NoA duration */
t_u32 noa_duration;
@ -4157,9 +4156,6 @@ int woal_hostcmd_ioctl(struct net_device *dev, struct ifreq *req);
mlan_status woal_set_remain_channel_ioctl(moal_private *priv, t_u8 wait_option,
pmlan_ds_remain_chan pchan);
void woal_remain_timer_func(void *context);
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
void woal_nan_timer_func(void *context);
#endif
#ifdef WIFI_DIRECT_SUPPORT
mlan_status woal_wifi_direct_mode_cfg(moal_private *priv, t_u16 action,
t_u16 *mode);
@ -4220,7 +4216,6 @@ t_void woal_evt_work_queue(struct work_struct *work);
t_void woal_mclist_work_queue(struct work_struct *work);
#ifdef PCIE
t_void woal_pcie_rx_event_work_queue(struct work_struct *work);
t_void woal_pcie_cmd_resp_work_queue(struct work_struct *work);
t_void woal_pcie_delayed_tx_work(struct work_struct *work);
#ifndef TASKLET_SUPPORT

View file

@ -440,25 +440,6 @@ static mlan_status woal_do_flr(moal_handle *handle, bool prepare, bool flr_flag)
}
handle->pmlan_adapter = NULL;
}
#ifdef DUMP_TO_PROC
if (handle->fw_dump_buf) {
moal_vfree(handle, handle->fw_dump_buf);
handle->fw_dump_buf = NULL;
handle->fw_dump_len = 0;
}
#endif
#ifdef PCIEAW693
if (IS_PCIEAW693(handle->card_type))
handle->event_fw_dump = MTRUE;
#endif
#ifdef PCIEIW624
if (IS_PCIEIW624(handle->card_type))
handle->event_fw_dump = MTRUE;
#endif
#ifdef PCIE9098
if (IS_PCIE9098(handle->card_type))
handle->event_fw_dump = MTRUE;
#endif
handle->fw_dump = MFALSE;
goto exit;
@ -697,6 +678,11 @@ static void woal_pcie_shutdown(struct pci_dev *dev)
return;
}
handle = card->handle;
if (!handle) {
PRINTM(MINFO, "Invalid handle\n");
LEAVE();
return;
}
if (handle->second_mac)
goto done;
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIEAW693) || \
@ -809,12 +795,14 @@ static int woal_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
netif_device_detach(handle->priv[i]->netdev);
if (keep_power) {
woal_sched_timeout(200);
/* Enable Host Sleep */
hs_actived = woal_enable_hs(
woal_get_priv(handle, MLAN_BSS_ROLE_ANY));
if (hs_actived == MTRUE) {
/* Indicate device suspended */
handle->is_suspended = MTRUE;
woal_sched_timeout(10);
} else {
PRINTM(MMSG, "HS not actived, suspend fail!");
handle->suspend_fail = MTRUE;
@ -1273,12 +1261,11 @@ static irqreturn_t woal_pcie_interrupt(int irq, void *dev_id)
PRINTM(MINTR, "**\n");
else
PRINTM(MINTR, "*\n");
ret = mlan_interrupt(0xffff, handle->pmlan_adapter);
if (handle->is_suspended) {
PRINTM(MINTR, "Receive interrupt in hs_suspended\n");
goto exit;
PRINTM(MERROR, "Receive interrupt in hs_suspended\n");
}
ret = mlan_interrupt(0xffff, handle->pmlan_adapter);
exit:
if (ret == MLAN_STATUS_SUCCESS)
return IRQ_HANDLED;
@ -1286,60 +1273,6 @@ exit:
return IRQ_NONE;
}
/**
* @brief This function handles the MSI-X interrupt.
*
* @param irq The irq no. of PCIE device
* @param dev_id A pointer to the msix_context structure
*
* @return IRQ_HANDLED
*/
static irqreturn_t woal_pcie_msix_interrupt(int irq, void *dev_id)
{
struct pci_dev *pdev;
pcie_service_card *card;
moal_handle *handle;
msix_context *ctx = (msix_context *)dev_id;
mlan_status ret = MLAN_STATUS_SUCCESS;
if (!ctx) {
PRINTM(MFATAL, "%s: ctx=%p is NULL\n", __func__, ctx);
goto exit;
}
pdev = ctx->dev;
if (!pdev) {
PRINTM(MFATAL, "%s: pdev is NULL\n", (t_u8 *)pdev);
goto exit;
}
card = (pcie_service_card *)pci_get_drvdata(pdev);
if (!card || !card->handle) {
PRINTM(MFATAL, "%s: card=%p handle=%p\n", __func__, card,
card ? card->handle : NULL);
goto exit;
}
handle = card->handle;
if (handle->surprise_removed == MTRUE) {
ret = MLAN_STATUS_FAILURE;
goto exit;
}
PRINTM(MINFO, "*** IN PCIE IRQ ***\n");
handle->main_state = MOAL_RECV_INT;
if (handle->second_mac)
PRINTM(MINTR, "**\n");
else
PRINTM(MINTR, "*\n");
ret = mlan_interrupt(ctx->msg_id, handle->pmlan_adapter);
queue_work(handle->workqueue, &handle->main_work);
exit:
if (ret == MLAN_STATUS_SUCCESS)
return IRQ_HANDLED;
else
return IRQ_NONE;
}
/**
* @brief This function pre-initializes the PCI-E host
* memory space, etc.
@ -1492,8 +1425,6 @@ static mlan_status woal_pcie_register_dev(moal_handle *handle)
mlan_status ret = MLAN_STATUS_SUCCESS;
pcie_service_card *card = NULL;
struct pci_dev *pdev = NULL;
unsigned char nvec;
unsigned char i, j;
ENTER();
if (!handle || !handle->card) {
@ -1509,48 +1440,6 @@ static mlan_status woal_pcie_register_dev(moal_handle *handle)
card->handle = handle;
switch (pcie_int_mode) {
case PCIE_INT_MODE_MSIX:
pcie_int_mode = PCIE_INT_MODE_MSIX;
nvec = PCIE_NUM_MSIX_VECTORS;
for (i = 0; i < nvec; i++) {
card->msix_entries[i].entry = i;
}
/* Try to enable msix */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
ret = pci_enable_msix_exact(pdev, card->msix_entries, nvec);
#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) */
ret = pci_enable_msix(pdev, card->msix_entries, nvec);
#endif
if (ret == 0) {
for (i = 0; i < nvec; i++) {
card->msix_contexts[i].dev = pdev;
card->msix_contexts[i].msg_id = i;
ret = request_irq(card->msix_entries[i].vector,
woal_pcie_msix_interrupt, 0,
"mrvl_pcie_msix",
&(card->msix_contexts[i]));
if (ret) {
PRINTM(MFATAL,
"request_irq failed: ret=%d\n",
ret);
for (j = 0; j < i; j++)
free_irq(card->msix_entries[j]
.vector,
&(card->msix_contexts
[i]));
pci_disable_msix(pdev);
break;
}
}
if (i == nvec)
break;
}
// follow through
/* fall through */
case PCIE_INT_MODE_MSI:
pcie_int_mode = PCIE_INT_MODE_MSI;
@ -1639,8 +1528,6 @@ static void woal_pcie_unregister_dev(moal_handle *handle)
pcie_service_card *card =
handle ? (pcie_service_card *)handle->card : NULL;
struct pci_dev *pdev = NULL;
unsigned char i;
unsigned char nvec;
ENTER();
if (card) {
@ -1648,20 +1535,6 @@ static void woal_pcie_unregister_dev(moal_handle *handle)
PRINTM(MINFO, "%s(): calling free_irq()\n", __func__);
switch (pcie_int_mode) {
case PCIE_INT_MODE_MSIX:
nvec = PCIE_NUM_MSIX_VECTORS;
for (i = 0; i < nvec; i++)
synchronize_irq(card->msix_entries[i].vector);
for (i = 0; i < nvec; i++)
free_irq(card->msix_entries[i].vector,
&(card->msix_contexts[i]));
pci_disable_msix(pdev);
break;
case PCIE_INT_MODE_MSI:
free_irq(card->dev->irq, pdev);
pci_disable_msi(pdev);
@ -2689,7 +2562,6 @@ static void woal_pcie_dump_fw_info(moal_handle *phandle)
IS_PCIE9097(phandle->card_type)) {
woal_pcie_dump_fw_info_v2(phandle);
if (phandle->event_fw_dump) {
phandle->event_fw_dump = MFALSE;
queue_work(phandle->workqueue, &phandle->main_work);
phandle->is_fw_dump_timer_set = MTRUE;
woal_mod_timer(&phandle->fw_dump_timer, MOAL_TIMER_5S);

View file

@ -137,20 +137,6 @@ Change log:
#define PCIEIW624_DEFAULT_WLAN_FW_NAME "nxp/pcieiw624_wlan.bin"
#endif /* PCIEIW624 */
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIEAW693) || \
defined(PCIEIW624)
#define PCIE_NUM_MSIX_VECTORS 32
#else
#define PCIE_NUM_MSIX_VECTORS 4
#endif
typedef struct _msix_context {
/** pci_dev structure pointer */
struct pci_dev *dev;
/** message id related to msix vector */
t_u16 msg_id;
} msix_context;
/** Structure: PCIE service card */
typedef struct _pcie_service_card {
/** pci_dev structure pointer */
@ -165,10 +151,6 @@ typedef struct _pcie_service_card {
void __iomem *pci_mmap;
/** I/O memory regions pointer to the bus */
void __iomem *pci_mmap1;
#if defined(PCIE)
struct msix_entry msix_entries[PCIE_NUM_MSIX_VECTORS];
msix_context msix_contexts[PCIE_NUM_MSIX_VECTORS];
#endif
} pcie_service_card, *ppcie_service_card;
/** Register to bus driver function */

View file

@ -1810,6 +1810,7 @@ done:
#define HOST_TO_CARD_EVENT_REG 0x00
#define HOST_TO_CARD_EVENT MBIT(3)
#define HOST_RST_EVENT MBIT(4)
typedef enum {
DUMP_TYPE_ITCM = 0,
@ -2410,6 +2411,24 @@ done:
return;
}
static void woal_trigger_nmi_on_no_dump_event(moal_handle *phandle)
{
int ret = 0;
t_u8 ctrl_data = 0;
t_u8 dbg_dump_ctrl_reg = phandle->card_info->dump_fw_ctrl_reg;
phandle->init_wait_q_woken = MFALSE;
ret = woal_sdio_readb(phandle, dbg_dump_ctrl_reg, &ctrl_data);
if (ctrl_data == 0xAA) {
ret = wait_event_timeout(phandle->init_wait_q,
phandle->init_wait_q_woken, 2 * HZ);
if (!ret) {
PRINTM(MMSG, "Trigger NMI FW dump...\n");
ret = woal_sdio_writeb(phandle, HOST_TO_CARD_EVENT_REG,
HOST_RST_EVENT);
}
}
}
/**
* @brief This function dump firmware memory to file
*
@ -2747,7 +2766,7 @@ static void woal_sdiommc_dump_fw_info(moal_handle *phandle)
} else if (phandle->card_info->dump_fw_info == DUMP_FW_SDIO_V3) {
woal_dump_firmware_info_v3(phandle);
if (phandle->event_fw_dump) {
phandle->event_fw_dump = MFALSE;
woal_trigger_nmi_on_no_dump_event(phandle);
queue_work(phandle->workqueue, &phandle->main_work);
phandle->is_fw_dump_timer_set = MTRUE;
woal_mod_timer(&phandle->fw_dump_timer, MOAL_TIMER_5S);
@ -3107,17 +3126,6 @@ static mlan_status woal_do_sdiommc_flr(moal_handle *handle, bool prepare,
}
handle->pmlan_adapter = NULL;
}
#ifdef DUMP_TO_PROC
if (handle->fw_dump_buf) {
moal_vfree(handle, handle->fw_dump_buf);
handle->fw_dump_buf = NULL;
handle->fw_dump_len = 0;
}
#endif
#ifdef SD9177
if (IS_SD9177(handle->card_type))
handle->event_fw_dump = MTRUE;
#endif
handle->fw_dump = MFALSE;
goto exit;

View file

@ -2690,11 +2690,6 @@ static mlan_status wlan_process_defer_event(moal_handle *handle,
queue_work(handle->pcie_rx_workqueue, &handle->pcie_rx_work);
#endif
break;
case MLAN_EVENT_ID_DRV_DEFER_RX_EVENT:
status = MLAN_STATUS_SUCCESS;
queue_work(handle->pcie_rx_event_workqueue,
&handle->pcie_rx_event_work);
break;
case MLAN_EVENT_ID_DRV_DEFER_CMDRESP:
status = MLAN_STATUS_SUCCESS;
queue_work(handle->pcie_cmd_resp_workqueue,
@ -2944,6 +2939,8 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
handle->is_fw_dump_timer_set = MTRUE;
woal_mod_timer(&handle->fw_dump_timer, MOAL_TIMER_5S);
}
handle->init_wait_q_woken = MTRUE;
wake_up(&handle->init_wait_q);
woal_store_firmware_dump(pmoal, pmevent);
handle->driver_status = MTRUE;
wifi_status = WIFI_STATUS_FW_DUMP;
@ -4048,12 +4045,13 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
PRINTM(MMSG,
"Channel Under Nop: notify cfg80211 new channel=%d\n",
priv->channel);
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0);
#elif CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && \
CFG80211_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0,
0);
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && IMX_ANDROID_13))
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && \
IMX_ANDROID_13)) && \
CFG80211_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0,
0);
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || \
@ -4699,6 +4697,17 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
skb->data, skb->len,
ack, GFP_ATOMIC);
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
if (tx_info->send_tx_expired) {
PRINTM(MINFO,
"NAN: send tx duration expired for cookie=%llx\n",
tx_info->tx_cookie);
cfg80211_tx_mgmt_expired(
priv->wdev, tx_info->tx_cookie,
&priv->phandle->chan,
GFP_ATOMIC);
}
#endif
#endif
}
#if defined(STA_CFG80211) || defined(UAP_CFG80211)

View file

@ -1902,6 +1902,49 @@ woal_cfg80211_connect_scan(moal_private *priv,
return ret;
}
/**
* @brief This function check if scan is allowed o/n specified band
*
* @param priv A pointer to moal_private structure
* @param chan ieee80211_channel
*
* @return MTRUE/MFALSE
*/
static t_u8 is_scan_band_allowed(moal_private *priv,
struct ieee80211_channel *chan)
{
t_u8 ret = MTRUE;
t_u8 band_mask = 0;
ENTER();
if (!priv->scan_setband_mask) {
LEAVE();
return ret;
}
switch (chan->band) {
case IEEE80211_BAND_5GHZ:
band_mask = SCAN_SETBAND_5G;
break;
case IEEE80211_BAND_2GHZ:
band_mask = SCAN_SETBAND_2G;
break;
default:
break;
}
if (band_mask & priv->scan_setband_mask) {
ret = MTRUE;
} else {
PRINTM(MINFO, "is_scan_band_allowed: Avoid scan on band %d\n",
chan->band);
ret = MFALSE;
}
LEAVE();
return ret;
}
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
/**
* @brief Save assoc parameters for roaming
@ -2175,6 +2218,10 @@ static int woal_cfg80211_authenticate(struct wiphy *wiphy,
ENTER();
if (!is_scan_band_allowed(priv, req->bss->channel)) {
LEAVE();
return -EFAULT;
}
#ifdef REASSOCIATION
// disable reassoc_on
handle->reassoc_on &= ~MBIT(priv->bss_index);
@ -3038,7 +3085,8 @@ done:
priv->netdev->name, MAC2STR(req->bss->bssid));
if (ssid_bssid->assoc_rsp.assoc_resp_len &&
ssid_bssid->assoc_rsp.assoc_resp_len >
sizeof(IEEEtypes_MgmtHdr_t)) {
(sizeof(IEEEtypes_MgmtHdr_t) +
sizeof(IEEEtypes_AssocRsp_t))) {
// save the connection param when send assoc_resp to
// kernel
woal_save_assoc_params(priv, req, ssid_bssid);
@ -3973,6 +4021,57 @@ create_custom_regdomain(moal_private *priv,
return regd;
}
/**
* @brief get channel region config(0x242),update otp_region including
* force_reg
*
* @param priv A pointer to moal_private structure
*
* @return 0-success, otherwise failure
*/
static int woal_get_chan_region_cfg(moal_private *priv)
{
mlan_ds_misc_cfg *misc = NULL;
mlan_ioctl_req *req = NULL;
mlan_status status = MLAN_STATUS_SUCCESS;
t_u8 country_code[COUNTRY_CODE_LEN];
int ret = 0;
ENTER();
memset(country_code, 0, sizeof(country_code));
country_code[0] = priv->phandle->country_code[0];
country_code[1] = priv->phandle->country_code[1];
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
if (req == NULL) {
ret = -ENOMEM;
goto done;
}
misc = (mlan_ds_misc_cfg *)req->pbuf;
misc->sub_command = MLAN_OID_MISC_GET_CHAN_REGION_CFG;
req->req_id = MLAN_IOCTL_MISC_CFG;
req->action = MLAN_ACT_GET;
memset(&misc->param.custom_reg_domain, 0,
sizeof(misc->param.custom_reg_domain));
misc->param.custom_reg_domain.region.country_code[0] = country_code[0];
misc->param.custom_reg_domain.region.country_code[1] = country_code[1];
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
if (status != MLAN_STATUS_SUCCESS) {
ret = -EFAULT;
goto done;
}
done:
if (status != MLAN_STATUS_PENDING)
kfree(req);
LEAVE();
return ret;
}
/**
* @brief create custom channel regulatory config
*
@ -4361,47 +4460,50 @@ static t_u8 wlan_check_scan_table_ageout(moal_private *priv)
LEAVE();
return MTRUE;
}
/**
* @brief This function check if scan is allowed on specified band
* @brief Cancel remain on channel before scan request process
* @param priv A pointer to moal_private
*
* @param priv A pointer to moal_private structure
* @param chan ieee80211_channel
*
* @return MTRUE/MFALSE
* @return none
*/
static t_u8 is_scan_band_allowed(moal_private *priv,
struct ieee80211_channel *chan)
static void woal_cancel_remain_on_channel(moal_private *priv)
{
t_u8 ret = MTRUE;
t_u8 band_mask = 0;
ENTER();
if (!priv->scan_setband_mask) {
LEAVE();
return ret;
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
if (priv->phandle->remain_on_channel) {
t_u8 channel_status;
moal_private *remain_priv;
remain_priv =
priv->phandle->priv[priv->phandle->remain_bss_index];
if (remain_priv) {
PRINTM(MMSG,
"Cancel Remain on Channel before scan request\n");
if (woal_cfg80211_remain_on_channel_cfg(
remain_priv, MOAL_IOCTL_WAIT, MTRUE,
&channel_status, NULL, 0, 0))
PRINTM(MERROR,
"Fail to cancel remain on channel %s %d\n",
__func__, __LINE__);
if (priv->phandle->cookie) {
cfg80211_remain_on_channel_expired(
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
remain_priv->netdev,
#else
remain_priv->wdev,
#endif
priv->phandle->cookie,
&priv->phandle->chan,
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
priv->phandle->channel_type,
#endif
GFP_ATOMIC);
priv->phandle->cookie = 0;
}
priv->phandle->remain_on_channel = MFALSE;
}
}
switch (chan->band) {
case IEEE80211_BAND_5GHZ:
band_mask = SCAN_SETBAND_5G;
break;
case IEEE80211_BAND_2GHZ:
band_mask = SCAN_SETBAND_2G;
break;
default:
break;
}
if (band_mask & priv->scan_setband_mask) {
ret = MTRUE;
} else {
PRINTM(MINFO, "is_scan_band_allowed: Avoid scan on band %d\n",
chan->band);
ret = MFALSE;
}
LEAVE();
return ret;
#endif
}
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
@ -4495,6 +4597,10 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
msecs_to_jiffies(1000));
return ret;
}
/** Cance remain on channel */
woal_cancel_remain_on_channel(priv);
memset(&bss_info, 0, sizeof(bss_info));
if (MLAN_STATUS_SUCCESS ==
woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) {
@ -9921,8 +10027,32 @@ static mlan_status woal_cfg80211_init_wiphy(moal_private *priv,
t_u16 enable = 0;
#endif
int mcs_supp = 0;
char countryOTP[3];
ENTER();
countryOTP[0] = fw_info->fw_country_code & 0x00FF;
countryOTP[1] = (fw_info->fw_country_code & 0xFF00) >> 8;
countryOTP[2] = '\0';
/**check for OTP country code */
if (!fw_info->force_reg && countryOTP[0] && countryOTP[1] &&
(priv->phandle->params.cntry_txpwr == CNTRY_RGPOWER_MODE)) {
priv->phandle->country_code[0] = countryOTP[0];
priv->phandle->country_code[1] = countryOTP[1];
/**download OTP country code rgpower_xx.bin file*/
if (MLAN_STATUS_SUCCESS !=
woal_request_country_power_table(priv, countryOTP,
MOAL_IOCTL_WAIT)) {
PRINTM(MCMND, "rgpower_xx downloading fail \n");
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
return -EFAULT;
#else
return MLAN_STATUS_FAILURE;
#endif
}
woal_get_chan_region_cfg(priv);
}
/* Get 11n tx parameters from MLAN */
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg));
if (req == NULL) {

View file

@ -4646,6 +4646,7 @@ int woal_uap_bss_ctrl(moal_private *priv, t_u8 wait_option, int data)
PRINTM(MERROR,
"Fail to set mac address after UAP_BSS_RESET\n");
}
woal_flush_tx_stat_queue(priv);
woal_flush_tcp_sess_queue(priv);
}
done:

View file

@ -3861,11 +3861,12 @@ static void woal_switch_uap_channel(moal_private *priv, t_u8 wait_option)
priv->bandwidth = uap_channel.bandcfg.chanWidth;
moal_memcpy_ext(priv->phandle, &priv->chan, &priv->csa_chan,
sizeof(struct cfg80211_chan_def), sizeof(priv->chan));
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0);
#elif CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && \
CFG80211_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0, 0);
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && IMX_ANDROID_13))
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && \
IMX_ANDROID_13)) && \
CFG80211_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0, 0);
#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || \
IMX_ANDROID_13 || IMX_ANDROID_12_BACKPORT)

View file

@ -1315,6 +1315,7 @@ static int woal_usb_suspend(struct usb_interface *intf, pm_message_t message)
goto done;
}
woal_sched_timeout(200);
/* Enable Host Sleep */
woal_enable_hs(woal_get_priv(handle, MLAN_BSS_ROLE_ANY));