linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: gregkh@suse.de
Cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org,
	"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 08/15] staging: brcm80211: remove invalid variable lookup from srom
Date: Wed, 5 Oct 2011 15:20:07 +0200	[thread overview]
Message-ID: <1317820814-7083-9-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1317820814-7083-1-git-send-email-arend@broadcom.com>

In the driver several driver variables were looked up that are
not supported by the srom code. These have been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/staging/brcm80211/brcmsmac/aiutils.c     |    6 +--
 drivers/staging/brcm80211/brcmsmac/main.c        |   34 ++--------------------
 drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c |    6 ----
 3 files changed, 5 insertions(+), 41 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/aiutils.c b/drivers/staging/brcm80211/brcmsmac/aiutils.c
index d44f619..2bc4bb3 100644
--- a/drivers/staging/brcm80211/brcmsmac/aiutils.c
+++ b/drivers/staging/brcm80211/brcmsmac/aiutils.c
@@ -1109,10 +1109,8 @@ static struct si_info *ai_doattach(struct si_info *sii,
 		u32 xtalfreq;
 		si_pmu_init(sih);
 		si_pmu_chip_init(sih);
-		xtalfreq = getintvar(sih, "xtalfreq");
-		/* If xtalfreq var not available, try to measure it */
-		if (xtalfreq == 0)
-			xtalfreq = si_pmu_measure_alpclk(sih);
+
+		xtalfreq = si_pmu_measure_alpclk(sih);
 		si_pmu_pll_init(sih, xtalfreq);
 		si_pmu_res_init(sih);
 		si_pmu_swreg_init(sih);
diff --git a/drivers/staging/brcm80211/brcmsmac/main.c b/drivers/staging/brcm80211/brcmsmac/main.c
index f2339a5..cfa918d 100644
--- a/drivers/staging/brcm80211/brcmsmac/main.c
+++ b/drivers/staging/brcm80211/brcmsmac/main.c
@@ -4557,8 +4557,6 @@ static int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device,
 	bool wme = false;
 	struct shared_phy_params sha_params;
 	struct wiphy *wiphy = wlc->wiphy;
-	char *var;
-	unsigned long res;
 
 	BCMMSG(wlc->wiphy, "wl%d: vendor 0x%x device 0x%x\n", unit, vendor,
 		device);
@@ -4588,27 +4586,6 @@ static int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device,
 	}
 	vars = wlc_hw->vars;
 
-	/*
-	 * Get vendid/devid nvram overwrites, which could be different
-	 * than those the BIOS recognizes for devices on PCMCIA_BUS,
-	 * SDIO_BUS, and SROMless devices on PCI_BUS.
-	 */
-	var = getvar(wlc_hw->sih, "vendid");
-	if (var && !kstrtoul(var, 0, &res)) {
-		vendor = (u16)res;
-		wiphy_err(wiphy, "Overriding vendor id = 0x%x\n",
-			  vendor);
-	}
-	var = getvar(wlc_hw->sih, "devid");
-	if (var && !kstrtoul(var, 0, &res)) {
-		u16 devid = (u16)res;
-		if (devid != 0xffff) {
-			device = devid;
-			wiphy_err(wiphy, "Overriding device id = 0x%x"
-				  "\n", device);
-		}
-	}
-
 	/* verify again the device is supported */
 	if (!brcms_c_chipmatch(vendor, device)) {
 		wiphy_err(wiphy, "wl%d: brcms_b_attach: Unsupported "
@@ -4928,9 +4905,6 @@ static bool brcms_c_attach_stf_ant_init(struct brcms_c_info *wlc)
 
 	/* get antennas available */
 	aa = (s8) getintvar(sih, bandtype == BRCM_BAND_5G ? "aa5g" : "aa2g");
-	if (aa == 0)
-		aa = (s8) getintvar(sih,
-				    bandtype == BRCM_BAND_5G ? "aa1" : "aa0");
 	if ((aa < 1) || (aa > 15)) {
 		wiphy_err(wlc->wiphy, "wl%d: %s: Invalid antennas available in"
 			  " srom (0x%x), using 3\n", unit, __func__, aa);
@@ -5113,11 +5087,9 @@ brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
 	brcms_b_copyfrom_vars(wlc->hw, &pub->vars, &wlc->vars_size);
 
 
-	/* set maximum allowed duty cycle */
-	wlc->tx_duty_cycle_ofdm =
-	    (u16) getintvar(wlc->hw->sih, "tx_duty_cycle_ofdm");
-	wlc->tx_duty_cycle_cck =
-	    (u16) getintvar(wlc->hw->sih, "tx_duty_cycle_cck");
+	/* disable allowed duty cycle */
+	wlc->tx_duty_cycle_ofdm = 0;
+	wlc->tx_duty_cycle_cck = 0;
 
 	brcms_c_stf_phy_chain_calc(wlc);
 
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
index d84e1cf..4bcf305 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
@@ -4920,12 +4920,6 @@ static bool wlc_phy_txpwr_srom_read_lcnphy(struct brcms_phy *pi)
 								   "aa2g"));
 	}
 	pi_lcn->lcnphy_cck_dig_filt_type = -1;
