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