mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2026-11-20 18:39:49 -05:00
Driver commit for release MM6X18537.p9 2025-05-27_13:55:57
Firmware version for commit: W8997-16.92.21.p151.4 W9098-17.92.1.p149.70 IW416-16.92.21.p151.4 W8987-16.92.21.p151.4 IW612-18.99.3.p25.7 IW610-18.99.5.p61 AW693-18.99.2.p145.34
This commit is contained in:
parent
ca52bebcc4
commit
eecc5871b1
40 changed files with 464 additions and 980 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='"537.p2"'
|
||||
ccflags-y += -DMLAN_RELEASE_VERSION='"537.p9"'
|
||||
|
||||
ccflags-y += -DFPNUM='"92"'
|
||||
|
||||
|
|
|
|||
40
README
40
README
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
1) FOR DRIVER BUILD
|
||||
|
||||
Goto source code directory.
|
||||
Goto source code directory wlan_src/.
|
||||
make [clean] build
|
||||
The driver and utility binaries can be found in bin_wlan directory.
|
||||
The driver source code is compatible with hosts running Linux kernel versions ranging from 2.6.32 to 6.14.0.
|
||||
The driver and utility binaries can be found in ../bin_xxxx directory.
|
||||
The driver source code is compatible with hosts running Linux kernel versions ranging from 2.6.32 to 6.14.2.
|
||||
|
||||
2) FOR DRIVER INSTALL
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
Bit 1 : uAP
|
||||
Bit 2 : WIFIDIRECT
|
||||
Bit 4 : NAN
|
||||
|
||||
Bit 7 : Zero-Wait DFS
|
||||
max_sta_bss: Maximum number of STA BSS (default 1, max 1)
|
||||
sta_name: Name of the STA interface (default: "mlan")
|
||||
max_uap_bss: Maximum number of uAP BSS (default 1, max 2)
|
||||
|
|
@ -93,6 +93,10 @@
|
|||
pm_keep_power=1|0 <PM keep power in suspend (default) | PM no power in suspend>
|
||||
shutdown_hs=1|0 <Enable HS when shutdown | No HS when shutdown (default)>
|
||||
cfg_11d=0|1|2 <use MLAN default | enable 11d | disable 11d>
|
||||
disable_11h_tpc=0|1 <enable 80211h TPC (default) | disable 80211h TPC of uAP and STA both>
|
||||
(Note: This feature will be supported for IW416 and IW610x chipsets with host_mlme=1 case as of now.)
|
||||
tpe_ie_ignore=0|1 <obey TPE IEs from ex-AP (default) | ignore TPE IEs from ex-AP>
|
||||
make_before_break=0|1, <No make before break during roam (default) | make_before_break during roam)>
|
||||
dts_enable=0|1 <Disable DTS | Enable DTS (default)>
|
||||
fw_name = <FW file name>
|
||||
e.g. copy pcieuart9098_combo_v1.bin to firmware directory, fw_name=nxp/pcieuart9098_combo_v1.bin
|
||||
|
|
@ -145,7 +149,7 @@
|
|||
tx_work=0|1 <Disable tx_work_queue | Enable tx_work_queue (default on iMX)>
|
||||
tx_skb_clone=0|1 <Disable tx_skb_clone | Enable tx_skb_clone (default)>
|
||||
pmqos=0|1 <Disable pmqos | Enable pmqos (default on iMX)>
|
||||
rps=0|x <Disables rps (default) | bit0-bit4 (0x1-0xf) Enables rps on specific cpu>
|
||||
rps=0|x <Disables rps | bit0-bit4 (0x1-0xf) Enables rps on specific cpu (0xf default)>
|
||||
intmode=0|1 <SDIO Interrupt Mode (default) | GPIO Interrupt Mode>
|
||||
gpiopin=0|x <GPIO pin number when intmode=1 (default 0, HW mapped intr on GPIO-21)>
|
||||
pcie_int_mode=0|1 <Legacy mode, MSI mode (default)>
|
||||
|
|
@ -180,12 +184,15 @@
|
|||
wacp_mode=0|1|2 <disable WACP (default) | WACP mode 1 | WACP mode 2>
|
||||
dfs_offload=0|1 <disable dfs offload (default) | enable dfs offload>
|
||||
indrstcfg=x <high byte: GPIO pin number (255 default); low byte: IR mode (0: disable, 1: out-of-band, 2: in band)>
|
||||
auto_fw_reload=0|1|3 <disable|enable PCIE FLR|enable PCIE InBand Reset (default)>
|
||||
auto_fw_reload=0|1 <disable|enable InBand Reset (default)>
|
||||
auto_fw_reload=0|1|3
|
||||
0: disable auto recovery feature
|
||||
1: default for SDIO, use SDIO InBandReset in auto recovery
|
||||
3: default for PCIE, use PCIE InBandReset in auto recovery
|
||||
dmcs=0|1|2 <firmware default (default) | enable dynamic mapping | disable dynamic mapping>
|
||||
host_mlme=0|1 <Operate in non-host_mlme mode | Operate in host_mlme mode (default)>
|
||||
for supplicant/authenticator running on host side, WPA3 support is available only in host_mlme mode
|
||||
for chipset 89xx FP-92, 90xx and later, host_mlme restricted to 1
|
||||
cfg80211_eapol_offload=0|1 <Disable eapol offload (default) | Enable eapol offload>
|
||||
disable_regd_by_driver=0|1 <reg domain set by driver enable | reg domain set by driver disable (default)>
|
||||
reg_alpha2=<Regulatory alpha2 (default NULL)>
|
||||
country_ie_ignore=0|1 <Follow countryIE from AP and beacon hint enable | Ignore countryIE from AP and beacon hint disable (default)>
|
||||
|
|
@ -195,7 +202,7 @@
|
|||
chan_track=0|1 <restore channel tracking parameters(default) | set channel tracking new parameters> for 9098 only
|
||||
keep_previous_scan=0|1, <Flush previous scan result before start scan | Keep previous scan result(default)>
|
||||
auto_11ax=0|1, <disable auto_11ax | enable auto_11ax(default)>
|
||||
dual_nb=0|1, <default combo FW name - single narrowband (default) | default combo FW name - dual narrowband>
|
||||
dual_nb=0|1, <default combo FW name - single narrowband | default combo FW name - dual narrowband (default)>
|
||||
fw_data_cfg=0|x <disable configuration for custom Fw data(default) | set configuration for custom Fw data>
|
||||
Configurations for fw_data_cfg:
|
||||
Bit 0: Configuration for Fw remapping addr
|
||||
|
|
@ -389,13 +396,13 @@
|
|||
|
||||
c) Trigger FW reload
|
||||
echo "fw_reload=1" > /proc/mwlan/adapterX/config trigger SDIO inband firmware reset and reload firmware
|
||||
echo "fw_reload=2" > /proc/mwlan/adapterX/config trigger firmware reload
|
||||
echo "fw_reload=3" > /proc/mwlan/adapterX/config set firmware reload flag in driver.
|
||||
echo "fw_reload=4" > /proc/mwlan/config trigger PCIe FLR and reload firmware.
|
||||
echo "fw_reload=6" > /proc/mwlan/config trigger PCIe inband firmware reset and reload firmware.
|
||||
echo "fw_reload=2" > /proc/mwlan/adapterX/config trigger firmware reload for GPIO based reset
|
||||
echo "fw_reload=3" > /proc/mwlan/adapterX/config This option is used for USB reset
|
||||
echo "fw_reload=4" > /proc/mwlan/adapterX/config trigger PCIe FLR and reload firmware.
|
||||
echo "fw_reload=6" > /proc/mwlan/adapterX/config trigger PCIe inband firmware reset and reload firmware.
|
||||
|
||||
(Note: This feature will be supported on Robin3 and KF2.
|
||||
For CAC-A2, it only work with the board which supports parallel fw download)
|
||||
(Note: This feature will be supported on IW416 and 8997.
|
||||
For 8987, it only work with the board which supports parallel fw download)
|
||||
|
||||
5) FOR RF test mode commands:
|
||||
|
||||
|
|
@ -510,10 +517,15 @@
|
|||
QNum (0-12|17-20, -1:Set to default Value if 11ax QNum:17 else QNum:0)
|
||||
BSSID (xx:xx:xx:xx:xx:xx)
|
||||
|
||||
Note: NumPkt, MaxPktExt, BeamChange,DCM , Doppler, MidamblePeriod and QNum are 11ax paramters
|
||||
|
||||
Example: To start Tx frame with duty cycle, first stop any ongoing Tx
|
||||
and then start Tx frame:
|
||||
echo "tx_frame=0" > /proc/mwlan/adapterX/config
|
||||
For 11ax chips:
|
||||
echo "tx_frame=1 7 0xAAA 0x100 1 20 0 0 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 05:43:3f:c4:51" > /proc/mwlan/adapterX/config
|
||||
For non-11ax chips:
|
||||
echo "tx_frame=1 7 0xAAA 0x100 1 20 0 0 0 0 0 0 0 0 05:43:3f:c4:51" > /proc/mwlan/adapterX/config
|
||||
|
||||
Configure Trigger Frame
|
||||
Start (0|1, 0:disable, 1:enable)
|
||||
|
|
|
|||
|
|
@ -1774,6 +1774,11 @@ mlan_status wlan_ret_11n_addba_req(mlan_private *priv, HostCmd_DS_COMMAND *resp)
|
|||
|
||||
tid = (padd_ba_rsp->block_ack_param_set & BLOCKACKPARAM_TID_MASK) >>
|
||||
BLOCKACKPARAM_TID_POS;
|
||||
if (tid >= 8) {
|
||||
PRINTM(MERROR, "Invalid TID value: %d\n", tid);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
tid_down = wlan_get_wmm_tid_down(priv, tid);
|
||||
ra_list = wlan_wmm_get_ralist_node(priv, tid_down,
|
||||
padd_ba_rsp->peer_mac_addr);
|
||||
|
|
|
|||
|
|
@ -1740,60 +1740,6 @@ t_u16 wlan_adjust_data_rate(mlan_private *priv, t_u8 rx_rate, t_u8 rate_info)
|
|||
#ifdef STA_SUPPORT
|
||||
#endif /* STA_SUPPORT */
|
||||
|
||||
/**
|
||||
* @brief convert TX rate_info from v14 to v15+ FW rate_info
|
||||
*
|
||||
* @param v14_rate_info v14 rate info
|
||||
*
|
||||
* @return v15+ rate info
|
||||
*/
|
||||
t_u8 wlan_convert_v14_tx_rate_info(pmlan_private pmpriv, t_u8 v14_rate_info)
|
||||
{
|
||||
t_u8 rate_info = 0;
|
||||
|
||||
if (!pmpriv->adapter->pcard_info->v14_fw_api) {
|
||||
PRINTM(MERROR, "%s: Not convert for this is not V14 FW\n",
|
||||
__func__);
|
||||
return v14_rate_info;
|
||||
}
|
||||
|
||||
rate_info = v14_rate_info & 0x01;
|
||||
/* band */
|
||||
rate_info |= (v14_rate_info & MBIT(1)) << 1;
|
||||
/* short GI */
|
||||
rate_info |= (v14_rate_info & MBIT(2)) << 2;
|
||||
return rate_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief convert RX rate_info from v14 to v15+ FW rate_info
|
||||
*
|
||||
* @param v14_rate_info v14 rate info
|
||||
*
|
||||
* @return v15+ rate info
|
||||
*/
|
||||
t_u8 wlan_convert_v14_rx_rate_info(pmlan_private pmpriv, t_u8 v14_rate_info)
|
||||
{
|
||||
t_u8 rate_info = 0;
|
||||
t_u8 mode = 0;
|
||||
t_u8 bw = 0;
|
||||
t_u8 sgi = 0;
|
||||
|
||||
if (!pmpriv->adapter->pcard_info->v14_fw_api) {
|
||||
PRINTM(MERROR, "%s: Not convert for this is not V14 FW\n",
|
||||
__func__);
|
||||
return v14_rate_info;
|
||||
}
|
||||
|
||||
mode = v14_rate_info & MBIT(0);
|
||||
bw = v14_rate_info & MBIT(1);
|
||||
sgi = (v14_rate_info & 0x04) >> 2;
|
||||
|
||||
rate_info = (mode & 0x01) | ((bw & 0x01) << 2) | ((sgi & 0x01) << 4);
|
||||
|
||||
return rate_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Use index to get the data rate
|
||||
*
|
||||
|
|
|
|||
|
|
@ -4342,15 +4342,6 @@ mlan_status wlan_ret_802_11_tx_rate_query(pmlan_private pmpriv,
|
|||
|
||||
pmpriv->tx_rate = resp->params.tx_rate.tx_rate;
|
||||
pmpriv->tx_rate_info = resp->params.tx_rate.tx_rate_info;
|
||||
if (pmpriv->adapter->pcard_info->v14_fw_api) {
|
||||
pmpriv->tx_rate_info = wlan_convert_v14_tx_rate_info(
|
||||
pmpriv, pmpriv->tx_rate_info);
|
||||
PRINTM(MINFO,
|
||||
"%s: v14_fw_api=%d tx_rate=%d tx_rate_info=0x%x->0x%x\n",
|
||||
__func__, pmpriv->adapter->pcard_info->v14_fw_api,
|
||||
pmpriv->tx_rate, resp->params.tx_rate.tx_rate_info,
|
||||
pmpriv->tx_rate_info);
|
||||
}
|
||||
if ((pmpriv->tx_rate_info & 0x3) == MLAN_RATE_FORMAT_HE)
|
||||
pmpriv->ext_tx_rate_info =
|
||||
resp->params.tx_rate.ext_tx_rate_info;
|
||||
|
|
|
|||
|
|
@ -477,6 +477,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_SDAW693 "SDAW693"
|
||||
/** SDIW610 Card */
|
||||
#define CARD_SDIW610 "SDIW610"
|
||||
/** SDIW623 Card */
|
||||
#define CARD_SDIW623 "SDIW623"
|
||||
#endif
|
||||
|
||||
#ifdef PCIE
|
||||
|
|
@ -518,6 +520,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_PCIEAW693 "PCIEAW693"
|
||||
/** PCIEIW629 Card */
|
||||
#define CARD_PCIEIW629 "PCIEIW629"
|
||||
/** PCIEIW623 Card */
|
||||
#define CARD_PCIEIW623 "PCIEIW623"
|
||||
#endif
|
||||
|
||||
#ifdef USB
|
||||
|
|
@ -1098,6 +1102,12 @@ typedef MLAN_PACK_START struct _chan_band_info {
|
|||
t_u8 is_dfs_chan;
|
||||
} MLAN_PACK_END chan_band_info;
|
||||
|
||||
/** remain_on_channel_info */
|
||||
typedef MLAN_PACK_START struct _remain_on_channel_info {
|
||||
/* Is previous AP lost when waiting doing Auth RoC */
|
||||
t_bool delay_link_lost;
|
||||
} MLAN_PACK_END remain_on_channel_info;
|
||||
|
||||
#if defined(STA_SUPPORT)
|
||||
/** MrvlIEtypes_chan_band_reginfo_t */
|
||||
typedef MLAN_PACK_START struct _MrvlIEtypes_chan_band_reginfo_t {
|
||||
|
|
|
|||
|
|
@ -933,6 +933,8 @@ enum host_cmd_id {
|
|||
#define FW_CAPINFO_EASY_MESH MBIT(21)
|
||||
/** FW cap info bit 22: ADDBA support with scan */
|
||||
#define FW_CAPINFO_ALLOW_ADDBA_RESP_ON_SCAN MBIT(22)
|
||||
/** FW cap info bit 23: MAC2 is not available */
|
||||
#define FW_CAPINFO_EXT_NO_MAC2 MBIT(23)
|
||||
|
||||
/** Check if 5G 1x1 only is supported by firmware */
|
||||
#define IS_FW_SUPPORT_5G_1X1_ONLY(_adapter) \
|
||||
|
|
@ -3285,10 +3287,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_802_11_GET_LOG {
|
|||
t_u32 gdma_abort_cnt;
|
||||
/** Rx Reset MAC Count */
|
||||
t_u32 g_reset_rx_mac_cnt;
|
||||
/** Current SOC Temperature*/
|
||||
t_u32 currTemp;
|
||||
/** TX Power Control Method*/
|
||||
t_u32 TXpwrMethod;
|
||||
/** SDMA FSM stuck Count*/
|
||||
t_u32 SdmaStuckCnt;
|
||||
// Ownership error counters
|
||||
|
|
@ -3300,6 +3298,8 @@ typedef MLAN_PACK_START struct _HostCmd_DS_802_11_GET_LOG {
|
|||
t_u32 dwMgtErrCnt;
|
||||
/*Control Ownership error count*/
|
||||
t_u32 dwDatErrCnt;
|
||||
/*Rx 20MHz UL OFDM error count*/
|
||||
t_u32 Rx2040BWError;
|
||||
/*BIGTK MME good count*/
|
||||
t_u32 bigtk_mmeGoodCnt;
|
||||
/*BIGTK Replay error count*/
|
||||
|
|
@ -3308,6 +3308,12 @@ typedef MLAN_PACK_START struct _HostCmd_DS_802_11_GET_LOG {
|
|||
t_u32 bigtk_micErrCnt;
|
||||
/*BIGTK MME not included count*/
|
||||
t_u32 bigtk_mmeNotFoundCnt;
|
||||
/** Current SOC Temperature*/
|
||||
t_u32 currTemp;
|
||||
/** TX Power Control Method*/
|
||||
t_u32 TXpwrMethod;
|
||||
/** DPD training status*/
|
||||
t_u32 isDPDdone;
|
||||
} MLAN_PACK_END HostCmd_DS_802_11_GET_LOG;
|
||||
|
||||
/* maln wifi rate */
|
||||
|
|
|
|||
|
|
@ -1832,10 +1832,6 @@ typedef struct _mlan_ds_get_stats {
|
|||
t_u32 gdma_abort_cnt;
|
||||
/** Rx Reset MAC Count */
|
||||
t_u32 g_reset_rx_mac_cnt;
|
||||
/** Current SOC Temperature*/
|
||||
t_u32 currTemp;
|
||||
/** TX Power Control Method*/
|
||||
t_u32 TXpwrMethod;
|
||||
/** SDMA FSM stuck Count*/
|
||||
t_u32 SdmaStuckCnt;
|
||||
// Ownership error counters
|
||||
|
|
@ -1847,6 +1843,8 @@ typedef struct _mlan_ds_get_stats {
|
|||
t_u32 dwMgtErrCnt;
|
||||
/*Control Ownership error count*/
|
||||
t_u32 dwDatErrCnt;
|
||||
/*Rx 20MHz UL OFDM error count*/
|
||||
t_u32 Rx2040BWError;
|
||||
/*BIGTK MME good count*/
|
||||
t_u32 bigtk_mmeGoodCnt;
|
||||
/*BIGTK Replay error count*/
|
||||
|
|
@ -1855,6 +1853,12 @@ typedef struct _mlan_ds_get_stats {
|
|||
t_u32 bigtk_micErrCnt;
|
||||
/*BIGTK MME not included count*/
|
||||
t_u32 bigtk_mmeNotFoundCnt;
|
||||
/** Current SOC Temperature*/
|
||||
t_u32 currTemp;
|
||||
/** TX Power Control Method*/
|
||||
t_u32 TXpwrMethod;
|
||||
/** DPD training status*/
|
||||
t_u32 isDPDdone;
|
||||
} mlan_ds_get_stats, *pmlan_ds_get_stats;
|
||||
|
||||
/** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */
|
||||
|
|
|
|||
|
|
@ -1088,6 +1088,7 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
memcpy_ext(pmpriv->adapter, &pmpriv->curr_bss_params.attemp_bssid,
|
||||
pbss_desc->mac_address, MLAN_MAC_ADDR_LENGTH,
|
||||
MLAN_MAC_ADDR_LENGTH);
|
||||
pmpriv->delay_link_lost = MFALSE;
|
||||
/* back up previous AP's assoc_resp and assoc_req buffer*/
|
||||
if (pmpriv->media_connected) {
|
||||
memcpy_ext(pmpriv->adapter, &pmpriv->prev_bssid,
|
||||
|
|
@ -1777,6 +1778,7 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
|||
} else
|
||||
passoc_rsp = (IEEEtypes_AssocRsp_t *)&resp->params;
|
||||
passoc_rsp->status_code = wlan_le16_to_cpu(passoc_rsp->status_code);
|
||||
pmpriv->delay_link_lost = MFALSE;
|
||||
if (pmpriv->media_connected == MTRUE)
|
||||
memcpy_ext(pmpriv->adapter, cur_mac,
|
||||
pmpriv->curr_bss_params.bss_descriptor.mac_address,
|
||||
|
|
@ -1811,9 +1813,10 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
|||
pmpriv->port_open = pmpriv->prior_port_status;
|
||||
if (!memcmp(pmpriv->adapter, cur_mac,
|
||||
pmpriv->pattempted_bss_desc->mac_address,
|
||||
MLAN_MAC_ADDR_LENGTH))
|
||||
MLAN_MAC_ADDR_LENGTH) ||
|
||||
!pmpriv->prior_assoc_rsp_size) {
|
||||
wlan_reset_connect_state(pmpriv, MTRUE);
|
||||
else {
|
||||
} else {
|
||||
// fallback to previous AP
|
||||
memcpy_ext(
|
||||
pmpriv->adapter,
|
||||
|
|
|
|||
|
|
@ -610,9 +610,9 @@ extern t_void (*assert_callback)(t_void *pmoal_handle, t_u32 cond);
|
|||
#define MIN_BA_THRESHOLD 16
|
||||
|
||||
/** High threshold at which to start drop packets */
|
||||
#define RX_HIGH_THRESHOLD 1024
|
||||
#define RX_HIGH_THRESHOLD 8192
|
||||
/** Low threshold to allow Rx BA */
|
||||
#define RX_LOW_THRESHOLD 128
|
||||
#define RX_LOW_THRESHOLD 1024
|
||||
|
||||
#define MFG_CMD_SET_TEST_MODE 1
|
||||
#define MFG_CMD_UNSET_TEST_MODE 0
|
||||
|
|
@ -1377,6 +1377,8 @@ typedef struct _mlan_private {
|
|||
t_u8 assoc_req_buf[ASSOC_RSP_BUF_SIZE];
|
||||
/** Length of the data stored in assoc_rsp_buf */
|
||||
t_u32 assoc_req_size;
|
||||
/** delay link lost flag */
|
||||
t_u8 delay_link_lost;
|
||||
/** prev_bssid */
|
||||
mlan_802_11_mac_addr prev_bssid;
|
||||
/** Buffer to store the association response for application retrieval
|
||||
|
|
@ -2422,8 +2424,6 @@ typedef struct _mlan_usb_card {
|
|||
typedef struct _mlan_card_info {
|
||||
/** Max Tx buffer size */
|
||||
t_u32 max_tx_buf_size;
|
||||
/** support V14_FW_API */
|
||||
t_u8 v14_fw_api;
|
||||
/** support V16_FW_API */
|
||||
t_u8 v16_fw_api;
|
||||
/** support V17_FW_API */
|
||||
|
|
@ -3966,8 +3966,6 @@ t_void wlan_free_curr_bcn(mlan_private *pmpriv);
|
|||
#endif /* STA_SUPPORT */
|
||||
|
||||
/* Rate related functions */
|
||||
t_u8 wlan_convert_v14_tx_rate_info(pmlan_private pmpriv, t_u8 v14_rate_info);
|
||||
t_u8 wlan_convert_v14_rx_rate_info(pmlan_private pmpriv, t_u8 v14_rate_info);
|
||||
/** Convert index into data rate */
|
||||
t_u32 wlan_index_to_data_rate(pmlan_adapter pmadapter, t_u8 index,
|
||||
t_u8 rate_info, t_u8 ext_rate_info);
|
||||
|
|
|
|||
|
|
@ -3499,6 +3499,7 @@ mlan_status wlan_process_802dot11_mgmt_pkt(mlan_private *priv, t_u8 *payload,
|
|||
#endif
|
||||
case SUBTYPE_AUTH:
|
||||
unicast = MTRUE;
|
||||
priv->delay_link_lost = MFALSE;
|
||||
PRINTM_NETINTF(MMSG, priv);
|
||||
PRINTM(MMSG, "wlan: HostMlme Auth received from " MACSTR "\n",
|
||||
MAC2STR(pieee_pkt_hdr->addr2));
|
||||
|
|
@ -5456,7 +5457,7 @@ mlan_status wlan_radio_ioctl_remain_chan_cfg(pmlan_adapter pmadapter,
|
|||
PRINTM(MCMND, "Ignore New Remain on channe: chan=%d\n",
|
||||
radio_cfg->param.remain_chan.channel);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7237,7 +7238,6 @@ mlan_status wlan_misc_ioctl_ch_load(pmlan_adapter pmadapter,
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get CHAN_TPRC setting
|
||||
*
|
||||
|
|
|
|||
|
|
@ -4892,10 +4892,6 @@ mlan_status wlan_alloc_ssu_pcie_buf(pmlan_adapter pmadapter)
|
|||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
mlan_buffer *pmbuf = MNULL;
|
||||
/** Virtual base address of ssu buffer */
|
||||
t_u8 *ssu_vbase = MNULL;
|
||||
/** Physical base address of ssu buffer */
|
||||
t_u64 ssu_pbase = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -4905,32 +4901,26 @@ mlan_status wlan_alloc_ssu_pcie_buf(pmlan_adapter pmadapter)
|
|||
return ret;
|
||||
}
|
||||
/* Allocate buffer here so that firmware can DMA data on it */
|
||||
pmbuf = wlan_alloc_mlan_buffer(pmadapter, 0, 0, MOAL_MALLOC_BUFFER);
|
||||
pmbuf = wlan_alloc_mlan_buffer(pmadapter, MLAN_SSU_BUF_SIZE,
|
||||
MLAN_SSU_HEADER_SIZE,
|
||||
MOAL_ALLOC_MLAN_BUFFER);
|
||||
if (!pmbuf) {
|
||||
PRINTM(MERROR,
|
||||
"SSU buffer create : Unable to allocate mlan_buffer\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
ret = pcb->moal_malloc_consistent(pmadapter->pmoal_handle,
|
||||
MLAN_SSU_BUF_SIZE, &ssu_vbase,
|
||||
&ssu_pbase);
|
||||
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR, "%s: No free moal_malloc_consistent\n",
|
||||
__FUNCTION__);
|
||||
if (MLAN_STATUS_FAILURE ==
|
||||
pcb->moal_map_memory(
|
||||
pmadapter->pmoal_handle, pmbuf->pbuf + pmbuf->data_offset,
|
||||
&pmbuf->buf_pa, MLAN_SSU_BUF_SIZE, PCI_DMA_FROMDEVICE)) {
|
||||
PRINTM(MERROR, "%s: moal_map_memory failed\n", __FUNCTION__);
|
||||
/* free pmbuf */
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
pmbuf->buf_pa = ssu_pbase;
|
||||
pmbuf->pbuf = ssu_vbase;
|
||||
pmbuf->data_offset = 0;
|
||||
pmbuf->data_len = MLAN_SSU_BUF_SIZE;
|
||||
pmbuf->total_pcie_buf_len = MLAN_SSU_BUF_SIZE;
|
||||
|
||||
PRINTM(MCMND,
|
||||
"SSU buffer: add new mlan_buffer base: %p, "
|
||||
"buf_base: %p, data_offset: %x, buf_pbase: %#x:%x, "
|
||||
|
|
@ -4956,8 +4946,6 @@ mlan_status wlan_free_ssu_pcie_buf(pmlan_adapter pmadapter)
|
|||
{
|
||||
pmlan_callbacks pcb = MNULL;
|
||||
mlan_buffer *pmbuf = MNULL;
|
||||
t_u8 *ssu_vbase;
|
||||
t_u64 ssu_pbase;
|
||||
|
||||
ENTER();
|
||||
if (!pmadapter) {
|
||||
|
|
@ -4968,12 +4956,6 @@ mlan_status wlan_free_ssu_pcie_buf(pmlan_adapter pmadapter)
|
|||
pcb = &pmadapter->callbacks;
|
||||
if (pmadapter->ssu_buf) {
|
||||
pmbuf = pmadapter->ssu_buf;
|
||||
ssu_vbase = pmbuf->pbuf;
|
||||
ssu_pbase = pmbuf->buf_pa;
|
||||
if (ssu_vbase)
|
||||
pcb->moal_mfree_consistent(pmadapter->pmoal_handle,
|
||||
pmbuf->total_pcie_buf_len,
|
||||
ssu_vbase, ssu_pbase);
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
}
|
||||
pmadapter->ssu_buf = MNULL;
|
||||
|
|
|
|||
|
|
@ -1586,11 +1586,7 @@ process_start:
|
|||
|
||||
/* Send the scan command to the firmware with the specified cfg
|
||||
*/
|
||||
if (pmadapter->ext_scan
|
||||
#ifdef USB8801
|
||||
&& !IS_USB8801(pmadapter->card_type)
|
||||
#endif
|
||||
)
|
||||
if (pmadapter->ext_scan)
|
||||
cmd_no = HostCmd_CMD_802_11_SCAN_EXT;
|
||||
else
|
||||
cmd_no = HostCmd_CMD_802_11_SCAN;
|
||||
|
|
@ -4322,7 +4318,9 @@ static t_void wlan_scan_process_results(mlan_private *pmpriv)
|
|||
1,
|
||||
pmadapter->num_in_scan_table,
|
||||
bss_new_entry);
|
||||
if (bss_new_entry->pbeacon_buf == MNULL)
|
||||
if (bss_new_entry->pbeacon_buf ==
|
||||
MNULL &&
|
||||
pmadapter->num_in_scan_table)
|
||||
pmadapter->num_in_scan_table--;
|
||||
else
|
||||
memcpy_ext(
|
||||
|
|
|
|||
232
mlan/mlan_sdio.c
232
mlan/mlan_sdio.c
|
|
@ -111,47 +111,6 @@ static const struct _mlan_card_info mlan_card_info_sd8887 = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef SD8801
|
||||
static const struct _mlan_sdio_card_reg mlan_reg_sd8801 = {
|
||||
.start_rd_port = 1,
|
||||
.start_wr_port = 1,
|
||||
.base_0_reg = 0x40,
|
||||
.base_1_reg = 0x41,
|
||||
.poll_reg = 0x30,
|
||||
.host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK,
|
||||
.host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS,
|
||||
.status_reg_0 = 0x60,
|
||||
.status_reg_1 = 0x61,
|
||||
.sdio_int_mask = 0x3f,
|
||||
.data_port_mask = 0x0000fffe,
|
||||
.max_mp_regs = 64,
|
||||
.rd_bitmap_l = 0x4,
|
||||
.rd_bitmap_u = 0x5,
|
||||
.wr_bitmap_l = 0x6,
|
||||
.wr_bitmap_u = 0x7,
|
||||
.rd_len_p0_l = 0x8,
|
||||
.rd_len_p0_u = 0x9,
|
||||
.io_port_0_reg = 0x78,
|
||||
.io_port_1_reg = 0x79,
|
||||
.io_port_2_reg = 0x7A,
|
||||
.host_int_rsr_reg = 0x01,
|
||||
.host_int_mask_reg = 0x02,
|
||||
.host_int_status_reg = 0x03,
|
||||
.card_misc_cfg_reg = 0x6c,
|
||||
.fw_reset_reg = 0x64,
|
||||
.fw_reset_val = 0,
|
||||
};
|
||||
|
||||
static const struct _mlan_card_info mlan_card_info_sd8801 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K,
|
||||
.v14_fw_api = 1,
|
||||
.v16_fw_api = 0,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_1X1,
|
||||
.support_11mc = 0,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SD8897
|
||||
static const struct _mlan_sdio_card_reg mlan_reg_sd8897 = {
|
||||
.start_rd_port = 0,
|
||||
|
|
@ -423,34 +382,6 @@ static mlan_status wlan_sdio_init_ioport(mlan_adapter *pmadapter)
|
|||
ENTER();
|
||||
if (pmadapter->pcard_sd->supports_sdio_new_mode) {
|
||||
pmadapter->pcard_sd->ioport = MEM_PORT;
|
||||
} else {
|
||||
if (MLAN_STATUS_SUCCESS ==
|
||||
pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_sd->reg->io_port_0_reg,
|
||||
®))
|
||||
pmadapter->pcard_sd->ioport |= (reg & 0xff);
|
||||
else {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
if (MLAN_STATUS_SUCCESS ==
|
||||
pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_sd->reg->io_port_1_reg,
|
||||
®))
|
||||
pmadapter->pcard_sd->ioport |= ((reg & 0xff) << 8);
|
||||
else {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
if (MLAN_STATUS_SUCCESS ==
|
||||
pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_sd->reg->io_port_2_reg,
|
||||
®))
|
||||
pmadapter->pcard_sd->ioport |= ((reg & 0xff) << 16);
|
||||
else {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
PRINTM(MINFO, "SDIO FUNC1 IO port: 0x%x\n",
|
||||
pmadapter->pcard_sd->ioport);
|
||||
|
|
@ -596,37 +527,24 @@ static mlan_status wlan_get_rd_port(mlan_adapter *pmadapter, t_u8 *pport)
|
|||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
} else {
|
||||
if (!(rd_bitmap & (CTRL_PORT_MASK | reg->data_port_mask))) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
if (!new_mode && (pmadapter->pcard_sd->mp_rd_bitmap & CTRL_PORT_MASK)) {
|
||||
pmadapter->pcard_sd->mp_rd_bitmap &= (t_u32)(~CTRL_PORT_MASK);
|
||||
*pport = CTRL_PORT;
|
||||
PRINTM(MIF_D, "wlan_get_rd_port: port=%d mp_rd_bitmap=0x%08x\n",
|
||||
*pport, pmadapter->pcard_sd->mp_rd_bitmap);
|
||||
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));
|
||||
*pport = pmadapter->pcard_sd->curr_rd_port;
|
||||
|
||||
/* hw rx wraps round only after port (MAX_PORT-1) */
|
||||
if (++pmadapter->pcard_sd->curr_rd_port == max_ports)
|
||||
pmadapter->pcard_sd->curr_rd_port = reg->start_rd_port;
|
||||
} 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));
|
||||
*pport = pmadapter->pcard_sd->curr_rd_port;
|
||||
|
||||
/* hw rx wraps round only after port (MAX_PORT-1) */
|
||||
if (++pmadapter->pcard_sd->curr_rd_port == max_ports)
|
||||
pmadapter->pcard_sd->curr_rd_port =
|
||||
reg->start_rd_port;
|
||||
} else {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
PRINTM(MIF_D, "port=%d mp_rd_bitmap=0x%08x -> 0x%08x\n", *pport,
|
||||
rd_bitmap, pmadapter->pcard_sd->mp_rd_bitmap);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
PRINTM(MIF_D, "port=%d mp_rd_bitmap=0x%08x -> 0x%08x\n", *pport,
|
||||
rd_bitmap, pmadapter->pcard_sd->mp_rd_bitmap);
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -642,7 +560,6 @@ static mlan_status wlan_get_wr_port_data(mlan_adapter *pmadapter, t_u8 *pport)
|
|||
{
|
||||
t_u32 wr_bitmap = pmadapter->pcard_sd->mp_wr_bitmap;
|
||||
const mlan_sdio_card_reg *reg = pmadapter->pcard_sd->reg;
|
||||
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -668,14 +585,6 @@ static mlan_status wlan_get_wr_port_data(mlan_adapter *pmadapter, t_u8 *pport)
|
|||
LEAVE();
|
||||
return MLAN_STATUS_RESOURCE;
|
||||
}
|
||||
if ((!new_mode) && (*pport == CTRL_PORT)) {
|
||||
PRINTM(MERROR,
|
||||
"Invalid data port=%d cur port=%d mp_wr_bitmap=0x%08x -> 0x%08x\n",
|
||||
*pport, pmadapter->pcard_sd->curr_wr_port, wr_bitmap,
|
||||
pmadapter->pcard_sd->mp_wr_bitmap);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
PRINTM(MIF_D, "port=%d mp_wr_bitmap=0x%08x -> 0x%08x\n", *pport,
|
||||
wr_bitmap, pmadapter->pcard_sd->mp_wr_bitmap);
|
||||
LEAVE();
|
||||
|
|
@ -1544,10 +1453,6 @@ static mlan_status wlan_receive_mp_aggr_buf(mlan_adapter *pmadapter)
|
|||
cmd53_port = (pmadapter->pcard_sd->ioport | SDIO_MPA_ADDR_BASE |
|
||||
(port_count << 8)) +
|
||||
pmadapter->pcard_sd->mpa_rx.start_port;
|
||||
} else {
|
||||
cmd53_port = (pmadapter->pcard_sd->ioport | SDIO_MPA_ADDR_BASE |
|
||||
(pmadapter->pcard_sd->mpa_rx.ports << 4)) +
|
||||
pmadapter->pcard_sd->mpa_rx.start_port;
|
||||
}
|
||||
do {
|
||||
ret = pcb->moal_read_data_sync(pmadapter->pmoal_handle,
|
||||
|
|
@ -1667,14 +1572,6 @@ static mlan_status wlan_sdio_card_to_host_mp_aggr(mlan_adapter *pmadapter,
|
|||
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;
|
||||
|
||||
ENTER();
|
||||
if (!new_mode && (port == CTRL_PORT)) {
|
||||
/* Read the command response or event without aggr */
|
||||
PRINTM(MINFO,
|
||||
"card_2_host_mp_aggr: No aggr for control port\n");
|
||||
|
||||
f_do_rx_cur = 1;
|
||||
goto rx_curr_single;
|
||||
}
|
||||
|
||||
if (!pmadapter->pcard_sd->mpa_rx.enabled) {
|
||||
PRINTM(MINFO,
|
||||
|
|
@ -1684,9 +1581,7 @@ static mlan_status wlan_sdio_card_to_host_mp_aggr(mlan_adapter *pmadapter,
|
|||
goto rx_curr_single;
|
||||
}
|
||||
if ((new_mode &&
|
||||
(pmadapter->pcard_sd->mp_rd_bitmap & reg->data_port_mask)) ||
|
||||
(!new_mode && (pmadapter->pcard_sd->mp_rd_bitmap &
|
||||
(~((t_u32)CTRL_PORT_MASK))))) {
|
||||
(pmadapter->pcard_sd->mp_rd_bitmap & reg->data_port_mask))) {
|
||||
/* Some more data RX pending */
|
||||
PRINTM(MINFO, "card_2_host_mp_aggr: Not last packet\n");
|
||||
|
||||
|
|
@ -1725,13 +1620,8 @@ static mlan_status wlan_sdio_card_to_host_mp_aggr(mlan_adapter *pmadapter,
|
|||
/* Curr pkt can be aggregated */
|
||||
if (new_mode)
|
||||
MP_RX_AGGR_SETUP(pmadapter, pmbuf, port, rx_len);
|
||||
else
|
||||
MP_RX_AGGR_SETUP_NONEWMODE(pmadapter, pmbuf, port,
|
||||
rx_len);
|
||||
if (MP_RX_AGGR_PKT_LIMIT_REACHED(pmadapter) ||
|
||||
((new_mode && MP_RX_AGGR_PORT_LIMIT_REACHED(pmadapter)) ||
|
||||
(!new_mode &&
|
||||
MP_RX_AGGR_PORT_LIMIT_REACHED_NONEWMODE(pmadapter)))) {
|
||||
((new_mode && MP_RX_AGGR_PORT_LIMIT_REACHED(pmadapter)))) {
|
||||
PRINTM(MINFO,
|
||||
"card_2_host_mp_aggr: Aggregation Packet limit reached\n");
|
||||
/* No more pkts allowed in Aggr buf, rx it */
|
||||
|
|
@ -1760,17 +1650,7 @@ rx_curr_single:
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
if (!new_mode &&
|
||||
((port == CTRL_PORT) && ((pkt_type != MLAN_TYPE_EVENT) &&
|
||||
(pkt_type != MLAN_TYPE_CMD)))) {
|
||||
PRINTM(MERROR,
|
||||
"Wrong pkt from CTRL PORT: type=%d, len=%dd\n",
|
||||
pkt_type, pmbuf->data_len);
|
||||
pmbuf->status_code = MLAN_ERROR_DATA_RX_FAIL;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
if (new_mode || (port != CTRL_PORT)) {
|
||||
if (new_mode) {
|
||||
if (pkt_type != MLAN_TYPE_DATA &&
|
||||
pkt_type != MLAN_TYPE_SPA_DATA) {
|
||||
PRINTM(MERROR,
|
||||
|
|
@ -1782,7 +1662,7 @@ rx_curr_single:
|
|||
}
|
||||
}
|
||||
|
||||
if (new_mode || (port != CTRL_PORT))
|
||||
if (new_mode)
|
||||
pmadapter->pcard_sd->mpa_rx_count[0]++;
|
||||
|
||||
wlan_decode_rx_packet(pmadapter, pmbuf, pkt_type, MTRUE);
|
||||
|
|
@ -1792,9 +1672,6 @@ rx_curr_single:
|
|||
/* Curr pkt can be aggregated */
|
||||
if (new_mode)
|
||||
MP_RX_AGGR_SETUP(pmadapter, pmbuf, port, rx_len);
|
||||
else
|
||||
MP_RX_AGGR_SETUP_NONEWMODE(pmadapter, pmbuf, port,
|
||||
rx_len);
|
||||
}
|
||||
done:
|
||||
if (ret == MLAN_STATUS_FAILURE) {
|
||||
|
|
@ -1870,10 +1747,6 @@ mlan_status wlan_send_mp_aggr_buf(mlan_adapter *pmadapter)
|
|||
cmd53_port = (pmadapter->pcard_sd->ioport | SDIO_MPA_ADDR_BASE |
|
||||
(port_count << 8)) +
|
||||
pmadapter->pcard_sd->mpa_tx.start_port;
|
||||
} else {
|
||||
cmd53_port = (pmadapter->pcard_sd->ioport | SDIO_MPA_ADDR_BASE |
|
||||
(pmadapter->pcard_sd->mpa_tx.ports << 4)) +
|
||||
pmadapter->pcard_sd->mpa_tx.start_port;
|
||||
}
|
||||
if (pmadapter->pcard_sd->mpa_tx.pkt_cnt == 1)
|
||||
cmd53_port = pmadapter->pcard_sd->ioport +
|
||||
|
|
@ -2040,19 +1913,12 @@ static mlan_status wlan_host_to_card_mp_aggr(mlan_adapter *pmadapter,
|
|||
if (!pmadapter->pcard_sd->mpa_tx.buf) {
|
||||
if (new_mode)
|
||||
MP_TX_AGGR_BUF_PUT_SG(pmadapter, mbuf, port);
|
||||
else
|
||||
MP_TX_AGGR_BUF_PUT_SG_NONEWMODE(pmadapter, mbuf,
|
||||
port);
|
||||
aggr_sg = MTRUE;
|
||||
} else {
|
||||
if (new_mode)
|
||||
MP_TX_AGGR_BUF_PUT(pmadapter, mbuf, port);
|
||||
else
|
||||
MP_TX_AGGR_BUF_PUT_NONEWMODE(pmadapter, mbuf,
|
||||
port);
|
||||
}
|
||||
if (MP_TX_AGGR_PKT_LIMIT_REACHED(pmadapter) ||
|
||||
(!new_mode && MP_TX_AGGR_PORT_LIMIT_REACHED(pmadapter))) {
|
||||
if (MP_TX_AGGR_PKT_LIMIT_REACHED(pmadapter)) {
|
||||
PRINTM(MIF_D,
|
||||
"host_2_card_mp_aggr: Aggregation Pkt limit reached\n");
|
||||
/* No more pkts allowed in Aggr buf, send it */
|
||||
|
|
@ -2128,16 +1994,10 @@ tx_curr_single:
|
|||
if (!pmadapter->pcard_sd->mpa_tx.buf) {
|
||||
if (new_mode)
|
||||
MP_TX_AGGR_BUF_PUT_SG(pmadapter, mbuf, port);
|
||||
else
|
||||
MP_TX_AGGR_BUF_PUT_SG_NONEWMODE(pmadapter, mbuf,
|
||||
port);
|
||||
aggr_sg = MTRUE;
|
||||
} else {
|
||||
if (new_mode)
|
||||
MP_TX_AGGR_BUF_PUT(pmadapter, mbuf, port);
|
||||
else
|
||||
MP_TX_AGGR_BUF_PUT_NONEWMODE(pmadapter, mbuf,
|
||||
port);
|
||||
}
|
||||
}
|
||||
/* Always return PENDING in SG mode */
|
||||
|
|
@ -2170,12 +2030,6 @@ static mlan_status wlan_sdio_check_winner_status(mlan_adapter *pmadapter,
|
|||
|
||||
ENTER();
|
||||
|
||||
#ifdef SD8801
|
||||
if (IS_SD8801(pmadapter->card_type)) {
|
||||
*val = 0;
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
pcb = &pmadapter->callbacks;
|
||||
|
||||
if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
|
|
@ -2413,20 +2267,6 @@ mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter)
|
|||
pmadapter->pcard_sd->mp_rx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX;
|
||||
|
||||
switch (card_type) {
|
||||
#ifdef SD8801
|
||||
case CARD_TYPE_SD8801:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8801;
|
||||
pmadapter->pcard_info = &mlan_card_info_sd8801;
|
||||
pmadapter->pcard_sd->max_ports = MAX_PORT_16;
|
||||
pmadapter->pcard_sd->mp_aggr_pkt_limit =
|
||||
SDIO_MP_AGGR_DEF_PKT_LIMIT_8;
|
||||
pmadapter->pcard_sd->supports_sdio_new_mode = MFALSE;
|
||||
pmadapter->pcard_sd->mp_tx_aggr_buf_size =
|
||||
SDIO_MP_AGGR_BUF_SIZE_32K;
|
||||
pmadapter->pcard_sd->mp_rx_aggr_buf_size =
|
||||
SDIO_MP_AGGR_BUF_SIZE_32K;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SD8887
|
||||
case CARD_TYPE_SD8887:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8887;
|
||||
|
|
@ -2699,8 +2539,6 @@ static mlan_status wlan_sdio_card_to_host_recovery(mlan_adapter *pmadapter,
|
|||
t_u32 pkt_type = 0;
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
ENTER();
|
||||
if (!pmadapter->pcard_sd->supports_sdio_new_mode)
|
||||
goto done;
|
||||
if (MP_RX_AGGR_IN_PROGRESS(pmadapter)) {
|
||||
PRINTM(MDATA, "Recovery:do Rx Aggr\n");
|
||||
/* do aggr RX now */
|
||||
|
|
@ -2897,15 +2735,6 @@ static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter,
|
|||
pmadapter->data_sent = MFALSE;
|
||||
}
|
||||
}
|
||||
if ((!new_mode) && (pmadapter->cmd_sent == MTRUE)) {
|
||||
/* Check if firmware has attach buffer at command port and
|
||||
* update just that in wr_bit_map. */
|
||||
pmadapter->pcard_sd->mp_wr_bitmap |=
|
||||
(t_u32)pmadapter->pcard_sd->mp_regs[reg->wr_bitmap_l] &
|
||||
CTRL_PORT_MASK;
|
||||
if (pmadapter->pcard_sd->mp_wr_bitmap & CTRL_PORT_MASK)
|
||||
pmadapter->cmd_sent = MFALSE;
|
||||
}
|
||||
|
||||
if (sdio_ireg & UP_LD_HOST_INT_STATUS) {
|
||||
pmadapter->pcard_sd->mp_rd_bitmap =
|
||||
|
|
@ -2959,14 +2788,9 @@ static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter,
|
|||
rx_len = (t_u16)(rx_blocks *
|
||||
pmadapter->pcard_sd->sdio_blk_size);
|
||||
|
||||
if (!new_mode && (port == CTRL_PORT))
|
||||
pmbuf = wlan_alloc_mlan_buffer(
|
||||
pmadapter, rx_len, 0,
|
||||
MOAL_MALLOC_BUFFER);
|
||||
else
|
||||
pmbuf = wlan_alloc_mlan_buffer(
|
||||
pmadapter, rx_len, MLAN_RX_HEADER_LEN,
|
||||
MOAL_ALLOC_MLAN_BUFFER);
|
||||
pmbuf = wlan_alloc_mlan_buffer(pmadapter, rx_len,
|
||||
MLAN_RX_HEADER_LEN,
|
||||
MOAL_ALLOC_MLAN_BUFFER);
|
||||
if (pmbuf == MNULL) {
|
||||
PRINTM(MERROR,
|
||||
"Failed to allocate 'mlan_buffer'\n");
|
||||
|
|
@ -2982,12 +2806,7 @@ static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter,
|
|||
if (MLAN_STATUS_SUCCESS !=
|
||||
wlan_sdio_card_to_host_mp_aggr(pmadapter, pmbuf,
|
||||
port, rx_len)) {
|
||||
if ((!new_mode) && (port == CTRL_PORT))
|
||||
pmadapter->dbg
|
||||
.num_cmdevt_card_to_host_failure++;
|
||||
else
|
||||
pmadapter->dbg
|
||||
.num_rx_card_to_host_failure++;
|
||||
pmadapter->dbg.num_rx_card_to_host_failure++;
|
||||
|
||||
PRINTM(MERROR,
|
||||
"Card to host failed: int status=0x%x\n",
|
||||
|
|
@ -3085,9 +2904,6 @@ mlan_status wlan_sdio_host_to_card(mlan_adapter *pmadapter, t_u8 type,
|
|||
} else {
|
||||
/*Type must be MLAN_TYPE_CMD*/
|
||||
pmadapter->cmd_sent = MTRUE;
|
||||
if (!new_mode)
|
||||
pmadapter->pcard_sd->mp_wr_bitmap &=
|
||||
(t_u32)(~(1 << CTRL_PORT));
|
||||
if (pmbuf->data_len <= SDIO_INTF_HEADER_LEN ||
|
||||
pmbuf->data_len > WLAN_UPLD_SIZE)
|
||||
PRINTM(MWARN,
|
||||
|
|
@ -3098,8 +2914,6 @@ mlan_status wlan_sdio_host_to_card(mlan_adapter *pmadapter, t_u8 type,
|
|||
if (new_mode)
|
||||
cmd53_port =
|
||||
(pmadapter->pcard_sd->ioport) | CMD_PORT_SLCT;
|
||||
else
|
||||
cmd53_port = pmadapter->pcard_sd->ioport + CTRL_PORT;
|
||||
ret = wlan_write_data_sync(pmadapter, pmbuf, cmd53_port);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -130,10 +130,6 @@ Change log:
|
|||
#define REG_PORT 0
|
||||
/** Port for memory */
|
||||
#define MEM_PORT 0x10000
|
||||
/** Ctrl port */
|
||||
#define CTRL_PORT 0
|
||||
/** Ctrl port mask */
|
||||
#define CTRL_PORT_MASK 0x0001
|
||||
/** Card Control Registers : cmd53 new mode */
|
||||
#define CMD53_NEW_MODE (0x1U << 0)
|
||||
/** Card Control Registers : cmd53 tx len format 1 (0x10) */
|
||||
|
|
@ -194,29 +190,6 @@ Change log:
|
|||
a->pcard_sd->mpa_tx.pkt_cnt++; \
|
||||
} while (0)
|
||||
|
||||
#define MP_TX_AGGR_BUF_PUT_NONEWMODE(a, mbuf, port) \
|
||||
do { \
|
||||
pmadapter->callbacks.moal_memmove( \
|
||||
a->pmoal_handle, \
|
||||
&a->pcard_sd->mpa_tx.buf[a->pcard_sd->mpa_tx.buf_len], \
|
||||
mbuf->pbuf + mbuf->data_offset, mbuf->data_len); \
|
||||
a->pcard_sd->mpa_tx.buf_len += mbuf->data_len; \
|
||||
a->pcard_sd->mpa_tx.mp_wr_info[a->pcard_sd->mpa_tx.pkt_cnt] = \
|
||||
*(t_u16 *)(mbuf->pbuf + mbuf->data_offset); \
|
||||
if (!a->pcard_sd->mpa_tx.pkt_cnt) { \
|
||||
a->pcard_sd->mpa_tx.start_port = port; \
|
||||
} \
|
||||
if (a->pcard_sd->mpa_tx.start_port <= port) { \
|
||||
a->pcard_sd->mpa_tx.ports |= \
|
||||
(1 << (a->pcard_sd->mpa_tx.pkt_cnt)); \
|
||||
} else { \
|
||||
a->pcard_sd->mpa_tx.ports |= \
|
||||
(1 << (a->pcard_sd->mpa_tx.pkt_cnt + 1 + \
|
||||
(a->pcard_sd->max_ports - \
|
||||
a->pcard_sd->mp_end_port))); \
|
||||
} \
|
||||
a->pcard_sd->mpa_tx.pkt_cnt++; \
|
||||
} while (0)
|
||||
#define MP_TX_AGGR_BUF_PUT_SG(a, mbuf, port) \
|
||||
do { \
|
||||
a->pcard_sd->mpa_tx.buf_len += mbuf->data_len; \
|
||||
|
|
@ -230,37 +203,11 @@ Change log:
|
|||
a->pcard_sd->mpa_tx.ports |= (1 << port); \
|
||||
a->pcard_sd->mpa_tx.pkt_cnt++; \
|
||||
} while (0)
|
||||
#define MP_TX_AGGR_BUF_PUT_SG_NONEWMODE(a, mbuf, port) \
|
||||
do { \
|
||||
a->pcard_sd->mpa_tx.buf_len += mbuf->data_len; \
|
||||
a->pcard_sd->mpa_tx.mp_wr_info[a->pcard_sd->mpa_tx.pkt_cnt] = \
|
||||
*(t_u16 *)(mbuf->pbuf + mbuf->data_offset); \
|
||||
a->pcard_sd->mpa_tx.mbuf_arr[a->pcard_sd->mpa_tx.pkt_cnt] = \
|
||||
mbuf; \
|
||||
if (!a->pcard_sd->mpa_tx.pkt_cnt) { \
|
||||
a->pcard_sd->mpa_tx.start_port = port; \
|
||||
} \
|
||||
if (a->pcard_sd->mpa_tx.start_port <= port) { \
|
||||
a->pcard_sd->mpa_tx.ports |= \
|
||||
(1 << (a->pcard_sd->mpa_tx.pkt_cnt)); \
|
||||
} else { \
|
||||
a->pcard_sd->mpa_tx.ports |= \
|
||||
(1 << (a->pcard_sd->mpa_tx.pkt_cnt + 1 + \
|
||||
(a->pcard_sd->max_ports - \
|
||||
a->pcard_sd->mp_end_port))); \
|
||||
} \
|
||||
a->pcard_sd->mpa_tx.pkt_cnt++; \
|
||||
} while (0)
|
||||
|
||||
/** SDIO Tx aggregation limit ? */
|
||||
#define MP_TX_AGGR_PKT_LIMIT_REACHED(a) \
|
||||
((a->pcard_sd->mpa_tx.pkt_cnt) == (a->pcard_sd->mpa_tx.pkt_aggr_limit))
|
||||
|
||||
#define MP_TX_AGGR_PORT_LIMIT_REACHED(a) \
|
||||
((a->pcard_sd->curr_wr_port < a->pcard_sd->mpa_tx.start_port) && \
|
||||
(((a->pcard_sd->max_ports - a->pcard_sd->mpa_tx.start_port) + \
|
||||
a->pcard_sd->curr_wr_port) >= a->pcard_sd->mp_aggr_pkt_limit))
|
||||
|
||||
/** Reset SDIO Tx aggregation buffer parameters */
|
||||
#define MP_TX_AGGR_BUF_RESET(a) \
|
||||
do { \
|
||||
|
|
@ -289,11 +236,6 @@ Change log:
|
|||
((a->pcard_sd->curr_rd_port - a->pcard_sd->mpa_rx.start_port) >= \
|
||||
(a->pcard_sd->mp_end_port >> 1)))
|
||||
|
||||
#define MP_RX_AGGR_PORT_LIMIT_REACHED_NONEWMODE(a) \
|
||||
((a->pcard_sd->curr_rd_port < a->pcard_sd->mpa_rx.start_port) && \
|
||||
(((a->pcard_sd->max_ports - a->pcard_sd->mpa_rx.start_port) + \
|
||||
a->pcard_sd->curr_rd_port) >= a->pcard_sd->mp_aggr_pkt_limit))
|
||||
|
||||
/** SDIO Rx aggregation in progress ? */
|
||||
#define MP_RX_AGGR_IN_PROGRESS(a) (a->pcard_sd->mpa_rx.pkt_cnt > 0)
|
||||
|
||||
|
|
@ -316,26 +258,6 @@ Change log:
|
|||
a->pcard_sd->mpa_rx.pkt_cnt++; \
|
||||
} while (0)
|
||||
|
||||
#define MP_RX_AGGR_SETUP_NONEWMODE(a, mbuf, port, rx_len) \
|
||||
do { \
|
||||
a->pcard_sd->mpa_rx.buf_len += rx_len; \
|
||||
if (!a->pcard_sd->mpa_rx.pkt_cnt) { \
|
||||
a->pcard_sd->mpa_rx.start_port = port; \
|
||||
} \
|
||||
if (a->pcard_sd->mpa_rx.start_port <= port) { \
|
||||
a->pcard_sd->mpa_rx.ports |= \
|
||||
(1 << (a->pcard_sd->mpa_rx.pkt_cnt)); \
|
||||
} else { \
|
||||
a->pcard_sd->mpa_rx.ports |= \
|
||||
(1 << (a->pcard_sd->mpa_rx.pkt_cnt + 1)); \
|
||||
} \
|
||||
a->pcard_sd->mpa_rx.mbuf_arr[a->pcard_sd->mpa_rx.pkt_cnt] = \
|
||||
mbuf; \
|
||||
a->pcard_sd->mpa_rx.len_arr[a->pcard_sd->mpa_rx.pkt_cnt] = \
|
||||
rx_len; \
|
||||
a->pcard_sd->mpa_rx.pkt_cnt++; \
|
||||
} while (0);
|
||||
|
||||
/** Reset SDIO Rx aggregation buffer parameters */
|
||||
#define MP_RX_AGGR_BUF_RESET(a) \
|
||||
do { \
|
||||
|
|
|
|||
|
|
@ -697,8 +697,9 @@ static mlan_status wlan_ret_get_log(pmlan_private pmpriv,
|
|||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
HostCmd_DS_802_11_GET_LOG *pget_log =
|
||||
(HostCmd_DS_802_11_GET_LOG *)&resp->params.get_log;
|
||||
HostCmd_DS_802_11_GET_LOG get_log_tmp = {0},
|
||||
*pget_log = (HostCmd_DS_802_11_GET_LOG *)&resp
|
||||
->params.get_log;
|
||||
mlan_ds_get_info *pget_info = MNULL;
|
||||
int i = 0;
|
||||
|
||||
|
|
@ -706,6 +707,17 @@ static mlan_status wlan_ret_get_log(pmlan_private pmpriv,
|
|||
|
||||
if (pioctl_buf) {
|
||||
pget_info = (mlan_ds_get_info *)pioctl_buf->pbuf;
|
||||
// coverity[bad_memset:SUPPRESS]
|
||||
// coverity[too_many_arguments:SUPPRESS]
|
||||
// coverity[misra_c_2012_rule_21_18_violation:SUPPRESS]
|
||||
memset(pmpriv->adapter, &pget_info->param.stats, 0,
|
||||
sizeof(HostCmd_DS_802_11_GET_LOG));
|
||||
memcpy_ext(pmpriv->adapter, (t_u8 *)&get_log_tmp,
|
||||
(t_u8 *)pget_log,
|
||||
((resp->size) - (sizeof(HostCmd_DS_GEN))),
|
||||
sizeof(HostCmd_DS_802_11_GET_LOG));
|
||||
pget_log = &get_log_tmp;
|
||||
|
||||
pget_info->param.stats.mcast_tx_frame =
|
||||
wlan_le32_to_cpu(pget_log->mcast_tx_frame);
|
||||
pget_info->param.stats.failed =
|
||||
|
|
@ -784,10 +796,6 @@ static mlan_status wlan_ret_get_log(pmlan_private pmpriv,
|
|||
wlan_le32_to_cpu(pget_log->gdma_abort_cnt);
|
||||
pget_info->param.stats.g_reset_rx_mac_cnt =
|
||||
wlan_le32_to_cpu(pget_log->g_reset_rx_mac_cnt);
|
||||
pget_info->param.stats.currTemp =
|
||||
wlan_le32_to_cpu(pget_log->currTemp);
|
||||
pget_info->param.stats.TXpwrMethod =
|
||||
wlan_le32_to_cpu(pget_log->TXpwrMethod);
|
||||
pget_info->param.stats.SdmaStuckCnt =
|
||||
wlan_le32_to_cpu(pget_log->SdmaStuckCnt);
|
||||
// Ownership error counters
|
||||
|
|
@ -807,6 +815,12 @@ static mlan_status wlan_ret_get_log(pmlan_private pmpriv,
|
|||
wlan_le32_to_cpu(pget_log->bigtk_micErrCnt);
|
||||
pget_info->param.stats.bigtk_mmeNotFoundCnt =
|
||||
wlan_le32_to_cpu(pget_log->bigtk_mmeNotFoundCnt);
|
||||
pget_info->param.stats.currTemp =
|
||||
wlan_le32_to_cpu(pget_log->currTemp);
|
||||
pget_info->param.stats.TXpwrMethod =
|
||||
wlan_le32_to_cpu(pget_log->TXpwrMethod);
|
||||
pget_info->param.stats.isDPDdone =
|
||||
wlan_le32_to_cpu(pget_log->isDPDdone);
|
||||
|
||||
if (pmpriv->adapter->getlog_enable) {
|
||||
pget_info->param.stats.tx_frag_cnt =
|
||||
|
|
|
|||
|
|
@ -538,6 +538,7 @@ t_void wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
|||
pevent->event_len);
|
||||
wlan_recv_event(priv, MLAN_EVENT_ID_FW_DISCONNECTED, pevent);
|
||||
priv->disconnect_reason_code = 0;
|
||||
priv->delay_link_lost = MFALSE;
|
||||
|
||||
LEAVE();
|
||||
}
|
||||
|
|
@ -735,6 +736,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
chan_band_reginfo_t *psta_reg_info = MNULL;
|
||||
t_u16 enable = 0;
|
||||
Event_Link_Lost *link_lost_evt = MNULL;
|
||||
remain_on_channel_info *roc_info = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -818,6 +820,9 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
case EVENT_LINK_LOST:
|
||||
if (pmpriv->curr_bss_params.host_mlme &&
|
||||
!pmpriv->assoc_rsp_size) {
|
||||
pmpriv->prior_assoc_rsp_size = 0;
|
||||
pmpriv->prior_assoc_req_size = 0;
|
||||
pmpriv->delay_link_lost = MTRUE;
|
||||
PRINTM(MMSG,
|
||||
"wlan: skip link lost event before associate complete\n");
|
||||
break;
|
||||
|
|
@ -837,6 +842,9 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
if (memcmp(pmpriv->adapter, link_lost_evt->bssid,
|
||||
&pmpriv->curr_bss_params.attemp_bssid,
|
||||
MLAN_MAC_ADDR_LENGTH)) {
|
||||
pmpriv->prior_assoc_rsp_size = 0;
|
||||
pmpriv->prior_assoc_req_size = 0;
|
||||
pmpriv->delay_link_lost = MTRUE;
|
||||
PRINTM(MMSG, "wlan: skip link lost event\n");
|
||||
PRINTM(MMSG, "pattempted_bssid: " MACSTR "\n",
|
||||
MAC2STR((
|
||||
|
|
@ -1337,6 +1345,20 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_FLUSH_RX_WORK, MNULL);
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED,
|
||||
MNULL);
|
||||
|
||||
pevent->event_id = MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED;
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
pevent->event_len = sizeof(remain_on_channel_info);
|
||||
roc_info = (remain_on_channel_info *)pevent->event_buf;
|
||||
|
||||
roc_info->delay_link_lost = pmpriv->delay_link_lost;
|
||||
if (pmpriv->delay_link_lost && pmpriv->media_connected) {
|
||||
pmpriv->delay_link_lost = MFALSE;
|
||||
wlan_handle_disconnect_event(pmpriv);
|
||||
}
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED,
|
||||
pevent);
|
||||
|
||||
break;
|
||||
case EVENT_TDLS_GENERIC_EVENT:
|
||||
PRINTM(MEVENT, "EVENT: TDLS event %d\n", eventcause);
|
||||
|
|
@ -1408,7 +1430,11 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
PRINTM(MEVENT, "EVENT: EVENT_SSU_DUMP_DMA\n");
|
||||
if (!pmadapter->ssu_buf || !pmadapter->ssu_buf->pbuf)
|
||||
break;
|
||||
|
||||
pcb->moal_unmap_memory(pmadapter->pmoal_handle,
|
||||
pmadapter->ssu_buf->pbuf +
|
||||
pmadapter->ssu_buf->data_offset,
|
||||
pmadapter->ssu_buf->buf_pa,
|
||||
MLAN_SSU_BUF_SIZE, PCI_DMA_FROMDEVICE);
|
||||
/* If ADMA is supported, SSU header could not be received with
|
||||
* SSU data. Instead, SSU header is received through this event.
|
||||
* So, copy the header into the buffer before passing the buffer
|
||||
|
|
|
|||
|
|
@ -676,6 +676,10 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
t_u8 antenna = 0;
|
||||
ENTER();
|
||||
|
||||
if (!priv) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
/* Endian conversion */
|
||||
endian_convert_RxPD(prx_pd);
|
||||
|
|
@ -684,15 +688,6 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
(rxpd_extra_info *)((t_u8 *)prx_pd +
|
||||
Rx_PD_SIZEOF(pmadapter)));
|
||||
}
|
||||
if (priv->adapter->pcard_info->v14_fw_api) {
|
||||
t_u8 rxpd_rate_info_orig = prx_pd->rate_info;
|
||||
prx_pd->rate_info = wlan_convert_v14_rx_rate_info(
|
||||
priv, rxpd_rate_info_orig);
|
||||
PRINTM(MINFO,
|
||||
"STA RX: v14_fw_api=%d rx_rate =%d rxpd_rate_info=0x%x->0x%x\n",
|
||||
priv->adapter->pcard_info->v14_fw_api, prx_pd->rx_rate,
|
||||
rxpd_rate_info_orig, prx_pd->rate_info);
|
||||
}
|
||||
rx_pkt_type = prx_pd->rx_pkt_type;
|
||||
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH) {
|
||||
PRINTM_NETINTF(MDAT_D, priv);
|
||||
|
|
|
|||
|
|
@ -3437,8 +3437,9 @@ static mlan_status wlan_uap_ret_get_log(pmlan_private pmpriv,
|
|||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
HostCmd_DS_802_11_GET_LOG *pget_log =
|
||||
(HostCmd_DS_802_11_GET_LOG *)&resp->params.get_log;
|
||||
HostCmd_DS_802_11_GET_LOG get_log_tmp = {0},
|
||||
*pget_log = (HostCmd_DS_802_11_GET_LOG *)&resp
|
||||
->params.get_log;
|
||||
mlan_ds_get_info *pget_info = MNULL;
|
||||
int i = 0;
|
||||
|
||||
|
|
@ -3446,6 +3447,17 @@ static mlan_status wlan_uap_ret_get_log(pmlan_private pmpriv,
|
|||
|
||||
if (pioctl_buf) {
|
||||
pget_info = (mlan_ds_get_info *)pioctl_buf->pbuf;
|
||||
// coverity[bad_memset:SUPPRESS]
|
||||
// coverity[too_many_arguments:SUPPRESS]
|
||||
// coverity[misra_c_2012_rule_21_18_violation:SUPPRESS]
|
||||
memset(pmpriv->adapter, &pget_info->param.stats, 0,
|
||||
sizeof(HostCmd_DS_802_11_GET_LOG));
|
||||
memcpy_ext(pmpriv->adapter, (t_u8 *)&get_log_tmp,
|
||||
(t_u8 *)pget_log,
|
||||
((resp->size) - (sizeof(HostCmd_DS_GEN))),
|
||||
sizeof(HostCmd_DS_802_11_GET_LOG));
|
||||
pget_log = &get_log_tmp;
|
||||
|
||||
pget_info->param.stats.mcast_tx_frame =
|
||||
wlan_le32_to_cpu(pget_log->mcast_tx_frame);
|
||||
pget_info->param.stats.failed =
|
||||
|
|
@ -3524,10 +3536,6 @@ static mlan_status wlan_uap_ret_get_log(pmlan_private pmpriv,
|
|||
wlan_le32_to_cpu(pget_log->gdma_abort_cnt);
|
||||
pget_info->param.stats.g_reset_rx_mac_cnt =
|
||||
wlan_le32_to_cpu(pget_log->g_reset_rx_mac_cnt);
|
||||
pget_info->param.stats.currTemp =
|
||||
wlan_le32_to_cpu(pget_log->currTemp);
|
||||
pget_info->param.stats.TXpwrMethod =
|
||||
wlan_le32_to_cpu(pget_log->TXpwrMethod);
|
||||
pget_info->param.stats.SdmaStuckCnt =
|
||||
wlan_le32_to_cpu(pget_log->SdmaStuckCnt);
|
||||
// Ownership error counters
|
||||
|
|
@ -3547,6 +3555,12 @@ static mlan_status wlan_uap_ret_get_log(pmlan_private pmpriv,
|
|||
wlan_le32_to_cpu(pget_log->bigtk_micErrCnt);
|
||||
pget_info->param.stats.bigtk_mmeNotFoundCnt =
|
||||
wlan_le32_to_cpu(pget_log->bigtk_mmeNotFoundCnt);
|
||||
pget_info->param.stats.currTemp =
|
||||
wlan_le32_to_cpu(pget_log->currTemp);
|
||||
pget_info->param.stats.TXpwrMethod =
|
||||
wlan_le32_to_cpu(pget_log->TXpwrMethod);
|
||||
pget_info->param.stats.isDPDdone =
|
||||
wlan_le32_to_cpu(pget_log->isDPDdone);
|
||||
|
||||
if (pmpriv->adapter->getlog_enable) {
|
||||
pget_info->param.stats.tx_frag_cnt =
|
||||
|
|
|
|||
|
|
@ -336,16 +336,6 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
Rx_PD_SIZEOF(pmadapter)));
|
||||
}
|
||||
|
||||
if (priv->adapter->pcard_info->v14_fw_api) {
|
||||
t_u8 rxpd_rate_info_orig = prx_pd->rate_info;
|
||||
prx_pd->rate_info = wlan_convert_v14_rx_rate_info(
|
||||
priv, rxpd_rate_info_orig);
|
||||
PRINTM(MINFO,
|
||||
"UAP RX: v14_fw_api=%d rx_rate =%d rxpd_rate_info=0x%x->0x%x\n",
|
||||
priv->adapter->pcard_info->v14_fw_api, prx_pd->rx_rate,
|
||||
rxpd_rate_info_orig, prx_pd->rate_info);
|
||||
}
|
||||
|
||||
if (priv->rx_pkt_info) {
|
||||
ext_rate_info = (t_u8)(prx_pd->rx_info >> 16);
|
||||
pmbuf->u.rx_info.data_rate =
|
||||
|
|
|
|||
|
|
@ -37,16 +37,6 @@ Change log:
|
|||
/********************************************************
|
||||
Local Variables
|
||||
********************************************************/
|
||||
#ifdef USB8801
|
||||
static const struct _mlan_card_info mlan_card_info_usb8801 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K,
|
||||
.v14_fw_api = 1,
|
||||
.v16_fw_api = 0,
|
||||
.supp_ps_handshake = 1,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_1X1,
|
||||
.support_11mc = 0,
|
||||
};
|
||||
#endif
|
||||
#ifdef USB8897
|
||||
static const struct _mlan_card_info mlan_card_info_usb8897 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
|
|
@ -827,11 +817,6 @@ mlan_status wlan_get_usb_device(pmlan_adapter pmadapter)
|
|||
}
|
||||
|
||||
switch (card_type) {
|
||||
#ifdef USB8801
|
||||
case CARD_TYPE_USB8801:
|
||||
pmadapter->pcard_info = &mlan_card_info_usb8801;
|
||||
break;
|
||||
#endif
|
||||
#ifdef USB8897
|
||||
case CARD_TYPE_USB8897:
|
||||
pmadapter->pcard_info = &mlan_card_info_usb8897;
|
||||
|
|
|
|||
|
|
@ -477,6 +477,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_SDAW693 "SDAW693"
|
||||
/** SDIW610 Card */
|
||||
#define CARD_SDIW610 "SDIW610"
|
||||
/** SDIW623 Card */
|
||||
#define CARD_SDIW623 "SDIW623"
|
||||
#endif
|
||||
|
||||
#ifdef PCIE
|
||||
|
|
@ -518,6 +520,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_PCIEAW693 "PCIEAW693"
|
||||
/** PCIEIW629 Card */
|
||||
#define CARD_PCIEIW629 "PCIEIW629"
|
||||
/** PCIEIW623 Card */
|
||||
#define CARD_PCIEIW623 "PCIEIW623"
|
||||
#endif
|
||||
|
||||
#ifdef USB
|
||||
|
|
@ -1098,6 +1102,12 @@ typedef MLAN_PACK_START struct _chan_band_info {
|
|||
t_u8 is_dfs_chan;
|
||||
} MLAN_PACK_END chan_band_info;
|
||||
|
||||
/** remain_on_channel_info */
|
||||
typedef MLAN_PACK_START struct _remain_on_channel_info {
|
||||
/* Is previous AP lost when waiting doing Auth RoC */
|
||||
t_bool delay_link_lost;
|
||||
} MLAN_PACK_END remain_on_channel_info;
|
||||
|
||||
#if defined(STA_SUPPORT)
|
||||
/** MrvlIEtypes_chan_band_reginfo_t */
|
||||
typedef MLAN_PACK_START struct _MrvlIEtypes_chan_band_reginfo_t {
|
||||
|
|
|
|||
|
|
@ -1832,10 +1832,6 @@ typedef struct _mlan_ds_get_stats {
|
|||
t_u32 gdma_abort_cnt;
|
||||
/** Rx Reset MAC Count */
|
||||
t_u32 g_reset_rx_mac_cnt;
|
||||
/** Current SOC Temperature*/
|
||||
t_u32 currTemp;
|
||||
/** TX Power Control Method*/
|
||||
t_u32 TXpwrMethod;
|
||||
/** SDMA FSM stuck Count*/
|
||||
t_u32 SdmaStuckCnt;
|
||||
// Ownership error counters
|
||||
|
|
@ -1847,6 +1843,8 @@ typedef struct _mlan_ds_get_stats {
|
|||
t_u32 dwMgtErrCnt;
|
||||
/*Control Ownership error count*/
|
||||
t_u32 dwDatErrCnt;
|
||||
/*Rx 20MHz UL OFDM error count*/
|
||||
t_u32 Rx2040BWError;
|
||||
/*BIGTK MME good count*/
|
||||
t_u32 bigtk_mmeGoodCnt;
|
||||
/*BIGTK Replay error count*/
|
||||
|
|
@ -1855,6 +1853,12 @@ typedef struct _mlan_ds_get_stats {
|
|||
t_u32 bigtk_micErrCnt;
|
||||
/*BIGTK MME not included count*/
|
||||
t_u32 bigtk_mmeNotFoundCnt;
|
||||
/** Current SOC Temperature*/
|
||||
t_u32 currTemp;
|
||||
/** TX Power Control Method*/
|
||||
t_u32 TXpwrMethod;
|
||||
/** DPD training status*/
|
||||
t_u32 isDPDdone;
|
||||
} mlan_ds_get_stats, *pmlan_ds_get_stats;
|
||||
|
||||
/** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */
|
||||
|
|
|
|||
|
|
@ -626,4 +626,6 @@ void woal_dnld_sta_6e_psd_table(moal_private *priv, t_u8 *resp_buf,
|
|||
|
||||
mlan_status woal_dnld_default_6e_psd_table(moal_private *priv);
|
||||
|
||||
mlan_status woal_request_set_host_mlme(moal_private *priv, t_u8 *bssid);
|
||||
|
||||
#endif /* _MOAL_CFG80211_H_ */
|
||||
|
|
|
|||
|
|
@ -4689,7 +4689,7 @@ static int woal_cfg80211_subcmd_secure_ranging_ctx(struct wiphy *wiphy,
|
|||
t_u32 action = 0;
|
||||
int key_len = 0;
|
||||
int peer_addr_set = 0;
|
||||
t_u8 peer_addr[ETH_ALEN];
|
||||
t_u8 peer_addr[ETH_ALEN] = {0};
|
||||
t_u8 own_addr[ETH_ALEN];
|
||||
t_u32 cipher = 0;
|
||||
t_u32 sha_type = 0;
|
||||
|
|
|
|||
|
|
@ -2301,8 +2301,9 @@ static int woal_setget_priv_txratecfg(moal_private *priv, t_u8 *respbuf,
|
|||
/* auto */
|
||||
rate->param.rate_cfg.is_rate_auto = 1;
|
||||
} else {
|
||||
if (data[0] == MLAN_RATE_FORMAT_LG ||
|
||||
data[0] == MLAN_RATE_FORMAT_HT) {
|
||||
/* Note: for HT, we still need to configure the 4th
|
||||
* parameter about bandwidth */
|
||||
if (data[0] == MLAN_RATE_FORMAT_LG) {
|
||||
if (user_data_len > 2) {
|
||||
PRINTM(MERROR,
|
||||
"Invalid number of arguments\n");
|
||||
|
|
@ -6673,7 +6674,7 @@ static int woal_priv_get_ap(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen)
|
|||
if (bss_info.media_connected == MTRUE) {
|
||||
moal_memcpy_ext(priv->phandle, mwr->u.ap_addr.sa_data,
|
||||
&bss_info.bssid, MLAN_MAC_ADDR_LENGTH,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 80)
|
||||
sizeof(mwr->u.ap_addr.sa_data_min));
|
||||
#else
|
||||
sizeof(mwr->u.ap_addr.sa_data));
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @brief This file contains definition for private IOCTL call.
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ static int mon_filter = DEFAULT_NETMON_FILTER;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
int dual_nb;
|
||||
int dual_nb = 1;
|
||||
|
||||
/** disable 802.11h tpc configuration */
|
||||
static int disable_11h_tpc = 0;
|
||||
|
|
@ -358,9 +358,6 @@ t_u32 drvdbg = DEFAULT_DEBUG_MASK;
|
|||
#endif /* DEBUG_LEVEL1 */
|
||||
|
||||
static card_type_entry card_type_map_tbl[] = {
|
||||
#ifdef SD8801
|
||||
{CARD_TYPE_SD8801, 0, CARD_SD8801},
|
||||
#endif
|
||||
#ifdef SD8887
|
||||
{CARD_TYPE_SD8887, 0, CARD_SD8887},
|
||||
#endif
|
||||
|
|
@ -415,9 +412,6 @@ static card_type_entry card_type_map_tbl[] = {
|
|||
#ifdef PCIEIW624
|
||||
{CARD_TYPE_PCIEIW624, 0, CARD_PCIEIW624},
|
||||
#endif
|
||||
#ifdef USB8801
|
||||
{CARD_TYPE_USB8801, 0, CARD_USB8801},
|
||||
#endif
|
||||
|
||||
#ifdef USB8897
|
||||
{CARD_TYPE_USB8897, 0, CARD_USB8897},
|
||||
|
|
@ -648,6 +642,37 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function validates and converts string to mac address
|
||||
*
|
||||
* @param str A pointer to a string
|
||||
* @param mac A pointer to save mac address
|
||||
*
|
||||
* @return true: if mac address is valid or false:otherwise
|
||||
*/
|
||||
static bool woal_str2mac(char *str, t_u8 *mac)
|
||||
{
|
||||
size_t max_len = 3 * MLAN_MAC_ADDR_LENGTH - 1;
|
||||
int i;
|
||||
|
||||
if (!str || strnlen(str, max_len) < max_len)
|
||||
return MFALSE;
|
||||
|
||||
for (i = 0; i < MLAN_MAC_ADDR_LENGTH; i++) {
|
||||
if (!isxdigit(str[i * 3]) || !isxdigit(str[i * 3 + 1]))
|
||||
return MFALSE;
|
||||
if (i != MLAN_MAC_ADDR_LENGTH - 1 && str[i * 3 + 2] != ':')
|
||||
return MFALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < MLAN_MAC_ADDR_LENGTH; i++) {
|
||||
mac[i] = (woal_hexval(str[i * 3]) << 4) |
|
||||
woal_hexval(str[i * 3 + 1]);
|
||||
}
|
||||
|
||||
return MTRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function read blocks in module parameter file
|
||||
*
|
||||
|
|
@ -664,6 +689,7 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
char *out_str = NULL;
|
||||
t_u8 line[MAX_LINE_LEN];
|
||||
moal_mod_para *params = &handle->params;
|
||||
t_u8 addr[ETH_ALEN];
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
while ((int)parse_cfg_get_line(data, size, line) != -1) {
|
||||
|
|
@ -758,8 +784,15 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
if (parse_line_read_string(line, &out_str) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
woal_dup_string(¶ms->mac_addr, out_str);
|
||||
PRINTM(MMSG, "mac_addr=%s\n", params->mac_addr);
|
||||
|
||||
if (woal_str2mac(out_str, addr) &&
|
||||
is_unicast_ether_addr(addr)) {
|
||||
woal_dup_string(¶ms->mac_addr, out_str);
|
||||
PRINTM(MMSG, "mac_addr=%s\n", params->mac_addr);
|
||||
} else {
|
||||
PRINTM(MERROR, "Invalid mac addr %s in cfg\n",
|
||||
out_str);
|
||||
}
|
||||
}
|
||||
#ifdef MFG_CMD_SUPPORT
|
||||
else if (strncmp(line, "mfg_mode", strlen("mfg_mode")) == 0) {
|
||||
|
|
@ -1068,6 +1101,15 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
woal_dup_string(¶ms->txpwrlimit_cfg, out_str);
|
||||
PRINTM(MMSG, "txpwrlimit_cfg=%s\n",
|
||||
params->txpwrlimit_cfg);
|
||||
if (params->txpwrlimit_cfg) {
|
||||
memset(handle->mode_psd_file, 0,
|
||||
sizeof(handle->mode_psd_file));
|
||||
strncpy(handle->mode_psd_file,
|
||||
params->txpwrlimit_cfg,
|
||||
strlen(params->txpwrlimit_cfg) + 1);
|
||||
PRINTM(MMSG, "Mode PSD file name: %s",
|
||||
handle->mode_psd_file);
|
||||
}
|
||||
} else if (strncmp(line, "cntry_txpwr",
|
||||
strlen("cntry_txpwr")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
|
|
@ -1720,6 +1762,9 @@ err:
|
|||
*/
|
||||
static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
||||
{
|
||||
t_u8 addr[ETH_ALEN];
|
||||
bool is_valid_mac_addr = false;
|
||||
|
||||
if (hw_test)
|
||||
moal_extflg_set(handle, EXT_HW_TEST);
|
||||
#ifdef CONFIG_OF
|
||||
|
|
@ -1750,9 +1795,26 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
if (params && params->hw_name)
|
||||
woal_dup_string(&handle->params.hw_name, params->hw_name);
|
||||
|
||||
woal_dup_string(&handle->params.mac_addr, mac_addr);
|
||||
if (params && params->mac_addr)
|
||||
woal_dup_string(&handle->params.mac_addr, params->mac_addr);
|
||||
if (mac_addr) {
|
||||
is_valid_mac_addr = woal_str2mac(mac_addr, addr);
|
||||
if (is_valid_mac_addr && is_unicast_ether_addr(addr)) {
|
||||
woal_dup_string(&handle->params.mac_addr, mac_addr);
|
||||
} else {
|
||||
PRINTM(MMSG, "Invalid mac addr %s in module param\n",
|
||||
mac_addr);
|
||||
}
|
||||
}
|
||||
|
||||
if (params && params->mac_addr) {
|
||||
is_valid_mac_addr = woal_str2mac(params->mac_addr, addr);
|
||||
if (is_valid_mac_addr && is_unicast_ether_addr(addr)) {
|
||||
woal_dup_string(&handle->params.mac_addr,
|
||||
params->mac_addr);
|
||||
} else {
|
||||
PRINTM(MMSG, "Invalid mac addr %s in params\n",
|
||||
params->mac_addr);
|
||||
}
|
||||
}
|
||||
#ifdef MFG_CMD_SUPPORT
|
||||
handle->params.mfg_mode = mfg_mode;
|
||||
if (params)
|
||||
|
|
@ -3100,7 +3162,7 @@ MODULE_PARM_DESC(
|
|||
module_param(rps, uint, 0660);
|
||||
MODULE_PARM_DESC(
|
||||
rps,
|
||||
"bit0-bit4 (0x1-0xf): Enables rps on specific cpu ; 0: Disables rps (default)");
|
||||
"bit0-bit4 (0x1-0xf): Enables rps on specific cpu (0xf default); 0: Disables rps");
|
||||
#endif
|
||||
#endif
|
||||
module_param(edmac_ctrl, int, 0660);
|
||||
|
|
@ -3366,7 +3428,7 @@ MODULE_PARM_DESC(
|
|||
#endif
|
||||
|
||||
module_param(dual_nb, int, 0);
|
||||
MODULE_PARM_DESC(dual_nb, "0: Single BT (Default); 1: Dual BT");
|
||||
MODULE_PARM_DESC(dual_nb, "0: Single Narrowband; 1: Dual Narrowband (default)");
|
||||
|
||||
module_param(reject_addba_req, int, 0);
|
||||
MODULE_PARM_DESC(
|
||||
|
|
|
|||
|
|
@ -102,46 +102,6 @@ static int reg_work;
|
|||
Local Variables
|
||||
********************************************************/
|
||||
|
||||
#ifdef SD8801
|
||||
static struct _card_info card_info_SD8801 = {
|
||||
.embedded_supp = 0,
|
||||
.drcs = 0,
|
||||
.go_noa = 0,
|
||||
.v14_fw_api = 1,
|
||||
.v16_fw_api = 0,
|
||||
.v17_fw_api = 0,
|
||||
.pmic = 0,
|
||||
.cal_data_cfg = 0,
|
||||
.low_power_enable = 1,
|
||||
.rx_rate_max = 76,
|
||||
.histogram_table_num = 1,
|
||||
.feature_control = FEATURE_CTRL_DEFAULT & (~FEATURE_CTRL_STREAM_2X2),
|
||||
.fw_name = SD8801_DEFAULT_WLAN_FW_NAME,
|
||||
.fw_name_wlan = SD8801_DEFAULT_WLAN_FW_NAME,
|
||||
#ifdef SDIO
|
||||
.dump_fw_info = 0,
|
||||
.dump_fw_ctrl_reg = 0x63,
|
||||
.dump_fw_start_reg = 0x64,
|
||||
.dump_fw_end_reg = 0x6A,
|
||||
.dump_fw_host_ready = 0xee,
|
||||
.dump_reg.reg_table = {0x28, 0x30, 0x34, 0x38, 0x3c},
|
||||
.dump_reg.reg_table_size = 5,
|
||||
.scratch_reg = 0x60,
|
||||
.func1_reg_start = 0x10,
|
||||
.func1_reg_end = 0x17,
|
||||
.fw_stuck_code_reg = 0,
|
||||
.fw_reset_reg = 0x64,
|
||||
.fw_reset_val = 0,
|
||||
.fw_wakeup_reg = 0,
|
||||
.fw_wakeup_val = 2,
|
||||
.slew_rate_reg = 0x8000231C,
|
||||
.slew_rate_bit_offset = 14,
|
||||
#endif
|
||||
.sniffer_support = 1,
|
||||
.per_pkt_cfg_support = 0,
|
||||
.host_mlme_required = 1,
|
||||
};
|
||||
#endif
|
||||
#ifdef SD8887
|
||||
static struct _card_info card_info_SD8887 = {
|
||||
.embedded_supp = 1,
|
||||
|
|
@ -810,28 +770,6 @@ static struct _card_info card_info_PCIEAW693 = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef USB8801
|
||||
static struct _card_info card_info_USB8801 = {
|
||||
.embedded_supp = 0,
|
||||
.drcs = 0,
|
||||
.go_noa = 0,
|
||||
.v14_fw_api = 1,
|
||||
.v16_fw_api = 0,
|
||||
.v17_fw_api = 0,
|
||||
.pmic = 0,
|
||||
.cal_data_cfg = 0,
|
||||
.low_power_enable = 1,
|
||||
.rx_rate_max = 76,
|
||||
.feature_control = FEATURE_CTRL_DEFAULT & (~FEATURE_CTRL_STREAM_2X2),
|
||||
.histogram_table_num = 1,
|
||||
.fw_name = USB8801_DEFAULT_WLAN_FW_NAME,
|
||||
.fw_name_wlan = USB8801_DEFAULT_WLAN_FW_NAME,
|
||||
.sniffer_support = 1,
|
||||
.per_pkt_cfg_support = 0,
|
||||
.host_mlme_required = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef USB8978
|
||||
static struct _card_info card_info_USB8978 = {
|
||||
.embedded_supp = 1,
|
||||
|
|
@ -1137,6 +1075,8 @@ void woal_print_firmware_dump_buf(t_u8 *pfd_buf, t_u64 fwdump_len)
|
|||
t_u64 i = 0, count = 0;
|
||||
u8 buf[MAX_BUF_SIZE] = {0};
|
||||
u8 *ptr = NULL;
|
||||
size_t remaining = MAX_BUF_SIZE;
|
||||
int written = 0;
|
||||
ENTER();
|
||||
|
||||
if (!pfd_buf || !fwdump_len) {
|
||||
|
|
@ -1163,7 +1103,11 @@ void woal_print_firmware_dump_buf(t_u8 *pfd_buf, t_u64 fwdump_len)
|
|||
if (i < fwdump_len) {
|
||||
ptr = buf;
|
||||
for (; i < fwdump_len; i++) {
|
||||
ptr += snprintf(ptr, MAX_BUF_SIZE, " %02X", pfd_buf[i]);
|
||||
written = snprintf(ptr, remaining, " %02X", pfd_buf[i]);
|
||||
if (written < 0 || (size_t)written >= remaining)
|
||||
break;
|
||||
ptr += written;
|
||||
remaining -= written;
|
||||
}
|
||||
PRINTM(MFW_D, "[FW Dump]%s\n", buf);
|
||||
}
|
||||
|
|
@ -1842,7 +1786,8 @@ static int woal_netdevice_event(struct notifier_block *nb, unsigned long event,
|
|||
sizeof(priv->ip_addr));
|
||||
priv->ip_addr_type = IPADDR_TYPE_IPV4;
|
||||
#ifdef STA_CFG80211
|
||||
if (!moal_extflg_isset(priv->phandle, EXT_HW_TEST)) {
|
||||
if (!moal_extflg_isset(priv->phandle, EXT_HW_TEST) &&
|
||||
!priv->cqm_rssi_thold) {
|
||||
if (snprintf(rssi_low, sizeof(rssi_low), "%d",
|
||||
priv->rssi_low) <= 0)
|
||||
PRINTM(MERROR,
|
||||
|
|
@ -2569,6 +2514,24 @@ mlan_status woal_init_sw(moal_handle *handle)
|
|||
handle->hardware_status = HardwareStatusInitializing;
|
||||
handle->main_state = MOAL_STATE_IDLE;
|
||||
|
||||
if (handle->params.mac_addr
|
||||
#ifdef MFG_CMD_SUPPORT
|
||||
&& handle->params.mfg_mode != MLAN_INIT_PARA_ENABLED
|
||||
#endif
|
||||
) {
|
||||
t_u8 temp[20];
|
||||
t_u8 len = strlen(handle->params.mac_addr);
|
||||
if (len < sizeof(temp)) {
|
||||
moal_memcpy_ext(handle, temp, handle->params.mac_addr,
|
||||
len, sizeof(temp));
|
||||
temp[len] = '\0';
|
||||
handle->set_mac_addr = 1;
|
||||
/* note: the following function overwrites the
|
||||
* temp buffer */
|
||||
woal_mac2u8(handle->mac_addr, temp);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
drvdbg = handle->params.drvdbg;
|
||||
#endif
|
||||
|
|
@ -4300,6 +4263,8 @@ static ssize_t woal_set_rps_map(struct netdev_rx_queue *queue, const char *buf,
|
|||
mutex_lock(&local_rps_map_mutex);
|
||||
old_map = rcu_dereference_protected(
|
||||
queue->rps_map, mutex_is_locked(&local_rps_map_mutex));
|
||||
// Coverity violation raised for kernel's API and kernel's struct
|
||||
// coverity[overrun-local:SUPPRESS]
|
||||
rcu_assign_pointer(queue->rps_map, map);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0)
|
||||
if (map)
|
||||
|
|
@ -9917,11 +9882,6 @@ static int woal_get_card_info(moal_handle *phandle)
|
|||
ENTER();
|
||||
|
||||
switch (phandle->card_type) {
|
||||
#ifdef SD8801
|
||||
case CARD_TYPE_SD8801:
|
||||
phandle->card_info = &card_info_SD8801;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SD8887
|
||||
case CARD_TYPE_SD8887:
|
||||
phandle->card_info = &card_info_SD8887;
|
||||
|
|
@ -10018,11 +9978,6 @@ static int woal_get_card_info(moal_handle *phandle)
|
|||
phandle->event_fw_dump = MTRUE;
|
||||
break;
|
||||
#endif
|
||||
#ifdef USB8801
|
||||
case CARD_TYPE_USB8801:
|
||||
phandle->card_info = &card_info_USB8801;
|
||||
break;
|
||||
#endif
|
||||
#ifdef USB8997
|
||||
case CARD_TYPE_USB8997:
|
||||
phandle->card_info = &card_info_USB8997;
|
||||
|
|
@ -10813,7 +10768,7 @@ t_void woal_send_disconnect_to_system(moal_private *priv,
|
|||
if (netif_carrier_ok(priv->netdev))
|
||||
netif_carrier_off(priv->netdev);
|
||||
woal_flush_tx_stat_queue(priv);
|
||||
woal_sched_timeout(100);
|
||||
mdelay(5);
|
||||
woal_flush_tcp_sess_queue(priv);
|
||||
|
||||
#ifdef STA_CFG80211
|
||||
|
|
@ -12800,6 +12755,8 @@ t_void woal_scan_timeout_handler(struct work_struct *work)
|
|||
if (!auto_fw_dump && !handle->fw_dump && priv)
|
||||
woal_process_hang(priv->phandle);
|
||||
wifi_status = WIFI_STATUS_SCAN_TIMEOUT;
|
||||
} else {
|
||||
spin_unlock_irqrestore(&handle->scan_req_lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -13571,24 +13528,6 @@ moal_handle *woal_add_card(void *card, struct device *dev, moal_if_ops *if_ops,
|
|||
mfg_mode = handle->params.mfg_mode;
|
||||
#endif
|
||||
|
||||
if (handle->params.mac_addr
|
||||
#ifdef MFG_CMD_SUPPORT
|
||||
&& handle->params.mfg_mode != MLAN_INIT_PARA_ENABLED
|
||||
#endif
|
||||
) {
|
||||
t_u8 temp[20];
|
||||
t_u8 len = strlen(handle->params.mac_addr);
|
||||
if (len < sizeof(temp)) {
|
||||
moal_memcpy_ext(handle, temp, handle->params.mac_addr,
|
||||
len, sizeof(temp));
|
||||
temp[len] = '\0';
|
||||
handle->set_mac_addr = 1;
|
||||
/* note: the following function overwrites the
|
||||
* temp buffer */
|
||||
woal_mac2u8(handle->mac_addr, temp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get card info */
|
||||
if (woal_get_card_info(handle)) {
|
||||
PRINTM(MERROR, "Fail to get card info\n");
|
||||
|
|
|
|||
|
|
@ -2118,8 +2118,6 @@ typedef struct _card_info {
|
|||
t_bool drcs;
|
||||
/** support Go NOA*/
|
||||
t_bool go_noa;
|
||||
/** support V14_FW_API*/
|
||||
t_bool v14_fw_api;
|
||||
/** support V16_FW_API*/
|
||||
t_bool v16_fw_api;
|
||||
/** support V17_FW_API*/
|
||||
|
|
|
|||
|
|
@ -2774,6 +2774,9 @@ static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
|||
strcpy(handle->card_info
|
||||
->fw_name,
|
||||
PCIEUSB9098_COMBO_V1_FW_NAME);
|
||||
} else {
|
||||
strcpy(handle->card_info->fw_name,
|
||||
PCIEUART9098_COMBO_V1_FW_NAME);
|
||||
}
|
||||
strcpy(handle->card_info->fw_name_wlan,
|
||||
PCIE9098_WLAN_V1_FW_NAME);
|
||||
|
|
@ -2824,6 +2827,9 @@ static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
|||
else
|
||||
strcpy(handle->card_info->fw_name,
|
||||
PCIEUSB9097_COMBO_V1_FW_NAME);
|
||||
} else {
|
||||
strcpy(handle->card_info->fw_name,
|
||||
PCIEUART9097_COMBO_V1_FW_NAME);
|
||||
}
|
||||
strcpy(handle->card_info->fw_name_wlan,
|
||||
PCIE9097_WLAN_V1_FW_NAME);
|
||||
|
|
@ -2864,6 +2870,9 @@ static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
|||
strcpy(handle->card_info
|
||||
->fw_name,
|
||||
PCIEAW693_COMBO_V1_FW_NAME);
|
||||
} else {
|
||||
strcpy(handle->card_info->fw_name,
|
||||
PCIEAW693_COMBO_V1_FW_NAME);
|
||||
}
|
||||
strcpy(handle->card_info->fw_name_wlan,
|
||||
PCIEAW693_WLAN_V1_FW_NAME);
|
||||
|
|
@ -3090,6 +3099,10 @@ static void woal_pcie_work(struct work_struct *work)
|
|||
return;
|
||||
}
|
||||
handle->surprise_removed = MFALSE;
|
||||
|
||||
woal_free_module_param(handle);
|
||||
woal_init_module_param(handle);
|
||||
|
||||
if (MLAN_STATUS_SUCCESS == woal_do_flr(handle, false, true))
|
||||
handle->fw_reseting = MFALSE;
|
||||
else {
|
||||
|
|
@ -3099,6 +3112,10 @@ static void woal_pcie_work(struct work_struct *work)
|
|||
}
|
||||
if (ref_handle) {
|
||||
ref_handle->surprise_removed = MFALSE;
|
||||
|
||||
woal_free_module_param(ref_handle);
|
||||
woal_init_module_param(ref_handle);
|
||||
|
||||
if (MLAN_STATUS_SUCCESS == woal_do_flr(ref_handle, false, true))
|
||||
ref_handle->fw_reseting = MFALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,8 +60,8 @@ Change log:
|
|||
#define SD8977_V1 0x8
|
||||
#define SD8977_V2 0x9
|
||||
#define SD8977_V0_FW_NAME "nxp/sdsd8977_combo.bin"
|
||||
#define SD8977_V1_FW_NAME "nxp/sdsd8977_combo_v1.bin"
|
||||
#define SD8977_V2_FW_NAME "nxp/sdsd8977_combo_v2.bin"
|
||||
#define SD8977_V1_FW_NAME "nxp/sduart8977_combo_v1.bin"
|
||||
#define SD8977_V2_FW_NAME "nxp/sduart8977_combo_v2.bin"
|
||||
#define SD8977_WLAN_V2_FW_NAME "nxp/sd8977_wlan_v2.bin"
|
||||
#define SD8977_WLAN_V1_FW_NAME "nxp/sd8977_wlan_v1.bin"
|
||||
#define SD8977_WLAN_V0_FW_NAME "nxp/sd8977_wlan.bin"
|
||||
|
|
@ -73,47 +73,43 @@ Change log:
|
|||
#define SD8887_A2 0x2
|
||||
|
||||
#define SD8887_A0_FW_NAME "nxp/sd8887_uapsta.bin"
|
||||
#define SD8887_A2_FW_NAME "nxp/sd8887_uapsta_a2.bin"
|
||||
#define SD8887_A2_FW_NAME "nxp/sduart8887_combo_a2.bin"
|
||||
#define SD8887_WLAN_A2_FW_NAME "nxp/sd8887_wlan_a2.bin"
|
||||
#define SD8887_WLAN_A0_FW_NAME "nxp/sd8887_wlan.bin"
|
||||
#endif /* SD8887_MULTI_FW */
|
||||
|
||||
#ifdef SD8801
|
||||
#define SD8801_DEFAULT_WLAN_FW_NAME "nxp/sd8801_uapsta.bin"
|
||||
#endif /* SD8801 */
|
||||
|
||||
/** Default firmware name */
|
||||
#ifdef SD8887
|
||||
#define SD8887_DEFAULT_COMBO_FW_NAME "nxp/sd8887_uapsta_a2.bin"
|
||||
#define SD8887_DEFAULT_COMBO_FW_NAME "nxp/sduart8887_combo_a2.bin"
|
||||
#define SD8887_DEFAULT_WLAN_FW_NAME "nxp/sd8887_wlan_a2.bin"
|
||||
#endif /* SD8887 */
|
||||
|
||||
#ifdef SD8977
|
||||
#define SD8977_DEFAULT_COMBO_FW_NAME "nxp/sdsd8977_combo_v2.bin"
|
||||
#define SD8977_DEFAULT_COMBO_FW_NAME "nxp/sduart8977_combo_v2.bin"
|
||||
#define SD8977_DEFAULT_WLAN_FW_NAME "nxp/sd8977_wlan_v2.bin"
|
||||
#endif /* SD8977 */
|
||||
|
||||
#ifdef SD8997
|
||||
#define SD8997_DEFAULT_COMBO_FW_NAME "nxp/sdsd8997_combo_v4.bin"
|
||||
#define SD8997_DEFAULT_COMBO_FW_NAME "nxp/sduart8997_combo_v4.bin"
|
||||
#define SDUART8997_DEFAULT_COMBO_FW_NAME "nxp/sduart8997_combo_v4.bin"
|
||||
#define SDSD8997_DEFAULT_COMBO_FW_NAME "nxp/sdsd8997_combo_v4.bin"
|
||||
#define SD8997_DEFAULT_WLAN_FW_NAME "nxp/sd8997_wlan_v4.bin"
|
||||
#endif /* SD8997 */
|
||||
|
||||
#ifdef SD8987
|
||||
#define SD8987_DEFAULT_COMBO_FW_NAME "nxp/sdsd8987_combo.bin"
|
||||
#define SD8987_DEFAULT_COMBO_FW_NAME "nxp/sduart8987_combo.bin"
|
||||
#define SDUART8987_DEFAULT_COMBO_FW_NAME "nxp/sduart8987_combo.bin"
|
||||
#define SDSD8987_DEFAULT_COMBO_FW_NAME "nxp/sdsd8987_combo.bin"
|
||||
#define SD8987_DEFAULT_WLAN_FW_NAME "nxp/sd8987_wlan.bin"
|
||||
#endif /* SD8987 */
|
||||
|
||||
#ifdef SD8897
|
||||
#define SD8897_DEFAULT_COMBO_FW_NAME "nxp/sdsd8897_uapsta.bin"
|
||||
#define SD8897_DEFAULT_COMBO_FW_NAME "nxp/sduart8897_combo.bin"
|
||||
#define SD8897_DEFAULT_WLAN_FW_NAME "nxp/sd8897_wlan.bin"
|
||||
#endif /* SD8897 */
|
||||
|
||||
#ifdef SD8978
|
||||
#define SD8978_DEFAULT_COMBO_FW_NAME "nxp/sdsdiw416_combo.bin"
|
||||
#define SD8978_DEFAULT_COMBO_FW_NAME "nxp/sduartiw416_combo.bin"
|
||||
#define SDUART8978_DEFAULT_COMBO_FW_NAME "nxp/sduartiw416_combo.bin"
|
||||
#define SDSD8978_DEFAULT_COMBO_FW_NAME "nxp/sdsdiw416_combo.bin"
|
||||
#define SD8978_DEFAULT_WLAN_FW_NAME "nxp/sdiw416_wlan.bin"
|
||||
|
|
@ -124,7 +120,7 @@ Change log:
|
|||
#define SD9098_A0 0x01
|
||||
#define SD9098_A1 0x02
|
||||
#define SD9098_A2 0x03
|
||||
#define SD9098_DEFAULT_COMBO_FW_NAME "nxp/sdsd9098_combo.bin"
|
||||
#define SD9098_DEFAULT_COMBO_FW_NAME "nxp/sduart9098_combo.bin"
|
||||
#define SDUART9098_DEFAULT_COMBO_FW_NAME "nxp/sduart9098_combo.bin"
|
||||
#define SDSD9098_DEFAULT_COMBO_FW_NAME "nxp/sdsd9098_combo.bin"
|
||||
#define SD9098_DEFAULT_WLAN_FW_NAME "nxp/sd9098_wlan.bin"
|
||||
|
|
@ -136,7 +132,7 @@ Change log:
|
|||
#ifdef SD9097
|
||||
#define SD9097_B0 0x01
|
||||
#define SD9097_B1 0x02
|
||||
#define SD9097_DEFAULT_COMBO_FW_NAME "nxp/sdsdiw620_combo_v1.bin"
|
||||
#define SD9097_DEFAULT_COMBO_FW_NAME "nxp/sduartiw620_combo_v1.bin"
|
||||
|
||||
#define SD9097_DEFAULT_WLAN_FW_NAME "nxp/sdiw620_wlan_v1.bin"
|
||||
#define SDUART9097_COMBO_V1_FW_NAME "nxp/sduartiw620_combo_v1.bin"
|
||||
|
|
@ -145,7 +141,7 @@ Change log:
|
|||
#endif /* SD9097 */
|
||||
|
||||
#ifdef SDIW624
|
||||
#define SDIW624_DEFAULT_COMBO_FW_NAME "nxp/sdsdiw624_combo.bin"
|
||||
#define SDIW624_DEFAULT_COMBO_FW_NAME "nxp/sduartiw624_combo.bin"
|
||||
#define SDUARTIW624_COMBO_FW_NAME "nxp/sduartiw624_combo.bin"
|
||||
#define SDUARTSPIIW624_COMBO_FW_NAME "nxp/sduartspiiw624_combo.bin"
|
||||
#define SDUARTUARTIW624_COMBO_FW_NAME "nxp/sduartuartiw624_combo.bin"
|
||||
|
|
@ -156,7 +152,7 @@ Change log:
|
|||
#ifdef SDAW693
|
||||
#define SDAW693_A0 0x00
|
||||
#define SDAW693_A1 0x01
|
||||
#define SDAW693_DEFAULT_COMBO_FW_NAME "nxp/sdsdwaw693_combo.bin"
|
||||
#define SDAW693_DEFAULT_COMBO_FW_NAME "nxp/sduartaw693_combo.bin"
|
||||
#define SDUARTAW693_COMBO_FW_NAME "nxp/sduartaw693_combo.bin"
|
||||
#define SDSDAW693_COMBO_FW_NAME "sdsdaw693_combo.bin"
|
||||
#define SDUARTAW693_COMBO_V1_FW_NAME "nxp/sduartaw693_combo_v1.bin.se"
|
||||
|
|
@ -168,7 +164,7 @@ Change log:
|
|||
#ifdef SD9177
|
||||
#define SD9177_A0 0x00
|
||||
#define SD9177_A1 0x01
|
||||
#define SD9177_DEFAULT_COMBO_FW_NAME "nxp/sdsd_nw61x.bin.se"
|
||||
#define SD9177_DEFAULT_COMBO_FW_NAME "nxp/sduart_nw61x.bin.se"
|
||||
#define SD9177_DEFAULT_COMBO_V1_FW_NAME "nxp/sduart_nw61x_v1.bin.se"
|
||||
#define SDUART9177_DEFAULT_COMBO_FW_NAME "nxp/sduart_nw61x.bin.se"
|
||||
#define SDSD9177_DEFAULT_COMBO_FW_NAME "nxp/sdsd_nw61x.bin.se"
|
||||
|
|
|
|||
|
|
@ -66,10 +66,6 @@ static moal_if_ops sdiommc_ops;
|
|||
/** Device ID for SD8887 */
|
||||
#define SD_DEVICE_ID_8887 (0x9135)
|
||||
#endif
|
||||
#ifdef SD8801
|
||||
/** Device ID for SD8801 FN1 */
|
||||
#define SD_DEVICE_ID_8801 (0x9139)
|
||||
#endif
|
||||
#ifdef SD8897
|
||||
/** Device ID for SD8897 */
|
||||
#define SD_DEVICE_ID_8897 (0x912d)
|
||||
|
|
@ -124,9 +120,6 @@ static const struct sdio_device_id wlan_ids[] = {
|
|||
#ifdef SD8887
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8887)},
|
||||
#endif
|
||||
#ifdef SD8801
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8801)},
|
||||
#endif
|
||||
#ifdef SD8897
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8897)},
|
||||
#endif
|
||||
|
|
@ -598,20 +591,6 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SD8801
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_8801) {
|
||||
card_type = CARD_TYPE_SD8801;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8801,
|
||||
strlen(CARD_SD8801), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V14, strlen(V14),
|
||||
strlen(driver_version) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SD8897
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_8897) {
|
||||
|
|
@ -1813,10 +1792,6 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
MIN(MLAN_SDIO_BLOCK_SIZE, card->func->card->host->max_blk_size);
|
||||
if (handle->params.fw_name)
|
||||
goto done;
|
||||
#ifdef SD8801
|
||||
if (IS_SD8801(handle->card_type))
|
||||
goto done;
|
||||
#endif
|
||||
/** Revision ID register */
|
||||
woal_sdiommc_read_reg(handle, rev_id_reg, &revision_id);
|
||||
PRINTM(MCMND, "revision_id=0x%x sdio_blk_size=%d\n", revision_id,
|
||||
|
|
@ -1957,6 +1932,10 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
strncpy(handle->card_info->fw_name,
|
||||
SDSD9098_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
} else {
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUART9098_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD9098_WLAN_V1_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
|
|
@ -2111,6 +2090,15 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
SDSD9177_DEFAULT_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
} else {
|
||||
if (handle->params.rf_test_mode)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUART9177_DEFAULT_RFTM_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SD9177_DEFAULT_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
if (handle->params.rf_test_mode)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
|
|
@ -2295,272 +2283,6 @@ static rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag,
|
|||
return RDWR_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef SD8801
|
||||
#define DEBUG_HOST_READY 0xEE
|
||||
#define DEBUG_FW_DONE 0xFF
|
||||
#define DEBUG_MEMDUMP_FINISH 0xFE
|
||||
#define MAX_POLL_TRIES 100
|
||||
#define DEBUG_ITCM_DONE 0xaa
|
||||
#define DEBUG_DTCM_DONE 0xbb
|
||||
#define DEBUG_SQRAM_DONE 0xcc
|
||||
|
||||
#define DEBUG_DUMP_CTRL_REG 0x63
|
||||
#define DEBUG_DUMP_FIRST_REG 0x62
|
||||
#define DEBUG_DUMP_START_REG 0x64
|
||||
#define DEBUG_DUMP_END_REG 0x6a
|
||||
#define ITCM_SIZE 0x60000
|
||||
#define SQRAM_SIZE 0x33500
|
||||
#define DTCM_SIZE 0x14000
|
||||
|
||||
/**
|
||||
* @brief This function dump firmware memory to file
|
||||
*
|
||||
* @param phandle A pointer to moal_handle
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void woal_dump_firmware_info(moal_handle *phandle)
|
||||
{
|
||||
int ret = 0;
|
||||
unsigned int reg, reg_start, reg_end;
|
||||
#ifndef DUMP_TO_PROC
|
||||
t_u8 path_name[64], file_name[32];
|
||||
#endif
|
||||
t_u8 *ITCM_Ptr = NULL;
|
||||
t_u8 *DTCM_Ptr = NULL;
|
||||
t_u8 *SQRAM_Ptr = NULL;
|
||||
t_u8 *dbg_ptr = NULL;
|
||||
t_u32 sec, usec;
|
||||
t_u8 ctrl_data = 0;
|
||||
t_u32 dtcm_size = DTCM_SIZE;
|
||||
t_u32 sqram_size = SQRAM_SIZE;
|
||||
t_u8 *end_ptr = NULL;
|
||||
int tries;
|
||||
|
||||
if (!phandle) {
|
||||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
#ifdef DUMP_TO_PROC
|
||||
if (!phandle->fw_dump_buf) {
|
||||
ret = moal_vmalloc(phandle, FW_DUMP_INFO_LEN,
|
||||
&(phandle->fw_dump_buf));
|
||||
if (ret != MLAN_STATUS_SUCCESS || !phandle->fw_dump_buf) {
|
||||
PRINTM(MERROR, "Failed to vmalloc fw dump bufffer\n");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
memset(phandle->fw_dump_buf, 0x00, FW_DUMP_INFO_LEN);
|
||||
}
|
||||
phandle->fw_dump_len = 0;
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directort*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strncpy(path_name, "/data", sizeof(path_name));
|
||||
#endif
|
||||
PRINTM(MMSG, "Directory name is %s\n", path_name);
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
|
||||
sdio_claim_host(((sdio_mmc_card *)phandle->card)->func);
|
||||
#endif
|
||||
/* start dump fw memory */
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "==== DEBUG MODE OUTPUT START: %u.%06u ====\n", sec, usec);
|
||||
ret = moal_vmalloc(phandle, ITCM_SIZE + 1, (t_u8 **)&ITCM_Ptr);
|
||||
if ((ret != MLAN_STATUS_SUCCESS) || !ITCM_Ptr) {
|
||||
PRINTM(MERROR, "Error: vmalloc ITCM buffer failed!!!\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
PRINTM(MMSG, "DTCM_SIZE=0x%x\n", dtcm_size);
|
||||
ret = moal_vmalloc(phandle, dtcm_size + 1, (t_u8 **)&DTCM_Ptr);
|
||||
if ((ret != MLAN_STATUS_SUCCESS) || !DTCM_Ptr) {
|
||||
PRINTM(MERROR, "Error: vmalloc DTCM buffer failed!!!\n");
|
||||
goto done;
|
||||
}
|
||||
ret = moal_vmalloc(phandle, sqram_size + 1, (t_u8 **)&SQRAM_Ptr);
|
||||
if ((ret != MLAN_STATUS_SUCCESS) || !SQRAM_Ptr) {
|
||||
PRINTM(MERROR, "Error: vmalloc SQRAM buffer failed!!!\n");
|
||||
goto done;
|
||||
}
|
||||
dbg_ptr = ITCM_Ptr;
|
||||
end_ptr = ITCM_Ptr + ITCM_SIZE;
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "Start ITCM output %u.%06u, please wait...\n", sec, usec);
|
||||
reg_start = DEBUG_DUMP_START_REG;
|
||||
reg_end = DEBUG_DUMP_END_REG;
|
||||
do {
|
||||
ret = woal_sdio_writeb(phandle, DEBUG_DUMP_CTRL_REG,
|
||||
DEBUG_HOST_READY);
|
||||
if (ret) {
|
||||
PRINTM(MERROR, "SDIO Write ERR\n");
|
||||
goto done;
|
||||
}
|
||||
for (tries = 0; tries < MAX_POLL_TRIES; tries++) {
|
||||
ret = woal_sdio_readb(phandle, DEBUG_DUMP_CTRL_REG,
|
||||
&ctrl_data);
|
||||
if (ret) {
|
||||
PRINTM(MERROR, "SDIO READ ERR\n");
|
||||
goto done;
|
||||
}
|
||||
if ((ctrl_data == DEBUG_FW_DONE) ||
|
||||
(ctrl_data == DEBUG_ITCM_DONE) ||
|
||||
(ctrl_data == DEBUG_DTCM_DONE) ||
|
||||
(ctrl_data == DEBUG_SQRAM_DONE))
|
||||
break;
|
||||
if (ctrl_data != DEBUG_HOST_READY) {
|
||||
ret = woal_sdio_writeb(phandle,
|
||||
DEBUG_DUMP_CTRL_REG,
|
||||
DEBUG_HOST_READY);
|
||||
if (ret) {
|
||||
PRINTM(MERROR, "SDIO Write ERR\n");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
udelay(100);
|
||||
}
|
||||
if (ctrl_data == DEBUG_HOST_READY) {
|
||||
PRINTM(MERROR, "Fail to pull ctrl_data\n");
|
||||
goto done;
|
||||
}
|
||||
reg = DEBUG_DUMP_FIRST_REG;
|
||||
ret = woal_sdio_readb(phandle, reg, dbg_ptr);
|
||||
if (ret) {
|
||||
PRINTM(MMSG, "SDIO READ ERR\n");
|
||||
goto done;
|
||||
}
|
||||
if (dbg_ptr < end_ptr)
|
||||
dbg_ptr++;
|
||||
else {
|
||||
PRINTM(MINFO, "pre-allocced buf is not enough\n");
|
||||
goto done;
|
||||
}
|
||||
for (reg = reg_start; reg <= reg_end; reg++) {
|
||||
ret = woal_sdio_readb(phandle, reg, dbg_ptr);
|
||||
if (ret) {
|
||||
PRINTM(MMSG, "SDIO READ ERR\n");
|
||||
goto done;
|
||||
}
|
||||
if (dbg_ptr < end_ptr)
|
||||
dbg_ptr++;
|
||||
else
|
||||
PRINTM(MINFO,
|
||||
"pre-allocced buf is not enough\n");
|
||||
}
|
||||
switch (ctrl_data) {
|
||||
case DEBUG_ITCM_DONE:
|
||||
#ifdef MLAN_64BIT
|
||||
PRINTM(MMSG, "ITCM done: size=0x%lx\n",
|
||||
dbg_ptr - ITCM_Ptr);
|
||||
#else
|
||||
PRINTM(MMSG, "ITCM done: size=0x%x\n",
|
||||
dbg_ptr - ITCM_Ptr);
|
||||
#endif
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_save_dump_info_to_buf(phandle, ITCM_Ptr, ITCM_SIZE,
|
||||
FW_DUMP_TYPE_MEM_ITCM);
|
||||
#else
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
snprintf(file_name, sizeof(file_name), "%s",
|
||||
"file_sdio_ITCM");
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
ITCM_Ptr, ITCM_SIZE))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
#endif
|
||||
dbg_ptr = DTCM_Ptr;
|
||||
end_ptr = DTCM_Ptr + dtcm_size;
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG,
|
||||
"Start DTCM output %u.%06u, please wait...\n",
|
||||
sec, usec);
|
||||
break;
|
||||
case DEBUG_DTCM_DONE:
|
||||
#ifdef MLAN_64BIT
|
||||
PRINTM(MMSG, "DTCM done: size=0x%lx\n",
|
||||
dbg_ptr - DTCM_Ptr);
|
||||
#else
|
||||
PRINTM(MMSG, "DTCM done: size=0x%x\n",
|
||||
dbg_ptr - DTCM_Ptr);
|
||||
#endif
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_save_dump_info_to_buf(phandle, ITCM_Ptr, dtcm_size,
|
||||
FW_DUMP_TYPE_MEM_DTCM);
|
||||
#else
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
snprintf(file_name, sizeof(file_name), "%s",
|
||||
"file_sdio_DTCM");
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
DTCM_Ptr, dtcm_size))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
#endif
|
||||
dbg_ptr = SQRAM_Ptr;
|
||||
end_ptr = SQRAM_Ptr + sqram_size;
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG,
|
||||
"Start SQRAM output %u.%06u, please wait...\n",
|
||||
sec, usec);
|
||||
break;
|
||||
case DEBUG_SQRAM_DONE:
|
||||
#ifdef MLAN_64BIT
|
||||
PRINTM(MMSG, "SQRAM done: size=0x%lx\n",
|
||||
dbg_ptr - SQRAM_Ptr);
|
||||
#else
|
||||
PRINTM(MMSG, "SQRAM done: size=0x%x\n",
|
||||
dbg_ptr - SQRAM_Ptr);
|
||||
#endif
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_save_dump_info_to_buf(phandle, SQRAM_Ptr,
|
||||
sqram_size,
|
||||
FW_DUMP_TYPE_MEM_SQRAM);
|
||||
#else
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
snprintf(file_name, sizeof(file_name), "%s",
|
||||
"file_sdio_SQRAM");
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
SQRAM_Ptr, sqram_size))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
#endif
|
||||
PRINTM(MMSG, "End output!\n");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} while (ctrl_data != DEBUG_SQRAM_DONE);
|
||||
|
||||
#ifdef DUMP_TO_PROC
|
||||
woal_append_end_block(phandle);
|
||||
#endif
|
||||
PRINTM(MMSG,
|
||||
"The output ITCM/DTCM/SQRAM have been saved to files successfully!\n");
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "==== DEBUG MODE OUTPUT END: %u.%06u ====\n", sec, usec);
|
||||
/* end dump fw memory */
|
||||
done:
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
|
||||
sdio_release_host(((sdio_mmc_card *)phandle->card)->func);
|
||||
#endif
|
||||
if (ITCM_Ptr)
|
||||
moal_vfree(phandle, ITCM_Ptr);
|
||||
if (DTCM_Ptr)
|
||||
moal_vfree(phandle, DTCM_Ptr);
|
||||
if (SQRAM_Ptr)
|
||||
moal_vfree(phandle, SQRAM_Ptr);
|
||||
PRINTM(MMSG, "==== DEBUG MODE END ====\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function dump firmware memory to file
|
||||
*
|
||||
|
|
@ -3092,7 +2814,8 @@ static void woal_sdiommc_reg_dbg(moal_handle *phandle)
|
|||
ptr += snprintf(ptr, sizeof(buf), "%02x ",
|
||||
data);
|
||||
else {
|
||||
ptr += snprintf(ptr, sizeof(buf), "ERR");
|
||||
ptr += snprintf(ptr, sizeof(buf) - (ptr - buf),
|
||||
"ERR");
|
||||
break;
|
||||
}
|
||||
if (loop == 2 && reg < reg_end)
|
||||
|
|
@ -3145,11 +2868,6 @@ static void woal_sdiommc_dump_fw_info(moal_handle *phandle)
|
|||
return;
|
||||
}
|
||||
}
|
||||
#ifdef SD8801
|
||||
else {
|
||||
woal_dump_firmware_info(phandle);
|
||||
}
|
||||
#endif
|
||||
phandle->fw_dump = MFALSE;
|
||||
woal_sdiommc_reg_dbg(phandle);
|
||||
if (!phandle->priv_num)
|
||||
|
|
@ -3244,11 +2962,11 @@ static int woal_sdiommc_dump_reg_info(moal_handle *phandle, t_u8 *drv_buf)
|
|||
reg_end = scratch_reg + 10;
|
||||
}
|
||||
if (loop != 2)
|
||||
ptr += snprintf(ptr, MAX_BUF_LEN,
|
||||
ptr += snprintf(ptr, sizeof(buf),
|
||||
"SDIO Func%d (%#x-%#x): ", func,
|
||||
reg_start, reg_end);
|
||||
else
|
||||
ptr += snprintf(ptr, MAX_BUF_LEN,
|
||||
ptr += snprintf(ptr, sizeof(buf),
|
||||
"SDIO Func%d: ", func);
|
||||
for (reg = reg_start; reg <= reg_end;) {
|
||||
if (func == 0)
|
||||
|
|
@ -3257,13 +2975,13 @@ static int woal_sdiommc_dump_reg_info(moal_handle *phandle, t_u8 *drv_buf)
|
|||
ret = woal_sdio_readb(phandle, reg, &data);
|
||||
|
||||
if (loop == 2)
|
||||
ptr += snprintf(ptr, MAX_BUF_LEN, "(%#x) ",
|
||||
ptr += snprintf(ptr, sizeof(buf), "(%#x) ",
|
||||
reg);
|
||||
if (!ret)
|
||||
ptr += snprintf(ptr, MAX_BUF_LEN, "%02x ",
|
||||
ptr += snprintf(ptr, sizeof(buf), "%02x ",
|
||||
data);
|
||||
else {
|
||||
ptr += snprintf(ptr, MAX_BUF_LEN, "ERR");
|
||||
ptr += snprintf(ptr, sizeof(buf), "ERR");
|
||||
break;
|
||||
}
|
||||
if (loop == 2 && reg < reg_end)
|
||||
|
|
@ -3351,12 +3069,6 @@ static BOOLEAN woal_sdiommc_check_winner_status(moal_handle *handle)
|
|||
t_u32 winner_status_reg = handle->card_info->fw_winner_status_reg;
|
||||
|
||||
ENTER();
|
||||
#ifdef SD8801
|
||||
if (IS_SD8801(handle->card_type)) {
|
||||
LEAVE();
|
||||
return MTRUE;
|
||||
}
|
||||
#endif
|
||||
handle->ops.read_reg(handle, winner_status_reg, &value);
|
||||
LEAVE();
|
||||
return (value == 0);
|
||||
|
|
@ -3686,6 +3398,10 @@ static void woal_sdiommc_work(struct work_struct *work)
|
|||
}
|
||||
|
||||
handle->surprise_removed = MFALSE;
|
||||
|
||||
woal_free_module_param(handle);
|
||||
woal_init_module_param(handle);
|
||||
|
||||
if (MLAN_STATUS_SUCCESS == woal_do_sdiommc_flr(handle, false, true))
|
||||
handle->fw_reseting = MFALSE;
|
||||
else {
|
||||
|
|
@ -3696,6 +3412,10 @@ static void woal_sdiommc_work(struct work_struct *work)
|
|||
|
||||
if (ref_handle) {
|
||||
ref_handle->surprise_removed = MFALSE;
|
||||
|
||||
woal_free_module_param(ref_handle);
|
||||
woal_init_module_param(ref_handle);
|
||||
|
||||
if (MLAN_STATUS_SUCCESS ==
|
||||
woal_do_sdiommc_flr(ref_handle, false, true))
|
||||
ref_handle->fw_reseting = MFALSE;
|
||||
|
|
|
|||
|
|
@ -208,14 +208,19 @@ mlan_status moal_malloc_consistent(t_void *pmoal, t_u32 size, t_u8 **ppbuf,
|
|||
moal_handle *handle = (moal_handle *)pmoal;
|
||||
pcie_service_card *card = (pcie_service_card *)handle->card;
|
||||
dma_addr_t dma;
|
||||
gfp_t flag;
|
||||
|
||||
*pbuf_pa = 0;
|
||||
|
||||
if (!card)
|
||||
return MLAN_STATUS_FAILURE;
|
||||
|
||||
flag = in_atomic() ? GFP_ATOMIC :
|
||||
irqs_disabled() ? GFP_ATOMIC :
|
||||
GFP_KERNEL;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
||||
*ppbuf = (t_u8 *)dma_alloc_coherent(&card->dev->dev, size,
|
||||
(dma_addr_t *)&dma, GFP_KERNEL);
|
||||
(dma_addr_t *)&dma, flag);
|
||||
#else
|
||||
*ppbuf = (t_u8 *)pci_alloc_consistent(card->dev, size,
|
||||
(dma_addr_t *)&dma);
|
||||
|
|
@ -931,7 +936,7 @@ mlan_status moal_get_hw_spec_complete(t_void *pmoal, mlan_status status,
|
|||
moal_handle *handle = (moal_handle *)pmoal;
|
||||
int i;
|
||||
t_u32 drv_mode = handle->params.drv_mode;
|
||||
#ifdef PCIE9098
|
||||
#if defined(PCIE9098) || defined(PCIEAW693) || defined(SDAW693)
|
||||
size_t drv_ver_len = strlen(driver_version);
|
||||
#endif
|
||||
ENTER();
|
||||
|
|
@ -966,6 +971,47 @@ mlan_status moal_get_hw_spec_complete(t_void *pmoal, mlan_status status,
|
|||
handle->driver_version[drv_ver_len] = '\0';
|
||||
}
|
||||
#endif
|
||||
#ifdef PCIEAW693
|
||||
/**
|
||||
* Special/Temporary handling to manage the driver version
|
||||
* string to identify AW693/IW623 based on fw_cap value set by
|
||||
* Fw
|
||||
*/
|
||||
if ((phw->fw_cap_ext & MBIT(23)) &&
|
||||
IS_PCIEAW693(handle->card_type)) {
|
||||
moal_memcpy_ext(handle, driver_version, CARD_PCIEIW623,
|
||||
strlen(CARD_PCIEIW623),
|
||||
strlen(driver_version));
|
||||
if (drv_ver_len >= MLAN_MAX_VER_STR_LEN - 1) {
|
||||
drv_ver_len = MLAN_MAX_VER_STR_LEN - 1;
|
||||
}
|
||||
moal_memcpy_ext(handle, handle->driver_version,
|
||||
driver_version, drv_ver_len,
|
||||
MLAN_MAX_VER_STR_LEN - 1);
|
||||
handle->driver_version[drv_ver_len] = '\0';
|
||||
}
|
||||
#endif
|
||||
#ifdef SDAW693
|
||||
/**
|
||||
* Special/Temporary handling to manage the driver version
|
||||
* string to identify AW693/IW623 based on fw_cap value set by
|
||||
* Fw
|
||||
*/
|
||||
if ((phw->fw_cap_ext & MBIT(23)) &&
|
||||
IS_SDAW693(handle->card_type)) {
|
||||
moal_memcpy_ext(handle, driver_version, CARD_SDIW623,
|
||||
strlen(CARD_SDIW623),
|
||||
strlen(driver_version));
|
||||
if (drv_ver_len >= MLAN_MAX_VER_STR_LEN - 1) {
|
||||
drv_ver_len = MLAN_MAX_VER_STR_LEN - 1;
|
||||
}
|
||||
moal_memcpy_ext(handle, handle->driver_version,
|
||||
driver_version, drv_ver_len,
|
||||
MLAN_MAX_VER_STR_LEN - 1);
|
||||
handle->driver_version[drv_ver_len] = '\0';
|
||||
}
|
||||
#endif
|
||||
|
||||
if (phw->fw_cap & FW_CAPINFO_DISABLE_NAN)
|
||||
handle->params.drv_mode &= ~DRV_MODE_NAN;
|
||||
/** FW should only enable DFS on one mac */
|
||||
|
|
@ -2498,9 +2544,10 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
|
|||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||
aid = (pmbuf->priority & 0xFF000000) >> 24;
|
||||
if (!priv->vlan_sta_list[(aid - 1) %
|
||||
MAX_STA_COUNT]
|
||||
->is_valid) {
|
||||
if ((aid > 0) &&
|
||||
(!priv->vlan_sta_list[(aid - 1) %
|
||||
MAX_STA_COUNT]
|
||||
->is_valid)) {
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
priv->stats.rx_dropped++;
|
||||
goto done;
|
||||
|
|
@ -3244,7 +3291,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN);
|
||||
moal_memcpy_ext(priv->phandle, wrqu.ap_addr.sa_data,
|
||||
pmevent->event_buf, ETH_ALEN,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 80)
|
||||
sizeof(wrqu.ap_addr.sa_data_min));
|
||||
#else
|
||||
sizeof(wrqu.ap_addr.sa_data));
|
||||
|
|
@ -3532,6 +3579,8 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
CUS_EVT_BEACON_RSSI_LOW);
|
||||
#endif
|
||||
#ifdef STA_CFG80211
|
||||
if (priv->sinfo)
|
||||
priv->sinfo->signal = *(t_s16 *)pmevent->event_buf;
|
||||
if (IS_STA_CFG80211(cfg80211_wext)) {
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
|
||||
cfg80211_cqm_rssi_notify(
|
||||
|
|
@ -3564,6 +3613,8 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
CUS_EVT_BEACON_RSSI_HIGH);
|
||||
#endif
|
||||
#ifdef STA_CFG80211
|
||||
if (priv->sinfo)
|
||||
priv->sinfo->signal = *(t_s16 *)pmevent->event_buf;
|
||||
if (IS_STA_CFG80211(cfg80211_wext)) {
|
||||
if (!priv->mrvl_rssi_low) {
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
|
||||
|
|
@ -4443,6 +4494,21 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
|
|||
priv->auth_flag = 0;
|
||||
priv->host_mlme = MFALSE;
|
||||
priv->auth_alg = 0xFFFF;
|
||||
// Consider it is fallback, if media is still
|
||||
// connected.
|
||||
if (priv->phandle->params.make_before_break &&
|
||||
priv->media_connected) {
|
||||
remain_on_channel_info *roc_info =
|
||||
(remain_on_channel_info *)
|
||||
pmevent->event_buf;
|
||||
if (!roc_info->delay_link_lost) {
|
||||
PRINTM(MMSG,
|
||||
"HostMlme: media connected, fallback to previous AP.\n");
|
||||
priv->host_mlme = MTRUE;
|
||||
woal_request_set_host_mlme(
|
||||
priv, priv->cfg_bssid);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
priv->phandle->remain_on_channel = MFALSE;
|
||||
|
|
|
|||
|
|
@ -2393,7 +2393,7 @@ static int woal_cfg80211_auth_scan(moal_private *priv,
|
|||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING
|
||||
* -- success, otherwise fail
|
||||
*/
|
||||
static mlan_status woal_request_set_host_mlme(moal_private *priv, t_u8 *bssid)
|
||||
mlan_status woal_request_set_host_mlme(moal_private *priv, t_u8 *bssid)
|
||||
{
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_bss *bss = NULL;
|
||||
|
|
@ -3077,7 +3077,8 @@ void woal_host_mlme_process_assoc_timeout(moal_private *priv,
|
|||
priv->sme_current.auth_type != NL80211_AUTHTYPE_SHARED_KEY &&
|
||||
priv->sme_current.auth_type != NL80211_AUTHTYPE_FT &&
|
||||
assoc_info->assoc_req_len && assoc_info->assoc_resp_len) {
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || \
|
||||
(defined(ANDROID_SDK_VERSION) && ANDROID_SDK_VERSION >= 31))
|
||||
roam_info.links[0].bssid = assoc_info->bssid;
|
||||
#else
|
||||
roam_info.bssid = assoc_info->bssid;
|
||||
|
|
@ -3090,6 +3091,7 @@ void woal_host_mlme_process_assoc_timeout(moal_private *priv,
|
|||
cfg80211_roamed(priv->netdev, &roam_info, GFP_KERNEL);
|
||||
priv->cfg_disconnect = MFALSE;
|
||||
priv->host_mlme = MTRUE;
|
||||
priv->auth_flag |= HOST_MLME_ASSOC_DONE;
|
||||
moal_memcpy_ext(priv->phandle, priv->cfg_bssid,
|
||||
assoc_info->bssid, MLAN_MAC_ADDR_LENGTH,
|
||||
MLAN_MAC_ADDR_LENGTH);
|
||||
|
|
|
|||
|
|
@ -80,9 +80,9 @@ static int woal_uap_addba_param(struct net_device *dev, struct ifreq *req)
|
|||
goto done;
|
||||
}
|
||||
PRINTM(MIOCTL,
|
||||
"addba param: action=%d, timeout=%d, txwinsize=%d, rxwinsize=%d txamsdu=%d rxamsdu=%d\n",
|
||||
(int)param.action, (int)param.timeout, (int)param.txwinsize,
|
||||
(int)param.rxwinsize, (int)param.txamsdu, (int)param.rxamsdu);
|
||||
"addba param: action=%u, timeout=%u, txwinsize=%u, rxwinsize=%u txamsdu=%u rxamsdu=%u\n",
|
||||
param.action, param.timeout, param.txwinsize, param.rxwinsize,
|
||||
param.txamsdu, param.rxamsdu);
|
||||
ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg));
|
||||
if (ioctl_req == NULL) {
|
||||
LEAVE();
|
||||
|
|
@ -1547,8 +1547,8 @@ static int woal_uap_hs_cfg(struct net_device *dev, struct ifreq *req,
|
|||
}
|
||||
|
||||
PRINTM(MIOCTL,
|
||||
"ioctl hscfg: flags=0x%x condition=0x%x gpio=%d gap=0x%x\n",
|
||||
hs_cfg.flags, hs_cfg.conditions, (int)hs_cfg.gpio, hs_cfg.gap);
|
||||
"ioctl hscfg: flags=0x%x condition=0x%x gpio=%u gap=0x%x\n",
|
||||
hs_cfg.flags, hs_cfg.conditions, hs_cfg.gpio, hs_cfg.gap);
|
||||
|
||||
/* HS config is blocked if HS is already activated */
|
||||
if ((hs_cfg.flags & HS_CFG_FLAG_CONDITION) &&
|
||||
|
|
@ -2689,7 +2689,7 @@ static int woal_uap_ioctl(struct net_device *dev, struct ifreq *req)
|
|||
goto done;
|
||||
}
|
||||
|
||||
PRINTM(MIOCTL, "ioctl subcmd=%d\n", (int)subcmd);
|
||||
PRINTM(MIOCTL, "ioctl subcmd=%u\n", subcmd);
|
||||
switch (subcmd) {
|
||||
case UAP_ADDBA_PARA:
|
||||
ret = woal_uap_addba_param(dev, req);
|
||||
|
|
@ -3045,8 +3045,8 @@ static int woal_uap_set_key_ioctl(struct net_device *dev, struct ifreq *req)
|
|||
}
|
||||
|
||||
PRINTM(MIOCTL,
|
||||
"ioctl report set key: " MACSTR " key_index=%d, key_len=%d \n",
|
||||
MAC2STR(key.mac_addr), (int)key.key_index, (int)key.key_len);
|
||||
"ioctl report set key: " MACSTR " key_index=%u, key_len=%u \n",
|
||||
MAC2STR(key.mac_addr), key.key_index, key.key_len);
|
||||
|
||||
if ((key.key_len > MLAN_MAX_KEY_LENGTH) || (key.key_index > 3)) {
|
||||
ret = -EINVAL;
|
||||
|
|
@ -3175,15 +3175,12 @@ static int woal_uap_power_mode_ioctl(struct net_device *dev, struct ifreq *req)
|
|||
goto done;
|
||||
}
|
||||
PRINTM(MIOCTL,
|
||||
"ioctl power: flag=0x%x ps_mode=%d ctrl_bitmap=%d min_sleep=%d max_sleep=%d "
|
||||
"inact_to=%d min_awake=%d max_awake=%d\n",
|
||||
ps_mgmt.flags, (int)ps_mgmt.ps_mode,
|
||||
(int)ps_mgmt.sleep_param.ctrl_bitmap,
|
||||
(int)ps_mgmt.sleep_param.min_sleep,
|
||||
(int)ps_mgmt.sleep_param.max_sleep,
|
||||
(int)ps_mgmt.inact_param.inactivity_to,
|
||||
(int)ps_mgmt.inact_param.min_awake,
|
||||
(int)ps_mgmt.inact_param.max_awake);
|
||||
"ioctl power: flag=0x%x ps_mode=%u ctrl_bitmap=%u min_sleep=%u max_sleep=%u "
|
||||
"inact_to=%u min_awake=%u max_awake=%u\n",
|
||||
ps_mgmt.flags, ps_mgmt.ps_mode, ps_mgmt.sleep_param.ctrl_bitmap,
|
||||
ps_mgmt.sleep_param.min_sleep, ps_mgmt.sleep_param.max_sleep,
|
||||
ps_mgmt.inact_param.inactivity_to, ps_mgmt.inact_param.min_awake,
|
||||
ps_mgmt.inact_param.max_awake);
|
||||
|
||||
if (ps_mgmt.flags & ~(PS_FLAG_PS_MODE | PS_FLAG_SLEEP_PARAM |
|
||||
PS_FLAG_INACT_SLEEP_PARAM)) {
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ static int woal_get_wap(struct net_device *dev, struct iw_request_info *info,
|
|||
if (priv->bss_started)
|
||||
moal_memcpy_ext(priv->phandle, awrq->sa_data,
|
||||
priv->current_addr, MLAN_MAC_ADDR_LENGTH,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 80)
|
||||
sizeof(awrq->sa_data_min));
|
||||
#else
|
||||
sizeof(awrq->sa_data));
|
||||
|
|
|
|||
|
|
@ -61,10 +61,6 @@ static const char usbdriver_name[] = "usbxxx";
|
|||
/** This structure contains the device signature */
|
||||
static struct usb_device_id woal_usb_table[] = {
|
||||
/* Enter the device signature inside */
|
||||
#ifdef USB8801
|
||||
{NXP_USB_DEVICE(USB8801_VID_1, USB8801_PID_1, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB8801_VID_1, USB8801_PID_2, "NXP WLAN USB Adapter")},
|
||||
#endif
|
||||
#ifdef USB8897
|
||||
{NXP_USB_DEVICE(USB8897_VID_1, USB8897_PID_1, "NXP WLAN USB Adapter")},
|
||||
{NXP_USB_DEVICE(USB8897_VID_1, USB8897_PID_2, "NXP WLAN USB Adapter")},
|
||||
|
|
@ -114,9 +110,6 @@ static struct usb_device_id woal_usb_table[] = {
|
|||
/** This structure contains the device signature */
|
||||
static struct usb_device_id woal_usb_table_skip_fwdnld[] = {
|
||||
/* Enter the device signature inside */
|
||||
#ifdef USB8801
|
||||
{NXP_USB_DEVICE(USB8801_VID_1, USB8801_PID_2, "NXP WLAN USB Adapter")},
|
||||
#endif
|
||||
#ifdef USB8897
|
||||
{NXP_USB_DEVICE(USB8897_VID_1, USB8897_PID_2, "NXP WLAN USB Adapter")},
|
||||
#endif
|
||||
|
|
@ -712,22 +705,6 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
t_u16 card_type = 0;
|
||||
|
||||
/* Update card type */
|
||||
#ifdef USB8801
|
||||
if (woal_cpu_to_le16(cardp_usb->udev->descriptor.idProduct) ==
|
||||
(__force __le16)USB8801_PID_1 ||
|
||||
woal_cpu_to_le16(cardp_usb->udev->descriptor.idProduct) ==
|
||||
(__force __le16)USB8801_PID_2) {
|
||||
card_type = CARD_TYPE_USB8801;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_USB8801,
|
||||
strlen(CARD_USB8801), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V14, strlen(V14),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
#endif
|
||||
#ifdef USB8897
|
||||
if (woal_cpu_to_le16(cardp_usb->udev->descriptor.idProduct) ==
|
||||
(__force __le16)USB8897_PID_1 ||
|
||||
|
|
@ -897,9 +874,6 @@ static int woal_usb_probe(struct usb_interface *intf,
|
|||
woal_cpu_to_le16(udev->descriptor.idProduct),
|
||||
woal_cpu_to_le16(udev->descriptor.bcdDevice));
|
||||
switch (woal_cpu_to_le16(udev->descriptor.idProduct)) {
|
||||
#ifdef USB8801
|
||||
case (__force __le16)USB8801_PID_1:
|
||||
#endif /* USB8801 */
|
||||
#ifdef USB8897
|
||||
case (__force __le16)USB8897_PID_1:
|
||||
#endif /* USB8897 */
|
||||
|
|
@ -931,9 +905,6 @@ static int woal_usb_probe(struct usb_interface *intf,
|
|||
else
|
||||
usb_cardp->boot_state = USB_FW_DNLD;
|
||||
break;
|
||||
#ifdef USB8801
|
||||
case (__force __le16)USB8801_PID_2:
|
||||
#endif /* USB8801 */
|
||||
#ifdef USB8897
|
||||
case (__force __le16)USB8897_PID_2:
|
||||
#endif /* USB8897 */
|
||||
|
|
@ -2113,10 +2084,6 @@ static mlan_status woal_usb_get_fw_name(moal_handle *handle)
|
|||
goto done;
|
||||
if (cardp->boot_state == USB_FW_READY)
|
||||
goto done;
|
||||
#ifdef USB8801
|
||||
if (IS_USB8801(handle->card_type))
|
||||
goto done;
|
||||
#endif
|
||||
|
||||
#if defined(USB8997) || defined(USB9098) || defined(USB9097) || \
|
||||
defined(USB8978) || defined(USBIW624) || defined(USBIW610)
|
||||
|
|
|
|||
|
|
@ -28,14 +28,6 @@ Change Log:
|
|||
#ifndef _MOAL_USB_H
|
||||
#define _MOAL_USB_H
|
||||
|
||||
#ifdef USB8801
|
||||
/** USB VID 1 */
|
||||
#define USB8801_VID_1 0x1286
|
||||
/** USB PID 1 */
|
||||
#define USB8801_PID_1 0x2049
|
||||
/** USB PID 2 */
|
||||
#define USB8801_PID_2 0x204a
|
||||
#endif /* USB8801 */
|
||||
#ifdef USB8997
|
||||
/** USB VID 1 */
|
||||
#define USB8997_VID_1 0x1286
|
||||
|
|
@ -119,8 +111,7 @@ Change Log:
|
|||
#define MVUSB_RX_DATA_URB 6
|
||||
|
||||
#if defined(USB8997) || defined(USB9098) || defined(USB9097) || \
|
||||
defined(USB8978) || defined(USB8801) || defined(USBIW624) || \
|
||||
defined(USBIW610)
|
||||
defined(USB8978) || defined(USBIW624) || defined(USBIW610)
|
||||
/* Transmit buffer size for chip revision check */
|
||||
#define CHIP_REV_TX_BUF_SIZE 16
|
||||
/* Receive buffer size for chip revision check */
|
||||
|
|
@ -131,9 +122,6 @@ Change Log:
|
|||
#define EXTEND_V1 (0x00000001)
|
||||
#define EXTEND_V2 (0x00000002)
|
||||
#define EXTEND_V3 (0x00000003)
|
||||
#ifdef USB8801
|
||||
#define USB8801_DEFAULT_WLAN_FW_NAME "nxp/usb8801_uapsta.bin"
|
||||
#endif /* USB8801 */
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ static int woal_get_wap(struct net_device *dev, struct iw_request_info *info,
|
|||
|
||||
if (bss_info.media_connected == MTRUE)
|
||||
moal_memcpy_ext(priv->phandle, awrq->sa_data, &bss_info.bssid,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 80)
|
||||
MLAN_MAC_ADDR_LENGTH,
|
||||
sizeof(awrq->sa_data_min));
|
||||
#else
|
||||
|
|
@ -3072,7 +3072,7 @@ static int woal_get_scan(struct net_device *dev, struct iw_request_info *info,
|
|||
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
|
||||
moal_memcpy_ext(priv->phandle, iwe.u.ap_addr.sa_data,
|
||||
&scan_table[i].mac_address, ETH_ALEN,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 80)
|
||||
sizeof(iwe.u.ap_addr.sa_data_min));
|
||||
#else
|
||||
sizeof(iwe.u.ap_addr.sa_data));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue