From: Stricted Date: Wed, 5 May 2021 04:19:49 +0000 (+0200) Subject: wireless: scsc: fix CONFIG_SCSC_LOG_COLLECTION ifdefs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4985c7d523786af07740cd865819bc23010bcff5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git wireless: scsc: fix CONFIG_SCSC_LOG_COLLECTION ifdefs Change-Id: I280d122ffa74a201027bcab61208bf6f5a568d89 --- diff --git a/drivers/net/wireless/scsc/mgt.c b/drivers/net/wireless/scsc/mgt.c index 206d6e768323..29af6ad789a3 100755 --- a/drivers/net/wireless/scsc/mgt.c +++ b/drivers/net/wireless/scsc/mgt.c @@ -1328,10 +1328,14 @@ static int slsi_mib_open_file(struct slsi_dev *sdev, struct slsi_dev_mib_info *m if (!mib_file_name || !fw) return -EINVAL; + +#ifdef CONFIG_SCSC_LOG_COLLECTION if (index > SLSI_WLAN_MAX_MIB_FILE + 1) { SLSI_ERR(sdev, "collect mib index is invalid:%d\n", index); return -EINVAL; } +#endif + mib_info->mib_data = NULL; mib_info->mib_len = 0; mib_info->mib_hash = 0; /* Reset mib hash value */ @@ -6330,7 +6334,9 @@ void slsi_subsystem_reset(struct work_struct *work) sdev->mib[0].mib_file_name = slsi_mib_file; sdev->mib[1].mib_file_name = slsi_mib_file2; } +#ifdef CONFIG_SCSC_LOG_COLLECTION sdev->collect_mib.num_files = 0; +#endif /* Place MIB files in shared memory */ for (i = 0; i < SLSI_WLAN_MAX_MIB_FILE; i++) { err = slsi_mib_open_file(sdev, &sdev->mib[i], &fw[i]); @@ -6471,7 +6477,9 @@ void slsi_chip_recovery(struct work_struct *work) sdev->mib[0].mib_file_name = slsi_mib_file; sdev->mib[1].mib_file_name = slsi_mib_file2; } +#ifdef CONFIG_SCSC_LOG_COLLECTION sdev->collect_mib.num_files = 0; +#endif /* Place MIB files in shared memory */ for (i = 0; i < SLSI_WLAN_MAX_MIB_FILE; i++) { err = slsi_mib_open_file(sdev, &sdev->mib[i], &fw[i]);