mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2025-01-15 16:25:35 +00:00
MA-21616 [Android_8MP_EVK] WiFi: Device reboot when accessing webpage
Reason: this issue same as WCSWREL-468,which WCS has provide the p3 patch to fix this issue Test: i.MX 8MP Change-Id: I07327ba3f784e7c842c477e883f985a8ebbf1e26 Signed-off-by: yunjie <yunjie.jia@nxp.com>
This commit is contained in:
parent
5de735a978
commit
e6e7751008
27 changed files with 688 additions and 273 deletions
|
@ -93,10 +93,8 @@ CONFIG_BIG_ENDIAN=n
|
|||
|
||||
|
||||
|
||||
#ifdef SDIO_MMC
|
||||
# SDIO suspend/resume
|
||||
CONFIG_SDIO_SUSPEND_RESUME=y
|
||||
#endif
|
||||
|
||||
# DFS testing support
|
||||
CONFIG_DFS_TESTING_SUPPORT=y
|
||||
|
@ -108,6 +106,8 @@ CONFIG_MULTI_CHAN_SUPPORT=y
|
|||
|
||||
CONFIG_DUMP_TO_PROC=y
|
||||
|
||||
CONFIG_TASKLET_SUPPORT=n
|
||||
|
||||
|
||||
#32bit app over 64bit kernel support
|
||||
CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n
|
||||
|
@ -200,11 +200,9 @@ ifeq ($(CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT),y)
|
|||
ccflags-y += -DUSERSPACE_32BIT_OVER_KERNEL_64BIT
|
||||
endif
|
||||
|
||||
#ifdef SDIO_MMC
|
||||
ifeq ($(CONFIG_SDIO_SUSPEND_RESUME),y)
|
||||
ccflags-y += -DSDIO_SUSPEND_RESUME
|
||||
endif
|
||||
#endif
|
||||
|
||||
ifeq ($(CONFIG_MULTI_CHAN_SUPPORT),y)
|
||||
ccflags-y += -DMULTI_CHAN_SUPPORT
|
||||
|
@ -224,6 +222,10 @@ ifeq ($(CONFIG_DUMP_TO_PROC), y)
|
|||
ccflags-y += -DDUMP_TO_PROC
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TASKLET_SUPPORT), y)
|
||||
ccflags-y += -DTASKLET_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OPENWRT_SUPPORT), y)
|
||||
ccflags-y += -DOPENWRT
|
||||
endif
|
||||
|
@ -330,12 +332,10 @@ ifeq ($(CONFIG_PCIEIW624),y)
|
|||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIEIW624
|
||||
endif
|
||||
#ifdef PCIEAW693_OPT
|
||||
ifeq ($(CONFIG_PCIEAW693),y)
|
||||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIEAW693
|
||||
endif
|
||||
#endif
|
||||
ifeq ($(CONFIG_SDIO),y)
|
||||
ccflags-y += -DSDIO
|
||||
ccflags-y += -DSDIO_MMC
|
||||
|
|
|
@ -947,9 +947,9 @@ mlan_status wlan_ret_802_11d_domain_info(mlan_private *pmpriv,
|
|||
/* Dump domain info response data */
|
||||
HEXDUMP("11D: DOMAIN Info Rsp Data", (t_u8 *)resp, resp->size);
|
||||
|
||||
no_of_sub_band = (t_u8)(
|
||||
(wlan_le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) /
|
||||
sizeof(IEEEtypes_SubbandSet_t));
|
||||
no_of_sub_band = (t_u8)((wlan_le16_to_cpu(domain->header.len) -
|
||||
COUNTRY_CODE_LEN) /
|
||||
sizeof(IEEEtypes_SubbandSet_t));
|
||||
|
||||
PRINTM(MINFO, "11D Domain Info Resp: number of sub-band=%d\n",
|
||||
no_of_sub_band);
|
||||
|
|
|
@ -3019,10 +3019,11 @@ int wlan_send_addba(mlan_private *priv, int tid, t_u8 *peer_mac)
|
|||
PRINTM(MCMND, "Send addba: TID %d, " MACSTR "\n", tid,
|
||||
MAC2STR(peer_mac));
|
||||
|
||||
add_ba_req.block_ack_param_set = (t_u16)(
|
||||
(tid << BLOCKACKPARAM_TID_POS) |
|
||||
(priv->add_ba_param.tx_win_size << BLOCKACKPARAM_WINSIZE_POS) |
|
||||
IMMEDIATE_BLOCK_ACK);
|
||||
add_ba_req.block_ack_param_set =
|
||||
(t_u16)((tid << BLOCKACKPARAM_TID_POS) |
|
||||
(priv->add_ba_param.tx_win_size
|
||||
<< BLOCKACKPARAM_WINSIZE_POS) |
|
||||
IMMEDIATE_BLOCK_ACK);
|
||||
/** enable AMSDU inside AMPDU */
|
||||
if (priv->add_ba_param.tx_amsdu &&
|
||||
(priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED))
|
||||
|
|
|
@ -209,7 +209,11 @@ static mlan_status wlan_11n_dispatch_pkt_until_start_win(
|
|||
}
|
||||
|
||||
/* clear the bits of reorder bitmap that has been dispatched */
|
||||
rx_reor_tbl_ptr->bitmap = rx_reor_tbl_ptr->bitmap >> no_pkt_to_send;
|
||||
if (no_pkt_to_send < (8 * (sizeof(rx_reor_tbl_ptr->bitmap))))
|
||||
rx_reor_tbl_ptr->bitmap =
|
||||
rx_reor_tbl_ptr->bitmap >> no_pkt_to_send;
|
||||
else
|
||||
rx_reor_tbl_ptr->bitmap = 0;
|
||||
|
||||
rx_reor_tbl_ptr->start_win = start_win;
|
||||
pmpriv->adapter->callbacks.moal_spin_unlock(
|
||||
|
@ -290,7 +294,10 @@ static mlan_status wlan_11n_scan_and_dispatch(t_void *priv,
|
|||
}
|
||||
|
||||
/* clear the bits of reorder bitmap that has been dispatched */
|
||||
rx_reor_tbl_ptr->bitmap = rx_reor_tbl_ptr->bitmap >> i;
|
||||
if (i < (8 * sizeof(rx_reor_tbl_ptr->bitmap)))
|
||||
rx_reor_tbl_ptr->bitmap = rx_reor_tbl_ptr->bitmap >> i;
|
||||
else
|
||||
rx_reor_tbl_ptr->bitmap = 0;
|
||||
|
||||
rx_reor_tbl_ptr->start_win =
|
||||
(rx_reor_tbl_ptr->start_win + i) & (MAX_TID_VALUE - 1);
|
||||
|
|
|
@ -691,20 +691,21 @@ static cfp_table_t cfp_table_A[] = {
|
|||
/** Number of the CFP tables for 5GHz */
|
||||
#define MLAN_CFP_TABLE_SIZE_A (NELEMENTS(cfp_table_A))
|
||||
|
||||
enum { RATEID_DBPSK1Mbps, //(0)
|
||||
RATEID_DQPSK2Mbps, //(1)
|
||||
RATEID_CCK5_5Mbps, //(2)
|
||||
RATEID_CCK11Mbps, //(3)
|
||||
RATEID_CCK22Mbps, //(4)
|
||||
RATEID_OFDM6Mbps, //(5)
|
||||
RATEID_OFDM9Mbps, //(6)
|
||||
RATEID_OFDM12Mbps, //(7)
|
||||
RATEID_OFDM18Mbps, //(8)
|
||||
RATEID_OFDM24Mbps, //(9)
|
||||
RATEID_OFDM36Mbps, //(10)
|
||||
RATEID_OFDM48Mbps, //(11)
|
||||
RATEID_OFDM54Mbps, //(12)
|
||||
RATEID_OFDM72Mbps, //(13)
|
||||
enum {
|
||||
RATEID_DBPSK1Mbps, //(0)
|
||||
RATEID_DQPSK2Mbps, //(1)
|
||||
RATEID_CCK5_5Mbps, //(2)
|
||||
RATEID_CCK11Mbps, //(3)
|
||||
RATEID_CCK22Mbps, //(4)
|
||||
RATEID_OFDM6Mbps, //(5)
|
||||
RATEID_OFDM9Mbps, //(6)
|
||||
RATEID_OFDM12Mbps, //(7)
|
||||
RATEID_OFDM18Mbps, //(8)
|
||||
RATEID_OFDM24Mbps, //(9)
|
||||
RATEID_OFDM36Mbps, //(10)
|
||||
RATEID_OFDM48Mbps, //(11)
|
||||
RATEID_OFDM54Mbps, //(12)
|
||||
RATEID_OFDM72Mbps, //(13)
|
||||
};
|
||||
|
||||
static const t_u8 rateUnit_500Kbps[] = {
|
||||
|
@ -1685,12 +1686,12 @@ t_u32 wlan_index_to_data_rate(pmlan_adapter pmadapter, t_u8 index,
|
|||
if (gi > 0)
|
||||
gi = gi - 1;
|
||||
|
||||
//#ifdef ENABLE_802_11AX
|
||||
// TODO: hardcode he_tone here, wait for FW value ready.
|
||||
// #ifdef ENABLE_802_11AX
|
||||
// TODO: hardcode he_tone here, wait for FW value ready.
|
||||
// he_tone = 4;
|
||||
|
||||
// he_tone = (ext_rate_info & 0xE) >> 1;
|
||||
//#endif
|
||||
// #endif
|
||||
|
||||
if ((index >> 4) == 1) {
|
||||
switch (mcs_index) {
|
||||
|
@ -1936,9 +1937,9 @@ t_u8 wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u16 band,
|
|||
(cfp_a + j)
|
||||
->max_tx_power);
|
||||
else
|
||||
tx_power = (t_u8)(
|
||||
(cfp_a + j)
|
||||
->max_tx_power);
|
||||
tx_power =
|
||||
(t_u8)((cfp_a + j)
|
||||
->max_tx_power);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3537,14 +3537,16 @@ t_void wlan_check_ps_cond(mlan_adapter *pmadapter)
|
|||
|
||||
if (!pmadapter->cmd_sent && !pmadapter->curr_cmd &&
|
||||
!pmadapter->keep_wakeup && !wlan_is_tx_pending(pmadapter) &&
|
||||
!pmadapter->event_cause && !IS_CARD_RX_RCVD(pmadapter)) {
|
||||
!wlan_is_rx_pending(pmadapter) && !pmadapter->event_cause &&
|
||||
!IS_CARD_RX_RCVD(pmadapter)) {
|
||||
wlan_dnld_sleep_confirm_cmd(pmadapter);
|
||||
} else {
|
||||
PRINTM(MCMND, "Delay Sleep Confirm (%s%s%s%s)\n",
|
||||
PRINTM(MCMND, "Delay Sleep Confirm (%s%s%s%s%s%s)\n",
|
||||
(pmadapter->cmd_sent) ? "D" : "",
|
||||
(pmadapter->curr_cmd) ? "C" : "",
|
||||
(pmadapter->event_cause) ? "V" : "",
|
||||
(wlan_is_tx_pending(pmadapter)) ? "T" : "",
|
||||
(wlan_is_rx_pending(pmadapter)) ? "P" : "",
|
||||
(IS_CARD_RX_RCVD(pmadapter)) ? "R" : "");
|
||||
}
|
||||
|
||||
|
@ -5372,8 +5374,9 @@ mlan_status wlan_process_csi_event(pmlan_private pmpriv)
|
|||
MLAN_MEM_DEF, &evt_buf);
|
||||
if ((status == MLAN_STATUS_SUCCESS) && evt_buf) {
|
||||
t_u16 csi_sig;
|
||||
pcsi_record_ds csi_record = (pcsi_record_ds)(
|
||||
pmbuf->pbuf + pmbuf->data_offset + sizeof(eventcause));
|
||||
pcsi_record_ds csi_record =
|
||||
(pcsi_record_ds)(pmbuf->pbuf + pmbuf->data_offset +
|
||||
sizeof(eventcause));
|
||||
/* Check CSI signature */
|
||||
csi_sig = csi_record->CSI_Sign;
|
||||
if (csi_sig != CSI_SIGNATURE) {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define _MLAN_DECL_H_
|
||||
|
||||
/** MLAN release version */
|
||||
#define MLAN_RELEASE_VERSION "408.p2"
|
||||
#define MLAN_RELEASE_VERSION "408.p3"
|
||||
|
||||
/** Re-define generic data types for MLAN/MOAL */
|
||||
/** Signed char (1-byte) */
|
||||
|
@ -275,7 +275,7 @@ typedef t_s32 t_sval;
|
|||
|
||||
#ifdef PCIE
|
||||
/* Interrupt type */
|
||||
enum { RX_DATA, RX_EVENT, TX_COMPLETE, RX_CMD_RESP };
|
||||
enum { RX_DATA, RX_EVENT, TX_COMPLETE, RX_CMD_RESP, RX_CMD_DNLD };
|
||||
#endif
|
||||
#ifdef USB
|
||||
#define MLAN_USB_BLOCK_SIZE (512)
|
||||
|
@ -936,29 +936,34 @@ enum mlan_channel_type {
|
|||
};
|
||||
|
||||
/** channel band */
|
||||
enum { BAND_2GHZ = 0,
|
||||
BAND_5GHZ = 1,
|
||||
BAND_6GHZ = 2,
|
||||
BAND_4GHZ = 3,
|
||||
enum {
|
||||
BAND_2GHZ = 0,
|
||||
BAND_5GHZ = 1,
|
||||
BAND_6GHZ = 2,
|
||||
BAND_4GHZ = 3,
|
||||
};
|
||||
|
||||
/** channel offset */
|
||||
enum { SEC_CHAN_NONE = 0,
|
||||
SEC_CHAN_ABOVE = 1,
|
||||
SEC_CHAN_5MHZ = 2,
|
||||
SEC_CHAN_BELOW = 3 };
|
||||
enum {
|
||||
SEC_CHAN_NONE = 0,
|
||||
SEC_CHAN_ABOVE = 1,
|
||||
SEC_CHAN_5MHZ = 2,
|
||||
SEC_CHAN_BELOW = 3
|
||||
};
|
||||
|
||||
/** channel bandwidth */
|
||||
enum { CHAN_BW_20MHZ = 0,
|
||||
CHAN_BW_10MHZ,
|
||||
CHAN_BW_40MHZ,
|
||||
CHAN_BW_80MHZ,
|
||||
enum {
|
||||
CHAN_BW_20MHZ = 0,
|
||||
CHAN_BW_10MHZ,
|
||||
CHAN_BW_40MHZ,
|
||||
CHAN_BW_80MHZ,
|
||||
};
|
||||
|
||||
/** scan mode */
|
||||
enum { SCAN_MODE_MANUAL = 0,
|
||||
SCAN_MODE_ACS,
|
||||
SCAN_MODE_USER,
|
||||
enum {
|
||||
SCAN_MODE_MANUAL = 0,
|
||||
SCAN_MODE_ACS,
|
||||
SCAN_MODE_USER,
|
||||
};
|
||||
|
||||
/** DFS state */
|
||||
|
|
|
@ -672,7 +672,7 @@ static int wlan_update_rsn_ie(mlan_private *pmpriv,
|
|||
t_u8 preference_selected;
|
||||
t_u8 cipher_selected_id;
|
||||
#if 0 // defined(ENABLE_GCMP_SUPPORT)
|
||||
// embedded supplicant doesn't support GCMP yet
|
||||
// embedded supplicant doesn't support GCMP yet
|
||||
t_u8 cipher_preference[11] = {0, 0, 1, 0, 2, 0, 0, 0, 4, 5, 3};
|
||||
#else
|
||||
t_u8 cipher_preference[5] = {0, 0, 1, 0, 2};
|
||||
|
|
|
@ -2189,6 +2189,8 @@ typedef struct _mlan_pcie_card {
|
|||
t_u32 pcie_int_mode;
|
||||
/** PCIE function number */
|
||||
t_u8 func_num;
|
||||
/** rx interrupt pending */
|
||||
t_u8 rx_pending;
|
||||
/** pending num of tx ring buffer in firmware */
|
||||
t_u8 txbd_pending;
|
||||
/** Write pointer for TXBD ring */
|
||||
|
@ -2351,6 +2353,16 @@ struct _mlan_adapter {
|
|||
#ifdef PCIE
|
||||
/** rx data lock to synchronize wlan_pcie_process_recv_data */
|
||||
t_void *pmlan_rx_lock;
|
||||
/** PCIe rx process */
|
||||
t_u8 pcie_rx_processing;
|
||||
/** PCIe event process */
|
||||
t_u8 pcie_event_processing;
|
||||
/** PCIe tx process */
|
||||
t_u8 pcie_tx_processing;
|
||||
/** pcie cmd_dnld_int flag */
|
||||
t_u8 pcie_cmd_dnld_int;
|
||||
/** more_tx_task_flag */
|
||||
t_u32 more_tx_task_flag;
|
||||
/** tx data lock to synchronize send_data and send_data_complete */
|
||||
t_void *pmlan_tx_lock;
|
||||
/** event lock to synchronize process_event and event_ready */
|
||||
|
@ -2731,6 +2743,8 @@ struct _mlan_adapter {
|
|||
t_u8 wakeup_fw_timer_is_set;
|
||||
/** Number of wake up timeouts */
|
||||
t_u32 pm_wakeup_timeout;
|
||||
/** Card wakeup flag */
|
||||
t_u8 pm_wakeup_flag;
|
||||
|
||||
/** Host Sleep configured flag */
|
||||
t_u8 is_hs_configured;
|
||||
|
@ -2988,6 +3002,21 @@ static inline t_u8 wlan_is_tx_pending(mlan_adapter *pmadapter)
|
|||
return MFALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief check if Rx pending
|
||||
*
|
||||
* @param pmadapter Pointer to mlan_adapter
|
||||
* @return MTRUE/MFALSE;
|
||||
*/
|
||||
static inline t_u8 wlan_is_rx_pending(mlan_adapter *pmadapter)
|
||||
{
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type) && pmadapter->pcard_pcie->rx_pending)
|
||||
return MTRUE;
|
||||
#endif
|
||||
return MFALSE;
|
||||
}
|
||||
|
||||
/** process host cmd */
|
||||
mlan_status wlan_misc_ioctl_host_cmd(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
|
|
@ -693,7 +693,9 @@ t_void wlan_wakeup_card_timeout_func(void *function_context)
|
|||
PRINTM(MERROR, "Wakeup card timeout(%d)!\n",
|
||||
pmadapter->pm_wakeup_timeout);
|
||||
pmadapter->pm_wakeup_timeout++;
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DBG_DUMP, MNULL);
|
||||
pmadapter->pm_wakeup_flag = MTRUE;
|
||||
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL);
|
||||
}
|
||||
pmadapter->wakeup_fw_timer_is_set = MFALSE;
|
||||
|
||||
|
|
|
@ -1718,7 +1718,7 @@ static mlan_status wlan_pcie_send_data_complete(mlan_adapter *pmadapter)
|
|||
wrptr = rdptr & 0xffff;
|
||||
rdptr = rdptr >> ADMA_RPTR_START;
|
||||
if (wrptr != pmadapter->pcard_pcie->txbd_wrptr)
|
||||
PRINTM(MERROR, "wlan: Unexpected wrptr 0x%x 0x%x\n",
|
||||
PRINTM(MINFO, "wlan: Unexpected wrptr 0x%x 0x%x\n",
|
||||
wrptr, pmadapter->pcard_pcie->txbd_wrptr);
|
||||
}
|
||||
|
||||
|
@ -1742,7 +1742,6 @@ static mlan_status wlan_pcie_send_data_complete(mlan_adapter *pmadapter)
|
|||
break;
|
||||
}
|
||||
unmap_count++;
|
||||
pmadapter->pcard_pcie->txbd_pending--;
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
if (pmadapter->pcard_pcie->txbd_flush)
|
||||
wlan_write_data_complete(pmadapter, pmbuf,
|
||||
|
@ -1800,10 +1799,57 @@ static mlan_status wlan_pcie_send_data_complete(mlan_adapter *pmadapter)
|
|||
}
|
||||
#endif
|
||||
done:
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
pmadapter->pcard_pcie->txbd_pending -= unmap_count;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function process pcie tx_complete
|
||||
*
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void wlan_pcie_process_tx_complete(mlan_adapter *pmadapter)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
ENTER();
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->pmlan_tx_lock);
|
||||
if (pmadapter->pcie_tx_processing) {
|
||||
pmadapter->more_tx_task_flag = MTRUE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
goto exit_tx_proc;
|
||||
} else {
|
||||
pmadapter->pcie_tx_processing = MTRUE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
}
|
||||
tx_process_start:
|
||||
wlan_pcie_send_data_complete(pmadapter);
|
||||
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->pmlan_tx_lock);
|
||||
if (pmadapter->more_tx_task_flag) {
|
||||
pmadapter->more_tx_task_flag = MFALSE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
goto tx_process_start;
|
||||
}
|
||||
pmadapter->pcie_tx_processing = MFALSE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
exit_tx_proc:
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
#define PCIE_TXBD_NOT_FULL(wrptr, rdptr, mask, rollover_ind) \
|
||||
(((wrptr & mask) != (rdptr & mask)) || \
|
||||
|
@ -1921,6 +1967,10 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
|||
PRINTM(MDAT_D,
|
||||
"SEND DATA: Attach pmbuf %p at tx_ring[%d], txbd_wrptr=0x%x\n",
|
||||
pmbuf, wrindx, pmadapter->pcard_pcie->txbd_wrptr);
|
||||
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
|
||||
pmadapter->pcard_pcie->tx_buf_list[wrindx] = pmbuf;
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
if (!pmadapter->pcard_pcie->reg->use_adma) {
|
||||
|
@ -1938,8 +1988,6 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
|||
pmadapter->pcard_pcie->last_tx_pkt_size[wrindx] =
|
||||
pmbuf->data_len;
|
||||
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
pmadapter->pcard_pcie->txbd_wrptr++;
|
||||
if ((pmadapter->pcard_pcie->txbd_wrptr &
|
||||
txrx_rw_ptr_mask) == num_tx_buffs)
|
||||
|
@ -1986,12 +2034,9 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
|||
(pmadapter->pcard_pcie->txbd_wrptr << wr_ptr_start) |
|
||||
rxbd_val);
|
||||
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
if (!pmadapter->pcard_pcie->reg->use_adma) {
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
}
|
||||
#endif
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
|
||||
if (status) {
|
||||
PRINTM(MERROR,
|
||||
"SEND DATA: failed to write REG_TXBD_WRPTR\n");
|
||||
|
@ -2006,7 +2051,7 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
|||
if (wlan_check_txbd_not_full(pmadapter))
|
||||
pmadapter->data_sent = MFALSE;
|
||||
else
|
||||
wlan_pcie_send_data_complete(pmadapter);
|
||||
wlan_pcie_process_tx_complete(pmadapter);
|
||||
if (pmadapter->data_sent)
|
||||
pmadapter->data_sent_cnt++;
|
||||
|
||||
|
@ -2044,8 +2089,13 @@ done_unmap:
|
|||
PRINTM(MERROR, "SEND DATA: failed to moal_unmap_memory\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
pmadapter->pcard_pcie->txbd_pending--;
|
||||
pmadapter->pcard_pcie->tx_buf_list[wrindx] = MNULL;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
if (!pmadapter->pcard_pcie->reg->use_adma && ptx_bd_buf) {
|
||||
ptx_bd_buf->paddr = 0;
|
||||
|
@ -2809,13 +2859,6 @@ static mlan_status wlan_pcie_process_event_ready(mlan_adapter *pmadapter)
|
|||
adma_dual_desc_buf *padma_bd_buf;
|
||||
ENTER();
|
||||
|
||||
if (pmadapter->event_received || pmadapter->event_cause) {
|
||||
PRINTM(MINFO, "Event being processed, do not "
|
||||
"process this interrupt just yet\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (rd_index >= MLAN_MAX_EVT_BD) {
|
||||
PRINTM(MINFO, "Invalid rd_index...\n");
|
||||
LEAVE();
|
||||
|
@ -2929,6 +2972,42 @@ static mlan_status wlan_pcie_process_event_ready(mlan_adapter *pmadapter)
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function process pcie received event
|
||||
*
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void wlan_pcie_process_event(mlan_adapter *pmadapter)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
ENTER();
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
if (pmadapter->pcie_event_processing || pmadapter->event_received ||
|
||||
pmadapter->event_cause) {
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
goto exit_event_proc;
|
||||
} else {
|
||||
pmadapter->pcie_event_processing = MTRUE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
}
|
||||
wlan_pcie_process_event_ready(pmadapter);
|
||||
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
pmadapter->pcie_event_processing = MFALSE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
exit_event_proc:
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles event completion
|
||||
*
|
||||
|
@ -2952,11 +3031,6 @@ static mlan_status wlan_pcie_event_complete(mlan_adapter *pmadapter,
|
|||
adma_dual_desc_buf *padma_bd_buf;
|
||||
|
||||
ENTER();
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
|
||||
pmadapter->event_cause = 0;
|
||||
pmadapter->pmlan_buffer_event = MNULL;
|
||||
|
||||
if (!pmbuf) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
@ -3060,11 +3134,18 @@ done:
|
|||
if (ret && pmbuf)
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
|
||||
PRINTM(MINFO, "EvtCom: Check Events Again\n");
|
||||
ret = wlan_pcie_process_event_ready(pmadapter);
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
|
||||
pmadapter->event_cause = 0;
|
||||
pmadapter->pmlan_buffer_event = MNULL;
|
||||
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
|
||||
PRINTM(MINFO, "EvtCom: Check Events Again\n");
|
||||
wlan_pcie_process_event(pmadapter);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
@ -3660,6 +3741,11 @@ mlan_status wlan_process_msix_int(mlan_adapter *pmadapter)
|
|||
}
|
||||
if (pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_upld_rdy) {
|
||||
PRINTM(MINFO, "Rx DATA\n");
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
pmadapter->pcard_pcie->rx_pending = MTRUE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_DATA, MNULL);
|
||||
}
|
||||
|
@ -3678,10 +3764,7 @@ mlan_status wlan_process_msix_int(mlan_adapter *pmadapter)
|
|||
}
|
||||
if (pmadapter->pcard_pcie->reg->host_intr_cmd_dnld &&
|
||||
(pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_cmd_dnld)) {
|
||||
if (pmadapter->cmd_sent)
|
||||
pmadapter->cmd_sent = MFALSE;
|
||||
if (pmadapter->pcard_pcie->vdll_cmd_buf)
|
||||
wlan_pcie_send_vdll_complete(pmadapter);
|
||||
pmadapter->pcie_cmd_dnld_int = MTRUE;
|
||||
PRINTM(MINFO, "<--- CMD DNLD DONE Interrupt --->\n");
|
||||
}
|
||||
PRINTM(MINFO, "cmd_sent=%d data_sent=%d\n", pmadapter->cmd_sent,
|
||||
|
@ -3769,6 +3852,11 @@ static mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
|
|||
pcie_ireg &=
|
||||
~pmadapter->pcard_pcie->reg->host_intr_upld_rdy;
|
||||
PRINTM(MINFO, "Rx DATA\n");
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
pmadapter->pcard_pcie->rx_pending = MTRUE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 0, 0);
|
||||
wlan_recv_event(wlan_get_priv(pmadapter,
|
||||
|
@ -3802,10 +3890,7 @@ static mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
|
|||
pmadapter->pcard_pcie->reg->host_intr_cmd_dnld)) {
|
||||
pcie_ireg &=
|
||||
~pmadapter->pcard_pcie->reg->host_intr_cmd_dnld;
|
||||
if (pmadapter->cmd_sent)
|
||||
pmadapter->cmd_sent = MFALSE;
|
||||
if (pmadapter->pcard_pcie->vdll_cmd_buf)
|
||||
wlan_pcie_send_vdll_complete(pmadapter);
|
||||
pmadapter->pcie_cmd_dnld_int = MTRUE;
|
||||
PRINTM(MINFO, "<--- CMD DNLD DONE Interrupt --->\n");
|
||||
}
|
||||
if (pmadapter->pcard_pcie->pcie_int_mode == PCIE_INT_MODE_MSI) {
|
||||
|
@ -4079,7 +4164,6 @@ mlan_status wlan_pcie_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -4089,13 +4173,7 @@ mlan_status wlan_pcie_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
}
|
||||
|
||||
if (type == MLAN_TYPE_DATA) {
|
||||
/* synchronize with send_data_complete to sync both txbd_rdptr
|
||||
* and txbd_wrptr */
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
ret = wlan_pcie_send_data(pmadapter, type, pmbuf, tx_param);
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
} else if (type == MLAN_TYPE_CMD)
|
||||
ret = wlan_pcie_send_cmd(pmadapter, pmbuf);
|
||||
else if (type == MLAN_TYPE_VDLL)
|
||||
|
@ -4342,21 +4420,24 @@ mlan_status wlan_set_pcie_buf_config(mlan_private *pmpriv)
|
|||
/* Send the ring base addresses and count to firmware */
|
||||
host_spec.txbd_addr_lo = wlan_cpu_to_le32(
|
||||
(t_u32)(pmadapter->pcard_pcie->txbd_ring_pbase));
|
||||
host_spec.txbd_addr_hi = wlan_cpu_to_le32((t_u32)(
|
||||
((t_u64)pmadapter->pcard_pcie->txbd_ring_pbase) >> 32));
|
||||
host_spec.txbd_addr_hi = wlan_cpu_to_le32((
|
||||
t_u32)(((t_u64)pmadapter->pcard_pcie->txbd_ring_pbase) >>
|
||||
32));
|
||||
host_spec.txbd_count =
|
||||
wlan_cpu_to_le32(pmadapter->pcard_pcie->txrx_bd_size);
|
||||
host_spec.rxbd_addr_lo = wlan_cpu_to_le32(
|
||||
(t_u32)(pmadapter->pcard_pcie->rxbd_ring_pbase));
|
||||
host_spec.rxbd_addr_hi = wlan_cpu_to_le32((t_u32)(
|
||||
((t_u64)pmadapter->pcard_pcie->rxbd_ring_pbase) >> 32));
|
||||
host_spec.rxbd_addr_hi = wlan_cpu_to_le32((
|
||||
t_u32)(((t_u64)pmadapter->pcard_pcie->rxbd_ring_pbase) >>
|
||||
32));
|
||||
host_spec.rxbd_count =
|
||||
wlan_cpu_to_le32(pmadapter->pcard_pcie->txrx_bd_size);
|
||||
host_spec.evtbd_addr_lo = wlan_cpu_to_le32(
|
||||
(t_u32)(pmadapter->pcard_pcie->evtbd_ring_pbase));
|
||||
host_spec.evtbd_addr_hi = wlan_cpu_to_le32((t_u32)(
|
||||
((t_u64)pmadapter->pcard_pcie->evtbd_ring_pbase) >>
|
||||
32));
|
||||
host_spec.evtbd_addr_hi =
|
||||
wlan_cpu_to_le32((t_u32)(((t_u64)pmadapter->pcard_pcie
|
||||
->evtbd_ring_pbase) >>
|
||||
32));
|
||||
host_spec.evtbd_count = wlan_cpu_to_le32(MLAN_MAX_EVT_BD);
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
|
@ -4523,6 +4604,61 @@ static mlan_status wlan_pcie_interrupt_ext(t_u16 msg_id,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function process pcie receive data
|
||||
*
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void wlan_pcie_process_rx(mlan_adapter *pmadapter)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
ENTER();
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->pmlan_rx_lock);
|
||||
if (pmadapter->pcie_rx_processing) {
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
goto exit_rx_proc;
|
||||
} else {
|
||||
pmadapter->pcie_rx_processing = MTRUE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
}
|
||||
|
||||
wlan_pcie_process_recv_data(pmadapter);
|
||||
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->pmlan_rx_lock);
|
||||
pmadapter->pcie_rx_processing = MFALSE;
|
||||
pmadapter->pcard_pcie->rx_pending = MFALSE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
exit_rx_proc:
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function process pcie_cmd_dnld interrupt
|
||||
*
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void wlan_pcie_process_cmd_dnld(mlan_adapter *pmadapter)
|
||||
{
|
||||
ENTER();
|
||||
if (pmadapter->cmd_sent)
|
||||
pmadapter->cmd_sent = MFALSE;
|
||||
if (pmadapter->pcard_pcie->vdll_cmd_buf)
|
||||
wlan_pcie_send_vdll_complete(pmadapter);
|
||||
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function checks the interrupt status and
|
||||
* handle it accordingly.
|
||||
|
@ -4534,36 +4670,23 @@ static mlan_status wlan_pcie_interrupt_ext(t_u16 msg_id,
|
|||
static mlan_status wlan_process_pcie_int_status_ext(mlan_adapter *pmadapter,
|
||||
t_u8 type)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
switch (type) {
|
||||
case RX_DATA: // Rx Data
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
wlan_pcie_process_recv_data(pmadapter);
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
wlan_pcie_process_rx(pmadapter);
|
||||
break;
|
||||
case RX_EVENT: // Rx event
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
wlan_pcie_process_event_ready(pmadapter);
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
wlan_pcie_process_event(pmadapter);
|
||||
break;
|
||||
case TX_COMPLETE: // Tx data complete
|
||||
/* synchronize with send_data to sync both txbd_rdptr and
|
||||
* txbd_wrptr */
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
wlan_pcie_send_data_complete(pmadapter);
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
wlan_pcie_process_tx_complete(pmadapter);
|
||||
break;
|
||||
case RX_CMD_RESP: // Rx CMD Resp
|
||||
wlan_pcie_process_cmd_resp(pmadapter);
|
||||
break;
|
||||
case RX_CMD_DNLD:
|
||||
wlan_pcie_process_cmd_dnld(pmadapter);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -904,8 +904,9 @@ wlan_scan_channel_list(mlan_private *pmpriv, t_void *pioctl_buf,
|
|||
* compensates for any TLVs that were appended
|
||||
* before the channel list.
|
||||
*/
|
||||
pscan_cfg_out->tlv_buf_len = (t_u32)(
|
||||
(t_u8 *)pchan_tlv_out - pscan_cfg_out->tlv_buf);
|
||||
pscan_cfg_out->tlv_buf_len =
|
||||
(t_u32)((t_u8 *)pchan_tlv_out -
|
||||
pscan_cfg_out->tlv_buf);
|
||||
|
||||
/* Add the size of the channel tlv header and the data
|
||||
* length */
|
||||
|
@ -1246,9 +1247,10 @@ static mlan_status wlan_scan_setup_scan_config(
|
|||
(MrvlIEtypes_WildCardSsIdParamSet_t *)ptlv_pos;
|
||||
pwildcard_ssid_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_WILDCARDSSID);
|
||||
pwildcard_ssid_tlv->header.len = (t_u16)(
|
||||
ssid_len +
|
||||
sizeof(pwildcard_ssid_tlv->max_ssid_length));
|
||||
pwildcard_ssid_tlv->header.len =
|
||||
(t_u16)(ssid_len +
|
||||
sizeof(pwildcard_ssid_tlv
|
||||
->max_ssid_length));
|
||||
pwildcard_ssid_tlv->max_ssid_length =
|
||||
puser_scan_in->ssid_list[ssid_idx].max_len;
|
||||
|
||||
|
@ -2055,8 +2057,9 @@ static mlan_status wlan_interpret_bss_desc_with_ie(pmlan_adapter pmadapter,
|
|||
pbss_entry->pwpa_ie =
|
||||
(IEEEtypes_VendorSpecific_t *)
|
||||
pcurrent_ptr;
|
||||
pbss_entry->wpa_offset = (t_u16)(
|
||||
pcurrent_ptr - pbss_entry->pbeacon_buf);
|
||||
pbss_entry->wpa_offset =
|
||||
(t_u16)(pcurrent_ptr -
|
||||
pbss_entry->pbeacon_buf);
|
||||
HEXDUMP("InterpretIE: Resp WPA_IE",
|
||||
(t_u8 *)pbss_entry->pwpa_ie,
|
||||
((*(pbss_entry->pwpa_ie)).vend_hdr.len +
|
||||
|
@ -2132,8 +2135,9 @@ static mlan_status wlan_interpret_bss_desc_with_ie(pmlan_adapter pmadapter,
|
|||
osen_oui, sizeof(osen_oui))) {
|
||||
pbss_entry->posen_ie =
|
||||
(IEEEtypes_Generic_t *)pcurrent_ptr;
|
||||
pbss_entry->osen_offset = (t_u16)(
|
||||
pcurrent_ptr - pbss_entry->pbeacon_buf);
|
||||
pbss_entry->osen_offset =
|
||||
(t_u16)(pcurrent_ptr -
|
||||
pbss_entry->pbeacon_buf);
|
||||
HEXDUMP("InterpretIE: Resp OSEN_IE",
|
||||
(t_u8 *)pbss_entry->posen_ie,
|
||||
(*(pbss_entry->posen_ie)).ieee_hdr.len +
|
||||
|
@ -2308,13 +2312,15 @@ static mlan_status wlan_interpret_bss_desc_with_ie(pmlan_adapter pmadapter,
|
|||
case HE_CAPABILITY:
|
||||
pbss_entry->phe_cap =
|
||||
(IEEEtypes_HECap_t *)pcurrent_ptr;
|
||||
pbss_entry->he_cap_offset = (t_u16)(
|
||||
pcurrent_ptr - pbss_entry->pbeacon_buf);
|
||||
pbss_entry->he_cap_offset =
|
||||
(t_u16)(pcurrent_ptr -
|
||||
pbss_entry->pbeacon_buf);
|
||||
break;
|
||||
case HE_OPERATION:
|
||||
pbss_entry->phe_oprat = pext_tlv;
|
||||
pbss_entry->he_oprat_offset = (t_u16)(
|
||||
pcurrent_ptr - pbss_entry->pbeacon_buf);
|
||||
pbss_entry->he_oprat_offset =
|
||||
(t_u16)(pcurrent_ptr -
|
||||
pbss_entry->pbeacon_buf);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -4977,10 +4983,10 @@ mlan_status wlan_cmd_802_11_scan_ext(mlan_private *pmpriv,
|
|||
else
|
||||
pext_scan_cmd->ext_scan_type = EXT_SCAN_DEFAULT;
|
||||
} else {
|
||||
pcmd->size = wlan_cpu_to_le16((t_u16)(
|
||||
sizeof(pext_scan_cmd->ext_scan_type) +
|
||||
(t_u16)(sizeof(pext_scan_cmd->reserved)) +
|
||||
S_DS_GEN));
|
||||
pcmd->size = wlan_cpu_to_le16((
|
||||
t_u16)(sizeof(pext_scan_cmd->ext_scan_type) +
|
||||
(t_u16)(sizeof(pext_scan_cmd->reserved)) +
|
||||
S_DS_GEN));
|
||||
pext_scan_cmd->ext_scan_type = EXT_SCAN_CANCEL;
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
@ -5760,8 +5766,8 @@ static mlan_status wlan_parse_ext_scan_result(mlan_private *pmpriv,
|
|||
*/
|
||||
if (pscan_info_tlv) {
|
||||
/* RSSI is 2 byte long */
|
||||
bss_new_entry->rssi = -(t_s32)(
|
||||
wlan_le16_to_cpu(pscan_info_tlv->rssi));
|
||||
bss_new_entry->rssi = -(t_s32)(wlan_le16_to_cpu(
|
||||
pscan_info_tlv->rssi));
|
||||
PRINTM(MINFO, "EXT_SCAN: RSSI=%d\n",
|
||||
bss_new_entry->rssi);
|
||||
memcpy_ext(pmpriv->adapter, &tsf_val,
|
||||
|
@ -6437,8 +6443,9 @@ mlan_status wlan_cmd_bgscan_config(mlan_private *pmpriv,
|
|||
pwildcard_ssid_tlv = (MrvlIEtypes_WildCardSsIdParamSet_t *)tlv;
|
||||
pwildcard_ssid_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_WILDCARDSSID);
|
||||
pwildcard_ssid_tlv->header.len = (t_u16)(
|
||||
ssid_len + sizeof(pwildcard_ssid_tlv->max_ssid_length));
|
||||
pwildcard_ssid_tlv->header.len =
|
||||
(t_u16)(ssid_len +
|
||||
sizeof(pwildcard_ssid_tlv->max_ssid_length));
|
||||
pwildcard_ssid_tlv->max_ssid_length =
|
||||
bg_scan_in->ssid_list[ssid_idx].max_len;
|
||||
memcpy_ext(pmadapter, pwildcard_ssid_tlv->ssid,
|
||||
|
|
|
@ -588,8 +588,8 @@ static mlan_status wlan_get_rd_port(mlan_adapter *pmadapter, t_u8 *pport)
|
|||
} else {
|
||||
if (pmadapter->pcard_sd->mp_rd_bitmap &
|
||||
(1 << pmadapter->pcard_sd->curr_rd_port)) {
|
||||
pmadapter->pcard_sd->mp_rd_bitmap &= (t_u32)(
|
||||
~(1 << pmadapter->pcard_sd->curr_rd_port));
|
||||
pmadapter->pcard_sd->mp_rd_bitmap &= (t_u32)(~(
|
||||
1 << pmadapter->pcard_sd->curr_rd_port));
|
||||
*pport = pmadapter->pcard_sd->curr_rd_port;
|
||||
|
||||
/* hw rx wraps round only after port (MAX_PORT-1) */
|
||||
|
|
|
@ -1194,7 +1194,29 @@ process_start:
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type) &&
|
||||
pmadapter->pcie_cmd_dnld_int) {
|
||||
pmadapter->pcie_cmd_dnld_int = MFALSE;
|
||||
mlan_process_pcie_interrupt_cb(pmadapter, RX_CMD_DNLD);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* wake up timeout happened */
|
||||
if ((pmadapter->ps_state == PS_STATE_SLEEP) &&
|
||||
pmadapter->pm_wakeup_flag) {
|
||||
pmadapter->pm_wakeup_flag = MFALSE;
|
||||
if (pmadapter->pm_wakeup_timeout > 2)
|
||||
wlan_recv_event(
|
||||
wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DBG_DUMP, MNULL);
|
||||
else {
|
||||
pmadapter->ops.wakeup_card(pmadapter, MTRUE);
|
||||
pmadapter->pm_wakeup_fw_try = MTRUE;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
/* Need to wake up the card ? */
|
||||
if ((pmadapter->ps_state == PS_STATE_SLEEP) &&
|
||||
(pmadapter->pm_wakeup_card_req &&
|
||||
|
@ -1868,6 +1890,12 @@ void mlan_process_pcie_interrupt_cb(t_void *padapter, int type)
|
|||
ENTER();
|
||||
|
||||
if (type == RX_DATA) {
|
||||
if ((pmadapter->ps_state == PS_STATE_SLEEP) ||
|
||||
(pmadapter->ps_state == PS_STATE_SLEEP_CFM)) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
if (pmadapter->rx_pkts_queued > HIGH_RX_PENDING) {
|
||||
pcb->moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 2, 0);
|
||||
|
@ -1896,6 +1924,7 @@ void mlan_process_pcie_interrupt_cb(t_void *padapter, int type)
|
|||
case RX_CMD_RESP: // Rx CMD Resp
|
||||
mlan_main_process(pmadapter);
|
||||
break;
|
||||
case RX_CMD_DNLD:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -3394,76 +3394,93 @@ static mlan_status wlan_set_gen_ie_helper(mlan_private *priv, t_u8 *ie_data_ptr,
|
|||
(!memcmp(priv->adapter, pvendor_ie->oui, wpa_oui,
|
||||
sizeof(wpa_oui)))) ||
|
||||
(pvendor_ie->element_id == RSN_IE)) {
|
||||
/* IE is a WPA/WPA2 IE so call set_wpa function */
|
||||
ret = wlan_set_wpa_ie_helper(priv, ie_data_ptr, ie_len);
|
||||
priv->wps.session_enable = MFALSE;
|
||||
} else if (pvendor_ie->element_id == WAPI_IE) {
|
||||
/* IE is a WAPI IE so call set_wapi function */
|
||||
ret = wlan_set_wapi_ie(priv, ie_data_ptr, ie_len);
|
||||
} else if ((pvendor_ie->element_id == VENDOR_SPECIFIC_221) &&
|
||||
(!memcmp(priv->adapter, pvendor_ie->oui, osen_oui,
|
||||
sizeof(osen_oui)))) {
|
||||
/* IE is a OSEN IE so call set_osen function */
|
||||
ret = wlan_set_osen_ie(priv, ie_data_ptr, ie_len);
|
||||
|
||||
} else if ((pvendor_ie->element_id == WPS_IE) &&
|
||||
(priv->wps.session_enable == MFALSE) &&
|
||||
(!memcmp(priv->adapter, pvendor_ie->oui, wps_oui,
|
||||
sizeof(wps_oui)))) {
|
||||
/*
|
||||
* Discard first two byte (Element ID and Length)
|
||||
* because they are not needed in the case of setting
|
||||
* WPS_IE
|
||||
*/
|
||||
if (pvendor_ie->len > 4) {
|
||||
memcpy_ext(priv->adapter,
|
||||
(t_u8 *)&priv->wps.wps_ie,
|
||||
ie_data_ptr, ie_len,
|
||||
sizeof(IEEEtypes_VendorSpecific_t));
|
||||
HEXDUMP("wps_ie", (t_u8 *)&priv->wps.wps_ie,
|
||||
priv->wps.wps_ie.vend_hdr.len + 2);
|
||||
} else {
|
||||
/* Only wps oui exist, reset driver wps buffer
|
||||
/* IE is a WPA/WPA2 IE so call set_wpa function
|
||||
*/
|
||||
memset(priv->adapter, (t_u8 *)&priv->wps.wps_ie,
|
||||
0x00, sizeof(priv->wps.wps_ie));
|
||||
PRINTM(MINFO, "wps_ie cleared\n");
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* Verify that the passed length is not larger than
|
||||
* the available space remaining in the buffer
|
||||
*/
|
||||
if (ie_len <
|
||||
(sizeof(priv->gen_ie_buf) - priv->gen_ie_buf_len)) {
|
||||
/* Test to see if it is a WPS IE, if so, enable
|
||||
* wps session flag */
|
||||
pvendor_ie =
|
||||
(IEEEtypes_VendorHeader_t *)ie_data_ptr;
|
||||
if ((pvendor_ie->element_id == WPS_IE) &&
|
||||
(!memcmp(priv->adapter, pvendor_ie->oui,
|
||||
wps_oui, sizeof(wps_oui)))) {
|
||||
priv->wps.session_enable = MTRUE;
|
||||
PRINTM(MINFO, "WPS Session Enabled.\n");
|
||||
}
|
||||
ret = wlan_set_wpa_ie_helper(priv, ie_data_ptr,
|
||||
ie_len);
|
||||
priv->wps.session_enable = MFALSE;
|
||||
} else if (pvendor_ie->element_id == WAPI_IE) {
|
||||
/* IE is a WAPI IE so call set_wapi function */
|
||||
ret = wlan_set_wapi_ie(priv, ie_data_ptr,
|
||||
ie_len);
|
||||
} else if ((pvendor_ie->element_id ==
|
||||
VENDOR_SPECIFIC_221) &&
|
||||
(!memcmp(priv->adapter, pvendor_ie->oui,
|
||||
osen_oui, sizeof(osen_oui)))) {
|
||||
/* IE is a OSEN IE so call set_osen function */
|
||||
ret = wlan_set_osen_ie(priv, ie_data_ptr,
|
||||
ie_len);
|
||||
|
||||
/* Append the passed data to the end of
|
||||
* the genIeBuffer */
|
||||
memcpy_ext(priv->adapter,
|
||||
priv->gen_ie_buf +
|
||||
priv->gen_ie_buf_len,
|
||||
ie_data_ptr, ie_len,
|
||||
MRVDRV_GENIE_BUF_SIZE -
|
||||
priv->gen_ie_buf_len);
|
||||
/* Increment the stored buffer length by
|
||||
* the size passed */
|
||||
priv->gen_ie_buf_len += ie_len;
|
||||
} else if ((pvendor_ie->element_id == WPS_IE) &&
|
||||
(priv->wps.session_enable == MFALSE) &&
|
||||
(!memcmp(priv->adapter, pvendor_ie->oui,
|
||||
wps_oui, sizeof(wps_oui)))) {
|
||||
/*
|
||||
* Discard first two byte (Element ID and
|
||||
* Length) because they are not needed in the
|
||||
* case of setting WPS_IE
|
||||
*/
|
||||
if (pvendor_ie->len > 4) {
|
||||
memcpy_ext(
|
||||
priv->adapter,
|
||||
(t_u8 *)&priv->wps.wps_ie,
|
||||
ie_data_ptr, ie_len,
|
||||
sizeof(IEEEtypes_VendorSpecific_t));
|
||||
HEXDUMP("wps_ie",
|
||||
(t_u8 *)&priv->wps.wps_ie,
|
||||
priv->wps.wps_ie.vend_hdr.len +
|
||||
2);
|
||||
} else {
|
||||
/* Only wps oui exist, reset driver wps
|
||||
* buffer
|
||||
*/
|
||||
memset(priv->adapter,
|
||||
(t_u8 *)&priv->wps.wps_ie, 0x00,
|
||||
sizeof(priv->wps.wps_ie));
|
||||
PRINTM(MINFO, "wps_ie cleared\n");
|
||||
}
|
||||
} else {
|
||||
/* Passed data does not fit in the
|
||||
* remaining buffer space */
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
/*
|
||||
* Verify that the passed length is not larger
|
||||
* than the available space remaining in the
|
||||
* buffer
|
||||
*/
|
||||
if (ie_len < (sizeof(priv->gen_ie_buf) -
|
||||
priv->gen_ie_buf_len)) {
|
||||
/* Test to see if it is a WPS IE, if so,
|
||||
* enable wps session flag */
|
||||
pvendor_ie =
|
||||
(IEEEtypes_VendorHeader_t *)
|
||||
ie_data_ptr;
|
||||
if ((pvendor_ie->element_id ==
|
||||
WPS_IE) &&
|
||||
(!memcmp(priv->adapter,
|
||||
pvendor_ie->oui, wps_oui,
|
||||
sizeof(wps_oui)))) {
|
||||
priv->wps.session_enable =
|
||||
MTRUE;
|
||||
PRINTM(MINFO,
|
||||
"WPS Session Enabled.\n");
|
||||
}
|
||||
|
||||
/* Append the passed data to the end of
|
||||
* the genIeBuffer */
|
||||
memcpy_ext(
|
||||
priv->adapter,
|
||||
priv->gen_ie_buf +
|
||||
priv->gen_ie_buf_len,
|
||||
ie_data_ptr, ie_len,
|
||||
MRVDRV_GENIE_BUF_SIZE -
|
||||
priv->gen_ie_buf_len);
|
||||
/* Increment the stored buffer length by
|
||||
* the size passed */
|
||||
priv->gen_ie_buf_len += ie_len;
|
||||
} else {
|
||||
/* Passed data does not fit in the
|
||||
* remaining buffer space */
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Return MLAN_STATUS_SUCCESS, or MLAN_STATUS_FAILURE for error case */
|
||||
|
|
|
@ -133,8 +133,9 @@ t_void *wlan_ops_sta_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
}
|
||||
/* Offset of actual data */
|
||||
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
||||
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
||||
plocal_tx_pd->tx_pkt_offset =
|
||||
(t_u16)((t_ptr)pmbuf->pbuf + pmbuf->data_offset -
|
||||
(t_ptr)plocal_tx_pd);
|
||||
|
||||
if (!plocal_tx_pd->tx_control) {
|
||||
/* TxCtrl set by user or default */
|
||||
|
|
|
@ -234,8 +234,9 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
}
|
||||
|
||||
/* Offset of actual data */
|
||||
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
||||
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
||||
plocal_tx_pd->tx_pkt_offset =
|
||||
(t_u16)((t_ptr)pmbuf->pbuf + pmbuf->data_offset -
|
||||
(t_ptr)plocal_tx_pd);
|
||||
|
||||
if (!plocal_tx_pd->tx_control) {
|
||||
/* TxCtrl set by user or default */
|
||||
|
|
|
@ -487,11 +487,11 @@ static int wlan_usb_deaggr_rx_num_pkts(pmlan_adapter pmadapter, t_u8 *pdata,
|
|||
static inline t_u32 usb_tx_aggr_pad_len(t_u32 len,
|
||||
usb_tx_aggr_params *pusb_tx_aggr)
|
||||
{
|
||||
return (t_u32)(
|
||||
(len % pusb_tx_aggr->aggr_ctrl.aggr_align) ?
|
||||
(len + (pusb_tx_aggr->aggr_ctrl.aggr_align -
|
||||
(len % pusb_tx_aggr->aggr_ctrl.aggr_align))) :
|
||||
len);
|
||||
return (t_u32)((len % pusb_tx_aggr->aggr_ctrl.aggr_align) ?
|
||||
(len +
|
||||
(pusb_tx_aggr->aggr_ctrl.aggr_align -
|
||||
(len % pusb_tx_aggr->aggr_ctrl.aggr_align))) :
|
||||
len);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define _MLAN_DECL_H_
|
||||
|
||||
/** MLAN release version */
|
||||
#define MLAN_RELEASE_VERSION "408.p2"
|
||||
#define MLAN_RELEASE_VERSION "408.p3"
|
||||
|
||||
/** Re-define generic data types for MLAN/MOAL */
|
||||
/** Signed char (1-byte) */
|
||||
|
@ -275,7 +275,7 @@ typedef t_s32 t_sval;
|
|||
|
||||
#ifdef PCIE
|
||||
/* Interrupt type */
|
||||
enum { RX_DATA, RX_EVENT, TX_COMPLETE, RX_CMD_RESP };
|
||||
enum { RX_DATA, RX_EVENT, TX_COMPLETE, RX_CMD_RESP, RX_CMD_DNLD };
|
||||
#endif
|
||||
#ifdef USB
|
||||
#define MLAN_USB_BLOCK_SIZE (512)
|
||||
|
@ -936,29 +936,34 @@ enum mlan_channel_type {
|
|||
};
|
||||
|
||||
/** channel band */
|
||||
enum { BAND_2GHZ = 0,
|
||||
BAND_5GHZ = 1,
|
||||
BAND_6GHZ = 2,
|
||||
BAND_4GHZ = 3,
|
||||
enum {
|
||||
BAND_2GHZ = 0,
|
||||
BAND_5GHZ = 1,
|
||||
BAND_6GHZ = 2,
|
||||
BAND_4GHZ = 3,
|
||||
};
|
||||
|
||||
/** channel offset */
|
||||
enum { SEC_CHAN_NONE = 0,
|
||||
SEC_CHAN_ABOVE = 1,
|
||||
SEC_CHAN_5MHZ = 2,
|
||||
SEC_CHAN_BELOW = 3 };
|
||||
enum {
|
||||
SEC_CHAN_NONE = 0,
|
||||
SEC_CHAN_ABOVE = 1,
|
||||
SEC_CHAN_5MHZ = 2,
|
||||
SEC_CHAN_BELOW = 3
|
||||
};
|
||||
|
||||
/** channel bandwidth */
|
||||
enum { CHAN_BW_20MHZ = 0,
|
||||
CHAN_BW_10MHZ,
|
||||
CHAN_BW_40MHZ,
|
||||
CHAN_BW_80MHZ,
|
||||
enum {
|
||||
CHAN_BW_20MHZ = 0,
|
||||
CHAN_BW_10MHZ,
|
||||
CHAN_BW_40MHZ,
|
||||
CHAN_BW_80MHZ,
|
||||
};
|
||||
|
||||
/** scan mode */
|
||||
enum { SCAN_MODE_MANUAL = 0,
|
||||
SCAN_MODE_ACS,
|
||||
SCAN_MODE_USER,
|
||||
enum {
|
||||
SCAN_MODE_MANUAL = 0,
|
||||
SCAN_MODE_ACS,
|
||||
SCAN_MODE_USER,
|
||||
};
|
||||
|
||||
/** DFS state */
|
||||
|
|
|
@ -163,9 +163,10 @@ enum logger_attributes {
|
|||
|
||||
/* Below events refer to the wifi_connectivity_event ring and shall be supported
|
||||
*/
|
||||
enum { WIFI_EVENT_ASSOCIATION_REQUESTED = 0,
|
||||
WIFI_EVENT_AUTH_COMPLETE,
|
||||
WIFI_EVENT_ASSOC_COMPLETE,
|
||||
enum {
|
||||
WIFI_EVENT_ASSOCIATION_REQUESTED = 0,
|
||||
WIFI_EVENT_AUTH_COMPLETE,
|
||||
WIFI_EVENT_ASSOC_COMPLETE,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -175,11 +176,13 @@ enum {
|
|||
RING_BUFFER_ENTRY_FLAGS_HAS_TIMESTAMP = (1 << (1))
|
||||
};
|
||||
|
||||
enum { ENTRY_TYPE_CONNECT_EVENT = 1,
|
||||
ENTRY_TYPE_PKT,
|
||||
ENTRY_TYPE_WAKE_LOCK,
|
||||
ENTRY_TYPE_POWER_EVENT,
|
||||
ENTRY_TYPE_DATA };
|
||||
enum {
|
||||
ENTRY_TYPE_CONNECT_EVENT = 1,
|
||||
ENTRY_TYPE_PKT,
|
||||
ENTRY_TYPE_WAKE_LOCK,
|
||||
ENTRY_TYPE_POWER_EVENT,
|
||||
ENTRY_TYPE_DATA
|
||||
};
|
||||
|
||||
/** WiFi ring buffer entry structure */
|
||||
typedef struct {
|
||||
|
@ -506,9 +509,10 @@ int woal_packet_fate_monitor(moal_private *priv,
|
|||
#define APF_FRAME_HEADER_SIZE 14
|
||||
#define PACKET_FILTER_MAX_LEN 1024
|
||||
|
||||
enum { PACKET_FILTER_STATE_INIT = 0,
|
||||
PACKET_FILTER_STATE_STOP,
|
||||
PACKET_FILTER_STATE_START,
|
||||
enum {
|
||||
PACKET_FILTER_STATE_INIT = 0,
|
||||
PACKET_FILTER_STATE_STOP,
|
||||
PACKET_FILTER_STATE_START,
|
||||
};
|
||||
|
||||
enum wifi_attr_packet_filter {
|
||||
|
|
|
@ -2213,7 +2213,7 @@ static int woal_setget_priv_txratecfg(moal_private *priv, t_u8 *respbuf,
|
|||
data[3]);
|
||||
|
||||
/* HE Preamble type */
|
||||
//#define HE_SU_PREAMBLE 0
|
||||
// #define HE_SU_PREAMBLE 0
|
||||
#define HE_ER_PREAMBLE 1
|
||||
|
||||
/* HE ER SU Type */
|
||||
|
|
|
@ -5952,7 +5952,11 @@ void woal_queue_rx_task(moal_handle *handle)
|
|||
ENTER();
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(handle->card_type)) {
|
||||
#ifdef TASKLET_SUPPORT
|
||||
tasklet_schedule(&handle->pcie_rx_task);
|
||||
#else
|
||||
queue_work(handle->pcie_rx_workqueue, &handle->pcie_rx_work);
|
||||
#endif
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
@ -5998,8 +6002,15 @@ void woal_flush_workqueue(moal_handle *handle)
|
|||
flush_workqueue(handle->pcie_rx_event_workqueue);
|
||||
if (handle->pcie_cmd_resp_workqueue)
|
||||
flush_workqueue(handle->pcie_cmd_resp_workqueue);
|
||||
#ifdef TASKLET_SUPPORT
|
||||
tasklet_kill(&handle->pcie_tx_complete_task);
|
||||
tasklet_kill(&handle->pcie_rx_task);
|
||||
#else
|
||||
if (handle->pcie_tx_complete_workqueue)
|
||||
flush_workqueue(handle->pcie_tx_complete_workqueue);
|
||||
if (handle->pcie_rx_workqueue)
|
||||
flush_workqueue(handle->pcie_rx_workqueue);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
LEAVE();
|
||||
|
@ -6055,8 +6066,21 @@ void woal_terminate_workqueue(moal_handle *handle)
|
|||
destroy_workqueue(handle->pcie_cmd_resp_workqueue);
|
||||
handle->pcie_cmd_resp_workqueue = NULL;
|
||||
}
|
||||
#ifdef TASKLET_SUPPORT
|
||||
tasklet_kill(&handle->pcie_tx_complete_task);
|
||||
tasklet_kill(&handle->pcie_rx_task);
|
||||
#else
|
||||
if (handle->pcie_rx_workqueue) {
|
||||
flush_workqueue(handle->pcie_rx_workqueue);
|
||||
destroy_workqueue(handle->pcie_rx_workqueue);
|
||||
handle->pcie_rx_workqueue = NULL;
|
||||
}
|
||||
if (handle->pcie_tx_complete_workqueue) {
|
||||
flush_workqueue(handle->pcie_tx_complete_workqueue);
|
||||
destroy_workqueue(handle->pcie_tx_complete_workqueue);
|
||||
handle->pcie_tx_complete_workqueue = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
LEAVE();
|
||||
|
@ -11464,6 +11488,7 @@ t_void woal_rx_work_queue(struct work_struct *work)
|
|||
#endif
|
||||
|
||||
#ifdef PCIE
|
||||
#ifdef TASKLET_SUPPORT
|
||||
/**
|
||||
* @brief This tasklet handles rx_data
|
||||
*
|
||||
|
@ -11529,6 +11554,74 @@ t_void woal_pcie_tx_complete_task(unsigned long data)
|
|||
mlan_process_pcie_interrupt_cb(handle->pmlan_adapter, TX_COMPLETE);
|
||||
LEAVE();
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* @brief This work queue handles rx_data interrupt
|
||||
*
|
||||
* @param work A pointer to work_struct
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void woal_pcie_rx_work_queue(struct work_struct *work)
|
||||
{
|
||||
moal_handle *handle = container_of(work, moal_handle, pcie_rx_work);
|
||||
wifi_timeval start_timeval;
|
||||
wifi_timeval end_timeval;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!handle || handle->surprise_removed == MTRUE) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
|
||||
if (handle->cfg80211_suspend == MTRUE) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
woal_get_monotonic_time(&start_timeval);
|
||||
|
||||
mlan_process_pcie_interrupt_cb(handle->pmlan_adapter, RX_DATA);
|
||||
|
||||
woal_get_monotonic_time(&end_timeval);
|
||||
handle->rx_time += (t_u64)(timeval_to_usec(end_timeval) -
|
||||
timeval_to_usec(start_timeval));
|
||||
PRINTM(MINFO,
|
||||
"%s : start_timeval=%d:%d end_timeval=%d:%d inter=%llu rx_time=%llu\n",
|
||||
__func__, start_timeval.time_sec, start_timeval.time_usec,
|
||||
end_timeval.time_sec, end_timeval.time_usec,
|
||||
(t_u64)(timeval_to_usec(end_timeval) -
|
||||
timeval_to_usec(start_timeval)),
|
||||
handle->rx_time);
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This workqueue handles tx_complete interrupt
|
||||
*
|
||||
* @param work A pointer to work_struct
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void woal_pcie_tx_complete_work_queue(struct work_struct *work)
|
||||
{
|
||||
moal_handle *handle =
|
||||
container_of(work, moal_handle, pcie_tx_complete_work);
|
||||
ENTER();
|
||||
|
||||
if (!handle || handle->surprise_removed == MTRUE) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
mlan_process_pcie_interrupt_cb(handle->pmlan_adapter, TX_COMPLETE);
|
||||
LEAVE();
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This workqueue handles rx_event
|
||||
|
@ -12178,10 +12271,55 @@ moal_handle *woal_add_card(void *card, struct device *dev, moal_if_ops *if_ops,
|
|||
}
|
||||
MLAN_INIT_WORK(&handle->pcie_cmd_resp_work,
|
||||
woal_pcie_cmd_resp_work_queue);
|
||||
#ifdef TASKLET_SUPPORT
|
||||
tasklet_init(&handle->pcie_tx_complete_task,
|
||||
woal_pcie_tx_complete_task, (unsigned long)handle);
|
||||
tasklet_init(&handle->pcie_rx_task, woal_pcie_rx_data_task,
|
||||
(unsigned long)handle);
|
||||
#else
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
|
||||
/* For kernel less than 2.6.14 name can not be
|
||||
* greater than 10 characters */
|
||||
handle->pcie_rx_workqueue =
|
||||
create_workqueue("MOAL_PCIE_RX_WORKQ");
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
|
||||
handle->pcie_rx_workqueue = alloc_workqueue(
|
||||
"MOAL_PCIE_RX_WORK_QUEUE",
|
||||
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
|
||||
#else
|
||||
handle->pcie_rx_workqueue =
|
||||
create_workqueue("MOAL_PCIE_RX_WORK_QUEUE");
|
||||
#endif
|
||||
#endif
|
||||
if (!handle->pcie_rx_workqueue) {
|
||||
woal_terminate_workqueue(handle);
|
||||
goto err_kmalloc;
|
||||
}
|
||||
MLAN_INIT_WORK(&handle->pcie_rx_work, woal_pcie_rx_work_queue);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
|
||||
/* For kernel less than 2.6.14 name can not be
|
||||
* greater than 10 characters */
|
||||
handle->pcie_tx_complete_workqueue =
|
||||
create_workqueue("MOAL_PCIE_TX_COMPLETE_WORKQ");
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
|
||||
handle->pcie_tx_complete_workqueue = alloc_workqueue(
|
||||
"MOAL_PCIE_TX_COMPLETE_WORKQ",
|
||||
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
|
||||
#else
|
||||
handle->pcie_tx_complete_workqueue =
|
||||
create_workqueue("MOAL_PCIE_TX_COMPLETE_WORKQ");
|
||||
#endif
|
||||
#endif
|
||||
if (!handle->pcie_tx_complete_workqueue) {
|
||||
woal_terminate_workqueue(handle);
|
||||
goto err_kmalloc;
|
||||
}
|
||||
MLAN_INIT_WORK(&handle->pcie_tx_complete_work,
|
||||
woal_pcie_tx_complete_work_queue);
|
||||
#endif
|
||||
}
|
||||
#endif // PCIE
|
||||
|
||||
|
|
|
@ -162,10 +162,6 @@ Change log:
|
|||
#define IMX_ANDROID_13 0
|
||||
#define IMX_ANDROID_12_BACKPORT 0
|
||||
|
||||
#if defined(IMX_SUPPORT)
|
||||
|
||||
#if defined(IMX_ANDROID)
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 15, 52)
|
||||
#undef IMX_ANDROID_13
|
||||
#define IMX_ANDROID_13 1
|
||||
|
@ -174,8 +170,6 @@ Change log:
|
|||
#undef IMX_ANDROID_12_BACKPORT
|
||||
#define IMX_ANDROID_12_BACKPORT 1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Reason Code 3: STA is leaving (or has left) IBSS or ESS
|
||||
|
@ -385,11 +379,13 @@ typedef enum _MOAL_HARDWARE_STATUS {
|
|||
enum { MOAL_NO_WAIT, MOAL_IOCTL_WAIT, MOAL_IOCTL_WAIT_TIMEOUT };
|
||||
|
||||
/** moal_main_state */
|
||||
enum { MOAL_STATE_IDLE,
|
||||
MOAL_RECV_INT,
|
||||
MOAL_ENTER_WORK_QUEUE,
|
||||
MOAL_START_MAIN_PROCESS,
|
||||
MOAL_END_MAIN_PROCESS };
|
||||
enum {
|
||||
MOAL_STATE_IDLE,
|
||||
MOAL_RECV_INT,
|
||||
MOAL_ENTER_WORK_QUEUE,
|
||||
MOAL_START_MAIN_PROCESS,
|
||||
MOAL_END_MAIN_PROCESS
|
||||
};
|
||||
|
||||
/** HostCmd_Header */
|
||||
typedef struct _HostCmd_Header {
|
||||
|
@ -2153,7 +2149,8 @@ extern t_u8 ru_signal_52[9];
|
|||
y = (y + 1) - TONE_MAX_USERS_242; \
|
||||
} else { \
|
||||
tone = (y == 2) ? RU_TONE_106 : \
|
||||
(y == 1) ? 0 : RU_TONE_106; \
|
||||
(y == 1) ? 0 : \
|
||||
RU_TONE_106; \
|
||||
} \
|
||||
} else if (x == RU_40_242_TONE) { \
|
||||
if (!y) { \
|
||||
|
@ -2739,10 +2736,21 @@ struct _moal_handle {
|
|||
struct workqueue_struct *pcie_cmd_resp_workqueue;
|
||||
/** pcie rx cmd resp work */
|
||||
struct work_struct pcie_cmd_resp_work;
|
||||
#ifdef TASKLET_SUPPORT
|
||||
/* pcie rx data tasklet */
|
||||
struct tasklet_struct pcie_rx_task;
|
||||
/* pcie tx complete tasklet */
|
||||
struct tasklet_struct pcie_tx_complete_task;
|
||||
#else
|
||||
/** Driver pcie rx workqueue */
|
||||
struct workqueue_struct *pcie_rx_workqueue;
|
||||
/* pcie rx work */
|
||||
struct work_struct pcie_rx_work;
|
||||
/** Driver pcie tx complete workqueue */
|
||||
struct workqueue_struct *pcie_tx_complete_workqueue;
|
||||
/* pcie tx complete work */
|
||||
struct work_struct pcie_tx_complete_work;
|
||||
#endif
|
||||
#endif
|
||||
/** event spin lock */
|
||||
spinlock_t evt_lock;
|
||||
|
@ -4043,6 +4051,10 @@ t_void woal_mclist_work_queue(struct work_struct *work);
|
|||
#ifdef PCIE
|
||||
t_void woal_pcie_rx_event_work_queue(struct work_struct *work);
|
||||
t_void woal_pcie_cmd_resp_work_queue(struct work_struct *work);
|
||||
#ifndef TASKLET_SUPPORT
|
||||
t_void woal_pcie_rx_work_queue(struct work_struct *work);
|
||||
t_void woal_pcie_tx_complete_work_queue(struct work_struct *work);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef STA_CFG80211
|
||||
|
|
|
@ -2578,7 +2578,11 @@ static mlan_status wlan_process_defer_event(moal_handle *handle,
|
|||
#ifdef PCIE
|
||||
case MLAN_EVENT_ID_DRV_DEFER_RX_DATA:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
#ifdef TASKLET_SUPPORT
|
||||
tasklet_schedule(&handle->pcie_rx_task);
|
||||
#else
|
||||
queue_work(handle->pcie_rx_workqueue, &handle->pcie_rx_work);
|
||||
#endif
|
||||
break;
|
||||
case MLAN_EVENT_ID_DRV_DEFER_RX_EVENT:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
|
@ -2592,7 +2596,12 @@ static mlan_status wlan_process_defer_event(moal_handle *handle,
|
|||
break;
|
||||
case MLAN_EVENT_ID_DRV_DEFER_TX_COMPLTE:
|
||||
status = MLAN_STATUS_SUCCESS;
|
||||
#ifdef TASKLET_SUPPORT
|
||||
tasklet_schedule(&handle->pcie_tx_complete_task);
|
||||
#else
|
||||
queue_work(handle->pcie_tx_complete_workqueue,
|
||||
&handle->pcie_tx_complete_work);
|
||||
#endif
|
||||
break;
|
||||
#endif /* PCIE */
|
||||
|
||||
|
@ -2604,7 +2613,11 @@ static mlan_status wlan_process_defer_event(moal_handle *handle,
|
|||
}
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(handle->card_type)) {
|
||||
#ifdef TASKLET_SUPPORT
|
||||
tasklet_kill(&handle->pcie_rx_task);
|
||||
#else
|
||||
flush_workqueue(handle->pcie_rx_workqueue);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@ -2628,7 +2641,12 @@ static mlan_status wlan_process_defer_event(moal_handle *handle,
|
|||
}
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(handle->card_type)) {
|
||||
#ifdef TASKLET_SUPPORT
|
||||
tasklet_schedule(&handle->pcie_rx_task);
|
||||
#else
|
||||
queue_work(handle->pcie_rx_workqueue,
|
||||
&handle->pcie_rx_work);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@ -2916,10 +2934,11 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
|
||||
if (!is_zero_timeval(priv->phandle->scan_time_start)) {
|
||||
woal_get_monotonic_time(&priv->phandle->scan_time_end);
|
||||
priv->phandle->scan_time += (t_u64)(
|
||||
timeval_to_usec(priv->phandle->scan_time_end) -
|
||||
timeval_to_usec(
|
||||
priv->phandle->scan_time_start));
|
||||
priv->phandle->scan_time +=
|
||||
(t_u64)(timeval_to_usec(
|
||||
priv->phandle->scan_time_end) -
|
||||
timeval_to_usec(
|
||||
priv->phandle->scan_time_start));
|
||||
PRINTM(MINFO,
|
||||
"%s : start_timeval=%d:%d end_timeval=%d:%d inter=%llu scan_time=%llu\n",
|
||||
__func__,
|
||||
|
|
|
@ -210,6 +210,9 @@ int woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
|
|||
const u8 *peer,
|
||||
#else
|
||||
u8 *peer,
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)
|
||||
int link_id,
|
||||
#endif
|
||||
u8 action_code, u8 dialog_token, u16 status_code,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
|
||||
|
@ -8171,7 +8174,6 @@ fail:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||
/**
|
||||
* @brief Tx TDLS packet
|
||||
*
|
||||
|
@ -8188,6 +8190,14 @@ fail:
|
|||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)
|
||||
int woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
|
||||
const t_u8 *peer, int link_id, u8 action_code,
|
||||
t_u8 dialog_token, t_u16 status_code,
|
||||
t_u32 peer_capability, bool initiator,
|
||||
const t_u8 *extra_ies, size_t extra_ies_len)
|
||||
#else
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||
int woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
|
||||
const t_u8 *peer, u8 action_code, t_u8 dialog_token,
|
||||
t_u16 status_code, t_u32 peer_capability,
|
||||
|
@ -8240,6 +8250,7 @@ int woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
|
|||
size_t extra_ies_len)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
int ret = 0;
|
||||
|
|
|
@ -3398,9 +3398,9 @@ int woal_uap_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
|
|||
if (info->param.sta_list.info[idx].stats.last_rx_in_msec) {
|
||||
moal_get_system_time(priv->phandle, &sec, &usec);
|
||||
cur_msec = (t_u64)sec * 1000 + (t_u64)usec / 1000;
|
||||
sinfo->inactive_time = (t_u32)(
|
||||
cur_msec -
|
||||
info->param.sta_list.info[idx].stats.last_rx_in_msec);
|
||||
sinfo->inactive_time =
|
||||
(t_u32)(cur_msec - info->param.sta_list.info[idx]
|
||||
.stats.last_rx_in_msec);
|
||||
PRINTM(MIOCTL,
|
||||
"cur:%llu - [%d].last_rx:%llu = inactive_time:%d\n",
|
||||
cur_msec, idx,
|
||||
|
|
|
@ -3212,8 +3212,8 @@ static int woal_get_scan(struct net_device *dev, struct iw_request_info *info,
|
|||
|
||||
while ((unsigned int)beacon_size >=
|
||||
sizeof(IEEEtypes_Header_t)) {
|
||||
element_id = (IEEEtypes_ElementId_e)(
|
||||
*(t_u8 *)pbeacon);
|
||||
element_id = (IEEEtypes_ElementId_e)(*(
|
||||
t_u8 *)pbeacon);
|
||||
element_len = *((t_u8 *)pbeacon + 1);
|
||||
if ((unsigned int)beacon_size <
|
||||
(unsigned int)element_len +
|
||||
|
|
Loading…
Reference in a new issue