wireless: scsc: fix CONFIG_SCSC_LOG_COLLECTION ifdefs
authorStricted <info@stricted.net>
Wed, 5 May 2021 04:19:49 +0000 (06:19 +0200)
committerStricted <info@stricted.net>
Wed, 5 May 2021 04:23:27 +0000 (06:23 +0200)
Change-Id: I280d122ffa74a201027bcab61208bf6f5a568d89

drivers/net/wireless/scsc/mgt.c

index 206d6e768323c9e907a2fb8d9190ad5fa57609d6..29af6ad789a33ba82acc330e593f1004400ef552 100755 (executable)
@@ -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]);