Re: [PATCH] staging: Initial driver submission for pureLiFi devices
From: Randy Dunlap
Date: Thu Sep 24 2020 - 14:28:18 EST
Hi,
On 9/24/20 8:18 AM, Srinivasan Raju wrote:
> diff --git a/drivers/staging/purelifi/Kconfig b/drivers/staging/purelifi/Kconfig
> new file mode 100644
> index 000000000000..db24bdf884a3
> --- /dev/null
> +++ b/drivers/staging/purelifi/Kconfig
> @@ -0,0 +1,42 @@
> +config WLAN_VENDOR_PURELIFI
> + bool "pureLiFi devices"
> + default y
> + help
> + If you have a pureLiFi device, say Y.
> +
> + Note that the answer to this question doesn't directly affect the
> + kernel: saying N will just cause the configurator to skip all the
> + questions about these cards. If you say Y, you will be asked for
> + your specific card in the following questions.
> +
> +if WLAN_VENDOR_PURELIFI
> +
> +config PURELIFI
> +
> + tristate "pureLiFi device support"
> + depends on CFG80211 && MAC80211 && USB
> + help
> + Say Y if you want to use LiFi
LiFi.
> +
> + This driver makes the adapter appear as a normal WLAN interface
interface.
> +
> + The pureLiFi device requires external STA firmware to be loaded.
> +
> + To compile this driver as a module, choose M here: the
> + module will be called purelifi.
> +
> +config PURELIFI_AP
> +
> + tristate "pureLiFi device Access Point support"
> + depends on CFG80211 && MAC80211 && USB
>From a brief look at the Makefile, it appears that the AP cannot be built alone;
i.e., I think that this needs:
depends on PURELIFI
> + help
> + Say Y if you want to use LiFi Access-Point
LiFi as an Access Point.
or
LiFi in Access Point mode.
or make something up. :)
> +
> + This driver makes the adapter appear as a normal WLAN interface
interface.
> +
> + The pureLiFi device requires external AP firmware to be loaded.
> +
> + To compile this driver as a module, choose M here: the
> + module will be called purelifi.
Same module, not a separate one, right?
> +
> +endif # WLAN_VENDOR_PURELIFI
> diff --git a/drivers/staging/purelifi/Makefile b/drivers/staging/purelifi/Makefile
> new file mode 100644
> index 000000000000..a8483fbb966c
> --- /dev/null
> +++ b/drivers/staging/purelifi/Makefile
> @@ -0,0 +1,5 @@
> +obj-$(CONFIG_PURELIFI) := purelifi.o
> +purelifi-objs += chip.o usb.o mac.o
> +ifeq ($(CONFIG_PURELIFI_AP),m)
Why does this check for CONFIG_PURELIFI_AP=m ?
How about if CONFIG_PURELIFI_AP=y ?
> + ccflags-y += -DTYPE_AP
> +endif
It would be more common just to check for CONFIG_PURELIFI_AP in the source
file(s) instead of adding a synonym for it.
--
~Randy