MA-22959-1 [Android-15.0] WCS Q4 release patch integrate

Reason: integrate WCS Q4 RC2 patch, WiFi driver MM6X18505.p5
Tested: 8MQ

related FW version:
PCIE_UART_8997_16.92.21.p137.4
PCIE_UART_9098_17.92.1.p149.53
SDIO_UART_8987_16.92.21.p142.3
SDIO_UART_8997_16.92.21.p137.4
SDIO_UART_9098_17.92.1.p149.53
SDIO_UART_IW416_16.92.21.p142.3
SDIO_UART_IW610_18.99.5.p39
SDIO_UART_IW612_18.99.3.p21.10
SDIO_WLAN_8801_14.92.36.p195

Change-Id: I0178c7d1640d4668937c987344abe42d9c66180d
Signed-off-by: yunjie <yunjie.jia@nxp.com>
This commit is contained in:
yunjie 2024-11-14 15:18:06 +00:00
parent 1d49e7ac3f
commit aab0f07fa1
9 changed files with 98 additions and 29 deletions

View file

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

View file

@ -998,6 +998,8 @@ mlan_status wlan_cmd_11ax_cmd(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
(mlan_ds_11ax_llde_cmd *)&ds_11ax_cmd->param; (mlan_ds_11ax_llde_cmd *)&ds_11ax_cmd->param;
mlan_ds_11ax_rutxpwr_cmd *rutxpwr_cmd = mlan_ds_11ax_rutxpwr_cmd *rutxpwr_cmd =
(mlan_ds_11ax_rutxpwr_cmd *)&ds_11ax_cmd->param; (mlan_ds_11ax_rutxpwr_cmd *)&ds_11ax_cmd->param;
mlan_ds_11ax_HeSuER_cmd *HeSuER_cmd =
(mlan_ds_11ax_HeSuER_cmd *)&ds_11ax_cmd->param;
MrvlIEtypes_Data_t *tlv = MNULL; MrvlIEtypes_Data_t *tlv = MNULL;
ENTER(); ENTER();
@ -1055,6 +1057,10 @@ mlan_status wlan_cmd_11ax_cmd(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
sizeof(t_u8), sizeof(t_u8)); sizeof(t_u8), sizeof(t_u8));
cmd->size += sizeof(t_u8); cmd->size += sizeof(t_u8);
break; break;
case MLAN_11AXCMD_HESUER_SUBID:
axcmd->val[0] = HeSuER_cmd->value;
cmd->size += sizeof(t_u8);
break;
default: default:
PRINTM(MERROR, "Unknown subcmd %x\n", ds_11ax_cmd->sub_id); PRINTM(MERROR, "Unknown subcmd %x\n", ds_11ax_cmd->sub_id);
@ -1147,6 +1153,10 @@ mlan_status wlan_ret_11ax_cmd(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
sizeof(mlan_ds_11ax_rutxpwr_cmd), sizeof(mlan_ds_11ax_rutxpwr_cmd),
sizeof(mlan_ds_11ax_rutxpwr_cmd)); sizeof(mlan_ds_11ax_rutxpwr_cmd));
break; break;
case MLAN_11AXCMD_HESUER_SUBID:
cfg->param.HeSuER_cfg.value = *axcmd->val;
break;
default: default:
PRINTM(MERROR, "Unknown subcmd %x\n", axcmd->sub_id); PRINTM(MERROR, "Unknown subcmd %x\n", axcmd->sub_id);
break; break;

View file

