From 1ce7566fc7219fccd95b6c5877bff89f4e3913b5 Mon Sep 17 00:00:00 2001 From: Dewey Lee Date: Fri, 2 Dec 2022 16:27:58 +0900 Subject: bcmdhd: Fixed the ACS 2G SCC case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In b/252867295, we fixed the ACS to avoid a restricted channel for SCC case and modified the “per_chan_info” iovar to be called from one place, so wl_check_active_2g_chan() was removed and was replaced to other functions. However, the fix for b/252867295 didn't handle 2G SCC case properly when STA was connected to 2G restricted channel like Ch13 on India(IN/0) country. Thus, fixed the ACS 2G SCC case to get original functionality at the same location. Bug: 260162012 Test: Verified with Pixel device Signed-off-by: Dewey Lee Change-Id: I7cab75234e87fb6e5eb1093466e45ca114e20b17 --- wl_cfgscan.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/wl_cfgscan.c b/wl_cfgscan.c index d665851..ec57136 100644 --- a/wl_cfgscan.c +++ b/wl_cfgscan.c @@ -6519,7 +6519,8 @@ bool wl_check_active_2g_chan(struct bcm_cfg80211 *cfg, drv_acs_params_t *paramet #ifdef WL_CELLULAR_CHAN_AVOID if (wl_cellavoid_mandatory_isset(cfg->cellavoid_info, NL80211_IFTYPE_AP) && !wl_cellavoid_is_safe(cfg->cellavoid_info, sta_chanspec)) { - WL_INFORM_MEM(("Not allow unsafe channel and mandatory chspec:0x%x\n", + WL_INFORM_MEM(( + "Not allow unsafe channel and mandatory chspec:0x%x\n", sta_chanspec)); goto exit; } @@ -7045,11 +7046,14 @@ wl_acs_check_scc(struct bcm_cfg80211 *cfg, drv_acs_params_t *parameter, */ if (scc == FALSE && CHSPEC_IS2G(sta_chanspec)) { #ifdef WL_CELLULAR_CHAN_AVOID - scc = wl_cellavoid_operation_allowed(cfg->cellavoid_info, - sta_chanspec, NL80211_IFTYPE_AP); - if (scc == FALSE) { - WL_INFORM_MEM(("Not allow unsafe channel and mandatory chspec:0x%x\n", - sta_chanspec)); + if (!wl_is_chanspec_restricted(cfg, sta_chanspec)) { + scc = wl_cellavoid_operation_allowed(cfg->cellavoid_info, + sta_chanspec, NL80211_IFTYPE_AP); + if (scc == FALSE) { + WL_INFORM_MEM(( + "Not allow unsafe channel and mandatory chspec:0x%x\n", + sta_chanspec)); + } } #endif /* WL_CELLULAR_CHAN_AVOID */ } @@ -7129,8 +7133,7 @@ wl_handle_acs_concurrency_cases(struct bcm_cfg80211 *cfg, drv_acs_params_t *para bool scc_case = false; u32 sta_band = CHSPEC_TO_WLC_BAND(chspec); if (sta_band == WLC_BAND_2G) { - if (wl_is_chanspec_restricted(cfg, chspec) || - (parameter->freq_bands & (WLC_BAND_5G | WLC_BAND_6G))) { + if (parameter->freq_bands & (WLC_BAND_5G | WLC_BAND_6G)) { /* Remove the 2g band from incoming ACS bands */ parameter->freq_bands &= ~WLC_BAND_2G; } else if (wl_acs_check_scc(cfg, parameter, chspec, qty, pList)) { -- cgit v1.2.3 From 5d9a0ccbb6571c4ddadfc1df9b6e5b3b7585bc97 Mon Sep 17 00:00:00 2001 From: Sungjoon Park Date: Mon, 24 Oct 2022 12:36:40 +0900 Subject: bcmdhd: Reduce the P2P GC assoc scan time The long P2P connection time is reported. It shows that 140ms time gap is observed between Join triggered and AUTH complete time. [13:01:35.915820][ 188.329545] wl_conn_debug_info: [p2p-wlan0-1] Connecting with ff:xx:xx:xx:xf:ff ssid_len:11 chan_cnt:1 eidx:1139 [13:01:36.056203][ 188.469926] MACEVENT: WLC_E_AUTH, MAC 9a:xx:xx:xx:x9:1a, Open System, SUCCESS Since the BSSID hint is not used STA use the 80ms assoc scan dwell time with 4 nprobe. If bssid information is delivered to FW when join is triggered, assoc scan is stopped when it received target GO probe response. Due to this, Join to AUTH complete time is reduced from 140ms to 50ms. [13:20:25.442709][ 156.889951] wl_conn_debug_info: [p2p-wlan0-0] Connecting with 9a:xx:xx:xx:x9:1a ssid_len:11 chan_cnt:1 eidx:1058 [13:20:25.489951][ 156.937190] MACEVENT: WLC_E_AUTH, MAC 9a:xx:xx:xx:x9:1a, Open System, SUCCESS Bug: 249518141 Test: Verified with Pixel device Change-Id: Ic20f480eb7ea43931a0b2052690649146f936950 Signed-off-by: Sungjoon Park --- wl_cfg80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wl_cfg80211.c b/wl_cfg80211.c index c64d536..c26e437 100644 --- a/wl_cfg80211.c +++ b/wl_cfg80211.c @@ -6584,11 +6584,15 @@ wl_handle_assoc_hints(struct bcm_cfg80211 *cfg, struct net_device *dev, WL_DBG(("fw_ap_select:%d skip_hints:%d\n", fw_ap_select, skip_hints)); #endif /* WL_SKIP_CONNECT_HINTS */ + if (IS_P2P_GC(dev->ieee80211_ptr)) { + skip_hints = false; + } + /* Use bssid_hint if hints are allowed and if its unicast addr */ if (!skip_hints && sme->bssid_hint && !ETHER_ISBCAST(sme->bssid_hint)) { WL_INFORM_MEM(("bssid_hint "MACDBG" \n", MAC2STRDBG(sme->bssid_hint))); info->targeted_join = true; - if (cfg->join_iovar_ver) { + if (cfg->join_iovar_ver && IS_STA_IFACE(ndev_to_wdev(dev))) { /* Firmware supports bssid_hint feature */ info->bssid_hint = true; } -- cgit v1.2.3 From 35a6f33c96cd2341b3a7a4cc2fe0d305e96a19f4 Mon Sep 17 00:00:00 2001 From: Isaac Chiou Date: Wed, 22 Feb 2023 09:20:39 +0000 Subject: Revert "bcmdhd: disable MACADDR_PROVISION_ENFORCED" This reverts commit ee5e5a7a514ee838c883f6eb1e4fdad1ebd811cb. Reason for revert: Original change is for MFG events. Need to revert it before shipping. Bug: 270295860 Test: Wifi works fine Change-Id: I583e8355db36f3b5c5cf871bf4963fbe20466d2a --- Kbuild | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Kbuild b/Kbuild index 500903f..fd6ceaf 100644 --- a/Kbuild +++ b/Kbuild @@ -384,9 +384,9 @@ DHDCFLAGS += -DWL_P2P_RAND #Custom Mapping of DSCP to User Priority DHDCFLAGS += -DWL_CUSTOM_MAPPING_OF_DSCP # Enable below define for production -# ifneq ($(CONFIG_SOC_GOOGLE),) -# DHDCFLAGS += -DMACADDR_PROVISION_ENFORCED -# endif +ifneq ($(CONFIG_SOC_GOOGLE),) +DHDCFLAGS += -DMACADDR_PROVISION_ENFORCED +endif ifneq ($(CONFIG_BCMDHD_PCIE),) DHDCFLAGS += -DDHD_WAKE_STATUS endif -- cgit v1.2.3 From f099d4fa5c9c83f8146c7d1507754f4d72dd72da Mon Sep 17 00:00:00 2001 From: Dennis Jeon Date: Thu, 2 Mar 2023 15:42:43 +0900 Subject: bcmdhd: Disable LOGSET_BEYOND memdump for customer platform As this logset beyond range memdump is only useful for debug purpose of the fw logs and no specific use of functionality. Disable this memdump collection for customer platform and keep it only for our reference platforms. Bug: 270914537 Bug: 270587504 Test: Verified with pa/2407362 which mimics the issue Change-Id: Ic79b7800bf56daff32aa777c46c265b1f0413de9 Signed-off-by: Dennis Jeon --- Kbuild | 3 +++ dhd_debug.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Kbuild b/Kbuild index fd6ceaf..1c08c93 100644 --- a/Kbuild +++ b/Kbuild @@ -947,6 +947,9 @@ else ifneq ($(CONFIG_ARCH_HISI),) # Allow wl event forwarding as network packet DHDCFLAGS += -DWL_EVENT_ENAB + # Enable memdump for logset beyond range only internal builds + DHDCFLAGS += -DDHD_LOGSET_BEYOND_MEMDUMP + ifneq ($(CONFIG_BCMDHD_PCIE),) # LB RXP Flow control to avoid OOM DHDCFLAGS += -DLB_RXP_STOP_THR=200 -DLB_RXP_STRT_THR=199 diff --git a/dhd_debug.c b/dhd_debug.c index a7f4933..72e9689 100644 --- a/dhd_debug.c +++ b/dhd_debug.c @@ -1129,6 +1129,7 @@ dhd_dbg_msgtrace_log_parser(dhd_pub_t *dhdp, void *event_data, if (logset >= event_log_max_sets) { DHD_ERROR(("%s logset: %d max: %d out of range queried: %d\n", __FUNCTION__, logset, event_log_max_sets, event_log_max_sets_queried)); +#ifdef DHD_LOGSET_BEYOND_MEMDUMP #ifdef DHD_FW_COREDUMP if (event_log_max_sets_queried && !dhd_memdump_is_scheduled(dhdp)) { DHD_ERROR(("%s: collect socram for DUMP_TYPE_LOGSET_BEYOND_RANGE\n", @@ -1137,6 +1138,9 @@ dhd_dbg_msgtrace_log_parser(dhd_pub_t *dhdp, void *event_data, dhd_bus_mem_dump(dhdp); } #endif /* DHD_FW_COREDUMP */ +#else + goto exit; +#endif /* DHD_LOGSET_BEYOND_MEMDUMP */ } block = ltoh16(*((uint16 *)(data + 2))); -- cgit v1.2.3