mxm_wifiex: update to mxm5x17366.p3 release

Driver Bug Fixes:
-----------------
1. WSW-22601: kernel warning are seen on STAUT when Channel switch command is executed on Ex-AP
2. WSW-22845: hotspot start fail in function test from Android GUI
3. WSW-22456: APUT is not sending ECSA Action frames when channel_switch command is executed with ECSA Action frame enabled
4. WCSWREL-372: Kernel difference between Linux 5.15 and Android 13 cause Wi-Fi driver compilation failure
5. WSW-17873: Remove big endian flag from makefile
6. WSW-22457: APUT is not switching to new channel when channel_switch command is executed in 2.4 GHz
7. WSW-22313: 0xa9 cmd timeout on fw reload
8. WCSWREL-375: merge the fix patch for the build errors with the API changes on next-20220912 kernel tag
9. WSW-22361: Change the state of Timer function in mxmdriver
10. WSW-22207: Kernel Panic when run timeout IR stress on iMX8 Platform
11. WSFD-559: Support Wi-fi Auto Recovery in Linux driver

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
Sherry Sun 2022-11-11 10:57:56 +08:00
parent f0c4bdf134
commit 2a2b814866
27 changed files with 1288 additions and 232 deletions

View file

@ -1,27 +1,19 @@
# File: Makefile
#
# Copyright 2014-2022 NXP
# Copyright 2008-2022 NXP
#
# NXP CONFIDENTIAL
# The source code contained or described herein and all documents related to
# the source code (Materials) are owned by NXP, its
# suppliers and/or its licensors. Title to the Materials remains with NXP,
# its suppliers and/or its licensors. The Materials contain
# trade secrets and proprietary and confidential information of NXP, its
# suppliers and/or its licensors. The Materials are protected by worldwide copyright
# and trade secret laws and treaty provisions. No part of the Materials may be
# used, copied, reproduced, modified, published, uploaded, posted,
# transmitted, distributed, or disclosed in any way without NXP's prior
# express written permission.
# This software file (the File) is distributed by NXP
# under the terms of the GNU General Public License Version 2, June 1991
# (the License). You may use, redistribute and/or modify the File in
# accordance with the terms and conditions of the License, a copy of which
# is available by writing to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
# worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
#
# No license under any patent, copyright, trade secret or other intellectual
# property right is granted to or conferred upon you by disclosure or delivery
# of the Materials, either expressly, by implication, inducement, estoppel or
# otherwise. Any license under such intellectual property rights must be
# express and approved by NXP in writing.
#
# Alternatively, this software may be distributed under the terms of GPL v2.
# SPDX-License-Identifier: GPL-2.0
# THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
# IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
# ARE EXPRESSLY DISCLAIMED. The License provides additional details about
# this warranty disclaimer.
#
CONFIG_COMPATDIR=n
@ -92,6 +84,9 @@ CONFIG_MFG_CMD_SUPPORT=y
# OpenWrt support
CONFIG_OPENWRT_SUPPORT=n
# Big-endian platform
CONFIG_BIG_ENDIAN=n
ifeq ($(CONFIG_DRV_EMBEDDED_SUPPLICANT), y)
@ -138,6 +133,9 @@ ARCH ?= arm64
CONFIG_IMX_SUPPORT=y
ifeq ($(CONFIG_IMX_SUPPORT),y)
ccflags-y += -DIMX_SUPPORT
ifneq ($(ANDROID_PRODUCT_OUT),)
ccflags-y += -DIMX_ANDROID
endif
endif
KERNELDIR ?= /usr/src/arm/linux_5_10_y_kernel/linux-nxp
CROSS_COMPILE ?= /opt/fsl-imx-internal-xwayland/5.10-gatesgarth/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-
@ -196,6 +194,10 @@ ifeq ($(CONFIG_MFG_CMD_SUPPORT),y)
ccflags-y += -DMFG_CMD_SUPPORT
endif
ifeq ($(CONFIG_BIG_ENDIAN),y)
ccflags-y += -DBIG_ENDIAN_SUPPORT
endif
ifeq ($(CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT),y)
ccflags-y += -DUSERSPACE_32BIT_OVER_KERNEL_64BIT
endif

View file

@ -374,6 +374,14 @@
Path ID (0: PathA, 1:PathB, 2:PathA+B)
echo "tx_power=16 2 0" > /proc/mwlan/adapterX/config
Set MFG HE TB Tx to configure Trigger based TX reponse
Enable Tx (0:disable, 1:enable)
Q num (0-7 : TCQs 0-7, 17-20: AXQs 0-3)
AID (Association ID as applicable)
AXQ MU Timer(to set the MU EDCA Timer for the Queue)
Tx Power (-11 to 9 dBm)
echo "he_tb_tx=1 1 5 400 10" > /proc/mwlan/adapterX/config
Set Tx Continuous Mode
Start (0:disable, 1:enable)
Continuous Wave Mode (0:disable, 1:enable)
@ -528,7 +536,8 @@ SYNOPSIS
mlanutl mlanX getkey
mlanutl mlanX getscantable [ARGS]
mlanutl uapX getstalist
mlanutl uapX channel_switch <switch mode> <oper class> <new channel> <switch count> <bandwidth/num_pkts>
mlanutl uapX channel_switch <switch mode> <oper class> <new channel> <switch count> <bandwidth/num_pkts>
mlanutl uapX channel_switch <switch mode> <oper class> <new channel> <switch count> <bandwidth>
mlanutl mlanX hostcmd <11n_2040coex.conf> 2040coex
mlanutl mlanX hostcmd <auto_tx.conf> auto_tx_get
mlanutl mlanX hostcmd <auto_tx.conf> auto_tx_unreg
@ -2448,15 +2457,15 @@ Usage:
mlanutl uap0 fake_radar : trigger fake rader event
getchload
This command gets the current channel load and noise floor value
This command gets the current channel load (in %), noise floor value (in dbm) and rx_quality (in %, higher % indicates better rx quality)
Usage:
mlanutl uapX getchload <duration>
<duration> can be within 1-10(specifying 10ms to 100ms), default duration will be 100ms
Examples:
mlanutl uap0 getchload : gets channel load, noise floor and rx_quality for 100ms duration
mlanutl uap0 getchload 1 : gets channel load, noise floor and rx_quality for 10ms duration
mlanutl uap0 getchload 6 : gets channel load, noise floor and rx_quality for 60ms duration
mlanutl uap0 getchload : gets channel load (in %), noise floor (in dbm) and rx_quality (in %) for 100ms duration
mlanutl uap0 getchload 1 : gets channel load (in %), noise floor (in dbm) and rx_quality (in %) for 10ms duration
mlanutl uap0 getchload 6 : gets channel load (in %), noise floor (in dbm) and rx_quality (in %) for 60ms duration
dfs_repeater
This command is used to get/set DFS Repeater mode.
@ -2696,6 +2705,7 @@ getstalist
mlanutl uap0 getstalist
channel_switch <switch mode> <oper class> <new channel> <switch count> <bandwidth/num_pkts>
channel_switch <switch mode> <oper class> <new channel> <switch count> <bandwidth>
This command is used to do channel switch according to spec.
Where the paramters are:
@ -2704,17 +2714,20 @@ channel_switch <switch mode> <oper class> <new channel> <switch count> <bandwidt
new channel : the channel will switch to
switch count: channel switch time to send ECSA ie
(when set to 0, CSA/ECSA action frame will be send out)
switch count: channel switch time to send CSA ie
bandwidth : channel width switch to(optional),only for 5G channels.
Support value 1 -- 40M above, 3 -- 40M below, 4 -- 80M, 5 -- 160M
num_pkts : send number of CSA/ECSA action frame
Example:
mlanutl uap0 channel_switch 1 115 36 10 :switch to channel 36, oper class 115
mlanutl uap0 channel_switch 1 115 36 10 :switch to channel 36, oper class 115
mlanutl uap0 channel_switch 1 81 6 10 :switch to channel 6, oper class 81
mlanutl uap0 channel_switch 1 0 6 10 :switch to channel 6
mlanutl uap0 channel_switch 1 0 36 10 1 :switch to channel 36, bandwidth 40MHz above
mlanutl uap0 channel_switch 1 0 36 0 3 :switch to channel 36, and send 3 broadcast CSA action frame
mlanutl uap0 channel_switch 1 115 36 0 3 :switch to channel 36, and send 3 broadcast ECSA action frame
mlanutl uap0 channel_switch 1 0 6 10 :switch to channel 6
mlanutl uap0 channel_switch 1 0 36 10 1 :switch to channel 36, bandwidth 40MHz above
mlanutl uap0 channel_switch 1 0 36 0 3 :switch to channel 36, and send 3 broadcast CSA action frame
mlanutl uap0 channel_switch 1 115 36 0 3 :switch to channel 36, and send 3 broadcast ECSA action frame
(Only IW61X supports sending CSA/ECSA action frames)
hostcmd 2040coex
This command is used to send the 11n 20/40 Coex command to firmware.

View file

@ -76,7 +76,7 @@ static t_u8 wlan_check_ap_11ax_twt_supported(BSSDescriptor_t *pbss_desc)
{
if (!pbss_desc->phe_cap)
return MFALSE;
if (!(pbss_desc->phe_cap->he_mac_cap[0] & HE_MAC_CAP_TWT_REQ_SUPPORT))
if (!(pbss_desc->phe_cap->he_mac_cap[0] & HE_MAC_CAP_TWT_RESP_SUPPORT))
return MFALSE;
if (!pbss_desc->pext_cap)
return MFALSE;
@ -526,6 +526,7 @@ void wlan_update_11ax_cap(mlan_adapter *pmadapter,
MrvlIEtypes_He_cap_t *phe_cap = MNULL;
t_u8 i = 0;
t_u8 he_cap_2g = 0;
MrvlIEtypes_He_cap_t *user_he_cap_tlv = MNULL;
ENTER();
if ((hw_he_cap->len + sizeof(MrvlIEtypesHeader_t)) >
@ -584,6 +585,28 @@ void wlan_update_11ax_cap(mlan_adapter *pmadapter,
pmadapter->hw_hecap_len,
sizeof(pmadapter->priv[i]->user_he_cap));
}
/**
* Clear TWT bits in he_mac_cap by bss role
* STA mode should clear TWT responder bit
* UAP mode should clear TWT request bit
*/
if (he_cap_2g)
user_he_cap_tlv =
(MrvlIEtypes_He_cap_t *)&pmadapter
->priv[i]
->user_2g_he_cap;
else
user_he_cap_tlv =
(MrvlIEtypes_He_cap_t *)&pmadapter
->priv[i]
->user_he_cap;
if (pmadapter->priv[i]->bss_role == MLAN_BSS_ROLE_STA)
user_he_cap_tlv->he_mac_cap[0] &=
~HE_MAC_CAP_TWT_RESP_SUPPORT;
else
user_he_cap_tlv->he_mac_cap[0] &=
~HE_MAC_CAP_TWT_REQ_SUPPORT;
}
}
LEAVE();

View file

@ -2903,10 +2903,12 @@ t_s32 wlan_11h_process_join(mlan_private *priv, t_u8 **ppbuffer,
priv, ppbuffer, band, channel, p11h_bss_info);
}
} else {
/* Deactivate 11h functions in the firmware */
wlan_11h_activate(priv, MNULL, MFALSE);
pcap_info->spectrum_mgmt = MFALSE;
wlan_11h_check_update_radar_det_state(priv);
if (pcap_info->ibss) {
/* Deactivate 11h functions in the firmware */
wlan_11h_activate(priv, MNULL, MFALSE);
pcap_info->spectrum_mgmt = MFALSE;
wlan_11h_check_update_radar_det_state(priv);
}
}
LEAVE();

View file

@ -24,7 +24,7 @@
#define _MLAN_DECL_H_
/** MLAN release version */
#define MLAN_RELEASE_VERSION "362"
#define MLAN_RELEASE_VERSION "366.p3"
/** Re-define generic data types for MLAN/MOAL */
/** Signed char (1-byte) */
@ -967,6 +967,16 @@ typedef enum _dfs_moe_t {
/** Band_Config_t */
typedef MLAN_PACK_START struct _Band_Config_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=user*/
t_u8 scanMode : 2;
/** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */
t_u8 chan2Offset : 2;
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
t_u8 chanWidth : 2;
/** Band Info - (00)=2.4GHz, (01)=5GHz */
t_u8 chanBand : 2;
#else
/** Band Info - (00)=2.4GHz, (01)=5GHz */
t_u8 chanBand : 2;
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
@ -975,6 +985,7 @@ typedef MLAN_PACK_START struct _Band_Config_t {
t_u8 chan2Offset : 2;
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=Adoption mode*/
t_u8 scanMode : 2;
#endif
} MLAN_PACK_END Band_Config_t;
/** channel_band_t */
@ -1176,6 +1187,16 @@ typedef MLAN_PACK_START struct _radiotap_info {
/** txpower structure */
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
/** Host tx power ctrl:
0x0: use fw setting for TX power
0x1: value specified in bit[6] and bit[5:0] are valid */
t_u8 hostctl : 1;
/** Sign of the power specified in bit[5:0] */
t_u8 sign : 1;
/** Power to be used for transmission(in dBm) */
t_u8 abs_val : 6;
#else
/** Power to be used for transmission(in dBm) */
t_u8 abs_val : 6;
/** Sign of the power specified in bit[5:0] */
@ -1184,6 +1205,7 @@ typedef MLAN_PACK_START struct {
0x0: use fw setting for TX power
0x1: value specified in bit[6] and bit[5:0] are valid */
t_u8 hostctl : 1;
#endif
} MLAN_PACK_END tx_power_t;
/* pkt_txctrl */
typedef MLAN_PACK_START struct _pkt_txctrl {

View file

@ -2266,6 +2266,43 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_TDLS_Idle_Timeout_t {
#define TXPD_RETRY_ENABLE MBIT(12)
/** tx_control*/
#ifdef BIG_ENDIAN_SUPPORT
typedef MLAN_PACK_START struct _tx_ctrl {
/** reserved */
t_u32 reserved : 3;
/** mc retry packet */
t_u32 mc_pkt_retry : 1;
/** end of mc AMPDU */
t_u32 mc_ampdu_end : 1;
/** start of mc AMPDU */
t_u32 mc_ampdu_start : 1;
/** End of mc cycle */
t_u32 mc_cycle_end : 1;
/** start of mc cycle */
t_u32 mc_cycle_start : 1;
/** bw 0-20MHz, 1-40MHz */
t_u32 bw : 3;
/** Rate used for transmission MCS0-7*/
t_u32 tx_rate : 5;
/** Control the use of txRate. 0 - use FW setting, 1 - use the specified
* txRate;*/
t_u32 host_txrate_ctrl : 1;
/** 0/1 - use FW setting, 2 - ACK_IMMD, 3 - NO_ACK.*/
t_u32 ack_policy : 2;
/** Control the use of retryLimit. 0 - use FW setting, 1 - use the
* specified retryLimit.*/
t_u32 host_retry_ctrl : 1;
/** retry limit */
t_u32 retry_limit : 4;
/** Control the use of txPower. 0 - use FW power setting, 1 - use the
* specified txPower.*/
t_u32 host_tx_powerctrl : 1;
/** Sign of the txPower, 0 - positive_sign(+), 1 - negative_sign(-). */
t_u32 tx_power_sign : 1;
/** Power used for transmission(in dBm); */
t_u32 tx_power : 6;
} MLAN_PACK_END tx_ctrl;
#else
typedef MLAN_PACK_START struct _tx_ctrl {
/** Power used for transmission(in dBm); */
t_u32 tx_power : 6;
@ -2301,6 +2338,7 @@ typedef MLAN_PACK_START struct _tx_ctrl {
/** reserved */
t_u32 reserved : 3;
} MLAN_PACK_END tx_ctrl;
#endif
/** mc tx ctrl */
typedef MLAN_PACK_START struct _mc_tx_ctrl {
@ -2383,6 +2421,32 @@ typedef MLAN_PACK_START struct _RxPD {
} MLAN_PACK_END RxPD, *PRxPD;
/** IEEEtypes_FrameCtl_t*/
#ifdef BIG_ENDIAN_SUPPORT
typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_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 IEEEtypes_FrameCtl_t;
#else
typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_t {
/** Protocol Version */
t_u8 protocol_version : 2;
@ -2407,6 +2471,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_t {
/** Order */
t_u8 order : 1;
} MLAN_PACK_END IEEEtypes_FrameCtl_t;
#endif
/** MrvlIETypes_MgmtFrameSet_t */
typedef MLAN_PACK_START struct _MrvlIETypes_MgmtFrameSet_t {
@ -2517,6 +2582,24 @@ typedef MLAN_PACK_START struct _parsed_region_chan_11d {
/** ChanScanMode_t */
typedef MLAN_PACK_START struct _ChanScanMode_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Reserved */
t_u8 reserved_7 : 1;
/** First passive scan then active scan */
t_u8 passive_to_active_scan : 1;
/** First channel in scan */
t_u8 first_chan : 1;
/** Enable hidden ssid report */
t_u8 hidden_ssid_report : 1;
/** Enable probe response timeout */
t_u8 rsp_timeout_en : 1;
/** Multidomain scan mode */
t_u8 multidomain_scan : 1;
/** Disble channel filtering flag */
t_u8 disable_chan_filt : 1;
/** Channel scan mode passive flag */
t_u8 passive_scan : 1;
#else
/** Channel scan mode passive flag */
t_u8 passive_scan : 1;
/** Disble channel filtering flag */
@ -2533,6 +2616,7 @@ typedef MLAN_PACK_START struct _ChanScanMode_t {
t_u8 passive_to_active_scan : 1;
/** Reserved */
t_u8 reserved_7 : 1;
#endif
} MLAN_PACK_END ChanScanMode_t;
/** ChanScanParamSet_t */
@ -2989,24 +3073,50 @@ typedef MLAN_PACK_START struct _HostCmd_DS_GTK_REKEY_PARAMS {
/** Data structure of WMM QoS information */
typedef MLAN_PACK_START struct _WmmQosInfo_t {
#ifdef BIG_ENDIAN_SUPPORT
/** QoS UAPSD */
t_u8 qos_uapsd : 1;
/** Reserved */
t_u8 reserved : 3;
/** Parameter set count */
t_u8 para_set_count : 4;
#else
/** Parameter set count */
t_u8 para_set_count : 4;
/** Reserved */
t_u8 reserved : 3;
/** QoS UAPSD */
t_u8 qos_uapsd : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END WmmQosInfo_t, *pWmmQosInfo_t;
/** Data structure of WMM ECW */
typedef MLAN_PACK_START struct _WmmEcw_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Maximum Ecw */
t_u8 ecw_max : 4;
/** Minimum Ecw */
t_u8 ecw_min : 4;
#else
/** Minimum Ecw */
t_u8 ecw_min : 4;
/** Maximum Ecw */
t_u8 ecw_max : 4;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END WmmEcw_t, *pWmmEcw_t;
/** Data structure of WMM Aci/Aifsn */
typedef MLAN_PACK_START struct _WmmAciAifsn_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Reserved */
t_u8 reserved : 1;
/** Aci */
t_u8 aci : 2;
/** Acm */
t_u8 acm : 1;
/** Aifsn */
t_u8 aifsn : 4;
#else
/** Aifsn */
t_u8 aifsn : 4;
/** Acm */
@ -3015,6 +3125,7 @@ typedef MLAN_PACK_START struct _WmmAciAifsn_t {
t_u8 aci : 2;
/** Reserved */
t_u8 reserved : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END WmmAciAifsn_t, *pWmmAciAifsn_t;
/** Data structure of WMM AC parameters */
@ -5292,9 +5403,15 @@ typedef MLAN_PACK_START struct {
*/
typedef MLAN_PACK_START struct {
mlan_wmm_queue_stats_action_e action; /**< Start, Stop, or Get */
#ifdef BIG_ENDIAN_SUPPORT
t_u8 select_bin : 7; /**< WMM_AC_BK(0) to WMM_AC_VO(3), or TID */
t_u8 select_is_userpri : 1; /**< Set if select_bin is UP, Clear for AC
*/
#else
t_u8 select_is_userpri : 1; /**< Set if select_bin is UP, Clear for AC
*/
t_u8 select_bin : 7; /**< WMM_AC_BK(0) to WMM_AC_VO(3), or TID */
#endif
t_u16 pkt_count; /**< Number of successful packets transmitted */
t_u16 pkt_loss; /**< Packets lost; not included in pktCount */
t_u32 avg_queue_delay; /**< Average Queue delay in microsec */
@ -7145,6 +7262,20 @@ typedef MLAN_PACK_START enum _MeasType_t {
* @brief Mode octet of the measurement request element (7.3.2.21)
*/
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
/**< Reserved */
t_u8 rsvd5_7 : 3;
/**< 11k: duration spec. for meas. is mandatory */
t_u8 duration_mandatory : 1;
/**< 11h: en/disable report rcpt. of spec. type */
t_u8 report : 1;
/**< 11h: en/disable requests of specified type */
t_u8 request : 1;
/**< 11h: enable report/request bits */
t_u8 enable : 1;
/**< 11k: series or parallel with previous meas */
t_u8 parallel : 1;
#else
/**< 11k: series or parallel with previous meas */
t_u8 parallel : 1;
/**< 11h: enable report/request bits */
@ -7157,6 +7288,7 @@ typedef MLAN_PACK_START struct {
t_u8 duration_mandatory : 1;
/**< Reserved */
t_u8 rsvd5_7 : 3;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END MeasReqMode_t;
@ -7201,10 +7333,17 @@ typedef union {
* @brief Mode octet of the measurement report element (7.3.2.22)
*/
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
t_u8 rsvd3_7 : 5; /**< Reserved */
t_u8 refused : 1; /**< Measurement refused */
t_u8 incapable : 1; /**< Incapable of performing measurement */
t_u8 late : 1; /**< Start TSF time missed for measurement */
#else
t_u8 late : 1; /**< Start TSF time missed for measurement */
t_u8 incapable : 1; /**< Incapable of performing measurement */
t_u8 refused : 1; /**< Measurement refused */
t_u8 rsvd3_7 : 5; /**< Reserved */
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END MeasRptMode_t;

View file

@ -46,10 +46,17 @@ typedef enum _WLAN_802_11_NETWORK_TYPE {
Wlan802_11NetworkTypeMax
} WLAN_802_11_NETWORK_TYPE;
#ifdef BIG_ENDIAN_SUPPORT
/** Frame control: Type Mgmt frame */
#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x3000
/** Frame control: SubType Mgmt frame */
#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc)&0xF000) >> 12)
#else
/** Frame control: Type Mgmt frame */
#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x000C
/** Frame control: SubType Mgmt frame */
#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc)&0x00F0) >> 4)
#endif
#ifdef PRAGMA_PACK
#pragma pack(push, 1)
@ -172,12 +179,21 @@ typedef MLAN_PACK_START struct _IEEEtypes_Generic_t {
/**ft capability policy*/
typedef MLAN_PACK_START struct _IEEEtypes_FtCapPolicy_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Reserved */
t_u8 reserved : 6;
/** RIC support */
t_u8 ric : 1;
/** FT over the DS capable */
t_u8 ft_over_ds : 1;
#else
/** FT over the DS capable */
t_u8 ft_over_ds : 1;
/** RIC support */
t_u8 ric : 1;
/** Reserved */
t_u8 reserved : 6;
#endif
} MLAN_PACK_END IEEEtypes_FtCapPolicy_t;
/** Mobility domain IE */
@ -310,6 +326,25 @@ typedef MLAN_PACK_START struct _TLV_Generic_t {
#define CAPINFO_MASK (~(MBIT(15) | MBIT(14) | MBIT(11) | MBIT(9)))
/** Capability Bit Map*/
#ifdef BIG_ENDIAN_SUPPORT
typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
t_u8 rsrvd1 : 2;
t_u8 dsss_ofdm : 1;
t_u8 radio_measurement : 1;
t_u8 rsvrd2 : 1;
t_u8 short_slot_time : 1;
t_u8 rsrvd3 : 1;
t_u8 spectrum_mgmt : 1;
t_u8 chan_agility : 1;
t_u8 pbcc : 1;
t_u8 short_preamble : 1;
t_u8 privacy : 1;
t_u8 cf_poll_rqst : 1;
t_u8 cf_pollable : 1;
t_u8 ibss : 1;
t_u8 ess : 1;
} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
#else
typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
/** Capability Bit Map : ESS */
t_u8 ess : 1;
@ -342,6 +377,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
/** Capability Bit Map : Reserved */
t_u8 rsrvd1 : 2;
} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
#endif /* BIG_ENDIAN_SUPPORT */
/** IEEEtypes_Ssid_t */
typedef MLAN_PACK_START struct _IEEEtypes_Ssid_t {
@ -556,16 +592,35 @@ typedef MLAN_PACK_START struct _IEEEtypes_Wpa_t {
/** Data structure of WMM QoS information */
typedef MLAN_PACK_START struct _IEEEtypes_WmmQosInfo_t {
#ifdef BIG_ENDIAN_SUPPORT
/** QoS UAPSD */
t_u8 qos_uapsd : 1;
/** Reserved */
t_u8 reserved : 3;
/** Parameter set count */
t_u8 para_set_count : 4;
#else
/** Parameter set count */
t_u8 para_set_count : 4;
/** Reserved */
t_u8 reserved : 3;
/** QoS UAPSD */
t_u8 qos_uapsd : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END IEEEtypes_WmmQosInfo_t, *pIEEEtypes_WmmQosInfo_t;
/** Data structure of WMM Aci/Aifsn */
typedef MLAN_PACK_START struct _IEEEtypes_WmmAciAifsn_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Reserved */
t_u8 reserved : 1;
/** Aci */
t_u8 aci : 2;
/** Acm */
t_u8 acm : 1;
/** Aifsn */
t_u8 aifsn : 4;
#else
/** Aifsn */
t_u8 aifsn : 4;
/** Acm */
@ -574,14 +629,22 @@ typedef MLAN_PACK_START struct _IEEEtypes_WmmAciAifsn_t {
t_u8 aci : 2;
/** Reserved */
t_u8 reserved : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END IEEEtypes_WmmAciAifsn_t, *pIEEEtypes_WmmAciAifsn_t;
/** Data structure of WMM ECW */
typedef MLAN_PACK_START struct _IEEEtypes_WmmEcw_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Maximum Ecw */
t_u8 ecw_max : 4;
/** Minimum Ecw */
t_u8 ecw_min : 4;
#else
/** Minimum Ecw */
t_u8 ecw_min : 4;
/** Maximum Ecw */
t_u8 ecw_max : 4;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END IEEEtypes_WmmEcw_t, *pIEEEtypes_WmmEcw_t;
/** Data structure of WMM AC parameters */
@ -669,6 +732,22 @@ typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e {
/** Data structure of WMM TSPEC information */
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
t_u8 Reserved17_23 : 7; /* ! Reserved */
t_u8 Schedule : 1;
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
t_u8 UserPri : 3; /* ! 802.1d User Priority */
// IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /*
// !Legacy/Trigg*/
t_u8 PowerSaveBehavior : 1;
t_u8 Aggregation : 1; /* ! Reserved */
t_u8 AccessPolicy2 : 1; /* ! */
t_u8 AccessPolicy1 : 1; /* ! */
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
t_u8 TID : 4; /* ! Unique identifier */
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
t_u8 TrafficType : 1;
#else
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
t_u8 TrafficType : 1;
t_u8 TID : 4; /* ! Unique identifier */
@ -683,19 +762,31 @@ typedef MLAN_PACK_START struct {
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
t_u8 Schedule : 1;
t_u8 Reserved17_23 : 7; /* ! Reserved */
#endif
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_t;
/** Data structure of WMM TSPEC Nominal Size */
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
nominal */
t_u16 Size : 15; /* ! Nominal size in octets */
#else
t_u16 Size : 15; /* ! Nominal size in octets */
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
nominal */
#endif
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_NomMSDUSize_t;
/** Data structure of WMM TSPEC SBWA */
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
t_u16 Whole : 3; /* ! Whole portion */
t_u16 Fractional : 13; /* ! Fractional portion */
#else
t_u16 Fractional : 13; /* ! Fractional portion */
t_u16 Whole : 3; /* ! Whole portion */
#endif
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_SBWA;
/** Data structure of WMM TSPEC Body */
@ -1036,6 +1127,26 @@ typedef MLAN_PACK_START struct _VHT_MCS_set {
/** VHT Capabilities info field, reference 802.11ac D1.4 p89 */
typedef MLAN_PACK_START struct _VHT_capa {
#if 0
#ifdef BIG_ENDIAN_SUPPORT
t_u8 mpdu_max_len:2;
t_u8 chan_width:2;
t_u8 rx_LDPC:1;
t_u8 sgi_80:1;
t_u8 sgi_160:1;
t_u8 tx_STBC:1;
t_u8 rx_STBC:3;
t_u8 SU_beamformer_capa:1;
t_u8 SU_beamformee_capa:1;
t_u8 beamformer_ante_num:3;
t_u8 sounding_dim_num:3;
t_u8 MU_beamformer_capa:1;
t_u8 MU_beamformee_capa:1;
t_u8 VHT_TXOP_ps:1;
t_u8 HTC_VHT_capa:1;
t_u8 max_ampdu_len:3;
t_u8 link_apapt_capa:2;
t_u8 reserved_1:4;
#else
t_u8 reserved_1:4;
t_u8 link_apapt_capa:2;
t_u8 max_ampdu_len:3;
@ -1054,6 +1165,7 @@ typedef MLAN_PACK_START struct _VHT_capa {
t_u8 rx_LDPC:1;
t_u8 chan_width:2;
t_u8 mpdu_max_len:2;
#endif /* BIG_ENDIAN_SUPPORT */
#endif
t_u32 vht_cap_info;
VHT_MCS_set_t mcs_sets;
@ -1162,6 +1274,24 @@ typedef MLAN_PACK_START struct _IEEEtypes_Extension_t {
} MLAN_PACK_END IEEEtypes_Extension_t, *pIEEEtypes_Extension_t;
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsMap_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Max HE-MAC for 8 SS */
t_u8 max_mcs_8ss : 2;
/** Max HE-MAC for 7 SS */
t_u8 max_mcs_7ss : 2;
/** Max HE-MAC for 6 SS */
t_u8 max_mcs_6ss : 2;
/** Max HE-MAC for 5 SS */
t_u8 max_mcs_5ss : 2;
/** Max HE-MAC for 4 SS */
t_u8 max_mcs_4ss : 2;
/** Max HE-MAC for 3 SS */
t_u8 max_mcs_3ss : 2;
/** Max HE-MAC for 2 SS */
t_u8 max_mcs_2ss : 2;
/** Max HE-MAC for 1 SS */
t_u8 max_mcs_1ss : 2;
#else
/** Max HE-MAC for 1 SS */
t_u8 max_mcs_1ss : 2;
/** Max HE-MAC for 2 SS */
@ -1178,6 +1308,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_HeMcsMap_t {
t_u8 max_mcs_7ss : 2;
/** Max HE-MAC for 8 SS */
t_u8 max_mcs_8ss : 2;
#endif
} MLAN_PACK_END IEEEtypes_HeMcsMap_t, *pIEEEtypes_HeMcsMap_t;
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsNss_t {
@ -1204,6 +1335,24 @@ typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
} MLAN_PACK_END IEEEtypes_HECap_t, *pIEEEtypes_HECap_t;
typedef MLAN_PACK_START struct _IEEEtypes_HeOpParam_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Reserved, including 6G Operation Info Pressent (bit17) */
t_u8 reserved : 6; /* bit 18-23 */
/* 6g operation info present */
t_u8 he_6g_op_info_present : 1; /* bit 17 */
/** ER SU Disable */
t_u8 er_su_disable : 1; /* bit 16 */
/** Co-Hosted BSS */
t_u16 co_located_bss : 1; /* bit 15 */
/** VHT Operation Info Present */
t_u16 vht_op_info_present : 1; /* bit 14 */
/** TXOP Duration RTS Threshold */
t_u16 txop_dur_rts_threshold : 10; /* bit 4-13 */
/** TWT Required */
t_u16 twt_req : 1; /* bit 3 */
/** Default PE Duration */
t_u16 default_pe_dur : 3; /* bit 0-2 */
#else
/** Default PE Duration */
t_u16 default_pe_dur : 3; /* bit 0-2 */
/** TWT Required */
@ -1220,15 +1369,25 @@ typedef MLAN_PACK_START struct _IEEEtypes_HeOpParam_t {
t_u8 he_6g_op_info_present : 1; /* bit 17 */
/** Reserved bit 18-23 */
t_u8 reserved : 6; /* bit 18-23 */
#endif
} MLAN_PACK_END IEEEtypes_HeOpParam_t;
typedef MLAN_PACK_START struct _IEEEtypes_HeBssColorInfo_t {
#ifdef BIG_ENDIAN_SUPPORT
/** BSS Color Disabled */
t_u8 bss_color_disabled : 1; /* bit 7 */
/** Partial BSS Color */
t_u8 partial_bss_color : 1; /* bit 6 */
/** BSS Color */
t_u8 bss_color : 6; /* bit 0-5 */
#else
/** BSS Color */
t_u8 bss_color : 6; /* bit 0-5 */
/** Partial BSS Color */
t_u8 partial_bss_color : 1; /* bit 6 */
/** BSS Color Disabled */
t_u8 bss_color_disabled : 1; /* bit 7 */
#endif
} MLAN_PACK_END IEEEtypes_HeBssColorInfo_t;
typedef MLAN_PACK_START struct _IEEEtypes_HeOp_t {
@ -1390,6 +1549,20 @@ typedef MLAN_PACK_START struct {
*** @brief Map octet of the basic measurement report (7.3.2.22.1)
**/
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
/**< Reserved */
t_u8 rsvd5_7 : 3;
/**< Channel is unmeasured */
t_u8 unmeasured : 1;
/**< Radar detected on channel */
t_u8 radar : 1;
/**< Unidentified signal found on channel */
t_u8 unidentified_sig : 1;
/**< OFDM preamble detected on channel */
t_u8 ofdm_preamble : 1;
/**< At least one valid MPDU received on channel */
t_u8 bss : 1;
#else
/**< At least one valid MPDU received on channel */
t_u8 bss : 1;
/**< OFDM preamble detected on channel */
@ -1402,6 +1575,7 @@ typedef MLAN_PACK_START struct {
t_u8 unmeasured : 1;
/**< Reserved */
t_u8 rsvd5_7 : 3;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END MeasRptBasicMap_t;

View file

@ -1470,6 +1470,7 @@ done:
static void wlan_update_hw_spec(pmlan_adapter pmadapter)
{
t_u32 i;
MrvlIEtypes_He_cap_t *user_he_cap_tlv = MNULL;
ENTER();
@ -1582,6 +1583,28 @@ static void wlan_update_hw_spec(pmlan_adapter pmadapter)
pmadapter->hw_he_cap,
pmadapter->hw_hecap_len,
sizeof(pmadapter->priv[i]->user_he_cap));
user_he_cap_tlv =
(MrvlIEtypes_He_cap_t *)&pmadapter
->priv[i]
->user_2g_he_cap;
if (pmadapter->priv[i]->bss_role ==
MLAN_BSS_ROLE_STA)
user_he_cap_tlv->he_mac_cap[0] &=
~HE_MAC_CAP_TWT_RESP_SUPPORT;
else
user_he_cap_tlv->he_mac_cap[0] &=
~HE_MAC_CAP_TWT_REQ_SUPPORT;
user_he_cap_tlv =
(MrvlIEtypes_He_cap_t *)&pmadapter
->priv[i]
->user_he_cap;
if (pmadapter->priv[i]->bss_role ==
MLAN_BSS_ROLE_STA)
user_he_cap_tlv->he_mac_cap[0] &=
~HE_MAC_CAP_TWT_RESP_SUPPORT;
else
user_he_cap_tlv->he_mac_cap[0] &=
~HE_MAC_CAP_TWT_REQ_SUPPORT;
}
}
}

View file

@ -104,9 +104,22 @@ typedef MLAN_PACK_START struct _FWSyncPkt {
t_u32 fw_ready;
} MLAN_PACK_END FWSyncPkt;
#ifdef BIG_ENDIAN_SUPPORT
/** Convert sequence number and command fields
* of fwheader to correct endian format
*/
#define endian_convert_syncfwheader(x) \
{ \
(x)->cmd = wlan_le32_to_cpu((x)->cmd); \
(x)->seq_num = wlan_le32_to_cpu((x)->seq_num); \
(x)->status = wlan_le32_to_cpu((x)->status); \
(x)->offset = wlan_le32_to_cpu((x)->offset); \
}
#else
/** Convert sequence number and command fields
* of fwheader to correct endian format
*/
#define endian_convert_syncfwheader(x)
#endif /* BIG_ENDIAN_SUPPORT */
#endif /* _MLAN_INIT_H_ */

View file

@ -770,14 +770,31 @@ typedef struct _mlan_ssid_bssid {
/** Data structure of WMM ECW */
typedef struct _wmm_ecw_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Maximum Ecw */
t_u8 ecw_max : 4;
/** Minimum Ecw */
t_u8 ecw_min : 4;
#else
/** Minimum Ecw */
t_u8 ecw_min : 4;
/** Maximum Ecw */
t_u8 ecw_max : 4;
#endif /* BIG_ENDIAN_SUPPORT */
} wmm_ecw_t, *pwmm_ecw_t;
/** Data structure of WMM Aci/Aifsn */
typedef struct _wmm_aci_aifsn_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Reserved */
t_u8 reserved : 1;
/** Aci */
t_u8 aci : 2;
/** Acm */
t_u8 acm : 1;
/** Aifsn */
t_u8 aifsn : 4;
#else
/** Aifsn */
t_u8 aifsn : 4;
/** Acm */
@ -786,6 +803,7 @@ typedef struct _wmm_aci_aifsn_t {
t_u8 aci : 2;
/** Reserved */
t_u8 reserved : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} wmm_aci_aifsn_t, *pwmm_aci_aifsn_t;
/** Data structure of WMM AC parameters */
@ -992,12 +1010,21 @@ typedef struct _wep_param {
/** Data structure of WMM QoS information */
typedef struct _wmm_qos_info_t {
#ifdef BIG_ENDIAN_SUPPORT
/** QoS UAPSD */
t_u8 qos_uapsd : 1;
/** Reserved */
t_u8 reserved : 3;
/** Parameter set count */
t_u8 para_set_count : 4;
#else
/** Parameter set count */
t_u8 para_set_count : 4;
/** Reserved */
t_u8 reserved : 3;
/** QoS UAPSD */
t_u8 qos_uapsd : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} wmm_qos_info_t, *pwmm_qos_info_t;
/** Data structure of WMM parameter IE */
@ -1913,6 +1940,100 @@ typedef struct _mlan_ver_ext {
char version_str[MLAN_MAX_VER_STR_LEN];
} mlan_ver_ext, *pmlan_ver_ext;
#ifdef BIG_ENDIAN_SUPPORT
/** Extended Capabilities Data */
typedef struct MLAN_PACK_START _ExtCap_t {
/** Extended Capabilities value */
t_u8 rsvdBit87 : 1; /* bit 87 */
t_u8 rsvdBit86 : 1; /* bit 86 */
t_u8 rsvdBit85 : 1; /* bit 85 */
t_u8 beacon_prot : 1; /* bit 84 */
t_u8 rsvdBit83 : 1; /* bit 83 */
t_u8 rsvdBit82 : 1; /* bit 82 */
t_u8 rsvdBit81 : 1; /* bit 81 */
t_u8 rsvdBit80 : 1; /* bit 80 */
t_u8 rsvdBit79 : 1; /* bit 79 */
t_u8 TWTResp : 1; /* bit 78 */
t_u8 TWTReq : 1; /* bit 77 */
t_u8 rsvdBit76 : 1; /* bit 76 */
t_u8 rsvdBit75 : 1; /* bit 75 */
t_u8 rsvdBit74 : 1; /* bit 74 */
t_u8 rsvdBit73 : 1; /* bit 73 */
t_u8 FILS : 1; /* bit 72 */
t_u8 FTMI : 1; /* bit 71 */
t_u8 FTMR : 1; /* bit 70 */
t_u8 CAQ : 1; /* bit 69 */
t_u8 rsvdBit68 : 1; /* bit 68 */
t_u8 NCC : 1; /* bit 67 */
t_u8 rsvdBit66 : 1; /* bit 66 */
t_u8 chanSchedMgnt : 1; /* bit 65 */
t_u8 MaxAMSDU1 : 1; /* bit 64 */
t_u8 MaxAMSDU0 : 1; /* bit 63 */
t_u8 OperModeNtf : 1; /* bit 62 */
t_u8 TDLSWildBandwidth : 1; /* bit 61 */
t_u8 rsvdBit60 : 1; /* bit 60 */
t_u8 rsvdBit59 : 1; /* bit 59 */
t_u8 rsvdBit58 : 1; /* bit 58 */
t_u8 rsvdBit57 : 1; /* bit 57 */
t_u8 rsvdBit56 : 1; /* bit 56 */
t_u8 rsvdBit55 : 1; /* bit 55 */
t_u8 rsvdBit54 : 1; /* bit 54 */
t_u8 rsvdBit53 : 1; /* bit 53 */
t_u8 rsvdBit52 : 1; /* bit 52 */
t_u8 rsvdBit51 : 1; /* bit 51 */
t_u8 rsvdBit50 : 1; /* bit 50 */
t_u8 rsvdBit49 : 1; /* bit 49 */
t_u8 rsvdBit48 : 1; /* bit 48 */
t_u8 rsvdBit47 : 1; /* bit 47 */
t_u8 rsvdBit46 : 1; /* bit 46 */
t_u8 rsvdBit45 : 1; /* bit 45 */
t_u8 rsvdBit44 : 1; /* bit 44 */
t_u8 rsvdBit43 : 1; /* bit 43 */
t_u8 rsvdBit42 : 1; /* bit 42 */
t_u8 rsvdBit41 : 1; /* bit 41 */
t_u8 rsvdBit40 : 1; /* bit 40 */
t_u8 TDLSChlSwitchProhib : 1; /* bit 39 */
t_u8 TDLSProhibited : 1; /* bit 38 */
t_u8 TDLSSupport : 1; /* bit 37 */
t_u8 MSGCF_Capa : 1; /* bit 36 */
t_u8 Reserved35 : 1; /* bit 35 */
t_u8 SSPN_Interface : 1; /* bit 34 */
t_u8 EBR : 1; /* bit 33 */
t_u8 Qos_Map : 1; /* bit 32 */
t_u8 Interworking : 1; /* bit 31 */
t_u8 TDLSChannelSwitching : 1; /* bit 30 */
t_u8 TDLSPeerPSMSupport : 1; /* bit 29 */
t_u8 TDLSPeerUAPSDSupport : 1; /* bit 28 */
t_u8 UTC : 1; /* bit 27 */
t_u8 DMS : 1; /* bit 26 */
t_u8 SSID_List : 1; /* bit 25 */
t_u8 ChannelUsage : 1; /* bit 24 */
t_u8 TimingMeasurement : 1; /* bit 23 */
t_u8 MultipleBSSID : 1; /* bit 22 */
t_u8 AC_StationCount : 1; /* bit 21 */
t_u8 QoSTrafficCap : 1; /* bit 20 */
t_u8 BSS_Transition : 1; /* bit 19 */
t_u8 TIM_Broadcast : 1; /* bit 18 */
t_u8 WNM_Sleep : 1; /* bit 17 */
t_u8 TFS : 1; /* bit 16 */
t_u8 GeospatialLocation : 1; /* bit 15 */
t_u8 CivicLocation : 1; /* bit 14 */
t_u8 CollocatedIntf : 1; /* bit 13 */
t_u8 ProxyARPService : 1; /* bit 12 */
t_u8 FMS : 1; /* bit 11 */
t_u8 LocationTracking : 1; /* bit 10 */
t_u8 MulticastDiagnostics : 1; /* bit 9 */
t_u8 Diagnostics : 1; /* bit 8 */
t_u8 Event : 1; /* bit 7 */
t_u8 SPSMP_Support : 1; /* bit 6 */
t_u8 Reserved5 : 1; /* bit 5 */
t_u8 PSMP_Capable : 1; /* bit 4 */
t_u8 RejectUnadmFrame : 1; /* bit 3 */
t_u8 ExtChanSwitching : 1; /* bit 2 */
t_u8 Reserved1 : 1; /* bit 1 */
t_u8 BSS_CoexistSupport : 1; /* bit 0 */
} MLAN_PACK_END ExtCap_t, *pExtCap_t;
#else
/** Extended Capabilities Data */
typedef struct MLAN_PACK_START _ExtCap_t {
/** Extended Capabilities value */
@ -2005,6 +2126,7 @@ typedef struct MLAN_PACK_START _ExtCap_t {
t_u8 rsvdBit86 : 1; /* bit 86 */
t_u8 rsvdBit87 : 1; /* bit 87 */
} MLAN_PACK_END ExtCap_t, *pExtCap_t;
#endif
/** ExtCap : TDLS prohibited */
#define IS_EXTCAP_TDLS_PROHIBITED(ext_cap) (ext_cap.TDLSProhibited)

View file

@ -308,6 +308,55 @@ extern t_u32 mlan_drvdbg;
(t_u64)(((t_u64)(x)&0x00ff000000000000ULL) >> 40) | \
(t_u64)(((t_u64)(x)&0xff00000000000000ULL) >> 56)))
#ifdef BIG_ENDIAN_SUPPORT
/** Convert ulong n/w to host */
#define mlan_ntohl(x) x
/** Convert host ulong to n/w */
#define mlan_htonl(x) x
/** Convert n/w to host */
#define mlan_ntohs(x) x
/** Convert host to n/w */
#define mlan_htons(x) x
/** Convert from 16 bit little endian format to CPU format */
#define wlan_le16_to_cpu(x) swap_byte_16(x)
/** Convert from 32 bit little endian format to CPU format */
#define wlan_le32_to_cpu(x) swap_byte_32(x)
/** Convert from 64 bit little endian format to CPU format */
#define wlan_le64_to_cpu(x) swap_byte_64(x)
/** Convert to 16 bit little endian format from CPU format */
#define wlan_cpu_to_le16(x) swap_byte_16(x)
/** Convert to 32 bit little endian format from CPU format */
#define wlan_cpu_to_le32(x) swap_byte_32(x)
/** Convert to 64 bit little endian format from CPU format */
#define wlan_cpu_to_le64(x) swap_byte_64(x)
/** Convert TxPD to little endian format from CPU format */
#define endian_convert_TxPD(x) \
{ \
(x)->tx_pkt_length = wlan_cpu_to_le16((x)->tx_pkt_length); \
(x)->tx_pkt_offset = wlan_cpu_to_le16((x)->tx_pkt_offset); \
(x)->tx_pkt_type = wlan_cpu_to_le16((x)->tx_pkt_type); \
(x)->tx_control = wlan_cpu_to_le32((x)->tx_control); \
(x)->tx_control_1 = wlan_cpu_to_le32((x)->tx_control_1); \
}
/** Convert RxPD from little endian format to CPU format */
#define endian_convert_RxPD(x) \
{ \
(x)->rx_pkt_length = wlan_le16_to_cpu((x)->rx_pkt_length); \
(x)->rx_pkt_offset = wlan_le16_to_cpu((x)->rx_pkt_offset); \
(x)->rx_pkt_type = wlan_le16_to_cpu((x)->rx_pkt_type); \
(x)->seq_num = wlan_le16_to_cpu((x)->seq_num); \
(x)->rx_info = wlan_le32_to_cpu((x)->rx_info);
}
/** Convert RxPD extra header from little endian format to CPU format */
#define endian_convert_RxPD_extra_header(x) \
do { \
(x)->channel_flags = wlan_le16_to_cpu((x)->channel_flags); \
(x)->vht_sig1 = wlan_le32_to_cpu((x)->vht_sig1); \
(x)->vht_sig2 = wlan_le32_to_cpu((x)->vht_sig2); \
} while (0)
#else
/** Convert ulong n/w to host */
#define mlan_ntohl(x) swap_byte_32(x)
/** Convert host ulong to n/w */
@ -341,6 +390,7 @@ extern t_u32 mlan_drvdbg;
#define endian_convert_RxPD_extra_header(x) \
do { \
} while (0)
#endif /* BIG_ENDIAN_SUPPORT */
/** Global moal_assert_callback */
extern t_void (*assert_callback)(t_void *pmoal_handle, t_u32 cond);
@ -2268,7 +2318,7 @@ typedef struct _adapter_operations {
} mlan_adapter_operations;
/** Adapter data structure for MLAN */
typedef struct _mlan_adapter {
struct _mlan_adapter {
/** MOAL handle structure */
t_void *pmoal_handle;
/** BSS Attributes */
@ -2791,7 +2841,7 @@ typedef struct _mlan_adapter {
/* higher 8 bytes of uuid */
t_u64 uuid_hi;
} mlan_adapter, *pmlan_adapter;
};
/** Check if stream 2X2 enabled */
#define IS_STREAM_2X2(x) ((x)&FEATURE_CTRL_STREAM_2X2)

View file

@ -24,7 +24,7 @@
#define _MLAN_DECL_H_
/** MLAN release version */
#define MLAN_RELEASE_VERSION "362"
#define MLAN_RELEASE_VERSION "366.p3"
/** Re-define generic data types for MLAN/MOAL */
/** Signed char (1-byte) */
@ -967,6 +967,16 @@ typedef enum _dfs_moe_t {
/** Band_Config_t */
typedef MLAN_PACK_START struct _Band_Config_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=user*/
t_u8 scanMode : 2;
/** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */
t_u8 chan2Offset : 2;
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
t_u8 chanWidth : 2;
/** Band Info - (00)=2.4GHz, (01)=5GHz */
t_u8 chanBand : 2;
#else
/** Band Info - (00)=2.4GHz, (01)=5GHz */
t_u8 chanBand : 2;
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
@ -975,6 +985,7 @@ typedef MLAN_PACK_START struct _Band_Config_t {
t_u8 chan2Offset : 2;
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=Adoption mode*/
t_u8 scanMode : 2;
#endif
} MLAN_PACK_END Band_Config_t;
/** channel_band_t */
@ -1176,6 +1187,16 @@ typedef MLAN_PACK_START struct _radiotap_info {
/** txpower structure */
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
/** Host tx power ctrl:
0x0: use fw setting for TX power
0x1: value specified in bit[6] and bit[5:0] are valid */
t_u8 hostctl : 1;
/** Sign of the power specified in bit[5:0] */
t_u8 sign : 1;
/** Power to be used for transmission(in dBm) */
t_u8 abs_val : 6;
#else
/** Power to be used for transmission(in dBm) */
t_u8 abs_val : 6;
/** Sign of the power specified in bit[5:0] */
@ -1184,6 +1205,7 @@ typedef MLAN_PACK_START struct {
0x0: use fw setting for TX power
0x1: value specified in bit[6] and bit[5:0] are valid */
t_u8 hostctl : 1;
#endif
} MLAN_PACK_END tx_power_t;
/* pkt_txctrl */
typedef MLAN_PACK_START struct _pkt_txctrl {

View file

@ -46,10 +46,17 @@ typedef enum _WLAN_802_11_NETWORK_TYPE {
Wlan802_11NetworkTypeMax
} WLAN_802_11_NETWORK_TYPE;
#ifdef BIG_ENDIAN_SUPPORT
/** Frame control: Type Mgmt frame */
#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x3000
/** Frame control: SubType Mgmt frame */
#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc)&0xF000) >> 12)
#else
/** Frame control: Type Mgmt frame */
#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x000C
/** Frame control: SubType Mgmt frame */
#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc)&0x00F0) >> 4)
#endif
#ifdef PRAGMA_PACK
#pragma pack(push, 1)
@ -172,12 +179,21 @@ typedef MLAN_PACK_START struct _IEEEtypes_Generic_t {
/**ft capability policy*/
typedef MLAN_PACK_START struct _IEEEtypes_FtCapPolicy_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Reserved */
t_u8 reserved : 6;
/** RIC support */
t_u8 ric : 1;
/** FT over the DS capable */
t_u8 ft_over_ds : 1;
#else
/** FT over the DS capable */
t_u8 ft_over_ds : 1;
/** RIC support */
t_u8 ric : 1;
/** Reserved */
t_u8 reserved : 6;
#endif
} MLAN_PACK_END IEEEtypes_FtCapPolicy_t;
/** Mobility domain IE */
@ -310,6 +326,25 @@ typedef MLAN_PACK_START struct _TLV_Generic_t {
#define CAPINFO_MASK (~(MBIT(15) | MBIT(14) | MBIT(11) | MBIT(9)))
/** Capability Bit Map*/
#ifdef BIG_ENDIAN_SUPPORT
typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
t_u8 rsrvd1 : 2;
t_u8 dsss_ofdm : 1;
t_u8 radio_measurement : 1;
t_u8 rsvrd2 : 1;
t_u8 short_slot_time : 1;
t_u8 rsrvd3 : 1;
t_u8 spectrum_mgmt : 1;
t_u8 chan_agility : 1;
t_u8 pbcc : 1;
t_u8 short_preamble : 1;
t_u8 privacy : 1;
t_u8 cf_poll_rqst : 1;
t_u8 cf_pollable : 1;
t_u8 ibss : 1;
t_u8 ess : 1;
} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
#else
typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
/** Capability Bit Map : ESS */
t_u8 ess : 1;
@ -342,6 +377,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
/** Capability Bit Map : Reserved */
t_u8 rsrvd1 : 2;
} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
#endif /* BIG_ENDIAN_SUPPORT */
/** IEEEtypes_Ssid_t */
typedef MLAN_PACK_START struct _IEEEtypes_Ssid_t {
@ -556,16 +592,35 @@ typedef MLAN_PACK_START struct _IEEEtypes_Wpa_t {
/** Data structure of WMM QoS information */
typedef MLAN_PACK_START struct _IEEEtypes_WmmQosInfo_t {
#ifdef BIG_ENDIAN_SUPPORT
/** QoS UAPSD */
t_u8 qos_uapsd : 1;
/** Reserved */
t_u8 reserved : 3;
/** Parameter set count */
t_u8 para_set_count : 4;
#else
/** Parameter set count */
t_u8 para_set_count : 4;
/** Reserved */
t_u8 reserved : 3;
/** QoS UAPSD */
t_u8 qos_uapsd : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END IEEEtypes_WmmQosInfo_t, *pIEEEtypes_WmmQosInfo_t;
/** Data structure of WMM Aci/Aifsn */
typedef MLAN_PACK_START struct _IEEEtypes_WmmAciAifsn_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Reserved */
t_u8 reserved : 1;
/** Aci */
t_u8 aci : 2;
/** Acm */
t_u8 acm : 1;
/** Aifsn */
t_u8 aifsn : 4;
#else
/** Aifsn */
t_u8 aifsn : 4;
/** Acm */
@ -574,14 +629,22 @@ typedef MLAN_PACK_START struct _IEEEtypes_WmmAciAifsn_t {
t_u8 aci : 2;
/** Reserved */
t_u8 reserved : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END IEEEtypes_WmmAciAifsn_t, *pIEEEtypes_WmmAciAifsn_t;
/** Data structure of WMM ECW */
typedef MLAN_PACK_START struct _IEEEtypes_WmmEcw_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Maximum Ecw */
t_u8 ecw_max : 4;
/** Minimum Ecw */
t_u8 ecw_min : 4;
#else
/** Minimum Ecw */
t_u8 ecw_min : 4;
/** Maximum Ecw */
t_u8 ecw_max : 4;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END IEEEtypes_WmmEcw_t, *pIEEEtypes_WmmEcw_t;
/** Data structure of WMM AC parameters */
@ -669,6 +732,22 @@ typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e {
/** Data structure of WMM TSPEC information */
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
t_u8 Reserved17_23 : 7; /* ! Reserved */
t_u8 Schedule : 1;
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
t_u8 UserPri : 3; /* ! 802.1d User Priority */
// IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /*
// !Legacy/Trigg*/
t_u8 PowerSaveBehavior : 1;
t_u8 Aggregation : 1; /* ! Reserved */
t_u8 AccessPolicy2 : 1; /* ! */
t_u8 AccessPolicy1 : 1; /* ! */
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
t_u8 TID : 4; /* ! Unique identifier */
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
t_u8 TrafficType : 1;
#else
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
t_u8 TrafficType : 1;
t_u8 TID : 4; /* ! Unique identifier */
@ -683,19 +762,31 @@ typedef MLAN_PACK_START struct {
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
t_u8 Schedule : 1;
t_u8 Reserved17_23 : 7; /* ! Reserved */
#endif
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_t;
/** Data structure of WMM TSPEC Nominal Size */
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
nominal */
t_u16 Size : 15; /* ! Nominal size in octets */
#else
t_u16 Size : 15; /* ! Nominal size in octets */
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
nominal */
#endif
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_NomMSDUSize_t;
/** Data structure of WMM TSPEC SBWA */
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
t_u16 Whole : 3; /* ! Whole portion */
t_u16 Fractional : 13; /* ! Fractional portion */
#else
t_u16 Fractional : 13; /* ! Fractional portion */
t_u16 Whole : 3; /* ! Whole portion */
#endif
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_SBWA;
/** Data structure of WMM TSPEC Body */
@ -1036,6 +1127,26 @@ typedef MLAN_PACK_START struct _VHT_MCS_set {
/** VHT Capabilities info field, reference 802.11ac D1.4 p89 */
typedef MLAN_PACK_START struct _VHT_capa {
#if 0
#ifdef BIG_ENDIAN_SUPPORT
t_u8 mpdu_max_len:2;
t_u8 chan_width:2;
t_u8 rx_LDPC:1;
t_u8 sgi_80:1;
t_u8 sgi_160:1;
t_u8 tx_STBC:1;
t_u8 rx_STBC:3;
t_u8 SU_beamformer_capa:1;
t_u8 SU_beamformee_capa:1;
t_u8 beamformer_ante_num:3;
t_u8 sounding_dim_num:3;
t_u8 MU_beamformer_capa:1;
t_u8 MU_beamformee_capa:1;
t_u8 VHT_TXOP_ps:1;
t_u8 HTC_VHT_capa:1;
t_u8 max_ampdu_len:3;
t_u8 link_apapt_capa:2;
t_u8 reserved_1:4;
#else
t_u8 reserved_1:4;
t_u8 link_apapt_capa:2;
t_u8 max_ampdu_len:3;
@ -1054,6 +1165,7 @@ typedef MLAN_PACK_START struct _VHT_capa {
t_u8 rx_LDPC:1;
t_u8 chan_width:2;
t_u8 mpdu_max_len:2;
#endif /* BIG_ENDIAN_SUPPORT */
#endif
t_u32 vht_cap_info;
VHT_MCS_set_t mcs_sets;
@ -1162,6 +1274,24 @@ typedef MLAN_PACK_START struct _IEEEtypes_Extension_t {
} MLAN_PACK_END IEEEtypes_Extension_t, *pIEEEtypes_Extension_t;
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsMap_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Max HE-MAC for 8 SS */
t_u8 max_mcs_8ss : 2;
/** Max HE-MAC for 7 SS */
t_u8 max_mcs_7ss : 2;
/** Max HE-MAC for 6 SS */
t_u8 max_mcs_6ss : 2;
/** Max HE-MAC for 5 SS */
t_u8 max_mcs_5ss : 2;
/** Max HE-MAC for 4 SS */
t_u8 max_mcs_4ss : 2;
/** Max HE-MAC for 3 SS */
t_u8 max_mcs_3ss : 2;
/** Max HE-MAC for 2 SS */
t_u8 max_mcs_2ss : 2;
/** Max HE-MAC for 1 SS */
t_u8 max_mcs_1ss : 2;
#else
/** Max HE-MAC for 1 SS */
t_u8 max_mcs_1ss : 2;
/** Max HE-MAC for 2 SS */
@ -1178,6 +1308,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_HeMcsMap_t {
t_u8 max_mcs_7ss : 2;
/** Max HE-MAC for 8 SS */
t_u8 max_mcs_8ss : 2;
#endif
} MLAN_PACK_END IEEEtypes_HeMcsMap_t, *pIEEEtypes_HeMcsMap_t;
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsNss_t {
@ -1204,6 +1335,24 @@ typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
} MLAN_PACK_END IEEEtypes_HECap_t, *pIEEEtypes_HECap_t;
typedef MLAN_PACK_START struct _IEEEtypes_HeOpParam_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Reserved, including 6G Operation Info Pressent (bit17) */
t_u8 reserved : 6; /* bit 18-23 */
/* 6g operation info present */
t_u8 he_6g_op_info_present : 1; /* bit 17 */
/** ER SU Disable */
t_u8 er_su_disable : 1; /* bit 16 */
/** Co-Hosted BSS */
t_u16 co_located_bss : 1; /* bit 15 */
/** VHT Operation Info Present */
t_u16 vht_op_info_present : 1; /* bit 14 */
/** TXOP Duration RTS Threshold */
t_u16 txop_dur_rts_threshold : 10; /* bit 4-13 */
/** TWT Required */
t_u16 twt_req : 1; /* bit 3 */
/** Default PE Duration */
t_u16 default_pe_dur : 3; /* bit 0-2 */
#else
/** Default PE Duration */
t_u16 default_pe_dur : 3; /* bit 0-2 */
/** TWT Required */
@ -1220,15 +1369,25 @@ typedef MLAN_PACK_START struct _IEEEtypes_HeOpParam_t {
t_u8 he_6g_op_info_present : 1; /* bit 17 */
/** Reserved bit 18-23 */
t_u8 reserved : 6; /* bit 18-23 */
#endif
} MLAN_PACK_END IEEEtypes_HeOpParam_t;
typedef MLAN_PACK_START struct _IEEEtypes_HeBssColorInfo_t {
#ifdef BIG_ENDIAN_SUPPORT
/** BSS Color Disabled */
t_u8 bss_color_disabled : 1; /* bit 7 */
/** Partial BSS Color */
t_u8 partial_bss_color : 1; /* bit 6 */
/** BSS Color */
t_u8 bss_color : 6; /* bit 0-5 */
#else
/** BSS Color */
t_u8 bss_color : 6; /* bit 0-5 */
/** Partial BSS Color */
t_u8 partial_bss_color : 1; /* bit 6 */
/** BSS Color Disabled */
t_u8 bss_color_disabled : 1; /* bit 7 */
#endif
} MLAN_PACK_END IEEEtypes_HeBssColorInfo_t;
typedef MLAN_PACK_START struct _IEEEtypes_HeOp_t {
@ -1390,6 +1549,20 @@ typedef MLAN_PACK_START struct {
*** @brief Map octet of the basic measurement report (7.3.2.22.1)
**/
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
/**< Reserved */
t_u8 rsvd5_7 : 3;
/**< Channel is unmeasured */
t_u8 unmeasured : 1;
/**< Radar detected on channel */
t_u8 radar : 1;
/**< Unidentified signal found on channel */
t_u8 unidentified_sig : 1;
/**< OFDM preamble detected on channel */
t_u8 ofdm_preamble : 1;
/**< At least one valid MPDU received on channel */
t_u8 bss : 1;
#else
/**< At least one valid MPDU received on channel */
t_u8 bss : 1;
/**< OFDM preamble detected on channel */
@ -1402,6 +1575,7 @@ typedef MLAN_PACK_START struct {
t_u8 unmeasured : 1;
/**< Reserved */
t_u8 rsvd5_7 : 3;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END MeasRptBasicMap_t;

View file

@ -770,14 +770,31 @@ typedef struct _mlan_ssid_bssid {
/** Data structure of WMM ECW */
typedef struct _wmm_ecw_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Maximum Ecw */
t_u8 ecw_max : 4;
/** Minimum Ecw */
t_u8 ecw_min : 4;
#else
/** Minimum Ecw */
t_u8 ecw_min : 4;
/** Maximum Ecw */
t_u8 ecw_max : 4;
#endif /* BIG_ENDIAN_SUPPORT */
} wmm_ecw_t, *pwmm_ecw_t;
/** Data structure of WMM Aci/Aifsn */
typedef struct _wmm_aci_aifsn_t {
#ifdef BIG_ENDIAN_SUPPORT
/** Reserved */
t_u8 reserved : 1;
/** Aci */
t_u8 aci : 2;
/** Acm */
t_u8 acm : 1;
/** Aifsn */
t_u8 aifsn : 4;
#else
/** Aifsn */
t_u8 aifsn : 4;
/** Acm */
@ -786,6 +803,7 @@ typedef struct _wmm_aci_aifsn_t {
t_u8 aci : 2;
/** Reserved */
t_u8 reserved : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} wmm_aci_aifsn_t, *pwmm_aci_aifsn_t;
/** Data structure of WMM AC parameters */
@ -992,12 +1010,21 @@ typedef struct _wep_param {
/** Data structure of WMM QoS information */
typedef struct _wmm_qos_info_t {
#ifdef BIG_ENDIAN_SUPPORT
/** QoS UAPSD */
t_u8 qos_uapsd : 1;
/** Reserved */
t_u8 reserved : 3;
/** Parameter set count */
t_u8 para_set_count : 4;
#else
/** Parameter set count */
t_u8 para_set_count : 4;
/** Reserved */
t_u8 reserved : 3;
/** QoS UAPSD */
t_u8 qos_uapsd : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} wmm_qos_info_t, *pwmm_qos_info_t;
/** Data structure of WMM parameter IE */
@ -1913,6 +1940,100 @@ typedef struct _mlan_ver_ext {
char version_str[MLAN_MAX_VER_STR_LEN];
} mlan_ver_ext, *pmlan_ver_ext;
#ifdef BIG_ENDIAN_SUPPORT
/** Extended Capabilities Data */
typedef struct MLAN_PACK_START _ExtCap_t {
/** Extended Capabilities value */
t_u8 rsvdBit87 : 1; /* bit 87 */
t_u8 rsvdBit86 : 1; /* bit 86 */
t_u8 rsvdBit85 : 1; /* bit 85 */
t_u8 beacon_prot : 1; /* bit 84 */
t_u8 rsvdBit83 : 1; /* bit 83 */
t_u8 rsvdBit82 : 1; /* bit 82 */
t_u8 rsvdBit81 : 1; /* bit 81 */
t_u8 rsvdBit80 : 1; /* bit 80 */
t_u8 rsvdBit79 : 1; /* bit 79 */
t_u8 TWTResp : 1; /* bit 78 */
t_u8 TWTReq : 1; /* bit 77 */
t_u8 rsvdBit76 : 1; /* bit 76 */
t_u8 rsvdBit75 : 1; /* bit 75 */
t_u8 rsvdBit74 : 1; /* bit 74 */
t_u8 rsvdBit73 : 1; /* bit 73 */
t_u8 FILS : 1; /* bit 72 */
t_u8 FTMI : 1; /* bit 71 */
t_u8 FTMR : 1; /* bit 70 */
t_u8 CAQ : 1; /* bit 69 */
t_u8 rsvdBit68 : 1; /* bit 68 */
t_u8 NCC : 1; /* bit 67 */
t_u8 rsvdBit66 : 1; /* bit 66 */
t_u8 chanSchedMgnt : 1; /* bit 65 */
t_u8 MaxAMSDU1 : 1; /* bit 64 */
t_u8 MaxAMSDU0 : 1; /* bit 63 */
t_u8 OperModeNtf : 1; /* bit 62 */
t_u8 TDLSWildBandwidth : 1; /* bit 61 */
t_u8 rsvdBit60 : 1; /* bit 60 */
t_u8 rsvdBit59 : 1; /* bit 59 */
t_u8 rsvdBit58 : 1; /* bit 58 */
t_u8 rsvdBit57 : 1; /* bit 57 */
t_u8 rsvdBit56 : 1; /* bit 56 */
t_u8 rsvdBit55 : 1; /* bit 55 */
t_u8 rsvdBit54 : 1; /* bit 54 */
t_u8 rsvdBit53 : 1; /* bit 53 */
t_u8 rsvdBit52 : 1; /* bit 52 */
t_u8 rsvdBit51 : 1; /* bit 51 */
t_u8 rsvdBit50 : 1; /* bit 50 */
t_u8 rsvdBit49 : 1; /* bit 49 */
t_u8 rsvdBit48 : 1; /* bit 48 */
t_u8 rsvdBit47 : 1; /* bit 47 */
t_u8 rsvdBit46 : 1; /* bit 46 */
t_u8 rsvdBit45 : 1; /* bit 45 */
t_u8 rsvdBit44 : 1; /* bit 44 */
t_u8 rsvdBit43 : 1; /* bit 43 */
t_u8 rsvdBit42 : 1; /* bit 42 */
t_u8 rsvdBit41 : 1; /* bit 41 */
t_u8 rsvdBit40 : 1; /* bit 40 */
t_u8 TDLSChlSwitchProhib : 1; /* bit 39 */
t_u8 TDLSProhibited : 1; /* bit 38 */
t_u8 TDLSSupport : 1; /* bit 37 */
t_u8 MSGCF_Capa : 1; /* bit 36 */
t_u8 Reserved35 : 1; /* bit 35 */
t_u8 SSPN_Interface : 1; /* bit 34 */
t_u8 EBR : 1; /* bit 33 */
t_u8 Qos_Map : 1; /* bit 32 */
t_u8 Interworking : 1; /* bit 31 */
t_u8 TDLSChannelSwitching : 1; /* bit 30 */
t_u8 TDLSPeerPSMSupport : 1; /* bit 29 */
t_u8 TDLSPeerUAPSDSupport : 1; /* bit 28 */
t_u8 UTC : 1; /* bit 27 */
t_u8 DMS : 1; /* bit 26 */
t_u8 SSID_List : 1; /* bit 25 */
t_u8 ChannelUsage : 1; /* bit 24 */
t_u8 TimingMeasurement : 1; /* bit 23 */
t_u8 MultipleBSSID : 1; /* bit 22 */
t_u8 AC_StationCount : 1; /* bit 21 */
t_u8 QoSTrafficCap : 1; /* bit 20 */
t_u8 BSS_Transition : 1; /* bit 19 */
t_u8 TIM_Broadcast : 1; /* bit 18 */
t_u8 WNM_Sleep : 1; /* bit 17 */
t_u8 TFS : 1; /* bit 16 */
t_u8 GeospatialLocation : 1; /* bit 15 */
t_u8 CivicLocation : 1; /* bit 14 */
t_u8 CollocatedIntf : 1; /* bit 13 */
t_u8 ProxyARPService : 1; /* bit 12 */
t_u8 FMS : 1; /* bit 11 */
t_u8 LocationTracking : 1; /* bit 10 */
t_u8 MulticastDiagnostics : 1; /* bit 9 */
t_u8 Diagnostics : 1; /* bit 8 */
t_u8 Event : 1; /* bit 7 */
t_u8 SPSMP_Support : 1; /* bit 6 */
t_u8 Reserved5 : 1; /* bit 5 */
t_u8 PSMP_Capable : 1; /* bit 4 */
t_u8 RejectUnadmFrame : 1; /* bit 3 */
t_u8 ExtChanSwitching : 1; /* bit 2 */
t_u8 Reserved1 : 1; /* bit 1 */
t_u8 BSS_CoexistSupport : 1; /* bit 0 */
} MLAN_PACK_END ExtCap_t, *pExtCap_t;
#else
/** Extended Capabilities Data */
typedef struct MLAN_PACK_START _ExtCap_t {
/** Extended Capabilities value */
@ -2005,6 +2126,7 @@ typedef struct MLAN_PACK_START _ExtCap_t {
t_u8 rsvdBit86 : 1; /* bit 86 */
t_u8 rsvdBit87 : 1; /* bit 87 */
} MLAN_PACK_END ExtCap_t, *pExtCap_t;
#endif
/** ExtCap : TDLS prohibited */
#define IS_EXTCAP_TDLS_PROHIBITED(ext_cap) (ext_cap.TDLSProhibited)

View file

@ -1042,6 +1042,44 @@ done:
#endif /* KERNEL_VERSION */
#endif /* WIFI_DIRECT_SUPPORT */
#ifdef UAP_SUPPORT
/**
* @brief Request to cancel CAC
*
* @param priv A pointer to moal_private structure
*
* @return N/A */
void woal_cancel_cac(moal_private *priv)
{
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)
if (priv->phandle->is_cac_timer_set &&
priv->bss_index == priv->phandle->cac_bss_index) {
woal_cancel_timer(&priv->phandle->cac_timer);
priv->phandle->is_cac_timer_set = MFALSE;
/* Make sure Chan Report is cancelled */
if (woal_11h_cancel_chan_report_ioctl(priv, MOAL_IOCTL_WAIT))
PRINTM(MERROR, "%s: cancel chan report failed \n",
__func__);
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
cfg80211_cac_event(priv->netdev, &priv->phandle->dfs_channel,
NL80211_RADAR_CAC_ABORTED, GFP_KERNEL);
#else
cfg80211_cac_event(priv->netdev, NL80211_RADAR_CAC_ABORTED,
GFP_KERNEL);
#endif
memset(&priv->phandle->dfs_channel, 0,
sizeof(struct cfg80211_chan_def));
priv->phandle->cac_bss_index = 0xff;
}
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
if (moal_extflg_isset(priv->phandle, EXT_DFS_OFFLOAD))
woal_cancel_cac_block(priv);
#endif
return;
}
#endif
/**
* @brief Request the driver to change the interface type
*
@ -1211,7 +1249,7 @@ int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy,
#endif /* WIFI_DIRECT_SUPPORT */
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
if (priv->bss_type == MLAN_BSS_TYPE_UAP) {
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
woal_cfg80211_del_beacon(wiphy, dev, 0);
#else
woal_cfg80211_del_beacon(wiphy, dev);
@ -1445,7 +1483,7 @@ fail:
*/
#endif
int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if IMX_ANDROID_13
int link_id,
#endif
t_u8 key_index,
@ -1504,7 +1542,7 @@ int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev,
*/
#endif
int woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if IMX_ANDROID_13
int link_id,
#endif
t_u8 key_index,
@ -1563,7 +1601,7 @@ int woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev,
#endif
int woal_cfg80211_set_default_key(struct wiphy *wiphy,
struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if IMX_ANDROID_13
int link_id,
#endif
t_u8 key_index
@ -1598,7 +1636,7 @@ int woal_cfg80211_set_default_key(struct wiphy *wiphy,
#if KERNEL_VERSION(2, 6, 30) <= CFG80211_VERSION_CODE
int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if IMX_ANDROID_13
int link_id,
#endif
t_u8 key_index)
@ -1612,7 +1650,7 @@ int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
#if KERNEL_VERSION(5, 10, 0) <= CFG80211_VERSION_CODE
int woal_cfg80211_set_default_beacon_key(struct wiphy *wiphy,
struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if IMX_ANDROID_13
int link_id,
#endif
t_u8 key_index)
@ -2199,7 +2237,7 @@ done:
* @return 0 -- success, otherwise fail
*/
int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
#if KERNEL_VERSION(5, 19, 2) <= CFG80211_VERSION_CODE
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
unsigned int link_id,
#endif
const u8 *peer,
@ -2760,6 +2798,7 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
if (!priv->bss_started) {
PRINTM(MCMND,
"Drop deauth packet before AP started\n");
woal_cancel_cac(priv);
goto done;
}
#endif
@ -4719,7 +4758,7 @@ done:
*/
void woal_cfg80211_free_bands(struct wiphy *wiphy)
{
enum nl80211_band band;
t_u8 band;
for (band = NL80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; ++band) {
if (!wiphy->bands[band])
@ -4893,7 +4932,7 @@ void woal_cfg80211_notify_channel(moal_private *priv,
#if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
mutex_lock(&priv->wdev->mtx);
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
cfg80211_ch_switch_notify(priv->netdev, &chandef, 0);
#else
cfg80211_ch_switch_notify(priv->netdev, &chandef);
@ -5242,7 +5281,8 @@ int woal_get_wiphy_chan_dfs_state(struct wiphy *wiphy,
if (sband->channels[i].flags & IEEE80211_CHAN_RADAR) {
#if CFG80211_VERSION_CODE > KERNEL_VERSION(3, 8, 13)
ch_dfs_state->dfs_state =
sband->channels[i].dfs_state;
(dfs_state_t)sband->channels[i]
.dfs_state;
ch_dfs_state->dfs_required = MTRUE;
#endif
}

View file

@ -128,7 +128,7 @@ int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy,
int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if IMX_ANDROID_13
int link_id,
#endif
t_u8 key_index,
@ -138,7 +138,7 @@ int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
const t_u8 *mac_addr, struct key_params *params);
int woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if IMX_ANDROID_13
int link_id,
#endif
t_u8 key_index,
@ -162,7 +162,7 @@ int woal_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device *dev);
#endif
int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
#if KERNEL_VERSION(5, 19, 2) <= CFG80211_VERSION_CODE
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
unsigned int link_id,
#endif
const u8 *peer,
@ -213,7 +213,7 @@ int woal_cfg80211_set_channel(struct wiphy *wiphy,
#if KERNEL_VERSION(2, 6, 37) < CFG80211_VERSION_CODE
int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if IMX_ANDROID_13
int link_id,
#endif
t_u8 key_index, bool ucast, bool mcast);
@ -225,7 +225,7 @@ int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev,
#if KERNEL_VERSION(2, 6, 30) <= CFG80211_VERSION_CODE
int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if IMX_ANDROID_13
int link_id,
#endif
t_u8 key_index);
@ -234,7 +234,7 @@ int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
#if KERNEL_VERSION(5, 10, 0) <= CFG80211_VERSION_CODE
int woal_cfg80211_set_default_beacon_key(struct wiphy *wiphy,
struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if IMX_ANDROID_13
int link_id,
#endif
t_u8 key_index);
@ -293,6 +293,11 @@ extern struct ieee80211_supported_band mac1_cfg80211_band_5ghz;
int woal_cfg80211_bss_role_cfg(moal_private *priv, t_u16 action,
t_u8 *bss_role);
#endif
#ifdef UAP_SUPPORT
void woal_cancel_cac(moal_private *priv);
#endif
#if KERNEL_VERSION(4, 1, 0) <= CFG80211_VERSION_CODE
struct wireless_dev *
woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, const char *name,
@ -436,7 +441,7 @@ int woal_cfg80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
struct beacon_parameters *params);
#endif
#if KERNEL_VERSION(5, 19, 2) <= CFG80211_VERSION_CODE
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev,
unsigned int link_id);
#else

View file

@ -52,6 +52,18 @@ static const struct nl80211_vendor_cmd_info vendor_events[] = {
.vendor_id = MRVL_VENDOR_ID,
.subcmd = event_fw_dump_done,
}, /*event_id 1*/
{
.vendor_id = MRVL_VENDOR_ID,
.subcmd = event_fw_reset_success,
}, /*event_id 2*/
{
.vendor_id = MRVL_VENDOR_ID,
.subcmd = event_fw_reset_failure,
}, /*event_id 3*/
{
.vendor_id = MRVL_VENDOR_ID,
.subcmd = event_fw_reset_start,
}, /*event_id 4*/
{
.vendor_id = MRVL_VENDOR_ID,
.subcmd = event_rssi_monitor,
@ -775,7 +787,8 @@ static int woal_cfg80211_subcmd_get_supp_feature_set(struct wiphy *wiphy,
| WLAN_FEATURE_LINK_LAYER_STATS |
WLAN_FEATURE_LOGGER | WLAN_FEATURE_RSSI_MONITOR |
WLAN_FEATURE_CONFIG_NDO | WLAN_FEATURE_SCAN_RAND |
WLAN_FEATURE_MKEEP_ALIVE | WLAN_FEATURE_PNO;
WLAN_FEATURE_MKEEP_ALIVE | WLAN_FEATURE_PNO |
WLAN_FEATURE_TDLS;
memset(&fw_info, 0, sizeof(mlan_fw_info));
if (MLAN_STATUS_SUCCESS !=

View file

@ -626,6 +626,7 @@ enum vendor_event {
event_fw_dump_done = 1,
event_fw_reset_success = 2,
event_fw_reset_failure = 3,
event_fw_reset_start = 4,
event_rssi_monitor = 0x1501,
event_set_key_mgmt_offload = 0x10001,
event_fw_roam_success = 0x10002,

View file

@ -16380,6 +16380,7 @@ static int woal_priv_extend_channel_switch(moal_private *priv, t_u8 *respbuf,
int ret = 0;
int user_data_len = 0;
int data[5] = {0};
t_u8 channel;
mlan_ds_11h_chan_dfs_state ch_dfs;
ENTER();
@ -16409,26 +16410,35 @@ static int woal_priv_extend_channel_switch(moal_private *priv, t_u8 *respbuf,
LEAVE();
return ret;
}
memset(&ch_dfs, 0, sizeof(ch_dfs));
ch_dfs.channel = data[2];
if (woal_11h_chan_dfs_state(priv, MLAN_ACT_GET, &ch_dfs)) {
PRINTM(MERROR, "%s: woal_11h_chan_dfs_state failed \n",
__func__);
ret = -EFAULT;
LEAVE();
return ret;
/* For 2.4G channels skip the DFS checks */
channel = data[2];
if (channel > MAX_BG_CHANNEL) {
memset(&ch_dfs, 0, sizeof(ch_dfs));
ch_dfs.channel = data[2];
if (woal_11h_chan_dfs_state(priv, MLAN_ACT_GET, &ch_dfs)) {
PRINTM(MERROR, "%s: woal_11h_chan_dfs_state failed \n",
__func__);
ret = -EFAULT;
LEAVE();
return ret;
}
if (ch_dfs.dfs_required &&
(ch_dfs.dfs_state == DFS_UNAVAILABLE ||
ch_dfs.dfs_state == DFS_USABLE)) {
PRINTM(MERROR,
"DFS: Channel=%d is not Available, cannot switch to this channel\n",
data[2]);
ret = -EFAULT;
LEAVE();
return ret;
}
if (ch_dfs.dfs_required)
woal_enable_dfs(priv, data[2], MOAL_IOCTL_WAIT);
}
if (ch_dfs.dfs_required && (ch_dfs.dfs_state == DFS_UNAVAILABLE ||
ch_dfs.dfs_state == DFS_USABLE)) {
PRINTM(MERROR,
"DFS: Channel=%d is not Available, cannot switch to this channel\n",
data[2]);
ret = -EFAULT;
LEAVE();
return ret;
}
if (ch_dfs.dfs_required)
woal_enable_dfs(priv, data[2], MOAL_IOCTL_WAIT);
if (data[1]) {
if (woal_check_valid_channel_operclass(priv, data[2],
data[1])) {

View file

@ -7541,15 +7541,41 @@ static int parse_radio_mode_string(const char *s, size_t len,
return ret;
}
/*
* @brief PoweLevelToDUT11Bits
*
* @param Pwr A user txpwr values of type int
* @param PowerLevel A Pointer of uint32 type for converted txpwr vals
* @return nothing just exit
*/
static void PoweLevelToDUT11Bits(int Pwr, t_u32 *PowerLevel)
{
int Z = 0;
if ((Pwr > 64) || (Pwr < -64))
return;
Z = (int)(Pwr * 16);
if (Z < 0) {
Z = Z + (1 << 11);
}
(*PowerLevel) = (t_u32)Z;
return;
}
/*
* @brief Parse mfg cmd tx pwr string
*
* @param handle A pointer to moal_handle structure
* @param s A pointer to user buffer
* @param len Length of user buffer
* @param d A pointer to mfg_cmd_generic_cfg struct
* @return 0 on success, -EINVAL otherwise
*/
static int parse_tx_pwr_string(const char *s, size_t len,
static int parse_tx_pwr_string(moal_handle *handle, const char *s, size_t len,
struct mfg_cmd_generic_cfg *d)
{
int ret = MLAN_STATUS_SUCCESS;
@ -7557,12 +7583,19 @@ static int parse_tx_pwr_string(const char *s, size_t len,
char *tmp = NULL;
char *pos = NULL;
gfp_t flag;
t_u32 tx_pwr_converted = 0xffffffff;
int tx_pwr_local = 0;
t_u8 fc_card = MFALSE;
ENTER();
if (!s || !d) {
LEAVE();
return -EINVAL;
}
#ifdef SD9177
if (IS_SD9177(handle->card_type))
fc_card = MTRUE;
#endif
flag = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL;
string = kzalloc(TX_PWR_STR_LEN, flag);
if (string == NULL) {
@ -7578,9 +7611,15 @@ static int parse_tx_pwr_string(const char *s, size_t len,
/* tx power value */
pos = strsep(&string, " \t");
if (pos)
if (fc_card && pos) {
/* for sd9177 we need to convert user power vals including -ve
* vals as per labtool */
tx_pwr_local = woal_string_to_number(pos);
PoweLevelToDUT11Bits(tx_pwr_local, &tx_pwr_converted);
d->data1 = tx_pwr_converted;
} else if (pos) {
d->data1 = (t_u32)woal_string_to_number(pos);
}
/* modulation */
pos = strsep(&string, " \t");
if (pos)
@ -7591,7 +7630,7 @@ static int parse_tx_pwr_string(const char *s, size_t len,
if (pos)
d->data3 = (t_u32)woal_string_to_number(pos);
if ((d->data1 > 24) || (d->data2 > 2))
if (((!fc_card) && (d->data1 > 24)) || (d->data2 > 2))
ret = -EINVAL;
kfree(tmp);
@ -7637,13 +7676,13 @@ static int parse_tx_cont_string(const char *s, size_t len,
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->cw_mode = (t_u32)woal_string_to_number(pos);
if (d->enable_tx == MFALSE)
goto done;
pos = strsep(&string, " \t");
if (pos)
d->payload_pattern = (t_u32)woal_string_to_number(pos);
@ -7997,7 +8036,7 @@ mlan_status woal_process_rf_test_mode_cmd(moal_handle *handle, t_u32 cmd,
err = MTRUE;
break;
case MFG_CMD_RFPWR:
if (parse_tx_pwr_string(buffer, len,
if (parse_tx_pwr_string(handle, buffer, len,
&misc->param.mfg_generic_cfg))
err = MTRUE;
break;

View file

@ -939,9 +939,9 @@ static void woal_hang_work_queue(struct work_struct *work)
cfg80211_wext = reset_handle->params.cfg80211_wext;
// stop pending scan
#ifdef STA_CFG80211
if (IS_STA_CFG80211(cfg80211_wext) && reset_handle->scan_request) {
if (IS_STA_CFG80211(cfg80211_wext) && reset_handle->scan_request &&
reset_handle->scan_priv) {
moal_private *scan_priv = reset_handle->scan_priv;
cancel_delayed_work_sync(&reset_handle->scan_timeout_work);
/** some supplicant can not handle SCAN abort event */
if (scan_priv->bss_type == MLAN_BSS_TYPE_STA)
woal_cfg80211_scan_done(reset_handle->scan_request,
@ -951,6 +951,7 @@ static void woal_hang_work_queue(struct work_struct *work)
MFALSE);
reset_handle->scan_request = NULL;
reset_handle->scan_priv = NULL;
cancel_delayed_work_sync(&reset_handle->scan_timeout_work);
reset_handle->scan_pending_on_block = MFALSE;
MOAL_REL_SEMAPHORE(&reset_handle->async_sem);
}
@ -968,7 +969,7 @@ static void woal_hang_work_queue(struct work_struct *work)
#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)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
priv->wdev->connected) {
#else
priv->wdev->current_bss) {
@ -1015,14 +1016,25 @@ static void woal_hang_work_queue(struct work_struct *work)
if (priv) {
woal_broadcast_event(priv, CUS_EVT_FW_RECOVER_START,
strlen(CUS_EVT_FW_RECOVER_START));
#ifdef STA_CFG80211
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
if (IS_STA_OR_UAP_CFG80211(cfg80211_wext))
woal_cfg80211_vendor_event(
priv, event_fw_reset_start,
CUS_EVT_FW_RECOVER_START,
strlen(CUS_EVT_FW_RECOVER_START));
#endif
#endif
}
if (IS_SD(reset_handle->card_type)) {
PRINTM(MMSG, "WIFI auto_fw_reload: fw_reload=1\n");
ret = woal_request_fw_reload(
reset_handle, FW_RELOAD_SDIO_INBAND_RESET);
}
#ifdef PCIE
else if (IS_PCIE(reset_handle->card_type)) {
reset_handle->init_wait_q_woken = MFALSE;
PRINTM(MMSG, "WIFI auto_fw_reload: fw_reload=4\n");
ret = woal_request_fw_reload(reset_handle,
FW_RELOAD_PCIE_RESET);
if (!ret) {
@ -3897,7 +3909,7 @@ static mlan_status woal_init_fw_dpc(moal_handle *handle)
fw.fw_reload = handle->params.fw_reload;
else
fw.fw_reload = 0;
wifi_status = WIFI_STATUS_OK;
wifi_status = WIFI_STATUS_FW_DNLD;
ret = mlan_dnld_fw(handle->pmlan_adapter, &fw);
if (ret == MLAN_STATUS_FAILURE) {
wifi_status = WIFI_STATUS_DNLD_FW_FAIL;
@ -3908,7 +3920,7 @@ static mlan_status woal_init_fw_dpc(moal_handle *handle)
handle->ops.reg_dbg(handle);
goto done;
}
wifi_status = WIFI_STATUS_OK;
wifi_status = WIFI_STATUS_FW_DNLD_COMPLETE;
#if defined(USB)
if (handle->boot_state == USB_FW_DNLD) {
@ -3962,11 +3974,13 @@ static mlan_status woal_init_fw_dpc(moal_handle *handle)
return ret;
}
handle->init_wait_q_woken = MFALSE;
wifi_status = WIFI_STATUS_INIT_FW;
ret = mlan_init_fw(handle->pmlan_adapter);
if (ret == MLAN_STATUS_FAILURE) {
wifi_status = WIFI_STATUS_INIT_FW_FAIL;
goto done;
} else if (ret == MLAN_STATUS_SUCCESS) {
wifi_status = WIFI_STATUS_OK;
handle->hardware_status = HardwareStatusReady;
goto done;
}
@ -3987,6 +4001,7 @@ static mlan_status woal_init_fw_dpc(moal_handle *handle)
ret = MLAN_STATUS_FAILURE;
goto done;
}
wifi_status = WIFI_STATUS_OK;
ret = MLAN_STATUS_SUCCESS;
done:
if (handle->dpd_data) {
@ -4665,7 +4680,7 @@ mlan_status woal_init_sta_dev(struct net_device *dev, moal_private *priv)
(MAX_MTU_SIZE + MLAN_MIN_DATA_HEADER_LEN +
priv->extra_tx_head_len)) {
dev->max_mtu = MAX_MTU_SIZE;
PRINTM(MMSG, "wlan: %s set max_mtu %d\n", dev->name,
PRINTM(MINFO, "wlan: %s set max_mtu %d\n", dev->name,
dev->max_mtu);
}
#ifdef MFG_CMD_SUPPORT
@ -4836,69 +4851,65 @@ moal_private *woal_add_interface(moal_handle *handle, t_u8 bss_index,
#endif
ENTER();
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
#define MAX_WMM_QUEUE 4
/* Allocate an Ethernet device */
dev = alloc_etherdev_mq(sizeof(moal_private), MAX_WMM_QUEUE);
#else
dev = alloc_etherdev(sizeof(moal_private));
#endif
if (!dev) {
PRINTM(MFATAL, "Init virtual ethernet device failed\n");
goto error;
}
/* Allocate device name */
#ifdef STA_SUPPORT
memset(name, 0, sizeof(name));
if (handle->params.sta_name)
snprintf(name, sizeof(name), "%s%%d", handle->params.sta_name);
else if (handle->second_mac)
snprintf(name, sizeof(name), "m%s", default_mlan_name);
else
snprintf(name, sizeof(name), "%s", default_mlan_name);
if ((bss_type == MLAN_BSS_TYPE_STA) &&
(dev_alloc_name(dev, name) < 0)) {
PRINTM(MERROR, "Could not allocate mlan device name\n");
goto error;
}
switch (bss_type) {
#ifdef STA_SUPPORT
case MLAN_BSS_TYPE_STA:
if (handle->params.sta_name)
snprintf(name, sizeof(name), "%s%%d",
handle->params.sta_name);
else if (handle->second_mac)
snprintf(name, sizeof(name), "m%s", default_mlan_name);
else
snprintf(name, sizeof(name), "%s", default_mlan_name);
break;
#endif
#ifdef UAP_SUPPORT
memset(name, 0, sizeof(name));
if (handle->params.uap_name)
snprintf(name, sizeof(name), "%s%%d", handle->params.uap_name);
else if (handle->second_mac)
snprintf(name, sizeof(name), "m%s", default_uap_name);
else
snprintf(name, sizeof(name), "%s", default_uap_name);
if ((bss_type == MLAN_BSS_TYPE_UAP) &&
(dev_alloc_name(dev, name) < 0)) {
PRINTM(MERROR, "Could not allocate uap device name\n");
goto error;
}
case MLAN_BSS_TYPE_UAP:
if (handle->params.uap_name)
snprintf(name, sizeof(name), "%s%%d",
handle->params.uap_name);
else if (handle->second_mac)
snprintf(name, sizeof(name), "m%s", default_uap_name);
else
snprintf(name, sizeof(name), "%s", default_uap_name);
break;
#endif
#ifdef WIFI_DIRECT_SUPPORT
memset(name, 0, sizeof(name));
if (handle->params.wfd_name)
snprintf(name, sizeof(name), "%s%%d", handle->params.wfd_name);
else if (handle->second_mac)
snprintf(name, sizeof(name), "m%s", default_wfd_name);
else
snprintf(name, sizeof(name), "%s", default_wfd_name);
if ((bss_type == MLAN_BSS_TYPE_WIFIDIRECT) &&
(dev_alloc_name(dev, name) < 0)) {
PRINTM(MERROR, "Could not allocate wifidirect device name\n");
goto error;
}
case MLAN_BSS_TYPE_WIFIDIRECT:
if (handle->params.wfd_name)
snprintf(name, sizeof(name), "%s%%d",
handle->params.wfd_name);
else if (handle->second_mac)
snprintf(name, sizeof(name), "m%s", default_wfd_name);
else
snprintf(name, sizeof(name), "%s", default_wfd_name);
break;
#endif
memset(name, 0, sizeof(name));
if (handle->second_mac)
snprintf(name, sizeof(name), "m%s", default_dfs_name);
else
snprintf(name, sizeof(name), "%s", default_dfs_name);
if ((bss_type == MLAN_BSS_TYPE_DFS) &&
(dev_alloc_name(dev, name) < 0)) {
PRINTM(MERROR, "Could not allocate DFS device name\n");
case MLAN_BSS_TYPE_DFS:
if (handle->second_mac)
snprintf(name, sizeof(name), "m%s", default_dfs_name);
else
snprintf(name, sizeof(name), "%s", default_dfs_name);
break;
default:
PRINTM(MERROR, "woal_add_interface: invalid bss_type=%d\n",
bss_type);
return NULL;
}
#define MAX_WMM_QUEUE 4
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
/* Allocate an net device */
dev = alloc_netdev_mq(sizeof(moal_private), name, NET_NAME_UNKNOWN,
ether_setup, MAX_WMM_QUEUE);
#else
dev = alloc_netdev_mq(sizeof(moal_private), name, ether_setup,
MAX_WMM_QUEUE);
#endif
if (!dev) {
PRINTM(MERROR, "alloc_netdev failed\n");
goto error;
}
priv = (moal_private *)netdev_priv(dev);
@ -5102,7 +5113,7 @@ moal_private *woal_add_interface(moal_handle *handle, t_u8 bss_index,
netif_carrier_off(dev);
woal_stop_queue(dev);
PRINTM(MINFO, "%s: NXP 802.11 Adapter\n", dev->name);
PRINTM(MMSG, "Register NXP 802.11 Adapter %s\n", dev->name);
if (bss_type == MLAN_BSS_TYPE_STA ||
priv->bss_type == MLAN_BSS_TYPE_UAP) {
@ -5795,7 +5806,7 @@ int woal_close(struct net_device *dev)
woal_cancel_scan(priv, MOAL_IOCTL_WAIT);
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev->connected) {
#else
if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev->current_bss) {
@ -6743,7 +6754,7 @@ void woal_flush_tcp_sess_queue(moal_private *priv)
list_for_each_entry_safe (tcp_sess, tmp_node, &priv->tcp_sess_queue,
link) {
list_del(&tcp_sess->link);
if (tcp_sess->is_timer_set)
if (atomic_read(&tcp_sess->is_timer_set))
woal_cancel_timer(&tcp_sess->ack_timer);
skb = (struct sk_buff *)tcp_sess->ack_skb;
if (skb)
@ -6809,7 +6820,7 @@ static void woal_ageout_tcp_sess_queue(moal_private *priv)
PRINTM(MDATA, "wlan: ageout TCP seesion %p\n",
tcp_sess);
list_del(&tcp_sess->link);
if (tcp_sess->is_timer_set)
if (atomic_read(&tcp_sess->is_timer_set))
woal_cancel_timer(&tcp_sess->ack_timer);
skb = (struct sk_buff *)tcp_sess->ack_skb;
if (skb)
@ -6839,7 +6850,7 @@ static void woal_tcp_ack_timer_func(void *context)
#endif
ENTER();
spin_lock_irqsave(&priv->tcp_sess_lock, flags);
tcp_session->is_timer_set = MFALSE;
atomic_set(&tcp_session->is_timer_set, MFALSE);
skb = (struct sk_buff *)tcp_session->ack_skb;
pmbuf = (mlan_buffer *)tcp_session->pmbuf;
tcp_session->ack_skb = NULL;
@ -6906,9 +6917,8 @@ static void woal_send_tcp_ack(moal_private *priv, struct tcp_sess *tcp_session)
t_u32 index = 0;
#endif
ENTER();
if (tcp_session->is_timer_set) {
if (atomic_cmpxchg(&tcp_session->is_timer_set, MTRUE, MFALSE)) {
woal_cancel_timer(&tcp_session->ack_timer);
tcp_session->is_timer_set = MFALSE;
}
tcp_session->ack_skb = NULL;
tcp_session->pmbuf = NULL;
@ -7032,7 +7042,7 @@ static int woal_process_tcp_ack(moal_private *priv, mlan_buffer *pmbuf)
woal_initialize_timer(&tcp_session->ack_timer,
woal_tcp_ack_timer_func,
tcp_session);
tcp_session->is_timer_set = MTRUE;
atomic_set(&tcp_session->is_timer_set, MTRUE);
woal_mod_timer(&tcp_session->ack_timer, MOAL_TIMER_1MS);
list_add_tail(&tcp_session->link,
&priv->tcp_sess_queue);
@ -7049,7 +7059,7 @@ static int woal_process_tcp_ack(moal_private *priv, mlan_buffer *pmbuf)
tcp_session->priv = (void *)priv;
skb = (struct sk_buff *)pmbuf->pdesc;
skb->cb[0] = 0;
tcp_session->is_timer_set = MTRUE;
atomic_set(&tcp_session->is_timer_set, MTRUE);
woal_mod_timer(&tcp_session->ack_timer, MOAL_TIMER_1MS);
spin_unlock_irqrestore(&priv->tcp_sess_lock, flags);
ret = HOLD_TCP_ACK;
@ -7093,7 +7103,7 @@ static int woal_process_tcp_ack(moal_private *priv, mlan_buffer *pmbuf)
if (tcp_session) {
PRINTM(MDATA,"wlan: delete TCP seesion %p\n",tcp_session);
list_del(&tcp_session->link);
if (tcp_session->is_timer_set)
if (atomic_read(&tcp_session->is_timer_set))
woal_cancel_timer(&tcp_session->ack_timer);
skb = (struct sk_buff *)tcp_session->ack_skb;
if (skb)
@ -8926,7 +8936,7 @@ t_void woal_send_disconnect_to_system(moal_private *priv,
if (IS_STA_CFG80211(cfg80211_wext)) {
spin_lock_irqsave(&priv->connect_lock, flags);
if (!priv->cfg_disconnect && !priv->cfg_connect && priv->wdev &&
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
priv->wdev->connected) {
#else
priv->wdev->current_bss) {
@ -10543,6 +10553,11 @@ moal_handle *woal_add_card(void *card, struct device *dev, moal_if_ops *if_ops,
PRINTM(MERROR, "Fail to load module parameter file\n");
goto err_kmalloc;
}
if (!handle->params.drv_mode) {
PRINTM(MMSG, "wlan: stop init_adapter, drv_mode=%d\n",
handle->params.drv_mode);
goto err_kmalloc;
}
#ifdef IMX_SUPPORT
#ifdef SDIO
if (IS_SD(handle->card_type)) {
@ -11183,21 +11198,18 @@ static int woal_reset_and_reload_fw(moal_handle *handle, t_u8 mode)
woal_sdio_reset_hw(handle);
goto reload_fw;
}
if (!IS_SD9098(handle->card_type) && !IS_SD9097(handle->card_type) &&
!IS_SDNW62X(handle->card_type) && !IS_SD9177(handle->card_type)) {
mlan_pm_wakeup_card(handle->pmlan_adapter, MTRUE);
/** wait SOC fully wake up */
for (tries = 0; tries < FW_POLL_TRIES; ++tries) {
ret = handle->ops.write_reg(handle, reset_reg, 0xba);
if (ret == MLAN_STATUS_SUCCESS) {
handle->ops.read_reg(handle, reset_reg, &value);
if (value == 0xba) {
PRINTM(MMSG, "FW wake up\n");
break;
}
mlan_pm_wakeup_card(handle->pmlan_adapter, MTRUE);
/** wait SOC fully wake up */
for (tries = 0; tries < FW_POLL_TRIES; ++tries) {
ret = handle->ops.write_reg(handle, reset_reg, 0xba);
if (ret == MLAN_STATUS_SUCCESS) {
handle->ops.read_reg(handle, reset_reg, &value);
if (value == 0xba) {
PRINTM(MMSG, "FW wake up\n");
break;
}
udelay(1000);
}
udelay(1000);
}
/* Write register to notify FW */
if (handle->ops.write_reg(handle, reset_reg, reset_val) !=
@ -11226,9 +11238,7 @@ static int woal_reset_and_reload_fw(moal_handle *handle, t_u8 mode)
ret = -EFAULT;
goto done;
}
if (!IS_SD9098(handle->card_type) && !IS_SD9097(handle->card_type) &&
!IS_SDNW62X(handle->card_type) && !IS_SD9177(handle->card_type))
mlan_pm_wakeup_card(handle->pmlan_adapter, MFALSE);
mlan_pm_wakeup_card(handle->pmlan_adapter, MFALSE);
reload_fw:
/* Download FW */
ret = woal_request_fw(handle);
@ -11391,6 +11401,7 @@ static void woal_post_reset(moal_handle *handle)
#endif
if (!handle->wifi_hal_flag) {
PRINTM(MMSG, "wlan: post_reset remove/add interface\n");
handle->surprise_removed = MTRUE;
for (intf_num = 0;
intf_num < MIN(MLAN_MAX_BSS_NUM, handle->priv_num);
intf_num++)
@ -11405,6 +11416,8 @@ static void woal_post_reset(moal_handle *handle)
handle->wiphy = NULL;
}
#endif
handle->surprise_removed = MFALSE;
for (intf_num = 0; intf_num < handle->drv_mode.intf_num;
intf_num++) {
if (handle->drv_mode.bss_attr[intf_num].bss_virtual)
@ -11418,6 +11431,7 @@ static void woal_post_reset(moal_handle *handle)
goto done;
}
}
PRINTM(MMSG, "wlan: post_reset remove/add interface done\n");
goto done;
}
/* Reset all interfaces */
@ -11514,6 +11528,7 @@ int woal_request_fw_reload(moal_handle *phandle, t_u8 mode)
moal_handle *ref_handle = NULL;
ENTER();
wifi_status = WIFI_STATUS_FW_RELOAD;
#ifdef PCIE
if (mode == FW_RELOAD_PCIE_RESET) {
card = (pcie_service_card *)handle->card;
@ -11588,6 +11603,7 @@ int woal_request_fw_reload(moal_handle *phandle, t_u8 mode)
woal_post_reset(handle);
if (ref_handle)
woal_post_reset(ref_handle);
wifi_status = WIFI_STATUS_OK;
done:
LEAVE();
return ret;

View file

@ -156,6 +156,17 @@ Change log:
#define COMPAT_VERSION_CODE KERNEL_VERSION(0, 0, 0)
#define CFG80211_VERSION_CODE MAX(LINUX_VERSION_CODE, COMPAT_VERSION_CODE)
#define IMX_ANDROID_13 0
#if defined(IMX_SUPPORT)
#if defined(IMX_ANDROID)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 15, 41)
#undef IMX_ANDROID_13
#define IMX_ANDROID_13 1
#endif
#endif
#endif
/**
* Reason Code 3: STA is leaving (or has left) IBSS or ESS
*/
@ -327,12 +338,16 @@ typedef enum _MOAL_HARDWARE_STATUS {
} MOAL_HARDWARE_STATUS;
#define WIFI_STATUS_OK 0
#define WIFI_STATUS_DNLD_FW_FAIL 1
#define WIFI_STATUS_INIT_FW_FAIL 2
#define WIFI_STATUS_TX_TIMEOUT 3
#define WIFI_STATUS_WIFI_HANG 4
#define WIFI_STATUS_SCAN_TIMEOUT 5
#define WIFI_STATUS_FW_DUMP 6
#define WIFI_STATUS_FW_DNLD 1
#define WIFI_STATUS_FW_DNLD_COMPLETE 2
#define WIFI_STATUS_INIT_FW 3
#define WIFI_STATUS_DNLD_FW_FAIL 4
#define WIFI_STATUS_INIT_FW_FAIL 5
#define WIFI_STATUS_TX_TIMEOUT 6
#define WIFI_STATUS_WIFI_HANG 7
#define WIFI_STATUS_SCAN_TIMEOUT 8
#define WIFI_STATUS_FW_DUMP 9
#define WIFI_STATUS_FW_RELOAD 10
/** fw cap info 11p */
#define FW_CAPINFO_80211P MBIT(24)
@ -1099,7 +1114,7 @@ struct tcp_sess {
/** timer for ack */
moal_drv_timer ack_timer __ATTRIB_ALIGN__;
/** timer is set */
BOOLEAN is_timer_set;
atomic_t is_timer_set;
/** last update time*/
wifi_timeval update_time;
};
@ -3064,6 +3079,20 @@ static inline void hexdump(t_u32 level, char *prompt, t_u8 *buf, int len)
} while (0)
#endif
#ifdef BIG_ENDIAN_SUPPORT
/** Convert from 16 bit little endian format to CPU format */
#define woal_le16_to_cpu(x) le16_to_cpu(x)
/** Convert from 32 bit little endian format to CPU format */
#define woal_le32_to_cpu(x) le32_to_cpu(x)
/** Convert from 64 bit little endian format to CPU format */
#define woal_le64_to_cpu(x) le64_to_cpu(x)
/** Convert to 16 bit little endian format from CPU format */
#define woal_cpu_to_le16(x) cpu_to_le16(x)
/** Convert to 32 bit little endian format from CPU format */
#define woal_cpu_to_le32(x) cpu_to_le32(x)
/** Convert to 64 bit little endian format from CPU format */
#define woal_cpu_to_le64(x) cpu_to_le64(x)
#else
/** Do nothing */
#define woal_le16_to_cpu(x) x
/** Do nothing */
@ -3076,6 +3105,7 @@ static inline void hexdump(t_u32 level, char *prompt, t_u8 *buf, int len)
#define woal_cpu_to_le32(x) x
/** Do nothing */
#define woal_cpu_to_le64(x) x
#endif
/**
* @brief This function returns first available priv

View file

@ -512,7 +512,7 @@ int woal_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
if (NULL ==
woal_add_card(card, &card->func->dev, &sdiommc_ops, card_type)) {
PRINTM(MERROR, "woal_add_card failed\n");
PRINTM(MMSG, "woal_add_card failed\n");
ret = MLAN_STATUS_FAILURE;
goto err;
}

View file

@ -3281,11 +3281,23 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
case MLAN_EVENT_ID_FW_CHAN_SWITCH_COMPLETE:
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
pchan_info = (chan_band_info *)pmevent->event_buf;
#ifdef UAP_SUPPORT
if (priv->bss_role == MLAN_BSS_ROLE_UAP) {
if (priv->uap_tx_blocked) {
if (!netif_carrier_ok(priv->netdev))
netif_carrier_on(priv->netdev);
woal_start_queue(priv->netdev);
priv->uap_tx_blocked = MFALSE;
}
priv->phandle->chsw_wait_q_woken = MTRUE;
wake_up_interruptible(&priv->phandle->chsw_wait_q);
}
#endif
if (IS_STA_OR_UAP_CFG80211(cfg80211_wext)) {
PRINTM(MMSG,
"CSA/ECSA: Switch to new channel %d complete!\n",
pchan_info->channel);
priv->channel = pchan_info->channel;
#ifdef UAP_CFG80211
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)
if (priv->csa_chan.chan &&
@ -3299,6 +3311,10 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
}
#endif
#endif
if (priv->channel == pchan_info->channel)
break;
priv->channel = pchan_info->channel;
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
if (MFALSE
#ifdef UAP_CFG80211
@ -3320,18 +3336,6 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
}
#endif
}
#endif
#ifdef UAP_SUPPORT
if (priv->bss_role == MLAN_BSS_ROLE_UAP) {
if (priv->uap_tx_blocked) {
if (!netif_carrier_ok(priv->netdev))
netif_carrier_on(priv->netdev);
woal_start_queue(priv->netdev);
priv->uap_tx_blocked = MFALSE;
}
priv->phandle->chsw_wait_q_woken = MTRUE;
wake_up_interruptible(&priv->phandle->chsw_wait_q);
}
#endif
break;
case MLAN_EVENT_ID_FW_STOP_TX:
@ -3454,7 +3458,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
PRINTM(MMSG,
"Channel Under Nop: notify cfg80211 new channel=%d\n",
priv->channel);
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0);
#else
cfg80211_ch_switch_notify(priv->netdev, &priv->chan);
@ -3788,7 +3792,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
PRINTM(MEVENT,
"HostMlme %s: Receive deauth/disassociate\n",
priv->netdev->name);
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
if (!priv->wdev->connected) {
#else
if (!priv->wdev->current_bss) {
@ -4162,7 +4166,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
roam_info =
kzalloc(sizeof(struct cfg80211_roam_info), GFP_ATOMIC);
if (roam_info) {
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || IMX_ANDROID_13)
roam_info->links[0].bssid = priv->cfg_bssid;
#else
roam_info->bssid = priv->cfg_bssid;

View file

@ -103,7 +103,7 @@ static int woal_cfg80211_dump_survey(struct wiphy *wiphy,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
static int woal_cfg80211_get_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
unsigned int link_id,
#endif
struct cfg80211_chan_def *chandef);
@ -4420,6 +4420,12 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
ENTER();
PRINTM(MINFO, "Received scan request on %s\n", dev->name);
if (priv->phandle->driver_status) {
PRINTM(MERROR,
"Block woal_cfg80211_scan in abnormal driver state\n");
LEAVE();
return -EFAULT;
}
if (priv->phandle->scan_pending_on_block == MTRUE) {
PRINTM(MCMND, "scan already in processing...\n");
LEAVE();
@ -5380,7 +5386,7 @@ static int woal_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev,
if (priv->media_connected == MFALSE) {
PRINTM(MMSG, " Already disconnected\n");
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
if (priv->wdev->connected &&
#else
if (priv->wdev->current_bss &&
@ -5456,17 +5462,6 @@ static int woal_cfg80211_deauthenticate(struct wiphy *wiphy,
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 11, 0)
moal_private *pmpriv = (moal_private *)woal_get_netdev_priv(dev);
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
if (priv->host_mlme) {
priv->host_mlme = MFALSE;
priv->auth_flag = 0;
priv->auth_alg = 0xFFFF;
/*send deauth packet to notify disconnection to wpa_supplicant
*/
woal_deauth_event(priv, req->reason_code);
}
#endif
ret = woal_cfg80211_disconnect(wiphy, dev, req->reason_code);
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 11, 0)
@ -5498,17 +5493,6 @@ static int woal_cfg80211_disassociate(struct wiphy *wiphy,
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 11, 0)
moal_private *pmpriv = (moal_private *)woal_get_netdev_priv(dev);
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
if (priv->host_mlme) {
priv->host_mlme = MFALSE;
priv->auth_flag = 0;
priv->auth_alg = 0xFFFF;
/*send deauth packet to notify disconnection to wpa_supplicant
*/
woal_deauth_event(priv, req->reason_code);
}
#endif
ret = woal_cfg80211_disconnect(wiphy, dev, req->reason_code);
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 11, 0)
@ -5711,7 +5695,7 @@ done:
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
static int woal_cfg80211_get_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
unsigned int link_id,
#endif
struct cfg80211_chan_def *chandef)
@ -8625,7 +8609,7 @@ int woal_cfg80211_update_ft_ies(struct wiphy *wiphy, struct net_device *dev,
passoc_rsp = (IEEEtypes_AssocRsp_t *)
assoc_rsp->assoc_resp_buf;
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || IMX_ANDROID_13)
roam_info.links[0].bssid = priv->cfg_bssid;
#else
roam_info.bssid = priv->cfg_bssid;
@ -9097,7 +9081,7 @@ void woal_start_roaming(moal_private *priv)
}
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || IMX_ANDROID_13)
roam_info.links[0].bssid = priv->cfg_bssid;
#else
roam_info.bssid = priv->cfg_bssid;

View file

@ -3777,6 +3777,10 @@ int woal_uap_set_11ax_status(moal_private *priv, t_u8 action, t_u8 band,
&hecap_ie->ext_id, he_cfg.he_cap.len,
he_cfg.he_cap.len);
}
#define HE_MAC_CAP_TWT_REQ_SUPPORT MBIT(1)
/* uap mode clear TWT request bit */
he_cfg.he_cap.he_mac_cap[0] &= ~HE_MAC_CAP_TWT_REQ_SUPPORT;
if (action == MLAN_ACT_DISABLE) {
if (he_cfg.he_cap.len &&
(he_cfg.he_cap.ext_id == HE_CAPABILITY)) {

View file

@ -2348,7 +2348,7 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
}
}
if (vir_priv && vir_priv->bss_type == MLAN_BSS_TYPE_UAP) {
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
if (woal_cfg80211_del_beacon(wiphy, dev, 0))
#else
if (woal_cfg80211_del_beacon(wiphy, dev))
@ -2356,13 +2356,13 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
PRINTM(MERROR, "%s: del_beacon failed\n",
__func__);
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
vir_priv->wdev->links[0].ap.beacon_interval = 0;
#else
vir_priv->wdev->beacon_interval = 0;
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
memset(&vir_priv->wdev->links[0].ap.chandef, 0,
sizeof(vir_priv->wdev->links[0].ap.chandef));
#else
@ -2371,7 +2371,7 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
#endif
#endif
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
vir_priv->wdev->u.ap.ssid_len = 0;
#else
vir_priv->wdev->ssid_len = 0;
@ -2650,7 +2650,7 @@ done:
*
* @return 0 -- success, otherwise fail
*/
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev,
unsigned int link_id)
#else
@ -2869,6 +2869,14 @@ int woal_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
ENTER();
#ifdef UAP_SUPPORT
if ((priv->bss_type == MLAN_BSS_TYPE_UAP) && !priv->bss_started) {
woal_cancel_cac(priv);
LEAVE();
return 0;
}
#endif
if (priv->media_connected == MFALSE) {
PRINTM(MINFO, "cfg80211: Media not connected!\n");
LEAVE();
@ -3436,7 +3444,7 @@ static void woal_switch_uap_channel(moal_private *priv, t_u8 wait_option)
priv->channel = uap_channel.channel;
moal_memcpy_ext(priv->phandle, &priv->chan, &priv->csa_chan,
sizeof(struct cfg80211_chan_def), sizeof(priv->chan));
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
#if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0);
#else
cfg80211_ch_switch_notify(priv->netdev, &priv->chan);
@ -3737,7 +3745,8 @@ mlan_status woal_register_uap_cfg80211(struct net_device *dev, t_u8 bss_type)
return MLAN_STATUS_FAILURE;
}
wdev->iftype = NL80211_IFTYPE_STATION;
if (bss_type == MLAN_BSS_TYPE_UAP)
wdev->iftype = NL80211_IFTYPE_AP;
dev_net_set(dev, wiphy_net(wdev->wiphy));
dev->ieee80211_ptr = wdev;