diff --git a/mxm_wifiex/wlan_src/mapp/mlanconfig/Android.mk b/mxm_wifiex/wlan_src/mapp/mlanconfig/Android.mk new file mode 100644 index 0000000..39b4bc8 --- /dev/null +++ b/mxm_wifiex/wlan_src/mapp/mlanconfig/Android.mk @@ -0,0 +1,9 @@ +LOCAL_PATH := $(my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := mlanconfig +OBJS = mlanconfig.c mlanhostcmd.c mlanmisc.c +LOCAL_SRC_FILES := $(OBJS) +LOCAL_MODULE_TAGS := optional + +include $(BUILD_EXECUTABLE) diff --git a/mxm_wifiex/wlan_src/mapp/mlanconfig/config/ed_mac_ctrl_V3_8978.conf b/mxm_wifiex/wlan_src/mapp/mlanconfig/config/ed_mac_ctrl_V3_8978.conf new file mode 100644 index 0000000..03563f1 --- /dev/null +++ b/mxm_wifiex/wlan_src/mapp/mlanconfig/config/ed_mac_ctrl_V3_8978.conf @@ -0,0 +1,23 @@ +# File : ed_mac_ctrl_V3_8978.conf +# +# ed_mac_ctrl_v3 is used for 88W8997, 88W8987, 88W8977, 88W8978 +# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V3_8978.conf ed_mac_ctrl_v3 +# +## Set Energy Detect Threshold for EU Adaptivity test + +ed_mac_ctrl_v3={ + CmdCode=0x0130 #Command code, DO NOT change this line + ed_ctrl_2g.enable:2=0x1 # 0 - disable EU adaptivity for 2.4GHz band + # 1 - enable EU adaptivity for 2.4GHz band + + ed_ctrl_2g.offset:2=0x9 # 0 - Default Energy Detect threshold + #offset value range: 0x80 to 0x7F + + ed_ctrl_5g.enable:2=0x1 # 0 - disable EU adaptivity for 5GHz band + # 1 - enable EU adaptivity for 5GHz band + + ed_ctrl_5g.offset:2=0xC # 0 - Default Energy Detect threshold + #offset value range: 0x80 to 0x7F + + ed_ctrl_txq_lock:4=0xFF #DO NOT Change this line +} diff --git a/mxm_wifiex/wlan_src/mapp/mlanutl/Android.mk b/mxm_wifiex/wlan_src/mapp/mlanutl/Android.mk index f746a6d..8d5e85a 100644 --- a/mxm_wifiex/wlan_src/mapp/mlanutl/Android.mk +++ b/mxm_wifiex/wlan_src/mapp/mlanutl/Android.mk @@ -1,16 +1,3 @@ -# Copyright 2021 NXP -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -## http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - LOCAL_PATH := $(my-dir) include $(CLEAR_VARS) @@ -40,13 +27,12 @@ endif # if 64bit Android is used (e.g. PXA1928) # Please turn on following compiler flag -CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=y +CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n ifeq ($(CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT), y) LOCAL_CFLAGS += -DUSERSPACE_32BIT_OVER_KERNEL_64BIT endif LOCAL_MODULE := mlanutl -LOCAL_VENDOR_MODULE := true OBJS = mlanutl.c LOCAL_SRC_FILES := $(OBJS) LOCAL_MODULE_TAGS := optional diff --git a/mxm_wifiex/wlan_src/mlan/mlan_decl.h b/mxm_wifiex/wlan_src/mlan/mlan_decl.h index 9812046..1a54587 100644 --- a/mxm_wifiex/wlan_src/mlan/mlan_decl.h +++ b/mxm_wifiex/wlan_src/mlan/mlan_decl.h @@ -24,7 +24,7 @@ #define _MLAN_DECL_H_ /** MLAN release version */ -#define MLAN_RELEASE_VERSION "283.p2" +#define MLAN_RELEASE_VERSION "283.p21" /** Re-define generic data types for MLAN/MOAL */ /** Signed char (1-byte) */ diff --git a/mxm_wifiex/wlan_src/mlinux/mlan_decl.h b/mxm_wifiex/wlan_src/mlinux/mlan_decl.h index 9812046..1a54587 100644 --- a/mxm_wifiex/wlan_src/mlinux/mlan_decl.h +++ b/mxm_wifiex/wlan_src/mlinux/mlan_decl.h @@ -24,7 +24,7 @@ #define _MLAN_DECL_H_ /** MLAN release version */ -#define MLAN_RELEASE_VERSION "283.p2" +#define MLAN_RELEASE_VERSION "283.p21" /** Re-define generic data types for MLAN/MOAL */ /** Signed char (1-byte) */ diff --git a/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c b/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c index eb0f644..bafe406 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c @@ -2415,9 +2415,12 @@ void woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy, */ && !moal_extflg_isset(priv->phandle, EXT_HOST_MLME)) upd->interface_stypes &= ~BIT(IEEE80211_STYPE_AUTH >> 4); - priv->mgmt_subtype_mask = upd->interface_stypes; - woal_reg_rx_mgmt_ind(priv, MLAN_ACT_SET, &upd->interface_stypes, - MOAL_NO_WAIT); + + if (priv->mgmt_subtype_mask != upd->interface_stypes) { + priv->mgmt_subtype_mask = upd->interface_stypes; + woal_reg_rx_mgmt_ind(priv, MLAN_ACT_SET, &upd->interface_stypes, + MOAL_NO_WAIT); + } #else if (frame_type == IEEE80211_STYPE_AUTH #if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE diff --git a/mxm_wifiex/wlan_src/mlinux/moal_main.c b/mxm_wifiex/wlan_src/mlinux/moal_main.c index 0d385dc..4588392 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_main.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_main.c @@ -5855,12 +5855,14 @@ static void woal_tcp_ack_timer_func(void *context) tcp_session->pmbuf = NULL; spin_unlock_irqrestore(&priv->tcp_sess_lock, flags); if (skb && pmbuf) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + index = skb_get_queue_mapping(skb); +#endif status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); switch (status) { case MLAN_STATUS_PENDING: atomic_inc(&priv->phandle->tx_pending); #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) - index = skb_get_queue_mapping(skb); atomic_inc(&priv->wmm_tx_pending[index]); if (atomic_read(&priv->wmm_tx_pending[index]) >= MAX_TX_PENDING) { @@ -5919,12 +5921,14 @@ static void woal_send_tcp_ack(moal_private *priv, struct tcp_sess *tcp_session) } tcp_session->ack_skb = NULL; tcp_session->pmbuf = NULL; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + index = skb_get_queue_mapping(skb); +#endif status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); switch (status) { case MLAN_STATUS_PENDING: atomic_inc(&priv->phandle->tx_pending); #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) - index = skb_get_queue_mapping(skb); atomic_inc(&priv->wmm_tx_pending[index]); if (atomic_read(&priv->wmm_tx_pending[index]) >= MAX_TX_PENDING) { diff --git a/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c b/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c index c115b75..27e1079 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c @@ -7672,13 +7672,15 @@ static int woal_send_tdls_data_frame(struct wiphy *wiphy, DBG_HEXDUMP(MDAT_D, "TDLS data:", pmbuf->pbuf + pmbuf->data_offset, pmbuf->data_len); +#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + index = skb_get_queue_mapping(skb); +#endif status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); switch (status) { case MLAN_STATUS_PENDING: atomic_inc(&priv->phandle->tx_pending); #if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 29) - index = skb_get_queue_mapping(skb); atomic_inc(&priv->wmm_tx_pending[index]); #endif queue_work(priv->phandle->workqueue, &priv->phandle->main_work); diff --git a/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c b/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c index 2c1d016..54b92a8 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c @@ -1902,7 +1902,8 @@ void woal_remove_virtual_interface(moal_handle *handle) if (priv->netdev->reg_state == NETREG_REGISTERED) #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) - cfg80211_unregister_netdevice(priv->netdev); + cfg80211_unregister_netdevice( + priv->netdev); #else unregister_netdevice(priv->netdev); #endif