Re: [PATCH v7 10/24] wfx: add fwio.c/fwio.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jerome Pouiller <Jerome.Pouiller@xxxxxxxxxx> writes:

> From: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>
>
> Signed-off-by: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>

[...]

> +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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux