qcacld-3.0: Replace request_firmware by firmware_request_nowarn

Replace request_firmware by firmware_request_nowarn to avoid warning
message when the file is not found and sysfs fallback mechanism is
enabled if direct filesystem lookup fails.

Change-Id: Ia182bcf990144ac12434253144e772f6a0780cfe
CRs-Fixed: 2912035
This commit is contained in:
Rajeev Kumar 2021-03-30 12:58:47 -07:00 • committed by snandini
commit 41d927b4ac

View file

@ -180,6 +180,24 @@ static QDF_STATUS update_mac_from_string(struct hdd_context *hdd_ctx,
return status;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0))
static inline
int hdd_firmware_request_nowarn(const struct firmware **fw,
const char *name,
struct device *device)
{
return firmware_request_nowarn(fw, name, device);
}
#else
static inline
int hdd_firmware_request_nowarn(const struct firmware **fw,
const char *name,
struct device *device)
{
return request_firmware(fw, name, device);
}
#endif
/**
* hdd_set_power_save_offload_config() - set power save offload configuration
* @hdd_ctx: the pointer to hdd context
@ -247,7 +265,8 @@ QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx)
}
memset(mac_table, 0, sizeof(mac_table));
status = request_firmware(&fw, WLAN_MAC_FILE, hdd_ctx->parent_dev);
status = hdd_firmware_request_nowarn(&fw, WLAN_MAC_FILE,
hdd_ctx->parent_dev);
if (status) {
/*
* request_firmware "fails" if the file is not found, which is a