Driver commit for release -MM6X18540.p34 2025-11-21_15:15:28

Firmware version for commit:
W8997-16.92.21.p153.7
W9098-17.92.1.p149.81
IW416-16.92.21.p153.7
W8987-16.92.21.p153.7
IW612-18.99.3.p27.6
IW610-18.99.5.p83
AW693-18.99.2.p145.147

Signed-off-by: Pushpendra Tiwari <pushpendra.tiwari@nxp.com>
This commit is contained in:
Pushpendra Tiwari 2025-11-21 15:10:16 +05:30 • committed by Sherry Sun
parent 87d7b50151
commit 7b05b57625
6 changed files with 1831 additions and 107 deletions

View file

@ -1,6 +1,6 @@
# File: Makefile
#
# Copyright 2008-2024 NXP
# Copyright 2008-2025 NXP
#
# This software file (the File) is distributed by NXP
# under the terms of the GNU General Public License Version 2, June 1991
@ -75,6 +75,8 @@ CONFIG_UAP_SUPPORT=y
# Enable WIFIDIRECT support
CONFIG_WIFI_DIRECT_SUPPORT=y
# Enable WIFIDISPLAY support
CONFIG_WIFI_DISPLAY_SUPPORT=n
# Re-association in driver
CONFIG_REASSOCIATION=y
@ -89,6 +91,8 @@ CONFIG_OPENWRT_SUPPORT=n
# Big-endian platform
CONFIG_BIG_ENDIAN=n
CONFIG_XDP_SUPPORT=n
@ -102,13 +106,13 @@ CONFIG_DFS_TESTING_SUPPORT=y
CONFIG_MULTI_CHAN_SUPPORT=y
# Enable driver/FW dump to proc
CONFIG_DUMP_TO_PROC=y
# Enable tasklet support (PCIe only)
CONFIG_TASKLET_SUPPORT=n
#32bit app over 64bit kernel support
CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n
@ -137,8 +141,15 @@ endif
#############################################################################
# Select Platform Tools
#############################################################################
ifeq ($(ANDROID_BUILD), 1)
# Set target Android SDK version.
# ANDROID_SDK_VERSION 29 corresponds to Android 10 Android 10
# ANDROID_SDK_VERSION 30 corresponds to Android 11 (Red Velvet Cake)
# ANDROID_SDK_VERSION 31 corresponds to Android 12 (Snow Cone)
# ANDROID_SDK_VERSION 33 corresponds to Android 13 (Tiramisu)
# ANDROID_SDK_VERSION 34 corresponds to Android 14 (Upside Down Cake)
# ANDROID_SDK_VERSION 35 corresponds to Android 15 (Vanilla Ice Cream)
# ANDROID_SDK_VERSION 36 corresponds to Android 16
KERNEL_CFLAGS += -DANDROID
PWD := $(shell pwd)
KERNELDIR ?= $(KERNEL_SRC)
@ -175,7 +186,7 @@ APPDIR= $(shell if test -d "mapp"; then echo mapp; fi)
#############################################################################
ccflags-y += -I$(KERNELDIR)/include
ccflags-y += -DMLAN_RELEASE_VERSION='"540.p33"'
ccflags-y += -DMLAN_RELEASE_VERSION='"540.p34"'
ccflags-y += -DFPNUM='"92"'
@ -215,6 +226,9 @@ endif
ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y)
ccflags-y += -DWIFI_DIRECT_SUPPORT
endif
ifeq ($(CONFIG_WIFI_DISPLAY_SUPPORT),y)
ccflags-y += -DWIFI_DISPLAY_SUPPORT
endif
ifeq ($(CONFIG_MFG_CMD_SUPPORT),y)
ccflags-y += -DMFG_CMD_SUPPORT
@ -308,18 +322,10 @@ ifeq ($(CONFIG_SD9177),y)
CONFIG_SDIO=y
ccflags-y += -DSD9177
endif
ifeq ($(CONFIG_SD8801),y)
CONFIG_SDIO=y
ccflags-y += -DSD8801
endif
ifeq ($(CONFIG_SD9098),y)
CONFIG_SDIO=y
ccflags-y += -DSD9098
endif
ifeq ($(CONFIG_USB8801),y)
CONFIG_MUSB=y
ccflags-y += -DUSB8801
endif
ifeq ($(CONFIG_USB8897),y)
CONFIG_MUSB=y
ccflags-y += -DUSB8897
@ -371,6 +377,10 @@ endif
ifeq ($(CONFIG_PCIEAW693),y)
CONFIG_PCIE=y
ccflags-y += -DPCIEAW693
CONFIG_XDP_SUPPORT=y
ifeq ($(ANDROID_BUILD), 1)
CONFIG_XDP_SUPPORT=n
endif
endif
ifeq ($(CONFIG_SDIO),y)
ccflags-y += -DSDIO
@ -508,6 +518,9 @@ endif
endif
endif
ifeq ($(CONFIG_XDP_SUPPORT), y)
ccflags-y += -DXDP_SUPPORT
endif
@ -584,6 +597,9 @@ MOALOBJS += mlinux/moal_proc.o
MOALOBJS += mlinux/moal_debug.o
endif
ifeq ($(CONFIG_MAC80211_SUPPORT),y)
MOALOBJS += mlinux/moal_mac80211.o
MLANOBJS += mlan/mlan_mac80211.o