@ -4068,6 +4068,7 @@ typedef struct _mlan_ds_11ax_cfg {
#define MLAN_11AXCMD_CFG_ID_SET_BSRP 8 #define MLAN_11AXCMD_CFG_ID_SET_BSRP 8
#define MLAN_11AXCMD_CFG_ID_LLDE 9 #define MLAN_11AXCMD_CFG_ID_LLDE 9
#define MLAN_11AXCMD_CFG_ID_RUTXPWR 10 #define MLAN_11AXCMD_CFG_ID_RUTXPWR 10
#define MLAN_11AXCMD_CFG_ID_HESUER 11
#define MLAN_11AXCMD_SR_SUBID 0x102 #define MLAN_11AXCMD_SR_SUBID 0x102
#define MLAN_11AXCMD_BEAM_SUBID 0x103 #define MLAN_11AXCMD_BEAM_SUBID 0x103
@ -4078,6 +4079,7 @@ typedef struct _mlan_ds_11ax_cfg {
#define MLAN_11AXCMD_SET_BSRP_SUBID 0x109 #define MLAN_11AXCMD_SET_BSRP_SUBID 0x109
#define MLAN_11AXCMD_LLDE_SUBID 0x110 #define MLAN_11AXCMD_LLDE_SUBID 0x110
#define MLAN_11AXCMD_RUTXSUBPWR_SUBID 0x118 #define MLAN_11AXCMD_RUTXSUBPWR_SUBID 0x118
#define MLAN_11AXCMD_HESUER_SUBID 0x121
#define MLAN_11AX_TWT_SETUP_SUBID 0x114 #define MLAN_11AX_TWT_SETUP_SUBID 0x114
#define MLAN_11AX_TWT_TEARDOWN_SUBID 0x115 #define MLAN_11AX_TWT_TEARDOWN_SUBID 0x115
@ -4201,6 +4203,12 @@ typedef struct _mlan_ds_11ax_rutxpwr_cmd {
t_s8 rutxSubPwr[89]; t_s8 rutxSubPwr[89];
} mlan_ds_11ax_rutxpwr_cmd, *pmlan_ds_11ax_rutxpwr_cmd; } mlan_ds_11ax_rutxpwr_cmd, *pmlan_ds_11ax_rutxpwr_cmd;
/** Type definition of mlan_ds_11ax_HeSuER_cmd for MLAN_11AXCMD_HESUER_SUBID */
typedef struct _mlan_ds_11ax_HeSuER_cmd {
/** command value: 1 is enable, 0 is disable*/
t_u8 value;
} mlan_ds_11ax_HeSuER_cmd, *pmlan_ds_11ax_HeSuER_cmd;
/** Type definition of mlan_ds_11ax_cmd_cfg for MLAN_OID_11AX_CMD_CFG */ /** Type definition of mlan_ds_11ax_cmd_cfg for MLAN_OID_11AX_CMD_CFG */
typedef struct _mlan_ds_11ax_cmd_cfg { typedef struct _mlan_ds_11ax_cmd_cfg {
/** Sub-command */ /** Sub-command */
@ -4228,6 +4236,8 @@ typedef struct _mlan_ds_11ax_cmd_cfg {
mlan_ds_11ax_llde_cmd llde_cfg; mlan_ds_11ax_llde_cmd llde_cfg;
/* MLAN_11AXCMD_RUTXPWR_SUBID */ /* MLAN_11AXCMD_RUTXPWR_SUBID */
mlan_ds_11ax_rutxpwr_cmd rutxpwr_cfg; mlan_ds_11ax_rutxpwr_cmd rutxpwr_cfg;
/** HeSuER configuration for MLAN_11AXCMD_HESUER_SUBID */
mlan_ds_11ax_HeSuER_cmd HeSuER_cfg;
} param; } param;
} mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg; } mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg;

View file

@ -4068,6 +4068,7 @@ typedef struct _mlan_ds_11ax_cfg {
#define MLAN_11AXCMD_CFG_ID_SET_BSRP 8 #define MLAN_11AXCMD_CFG_ID_SET_BSRP 8
#define MLAN_11AXCMD_CFG_ID_LLDE 9 #define MLAN_11AXCMD_CFG_ID_LLDE 9
#define MLAN_11AXCMD_CFG_ID_RUTXPWR 10 #define MLAN_11AXCMD_CFG_ID_RUTXPWR 10
#define MLAN_11AXCMD_CFG_ID_HESUER 11
#define MLAN_11AXCMD_SR_SUBID 0x102 #define MLAN_11AXCMD_SR_SUBID 0x102
#define MLAN_11AXCMD_BEAM_SUBID 0x103 #define MLAN_11AXCMD_BEAM_SUBID 0x103
@ -4078,6 +4079,7 @@ typedef struct _mlan_ds_11ax_cfg {
#define MLAN_11AXCMD_SET_BSRP_SUBID 0x109 #define MLAN_11AXCMD_SET_BSRP_SUBID 0x109
#define MLAN_11AXCMD_LLDE_SUBID 0x110 #define MLAN_11AXCMD_LLDE_SUBID 0x110
#define MLAN_11AXCMD_RUTXSUBPWR_SUBID 0x118 #define MLAN_11AXCMD_RUTXSUBPWR_SUBID 0x118
#define MLAN_11AXCMD_HESUER_SUBID 0x121
#define MLAN_11AX_TWT_SETUP_SUBID 0x114 #define MLAN_11AX_TWT_SETUP_SUBID 0x114
#define MLAN_11AX_TWT_TEARDOWN_SUBID 0x115 #define MLAN_11AX_TWT_TEARDOWN_SUBID 0x115
@ -4201,6 +4203,12 @@ typedef struct _mlan_ds_11ax_rutxpwr_cmd {
t_s8 rutxSubPwr[89]; t_s8 rutxSubPwr[89];
} mlan_ds_11ax_rutxpwr_cmd, *pmlan_ds_11ax_rutxpwr_cmd; } mlan_ds_11ax_rutxpwr_cmd, *pmlan_ds_11ax_rutxpwr_cmd;
/** Type definition of mlan_ds_11ax_HeSuER_cmd for MLAN_11AXCMD_HESUER_SUBID */
typedef struct _mlan_ds_11ax_HeSuER_cmd {
/** command value: 1 is enable, 0 is disable*/
t_u8 value;
} mlan_ds_11ax_HeSuER_cmd, *pmlan_ds_11ax_HeSuER_cmd;
/** Type definition of mlan_ds_11ax_cmd_cfg for MLAN_OID_11AX_CMD_CFG */ /** Type definition of mlan_ds_11ax_cmd_cfg for MLAN_OID_11AX_CMD_CFG */
typedef struct _mlan_ds_11ax_cmd_cfg { typedef struct _mlan_ds_11ax_cmd_cfg {
/** Sub-command */ /** Sub-command */
@ -4228,6 +4236,8 @@ typedef struct _mlan_ds_11ax_cmd_cfg {
mlan_ds_11ax_llde_cmd llde_cfg; mlan_ds_11ax_llde_cmd llde_cfg;
/* MLAN_11AXCMD_RUTXPWR_SUBID */ /* MLAN_11AXCMD_RUTXPWR_SUBID */
mlan_ds_11ax_rutxpwr_cmd rutxpwr_cfg; mlan_ds_11ax_rutxpwr_cmd rutxpwr_cfg;
/** HeSuER configuration for MLAN_11AXCMD_HESUER_SUBID */
mlan_ds_11ax_HeSuER_cmd HeSuER_cfg;
} param; } param;
} mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg; } mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg;

