Search Linux Wireless

Re: [PATCH 6/6] brcmfmac: Add support for host platform NVRAM loading.

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

 



On 20 May 2015 at 14:09, Arend van Spriel <arend@xxxxxxxxxxxx> wrote:
> From: Hante Meuleman <meuleman@xxxxxxxxxxxx>
>
> Host platforms such as routers supported by OpenWRT can
> support NVRAM reading directly from internal NVRAM store.
> With this patch the nvram load routines will fall back to
> this method when there is no nvram file and support is
> available in the kernel.

FWIW it's OpenWrt :)


> This patch relies on a change which has been submitted to the
> linux-mips maintainer [1]. However, the brcmfmac code that relies on
> it is under CONFIG_BCM47XX flag. Still need to know whether that
> patch will be accepted or not before applying this one.

Yeah, lets give this patch a few days at least, so we can be sure
it'll be properly synced with MIPS work.
I'm OK with brcmfmac internal changes (you may send them now as
separated patch if you want to), but lets be careful with
bcm47xx_nvram.h part.


> @@ -19,6 +19,9 @@
>  #include <linux/device.h>
>  #include <linux/firmware.h>
>  #include <linux/module.h>
> +#if IS_ENABLED(CONFIG_BCM47XX)
> +#include <linux/bcm47xx_nvram.h>
> +#endif

This header is safe to include on any arch, as well as all functions
are. Drop the #if please.


> @@ -66,6 +71,27 @@ struct nvram_parser {
>         bool multi_dev_v2;
>  };
>
> +#if IS_ENABLED(CONFIG_BCM47XX)
> +static char *brcmf_nvram_get_contents(size_t *nvram_size)
> +{
> +       return bcm47xx_nvram_get_contents(nvram_size);
> +}
> +
> +static void brcmf_nvram_release_contents(char *nvram)
> +{
> +       bcm47xx_nvram_release_contents(nvram);
> +}
> +#else
> +static char *brcmf_nvram_get_contents(size_t *nvram_size)
> +{
> +       return NULL;
> +}
> +
> +static void brcmf_nvram_release_contents(char *nvram)
> +{
> +}
> +#endif

Everything you put in #else simply re-implements what you sent for
MIPS tree. We don't want to duplicate that code.
Also applying above code will break building wireless-drivers-next on
MIPS, we can't push this patch.

I can understand you are looking for a way to get this patch into
current -next and to somehow sync work across trees. I'm against
anything like merging MIPS tree to wireless-driver-next, but I may
have some idea.
I think the best way for achieving this is to rework your patch to
modify include/linux/bcm47xx_nvram.h. You could modify it the same way
you did in your patch for MIPS tree, except for
bcm47xx_nvram_get_contents. Don't implement this function for real (in
.c file), but instead make in dummy inline in a bcm47xx_nvram.h like:
static inline char *bcm47xx_nvram_get_contents(size_t *val_len)
{
        /* TODO: Implement in .c file */
        return NULL;
}

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux