mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2025-01-15 16:25:35 +00:00
mxm_wifiex: update to mxm5x17368.p2 release
Driver Bug Fixes: ----------------- 1. WSW-23826: DUT is not waking up on Boadcast Event 2. WSW-22873: Random Kernel crash is seen in STAUT RSNE bounds verification using WPA2-Enterprise test 3. WCSWREL-400: Fixed kernel panic during FW reload 4. WSFD-599: Support trigger frame generating in RF test mode 5. WSW-23330: Auto Go can't bring up after auto Fw reload 6. WSW-23920: DUT fails to send NA packet in response NS packet during ipv6 NSoffload when host sleep is enabled 7. WSW-23938: Wi-Fi stuck after cmd53 read error=-84 8. WSW-22765: Fixed the issue of WPA2-Enterprise STA test fails 9. WSW-24932: Random Wifi hang Issue with error wakeup card timeout is observed during coex scenario Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
parent
9bbd4d8c52
commit
371f75d252
26 changed files with 1234 additions and 387 deletions
|
@ -118,9 +118,6 @@ CONFIG_MULTI_CHAN_SUPPORT=y
|
|||
|
||||
|
||||
|
||||
# Use static link for app build
|
||||
export CONFIG_STATIC_LINK=y
|
||||
CONFIG_ANDROID_KERNEL=n
|
||||
|
||||
#32bit app over 64bit kernel support
|
||||
CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n
|
||||
|
@ -151,6 +148,7 @@ ifeq ($(CONFIG_IMX_SUPPORT),y)
|
|||
ccflags-y += -DIMX_SUPPORT
|
||||
ifneq ($(ANDROID_PRODUCT_OUT),)
|
||||
ccflags-y += -DIMX_ANDROID
|
||||
CONFIG_ANDROID_KERNEL=y
|
||||
endif
|
||||
endif
|
||||
KERNELDIR ?= /usr/src/arm/linux_5_10_y_kernel/linux-nxp
|
||||
|
@ -382,7 +380,6 @@ endif
|
|||
#ccflags-y += -Wstringop-truncation
|
||||
#ccflags-y += -Wmisleading-indentation
|
||||
#ccflags-y += -Wunused-const-variable
|
||||
ccflags-y += -Wno-array-bounds
|
||||
#############################################################################
|
||||
# Make Targets
|
||||
#############################################################################
|
||||
|
|
|
@ -441,12 +441,95 @@
|
|||
echo "tx_frame=0" > /proc/mwlan/adapterX/config
|
||||
echo "tx_frame=1 7 0xAAA 0x100 1 20 0 0 0 0 0 0 0 05:43:3f:c4:51" > /proc/mwlan/adapterX/config
|
||||
|
||||
Configure Trigger Frame
|
||||
Example: To configure Trigger frame:
|
||||
echo "trigger_frame=1 0 1 2 5484 0 256 0 0 2 1 0 0 0 1 60 1 0 65535 0 511 5 0 67 0 0 0 0 90 0 0 0 0" > /proc/mwlan/adapter0/config
|
||||
|
||||
Example: To disable configuration of Trigger frame:
|
||||
echo "trigger_frame=0" > /proc/mwlan/adapter0/config
|
||||
|
||||
For more information about trigger frame configuration as per supported BW(80MHz, 40MHz and 20MHz),
|
||||
Please refer : config/trigger_frame_cfg.conf
|
||||
|
||||
Example : To start trigger frame transmission :
|
||||
echo "rf_test_mode=1" > /proc/mwlan/adapter0/config
|
||||
echo "band=1" > /proc/mwlan/adapter0/config
|
||||
echo "bw=0" > /proc/mwlan/adapter0/config
|
||||
echo "channel=36" > /proc/mwlan/adapter0/config
|
||||
echo "trigger_frame=1 0 1 2 5484 0 256 0 0 0 1 0 0 0 1 60 1 0 65535 0 511 5 0 61 0 0 0 0 90 0 0 0 0" > /proc/mwlan/adapter0/config
|
||||
echo "tx_frame=1 0x1102 0xabababab 200" >/proc/mwlan/adapter0/config
|
||||
|
||||
6) Set host sleep parameters
|
||||
|
||||
hssetpara
|
||||
This command is used to set host sleep parameters.
|
||||
Example:
|
||||
echo "hssetpara=2 0xff 0xc8 3 400" > /proc/mwlan/adapter0/config
|
||||
echo "hssetpara=2 1 0xc8 3 400 " > /proc/mwlan/adapter0/config
|
||||
|
||||
7) For Antenna Diversity Command
|
||||
|
||||
antcfg
|
||||
This command is used to set/get the mode of Tx/Rx path.
|
||||
|
||||
GET Command Format: cat /proc/mwlan/adapter0/config
|
||||
SET Command Format: echo "antcfg=[m] [n] [o] [p]" > /proc/mwlan/adapter0/config
|
||||
|
||||
For chip which support STREAM_2X2
|
||||
where value of m is:
|
||||
Bit 0 -- Tx Path A or Tx/Rx Path A if [n] is not provided
|
||||
Bit 1 -- Tx Path B or Tx/Rx Path B if [n] is not provided
|
||||
Bit 0-1 -- Tx Path A+B or Tx/Rx Path A+B if [n] is not provided
|
||||
For 9097/9098/IW62X, LOW BYTE for 2G setting
|
||||
Bit 8 -- Tx Path A or Tx/Rx Path A if [n] is not provided
|
||||
Bit 9 -- Tx Path B or Tx/Rx Path B if [n] is not provided
|
||||
Bit 8-9 -- Tx Path A+B or Tx/Rx Path A+B if [n] is not provided
|
||||
For 9097/9098/IW62X, HIGH BYTE for 5G setting
|
||||
where value of n is:
|
||||
Bit 0 -- Rx Path A
|
||||
Bit 1 -- Rx Path B
|
||||
Bit 0-1 -- Rx Path A+B
|
||||
For 9097/9098/IW62X, LOW BYTE for 2G setting
|
||||
Bit 8 -- Rx Path A
|
||||
Bit 8 -- Rx Path B
|
||||
Bit 8-9 -- Rx Path A+B
|
||||
For 9097/9098/IW62X, HIGH BYTE for 5G setting
|
||||
The Tx path setting (m) is used for both Tx and Rx if Rx path (n) is not provided.
|
||||
|
||||
Examples:
|
||||
cat /proc/mwlan/adapter0/config : Get Tx and Rx path
|
||||
echo "antcfg=3" > /proc/mwlan/adapter0/config : Set Tx and Rx path to A+B
|
||||
echo "antcfg=1 3" > /proc/mwlan/adapter0/config : Set Tx path to A and Rx path to A+B
|
||||
|
||||
echo "antcfg=0x103" > /proc/mwlan/adapter0/config : Set Tx and Rx path to A+B on 2G and Tx and Rx path to A on 5G
|
||||
echo "antcfg=0x103 0x103" > /proc/mwlan/adapter0/config : Set Tx path to A+B and Rx path to A+B on 2G, and Tx and Rx path to A on 5G
|
||||
|
||||
echo "antcfg=0x202" > /proc/mwlan/adapter0/config : Use 5GHz path B pin for 5G TX/RX and 2GHz path B pin for 2G TX/RX
|
||||
|
||||
On RD board connection is as follows :
|
||||
5GHz path A pin -> AntA
|
||||
5GHz path B pin -> AntB
|
||||
2GHz path A pin -> AntB
|
||||
2GHz path B pin -> AntA
|
||||
|
||||
For chip which support SAD
|
||||
where value of m is:
|
||||
Bit 0 -- Tx/Rx antenna 1
|
||||
Bit 1 -- Tx/Rx antenna 2
|
||||
...
|
||||
0xFFFF -- Tx/Rx antenna diversity
|
||||
|
||||
where value of n is:
|
||||
SAD evaluate time interval, only be provided when m = 0xFFFF, default value is 6s(0x1770)
|
||||
|
||||
Examples:
|
||||
cat /proc/mwlan/adapter0/config : Get Tx/Rx antenna mode
|
||||
echo "antcfg=1" > /proc/mwlan/adapter0/config : Set Tx/Rx antenna 1
|
||||
echo "antcfg=0xFFFF" > /proc/mwlan/adapter0/config : Set Tx/Rx antenna diversity
|
||||
echo "antcfg=0xFFFF 0x1770" > /proc/mwlan/adapter0/config : Set antenna evaluate time interval to 6s
|
||||
|
||||
|
||||
|
||||
===============================================================================
|
||||
U S E R M A N U A L F O R MLANUTL
|
||||
|
||||
|
@ -4536,19 +4619,6 @@ cfg_opp_ps
|
|||
mlanutl p2pX cfg_opp_ps : Get noa configuration.
|
||||
mlanutl p2pX cfg_opp_ps 1 7 : Set noa configuration.
|
||||
|
||||
rxpktcoal_cfg
|
||||
This is used to get/set RX packet coalescing paramters
|
||||
Usage:
|
||||
mlanutl mlanX rxpktcoal_cfg [m] [n]
|
||||
|
||||
where:
|
||||
[m]: pkt_threshold: count after which packets would be sent to host. Valid values 1-7
|
||||
[n]: delay: timeout in ms after which packets would be sent to host. Valid values 1-4
|
||||
Coalescing is disabled if both or either of packet_thershold and delay is zero
|
||||
|
||||
RX packet coalescing parameters can be changed only when device is in
|
||||
idle state i.e. all interfaces are disconnected.
|
||||
|
||||
get_sensor_temp
|
||||
This command is used to get SOC temperature
|
||||
Usage:
|
||||
|
|
|
@ -4516,76 +4516,6 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
mlan_status wlan_cmd_rx_pkt_coalesce_cfg(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf)
|
||||
{
|
||||
mlan_ds_misc_rx_packet_coalesce *rx_pkt_cfg =
|
||||
(mlan_ds_misc_rx_packet_coalesce *)pdata_buf;
|
||||
HostCmd_DS_RX_PKT_COAL_CFG *prx_coal_cfg =
|
||||
(HostCmd_DS_RX_PKT_COAL_CFG *)&cmd->params.rx_pkt_coal_cfg;
|
||||
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_RX_PKT_COALESCE_CFG);
|
||||
prx_coal_cfg->action = wlan_cpu_to_le16(cmd_action);
|
||||
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
prx_coal_cfg->packet_threshold =
|
||||
wlan_cpu_to_le32(rx_pkt_cfg->packet_threshold);
|
||||
prx_coal_cfg->delay = wlan_cpu_to_le16(rx_pkt_cfg->delay);
|
||||
PRINTM(MCMND,
|
||||
"Set RX coal config: packet threshold=%d delay=%d\n",
|
||||
rx_pkt_cfg->packet_threshold, rx_pkt_cfg->delay);
|
||||
cmd->size = wlan_cpu_to_le16(
|
||||
S_DS_GEN + sizeof(HostCmd_DS_RX_PKT_COAL_CFG));
|
||||
} else {
|
||||
cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(cmd_action));
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of RX_PACKET_COAL_CFG
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||
* @param pioctl_buf A pointer to mlan_ioctl_req structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_ret_rx_pkt_coalesce_cfg(pmlan_private pmpriv,
|
||||
const HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
mlan_ds_misc_cfg *pcfg = MNULL;
|
||||
const HostCmd_DS_RX_PKT_COAL_CFG *presp_cfg =
|
||||
&resp->params.rx_pkt_coal_cfg;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_buf) {
|
||||
pcfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||
pcfg->param.rx_coalesce.packet_threshold =
|
||||
wlan_le32_to_cpu(presp_cfg->packet_threshold);
|
||||
pcfg->param.rx_coalesce.delay =
|
||||
wlan_le16_to_cpu(presp_cfg->delay);
|
||||
PRINTM(MCMND,
|
||||
"Get rx pkt coalesce info: packet threshold=%d delay=%d\n",
|
||||
pcfg->param.rx_coalesce.packet_threshold,
|
||||
pcfg->param.rx_coalesce.delay);
|
||||
pioctl_buf->buf_len = sizeof(mlan_ds_misc_rx_packet_coalesce);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function download the vdll block.
|
||||
*
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define _MLAN_DECL_H_
|
||||
|
||||
/** MLAN release version */
|
||||
#define MLAN_RELEASE_VERSION "368"
|
||||
#define MLAN_RELEASE_VERSION "368.p2"
|
||||
|
||||
/** Re-define generic data types for MLAN/MOAL */
|
||||
/** Signed char (1-byte) */
|
||||
|
|
|
@ -1314,11 +1314,6 @@ typedef enum _WLAN_802_11_WEP_STATUS {
|
|||
/** Host Command ID: DRCS config */
|
||||
#define HostCmd_CMD_DRCS_CONFIG 0x024a
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
/** TLV ID for RX pkt coalesce config */
|
||||
#define TLV_TYPE_RX_PKT_COAL_CONFIG (PROPRIETARY_TLV_BASE_ID + 0xC9)
|
||||
#endif
|
||||
|
||||
#define TLV_TYPE_PREV_BSSID (PROPRIETARY_TLV_BASE_ID + 330)
|
||||
|
||||
/** Host Command ID : Channel report request */
|
||||
|
@ -1575,11 +1570,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_He_Op_t {
|
|||
#define IS_FW_SUPPORT_EMBEDDED_OWE(_adapter) \
|
||||
(_adapter->fw_cap_info & FW_CAPINFO_EMBEDDED_OWE_SUPPORT)
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
/** Host Command ID : Rx packet coalescing configuration */
|
||||
#define HostCmd_CMD_RX_PKT_COALESCE_CFG 0x012c
|
||||
#endif
|
||||
|
||||
/** Host Command ID : Extended scan support */
|
||||
#define HostCmd_CMD_802_11_SCAN_EXT 0x0107
|
||||
|
||||
|
@ -6996,17 +6986,6 @@ typedef MLAN_PACK_START struct _HostCmd_DS_MIMO_SWITCH {
|
|||
t_u8 rxpath_antmode;
|
||||
} MLAN_PACK_END HostCmd_DS_MIMO_SWITCH;
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
typedef MLAN_PACK_START struct _HostCmd_DS_RX_PKT_COAL_CFG {
|
||||
/** Action */
|
||||
t_u16 action;
|
||||
/** Packet threshold */
|
||||
t_u32 packet_threshold;
|
||||
/** Timeout */
|
||||
t_u16 delay;
|
||||
} MLAN_PACK_END HostCmd_DS_RX_PKT_COAL_CFG;
|
||||
#endif
|
||||
|
||||
typedef MLAN_PACK_START struct _MrvlTypes_DrcsTimeSlice_t {
|
||||
/** Header */
|
||||
MrvlIEtypesHeader_t header;
|
||||
|
@ -8254,9 +8233,6 @@ typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND {
|
|||
HostCmd_CONFIG_LOW_PWR_MODE low_pwr_mode_cfg;
|
||||
HostCmd_DS_TSF tsf;
|
||||
HostCmd_DS_DFS_REPEATER_MODE dfs_repeater;
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
HostCmd_DS_RX_PKT_COAL_CFG rx_pkt_coal_cfg;
|
||||
#endif
|
||||
HostCmd_DS_EAPOL_PKT eapol_pkt;
|
||||
HostCmd_DS_SENSOR_TEMP temp_sensor;
|
||||
HostCMD_DS_APCMD_ACS_SCAN acs_scan;
|
||||
|
@ -8310,6 +8286,7 @@ typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND {
|
|||
struct mfg_cmd_tx_cont mfg_tx_cont;
|
||||
struct mfg_cmd_tx_frame2 mfg_tx_frame2;
|
||||
struct mfg_Cmd_HE_TBTx_t mfg_he_power;
|
||||
mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t mfg_tx_trigger_config;
|
||||
HostCmd_DS_CMD_ARB_CONFIG arb_cfg;
|
||||
HostCmd_DS_CMD_DOT11MC_UNASSOC_FTM_CFG dot11mc_unassoc_ftm_cfg;
|
||||
HostCmd_DS_HAL_PHY_CFG hal_phy_cfg_params;
|
||||
|
|
|
@ -303,9 +303,6 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_LOW_PWR_MODE = 0x00200029,
|
||||
MLAN_OID_MISC_MEF_FLT_CFG = 0x0020002A,
|
||||
MLAN_OID_MISC_DFS_REAPTER_MODE = 0x0020002B,
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C,
|
||||
#endif
|
||||
MLAN_OID_MISC_TDLS_CS_CHANNEL = 0x0020002D,
|
||||
MLAN_OID_MISC_COALESCE_CFG = 0x0020002E,
|
||||
MLAN_OID_MISC_TDLS_IDLE_TIME = 0x0020002F,
|
||||
|
@ -1375,6 +1372,8 @@ enum _mlan_band_def {
|
|||
BAND_AAC = 64,
|
||||
BAND_GAX = 256,
|
||||
BAND_AAX = 512,
|
||||
MLAN_OID_MISC_RF_TEST_CONFIG_TRIGGER_FRAME = 0x0020008C,
|
||||
|
||||
};
|
||||
|
||||
/** Channel bandwidth */
|
||||
|
@ -3415,15 +3414,6 @@ typedef struct _mlan_ds_pm_cfg {
|
|||
} param;
|
||||
} mlan_ds_pm_cfg, *pmlan_ds_pm_cfg;
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
typedef struct {
|
||||
mlan_cmd_result_e cmd_result; /**< Firmware execution result */
|
||||
|
||||
t_u32 pkt_threshold; /** Packet threshold */
|
||||
t_u16 delay; /** Timeout value in milliseconds */
|
||||
} wlan_ioctl_rx_pkt_coalesce_config_t;
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------*/
|
||||
/** WMM Configuration Group */
|
||||
/*-----------------------------------------------------------------*/
|
||||
|
@ -5207,15 +5197,6 @@ typedef struct _mlan_ds_misc_tdls_ies {
|
|||
t_u8 regulatory_class[IEEE_MAX_IE_SIZE];
|
||||
} mlan_ds_misc_tdls_ies;
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
typedef struct _mlan_ds_misc_rx_packet_coalesce {
|
||||
/** packet threshold */
|
||||
t_u32 packet_threshold;
|
||||
/** timeout value */
|
||||
t_u16 delay;
|
||||
} mlan_ds_misc_rx_packet_coalesce;
|
||||
#endif
|
||||
|
||||
typedef struct _mlan_ds_misc_dfs_repeater {
|
||||
/** Set or Get */
|
||||
t_u16 action;
|
||||
|
@ -5555,6 +5536,7 @@ typedef struct _mlan_ds_misc_chan_trpc_cfg {
|
|||
#define MFG_CMD_RF_CHANNELBW 0x1044
|
||||
#define MFG_CMD_RADIO_MODE_CFG 0x1211
|
||||
#define MFG_CMD_CONFIG_MAC_HE_TB_TX 0x110A
|
||||
#define MFG_CMD_CONFIG_TRIGGER_FRAME 0x110C
|
||||
/** MFG CMD generic cfg */
|
||||
struct MLAN_PACK_START mfg_cmd_generic_cfg {
|
||||
/** MFG command code */
|
||||
|
@ -5677,6 +5659,178 @@ struct MLAN_PACK_START mfg_Cmd_HE_TBTx_t {
|
|||
t_s16 tx_power;
|
||||
} MLAN_PACK_END;
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_HETrigComInfo_t {
|
||||
t_u64 reserved : 1;
|
||||
t_u64 he_sig2 : 9;
|
||||
t_u64 doppler : 1;
|
||||
t_u64 spatial_reuse : 16;
|
||||
t_u64 pe_disambig : 1;
|
||||
t_u64 pre_fec_pad_fct : 2;
|
||||
t_u64 ap_tx_pwr : 6;
|
||||
|
||||
t_u64 ldpc_ess : 1;
|
||||
t_u64 ul_stbc : 1;
|
||||
t_u64 ltf_symbol : 3;
|
||||
t_u64 ltf_mode : 1;
|
||||
t_u64 ltf_type : 2;
|
||||
|
||||
t_u64 ul_bw : 2;
|
||||
t_u64 cs_required : 1;
|
||||
t_u64 more_tf : 1;
|
||||
t_u64 ul_len : 12;
|
||||
t_u64 trigger_type : 4;
|
||||
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_HETrigComInfo_t;
|
||||
#else
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_HETrigComInfo_t {
|
||||
t_u64 trigger_type : 4;
|
||||
t_u64 ul_len : 12;
|
||||
t_u64 more_tf : 1;
|
||||
t_u64 cs_required : 1;
|
||||
t_u64 ul_bw : 2;
|
||||
|
||||
t_u64 ltf_type : 2;
|
||||
t_u64 ltf_mode : 1;
|
||||
t_u64 ltf_symbol : 3;
|
||||
t_u64 ul_stbc : 1;
|
||||
t_u64 ldpc_ess : 1;
|
||||
|
||||
t_u64 ap_tx_pwr : 6;
|
||||
t_u64 pre_fec_pad_fct : 2;
|
||||
t_u64 pe_disambig : 1;
|
||||
t_u64 spatial_reuse : 16;
|
||||
t_u64 doppler : 1;
|
||||
t_u64 he_sig2 : 9;
|
||||
t_u64 reserved : 1;
|
||||
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_HETrigComInfo_t;
|
||||
#endif
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_HETrigUserInfo_t {
|
||||
t_u8 reserved : 1;
|
||||
t_u8 ul_target_rssi : 7;
|
||||
t_u32 ss_alloc : 6;
|
||||
t_u32 ul_dcm : 1;
|
||||
t_u32 ul_mcs : 4;
|
||||
t_u32 ul_coding_type : 1;
|
||||
t_u32 ru_alloc : 7;
|
||||
t_u32 ru_alloc_reg : 1;
|
||||
t_u32 aid12 : 12;
|
||||
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_HETrigUserInfo_t;
|
||||
#else
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_HETrigUserInfo_t {
|
||||
t_u32 aid12 : 12;
|
||||
t_u32 ru_alloc_reg : 1;
|
||||
t_u32 ru_alloc : 7;
|
||||
t_u32 ul_coding_type : 1;
|
||||
t_u32 ul_mcs : 4;
|
||||
t_u32 ul_dcm : 1;
|
||||
t_u32 ss_alloc : 6;
|
||||
t_u8 ul_target_rssi : 7;
|
||||
t_u8 reserved : 1;
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_HETrigUserInfo_t;
|
||||
#endif
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEETypes_BasicHETrigUserInfo_t {
|
||||
t_u8 pref_ac : 2;
|
||||
t_u8 ac_pl : 1;
|
||||
t_u8 tid_al : 3;
|
||||
t_u8 mpdu_mu_sf : 2;
|
||||
} MLAN_PACK_END mfg_cmd_IEEETypes_BasicHETrigUserInfo_t;
|
||||
#else
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEETypes_BasicHETrigUserInfo_t {
|
||||
t_u8 mpdu_mu_sf : 2;
|
||||
t_u8 tid_al : 3;
|
||||
t_u8 ac_pl : 1;
|
||||
t_u8 pref_ac : 2;
|
||||
} MLAN_PACK_END mfg_cmd_IEEETypes_BasicHETrigUserInfo_t;
|
||||
#endif
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_FrameCtrl_t {
|
||||
/** Order */
|
||||
t_u8 order : 1;
|
||||
/** Wep */
|
||||
t_u8 wep : 1;
|
||||
/** More Data */
|
||||
t_u8 more_data : 1;
|
||||
/** Power Mgmt */
|
||||
t_u8 pwr_mgmt : 1;
|
||||
/** Retry */
|
||||
t_u8 retry : 1;
|
||||
/** More Frag */
|
||||
t_u8 more_frag : 1;
|
||||
/** From DS */
|
||||
t_u8 from_ds : 1;
|
||||
/** To DS */
|
||||
t_u8 to_ds : 1;
|
||||
/** Sub Type */
|
||||
t_u8 sub_type : 4;
|
||||
/** Type */
|
||||
t_u8 type : 2;
|
||||
/** Protocol Version */
|
||||
t_u8 protocol_version : 2;
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_FrameCtrl_t;
|
||||
#else
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_FrameCtrl_t {
|
||||
/** Protocol Version */
|
||||
t_u8 protocol_version : 2;
|
||||
/** Type */
|
||||
t_u8 type : 2;
|
||||
/** Sub Type */
|
||||
t_u8 sub_type : 4;
|
||||
/** To DS */
|
||||
t_u8 to_ds : 1;
|
||||
/** From DS */
|
||||
t_u8 from_ds : 1;
|
||||
/** More Frag */
|
||||
t_u8 more_frag : 1;
|
||||
/** Retry */
|
||||
t_u8 retry : 1;
|
||||
/** Power Mgmt */
|
||||
t_u8 pwr_mgmt : 1;
|
||||
/** More Data */
|
||||
t_u8 more_data : 1;
|
||||
/** Wep */
|
||||
t_u8 wep : 1;
|
||||
/** Order */
|
||||
t_u8 order : 1;
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_FrameCtrl_t;
|
||||
#endif
|
||||
|
||||
typedef MLAN_PACK_START struct _mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t {
|
||||
/** MFG command code */
|
||||
t_u32 mfg_cmd;
|
||||
/** Action */
|
||||
t_u16 action;
|
||||
/** Device ID */
|
||||
t_u16 device_id;
|
||||
/** MFG Error code */
|
||||
t_u32 error;
|
||||
/** enable Tx*/
|
||||
t_u32 enable_tx;
|
||||
/** enable Stand Alone HE TB */
|
||||
t_u32 standalone_hetb;
|
||||
/** Frame Control */
|
||||
mfg_cmd_IEEEtypes_FrameCtrl_t frmCtl;
|
||||
/** Duration */
|
||||
t_u16 duration;
|
||||
/** Destination MAC Address */
|
||||
t_u8 dest_addr[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Source MAC Address */
|
||||
t_u8 src_addr[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Common Info Field **/
|
||||
mfg_cmd_IEEEtypes_HETrigComInfo_t trig_common_field;
|
||||
/** User Info Field **/
|
||||
mfg_cmd_IEEEtypes_HETrigUserInfo_t trig_user_info_field;
|
||||
/** Trigger Dependent User Info Field **/
|
||||
mfg_cmd_IEEETypes_BasicHETrigUserInfo_t basic_trig_user_info;
|
||||
} MLAN_PACK_END mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t;
|
||||
|
||||
typedef struct _mlan_ds_misc_chnrgpwr_cfg {
|
||||
/** length */
|
||||
t_u16 length;
|
||||
|
@ -5835,9 +5989,6 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
/** MEF-FLT-CONFIG for MLAN_OID_MISC_NV_FLT_CFG */
|
||||
mlan_ds_misc_mef_flt_cfg mef_flt_cfg;
|
||||
mlan_ds_misc_dfs_repeater dfs_repeater;
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
mlan_ds_misc_rx_packet_coalesce rx_coalesce;
|
||||
#endif
|
||||
/** FW reload flag */
|
||||
t_u8 fw_reload;
|
||||
mlan_ds_sensor_temp sensor_temp;
|
||||
|
@ -5878,6 +6029,7 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
struct mfg_cmd_tx_cont mfg_tx_cont;
|
||||
struct mfg_cmd_tx_frame2 mfg_tx_frame2;
|
||||
struct mfg_Cmd_HE_TBTx_t mfg_he_power;
|
||||
mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t mfg_tx_trigger_config;
|
||||
mlan_ds_misc_arb_cfg arb_cfg;
|
||||
mlan_ds_misc_cfp_tbl cfp;
|
||||
t_u8 range_ext_mode;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* to the firmware.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2022 NXP
|
||||
* Copyright 2008-2023 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
@ -550,33 +550,53 @@ static int wlan_cmd_append_osen_ie(mlan_private *priv, t_u8 **ppbuffer)
|
|||
/**
|
||||
* @brief This function get the rsn_cap from RSN ie buffer.
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
*
|
||||
* @param data A pointer to rsn_ie data after IE header
|
||||
* @param len Length of ie rsn_ie data after IE header
|
||||
* @param return rsn_cap
|
||||
*/
|
||||
static t_u16 wlan_get_rsn_cap(t_u8 *data)
|
||||
static t_u16 wlan_get_rsn_cap(t_u8 *data, t_u8 len)
|
||||
{
|
||||
t_u16 rsn_cap = 0;
|
||||
t_u16 *ptr;
|
||||
t_u16 *end_ptr;
|
||||
t_u16 pairwise_cipher_count = 0;
|
||||
t_u16 akm_suite_count = 0;
|
||||
|
||||
if (len < 20) {
|
||||
/* Version(2B)+GRP(4B)+PairwiseCnt(2B)+PairwiseList(4B)+
|
||||
akmCnt(2B)+akmList(4B)+rsnCap(2B) = 20B */
|
||||
PRINTM(MERROR,
|
||||
"RSNE: IE len should not less than 20 Bytes, len=%d\n",
|
||||
len);
|
||||
goto done;
|
||||
}
|
||||
/* rsn_cap = data + 2 bytes version + 4 bytes
|
||||
* group_cipher_suite + 2 bytes pairwise_cipher_count +
|
||||
* pairwise_cipher_count * PAIRWISE_CIPHER_SUITE_LEN + 2 bytes
|
||||
* akm_suite_count + akm_suite_count * AKM_SUITE_LEN
|
||||
*/
|
||||
end_ptr = (t_u16 *)(data + len);
|
||||
ptr = (t_u16 *)(data + sizeof(t_u16) + 4 * sizeof(t_u8));
|
||||
pairwise_cipher_count = wlan_le16_to_cpu(*ptr);
|
||||
ptr = (t_u16 *)(data + sizeof(t_u16) + 4 * sizeof(t_u8) +
|
||||
sizeof(t_u16) +
|
||||
pairwise_cipher_count * PAIRWISE_CIPHER_SUITE_LEN);
|
||||
if ((pairwise_cipher_count == 0) || (ptr >= end_ptr)) {
|
||||
PRINTM(MERROR, "RSNE: PAIRWISE_CIPHER not correct\n");
|
||||
goto done;
|
||||
}
|
||||
akm_suite_count = wlan_le16_to_cpu(*ptr);
|
||||
ptr = (t_u16 *)(data + sizeof(t_u16) + 4 * sizeof(t_u8) +
|
||||
sizeof(t_u16) +
|
||||
pairwise_cipher_count * PAIRWISE_CIPHER_SUITE_LEN +
|
||||
sizeof(t_u16) + akm_suite_count * AKM_SUITE_LEN);
|
||||
if ((akm_suite_count == 0) || (ptr > end_ptr)) {
|
||||
PRINTM(MERROR, "RSNE: AKM Suite or RSNCAP not correct\n");
|
||||
goto done;
|
||||
}
|
||||
rsn_cap = wlan_le16_to_cpu(*ptr);
|
||||
|
||||
done:
|
||||
PRINTM(MCMND, "rsn_cap=0x%x\n", rsn_cap);
|
||||
return rsn_cap;
|
||||
}
|
||||
|
@ -598,10 +618,12 @@ static t_u8 wlan_use_mfp(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
|
||||
if (pmpriv->wpa_ie[0] != RSN_IE)
|
||||
return 0;
|
||||
sta_rsn_cap = wlan_get_rsn_cap(pmpriv->wpa_ie + 2);
|
||||
sta_rsn_cap =
|
||||
wlan_get_rsn_cap(pmpriv->wpa_ie + 2, *(pmpriv->wpa_ie + 1));
|
||||
if (!pbss_desc->prsn_ie)
|
||||
return 0;
|
||||
ap_rsn_cap = wlan_get_rsn_cap(pbss_desc->prsn_ie->data);
|
||||
ap_rsn_cap = wlan_get_rsn_cap(pbss_desc->prsn_ie->data,
|
||||
pbss_desc->prsn_ie->ieee_hdr.len);
|
||||
ap_mfpc = ((ap_rsn_cap & (0x1 << MFPC_BIT)) == (0x1 << MFPC_BIT));
|
||||
ap_mfpr = ((ap_rsn_cap & (0x1 << MFPR_BIT)) == (0x1 << MFPR_BIT));
|
||||
sta_mfpc = ((sta_rsn_cap & (0x1 << MFPC_BIT)) == (0x1 << MFPC_BIT));
|
||||
|
@ -676,6 +698,14 @@ static int wlan_update_rsn_ie(mlan_private *pmpriv,
|
|||
|
||||
int ap_mfpc = 0, ap_mfpr = 0, ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
if (*rsn_ie_len < 20) {
|
||||
/* Version(2B)+GRP(4B)+PairwiseCnt(2B)+PairwiseList(4B)+
|
||||
akmCnt(2B)+akmList(4B)+rsnCap(2B) = 20B */
|
||||
PRINTM(MERROR,
|
||||
"RSNE: IE len should not less than 20 Bytes, len=%d\n",
|
||||
*rsn_ie_len);
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
pmf_mask = (((pmpriv->pmfcfg.mfpc << MFPC_BIT) |
|
||||
(pmpriv->pmfcfg.mfpr << MFPR_BIT)) |
|
||||
(~PMF_MASK));
|
||||
|
@ -692,6 +722,13 @@ static int wlan_update_rsn_ie(mlan_private *pmpriv,
|
|||
pairwise_cipher_count = wlan_le16_to_cpu(*(t_u16 *)ptr);
|
||||
ptr += sizeof(t_u16);
|
||||
|
||||
if ((pairwise_cipher_count == 0) ||
|
||||
(ptr + PAIRWISE_CIPHER_SUITE_LEN * pairwise_cipher_count) >=
|
||||
end_ptr) {
|
||||
PRINTM(MERROR, "RSNE: PAIRWISE_CIPHER not correct\n");
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
preference_selected = 0;
|
||||
cipher_selected_id = 0;
|
||||
for (i = 0; i < pairwise_cipher_count; i++) {
|
||||
|
@ -731,6 +768,14 @@ static int wlan_update_rsn_ie(mlan_private *pmpriv,
|
|||
akm_suite_count = wlan_le16_to_cpu(*(t_u16 *)ptr);
|
||||
ptr += sizeof(t_u16); // move pointer to AKM suite
|
||||
|
||||
if ((akm_suite_count == 0) || (ptr + AKM_SUITE_LEN * akm_suite_count +
|
||||
sizeof(t_u16)) > end_ptr) { // sizeof(t_u16)
|
||||
// is for
|
||||
// rsncap
|
||||
PRINTM(MERROR, "RSNE: AKM Suite or RSNCAP not correct\n");
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
akm_type_selected = 0;
|
||||
if (*akm_type == AssocAgentAuth_Auto) {
|
||||
// find the best one
|
||||
|
@ -808,14 +853,19 @@ static int wlan_update_rsn_ie(mlan_private *pmpriv,
|
|||
|
||||
// PMKID
|
||||
ptr += sizeof(t_u16);
|
||||
if (end_ptr > ptr) {
|
||||
if (end_ptr >= (ptr + sizeof(t_u16))) {
|
||||
pmkid_count = wlan_le16_to_cpu(*(t_u16 *)ptr);
|
||||
ptr += sizeof(t_u16);
|
||||
|
||||
if (pmkid_count &&
|
||||
(end_ptr >= (ptr + pmkid_count * PMKID_LEN))) {
|
||||
pmkid_list_ptr = ptr;
|
||||
ptr += pmkid_count * PMKID_LEN;
|
||||
}
|
||||
}
|
||||
// Group Mgmt Cipher Suite
|
||||
if ((end_ptr > ptr) && (pmf_mask & PMF_MASK)) {
|
||||
if ((end_ptr >= (ptr + GROUP_MGMT_CIPHER_SUITE_LEN)) &&
|
||||
(pmf_mask & PMF_MASK)) {
|
||||
group_mgmt_cipher_suite_ptr = ptr;
|
||||
}
|
||||
/* Compose new RSNE */
|
||||
|
|
|
@ -611,6 +611,7 @@ extern t_void (*assert_callback)(t_void *pmoal_handle, t_u32 cond);
|
|||
#define MFG_CMD_RF_CHANNELBW 0x1044
|
||||
#define MFG_CMD_RADIO_MODE_CFG 0x1211
|
||||
#define MFG_CMD_CONFIG_MAC_HE_TB_TX 0x110A
|
||||
#define MFG_CMD_CONFIG_TRIGGER_FRAME 0x110C
|
||||
|
||||
/** Debug command number */
|
||||
#define DBG_CMD_NUM 10
|
||||
|
@ -3348,14 +3349,6 @@ mlan_status wlan_adapter_init_cmd(pmlan_adapter pmadapter);
|
|||
mlan_status wlan_radio_ioctl_band_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
mlan_status wlan_cmd_rx_pkt_coalesce_cfg(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf);
|
||||
mlan_status wlan_ret_rx_pkt_coalesce_cfg(pmlan_private pmpriv,
|
||||
const HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
#endif
|
||||
mlan_status wlan_handle_event_multi_chan_info(pmlan_private pmpriv,
|
||||
pmlan_buffer pevent);
|
||||
#ifdef USB
|
||||
|
@ -4088,11 +4081,6 @@ mlan_status wlan_misc_ioctl_txcontrol(pmlan_adapter pmadapter,
|
|||
mlan_status wlan_misc_ioctl_region(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
mlan_status wlan_misc_ioctl_rx_pkt_coalesce_config(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
#endif
|
||||
|
||||
mlan_status wlan_misc_ioctl_multi_chan_config(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
|
|
|
@ -4913,44 +4913,6 @@ mlan_status wlan_misc_ioctl_txcontrol(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
/**
|
||||
* @brief Get/Set RX packet coalescing configuration
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_misc_ioctl_rx_pkt_coalesce_config(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
t_u16 cmd_action = 0;
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
|
||||
ENTER();
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_RX_PKT_COALESCE_CFG,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&misc->param.rx_coalesce);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* @brief Get/Set channel time and buffer weight configuration
|
||||
*
|
||||
|
@ -6967,6 +6929,19 @@ mlan_status wlan_misc_ioctl_rf_test_cfg(pmlan_adapter pmadapter,
|
|||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&(pmisc->param.mfg_tx_frame2));
|
||||
break;
|
||||
case MLAN_OID_MISC_RF_TEST_CONFIG_TRIGGER_FRAME:
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else {
|
||||
PRINTM(MERROR, "Unsupported cmd_action\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_MFG_COMMAND,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&(pmisc->param.mfg_tx_trigger_config));
|
||||
break;
|
||||
|
||||
case MLAN_OID_MISC_RF_TEST_HE_POWER:
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @brief This file contains SDIO specific code
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2021, 2023 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
|
@ -2501,6 +2501,9 @@ void wlan_dump_mp_registers(pmlan_adapter pmadapter)
|
|||
if (new_mode && rx_len)
|
||||
sdio_ireg |= UP_LD_CMD_PORT_HOST_INT_STATUS;
|
||||
|
||||
if (new_mode && pmadapter->cmd_sent)
|
||||
sdio_ireg |= DN_LD_CMD_PORT_HOST_INT_STATUS;
|
||||
|
||||
if (!(pmadapter->pcard_sd->mp_wr_bitmap &
|
||||
pmadapter->pcard_sd->mp_data_port_mask)) {
|
||||
if (mp_wr_bitmap & pmadapter->pcard_sd->mp_data_port_mask)
|
||||
|
@ -3402,7 +3405,7 @@ static mlan_status wlan_pm_sdio_wakeup_card(pmlan_adapter pmadapter,
|
|||
if (timeout) {
|
||||
pmadapter->callbacks.moal_start_timer(
|
||||
pmadapter->pmoal_handle, pmadapter->pwakeup_fw_timer,
|
||||
MFALSE, MRVDRV_TIMER_3S);
|
||||
MFALSE, MRVDRV_TIMER_5S);
|
||||
pmadapter->wakeup_fw_timer_is_set = MTRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -424,6 +424,55 @@ static mlan_status wlan_cmd_mfg_tx_frame(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command of MFG config trigger frame.
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param action The action: GET or SET
|
||||
* @param pdata_buf A pointer to data buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status wlan_cmd_mfg_config_trigger_frame(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 action,
|
||||
t_void *pdata_buf)
|
||||
{
|
||||
mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t *mcmd =
|
||||
(mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t *)&cmd->params
|
||||
.mfg_tx_trigger_config;
|
||||
mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t *cfg =
|
||||
(mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t *)pdata_buf;
|
||||
|
||||
ENTER();
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_MFG_COMMAND);
|
||||
cmd->size = wlan_cpu_to_le16(
|
||||
sizeof(mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t) + S_DS_GEN);
|
||||
mcmd->mfg_cmd = wlan_cpu_to_le32(cfg->mfg_cmd);
|
||||
mcmd->action = wlan_cpu_to_le16(action);
|
||||
if (action == HostCmd_ACT_GEN_SET) {
|
||||
mcmd->enable_tx = wlan_cpu_to_le32(cfg->enable_tx);
|
||||
mcmd->standalone_hetb = wlan_cpu_to_le32(cfg->standalone_hetb);
|
||||
mcmd->frmCtl.type = wlan_cpu_to_le16(cfg->frmCtl.type);
|
||||
mcmd->frmCtl.sub_type = wlan_cpu_to_le16(cfg->frmCtl.sub_type);
|
||||
mcmd->duration = wlan_cpu_to_le16(cfg->duration);
|
||||
|
||||
mcmd->trig_common_field =
|
||||
wlan_cpu_to_le64(cfg->trig_common_field);
|
||||
|
||||
memcpy_ext(pmpriv->adapter, &mcmd->trig_user_info_field,
|
||||
&cfg->trig_user_info_field,
|
||||
sizeof(cfg->trig_user_info_field),
|
||||
sizeof(mcmd->trig_user_info_field));
|
||||
|
||||
mcmd->basic_trig_user_info =
|
||||
wlan_cpu_to_le16(cfg->basic_trig_user_info);
|
||||
}
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command of MFG HE TB Tx.
|
||||
*
|
||||
|
@ -495,6 +544,10 @@ mlan_status wlan_cmd_mfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
case MFG_CMD_CONFIG_MAC_HE_TB_TX:
|
||||
ret = wlan_cmd_mfg_he_tb_tx(pmpriv, cmd, action, pdata_buf);
|
||||
goto cmd_mfg_done;
|
||||
case MFG_CMD_CONFIG_TRIGGER_FRAME:
|
||||
ret = wlan_cmd_mfg_config_trigger_frame(pmpriv, cmd, action,
|
||||
pdata_buf);
|
||||
goto cmd_mfg_done;
|
||||
case MFG_CMD_SET_TEST_MODE:
|
||||
case MFG_CMD_UNSET_TEST_MODE:
|
||||
case MFG_CMD_TX_ANT:
|
||||
|
@ -4012,12 +4065,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_packet_aggr_over_host_interface(
|
||||
pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
case HostCmd_CMD_RX_PKT_COALESCE_CFG:
|
||||
ret = wlan_cmd_rx_pkt_coalesce_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_MULTI_CHAN_CONFIG:
|
||||
ret = wlan_cmd_multi_chan_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
|
|
|
@ -2928,6 +2928,53 @@ static mlan_status wlan_ret_mfg_tx_frame(pmlan_private pmpriv,
|
|||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
/**
|
||||
* @brief This function prepares command resp of MFG config Trigger frame
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||
* @param pioctl_buf A pointer to mlan_ioctl_req structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status wlan_ret_mfg_config_trigger_frame(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t *mcmd =
|
||||
(mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t *)&resp->params
|
||||
.mfg_tx_trigger_config;
|
||||
mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t *cfg = MNULL;
|
||||
|
||||
ENTER();
|
||||
if (!pioctl_buf) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||
cfg = (mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t *)&misc->param
|
||||
.mfg_tx_trigger_config;
|
||||
|
||||
cfg->enable_tx = wlan_le32_to_cpu(mcmd->enable_tx);
|
||||
cfg->standalone_hetb = wlan_le32_to_cpu(mcmd->standalone_hetb);
|
||||
cfg->frmCtl.type = wlan_le16_to_cpu(mcmd->frmCtl.type);
|
||||
cfg->frmCtl.sub_type = wlan_le16_to_cpu(mcmd->frmCtl.sub_type);
|
||||
cfg->duration = wlan_le16_to_cpu(mcmd->duration);
|
||||
|
||||
cfg->trig_common_field = wlan_le64_to_cpu(mcmd->trig_common_field);
|
||||
|
||||
memcpy_ext(pmpriv->adapter, &cfg->trig_user_info_field,
|
||||
&mcmd->trig_user_info_field,
|
||||
sizeof(mcmd->trig_user_info_field),
|
||||
sizeof(cfg->trig_user_info_field));
|
||||
|
||||
cfg->basic_trig_user_info =
|
||||
wlan_le16_to_cpu(mcmd->basic_trig_user_info);
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command resp of MFG HE TB Tx
|
||||
|
@ -2983,6 +3030,9 @@ mlan_status wlan_ret_mfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
(struct mfg_cmd_generic_cfg *)&resp->params.mfg_generic_cfg;
|
||||
struct mfg_cmd_generic_cfg *cfg = MNULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef SD9177
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
if (!pioctl_buf) {
|
||||
|
@ -2999,6 +3049,10 @@ mlan_status wlan_ret_mfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
case MFG_CMD_CONFIG_MAC_HE_TB_TX:
|
||||
ret = wlan_ret_mfg_he_tb_tx(pmpriv, resp, pioctl_buf);
|
||||
goto cmd_mfg_done;
|
||||
case MFG_CMD_CONFIG_TRIGGER_FRAME:
|
||||
ret = wlan_ret_mfg_config_trigger_frame(pmpriv, resp,
|
||||
pioctl_buf);
|
||||
goto cmd_mfg_done;
|
||||
case MFG_CMD_SET_TEST_MODE:
|
||||
case MFG_CMD_UNSET_TEST_MODE:
|
||||
case MFG_CMD_TX_ANT:
|
||||
|
@ -3018,7 +3072,20 @@ mlan_status wlan_ret_mfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
cfg = (struct mfg_cmd_generic_cfg *)&misc->param.mfg_generic_cfg;
|
||||
|
||||
cfg->error = wlan_le32_to_cpu(mcmd->error);
|
||||
|
||||
#ifdef SD9177
|
||||
if (IS_SD9177(pmadapter->card_type) &&
|
||||
(wlan_le32_to_cpu(mcmd->mfg_cmd) == MFG_CMD_RFPWR)) {
|
||||
//! TX_POWER was multipied by 16 while passing to fw
|
||||
//! So It is needed to divide by 16 for user vals understanding.
|
||||
cfg->data1 = (wlan_le32_to_cpu(mcmd->data1) >> 4);
|
||||
} else {
|
||||
#endif
|
||||
cfg->data1 = wlan_le32_to_cpu(mcmd->data1);
|
||||
#ifdef SD9177
|
||||
}
|
||||
#endif
|
||||
|
||||
cfg->data2 = wlan_le32_to_cpu(mcmd->data2);
|
||||
cfg->data3 = wlan_le32_to_cpu(mcmd->data3);
|
||||
cmd_mfg_done:
|
||||
|
@ -3395,11 +3462,6 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
ret = wlan_ret_packet_aggr_over_host_interface(pmpriv, resp,
|
||||
pioctl_buf);
|
||||
break;
|
||||
#endif
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
case HostCmd_CMD_RX_PKT_COALESCE_CFG:
|
||||
ret = wlan_ret_rx_pkt_coalesce_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_MULTI_CHAN_CONFIG:
|
||||
ret = wlan_ret_multi_chan_cfg(pmpriv, resp, pioctl_buf);
|
||||
|
|
|
@ -5173,12 +5173,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_DRCS_CFG:
|
||||
status = wlan_misc_ioctl_drcs_config(pmadapter, pioctl_req);
|
||||
break;
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
case MLAN_OID_MISC_RX_PACKET_COALESCE:
|
||||
status = wlan_misc_ioctl_rx_pkt_coalesce_config(pmadapter,
|
||||
pioctl_req);
|
||||
break;
|
||||
#endif
|
||||
case MLAN_OID_MISC_LOW_PWR_MODE:
|
||||
status = wlan_misc_ioctl_low_pwr_mode(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
@ -5314,6 +5308,7 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
break;
|
||||
case MLAN_OID_MISC_RF_TEST_GENERIC:
|
||||
case MLAN_OID_MISC_RF_TEST_TX_CONT:
|
||||
case MLAN_OID_MISC_RF_TEST_CONFIG_TRIGGER_FRAME:
|
||||
case MLAN_OID_MISC_RF_TEST_TX_FRAME:
|
||||
case MLAN_OID_MISC_RF_TEST_HE_POWER:
|
||||
status = wlan_misc_ioctl_rf_test_cfg(pmadapter, pioctl_req);
|
||||
|
|
|
@ -4806,12 +4806,6 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_DRCS_CONFIG:
|
||||
ret = wlan_cmd_drcs_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
case HostCmd_CMD_RX_PKT_COALESCE_CFG:
|
||||
ret = wlan_cmd_rx_pkt_coalesce_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HOST_CMD_APCMD_OPER_CTRL:
|
||||
ret = wlan_uap_cmd_oper_ctrl(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
|
@ -5248,11 +5242,6 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_DRCS_CONFIG:
|
||||
ret = wlan_ret_drcs_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
case HostCmd_CMD_RX_PKT_COALESCE_CFG:
|
||||
ret = wlan_ret_rx_pkt_coalesce_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCMD_APCMD_ACS_SCAN:
|
||||
ret = wlan_ret_cmd_uap_acs_scan(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
|
|
@ -2206,11 +2206,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
if (misc->sub_command == MLAN_OID_MISC_DRCS_CFG)
|
||||
status = wlan_misc_ioctl_drcs_config(pmadapter,
|
||||
pioctl_req);
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
if (misc->sub_command == MLAN_OID_MISC_RX_PACKET_COALESCE)
|
||||
status = wlan_misc_ioctl_rx_pkt_coalesce_config(
|
||||
pmadapter, pioctl_req);
|
||||
#endif
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
if (misc->sub_command == MLAN_OID_MISC_WIFI_DIRECT_CONFIG)
|
||||
status = wlan_misc_p2p_config(pmadapter, pioctl_req);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define _MLAN_DECL_H_
|
||||
|
||||
/** MLAN release version */
|
||||
#define MLAN_RELEASE_VERSION "368"
|
||||
#define MLAN_RELEASE_VERSION "368.p2"
|
||||
|
||||
/** Re-define generic data types for MLAN/MOAL */
|
||||
/** Signed char (1-byte) */
|
||||
|
|
|
@ -303,9 +303,6 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_LOW_PWR_MODE = 0x00200029,
|
||||
MLAN_OID_MISC_MEF_FLT_CFG = 0x0020002A,
|
||||
MLAN_OID_MISC_DFS_REAPTER_MODE = 0x0020002B,
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C,
|
||||
#endif
|
||||
MLAN_OID_MISC_TDLS_CS_CHANNEL = 0x0020002D,
|
||||
MLAN_OID_MISC_COALESCE_CFG = 0x0020002E,
|
||||
MLAN_OID_MISC_TDLS_IDLE_TIME = 0x0020002F,
|
||||
|
@ -1375,6 +1372,8 @@ enum _mlan_band_def {
|
|||
BAND_AAC = 64,
|
||||
BAND_GAX = 256,
|
||||
BAND_AAX = 512,
|
||||
MLAN_OID_MISC_RF_TEST_CONFIG_TRIGGER_FRAME = 0x0020008C,
|
||||
|
||||
};
|
||||
|
||||
/** Channel bandwidth */
|
||||
|
@ -3415,15 +3414,6 @@ typedef struct _mlan_ds_pm_cfg {
|
|||
} param;
|
||||
} mlan_ds_pm_cfg, *pmlan_ds_pm_cfg;
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
typedef struct {
|
||||
mlan_cmd_result_e cmd_result; /**< Firmware execution result */
|
||||
|
||||
t_u32 pkt_threshold; /** Packet threshold */
|
||||
t_u16 delay; /** Timeout value in milliseconds */
|
||||
} wlan_ioctl_rx_pkt_coalesce_config_t;
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------*/
|
||||
/** WMM Configuration Group */
|
||||
/*-----------------------------------------------------------------*/
|
||||
|
@ -5207,15 +5197,6 @@ typedef struct _mlan_ds_misc_tdls_ies {
|
|||
t_u8 regulatory_class[IEEE_MAX_IE_SIZE];
|
||||
} mlan_ds_misc_tdls_ies;
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
typedef struct _mlan_ds_misc_rx_packet_coalesce {
|
||||
/** packet threshold */
|
||||
t_u32 packet_threshold;
|
||||
/** timeout value */
|
||||
t_u16 delay;
|
||||
} mlan_ds_misc_rx_packet_coalesce;
|
||||
#endif
|
||||
|
||||
typedef struct _mlan_ds_misc_dfs_repeater {
|
||||
/** Set or Get */
|
||||
t_u16 action;
|
||||
|
@ -5555,6 +5536,7 @@ typedef struct _mlan_ds_misc_chan_trpc_cfg {
|
|||
#define MFG_CMD_RF_CHANNELBW 0x1044
|
||||
#define MFG_CMD_RADIO_MODE_CFG 0x1211
|
||||
#define MFG_CMD_CONFIG_MAC_HE_TB_TX 0x110A
|
||||
#define MFG_CMD_CONFIG_TRIGGER_FRAME 0x110C
|
||||
/** MFG CMD generic cfg */
|
||||
struct MLAN_PACK_START mfg_cmd_generic_cfg {
|
||||
/** MFG command code */
|
||||
|
@ -5677,6 +5659,178 @@ struct MLAN_PACK_START mfg_Cmd_HE_TBTx_t {
|
|||
t_s16 tx_power;
|
||||
} MLAN_PACK_END;
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_HETrigComInfo_t {
|
||||
t_u64 reserved : 1;
|
||||
t_u64 he_sig2 : 9;
|
||||
t_u64 doppler : 1;
|
||||
t_u64 spatial_reuse : 16;
|
||||
t_u64 pe_disambig : 1;
|
||||
t_u64 pre_fec_pad_fct : 2;
|
||||
t_u64 ap_tx_pwr : 6;
|
||||
|
||||
t_u64 ldpc_ess : 1;
|
||||
t_u64 ul_stbc : 1;
|
||||
t_u64 ltf_symbol : 3;
|
||||
t_u64 ltf_mode : 1;
|
||||
t_u64 ltf_type : 2;
|
||||
|
||||
t_u64 ul_bw : 2;
|
||||
t_u64 cs_required : 1;
|
||||
t_u64 more_tf : 1;
|
||||
t_u64 ul_len : 12;
|
||||
t_u64 trigger_type : 4;
|
||||
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_HETrigComInfo_t;
|
||||
#else
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_HETrigComInfo_t {
|
||||
t_u64 trigger_type : 4;
|
||||
t_u64 ul_len : 12;
|
||||
t_u64 more_tf : 1;
|
||||
t_u64 cs_required : 1;
|
||||
t_u64 ul_bw : 2;
|
||||
|
||||
t_u64 ltf_type : 2;
|
||||
t_u64 ltf_mode : 1;
|
||||
t_u64 ltf_symbol : 3;
|
||||
t_u64 ul_stbc : 1;
|
||||
t_u64 ldpc_ess : 1;
|
||||
|
||||
t_u64 ap_tx_pwr : 6;
|
||||
t_u64 pre_fec_pad_fct : 2;
|
||||
t_u64 pe_disambig : 1;
|
||||
t_u64 spatial_reuse : 16;
|
||||
t_u64 doppler : 1;
|
||||
t_u64 he_sig2 : 9;
|
||||
t_u64 reserved : 1;
|
||||
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_HETrigComInfo_t;
|
||||
#endif
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_HETrigUserInfo_t {
|
||||
t_u8 reserved : 1;
|
||||
t_u8 ul_target_rssi : 7;
|
||||
t_u32 ss_alloc : 6;
|
||||
t_u32 ul_dcm : 1;
|
||||
t_u32 ul_mcs : 4;
|
||||
t_u32 ul_coding_type : 1;
|
||||
t_u32 ru_alloc : 7;
|
||||
t_u32 ru_alloc_reg : 1;
|
||||
t_u32 aid12 : 12;
|
||||
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_HETrigUserInfo_t;
|
||||
#else
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_HETrigUserInfo_t {
|
||||
t_u32 aid12 : 12;
|
||||
t_u32 ru_alloc_reg : 1;
|
||||
t_u32 ru_alloc : 7;
|
||||
t_u32 ul_coding_type : 1;
|
||||
t_u32 ul_mcs : 4;
|
||||
t_u32 ul_dcm : 1;
|
||||
t_u32 ss_alloc : 6;
|
||||
t_u8 ul_target_rssi : 7;
|
||||
t_u8 reserved : 1;
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_HETrigUserInfo_t;
|
||||
#endif
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEETypes_BasicHETrigUserInfo_t {
|
||||
t_u8 pref_ac : 2;
|
||||
t_u8 ac_pl : 1;
|
||||
t_u8 tid_al : 3;
|
||||
t_u8 mpdu_mu_sf : 2;
|
||||
} MLAN_PACK_END mfg_cmd_IEEETypes_BasicHETrigUserInfo_t;
|
||||
#else
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEETypes_BasicHETrigUserInfo_t {
|
||||
t_u8 mpdu_mu_sf : 2;
|
||||
t_u8 tid_al : 3;
|
||||
t_u8 ac_pl : 1;
|
||||
t_u8 pref_ac : 2;
|
||||
} MLAN_PACK_END mfg_cmd_IEEETypes_BasicHETrigUserInfo_t;
|
||||
#endif
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_FrameCtrl_t {
|
||||
/** Order */
|
||||
t_u8 order : 1;
|
||||
/** Wep */
|
||||
t_u8 wep : 1;
|
||||
/** More Data */
|
||||
t_u8 more_data : 1;
|
||||
/** Power Mgmt */
|
||||
t_u8 pwr_mgmt : 1;
|
||||
/** Retry */
|
||||
t_u8 retry : 1;
|
||||
/** More Frag */
|
||||
t_u8 more_frag : 1;
|
||||
/** From DS */
|
||||
t_u8 from_ds : 1;
|
||||
/** To DS */
|
||||
t_u8 to_ds : 1;
|
||||
/** Sub Type */
|
||||
t_u8 sub_type : 4;
|
||||
/** Type */
|
||||
t_u8 type : 2;
|
||||
/** Protocol Version */
|
||||
t_u8 protocol_version : 2;
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_FrameCtrl_t;
|
||||
#else
|
||||
typedef MLAN_PACK_START struct _mfg_cmd_IEEEtypes_FrameCtrl_t {
|
||||
/** Protocol Version */
|
||||
t_u8 protocol_version : 2;
|
||||
/** Type */
|
||||
t_u8 type : 2;
|
||||
/** Sub Type */
|
||||
t_u8 sub_type : 4;
|
||||
/** To DS */
|
||||
t_u8 to_ds : 1;
|
||||
/** From DS */
|
||||
t_u8 from_ds : 1;
|
||||
/** More Frag */
|
||||
t_u8 more_frag : 1;
|
||||
/** Retry */
|
||||
t_u8 retry : 1;
|
||||
/** Power Mgmt */
|
||||
t_u8 pwr_mgmt : 1;
|
||||
/** More Data */
|
||||
t_u8 more_data : 1;
|
||||
/** Wep */
|
||||
t_u8 wep : 1;
|
||||
/** Order */
|
||||
t_u8 order : 1;
|
||||
} MLAN_PACK_END mfg_cmd_IEEEtypes_FrameCtrl_t;
|
||||
#endif
|
||||
|
||||
typedef MLAN_PACK_START struct _mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t {
|
||||
/** MFG command code */
|
||||
t_u32 mfg_cmd;
|
||||
/** Action */
|
||||
t_u16 action;
|
||||
/** Device ID */
|
||||
t_u16 device_id;
|
||||
/** MFG Error code */
|
||||
t_u32 error;
|
||||
/** enable Tx*/
|
||||
t_u32 enable_tx;
|
||||
/** enable Stand Alone HE TB */
|
||||
t_u32 standalone_hetb;
|
||||
/** Frame Control */
|
||||
mfg_cmd_IEEEtypes_FrameCtrl_t frmCtl;
|
||||
/** Duration */
|
||||
t_u16 duration;
|
||||
/** Destination MAC Address */
|
||||
t_u8 dest_addr[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Source MAC Address */
|
||||
t_u8 src_addr[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Common Info Field **/
|
||||
mfg_cmd_IEEEtypes_HETrigComInfo_t trig_common_field;
|
||||
/** User Info Field **/
|
||||
mfg_cmd_IEEEtypes_HETrigUserInfo_t trig_user_info_field;
|
||||
/** Trigger Dependent User Info Field **/
|
||||
mfg_cmd_IEEETypes_BasicHETrigUserInfo_t basic_trig_user_info;
|
||||
} MLAN_PACK_END mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t;
|
||||
|
||||
typedef struct _mlan_ds_misc_chnrgpwr_cfg {
|
||||
/** length */
|
||||
t_u16 length;
|
||||
|
@ -5835,9 +5989,6 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
/** MEF-FLT-CONFIG for MLAN_OID_MISC_NV_FLT_CFG */
|
||||
mlan_ds_misc_mef_flt_cfg mef_flt_cfg;
|
||||
mlan_ds_misc_dfs_repeater dfs_repeater;
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
mlan_ds_misc_rx_packet_coalesce rx_coalesce;
|
||||
#endif
|
||||
/** FW reload flag */
|
||||
t_u8 fw_reload;
|
||||
mlan_ds_sensor_temp sensor_temp;
|
||||
|
@ -5878,6 +6029,7 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
struct mfg_cmd_tx_cont mfg_tx_cont;
|
||||
struct mfg_cmd_tx_frame2 mfg_tx_frame2;
|
||||
struct mfg_Cmd_HE_TBTx_t mfg_he_power;
|
||||
mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t mfg_tx_trigger_config;
|
||||
mlan_ds_misc_arb_cfg arb_cfg;
|
||||
mlan_ds_misc_cfp_tbl cfp;
|
||||
t_u8 range_ext_mode;
|
||||
|
|
|
@ -798,14 +798,12 @@ int woal_cfg80211_init_p2p_client(moal_private *priv)
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (bss_role != MLAN_BSS_ROLE_STA) {
|
||||
bss_role = MLAN_BSS_ROLE_STA;
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role)) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
wifi_direct_mode = WIFI_DIRECT_MODE_DISABLE;
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
|
@ -888,14 +886,12 @@ int woal_cfg80211_init_p2p_go(moal_private *priv)
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (bss_role != MLAN_BSS_ROLE_UAP) {
|
||||
bss_role = MLAN_BSS_ROLE_UAP;
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role)) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
/* NoA:-- Interval = 100TUs and Duration= 50TUs, count=255*/
|
||||
#define DEF_NOA_COUNT 255
|
||||
if (priv->phandle->noa_duration && priv->phandle->card_info->go_noa) {
|
||||
|
|
|
@ -119,7 +119,7 @@ extern const struct net_device_ops woal_netdev_ops;
|
|||
#endif
|
||||
|
||||
/********************************************************
|
||||
Local Functions
|
||||
Global Functions
|
||||
********************************************************/
|
||||
/**
|
||||
* @brief Parse a string to extract numerical arguments
|
||||
|
@ -131,7 +131,7 @@ extern const struct net_device_ops woal_netdev_ops;
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status parse_arguments(t_u8 *pos, int *data, int datalen,
|
||||
mlan_status parse_arguments(t_u8 *pos, int *data, int datalen,
|
||||
int *user_data_len)
|
||||
{
|
||||
int i, j, k;
|
||||
|
@ -181,6 +181,10 @@ static mlan_status parse_arguments(t_u8 *pos, int *data, int datalen,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Local Functions
|
||||
********************************************************/
|
||||
|
||||
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||
/**
|
||||
* @brief Set wps & p2p ie in AP mode
|
||||
|
@ -8509,87 +8513,6 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
/**
|
||||
* @brief Set/Get RX packet coalesceing setting
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param respbuf A pointer to response buffer
|
||||
* @param respbuflen Available length of response buffer
|
||||
*
|
||||
* @return Number of bytes written, negative for failure.
|
||||
*/
|
||||
static int woal_priv_rx_pkt_coalesce_cfg(moal_private *priv, t_u8 *respbuf,
|
||||
t_u32 respbuflen)
|
||||
{
|
||||
int ret = 0;
|
||||
t_u32 data[2];
|
||||
int user_data_len = 0, header_len = 0;
|
||||
mlan_ds_misc_cfg *cfg = NULL;
|
||||
t_u8 *data_ptr;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
data_ptr = respbuf + strlen(CMD_NXP) + strlen(PRIV_CMD_RX_COAL_CFG);
|
||||
header_len = strlen(CMD_NXP) + strlen(PRIV_CMD_RX_COAL_CFG);
|
||||
if ((int)strlen(respbuf) == header_len) {
|
||||
/* GET operation */
|
||||
user_data_len = 0;
|
||||
} else {
|
||||
/* SET operation */
|
||||
parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data),
|
||||
&user_data_len);
|
||||
}
|
||||
|
||||
if (sizeof(int) * user_data_len > sizeof(data)) {
|
||||
PRINTM(MERROR, "Too many arguments\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if ((user_data_len != 0) && (user_data_len != 2)) {
|
||||
PRINTM(MERROR, "Invalid arguments\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (req == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
|
||||
cfg = (mlan_ds_misc_cfg *)req->pbuf;
|
||||
cfg->sub_command = MLAN_OID_MISC_RX_PACKET_COALESCE;
|
||||
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
|
||||
if (user_data_len == 0) {
|
||||
req->action = MLAN_ACT_GET;
|
||||
} else {
|
||||
req->action = MLAN_ACT_SET;
|
||||
cfg->param.rx_coalesce.packet_threshold = data[0];
|
||||
cfg->param.rx_coalesce.delay = data[1];
|
||||
}
|
||||
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
moal_memcpy_ext(
|
||||
priv->phandle, respbuf,
|
||||
(mlan_ds_misc_rx_packet_coalesce *)&cfg->param.rx_coalesce,
|
||||
req->buf_len, respbuflen);
|
||||
ret = req->buf_len;
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* @brief Set/Get FW side mac address
|
||||
*
|
||||
|
@ -19547,14 +19470,6 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
|
|||
len = woal_priv_hotspotcfg(priv, buf,
|
||||
priv_cmd.total_len);
|
||||
goto handled;
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_RX_COAL_CFG,
|
||||
strlen(PRIV_CMD_RX_COAL_CFG)) == 0) {
|
||||
/* RX packet coalescing Configuration */
|
||||
len = woal_priv_rx_pkt_coalesce_cfg(priv, buf,
|
||||
priv_cmd.total_len);
|
||||
goto handled;
|
||||
#endif
|
||||
|
||||
} else if (strnicmp(buf + strlen(CMD_NXP),
|
||||
PRIV_CMD_MGMT_FRAME_CTRL,
|
||||
|
|
|
@ -235,9 +235,6 @@ typedef struct _chan_stats {
|
|||
#ifdef SDIO
|
||||
#define PRIV_CMD_SD_CMD53_RW "sdcmd53rw"
|
||||
#endif
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
#define PRIV_CMD_RX_COAL_CFG "rxpktcoal_cfg"
|
||||
#endif
|
||||
#define PRIV_CMD_MULTI_CHAN_CFG "mc_cfg"
|
||||
#define PRIV_CMD_MULTI_CHAN_POLICY "mc_policy"
|
||||
#define PRIV_CMD_DRCS_CFG "mc_cfg_ext"
|
||||
|
|
|
@ -7791,6 +7791,7 @@ void woal_ioctl_get_misc_conf(moal_private *priv, mlan_ds_misc_cfg *info)
|
|||
#define TX_PWR_STR_LEN 20
|
||||
#define TX_CONT_STR_LEN 50
|
||||
#define TX_FRAME_STR_LEN 200
|
||||
#define TRIGGER_FRAME_STR_LEN 250
|
||||
#define HE_TB_TX_STR_LEN 30
|
||||
|
||||
/*
|
||||
|
@ -8023,6 +8024,209 @@ done:
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
* @brief Parse mfg cmd trigger string
|
||||
*
|
||||
* @param s A pointer to user buffer
|
||||
* @param len Length of user buffer
|
||||
* @param d A pointer to mfg_cmd_tx_frame2 struct
|
||||
* @return 0 on success, -EINVAL otherwise
|
||||
*/
|
||||
static int parse_trigger_frame_string(const char *s, size_t len,
|
||||
mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t *d)
|
||||
{
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
char *string = NULL;
|
||||
char *tmp = NULL;
|
||||
char *pos = NULL;
|
||||
gfp_t flag;
|
||||
|
||||
ENTER();
|
||||
if (!s || !d) {
|
||||
LEAVE();
|
||||
return -EINVAL;
|
||||
}
|
||||
flag = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL;
|
||||
string = kzalloc(TRIGGER_FRAME_STR_LEN, flag);
|
||||
if (string == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
moal_memcpy_ext(NULL, string, s + strlen("trigger_frame="),
|
||||
len - strlen("trigger_frame="),
|
||||
TRIGGER_FRAME_STR_LEN - 1);
|
||||
|
||||
tmp = string;
|
||||
string = strstrip(string);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->enable_tx = (t_u32)woal_string_to_number(pos);
|
||||
|
||||
if (d->enable_tx == MFALSE)
|
||||
goto done;
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->standalone_hetb = (t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->frmCtl.type = (t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->frmCtl.sub_type = (t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->duration = (t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.trigger_type =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.ul_len = (t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.more_tf =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.cs_required =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.ul_bw = (t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.ltf_type =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.ltf_mode =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.ltf_symbol =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.ul_stbc =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.ldpc_ess =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.ap_tx_pwr =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.pre_fec_pad_fct =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.pe_disambig =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.spatial_reuse =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.doppler =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_common_field.he_sig2 =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_user_info_field.aid12 =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_user_info_field.ru_alloc_reg =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_user_info_field.ru_alloc =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_user_info_field.ul_coding_type =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_user_info_field.ul_mcs =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_user_info_field.ul_dcm =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_user_info_field.ss_alloc =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->trig_user_info_field.ul_target_rssi =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->basic_trig_user_info.mpdu_mu_sf =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->basic_trig_user_info.tid_al =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->basic_trig_user_info.ac_pl =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos)
|
||||
d->basic_trig_user_info.pref_ac =
|
||||
(t_u32)woal_string_to_number(pos);
|
||||
|
||||
if (d->enable_tx > 1)
|
||||
ret = -EINVAL;
|
||||
|
||||
done:
|
||||
kfree(tmp);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief Parse mfg cmd tx frame string
|
||||
|
@ -8143,10 +8347,12 @@ static int parse_tx_frame_string(const char *s, size_t len,
|
|||
|
||||
pos = strsep(&string, " \t");
|
||||
if (pos) {
|
||||
char *begin, *end;
|
||||
begin = pos;
|
||||
for (i = 0; i < ETH_ALEN; i++) {
|
||||
pos = strsep(&string, ":");
|
||||
if (pos)
|
||||
d->bssid[i] = woal_atox(pos);
|
||||
end = woal_strsep(&begin, ':', '/');
|
||||
if (end)
|
||||
d->bssid[i] = woal_atox(end);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8373,6 +8579,12 @@ mlan_status woal_process_rf_test_mode_cmd(moal_handle *handle, t_u32 cmd,
|
|||
&misc->param.mfg_he_power))
|
||||
err = MTRUE;
|
||||
break;
|
||||
case MFG_CMD_CONFIG_TRIGGER_FRAME:
|
||||
misc->sub_command = MLAN_OID_MISC_RF_TEST_CONFIG_TRIGGER_FRAME;
|
||||
if (parse_trigger_frame_string(
|
||||
buffer, len, &misc->param.mfg_tx_trigger_config))
|
||||
err = MTRUE;
|
||||
break;
|
||||
default:
|
||||
err = MTRUE;
|
||||
}
|
||||
|
@ -8503,6 +8715,24 @@ mlan_status woal_process_rf_test_mode_cmd(moal_handle *handle, t_u32 cmd,
|
|||
handle->rf_data->he_tb_tx_power[0] =
|
||||
misc->param.mfg_he_power.tx_power;
|
||||
break;
|
||||
case MFG_CMD_CONFIG_TRIGGER_FRAME:
|
||||
handle->rf_data->mfg_tx_trigger_config.enable_tx =
|
||||
misc->param.mfg_tx_trigger_config.enable_tx;
|
||||
handle->rf_data->mfg_tx_trigger_config.standalone_hetb =
|
||||
misc->param.mfg_tx_trigger_config.standalone_hetb;
|
||||
handle->rf_data->mfg_tx_trigger_config.frmCtl.type =
|
||||
misc->param.mfg_tx_trigger_config.frmCtl.type;
|
||||
handle->rf_data->mfg_tx_trigger_config.frmCtl.sub_type =
|
||||
misc->param.mfg_tx_trigger_config.frmCtl.sub_type;
|
||||
handle->rf_data->mfg_tx_trigger_config.duration =
|
||||
misc->param.mfg_tx_trigger_config.duration;
|
||||
handle->rf_data->mfg_tx_trigger_config.trig_common_field =
|
||||
misc->param.mfg_tx_trigger_config.trig_common_field;
|
||||
handle->rf_data->mfg_tx_trigger_config.trig_user_info_field =
|
||||
misc->param.mfg_tx_trigger_config.trig_user_info_field;
|
||||
handle->rf_data->mfg_tx_trigger_config.basic_trig_user_info =
|
||||
misc->param.mfg_tx_trigger_config.basic_trig_user_info;
|
||||
break;
|
||||
}
|
||||
done:
|
||||
if (err || ret != MLAN_STATUS_PENDING)
|
||||
|
|
|
@ -916,6 +916,91 @@ void woal_send_fw_dump_complete_event(moal_private *priv)
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function clean up adapter
|
||||
*
|
||||
* @param handle Pointer to structure moal_handle
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void woal_clean_up(moal_handle *handle)
|
||||
{
|
||||
int i;
|
||||
moal_private *priv;
|
||||
int cfg80211_wext = 0;
|
||||
cfg80211_wext = handle->params.cfg80211_wext;
|
||||
#ifdef STA_CFG80211
|
||||
if (IS_STA_CFG80211(cfg80211_wext) && handle->scan_request &&
|
||||
handle->scan_priv) {
|
||||
moal_private *scan_priv = handle->scan_priv;
|
||||
/** some supplicant can not handle SCAN abort event */
|
||||
if (scan_priv->bss_type == MLAN_BSS_TYPE_STA)
|
||||
woal_cfg80211_scan_done(handle->scan_request, MTRUE);
|
||||
else
|
||||
woal_cfg80211_scan_done(handle->scan_request, MFALSE);
|
||||
handle->scan_request = NULL;
|
||||
handle->scan_priv = NULL;
|
||||
cancel_delayed_work_sync(&handle->scan_timeout_work);
|
||||
handle->scan_pending_on_block = MFALSE;
|
||||
MOAL_REL_SEMAPHORE(&handle->async_sem);
|
||||
}
|
||||
#endif
|
||||
for (i = 0; i < handle->priv_num; i++) {
|
||||
if (handle->priv[i]) {
|
||||
priv = handle->priv[i];
|
||||
woal_stop_queue(priv->netdev);
|
||||
if (netif_carrier_ok(priv->netdev))
|
||||
netif_carrier_off(priv->netdev);
|
||||
priv->media_connected = MFALSE;
|
||||
// disconnect
|
||||
moal_connection_status_check_pmqos(priv->phandle);
|
||||
#ifdef STA_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
|
||||
if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev &&
|
||||
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
|
||||
priv->wdev->connected) {
|
||||
#else
|
||||
priv->wdev->current_bss) {
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
if (priv->host_mlme)
|
||||
woal_host_mlme_disconnect(
|
||||
priv,
|
||||
MLAN_REASON_DEAUTH_LEAVING,
|
||||
NULL);
|
||||
else
|
||||
#endif
|
||||
cfg80211_disconnected(priv->netdev, 0,
|
||||
NULL, 0,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
true,
|
||||
#endif
|
||||
GFP_KERNEL);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
// stop bgscan
|
||||
#ifdef STA_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
|
||||
if (IS_STA_CFG80211(cfg80211_wext) &&
|
||||
priv->sched_scanning) {
|
||||
priv->bg_scan_start = MFALSE;
|
||||
priv->bg_scan_reported = MFALSE;
|
||||
cfg80211_sched_scan_stopped(priv->wdev->wiphy
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
,
|
||||
priv->bg_scan_reqid
|
||||
#endif
|
||||
);
|
||||
priv->sched_scanning = MFALSE;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function process FW hang
|
||||
*
|
||||
|
@ -1972,7 +2057,7 @@ mlan_status woal_init_sw(moal_handle *handle)
|
|||
|
||||
handle->is_suspended = MFALSE;
|
||||
handle->hs_activated = MFALSE;
|
||||
handle->hs_auto_arp = MTRUE;
|
||||
handle->hs_auto_arp = MFALSE;
|
||||
handle->suspend_fail = MFALSE;
|
||||
handle->hs_skip_count = 0;
|
||||
handle->hs_force_count = 0;
|
||||
|
@ -11377,7 +11462,6 @@ done:
|
|||
*/
|
||||
static void woal_pre_reset(moal_handle *handle)
|
||||
{
|
||||
int intf_num;
|
||||
t_u8 driver_status = handle->driver_status;
|
||||
t_u8 i;
|
||||
moal_private *priv = woal_get_priv(handle, MLAN_BSS_ROLE_STA);
|
||||
|
@ -11415,14 +11499,7 @@ static void woal_pre_reset(moal_handle *handle)
|
|||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** detach network interface */
|
||||
for (intf_num = 0; intf_num < handle->priv_num; intf_num++) {
|
||||
if (handle->priv[intf_num]) {
|
||||
woal_stop_queue(handle->priv[intf_num]->netdev);
|
||||
netif_device_detach(handle->priv[intf_num]->netdev);
|
||||
}
|
||||
}
|
||||
woal_clean_up(handle);
|
||||
/** mask host interrupt from firmware */
|
||||
mlan_disable_host_int(handle->pmlan_adapter);
|
||||
/** cancel all pending commands */
|
||||
|
@ -11883,6 +11960,7 @@ static void woal_cleanup_module(void)
|
|||
handle = m_handle[index];
|
||||
if (!handle)
|
||||
continue;
|
||||
handle->params.auto_fw_reload = MFALSE;
|
||||
if (!handle->priv_num)
|
||||
goto exit;
|
||||
if (MTRUE == woal_check_driver_status(handle))
|
||||
|
|
|
@ -1339,6 +1339,8 @@ struct rf_test_mode_data {
|
|||
t_s32 he_tb_tx_power[1];
|
||||
/* BSSID */
|
||||
t_u8 bssid[ETH_ALEN];
|
||||
/* Trigger frame config values */
|
||||
mfg_Cmd_IEEEtypes_CtlBasicTrigHdr_t mfg_tx_trigger_config;
|
||||
};
|
||||
|
||||
/** Number of samples in histogram (/proc/mwlan/adapterX/mlan0/histogram).*/
|
||||
|
@ -3759,6 +3761,7 @@ void woal_fill_mlan_buffer(moal_private *priv, mlan_buffer *pmbuf,
|
|||
struct sk_buff *skb);
|
||||
moal_private *woal_add_interface(moal_handle *handle, t_u8 bss_num,
|
||||
t_u8 bss_type);
|
||||
void woal_clean_up(moal_handle *handle);
|
||||
void woal_remove_interface(moal_handle *handle, t_u8 bss_index);
|
||||
void woal_set_multicast_list(struct net_device *dev);
|
||||
mlan_status woal_request_fw(moal_handle *handle);
|
||||
|
@ -3848,10 +3851,6 @@ mlan_status woal_mc_policy_cfg(moal_private *priv, t_u16 *enable,
|
|||
void woal_check_mc_connection(moal_private *priv, t_u8 wait_option,
|
||||
t_u8 new_channel);
|
||||
#endif
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
mlan_status woal_rx_pkt_coalesce_cfg(moal_private *priv, t_u16 *enable,
|
||||
t_u8 wait_option, t_u8 action);
|
||||
#endif
|
||||
mlan_status woal_set_low_pwr_mode(moal_handle *handle, t_u8 wait_option);
|
||||
mlan_status woal_set_chan_track_mode(moal_handle *handle, t_u8 wait_option);
|
||||
int woal_hexval(char chr);
|
||||
|
|
|
@ -288,6 +288,7 @@ static mlan_status woal_do_flr(moal_handle *handle, bool prepare, bool flr_flag)
|
|||
/* Reset all interfaces */
|
||||
priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY);
|
||||
woal_reset_intf(priv, MOAL_IOCTL_WAIT, MTRUE);
|
||||
woal_clean_up(handle);
|
||||
|
||||
/* Shutdown firmware */
|
||||
handle->init_wait_q_woken = MFALSE;
|
||||
|
@ -322,7 +323,6 @@ static mlan_status woal_do_flr(moal_handle *handle, bool prepare, bool flr_flag)
|
|||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Remove interface */
|
||||
for (i = 0; i < handle->priv_num; i++)
|
||||
woal_remove_interface(handle, i);
|
||||
|
|
|
@ -29,6 +29,10 @@ Change log:
|
|||
#ifdef UAP_SUPPORT
|
||||
#include "moal_uap.h"
|
||||
#endif
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
#include "moal_cfg80211.h"
|
||||
#include "moal_cfg80211_util.h"
|
||||
#endif
|
||||
#ifdef SDIO
|
||||
#include "moal_sdio.h"
|
||||
#endif
|
||||
|
@ -60,6 +64,9 @@ static char *szModes[] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
mlan_status parse_arguments(t_u8 *pos, int *data, int datalen,
|
||||
int *user_data_len);
|
||||
|
||||
/********************************************************
|
||||
Global Variables
|
||||
********************************************************/
|
||||
|
@ -448,6 +455,133 @@ static int parse_cmd52_string(const char *buffer, size_t len, int *func,
|
|||
}
|
||||
#endif
|
||||
|
||||
void woal_priv_get_tx_rx_ant(struct seq_file *sfp, moal_private *priv)
|
||||
{
|
||||
int ret = 0;
|
||||
int data[4] = {0};
|
||||
mlan_ds_radio_cfg *radio = NULL;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (sfp == NULL) {
|
||||
PRINTM(MERROR, "Sequence file pointer null\n");
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg));
|
||||
if (req == NULL) {
|
||||
PRINTM(MERROR, "Memory allocation failure \n");
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
radio = (mlan_ds_radio_cfg *)req->pbuf;
|
||||
radio->sub_command = MLAN_OID_ANT_CFG;
|
||||
req->req_id = MLAN_IOCTL_RADIO_CFG;
|
||||
req->action = MLAN_ACT_GET;
|
||||
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status == MLAN_STATUS_FAILURE) {
|
||||
PRINTM(MERROR, "Failed to send IOCTL request to firmware\n");
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
if (priv->phandle->feature_control & FEATURE_CTRL_STREAM_2X2) {
|
||||
data[0] = radio->param.ant_cfg.tx_antenna;
|
||||
data[1] = radio->param.ant_cfg.rx_antenna;
|
||||
if (data[0] && data[1])
|
||||
ret = sizeof(int) * 2;
|
||||
else
|
||||
ret = sizeof(int) * 1;
|
||||
if (ret == sizeof(int) * 1)
|
||||
seq_printf(sfp, "antcfg=0x%x\n", data[0]);
|
||||
else if (ret == sizeof(int) * 2)
|
||||
seq_printf(sfp, "antcfg=0x%x 0x%x\n", data[0], data[1]);
|
||||
|
||||
} else {
|
||||
if (radio->param.ant_cfg_1x1.antenna == 0xffff) {
|
||||
seq_printf(
|
||||
sfp, "antcfg=0x%x %d %d\n",
|
||||
(int)radio->param.ant_cfg_1x1.antenna,
|
||||
(int)radio->param.ant_cfg_1x1.evaluate_time,
|
||||
(int)radio->param.ant_cfg_1x1.current_antenna);
|
||||
} else {
|
||||
seq_printf(sfp, "antcfg=0x%x\n",
|
||||
(int)radio->param.ant_cfg_1x1.antenna);
|
||||
}
|
||||
}
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
mlan_status woal_priv_set_tx_rx_ant(moal_handle *handle, char *line)
|
||||
{
|
||||
moal_private *priv = NULL;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_radio_cfg *radio = NULL;
|
||||
mlan_status status;
|
||||
int data[5] = {0};
|
||||
int user_data_len = 0;
|
||||
|
||||
ENTER();
|
||||
memset((char *)data, 0, sizeof(data));
|
||||
parse_arguments(line, data, ARRAY_SIZE(data), &user_data_len);
|
||||
|
||||
if (user_data_len > 2) {
|
||||
PRINTM(MERROR, "Invalid number of args!\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY);
|
||||
if (!priv) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
/* Allocate an IOCTL request buffer */
|
||||
req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(
|
||||
sizeof(mlan_ds_radio_cfg));
|
||||
if (req == NULL) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
/* Fill request buffer */
|
||||
radio = (mlan_ds_radio_cfg *)req->pbuf;
|
||||
radio->sub_command = MLAN_OID_ANT_CFG;
|
||||
req->req_id = MLAN_IOCTL_RADIO_CFG;
|
||||
req->action = MLAN_ACT_SET;
|
||||
|
||||
if (handle->feature_control & FEATURE_CTRL_STREAM_2X2) {
|
||||
radio->param.ant_cfg.tx_antenna = data[0];
|
||||
radio->param.ant_cfg.rx_antenna = data[0];
|
||||
if (user_data_len == 2)
|
||||
radio->param.ant_cfg.rx_antenna = data[1];
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
if (IS_CARD9098(priv->phandle->card_type) ||
|
||||
IS_CARD9097(priv->phandle->card_type)) {
|
||||
woal_cfg80211_notify_antcfg(priv, priv->phandle->wiphy,
|
||||
radio);
|
||||
}
|
||||
#endif
|
||||
} else
|
||||
radio->param.ant_cfg_1x1.antenna = data[0];
|
||||
if (user_data_len == 2)
|
||||
radio->param.ant_cfg_1x1.evaluate_time = data[1];
|
||||
/* Send IOCTL request to MLAN */
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief config proc write function
|
||||
*
|
||||
|
@ -659,7 +793,9 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
|||
if (!strncmp(databuf, "he_tb_tx=", strlen("he_tb_tx=")) &&
|
||||
count > strlen("he_tb_tx="))
|
||||
cmd = MFG_CMD_CONFIG_MAC_HE_TB_TX;
|
||||
|
||||
if (!strncmp(databuf, "trigger_frame=", strlen("trigger_frame=")) &&
|
||||
count > strlen("trigger_frame="))
|
||||
cmd = MFG_CMD_CONFIG_TRIGGER_FRAME;
|
||||
if (cmd && handle->rf_test_mode &&
|
||||
(woal_process_rf_test_mode_cmd(
|
||||
handle, cmd, (const char *)databuf, (size_t)count,
|
||||
|
@ -668,6 +804,14 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
|||
}
|
||||
if (cmd && !handle->rf_test_mode)
|
||||
PRINTM(MERROR, "RF test mode is disabled\n");
|
||||
|
||||
if (!strncmp(databuf, "antcfg", strlen("antcfg"))) {
|
||||
line += strlen("antcfg") + 1;
|
||||
if (woal_priv_set_tx_rx_ant(handle, line) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
PRINTM(MERROR, "Could not set Antenna Diversity!!\n");
|
||||
}
|
||||
|
||||
MODULE_PUT;
|
||||
LEAVE();
|
||||
return (int)count;
|
||||
|
@ -791,7 +935,113 @@ static int woal_config_read(struct seq_file *sfp, void *data)
|
|||
handle->rf_data->he_tb_tx_power[0]);
|
||||
}
|
||||
seq_printf(sfp, "\n");
|
||||
seq_printf(sfp, "trigger_frame=%u",
|
||||
handle->rf_data->mfg_tx_trigger_config.enable_tx);
|
||||
if (handle->rf_data->mfg_tx_trigger_config.enable_tx == MTRUE) {
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.standalone_hetb);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config.frmCtl
|
||||
.type);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config.frmCtl
|
||||
.sub_type);
|
||||
seq_printf(
|
||||
sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config.duration);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.trigger_type);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.ul_len);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.more_tf);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.cs_required);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.ul_bw);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.ltf_type);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.ltf_mode);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.ltf_symbol);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.ul_stbc);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.ldpc_ess);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.ap_tx_pwr);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.pre_fec_pad_fct);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.pe_disambig);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.spatial_reuse);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.doppler);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_common_field.he_sig2);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_user_info_field.aid12);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_user_info_field.ru_alloc_reg);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_user_info_field.ru_alloc);
|
||||
seq_printf(
|
||||
sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_user_info_field.ul_coding_type);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_user_info_field.ul_mcs);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_user_info_field.ul_dcm);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_user_info_field.ss_alloc);
|
||||
seq_printf(
|
||||
sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.trig_user_info_field.ul_target_rssi);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.basic_trig_user_info.mpdu_mu_sf);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.basic_trig_user_info.tid_al);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.basic_trig_user_info.ac_pl);
|
||||
seq_printf(sfp, " %u",
|
||||
handle->rf_data->mfg_tx_trigger_config
|
||||
.basic_trig_user_info.pref_ac);
|
||||
}
|
||||
seq_printf(sfp, "\n");
|
||||
}
|
||||
// Read current antcfg configuration
|
||||
woal_priv_get_tx_rx_ant(sfp, priv);
|
||||
|
||||
MODULE_PUT;
|
||||
LEAVE();
|
||||
return 0;
|
||||
|
|
|
@ -2685,7 +2685,7 @@ int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
|
|||
|
||||
ENTER();
|
||||
|
||||
if (priv->phandle->driver_status || priv->phandle->surprise_removed) {
|
||||
if (priv->phandle->driver_status) {
|
||||
PRINTM(MERROR,
|
||||
"Block woal_cfg80211_del_beacon in abnormal driver state\n");
|
||||
LEAVE();
|
||||
|
|
Loading…
Reference in a new issue