View file

@ -660,6 +660,10 @@ static int woal_setget_priv_11axcmdcfg(moal_private *priv, t_u8 *respbuf,
case MLAN_11AXCMD_CFG_ID_RUTXPWR: case MLAN_11AXCMD_CFG_ID_RUTXPWR:
cfg->sub_id = MLAN_11AXCMD_RUTXSUBPWR_SUBID; cfg->sub_id = MLAN_11AXCMD_RUTXSUBPWR_SUBID;
break; break;
case MLAN_11AXCMD_CFG_ID_HESUER:
cfg->sub_id = MLAN_11AXCMD_HESUER_SUBID;
cfg->param.HeSuER_cfg.value = data[1];
break;
default: default:
PRINTM(MERROR, "unknown 11axcmd\n"); PRINTM(MERROR, "unknown 11axcmd\n");

View file

@ -12329,6 +12329,10 @@ t_void woal_evt_work_queue(struct work_struct *work)
woal_host_mlme_process_assoc_timeout( woal_host_mlme_process_assoc_timeout(
(moal_private *)evt->priv, evt->assoc_bss); (moal_private *)evt->priv, evt->assoc_bss);
break; break;
case WOAL_EVENT_RESET_WIFI:
woal_reset_wifi(handle, evt->deauth_evt_cnt,
"EAPOL timeout");
break;
#endif #endif
#endif #endif
#ifdef UAP_SUPPORT #ifdef UAP_SUPPORT

View file

@ -174,10 +174,7 @@ Change log:
#define IMX_ANDROID_14 0 #define IMX_ANDROID_14 0
#define IMX_ANDROID_12_BACKPORT 0 #define IMX_ANDROID_12_BACKPORT 0
#if defined(IMX_SUPPORT) #ifdef ANDROID_SDK_VERSION
#if defined(IMX_ANDROID)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 15, 52) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 15, 52)
#undef IMX_ANDROID_13 #undef IMX_ANDROID_13
#define IMX_ANDROID_13 1 #define IMX_ANDROID_13 1
@ -190,7 +187,7 @@ Change log:
#undef IMX_ANDROID_12_BACKPORT #undef IMX_ANDROID_12_BACKPORT
#define IMX_ANDROID_12_BACKPORT 1 #define IMX_ANDROID_12_BACKPORT 1
#endif #endif
#endif #else
#endif #endif
/** /**
@ -1043,7 +1040,7 @@ typedef struct _wait_queue {
/** flag for wait_timeout */ /** flag for wait_timeout */
t_u8 wait_timeout; t_u8 wait_timeout;
/** retry count */ /** retry count */
t_u8 retry; t_u16 retry;
} wait_queue, *pwait_queue; } wait_queue, *pwait_queue;
/** Auto Rate */ /** Auto Rate */
@ -1258,6 +1255,7 @@ enum woal_event_type {
#endif #endif
#endif #endif
WOAL_EVENT_RGPWR_KEY_MISMATCH, WOAL_EVENT_RGPWR_KEY_MISMATCH,
WOAL_EVENT_RESET_WIFI,
}; };
/** chan_rpt_info */ /** chan_rpt_info */
@ -1290,6 +1288,7 @@ struct woal_event {
mlan_ds_assoc_info assoc_info; mlan_ds_assoc_info assoc_info;
mlan_deauth_param deauth_info; mlan_deauth_param deauth_info;
chan_radar_info radar_info; chan_radar_info radar_info;
t_u8 deauth_evt_cnt;
}; };
}; };

