mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2026-11-20 18:39:49 -05:00
mxm_wifiex: update to mxm6x18505.p14 release
Corresponding firmware version: SDIO-UART W8987 Firmware version 16.92.21.p149.2 PCIE-UART W8997 Firmware version 16.92.21.p149.2 SDIO-UART W8997 Firmware version 16.92.21.p149.2 SDIO-UART IW416 Firmware version 16.92.21.p149.2 SDIO_UART IW610 Firmware version 18.99.5.p51 SDIO_UART IW612 Firmware version 18.99.3.p23.6 SDIO-UART W8801 Firmware version 14.92.36.p197 SDIO-UART W9098 Firmware version 17.92.1.p149.60 PCIE-UART W9098 Firmware version 17.92.1.p149.60 Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
parent
b952ebfcb5
commit
a8d5496229
28 changed files with 369 additions and 169 deletions
2
Makefile
2
Makefile
|
|
@ -175,7 +175,7 @@ APPDIR= $(shell if test -d "mapp"; then echo mapp; fi)
|
|||
#############################################################################
|
||||
|
||||
ccflags-y += -I$(KERNELDIR)/include
|
||||
ccflags-y += -DMLAN_RELEASE_VERSION='"505.p12"'
|
||||
ccflags-y += -DMLAN_RELEASE_VERSION='"505.p14"'
|
||||
|
||||
ccflags-y += -DFPNUM='"92"'
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains functions for 11n Aggregation.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021, 2024 NXP
|
||||
* Copyright 2008-2021, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -182,7 +182,7 @@ static t_u16 wlan_form_amsdu_txpd(mlan_private *priv, mlan_buffer *pmbuf,
|
|||
mlan_adapter *pmadapter = priv->adapter;
|
||||
TxPD *ptx_pd;
|
||||
t_u8 *head_ptr = MNULL;
|
||||
t_u16 data_len = pmbuf->data_len;
|
||||
t_u32 data_len = pmbuf->data_len;
|
||||
ENTER();
|
||||
|
||||
head_ptr = pmbuf->pbuf + pmbuf->data_offset - Tx_PD_SIZEOF(pmadapter) -
|
||||
|
|
@ -328,12 +328,14 @@ static INLINE void wlan_11n_update_pktlen_amsdu_txpd(mlan_private *priv,
|
|||
* @brief check if UAP AMSDU packet need forward out to connected peers
|
||||
*
|
||||
* @param priv A pointer to mlan_private
|
||||
* @param data A pointer to 802.3 eth header data
|
||||
*
|
||||
* @return MTRUE--packet need forward
|
||||
*
|
||||
*/
|
||||
static t_u8 wlan_uap_check_forward(mlan_private *priv, Eth803Hdr_t *hdr)
|
||||
static t_u8 wlan_uap_check_forward(mlan_private *priv, t_u8 *data)
|
||||
{
|
||||
Eth803Hdr_t *hdr = (Eth803Hdr_t *)data;
|
||||
/** include multicast packet */
|
||||
if (hdr->dest_addr[0] & 0x01)
|
||||
return MTRUE;
|
||||
|
|
@ -369,7 +371,7 @@ static int wlan_11n_get_num_aggrpkts(mlan_private *priv, t_u8 *data,
|
|||
}
|
||||
while (total_pkt_len >= hdr_len) {
|
||||
if (priv->bss_role == MLAN_BSS_ROLE_UAP &&
|
||||
wlan_uap_check_forward(priv, (Eth803Hdr_t *)data))
|
||||
wlan_uap_check_forward(priv, data))
|
||||
forward_flag = MTRUE;
|
||||
/* Length will be in network format, change it to host */
|
||||
pkt_len = mlan_ntohs(
|
||||
|
|
@ -407,7 +409,7 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
{
|
||||
t_u16 pkt_len;
|
||||
int total_pkt_len;
|
||||
t_u8 *data;
|
||||
t_u8 *data = MNULL;
|
||||
mlan_adapter *pmadapter = priv->adapter;
|
||||
t_u32 max_rx_data_size = MLAN_RX_DATA_BUF_SIZE;
|
||||
int pad;
|
||||
|
|
@ -431,6 +433,10 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
ENTER();
|
||||
|
||||
data = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
if (!data) {
|
||||
PRINTM(MERROR, "%s(): null rx aggr pkt data\n");
|
||||
goto done;
|
||||
}
|
||||
total_pkt_len = pmbuf->data_len;
|
||||
|
||||
/* Sanity test */
|
||||
|
|
@ -823,8 +829,11 @@ int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
t_u32 msdu_in_tx_amsdu_cnt = 0;
|
||||
ENTER();
|
||||
|
||||
if (ptrindex < 0) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
PRINTM(MDAT_D, "Handling Aggr packet\n");
|
||||
|
||||
#ifdef PCIEAW693
|
||||
if (IS_PCIEAW693(pmadapter->card_type)) {
|
||||
return wlan_send_amsdu_subframe_list(priv, pra_list, headroom,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* driver.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2021, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -457,6 +457,14 @@ static t_void wlan_11n_create_rxreorder_tbl(mlan_private *priv, t_u8 *ta,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (tid < 0 || tid >= MAX_NUM_TID) {
|
||||
PRINTM(MERROR,
|
||||
"wlan_11n_create_rxreorder_tbl: invalid tid = %d\n",
|
||||
tid);
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we get a TID, ta pair which is already present dispatch all the
|
||||
* the packets and move the window size until the ssn
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @brief This file contains the handling of CMD/EVENT in MLAN
|
||||
*
|
||||
*
|
||||
* Copyright 2009-2024 NXP
|
||||
* Copyright 2009-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -7771,6 +7771,10 @@ mlan_status wlan_cmd_802_11_rf_antenna(pmlan_private pmpriv,
|
|||
sizeof(HostCmd_DS_802_11_RF_ANTENNA) + S_DS_GEN);
|
||||
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
if (!pdata_buf) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
if (IS_STREAM_2X2(pmpriv->adapter->feature_control)) {
|
||||
pantenna->action_tx =
|
||||
wlan_cpu_to_le16(HostCmd_ACT_SET_TX);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* and HW.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021, 2024 NXP
|
||||
* Copyright 2008-2021, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -802,7 +802,7 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->pm_wakeup_fw_try = MFALSE;
|
||||
pmadapter->pm_wakeup_timeout = 0;
|
||||
|
||||
if (!pmadapter->init_para.max_tx_buf)
|
||||
if (!pmadapter->init_para.max_tx_buf && pmadapter->pcard_info)
|
||||
pmadapter->max_tx_buf_size =
|
||||
pmadapter->pcard_info->max_tx_buf_size;
|
||||
else
|
||||
|
|
@ -2044,6 +2044,7 @@ static mlan_status wlan_init_interface(pmlan_adapter pmadapter)
|
|||
for (j = 0; mlan_ops[j]; j++) {
|
||||
if (mlan_ops[j]->bss_role ==
|
||||
GET_BSS_ROLE(pmadapter->priv[i])) {
|
||||
// coverity[cert_exp34_c_violation:SUPPRESS]
|
||||
memcpy_ext(pmadapter,
|
||||
&pmadapter->priv[i]->ops,
|
||||
mlan_ops[j],
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @brief This file include miscellaneous functions for MLAN module
|
||||
*
|
||||
*
|
||||
* Copyright 2009-2024 NXP
|
||||
* Copyright 2009-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -1255,7 +1255,7 @@ t_void wlan_free_mlan_buffer(mlan_adapter *pmadapter, pmlan_buffer pmbuf)
|
|||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
ENTER();
|
||||
|
||||
if (pcb && pmbuf) {
|
||||
if (pcb && pmbuf && pmadapter->pmoal_handle) {
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_BRIDGE_BUF)
|
||||
util_scalar_decrement(
|
||||
pmadapter->pmoal_handle,
|
||||
|
|
@ -6649,6 +6649,7 @@ mlan_status wlan_sec_ioctl_passphrase(pmlan_adapter pmadapter,
|
|||
sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf;
|
||||
|
||||
if (!IS_FW_SUPPORT_SUPPLICANT(pmpriv->adapter)) {
|
||||
PRINTM(MERROR, "FW doesn't support embedded supplicant\n");
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* for sending scan commands to the firmware.
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
|
@ -5339,6 +5339,7 @@ static mlan_status wlan_update_nonTx_bss_desc(mlan_adapter *pmadapter,
|
|||
rate_size = 0;
|
||||
|
||||
/* Allocate the beacon buffer for new entry */
|
||||
// coverity[overflow_sink:SUPPRESS]
|
||||
ret = pcb->moal_malloc(pmadapter->pmoal_handle, beacon_buf_size,
|
||||
MLAN_MEM_DEF, (t_u8 **)&pbuf);
|
||||
if (ret != MLAN_STATUS_SUCCESS || !pbuf) {
|
||||
|
|
@ -8062,6 +8063,10 @@ mlan_status wlan_find_best_network(mlan_private *pmpriv,
|
|||
|
||||
memset(pmadapter, preq_ssid_bssid, 0, sizeof(mlan_ssid_bssid));
|
||||
|
||||
if (!pmadapter->pscan_table) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
i = wlan_find_best_network_in_list(pmpriv);
|
||||
|
||||
if (i >= 0) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains APIs to MOAL module.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021, 2024 NXP
|
||||
* Copyright 2008-2021, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -380,6 +380,7 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
PRINTM(MMSG,
|
||||
"Attach mlan adapter operations.card_type is 0x%x.\n",
|
||||
pmdevice->card_type);
|
||||
// coverity[cert_exp34_c_violation:SUPPRESS]
|
||||
memcpy_ext(pmadapter, &pmadapter->ops, &mlan_pcie_ops,
|
||||
sizeof(mlan_adapter_operations),
|
||||
sizeof(mlan_adapter_operations));
|
||||
|
|
@ -1233,7 +1234,7 @@ process_start:
|
|||
pmadapter->pm_wakeup_flag = MFALSE;
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
if (pmadapter->pm_wakeup_timeout == 1) {
|
||||
if (pmadapter->pm_wakeup_timeout == 2) {
|
||||
if (!pmadapter->ops
|
||||
.wakeup_timeout_recovery(
|
||||
pmadapter))
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* it is ready.
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
|
@ -701,7 +701,7 @@ static mlan_status wlan_cmd_tx_power_cfg(pmlan_private pmpriv,
|
|||
switch (cmd_action) {
|
||||
case HostCmd_ACT_GEN_SET:
|
||||
ptxp = (HostCmd_DS_TXPWR_CFG *)pdata_buf;
|
||||
if (ptxp->mode) {
|
||||
if (ptxp && ptxp->mode) {
|
||||
ppg_tlv = (MrvlTypes_Power_Group_t
|
||||
*)((t_u8 *)pdata_buf +
|
||||
sizeof(HostCmd_DS_TXPWR_CFG));
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* responses generated by firmware.
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
|
@ -971,10 +971,11 @@ static mlan_status wlan_ret_tx_power_cfg(pmlan_private pmpriv,
|
|||
switch (action) {
|
||||
case HostCmd_ACT_GEN_GET:
|
||||
ppg_tlv->length = wlan_le16_to_cpu(ppg_tlv->length);
|
||||
if (pmpriv->adapter->hw_status ==
|
||||
WlanHardwareStatusInitializing)
|
||||
wlan_get_power_level(pmpriv, ptxp_cfg);
|
||||
pmpriv->tx_power_level = (t_s16)pg->power_min;
|
||||
// coverity[overrun-buffer-val:SUPPRESS]
|
||||
// coverity[cert_str31_c_violation:SUPPRESS]
|
||||
// coverity[cert_arr30_c_violation:SUPPRESS]
|
||||
wlan_get_power_level(pmpriv, ptxp_cfg);
|
||||
pmpriv->tx_power_level = pmpriv->max_tx_power_level;
|
||||
break;
|
||||
|
||||
case HostCmd_ACT_GEN_SET:
|
||||
|
|
@ -2816,7 +2817,7 @@ static mlan_status wlan_ret_auto_tx(pmlan_private pmpriv,
|
|||
keep_alive_Rx_tlv
|
||||
->ip_packet,
|
||||
len,
|
||||
sizeof(misc_keep_alive
|
||||
sizeof(misc_keep_alive_rx
|
||||
->packet));
|
||||
misc_keep_alive_rx->pkt_len =
|
||||
len;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains MLAN event handling.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2022, 2024 NXP
|
||||
* Copyright 2008-2022, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -837,8 +837,9 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
MLAN_MAC_ADDR_LENGTH)) {
|
||||
PRINTM(MMSG, "wlan: skip link lost event\n");
|
||||
PRINTM(MMSG, "pattempted_bssid: " MACSTR "\n",
|
||||
MAC2STR(&pmpriv->curr_bss_params
|
||||
.attemp_bssid));
|
||||
MAC2STR((
|
||||
t_u8 *)(&pmpriv->curr_bss_params
|
||||
.attemp_bssid)));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -851,8 +852,8 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
PRINTM(MMSG,
|
||||
"pattempted_bssid: " MACSTR
|
||||
" curr_bssid:" MACSTR "\n",
|
||||
MAC2STR(&pmpriv->curr_bss_params
|
||||
.attemp_bssid),
|
||||
MAC2STR((t_u8 *)(&pmpriv->curr_bss_params
|
||||
.attemp_bssid)),
|
||||
MAC2STR(pmpriv->curr_bss_params
|
||||
.bss_descriptor
|
||||
.mac_address));
|
||||
|
|
@ -985,6 +986,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
|
||||
case EVENT_PORT_RELEASE:
|
||||
PRINTM(MEVENT, "EVENT: PORT RELEASE\n");
|
||||
pmpriv->tx_pause = MFALSE;
|
||||
/* Open the port for e-supp mode */
|
||||
if (pmpriv->port_ctrl_mode == MTRUE) {
|
||||
PRINTM(MINFO, "PORT_REL: port_status = OPEN\n");
|
||||
|
|
@ -1303,10 +1305,11 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
PRINTM(MEVENT, "EVENT: WIFIDIRECT event %d\n", eventcause);
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU;
|
||||
pevent->event_len = pmbuf->data_len;
|
||||
// Ensure event_len does not exceed buffer size
|
||||
pevent->event_len = MIN(pmbuf->data_len, MAX_EVENT_SIZE);
|
||||
memcpy_ext(pmadapter, (t_u8 *)pevent->event_buf,
|
||||
pmbuf->pbuf + pmbuf->data_offset, pevent->event_len,
|
||||
pevent->event_len);
|
||||
MAX_EVENT_SIZE);
|
||||
wlan_recv_event(pmpriv, pevent->event_id, pevent);
|
||||
break;
|
||||
case EVENT_WIFIDIRECT_SERVICE_DISCOVERY:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* transmission in MLAN module.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021, 2024 NXP
|
||||
* Copyright 2008-2021, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -293,7 +293,7 @@ mlan_status wlan_send_null_packet(pmlan_private priv, t_u8 flags)
|
|||
ptx_pd->bss_type = priv->bss_type;
|
||||
|
||||
endian_convert_TxPD(ptx_pd);
|
||||
|
||||
// coverity[cert_exp34_c_violation:SUPPRESS]
|
||||
ret = pmadapter->ops.host_to_card(priv, MLAN_TYPE_DATA, pmbuf, MNULL);
|
||||
|
||||
switch (ret) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @brief This file contains the handling of TX/RX in MLAN
|
||||
*
|
||||
*
|
||||
* Copyright 2009-2021, 2024 NXP
|
||||
* Copyright 2009-2021, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -145,7 +145,7 @@ static void wlan_drv_mcast_cycle_delay_calulation(pmlan_adapter pmadapter,
|
|||
gmcast_stats.spent_time_over_3000usec++;
|
||||
}
|
||||
/* Process the start cycle data */
|
||||
cycle_delta = (pmbuf->in_ts_sec - prev_mcast_sec) * 1000000;
|
||||
cycle_delta = (t_u64)(pmbuf->in_ts_sec - prev_mcast_sec) * 1000000;
|
||||
cycle_delta += (t_s32)(pmbuf->in_ts_usec - prev_mcast_usec);
|
||||
|
||||
/* If start cycle delta is more than 5 sec ignore*/
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains the handling of AP mode command and event
|
||||
*
|
||||
*
|
||||
* Copyright 2009-2024 NXP
|
||||
* Copyright 2009-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -5786,7 +5786,8 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
|
||||
/* Allocate memory for event buffer */
|
||||
ret = pcb->moal_malloc(pmadapter->pmoal_handle,
|
||||
MAX_EVENT_SIZE + sizeof(mlan_event),
|
||||
MAX_EVENT_SIZE + sizeof(mlan_event) +
|
||||
sizeof(eventcause),
|
||||
MLAN_MEM_DEF, &event_buf);
|
||||
if ((ret != MLAN_STATUS_SUCCESS) || !event_buf) {
|
||||
PRINTM(MERROR, "Could not allocate buffer for event buf\n");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains functions for WMM.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021, 2024 NXP
|
||||
* Copyright 2008-2021, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -660,7 +660,7 @@ static raListTbl *wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter,
|
|||
tid_tbl_t *tid_ptr;
|
||||
int i, j;
|
||||
int next_prio = 0;
|
||||
int next_tid = 0;
|
||||
t_u8 next_tid = 0;
|
||||
ENTER();
|
||||
|
||||
PRINTM(MDAT_D, "POP\n");
|
||||
|
|
@ -756,8 +756,9 @@ static raListTbl *wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter,
|
|||
next_prio = (next_prio < 1) ?
|
||||
0 :
|
||||
next_prio;
|
||||
next_tid =
|
||||
tos_to_tid[next_prio];
|
||||
next_tid = MIN(
|
||||
tos_to_tid[next_prio],
|
||||
MAX_NUM_TID);
|
||||
if (priv_tmp->wmm.pkts_queued
|
||||
[next_tid] &&
|
||||
(priv_tmp->wmm.pkts_queued
|
||||
|
|
@ -843,11 +844,12 @@ static raListTbl *wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return byte budget
|
||||
*/
|
||||
static t_u32 wlan_wmm_get_byte_budget(pmlan_adapter pmadapter, t_u32 time_budget_us, t_u32 phy_rate_kbps)
|
||||
static t_u32 wlan_wmm_get_byte_budget(pmlan_adapter pmadapter,
|
||||
t_u32 time_budget_us, t_u32 phy_rate_kbps)
|
||||
{
|
||||
const t_u32 min_budget = MV_ETH_FRAME_LEN;
|
||||
t_u64 byte_budget = pmadapter->callbacks.moal_do_div((t_u64)phy_rate_kbps * time_budget_us,
|
||||
8 * 1000u);
|
||||
t_u64 byte_budget = pmadapter->callbacks.moal_do_div(
|
||||
(t_u64)phy_rate_kbps * time_budget_us, 8 * 1000u);
|
||||
|
||||
if (byte_budget > INT_MAX)
|
||||
return INT_MAX;
|
||||
|
|
@ -903,14 +905,16 @@ wlan_wmm_allocate_sta_table(pmlan_adapter pmadapter, t_u8 *ra)
|
|||
sta_table->budget.mpdu_no_amsdu_pps_cap =
|
||||
pmadapter->tx_mpdu_no_amsdu_pps;
|
||||
|
||||
sta_table->budget.mpdu_with_amsdu_budget_init = pmadapter->callbacks.moal_do_div(
|
||||
(t_u64)sta_table->budget.mpdu_with_amsdu_pps_cap *
|
||||
sta_table->budget.time_budget_init_us,
|
||||
1000000);
|
||||
sta_table->budget.mpdu_no_amsdu_budget_init = pmadapter->callbacks.moal_do_div(
|
||||
(t_u64)sta_table->budget.mpdu_no_amsdu_pps_cap *
|
||||
sta_table->budget.time_budget_init_us,
|
||||
1000000);
|
||||
sta_table->budget.mpdu_with_amsdu_budget_init =
|
||||
pmadapter->callbacks.moal_do_div(
|
||||
(t_u64)sta_table->budget.mpdu_with_amsdu_pps_cap *
|
||||
sta_table->budget.time_budget_init_us,
|
||||
1000000);
|
||||
sta_table->budget.mpdu_no_amsdu_budget_init =
|
||||
pmadapter->callbacks.moal_do_div(
|
||||
(t_u64)sta_table->budget.mpdu_no_amsdu_pps_cap *
|
||||
sta_table->budget.time_budget_init_us,
|
||||
1000000);
|
||||
|
||||
for (i = 0; i < NELEMENTS(sta_table->budget.bytes); ++i) {
|
||||
sta_table->budget.bytes[i] = sta_table->budget.byte_budget_init;
|
||||
|
|
@ -1532,7 +1536,7 @@ static raListTbl *wlan_wmm_get_next_priolist_ptr(pmlan_adapter pmadapter,
|
|||
}
|
||||
|
||||
pmadapter->selected_mlan_bss = MNULL;
|
||||
|
||||
// coverity[cert_arr30_c_violation:SUPPRESS]
|
||||
return wlan_wmm_get_highest_priolist_ptr(pmadapter, priv, tid);
|
||||
}
|
||||
|
||||
|
|
@ -2598,6 +2602,7 @@ void wlan_ralist_add(mlan_private *priv, t_u8 *ra)
|
|||
}
|
||||
|
||||
LEAVE();
|
||||
// coverity[leaked_storage:SUPPRESS]
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2906,6 +2911,11 @@ int wlan_is_ralist_valid(mlan_private *priv, raListTbl *ra_list, int ptrindex)
|
|||
|
||||
ENTER();
|
||||
|
||||
if (ptrindex < 0 || ptrindex >= MAX_NUM_TID) {
|
||||
LEAVE();
|
||||
return MFALSE;
|
||||
}
|
||||
|
||||
rlist = (raListTbl *)util_peek_list(
|
||||
priv->adapter->pmoal_handle,
|
||||
&priv->wmm.tid_tbl_ptr[ptrindex].ra_list, MNULL, MNULL);
|
||||
|
|
@ -3146,11 +3156,13 @@ static t_void wlan_wmm_update_queue_packets_budget(pmlan_adapter pmadapter,
|
|||
list_entry, struct wmm_sta_table, active_sta_entry);
|
||||
const t_u64 sta_capacity = sta->budget.byte_budget_init;
|
||||
const t_u32 max_pkts_by_airtime =
|
||||
wlan_wmm_get_byte_budget(pmadapter, max_pending_tx_time_us,
|
||||
wlan_wmm_get_byte_budget(pmadapter,
|
||||
max_pending_tx_time_us,
|
||||
sta->budget.phy_rate_kbps) /
|
||||
MV_ETH_FRAME_LEN;
|
||||
t_u32 sta_share = pmadapter->callbacks.moal_do_div((t_u64)queue_packets_limit * sta_capacity,
|
||||
total_capacity);
|
||||
t_u32 sta_share = pmadapter->callbacks.moal_do_div(
|
||||
(t_u64)queue_packets_limit * sta_capacity,
|
||||
total_capacity);
|
||||
|
||||
sta_share = MAX(sta_share, min_sta_share);
|
||||
sta_share = MIN(sta_share, queue_packets_limit * 7 / 8);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains the functions for CFG80211.
|
||||
*
|
||||
*
|
||||
* Copyright 2011-2024 NXP
|
||||
* Copyright 2011-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -3456,6 +3456,9 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
|||
if (beacon_ies_data) {
|
||||
len = sizeof(*beacon_ies_data) - MAX_IE_SIZE +
|
||||
beacon_ies_data->ie_length;
|
||||
if (len > MAX_IE_SIZE) {
|
||||
len = MAX_IE_SIZE;
|
||||
}
|
||||
moal_memcpy_ext(priv->phandle, pos, beacon_ies_data, len,
|
||||
remain_len);
|
||||
pos += len;
|
||||
|
|
@ -3466,6 +3469,9 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
|||
if (proberesp_ies_data) {
|
||||
len = sizeof(*proberesp_ies_data) - MAX_IE_SIZE +
|
||||
proberesp_ies_data->ie_length;
|
||||
if (len > MAX_IE_SIZE) {
|
||||
len = MAX_IE_SIZE;
|
||||
}
|
||||
moal_memcpy_ext(priv->phandle, pos, proberesp_ies_data, len,
|
||||
remain_len);
|
||||
pos += len;
|
||||
|
|
@ -3476,6 +3482,9 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
|||
if (assocresp_ies_data) {
|
||||
len = sizeof(*assocresp_ies_data) - MAX_IE_SIZE +
|
||||
assocresp_ies_data->ie_length;
|
||||
if (len > MAX_IE_SIZE) {
|
||||
len = MAX_IE_SIZE;
|
||||
}
|
||||
moal_memcpy_ext(priv->phandle, pos, assocresp_ies_data, len,
|
||||
remain_len);
|
||||
pos += len;
|
||||
|
|
@ -3486,6 +3495,9 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
|||
if (probereq_ies_data) {
|
||||
len = sizeof(*probereq_ies_data) - MAX_IE_SIZE +
|
||||
probereq_ies_data->ie_length;
|
||||
if (len > MAX_IE_SIZE) {
|
||||
len = MAX_IE_SIZE;
|
||||
}
|
||||
moal_memcpy_ext(priv->phandle, pos, probereq_ies_data, len,
|
||||
remain_len);
|
||||
pos += len;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains the functions for CFG80211 vendor.
|
||||
*
|
||||
*
|
||||
* Copyright 2015-2022, 2024 NXP
|
||||
* Copyright 2015-2022, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -2845,6 +2845,7 @@ int woal_filter_packet(moal_private *priv, t_u8 *data, t_u32 len,
|
|||
pkt_filter->packet_filter_len);
|
||||
DBG_HEXDUMP(MDAT_D, "packet_filter_data", data, len);
|
||||
spin_lock_irqsave(&pkt_filter->lock, flags);
|
||||
// coverity[misra_c_2012_directive_4_14_violation:SUPPRESS]
|
||||
ret = process_packet(pkt_filter->packet_filter_program,
|
||||
pkt_filter->packet_filter_len, data, len,
|
||||
filter_age);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @brief This file contains private ioctl functions
|
||||
|
||||
*
|
||||
* Copyright 2014-2024 NXP
|
||||
* Copyright 2014-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -11884,11 +11884,12 @@ static int woal_priv_net_monitor_ioctl(moal_private *priv, t_u8 *respbuf,
|
|||
data[2] = handle->mon_if->band_chan_cfg.band;
|
||||
data[3] = net_mon->channel;
|
||||
data[4] = net_mon->chan_bandwidth;
|
||||
data_length = 5;
|
||||
moal_memcpy_ext(priv->phandle, respbuf, (t_u8 *)data,
|
||||
sizeof(int) * data_length, respbuflen);
|
||||
ret = sizeof(int) * data_length;
|
||||
|
||||
data_length = (t_u32)(5 * sizeof(int));
|
||||
if (data_length < respbuflen) {
|
||||
moal_memcpy_ext(priv->phandle, respbuf, (t_u8 *)data,
|
||||
data_length, data_length);
|
||||
ret = data_length;
|
||||
}
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
|
|
@ -12815,7 +12816,7 @@ static t_u8 woal_get_next_dfs_chan(moal_private *priv)
|
|||
t_u8 chan = 0;
|
||||
ENTER();
|
||||
idx++;
|
||||
if (idx >= priv->auto_dfs_cfg.num_of_chan)
|
||||
if (idx >= priv->auto_dfs_cfg.num_of_chan || idx < 0)
|
||||
idx = 0;
|
||||
for (i = 0; i < priv->auto_dfs_cfg.num_of_chan; i++) {
|
||||
if (priv->chan_rpt_req.chanNum !=
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* driver.
|
||||
*
|
||||
*
|
||||
* Copyright 2018-2022, 2024 NXP
|
||||
* Copyright 2018-2022, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -75,6 +75,10 @@ static int host_mlme = 1;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
|
||||
static int cfg80211_eapol_offload = 0;
|
||||
#endif
|
||||
|
||||
static int roamoffload_in_hs;
|
||||
|
||||
static int drcs_chantime_mode;
|
||||
|
|
@ -1590,8 +1594,24 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
PRINTM(MMSG, "chan_track= %s\n",
|
||||
moal_extflg_isset(handle, EXT_PMQOS) ? "on" :
|
||||
"off");
|
||||
} else if (strncmp(line, "keep_previous_scan",
|
||||
strlen("keep_previous_scan")) == 0) {
|
||||
}
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
|
||||
else if (strncmp(line, "cfg80211_eapol_offload",
|
||||
strlen("cfg80211_eapol_offload")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
if (out_data)
|
||||
moal_extflg_set(handle,
|
||||
EXT_CFG80211_EAPOL_OFFLOAD);
|
||||
|
||||
PRINTM(MMSG, "cfg80211_eapol_offload= %d\n",
|
||||
moal_extflg_isset(handle,
|
||||
EXT_CFG80211_EAPOL_OFFLOAD));
|
||||
}
|
||||
#endif
|
||||
else if (strncmp(line, "keep_previous_scan",
|
||||
strlen("keep_previous_scan")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
|
|
@ -1962,6 +1982,11 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
if (chan_track)
|
||||
moal_extflg_set(handle, EXT_CHAN_TRACK);
|
||||
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
|
||||
if (cfg80211_eapol_offload)
|
||||
moal_extflg_set(handle, EXT_CFG80211_EAPOL_OFFLOAD);
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
if (dfs_offload)
|
||||
moal_extflg_set(handle, EXT_DFS_OFFLOAD);
|
||||
|
|
@ -2585,8 +2610,19 @@ void woal_init_from_dev_tree(void)
|
|||
chan_track = data;
|
||||
PRINTM(MIOCTL, "chan_track=%d\n", chan_track);
|
||||
}
|
||||
} else if (!strncmp(prop->name, "keep_previous_scan",
|
||||
strlen("keep_previous_scan"))) {
|
||||
}
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
|
||||
else if (!strncmp(prop->name, "cfg80211_eapol_offload",
|
||||
strlen("cfg80211_eapol_offload"))) {
|
||||
if (!of_property_read_u32(dt_node, prop->name, &data)) {
|
||||
cfg80211_eapol_offload = data;
|
||||
PRINTM(MIOCTL, "cfg80211_eapol_offload=%d\n",
|
||||
cfg80211_eapol_offload);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else if (!strncmp(prop->name, "keep_previous_scan",
|
||||
strlen("keep_previous_scan"))) {
|
||||
if (!of_property_read_u32(dt_node, prop->name, &data)) {
|
||||
PRINTM(MERROR, "keep_previous_scan=0x%x\n",
|
||||
data);
|
||||
|
|
@ -3206,6 +3242,15 @@ MODULE_PARM_DESC(
|
|||
chan_track,
|
||||
"1: Set channel tracking; 0: Restore channel tracking for 9098 only");
|
||||
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
|
||||
// coverity[misra_c_2012_rule_21_2_violation:SUPPRESS]
|
||||
// coverity[misra_c_2012_rule_5_2_violation:SUPPRESS]
|
||||
module_param(cfg80211_eapol_offload, int, 0);
|
||||
// coverity[misra_c_2012_rule_21_2_violation:SUPPRESS]
|
||||
MODULE_PARM_DESC(cfg80211_eapol_offload,
|
||||
"0: Disable eapol offload (default); 1: Enable eapol offload");
|
||||
#endif
|
||||
|
||||
module_param(keep_previous_scan, int, 0);
|
||||
MODULE_PARM_DESC(
|
||||
keep_previous_scan,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* driver.
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
|
@ -180,7 +180,7 @@ static struct _card_info card_info_SD8887 = {
|
|||
#endif
|
||||
.sniffer_support = 0,
|
||||
.per_pkt_cfg_support = 0,
|
||||
.host_mlme_required = 0,
|
||||
.host_mlme_required = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
@ -221,7 +221,7 @@ static struct _card_info card_info_SD8897 = {
|
|||
#endif
|
||||
.sniffer_support = 0,
|
||||
.per_pkt_cfg_support = 0,
|
||||
.host_mlme_required = 0,
|
||||
.host_mlme_required = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ static struct _card_info card_info_PCIE8897 = {
|
|||
.fw_stuck_code_reg = 0,
|
||||
.sniffer_support = 0,
|
||||
.per_pkt_cfg_support = 0,
|
||||
.host_mlme_required = 0,
|
||||
.host_mlme_required = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
@ -263,7 +263,7 @@ static struct _card_info card_info_USB8897 = {
|
|||
.fw_name_wlan = USB8897_DEFAULT_WLAN_FW_NAME,
|
||||
.sniffer_support = 0,
|
||||
.per_pkt_cfg_support = 0,
|
||||
.host_mlme_required = 0,
|
||||
.host_mlme_required = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
@ -828,7 +828,7 @@ static struct _card_info card_info_USB8801 = {
|
|||
.fw_name_wlan = USB8801_DEFAULT_WLAN_FW_NAME,
|
||||
.sniffer_support = 1,
|
||||
.per_pkt_cfg_support = 0,
|
||||
.host_mlme_required = 0,
|
||||
.host_mlme_required = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
@ -3232,6 +3232,7 @@ static t_u32 woal_process_init_cfg(moal_handle *handle, t_u8 *data, t_size size)
|
|||
t_size line_len;
|
||||
t_u8 index = 0;
|
||||
t_u32 i;
|
||||
int j;
|
||||
t_u8 bss_mac_addr[MAX_MAC_ADDR_LEN];
|
||||
t_u8 bss_mac_name[MAX_PARAM_LEN];
|
||||
t_u8 type[MAX_PARAM_LEN];
|
||||
|
|
@ -3266,9 +3267,14 @@ static t_u32 woal_process_init_cfg(moal_handle *handle, t_u8 *data, t_size size)
|
|||
__LINE__);
|
||||
goto done;
|
||||
}
|
||||
strncpy(bss_mac_name, intf_s + 1,
|
||||
intf_e - intf_s - 1);
|
||||
bss_mac_name[intf_e - intf_s - 1] = '\0';
|
||||
j = (int)((intf_e - intf_s) - 1);
|
||||
if (j < 0) {
|
||||
PRINTM(MERROR,
|
||||
"Incorrect interface name size %d\n",
|
||||
__LINE__);
|
||||
goto done;
|
||||
}
|
||||
bss_mac_name[j] = '\0';
|
||||
for (i = 0; i < handle->priv_num; i++) {
|
||||
if (strcmp(bss_mac_name,
|
||||
handle->priv[i]
|
||||
|
|
@ -3362,9 +3368,16 @@ static t_u32 woal_process_init_cfg(moal_handle *handle, t_u8 *data, t_size size)
|
|||
__LINE__);
|
||||
goto done;
|
||||
}
|
||||
j = (int)(intf_e - intf_s);
|
||||
if (j < 0) {
|
||||
PRINTM(MERROR,
|
||||
"Regsier offset is negative %d\n",
|
||||
__LINE__);
|
||||
goto done;
|
||||
}
|
||||
/* Copy offset */
|
||||
strncpy(offset, intf_s, intf_e - intf_s);
|
||||
offset[intf_e - intf_s] = '\0';
|
||||
strncpy(offset, intf_s, j);
|
||||
offset[j] = '\0';
|
||||
} else {
|
||||
PRINTM(MERROR, "Wrong config file format %d\n",
|
||||
__LINE__);
|
||||
|
|
@ -3452,8 +3465,7 @@ static mlan_status woal_process_hostcmd_cfg(moal_handle *handle, t_u8 *data,
|
|||
cmd_len = *((t_u16 *)(buf + strlen(CMD_STR) +
|
||||
sizeof(t_u32) + sizeof(t_u16)));
|
||||
moal_memcpy_ext(handle, buf + strlen(CMD_STR), &cmd_len,
|
||||
sizeof(t_u32),
|
||||
CMD_BUF_LEN - strlen(CMD_STR));
|
||||
sizeof(t_u32), sizeof(t_u32));
|
||||
|
||||
/* fire the hostcommand from here */
|
||||
woal_priv_hostcmd(handle->priv[0], buf, CMD_BUF_LEN,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains wlan driver specific defines etc.
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
|
@ -2606,6 +2606,9 @@ enum ext_mod_params {
|
|||
EXT_CHAN_TRACK,
|
||||
EXT_DMCS,
|
||||
EXT_PREF_DBC,
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
|
||||
EXT_CFG80211_EAPOL_OFFLOAD,
|
||||
#endif
|
||||
EXT_MAX_PARAM,
|
||||
};
|
||||
|
||||
|
|
@ -3413,118 +3416,118 @@ extern t_u32 drvdbg;
|
|||
#define LOG_CTRL(level) (0)
|
||||
|
||||
#ifdef DEBUG_LEVEL2
|
||||
#define PRINTM_MINFO(level, msg...) \
|
||||
#define PRINTM_MINFO(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MINFO, msg); \
|
||||
if (drvdbg & MINFO) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MWARN(level, msg...) \
|
||||
#define PRINTM_MWARN(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MWARN, msg); \
|
||||
if (drvdbg & MWARN) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MENTRY(level, msg...) \
|
||||
#define PRINTM_MENTRY(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MENTRY, msg); \
|
||||
if (drvdbg & MENTRY) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#else
|
||||
#define PRINTM_MINFO(level, msg...) \
|
||||
#define PRINTM_MINFO(msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define PRINTM_MWARN(level, msg...) \
|
||||
#define PRINTM_MWARN(msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define PRINTM_MENTRY(level, msg...) \
|
||||
#define PRINTM_MENTRY(msg...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#endif /* DEBUG_LEVEL2 */
|
||||
|
||||
#define PRINTM_MFWDP_D(level, msg...) \
|
||||
#define PRINTM_MFWDP_D(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MFWDP_D, msg); \
|
||||
if (drvdbg & MFWDP_D) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MFW_D(level, msg...) \
|
||||
#define PRINTM_MFW_D(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MFW_D, msg); \
|
||||
if (drvdbg & MFW_D) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MCMD_D(level, msg...) \
|
||||
#define PRINTM_MCMD_D(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MCMD_D, msg); \
|
||||
if (drvdbg & MCMD_D) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MDAT_D(level, msg...) \
|
||||
#define PRINTM_MDAT_D(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MDAT_D, msg); \
|
||||
if (drvdbg & MDAT_D) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MIF_D(level, msg...) \
|
||||
#define PRINTM_MIF_D(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MIF_D, msg); \
|
||||
if (drvdbg & MIF_D) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
|
||||
#define PRINTM_MREG(level, msg...) \
|
||||
#define PRINTM_MREG(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MREG, msg); \
|
||||
if (drvdbg & MREG) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MIOCTL(level, msg...) \
|
||||
#define PRINTM_MIOCTL(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MIOCTL, msg); \
|
||||
if (drvdbg & MIOCTL) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MINTR(level, msg...) \
|
||||
#define PRINTM_MINTR(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MINTR, msg); \
|
||||
if (drvdbg & MINTR) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MEVENT(level, msg...) \
|
||||
#define PRINTM_MEVENT(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MEVENT, msg); \
|
||||
if (drvdbg & MEVENT) \
|
||||
printk(msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MCMND(level, msg...) \
|
||||
#define PRINTM_MCMND(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MCMND, msg); \
|
||||
if (drvdbg & MCMND) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MDATA(level, msg...) \
|
||||
#define PRINTM_MDATA(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MDATA, msg); \
|
||||
if (drvdbg & MDATA) \
|
||||
printk(KERN_DEBUG msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MERROR(level, msg...) \
|
||||
#define PRINTM_MERROR(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MERROR, msg); \
|
||||
if (drvdbg & MERROR) \
|
||||
printk(KERN_ERR msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MFATAL(level, msg...) \
|
||||
#define PRINTM_MFATAL(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MFATAL, msg); \
|
||||
if (drvdbg & MFATAL) \
|
||||
printk(KERN_ERR msg); \
|
||||
} while (0)
|
||||
#define PRINTM_MMSG(level, msg...) \
|
||||
#define PRINTM_MMSG(msg...) \
|
||||
do { \
|
||||
woal_print(level, msg); \
|
||||
woal_print(MMSG, msg); \
|
||||
if (drvdbg & MMSG) \
|
||||
printk(KERN_ALERT msg); \
|
||||
} while (0)
|
||||
|
|
@ -3533,7 +3536,7 @@ static inline void woal_print(t_u32 level, char *fmt, ...)
|
|||
{
|
||||
}
|
||||
|
||||
#define PRINTM(level, msg...) PRINTM_##level(level, msg)
|
||||
#define PRINTM(level, msg...) PRINTM_##level(msg)
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* related functions.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2022, 2024 NXP
|
||||
* Copyright 2008-2022, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -226,6 +226,7 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
card_type = CARD_TYPE_PCIE9098;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_PCIE9098,
|
||||
strlen(CARD_PCIE9098), strlen(driver_version));
|
||||
// coverity[string_null:SUPPRESS]
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
|
|
@ -884,6 +885,11 @@ static int woal_pcie_resume(struct pci_dev *pdev)
|
|||
handle->surprise_removed = MFALSE;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
|
||||
woal_do_flr(handle, false, false);
|
||||
#endif
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
|
||||
handle->cfg80211_suspend = MFALSE;
|
||||
#endif
|
||||
#endif
|
||||
} else {
|
||||
if (woal_check_driver_status(handle)) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains functions for proc file.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2022, 2024 NXP
|
||||
* Copyright 2008-2022, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -731,6 +731,7 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
|||
}
|
||||
if (!strncmp(databuf, "drop_point=", strlen("drop_point="))) {
|
||||
line += strlen("drop_point") + 1;
|
||||
// coverity[string_null:SUPPRESS]
|
||||
config_data = (t_u32)woal_string_to_number(line);
|
||||
if (config_data) {
|
||||
handle->tp_acnt.on = 1;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* related functions.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2022, 2024 NXP
|
||||
* Copyright 2008-2022, 2024-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains the callback functions registered to MLAN
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
|
@ -937,6 +937,7 @@ mlan_status moal_get_hw_spec_complete(t_void *pmoal, mlan_status status,
|
|||
moal_memcpy_ext(handle, driver_version, CARD_PCIEAW690,
|
||||
strlen(CARD_PCIEAW690),
|
||||
strlen(driver_version));
|
||||
// coverity[string_null:SUPPRESS]
|
||||
moal_memcpy_ext(handle,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
|
|
@ -947,6 +948,8 @@ mlan_status moal_get_hw_spec_complete(t_void *pmoal, mlan_status status,
|
|||
if (drv_ver_len >= MLAN_MAX_VER_STR_LEN - 1) {
|
||||
drv_ver_len = MLAN_MAX_VER_STR_LEN - 1;
|
||||
}
|
||||
// coverity[overrun-buffer-arg:SUPPRESS]
|
||||
// coverity[cert_arr30_c_violation:SUPPRESS]
|
||||
moal_memcpy_ext(handle, handle->driver_version,
|
||||
driver_version, drv_ver_len,
|
||||
MLAN_MAX_VER_STR_LEN - 1);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains the functions for STA CFG80211.
|
||||
*
|
||||
*
|
||||
* Copyright 2011-2024 NXP
|
||||
* Copyright 2011-2025 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
|
@ -284,6 +284,10 @@ int woal_cfg80211_update_ft_ies(struct wiphy *wiphy, struct net_device *dev,
|
|||
struct cfg80211_update_ft_ies_params *ftie);
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
static mlan_status woal_get_common_rates(struct net_device *dev,
|
||||
struct cfg80211_auth_request *req,
|
||||
t_u32 *tx_control);
|
||||
|
||||
static int woal_cfg80211_authenticate(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
struct cfg80211_auth_request *req);
|
||||
|
|
@ -2325,6 +2329,105 @@ done:
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function calculates common rates supported
|
||||
* by AP and STA and updates tx_control
|
||||
* value.
|
||||
*
|
||||
* @param dev A pointer to net_device
|
||||
*
|
||||
* @param req A pointer to cfg80211_auth_request
|
||||
*
|
||||
* @param tx_control Output: Updated value of tx_control
|
||||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
|
||||
static mlan_status woal_get_common_rates(struct net_device *dev,
|
||||
struct cfg80211_auth_request *req,
|
||||
t_u32 *tx_control)
|
||||
{
|
||||
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
mlan_scan_resp scan_resp;
|
||||
BSSDescriptor_t *scan_table;
|
||||
int i, k, j;
|
||||
t_u8 *prate = {0};
|
||||
t_u8 rateIndex = 0xff;
|
||||
t_u8 baserates[] = {0x82, 0x84, 0x8b, 0x96, 0x8c, 0x98, 0xb0};
|
||||
|
||||
ENTER();
|
||||
memset(&scan_resp, 0, sizeof(scan_resp));
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_get_scan_table(priv, MOAL_NO_WAIT, &scan_resp)) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
// Fetch supported rates of AP from scan table
|
||||
if (scan_resp.num_in_scan_table) {
|
||||
scan_table = (BSSDescriptor_t *)scan_resp.pscan_table;
|
||||
for (i = 0; i < (int)scan_resp.num_in_scan_table; i++) {
|
||||
if (req->bss) {
|
||||
if (!memcmp(req->bss->bssid,
|
||||
scan_table[i].mac_address,
|
||||
ETH_ALEN)) {
|
||||
prate = (t_u8 *)&(
|
||||
scan_table[i].supported_rates);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
PRINTM(MMSG, "bssid not found in scan list\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
// Calculate rate index value for rate defined in baserates
|
||||
// which is supported by both AP and STA
|
||||
for (j = 0; (j < WLAN_SUPPORTED_RATES && prate[j] != 0); j++) {
|
||||
if (prate[j] >= 0x82) {
|
||||
for (k = 0; k < sizeof(baserates); k++) {
|
||||
if (prate[j] == baserates[k] && k < rateIndex)
|
||||
rateIndex = k;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rateIndex == 0xff) {
|
||||
PRINTM(MMSG, "AP and STA have no rates as common\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
*tx_control |= 1 << 15;
|
||||
switch (baserates[rateIndex]) {
|
||||
case 0x82:
|
||||
*tx_control |= 0 << 16;
|
||||
break;
|
||||
case 0x84:
|
||||
*tx_control |= 1 << 16;
|
||||
break;
|
||||
case 0x8b:
|
||||
*tx_control |= 2 << 16;
|
||||
break;
|
||||
case 0x96:
|
||||
*tx_control |= 3 << 16;
|
||||
break;
|
||||
case 0x8c:
|
||||
*tx_control |= 5 << 16;
|
||||
break;
|
||||
case 0x98:
|
||||
*tx_control |= 7 << 16;
|
||||
break;
|
||||
case 0xb0:
|
||||
*tx_control |= 9 << 16;
|
||||
break;
|
||||
default:
|
||||
*tx_control = 0;
|
||||
PRINTM(MMSG, "Not support the base rates");
|
||||
break;
|
||||
}
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
/**
|
||||
* @brief This function is authentication handler when host MLME
|
||||
* enable.
|
||||
|
|
@ -2435,6 +2538,10 @@ static int woal_cfg80211_authenticate(struct wiphy *wiphy,
|
|||
}
|
||||
kfree(ssid_bssid);
|
||||
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_get_common_rates(dev, req, &tx_control)) {
|
||||
tx_control = 0;
|
||||
}
|
||||
if ((priv->auth_alg != WLAN_AUTH_SAE) &&
|
||||
(priv->auth_flag & HOST_MLME_AUTH_PENDING)) {
|
||||
PRINTM(MERROR, "pending auth on going\n");
|
||||
|
|
@ -2638,7 +2745,6 @@ static int woal_cfg80211_authenticate(struct wiphy *wiphy,
|
|||
pbuf = pmbuf->pbuf + pmbuf->data_offset;
|
||||
}
|
||||
pkt_type = MRVL_PKT_TYPE_MGMT_FRAME;
|
||||
tx_control = 0;
|
||||
/* Add pkt_type and tx_control */
|
||||
moal_memcpy_ext(priv->phandle, pbuf, &pkt_type, sizeof(pkt_type),
|
||||
sizeof(pkt_type));
|
||||
|
|
@ -3539,6 +3645,7 @@ int woal_cfg80211_assoc(moal_private *priv, void *sme, t_u8 wait_option,
|
|||
priv->phandle->card_info->embedded_supp) {
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_cfg80211_set_psk(priv, conn_param)) {
|
||||
PRINTM(MERROR, "Embedded supplicant: set psk failed\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
|
@ -10880,9 +10987,12 @@ mlan_status woal_register_cfg80211(moal_private *priv)
|
|||
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
|
||||
/* Enable support for offloading EAPOL handshakes for WPA/WPA2. */
|
||||
if (!moal_extflg_isset(priv->phandle, EXT_HOST_MLME))
|
||||
if (!moal_extflg_isset(priv->phandle, EXT_HOST_MLME) &&
|
||||
priv->phandle->card_info->embedded_supp &&
|
||||
moal_extflg_isset(priv->phandle, EXT_CFG80211_EAPOL_OFFLOAD)) {
|
||||
wiphy_ext_feature_set(
|
||||
wiphy, NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
|
||||
|
|
|
|||
16
script/load
16
script/load
|
|
@ -1,16 +0,0 @@
|
|||
#! /bin/bash
|
||||
if echo $1 2>&1 | grep dbg > /dev/null; then
|
||||
insmod mlan-dbg.ko
|
||||
else
|
||||
insmod mlan.ko
|
||||
fi
|
||||
insmod $1.ko $2 $3 $4 $5 $6 $7 $8
|
||||
for (( i = 1; i <= 10; i++ ))
|
||||
do
|
||||
ifconfig -a 2>&1 | grep -E "(mlan0|uap0|wfd0)" > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
exit
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#! /bin/bash
|
||||
ifconfig mlan0 down
|
||||
ifconfig uap0 down
|
||||
ifconfig mmlan0 down
|
||||
ifconfig muap0 down
|
||||
ifconfig uap1 down
|
||||
ifconfig muap1 down
|
||||
ifconfig wfd0 down
|
||||
ifconfig wfd1 down
|
||||
ifconfig mwfd0 down
|
||||
ifconfig mwfd1 down
|
||||
ifconfig nan0 down
|
||||
ifconfig mnan0 down
|
||||
for (( i = 0; i <= 30; i++ ))
|
||||
do
|
||||
rmmod moal 2> /dev/null
|
||||
lsmod 2>&1 | grep moal > /dev/null
|
||||
if [ ! $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
rmmod mlan
|
||||
sleep 5
|
||||
Loading…
Add table
Reference in a new issue