-	if (wlapi_getvar(shim, "cckdigfilttype")) {
-		s16 temp;
-		temp = (s16)wlapi_getintvar(shim, "cckdigfilttype");
-		if (temp >= 0)
-			pi_lcn->lcnphy_cck_dig_filt_type = temp;
-	}
 
 	return true;
 }
-- 
1.7.4.1



  parent reply	other threads:[~2011-10-05 13:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 13:19 [PATCH 00/15] staging: brcm80211: cleanup fullmac structs and softmac srom lookup Arend van Spriel
2011-10-05 13:20 ` [PATCH 01/15] staging: brcm80211: move driver variable functions to srom.c Arend van Spriel
2011-10-06 14:15   ` Arend Van Spriel
2011-10-05 13:20 ` [PATCH 02/15] staging: brcm80211: remove threads_only code from fullmac Arend van Spriel
2011-10-05 13:20 ` [PATCH 03/15] staging: brcm80211: remove redundant bus register layer " Arend van Spriel
2011-10-05 13:20 ` [PATCH 04/15] staging: brcm80211: remove code duplication for driver variable lookup Arend van Spriel
2011-10-05 13:20 ` [PATCH 05/15] staging: brcm80211: change parameter in " Arend van Spriel
2011-10-05 13:20 ` [PATCH 06/15] staging: brcm80211: remove locking macro definitions Arend van Spriel
2011-10-05 13:20 ` [PATCH 07/15] staging: brcm80211: fix thread blocking issue in brcmf_sdbrcm_bus_stop() Arend van Spriel
2011-10-05 13:20 ` Arend van Spriel [this message]
2011-10-05 13:20 ` [PATCH 09/15] staging: brcm80211: use identifiers instead of string for srom lookup Arend van Spriel
2011-10-05 13:20 ` [PATCH 10/15] staging: brcm80211: use enum identifiers in srom variable tables Arend van Spriel
2011-10-05 13:20 ` [PATCH 11/15] staging: brcm80211: replace string based variable storage by linked list Arend van Spriel
2011-10-05 13:20 ` [PATCH 12/15] staging: brcm80211: remove parameter 'off' from _initvars_srom_pci() Arend van Spriel
2011-10-05 13:20 ` [PATCH 13/15] staging: brcm80211: cleanup driver variable references Arend van Spriel
2011-10-05 13:20 ` [PATCH 14/15] staging: brcm80211: clean up struct brcmf_if in fullmac Arend van Spriel
2011-10-05 13:20 ` [PATCH 15/15] staging: brcm80211: remove brcmf_op_if from fullmac Arend van Spriel
2011-10-05 14:40 ` [PATCH 00/15] staging: brcm80211: cleanup fullmac structs and softmac srom lookup Hauke Mehrtens
2011-10-05 16:56   ` Arend van Spriel
2011-10-05 20:47 ` Greg KH
2011-10-06  9:56   ` Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317820814-7083-9-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).