2
README
View file

@ -275,6 +275,8 @@
this bit is only used with STA BSS
others -- reserved
bandctrl=0|1 <Disable bandctrl mode (default) | Enable bandctrl mode>
Note: On some platforms (e.g. PXA910/920) double quotation marks ("") need to used
for module parameters.
insmod sdxxx.ko "<para1> <para2> ..."

View file

@ -1946,6 +1946,11 @@ mlan_status mlan_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
ENTER();
if (pmadapter == MNULL) {
LEAVE();
return ret;
}
if (pioctl_req == MNULL) {
PRINTM(MMSG, "set pending clean\n");
pmadapter->pending_clean = MTRUE;

File diff suppressed because it is too large Load diff

View file

@ -403,67 +403,120 @@ int woal_packet_fate_monitor(moal_private *priv,
/* Leave 0 opcode unused as it's a good indicator of accidental incorrect
* execution (e.g. data).
*/
/* Load 1 byte from immediate offset, e.g. "ldb R0, [5]" */
#define NXP_LDB_OPCODE 1
/* Load 2 bytes from immediate offset, e.g. "ldh R0, [5]" */
#define NXP_LDH_OPCODE 2
/* Load 4 bytes from immediate offset, e.g. "ldw R0, [5]" */
#define NXP_LDW_OPCODE 3
/* Load 1 byte from immediate offset plus register, e.g. "ldbx R0, [5]R0" */
#define NXP_LDBX_OPCODE 4
/* Load 2 byte from immediate offset plus register, e.g. "ldhx R0, [5]R0" */
#define NXP_LDHX_OPCODE 5
/* Load 4 byte from immediate offset plus register, e.g. "ldwx R0, [5]R0" */
#define NXP_LDWX_OPCODE 6
/* Add, e.g. "add R0,5" */
#define NXP_ADD_OPCODE 7
/* Multiply, e.g. "mul R0,5" */
#define NXP_MUL_OPCODE 8
/* Divide, e.g. "div R0,5" */
#define NXP_DIV_OPCODE 9
/* And, e.g. "and R0,5" */
#define NXP_AND_OPCODE 10
/* Or, e.g. "or R0,5" */
#define NXP_OR_OPCODE 11
/* Left shift, e.g, "sh R0, 5" or "sh R0, -5" (shifts right) */
#define NXP_SH_OPCODE 12
/* Load immediate, e.g. "li R0,5" (immediate encoded as signed value) */
#define NXP_LI_OPCODE 13
/* Unconditional jump, e.g. "jmp label" */
#define NXP_JMP_OPCODE 14
/* Compare equal and branch, e.g. "jeq R0,5,label" */
#define NXP_JEQ_OPCODE 15
/* Compare not equal and branch, e.g. "jne R0,5,label" */
#define NXP_JNE_OPCODE 16
/* Compare greater than and branch, e.g. "jgt R0,5,label" */
#define NXP_JGT_OPCODE 17
/* Compare less than and branch, e.g. "jlt R0,5,label" */
#define NXP_JLT_OPCODE 18
/* Compare any bits set and branch, e.g. "jset R0,5,label" */
#define NXP_JSET_OPCODE 19
/* Compare not equal byte sequence, e.g. "jnebs R0,5,label,0x1122334455" */
#define NXP_JNEBS_OPCODE 20
/* Immediate value is one of *_EXT_OPCODE
* Extended opcodes. These all have an opcode of EXT_OPCODE
* and specify the actual opcode in the immediate field.
*/
#define NXP_EXT_OPCODE 21
/* Load from memory, e.g. "ldm R0,5"
* Values 0-15 represent loading the different memory slots.
*/
#define NXP_LDM_EXT_OPCODE 0
/* Store to memory, e.g. "stm R0,5" *
* Values 16-31 represent storing to the different memory slots.
*/
#define NXP_STM_EXT_OPCODE 16
/* Not, e.g. "not R0" */
#define NXP_NOT_EXT_OPCODE 32
/* Negate, e.g. "neg R0" */
#define NXP_NEG_EXT_OPCODE 33
/* Swap, e.g. "swap R0,R1" */
#define NXP_SWAP_EXT_OPCODE 34
/* Move, e.g. "move R0,R1" */
#define NXP_MOV_EXT_OPCODE 35
/* === v6 return codes === */
#define APF_V6_DROP 0
#define APF_V6_PASS 1
#define APF_V6_EXCEPTION 2
/* === EXT opcodes (subset) === */
/* Extended v6 opcodes */
#define EWRITE1_EXT_OPCODE 38
#define EWRITE2_EXT_OPCODE 39
#define EWRITE4_EXT_OPCODE 40
#define EPKTDATACOPYR1_EXT_OPCODE 42
/* Core opcodes (top 5 bits of insn) */
#ifndef PASSDROP_OPCODE
#define PASSDROP_OPCODE 0 /* AOSP: pass/drop + optional counter */
#endif
#ifndef LDB_OPCODE
#define LDB_OPCODE 1
#define LDH_OPCODE 2
#define LDW_OPCODE 3
#define LDBX_OPCODE 4
#define LDHX_OPCODE 5
#define LDWX_OPCODE 6
#define ADD_OPCODE 7
#define MUL_OPCODE 8
#define DIV_OPCODE 9
#define AND_OPCODE 10
#define OR_OPCODE 11
#define SH_OPCODE 12
#define LI_OPCODE 13
#define JMP_OPCODE 14
#define JEQ_OPCODE 15
#define JNE_OPCODE 16
#define JGT_OPCODE 17
#define JLT_OPCODE 18
#define JSET_OPCODE 19
#define JBSMATCH_OPCODE 20 /* aka “JNEBS” in your code */
#define EXT_OPCODE 21
#define LDDW_OPCODE 22
#define STDW_OPCODE 23
#define WRITE_OPCODE 24
#define PKTDATACOPY_OPCODE 25
#endif
/* Extended opcodes (imm when op == EXT_OPCODE) */
#ifndef LDM_EXT_OPCODE
#define LDM_EXT_OPCODE 0
#define STM_EXT_OPCODE 16
#define NOT_EXT_OPCODE 32
#define NEG_EXT_OPCODE 33
#define SWAP_EXT_OPCODE 34
#define MOV_EXT_OPCODE 35
#define ALLOCATE_EXT_OPCODE 36
#define TRANSMIT_EXT_OPCODE 37
#define EWRITE1_EXT_OPCODE 38 /* already defined above; keep same */
#define EWRITE2_EXT_OPCODE 39
#define EWRITE4_EXT_OPCODE 40
#define EPKTDATACOPYIMM_EXT_OPCODE 41
#define EPKTDATACOPYR1_EXT_OPCODE 42
#define EXCEPTIONBUFFER_EXT_OPCODE 48
#endif
#ifndef NXP_PASSDROP_OPCODE
#define NXP_PASSDROP_OPCODE PASSDROP_OPCODE
#endif
#ifndef NXP_LDB_OPCODE
#define NXP_LDB_OPCODE LDB_OPCODE
#define NXP_LDH_OPCODE LDH_OPCODE
#define NXP_LDW_OPCODE LDW_OPCODE
#define NXP_LDBX_OPCODE LDBX_OPCODE
#define NXP_LDHX_OPCODE LDHX_OPCODE
#define NXP_LDWX_OPCODE LDWX_OPCODE
#define NXP_ADD_OPCODE ADD_OPCODE
#define NXP_MUL_OPCODE MUL_OPCODE
#define NXP_DIV_OPCODE DIV_OPCODE
#define NXP_AND_OPCODE AND_OPCODE
#define NXP_OR_OPCODE OR_OPCODE
#define NXP_SH_OPCODE SH_OPCODE
#define NXP_LI_OPCODE LI_OPCODE
#define NXP_JMP_OPCODE JMP_OPCODE
#define NXP_JEQ_OPCODE JEQ_OPCODE
#define NXP_JNE_OPCODE JNE_OPCODE
#define NXP_JGT_OPCODE JGT_OPCODE
#define NXP_JLT_OPCODE JLT_OPCODE
#define NXP_JSET_OPCODE JSET_OPCODE
#define NXP_JNEBS_OPCODE JBSMATCH_OPCODE
#define NXP_EXT_OPCODE EXT_OPCODE
#define NXP_LDDW_OPCODE LDDW_OPCODE
#define NXP_STDW_OPCODE STDW_OPCODE
#define NXP_WRITE_OPCODE WRITE_OPCODE
#define NXP_PKTDATACOPY_OPCODE PKTDATACOPY_OPCODE
#define NXP_LDM_EXT_OPCODE LDM_EXT_OPCODE
#define NXP_STM_EXT_OPCODE STM_EXT_OPCODE
#define NXP_NOT_EXT_OPCODE NOT_EXT_OPCODE
#define NXP_NEG_EXT_OPCODE NEG_EXT_OPCODE
#define NXP_SWAP_EXT_OPCODE SWAP_EXT_OPCODE
#define NXP_MOV_EXT_OPCODE MOV_EXT_OPCODE
#endif
/* Map the unprefixed EXT names used later in the switch to AOSP values */
#ifndef LDM_EXT_OPCODE
#define LDM_EXT_OPCODE LDM_EXT_OPCODE /* self-guard */
#endif
/* (others already defined above) */
/* Keep your memory count symbol working if only MEM_ITEMS is local */
#ifndef V6_MEMORY_ITEMS
#ifdef MEM_ITEMS
#define V6_MEMORY_ITEMS MEM_ITEMS
#else
#define V6_MEMORY_ITEMS 16
#endif
#endif
#define GET_OPCODE(i) (((i) >> 3) & 31)
#define GET_REGISTER(i) ((i)&1)
@ -476,11 +529,29 @@ int woal_packet_fate_monitor(moal_private *priv,
* Should be returned by wifi_get_packet_filter_info.
*/
#if (defined(ANDROID_SDK_VERSION) && ANDROID_SDK_VERSION >= 34)
#define APF_VERSION 4
#define APF_VERSION 6000 // Updated to 6.0 for VSR compliance
#else
#define APF_VERSION 2
#define APF_VERSION 4 // Updated to 4 for older SDKs
#endif
struct woal_apf_counters {
u32 dropped_ipv6_ns_invalid;
u32 passed_ipv6_icmp;
};
struct woal_apf_ctx {
spinlock_t lock;
u8 *ram; /* shadow APF RAM */
u32 ram_len; /* capability: max length (e.g., 2048) */
u32 prog_size; /* last installed program length */
ktime_t installed_at; /* for FILTER_AGE_SECONDS */
u32 pkts_since_install; /* NEW: counts packets after install */
/* simple mode flags for CTS: */
bool drop_icmp6_echo_reply_any; /* enable driver-drop for Echo Reply */
struct woal_apf_counters ctr;
};
/** =========== Define Copied from apf_interpreter.h END =========== */
/** =========== Define Copied from apf_interpreter.c START =========== */
@ -498,7 +569,11 @@ int woal_packet_fate_monitor(moal_private *priv,
/** depend on the format of skb->data */
#define APF_FRAME_HEADER_SIZE 14
#define PACKET_FILTER_MAX_LEN 1024
#define PACKET_FILTER_MAX_LEN 2048
#ifndef APF_TEST_MIRROR_BASE
#define APF_TEST_MIRROR_BASE 500
#endif
enum {
PACKET_FILTER_STATE_INIT = 0,
@ -506,14 +581,23 @@ enum {
PACKET_FILTER_STATE_START,
};
enum wifi_attr_packet_filter {
/* Packet filter vendor attrs (SET / CAPA / READ) */
enum nxp_attr_packet_filter {
ATTR_PACKET_FILTER_INVALID = 0,
ATTR_PACKET_FILTER_TOTAL_LENGTH,
ATTR_PACKET_FILTER_PROGRAM,
ATTR_PACKET_FILTER_VERSION,
ATTR_PACKET_FILTER_MAX_LEN,
ATTR_PACKET_FILTER_AFTER_LAST,
ATTR_PACKET_FILTER_MAX = ATTR_PACKET_FILTER_AFTER_LAST - 1
ATTR_PACKET_FILTER_TOTAL_LENGTH, /* u32 */
ATTR_PACKET_FILTER_PROGRAM, /* NLA_NUL_STRING (ASCII-hex) */
ATTR_PACKET_FILTER_VERSION, /* u32 (reply) */
ATTR_PACKET_FILTER_DATA, /* binary (reply for READ) */
ATTR_PACKET_FILTER_MAX_LEN, /* u32 (reply) */
ATTR_PACKET_FILTER_MAX,
};
/* READ sub-cmd specific attrs used by HAL */
enum nxp_attr_apf_read {
NXP_ATTR_APF_READ_INVALID = 0,
NXP_ATTR_APF_SRC_OFFSET, /* u32 */
NXP_ATTR_APF_LENGTH, /* u32 */
NXP_ATTR_APF_READ_MAX,
};
/** Packet filter structure */
@ -817,7 +901,8 @@ enum vendor_sub_command {
sub_cmd_set_scan_band = 0x0008,
sub_cmd_secure_ranging_ctx = 0x0009,
sub_cmd_set_packet_filter = 0x0011,
sub_cmd_get_packet_filter_capability,
sub_cmd_get_packet_filter_capability = 0x0012,
sub_cmd_read_packet_filter_data = 0x0013,
sub_cmd_nd_offload = 0x0100,
SUBCMD_SET_GET_SCANCFG = 0x0200,
SUBCMD_SET_GET_ADDBAPARAMS = 0x0201,

View file

@ -1832,6 +1832,8 @@ typedef struct _moal_priv_linkstats {
struct _moal_private {
/** Handle structure */
moal_handle *phandle;
/* shadow APF state for CTS */
struct woal_apf_ctx *apf;
/** Tx timeout count */
t_u32 num_tx_timeout;
/** BSS index */