int slsi_start(struct slsi_dev *sdev)
{
#ifndef CONFIG_SCSC_DOWNLOAD_FILE
- const struct firmware *fw = NULL;
+ const struct firmware *fw[SLSI_WLAN_MAX_MIB_FILE] = { NULL, NULL };
#endif
int err = 0, r;
int i;
}
/* 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);
+ for (i = 0; i < SLSI_WLAN_MAX_MIB_FILE; i++) {
+ err = slsi_mib_open_file(sdev, &sdev->mib[i], &fw[i]);
/* Only the first file is mandatory */
if (i == 0 && err) {
err = slsi_sm_wlan_service_start(sdev);
if (err) {
SLSI_ERR(sdev, "slsi_sm_wlan_service_start failed: err=%d\n", err);
- slsi_mib_close_file(sdev, fw);
+ for (i = 0; i < SLSI_WLAN_MAX_MIB_FILE; i++)
+ slsi_mib_close_file(sdev, fw[i]);
slsi_sm_wlan_service_close(sdev);
goto err_done;
}
- slsi_mib_close_file(sdev, fw);
+ for (i = 0; i < SLSI_WLAN_MAX_MIB_FILE; i++)
+ slsi_mib_close_file(sdev, fw[i]);
#else
/* Download main MIB file via mlme_set */
err = slsi_sm_wlan_service_start(sdev);
int err = 0, i;
int level;
#ifndef CONFIG_SCSC_DOWNLOAD_FILE
- const struct firmware *fw = NULL;
+ const struct firmware *fw[SLSI_WLAN_MAX_MIB_FILE] = { NULL, NULL };
#endif
level = atomic_read(&sdev->cm_if.reset_level);
SLSI_INFO_NODEV("Inside subsytem_reset\n");
sdev->collect_mib.num_files = 0;
/* 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);
+ err = slsi_mib_open_file(sdev, &sdev->mib[i], &fw[i]);
/* Only the first file is mandatory */
if (i == 0 && err) {
err = slsi_sm_recovery_service_start(sdev);
if (err) {
SLSI_ERR(sdev, "slsi_sm_wlan_service_start failed: err=%d\n", err);
- slsi_mib_close_file(sdev, fw);
+ for (i = 0; i < SLSI_WLAN_MAX_MIB_FILE; i++)
+ slsi_mib_close_file(sdev, fw[i]);
slsi_sm_recovery_service_close(sdev);
sdev->device_state = SLSI_DEVICE_STATE_STOPPED;
return;
}
- slsi_mib_close_file(sdev, fw);
+ for (i = 0; i < SLSI_WLAN_MAX_MIB_FILE; i++)
+ slsi_mib_close_file(sdev, fw[i]);
#else
/* Download main MIB file via mlme_set */
err = slsi_sm_recovery_service_start(sdev);