}
 
 static struct si_info *ai_doattach(struct si_info *sii,
-                                  void __iomem *regs, struct pci_dev *pbus,
-                                  char **vars, uint *varsz)
+                                  void __iomem *regs, struct pci_dev *pbus)
 {
        struct si_pub *sih = &sii->pub;
        u32 w, savewin;
                goto exit;
 
        /* Init nvram from sprom/otp if they exist */
-       if (srom_var_init(&sii->pub, cc, vars, varsz))
+       if (srom_var_init(&sii->pub, cc))
                goto exit;
 
-       sii->vars = vars ? *vars : NULL;
-       sii->varsz = varsz ? *varsz : 0;
        ai_nvram_process(sii);
 
        /* === NVRAM, clock is ready === */
  * devid - pci device id (used to determine chip#)
  * osh - opaque OS handle
  * regs - virtual address of initial core registers
- * vars - pointer to a pointer area for "environment" variables
- * varsz - pointer to int to return the size of the vars
  */
 struct si_pub *
-ai_attach(void __iomem *regs, struct pci_dev *sdh, char **vars, uint *varsz)
+ai_attach(void __iomem *regs, struct pci_dev *sdh)
 {
        struct si_info *sii;
 
        if (sii == NULL)
                return NULL;
 
-       if (ai_doattach(sii, regs, sdh, vars, varsz) == NULL) {
+       if (ai_doattach(sii, regs, sdh) == NULL) {
                kfree(sii);
                return NULL;
        }
 
        struct pcicore_info *pch; /* PCI/E core handle */
 
        struct list_head var_list; /* list of srom variables */
-       char *vars;
-       uint varsz;
 
        void __iomem *curmap;                   /* current regs va */
        void __iomem *regs[SI_MAXCORES];        /* other regs va */
 extern void ai_write_wrap_reg(struct si_pub *sih, u32 offset, u32 val);
 
 /* === exported functions === */
-extern struct si_pub *ai_attach(void __iomem *regs, struct pci_dev *sdh,
-                               char **vars, uint *varsz);
+extern struct si_pub *ai_attach(void __iomem *regs, struct pci_dev *sdh);
 extern void ai_detach(struct si_pub *sih);
 extern uint ai_coreid(struct si_pub *sih);
 extern uint ai_corerev(struct si_pub *sih);
 
        }
 }
 
-static void brcms_b_copyfrom_vars(struct brcms_hardware *wlc_hw, char **buf,
-                          uint *len)
-{
-       BCMMSG(wlc_hw->wlc->wiphy, "nvram vars totlen=%d\n",
-               wlc_hw->vars_size);
-
-       *buf = wlc_hw->vars;
-       *len = wlc_hw->vars_size;
-}
-
 static void brcms_b_retrylimit_upd(struct brcms_hardware *wlc_hw,
                                   u16 SRL, u16 LRL)
 {
        struct brcms_hardware *wlc_hw;
        struct d11regs __iomem *regs;
        char *macaddr = NULL;
-       char *vars;
        uint err = 0;
        uint j;
        bool wme = false;
         * Do the hardware portion of the attach. Also initialize software
         * state that depends on the particular hardware we are running.
         */
-       wlc_hw->sih = ai_attach(regsva, btparam,
-                               &wlc_hw->vars, &wlc_hw->vars_size);
+       wlc_hw->sih = ai_attach(regsva, btparam);
        if (wlc_hw->sih == NULL) {
                wiphy_err(wiphy, "wl%d: brcms_b_attach: si_attach failed\n",
                          unit);
                err = 11;
                goto fail;
        }
-       vars = wlc_hw->vars;
 
        /* verify again the device is supported */
        if (!brcms_c_chipmatch(vendor, device)) {
        sha_params.physhim = wlc_hw->physhim;
        sha_params.unit = unit;
        sha_params.corerev = wlc_hw->corerev;
-       sha_params.vars = vars;
        sha_params.vid = wlc_hw->vendorid;
        sha_params.did = wlc_hw->deviceid;
        sha_params.chip = wlc_hw->sih->chip;
                /* Get a phy for this band */
                wlc_hw->band->pi =
                        wlc_phy_attach(wlc_hw->phy_sh, regs,
-                                       wlc_hw->band->bandtype, vars,
-                                       wlc->wiphy);
+                                      wlc_hw->band->bandtype,
+                                      wlc->wiphy);
                if (wlc_hw->band->pi == NULL) {
                        wiphy_err(wiphy, "wl%d: brcms_b_attach: wlc_phy_"
                                  "attach failed\n", unit);
 {
        int aa;
        uint unit;
-       char *vars;
        int bandtype;
        struct si_pub *sih = wlc->hw->sih;
 
        unit = wlc->pub->unit;
-       vars = wlc->pub->vars;
        bandtype = wlc->band->bandtype;
 
        /* get antennas available */
 
        pub->phy_11ncapable = BRCMS_PHY_11N_CAP(wlc->band);
 
-       /* propagate *vars* from BMAC driver to high driver */
-       brcms_b_copyfrom_vars(wlc->hw, &pub->vars, &wlc->vars_size);
-
-
        /* disable allowed duty cycle */
        wlc->tx_duty_cycle_ofdm = 0;
        wlc->tx_duty_cycle_cck = 0;
 
        wlc_phy_shim_detach(wlc_hw->physhim);
 
-       /* free vars */
-       kfree(wlc_hw->vars);
-       wlc_hw->vars = NULL;
-
        if (wlc_hw->sih) {
                ai_detach(wlc_hw->sih);
                wlc_hw->sih = NULL;
 
        u32 machwcap_backup;    /* backup of machwcap */
 
        struct si_pub *sih;     /* SI handle (cookie for siutils calls) */
-       char *vars;             /* "environment" name=value */
-       uint vars_size;         /* size of vars, free vars on detach */
        struct d11regs __iomem *regs;   /* pointer to device registers */
        struct phy_shim_info *physhim; /* phy shim layer handler */
        struct shared_phy *phy_sh;      /* pointer to shared phy state */
  * ampdu: ampdu module handler.
  * asi: antsel module handler.
  * cmi: channel manager module handler.
- * vars_size: size of vars, free vars on detach.
  * vendorid: PCI vendor id.
  * deviceid: PCI device id.
  * ucode_rev: microcode revision.
        struct antsel_info *asi;
        struct brcms_cm_info *cmi;
 
-       uint vars_size;
-
        u16 vendorid;
        u16 deviceid;
        uint ucode_rev;
 
 
 struct brcms_phy_pub *
 wlc_phy_attach(struct shared_phy *sh, struct d11regs __iomem *regs,
-              int bandtype, char *vars, struct wiphy *wiphy)
+              int bandtype, struct wiphy *wiphy)
 {
        struct brcms_phy *pi;
        u32 sflags = 0;
        pi->phy_init_por = true;
        pi->phy_wreg_limit = PHY_WREG_LIMIT;
 
-       pi->vars = vars;
-
        pi->txpwr_percent = 100;
 
        pi->do_initcal = true;
        pi->next = pi->sh->phy_head;
        sh->phy_head = pi;
 
-       pi->vars = (char *)&pi->vars;
-
        memcpy(&pi->pubpi_ro, &pi->pubpi, sizeof(struct brcms_phy_pub));
 
        return &pi->pubpi_ro;
 
        uint unit;
        uint corerev;
        uint buscorerev;
-       char *vars;
        u16 vid;
        u16 did;
        uint chip;
 extern struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp);
 extern struct brcms_phy_pub *wlc_phy_attach(struct shared_phy *sh,
                                            struct d11regs __iomem *regs,
-                                           int bandtype, char *vars,
-                                           struct wiphy *wiphy);
+                                           int bandtype, struct wiphy *wiphy);
 extern void wlc_phy_detach(struct brcms_phy_pub *ppi);
 
 extern bool wlc_phy_get_phyversion(struct brcms_phy_pub *pih, u16 *phytype,
 
 
        struct d11regs __iomem *regs;
        struct brcms_phy *next;
-       char *vars;
        struct brcms_phy_pub pubpi;
 
        bool do_initcal;
 
        uint unit;              /* device instance number */
        uint corerev;           /* core revision */
        struct si_pub *sih;     /* SI handle (cookie for siutils calls) */
-       char *vars;             /* "environment" name=value */
        bool up;                /* interface up and running */
        bool hw_off;            /* HW is off */
        bool hw_up;             /* one time hw up/down */
 
  * Initialize nonvolatile variable table from sprom.
  * Return 0 on success, nonzero on error.
  */
-static int initvars_srom_pci(struct si_pub *sih, void __iomem *curmap,
-                            char **vars, uint *count)
+static int initvars_srom_pci(struct si_pub *sih, void __iomem *curmap)
 {
        u16 *srom;
        u16 __iomem *sromwindow;
  * Initialize local vars from the right source for this platform.
  * Return 0 on success, nonzero on error.
  */
-int srom_var_init(struct si_pub *sih, void __iomem *curmap, char **vars,
-                 uint *count)
+int srom_var_init(struct si_pub *sih, void __iomem *curmap)
 {
        uint len;
 
        len = 0;
 
-       if (vars == NULL || count == NULL)
-               return 0;
-
-       *vars = NULL;
-       *count = 0;
-
        if (curmap != NULL)
-               return initvars_srom_pci(sih, curmap, vars, count);
+               return initvars_srom_pci(sih, curmap);
 
        return -EINVAL;
 }
 
 #include "types.h"
 
 /* Prototypes */
-extern int srom_var_init(struct si_pub *sih, void __iomem *curmap, char **vars,
-                        uint *count);
+extern int srom_var_init(struct si_pub *sih, void __iomem *curmap);
 extern void srom_free_vars(struct si_pub *sih);
 
 extern int srom_read(struct si_pub *sih, uint bus, void *curmap,