From 41d927b4acf40ff16c1d9d1e7490bbc937d33af7 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Tue, 30 Mar 2021 12:58:47 -0700 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_cfg.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 63593e0f419a..9275b5025622 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -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