From d212de6a8a966a420a499e714ab047e3f8bfca5f Mon Sep 17 00:00:00 2001 From: Sherry Sun Date: Wed, 1 Feb 2023 17:42:00 +0800 Subject: [PATCH] MA-20988 sync WCS Q1 release patch to Android13.0 Reason:sync WCS Q1 RC2 release patch MM5X16368.p2 to Android13.0 also fix WCSWREL-418 Test:i.MX 8MM/ i.MX 8QXP mxm_wifiex: move SCR.txt to root folder and rename LICENSE file SCR.txt and LICENSE files should be in root folder, also need to rename the gpl-2.0.txt file to work better with GitHub. Change-Id: I8f912fae7d291022389bcbafb558050c4b95835e Signed-off-by: Sherry Sun Signed-off-by: yunjie --- mxm_wifiex/wlan_src/gpl-2.0.txt => LICENSE | 0 mxm_wifiex/wlan_src/SCR.txt => SCR.txt | 0 mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c | 25 +++++++++++++--------- 3 files changed, 15 insertions(+), 10 deletions(-) rename mxm_wifiex/wlan_src/gpl-2.0.txt => LICENSE (100%) rename mxm_wifiex/wlan_src/SCR.txt => SCR.txt (100%) diff --git a/mxm_wifiex/wlan_src/gpl-2.0.txt b/LICENSE similarity index 100% rename from mxm_wifiex/wlan_src/gpl-2.0.txt rename to LICENSE diff --git a/mxm_wifiex/wlan_src/SCR.txt b/SCR.txt similarity index 100% rename from mxm_wifiex/wlan_src/SCR.txt rename to SCR.txt diff --git a/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c b/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c index 086fada..403b99e 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c @@ -798,11 +798,13 @@ int woal_cfg80211_init_p2p_client(moal_private *priv) goto done; } - bss_role = MLAN_BSS_ROLE_STA; - if (MLAN_STATUS_SUCCESS != - woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role)) { - ret = -EFAULT; - goto done; + if (bss_role != MLAN_BSS_ROLE_STA) { + bss_role = MLAN_BSS_ROLE_STA; + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role)) { + ret = -EFAULT; + goto done; + } } wifi_direct_mode = WIFI_DIRECT_MODE_DISABLE; @@ -886,12 +888,15 @@ int woal_cfg80211_init_p2p_go(moal_private *priv) goto done; } - bss_role = MLAN_BSS_ROLE_UAP; - if (MLAN_STATUS_SUCCESS != - woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role)) { - ret = -EFAULT; - goto done; + if (bss_role != MLAN_BSS_ROLE_UAP) { + bss_role = MLAN_BSS_ROLE_UAP; + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role)) { + ret = -EFAULT; + goto done; + } } + /* NoA:-- Interval = 100TUs and Duration= 50TUs, count=255*/ #define DEF_NOA_COUNT 255 if (priv->phandle->noa_duration && priv->phandle->card_info->go_noa) {