Driver commit for hotfix release MM6X18540.p41 2025-12-23

Firmware version for commit:
IW612-18.99.3.p27.10
IW610-18.99.5.p86

Signed-off-by: Yuvraj Singh <yuvraj.singh@nxp.com>
This commit is contained in:
Yuvraj Singh 2025-12-26 17:22:35 +05:30
parent 84ca65c9ff
commit 09f41e1423
10 changed files with 1956 additions and 238 deletions

View file

@ -175,7 +175,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.p41"'
ccflags-y += -DFPNUM='"92"'

View file

@ -5273,4 +5273,12 @@ static inline t_bool wlan_copy_on_rx_enabled(const mlan_adapter *adapter)
return adapter->init_para.copy_on_rx;
}
mlan_status wlan_cmd_mfg_set_debug_temperature(pmlan_private pmpriv,
HostCmd_DS_COMMAND *cmd,
t_u16 cmd_action,
t_void *pdata_buf);
mlan_status wlan_ret_mfg_debug_temperature(pmlan_private pmpriv,
HostCmd_DS_COMMAND *resp,
mlan_ioctl_req *pioctl_buf);
#endif /* !_MLAN_MAIN_H_ */

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

@ -514,8 +514,8 @@ static struct _card_info card_info_SDAW693 = {
.rev_id_reg = 0xc8,
.host_strap_reg = 0xf4,
.magic_reg = 0xf0,
.fw_name = SDAW693_DEFAULT_COMBO_FW_NAME,
.fw_name_wlan = SDAW693_DEFAULT_WLAN_FW_NAME,
.fw_name = SDIW693_DEFAULT_COMBO_FW_NAME,
.fw_name_wlan = SDIW693_DEFAULT_WLAN_FW_NAME,
#ifdef SDIO
.dump_fw_info = DUMP_FW_SDIO_V3,
.dump_fw_ctrl_reg = 0xf9,
@ -945,8 +945,7 @@ static struct _card_info card_info_SD8987 = {
/** Driver version */
char driver_version[MLAN_MAX_VER_STR_LEN] =
INTF_CARDTYPE KERN_VERSION "--" MLAN_RELEASE_VERSION "-GPL"
"-("
INTF_CARDTYPE KERN_VERSION "--" MLAN_RELEASE_VERSION "-("
"FP" FPNUM ")"
#ifdef DEBUG_LEVEL2
"-dbg"
@ -1299,6 +1298,12 @@ void woal_clean_up(moal_handle *handle)
}
woal_flush_evt_queue(handle);
// Cancel pending ioctl
if (handle->pmlan_adapter) {
mlan_ioctl(handle->pmlan_adapter, NULL);
queue_work(handle->workqueue, &handle->main_work);
woal_sched_timeout(10);
}
return;
}
@ -1485,93 +1490,23 @@ static void woal_get_timestamp(char *tstamp)
*/
static void woal_hang_work_queue(struct work_struct *work)
{
int i;
moal_private *priv;
int cfg80211_wext = 0;
int ret = 0;
t_u8 reload_mode = 0;
moal_handle *ref_handle = NULL;
ENTER();
if (!reset_handle) {
LEAVE();
return;
}
mlan_ioctl(reset_handle->pmlan_adapter, NULL);
cfg80211_wext = reset_handle->params.cfg80211_wext;
// stop pending scan
#ifdef STA_CFG80211
if (IS_STA_CFG80211(cfg80211_wext) && reset_handle->scan_request &&
reset_handle->scan_priv) {
moal_private *scan_priv = reset_handle->scan_priv;
/** some supplicant can not handle SCAN abort event */
if (scan_priv->bss_type == MLAN_BSS_TYPE_STA)
woal_cfg80211_scan_done(reset_handle->scan_request,
MTRUE);
else
woal_cfg80211_scan_done(reset_handle->scan_request,
MFALSE);
reset_handle->scan_request = NULL;
reset_handle->scan_priv = NULL;
cancel_delayed_work_sync(&reset_handle->scan_timeout_work);
reset_handle->scan_pending_on_block = MFALSE;
MOAL_REL_SEMAPHORE(&reset_handle->async_sem);
}
#endif
for (i = 0; i < reset_handle->priv_num; i++) {
if (reset_handle->priv[i]) {
priv = reset_handle->priv[i];
woal_stop_queue(priv->netdev);
if (netif_carrier_ok(priv->netdev))
netif_carrier_off(priv->netdev);
priv->media_connected = MFALSE;
// disconnect
moal_connection_status_check_pmqos(priv->phandle);
#ifdef STA_CFG80211
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev &&
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || \
(defined(ANDROID_SDK_VERSION) && ANDROID_SDK_VERSION >= 31))
priv->wdev->connected) {
#else
priv->wdev->current_bss) {
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
if (priv->host_mlme)
woal_deauth_event(
priv,
MLAN_REASON_DEAUTH_LEAVING,
priv->cfg_bssid);
else
#endif
cfg80211_disconnected(priv->netdev, 0,
NULL, 0,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
true,
#endif
GFP_KERNEL);
}
#endif
#endif
// stop bgscan
#ifdef STA_CFG80211
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
if (IS_STA_CFG80211(cfg80211_wext) &&
priv->sched_scanning && priv->wdev) {
priv->bg_scan_start = MFALSE;
priv->bg_scan_reported = MFALSE;
cfg80211_sched_scan_stopped(priv->wdev->wiphy
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
,
priv->bg_scan_reqid
#endif
);
priv->sched_scanning = MFALSE;
}
#endif
#endif
}
if (reset_handle->pref_mac) {
ref_handle = reset_handle->pref_mac;
woal_clean_up(ref_handle);
woal_flush_workqueue(ref_handle);
}
woal_clean_up(reset_handle);
woal_flush_workqueue(reset_handle);
if (reset_handle->params.auto_fw_reload) {
if (IS_SD(reset_handle->card_type)) {
@ -6931,7 +6866,22 @@ void woal_remove_interface(moal_handle *handle, t_u8 bss_index)
if (IS_STA_OR_UAP_CFG80211(handle->params.cfg80211_wext) &&
priv->bss_type != MLAN_BSS_TYPE_DFS) {
rtnl_lock();
/*
* Close the netdev first, else
* netdev notifiers will need to acquire the wiphy lock
* again in cfg80211_unregister_netdevice() causing
* deadlock.
*/
if (priv->wdev->netdev)
dev_close(priv->wdev->netdev);
/*
* cfg80211_unregister_netdevice() requires both the
* RTNL and wiphy mutex to be held
* */
mutex_lock(&handle->wiphy->mtx);
cfg80211_unregister_netdevice(dev);
mutex_unlock(&handle->wiphy->mtx);
rtnl_unlock();
} else
#endif
@ -6980,8 +6930,27 @@ void woal_remove_interface(moal_handle *handle, t_u8 bss_index)
if (priv->vlan_sta_list[count]->is_valid) {
priv->vlan_sta_list[count]->is_valid = MFALSE;
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
/*
* cfg80211_unregister_netdevice() requires both
* the RTNL and wiphy mutex to be held
* */
rtnl_lock();
/*
* Close the netdev first, else
* netdev notifiers will need to acquire the
* wiphy lock again in
* cfg80211_unregister_netdevice() causing
* deadlock.
* */
if (priv->vlan_sta_list[count]->netdev)
dev_close(priv->vlan_sta_list[count]
->netdev);
mutex_lock(&handle->wiphy->mtx);
cfg80211_unregister_netdevice(
priv->vlan_sta_list[count]->netdev);
mutex_unlock(&handle->wiphy->mtx);
rtnl_unlock();
#else
unregister_netdevice(
priv->vlan_sta_list[count]->netdev);
@ -13766,6 +13735,39 @@ static void woal_survey_dump_reset(moal_private *priv)
moal_get_host_time_ns(&priv->bss_active_time);
}
#ifdef STA_CFG80211
/**
* @brief This function sends scan report to cfg80211
*
* @param priv a pointer to moal_private structure
*
* @return N/A
*
*/
static void woal_send_bss_scan_result(moal_private *priv)
{
unsigned long flags;
spin_lock_irqsave(&priv->phandle->scan_req_lock, flags);
if (priv->phandle->scan_request) {
PRINTM(MINFO, "Reporting scan results\n");
woal_inform_bss_from_scan_result(priv, NULL, MOAL_NO_WAIT);
if (!priv->phandle->first_scan_done) {
priv->phandle->first_scan_done = MTRUE;
if (!priv->phandle->user_scan_cfg)
woal_set_scan_time(priv, ACTIVE_SCAN_CHAN_TIME,
PASSIVE_SCAN_CHAN_TIME,
SPECIFIC_SCAN_CHAN_TIME);
}
if (priv->phandle->scan_request) {
cancel_delayed_work(&priv->phandle->scan_timeout_work);
woal_cfg80211_scan_done(priv->phandle->scan_request,
MFALSE);
priv->phandle->scan_request = NULL;
}
}
spin_unlock_irqrestore(&priv->phandle->scan_req_lock, flags);
}
#endif
/**
* @brief This workqueue function handles woal event queue
*
@ -13942,6 +13944,11 @@ t_void woal_evt_work_queue(struct work_struct *work)
case WOAL_EVENT_SURVEY_DUMP_RESET:
woal_survey_dump_reset((moal_private *)evt->priv);
break;
#ifdef STA_CFG80211
case WOAL_EVENT_CFG80211_INFORM_BSS:
woal_send_bss_scan_result((moal_private *)evt->priv);
break;
#endif
default:
break;
}
@ -15006,12 +15013,9 @@ mlan_status woal_remove_card(void *card)
#endif
if (handle->rf_test_mode)
woal_process_rf_test_mode(handle, MFG_CMD_UNSET_TEST_MODE);
handle->surprise_removed = MTRUE;
woal_clean_up(handle);
mlan_ioctl(handle->pmlan_adapter, NULL);
handle->surprise_removed = MTRUE;
woal_flush_workqueue(handle);
if (moal_extflg_isset(handle, EXT_NAPI)) {
napi_disable(&handle->napi_rx);
netif_napi_del(&handle->napi_rx);
@ -15407,8 +15411,6 @@ static void woal_pre_reset(moal_handle *handle)
woal_clean_up(handle);
/** mask host interrupt from firmware */
mlan_disable_host_int(handle->pmlan_adapter);
/** cancel all pending commands */
mlan_ioctl(handle->pmlan_adapter, NULL);
woal_flush_workqueue(handle);
handle->fw_reload = MTRUE;

View file

@ -1337,6 +1337,9 @@ enum woal_event_type {
WOAL_EVENT_AGCS,
#endif /* UAP_SUPPORT */
WOAL_EVENT_SURVEY_DUMP_RESET,
#ifdef STA_CFG80211
WOAL_EVENT_CFG80211_INFORM_BSS,
#endif
};
/** chan_rpt_info */
@ -1832,6 +1835,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 */
@ -3759,13 +3764,13 @@ extern t_u32 drvdbg;
do { \
woal_print(MINFO, msg); \
if (drvdbg & MINFO) \
printk(KERN_DEBUG msg); \
printk(KERN_INFO msg); \
} while (0)
#define PRINTM_MWARN(msg...) \
do { \
woal_print(MWARN, msg); \
if (drvdbg & MWARN) \
printk(KERN_DEBUG msg); \
printk(KERN_WARNING msg); \
} while (0)
#define PRINTM_MENTRY(msg...) \
do { \
@ -3869,13 +3874,13 @@ extern t_u32 drvdbg;
do { \
woal_print(MFATAL, msg); \
if (drvdbg & MFATAL) \
printk(KERN_ERR msg); \
printk(KERN_CRIT msg); \
} while (0)
#define PRINTM_MMSG(msg...) \
do { \
woal_print(MMSG, msg); \
if (drvdbg & MMSG) \
printk(KERN_ALERT msg); \
printk(KERN_NOTICE msg); \
} while (0)
static inline void woal_print(t_u32 level, char *fmt, ...)

View file

@ -155,13 +155,13 @@ Change log:
#ifdef SDAW693
#define SDAW693_A0 0x00
#define SDAW693_A1 0x01
#define SDAW693_DEFAULT_COMBO_FW_NAME "nxp/sduartaw693_combo.bin"
#define SDUARTAW693_COMBO_FW_NAME "nxp/sduartaw693_combo.bin"
#define SDSDAW693_COMBO_FW_NAME "sdsdaw693_combo.bin"
#define SDUARTAW693_COMBO_V1_FW_NAME "nxp/sduartaw693_combo_v1.bin.se"
#define SDSDAW693_COMBO_V1_FW_NAME "sdsdaw693_combo_v1.bin.se"
#define SDAW693_DEFAULT_WLAN_FW_NAME "nxp/sdaw693_wlan.bin"
#define SDAW693_WLAN_V1_FW_NAME "nxp/sdaw693_wlan_v1.bin.se"
#define SDIW693_DEFAULT_COMBO_FW_NAME "nxp/sduartiw693_combo.bin"
#define SDUARTIW693_COMBO_FW_NAME "nxp/sduartiw693_combo.bin"
#define SDSDIW693_COMBO_FW_NAME "sdsdiw693_combo.bin"
#define SDUARTIW693_COMBO_V1_FW_NAME "nxp/sduartiw693_combo_v1.bin.se"
#define SDSDIW693_COMBO_V1_FW_NAME "sdsdiw693_combo_v1.bin.se"
#define SDIW693_DEFAULT_WLAN_FW_NAME "nxp/sdiw693_wlan.bin"
#define SDIW693_WLAN_V1_FW_NAME "nxp/sdiw693_wlan_v1.bin.se"
#endif /* SDAW693 */
#ifdef SD9177

View file

@ -2065,26 +2065,26 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
case SDAW693_A0:
if (strap == CARD_TYPE_SDAW693_UART)
strncpy(handle->card_info->fw_name,
SDUARTAW693_COMBO_FW_NAME,
SDUARTIW693_COMBO_FW_NAME,
FW_NAMW_MAX_LEN);
else
strncpy(handle->card_info->fw_name,
SDSDAW693_COMBO_FW_NAME,
SDSDIW693_COMBO_FW_NAME,
FW_NAMW_MAX_LEN);
strncpy(handle->card_info->fw_name_wlan,
SDAW693_DEFAULT_WLAN_FW_NAME, FW_NAMW_MAX_LEN);
SDIW693_DEFAULT_WLAN_FW_NAME, FW_NAMW_MAX_LEN);
break;
case SDAW693_A1:
if (strap == CARD_TYPE_SDAW693_UART)
strncpy(handle->card_info->fw_name,
SDUARTAW693_COMBO_V1_FW_NAME,
SDUARTIW693_COMBO_V1_FW_NAME,
FW_NAMW_MAX_LEN);
else
strncpy(handle->card_info->fw_name,
SDSDAW693_COMBO_V1_FW_NAME,
SDSDIW693_COMBO_V1_FW_NAME,
FW_NAMW_MAX_LEN);
strncpy(handle->card_info->fw_name_wlan,
SDAW693_WLAN_V1_FW_NAME, FW_NAMW_MAX_LEN);
SDIW693_WLAN_V1_FW_NAME, FW_NAMW_MAX_LEN);
if (magic != 0x03) {
/* remove extension .se */
se_pos = strstr(handle->card_info->fw_name,
@ -2945,10 +2945,18 @@ static void woal_sdiommc_dump_fw_info(moal_handle *phandle)
phandle->fw_dump_len = 0;
}
#endif
if (!(phandle->pmlan_adapter)) {
PRINTM(MERROR, "phandle->pmlan_adapter is NULL\n");
return;
}
/** cancel all pending commands */
mlan_ioctl(phandle->pmlan_adapter, NULL);
queue_work(phandle->workqueue, &phandle->main_work);
mlan_pm_wakeup_card(phandle->pmlan_adapter, MTRUE);
msleep(5);
phandle->fw_dump = MTRUE;
if (phandle->card_info->dump_fw_info == DUMP_FW_SDIO_V2) {
@ -3303,7 +3311,6 @@ static mlan_status woal_do_sdiommc_flr(moal_handle *handle, bool prepare,
mlan_disable_host_int(handle->pmlan_adapter);
woal_reset_intf(priv, MOAL_IOCTL_WAIT, MTRUE);
woal_clean_up(handle);
mlan_ioctl(handle->pmlan_adapter, NULL);
/* Shutdown firmware */
handle->init_wait_q_woken = MFALSE;
@ -3497,11 +3504,8 @@ static void woal_sdiommc_work(struct work_struct *work)
} else {
ref_handle = (moal_handle *)handle->pref_mac;
}
if (ref_handle) {
if (ref_handle)
ref_handle->surprise_removed = MTRUE;
woal_clean_up(ref_handle);
mlan_ioctl(ref_handle->pmlan_adapter, NULL);
}
}
handle->surprise_removed = MTRUE;
handle->fw_reseting = MTRUE;

View file

@ -3597,6 +3597,35 @@ static void woal_survey_dump_reset_event(moal_private *priv)
// coverity[leaked_storage]: SUPPRESS
}
#ifdef STA_CFG80211
/**
* @brief This function send event to inform BSS from scan result
*
* @param priv A pointer moal_private structure
*
* @return N/A
*/
static void woal_send_bss_scan_result_event(moal_private *priv)
{
struct woal_event *evt;
unsigned long flags;
moal_handle *handle = priv->phandle;
evt = kzalloc(sizeof(struct woal_event), GFP_ATOMIC);
if (evt) {
evt->priv = priv;
evt->type = WOAL_EVENT_CFG80211_INFORM_BSS;
INIT_LIST_HEAD(&evt->link);
spin_lock_irqsave(&handle->evt_lock, flags);
list_add_tail(&evt->link, &handle->evt_queue);
spin_unlock_irqrestore(&handle->evt_lock, flags);
queue_work(handle->evt_workqueue, &handle->evt_work);
}
// evt buffer will be freed by woal_evt_work_queue() once event is
// handled coverity[misra_c_2012_rule_22_1_violation:SUPPRESS]
// coverity[leaked_storage]: SUPPRESS
}
#endif
/**
* @brief This function handles event receive
*
@ -3609,9 +3638,6 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
{
#ifdef STA_SUPPORT
int custom_len = 0;
#ifdef STA_CFG80211
unsigned long flags;
#endif
#endif
moal_private *priv = NULL;
#if defined(STA_SUPPORT) || defined(UAP_SUPPORT)
@ -3815,38 +3841,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
priv->report_scan_result = MFALSE;
#ifdef STA_CFG80211
if (IS_STA_CFG80211(cfg80211_wext)) {
spin_lock_irqsave(&priv->phandle->scan_req_lock,
flags);
if (priv->phandle->scan_request) {
PRINTM(MINFO,
"Reporting scan results\n");
woal_inform_bss_from_scan_result(
priv, NULL, MOAL_NO_WAIT);
if (!priv->phandle->first_scan_done) {
priv->phandle->first_scan_done =
MTRUE;
if (!priv->phandle
->user_scan_cfg)
woal_set_scan_time(
priv,
ACTIVE_SCAN_CHAN_TIME,
PASSIVE_SCAN_CHAN_TIME,
SPECIFIC_SCAN_CHAN_TIME);
}
if (priv->phandle->scan_request) {
cancel_delayed_work(
&priv->phandle
->scan_timeout_work);
woal_cfg80211_scan_done(
priv->phandle
->scan_request,
MFALSE);
priv->phandle->scan_request =
NULL;
}
}
spin_unlock_irqrestore(
&priv->phandle->scan_req_lock, flags);
woal_send_bss_scan_result_event(priv);
}
#endif /* STA_CFG80211 */