Re: [PATCH] [v11] wireless: Initial driver submission for pureLiFi STA devices
From: Kalle Valo
Date: Sat Dec 19 2020 - 08:07:43 EST
Srinivasan Raju <srini.raju@xxxxxxxxxxxx> 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.
Is endianess support is properly implemented?
> + fw_data[tbuf_idx] =
> + ((fw_data[tbuf_idx] & 128) >> 7) |
> + ((fw_data[tbuf_idx] & 64) >> 5) |
> + ((fw_data[tbuf_idx] & 32) >> 3) |
> + ((fw_data[tbuf_idx] & 16) >> 1) |
> + ((fw_data[tbuf_idx] & 8) << 1) |
> + ((fw_data[tbuf_idx] & 4) << 3) |
> + ((fw_data[tbuf_idx] & 2) << 5) |
> + ((fw_data[tbuf_idx] & 1) << 7);
Is this cpu_to_le16() or what? Try avoid reinventing the wheel and use
what kernel provides you.
Also noticed lots of dev_info() spamming, please convert those to debug
messages.
And rx_usb_enabled is racy and it will not work if there are multiple
devices. Maybe move it to struct purelifi_usb or similar?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches