Jerome Pouiller <jerome.pouil...@silabs.com> writes:

> From: Jérôme Pouiller <jerome.pouil...@silabs.com>
>
> Signed-off-by: Jérôme Pouiller <jerome.pouil...@silabs.com>

[...]

> +static int get_firmware(struct wfx_dev *wdev, u32 keyset_chip,
> +                     const struct firmware **fw, int *file_offset)
> +{
> +     int keyset_file;
> +     char filename[256];
> +     const char *data;
> +     int ret;
> +
> +     snprintf(filename, sizeof(filename), "%s_%02X.sec",
> +              wdev->pdata.file_fw, keyset_chip);
> +     ret = firmware_request_nowarn(fw, filename, wdev->dev);
> +     if (ret) {
> +             dev_info(wdev->dev, "can't load %s, falling back to %s.sec\n",
> +                      filename, wdev->pdata.file_fw);
> +             snprintf(filename, sizeof(filename), "%s.sec",
> +                      wdev->pdata.file_fw);
> +             ret = request_firmware(fw, filename, wdev->dev);
> +             if (ret) {
> +                     dev_err(wdev->dev, "can't load %s\n", filename);
> +                     *fw = NULL;
> +                     return ret;
> +             }
> +     }

How is this firmware file loading supposed to work? If I'm reading the
code right, the driver tries to load file "wfm_wf200_??.sec" but in
linux-firmware the file is silabs/wfm_wf200_C0.sec:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/silabs

That can't work automatically, unless I'm missing something of course.

Also I would prefer to use directory name as the driver name wfx, but I
guess silabs is also doable.

Also I'm not seeing the PDS files in linux-firmware. The idea is that
when user installs an upstream kernel and the linux-firmware everything
will work automatically, without any manual file installations.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to