Changeset 48831


Ignore:
Timestamp:
2016-03-01T09:14:34+01:00 (2 years ago)
Author:
blogic
Message:

kernel: take bcm47xx_nvram.h from kernel and not backports

compat-wireless/backports now contains a bcm47xx_nvram.h file to
backport some of the functions in it which are used by the bcmfmac
driver. This file just checks for the kernel versions and provide an
empty implementations on older kernel versions. This is OK on most
systems, but on bcm47xx / bcm53xx systems we want to call the real
functions here. This commit removes the file from backports in our
build process like we do it with the bcma and ssb header files. Instead
we add a recent version into our kernel so all code uses only one
header file. On bcm47xx / bcm53xx the real implementations of this code
will be used.

Reported-by: Hante Meuleman <meuleman@…>
Signed-off-by: Hauke Mehrtens <hauke@…>
[Backport of r47467. The recent mac80211 backport was missing this patch,
breaking the build of the brcmfmac module]
Signed-off-by: Matthias Schiffer <mschiffer@…>

Location:
branches/chaos_calmer/target/linux
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • branches/chaos_calmer/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch

    r45711 r48831  
    183183  
    184184 #include "ssb_private.h" 
    185 --- /dev/null 
    186 +++ b/include/linux/bcm47xx_nvram.h 
    187 @@ -0,0 +1,34 @@ 
    188 +/* 
    189 + *  This program is free software; you can redistribute  it and/or modify it 
    190 + *  under  the terms of  the GNU General  Public License as published by the 
    191 + *  Free Software Foundation;  either version 2 of the  License, or (at your 
    192 + *  option) any later version. 
    193 + */ 
    194 + 
    195 +#ifndef __BCM47XX_NVRAM_H 
    196 +#define __BCM47XX_NVRAM_H 
    197 + 
    198 +#include <linux/types.h> 
    199 +#include <linux/kernel.h> 
    200 + 
    201 +#ifdef CONFIG_BCM47XX 
    202 +int bcm47xx_nvram_init_from_mem(u32 base, u32 lim); 
    203 +int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len); 
    204 +int bcm47xx_nvram_gpio_pin(const char *name); 
    205 +#else 
    206 +static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim) 
    207 +{ 
    208 +       return -ENOTSUPP; 
    209 +}; 
    210 +static inline int bcm47xx_nvram_getenv(const char *name, char *val, 
    211 +                                      size_t val_len) 
    212 +{ 
    213 +       return -ENOTSUPP; 
    214 +}; 
    215 +static inline int bcm47xx_nvram_gpio_pin(const char *name) 
    216 +{ 
    217 +       return -ENOTSUPP; 
    218 +}; 
    219 +#endif 
    220 + 
    221 +#endif /* __BCM47XX_NVRAM_H */ 
  • branches/chaos_calmer/target/linux/brcm47xx/patches-3.18/032-08-mips-bcm47xx-allow-retrieval-of-complete-nvram-conte.patch

    r46015 r48831  
    120120+} 
    121121+EXPORT_SYMBOL(bcm47xx_nvram_get_contents); 
    122 --- a/include/linux/bcm47xx_nvram.h 
    123 +++ b/include/linux/bcm47xx_nvram.h 
    124 @@ -10,11 +10,17 @@ 
    125   
    126  #include <linux/types.h> 
    127  #include <linux/kernel.h> 
    128 +#include <linux/vmalloc.h> 
    129   
    130  #ifdef CONFIG_BCM47XX 
    131  int bcm47xx_nvram_init_from_mem(u32 base, u32 lim); 
    132  int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len); 
    133  int bcm47xx_nvram_gpio_pin(const char *name); 
    134 +char *bcm47xx_nvram_get_contents(size_t *val_len); 
    135 +static inline void bcm47xx_nvram_release_contents(char *nvram) 
    136 +{ 
    137 +       vfree(nvram); 
    138 +}; 
    139  #else 
    140  static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim) 
    141  { 
    142 @@ -29,6 +35,15 @@ static inline int bcm47xx_nvram_gpio_pin 
    143  { 
    144         return -ENOTSUPP; 
    145  }; 
    146 + 
    147 +static inline char *bcm47xx_nvram_get_contents(size_t *val_len) 
    148 +{ 
    149 +       return NULL; 
    150 +}; 
    151 + 
    152 +static inline void bcm47xx_nvram_release_contents(char *nvram) 
    153 +{ 
    154 +}; 
    155  #endif 
    156   
    157  #endif /* __BCM47XX_NVRAM_H */ 
Note: See TracChangeset for help on using the changeset viewer.