lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87im6rov2q.fsf@codeaurora.org>
Date:   Wed, 17 Feb 2021 12:19:25 +0200
From:   Kalle Valo <kvalo@...eaurora.org>
To:     Srinivasan Raju <srini.raju@...elifi.com>
Cc:     mostafa.afgani@...elifi.com,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        linux-kernel@...r.kernel.org (open list),
        linux-wireless@...r.kernel.org (open list:NETWORKING DRIVERS (WIRELESS)),
        netdev@...r.kernel.org (open list:NETWORKING DRIVERS)
Subject: Re: [PATCH] [v13] wireless: Initial driver submission for pureLiFi STA devices

Srinivasan Raju <srini.raju@...elifi.com> writes:

> This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC
> and LiFi-XL USB devices.
>
> This driver implementation has been based on the zd1211rw driver.
>
> Driver is based on 802.11 softMAC Architecture and uses
> native 802.11 for configuration and management.
>
> The driver is compiled and tested in ARM, x86 architectures and
> compiled in powerpc architecture.
>
> Signed-off-by: Srinivasan Raju <srini.raju@...elifi.com>

[...]

> +	if ((le16_to_cpu(udev->descriptor.idVendor) ==
> +				PURELIFI_X_VENDOR_ID_0) &&
> +	    (le16_to_cpu(udev->descriptor.idProduct) ==
> +				PURELIFI_X_PRODUCT_ID_0)) {
> +		fw_name = "plfxlc/LiFi-X.bin";
> +		dev_dbg(&intf->dev, "bin file for X selected\n");
> +
> +	} else if ((le16_to_cpu(udev->descriptor.idVendor)) ==
> +					PURELIFI_XC_VENDOR_ID_0 &&
> +		   (le16_to_cpu(udev->descriptor.idProduct) ==
> +					PURELIFI_XC_PRODUCT_ID_0)) {
> +		fw_name = "plfxlc/LiFi-XC.bin";
> +		dev_dbg(&intf->dev, "bin file for XC selected\n");
> +
> +	} else {
> +		r = -EINVAL;
> +		goto error;
> +	}
> +
> +	r = request_firmware((const struct firmware **)&fw, fw_name,
> +			     &intf->dev);
> +	if (r) {
> +		dev_err(&intf->dev, "request_firmware failed (%d)\n", r);
> +		goto error;
> +	}

[...]

> +	/* Code for single pack file download */
> +
> +	fw_pack = "plfxlc/LiFi-XL.bin";
> +
> +	r = request_firmware((const struct firmware **)&fw_packed, fw_pack,
> +			     &intf->dev);
> +	if (r) {
> +		dev_err(&intf->dev, "request_firmware failed (%d)\n", r);
> +		goto error;
> +	}

Having the firmware files under plfxlc/ directory looks good to me. But
I'm not really a fan of upper case filenames, is there a reason for
that? I would prefer have all lowercase filenames.

Also the cast (const struct firmware **) looks very wrong, but I didn't
investigate why you do it. I'm sure there is a proper way to implement
whatever you need here, without the cast.

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

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