View file

@ -2699,6 +2699,35 @@ static void woal_rgpower_key_mismatch_event(moal_private *priv)
} }
} }
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
/**
* @brief This function prepare wifi reset event
*
* @param priv pointer to the moal_private structure.
*
* @return N/A
*/
static void woal_wifi_reset_event(moal_private *priv, t_u8 deauth_evt_cnt)
{
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_RESET_WIFI;
evt->deauth_evt_cnt = deauth_evt_cnt;
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);
}
// coverity[leaked_storage]: SUPPRESS
}
#endif
/** /**
* @brief This function handles defer event receive * @brief This function handles defer event receive
* *
@ -4455,16 +4484,13 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
#define MAX_DEAUTH_COUNTER 5 #define MAX_DEAUTH_COUNTER 5
if (priv->deauth_evt_cnt >= if (priv->deauth_evt_cnt >=
MAX_DEAUTH_COUNTER) { MAX_DEAUTH_COUNTER) {
if (woal_reset_wifi( woal_wifi_reset_event(
priv->phandle, priv,
priv->deauth_evt_cnt, priv->deauth_evt_cnt);
"EAPOL timeout") ==
MLAN_STATUS_SUCCESS) {
priv->deauth_evt_cnt = priv->deauth_evt_cnt =
0; 0;
} }
} }
}
priv->cfg_disconnect = MTRUE; priv->cfg_disconnect = MTRUE;
woal_mgmt_frame_register( woal_mgmt_frame_register(
priv, priv,

View file

@ -1661,7 +1661,18 @@ mlan_status woal_reset_wifi(moal_handle *handle, t_u8 cnt, char *reason)
static wifi_timeval reset_time; static wifi_timeval reset_time;
wifi_timeval ts; wifi_timeval ts;
t_u64 diff; t_u64 diff;
t_u8 intf_num;
/* Disconnect all interfaces */
for (intf_num = 0; intf_num < handle->priv_num; intf_num++) {
if (handle->priv[intf_num] &&
handle->priv[intf_num]->media_connected == MTRUE) {
if (woal_disconnect(handle->priv[intf_num],
MOAL_IOCTL_WAIT, NULL,
DEF_DEAUTH_REASON_CODE))
PRINTM(MERROR, "woal_disconnect failed\n");
}
}
#define MAX_WIFI_RESET_INTERVAL 15 * 60 * 1000000 // 15 minute #define MAX_WIFI_RESET_INTERVAL 15 * 60 * 1000000 // 15 minute
woal_get_monotonic_time(&ts); woal_get_monotonic_time(&ts);
diff = (t_u64)(timeval_to_usec(ts) - timeval_to_usec(reset_time)); diff = (t_u64)(timeval_to_usec(ts) - timeval_to_usec(reset_time));
@ -5010,23 +5021,18 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN)
scan_req->chan_list[num_chans].scan_time = scan_req->chan_list[num_chans].scan_time =
INIT_PASSIVE_SCAN_CHAN_TIME; INIT_PASSIVE_SCAN_CHAN_TIME;
else if ((priv->bss_type == MLAN_BSS_TYPE_STA) && else if (priv->bss_type == MLAN_BSS_TYPE_STA) {
(1 ==
priv->phandle->scan_request->n_channels)) {
/* /*
* Set passive scan time to 110ms to discover * Set passive scan time to 110ms to discover
* all nearby AP's, Current 40ms passive scan * all nearby AP's, Current 40ms passive scan
* time does not scan all AP's. There are issues * time does not scan all AP's. As beacon
* with 40ms scan time: * interval is 100ms and dwell time on channel
* 1. Regular user passive scan does list * is 40ms There are issues with 40ms scan time:
* limited nearby AP's. * 1. Passive scan does list limited nearby
* 2. Radio Measurement RPT with beacon report * AP's. This change is limited to below
* for passive scan mode does not list all * scenario only:
* required AP's and hence cert fails. This * 1. STA is in connected state
* change is limited to below scenario only: * 2. Scan type is passive
* 1. Single channel user scan is requested
* 2. STA is in connected state
* 3. Scan type is passive
*/ */
if (scan_req->chan_list[num_chans].scan_type == if (scan_req->chan_list[num_chans].scan_type ==
MLAN_SCAN_TYPE_PASSIVE) MLAN_SCAN_TYPE_PASSIVE)