All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roland Vossen" <rvossen@broadcom.com>
To: gregkh@suse.de
Cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org
Subject: [PATCH 17/20] staging: brcm80211: removed unused softmac transmit power variables
Date: Mon, 12 Sep 2011 12:15:01 +0200	[thread overview]
Message-ID: <1315822504-24210-18-git-send-email-rvossen@broadcom.com> (raw)
In-Reply-To: <1315822504-24210-1-git-send-email-rvossen@broadcom.com>

Struct member variables were only set to '0'. As a result, function
brcms_c_local_constraint_qdbm() always returned BRCMS_TXPWR_MAX and
thus could be removed.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
---
 drivers/staging/brcm80211/brcmsmac/main.c |   34 +---------------------------
 drivers/staging/brcm80211/brcmsmac/main.h |    7 ------
 2 files changed, 2 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/main.c b/drivers/staging/brcm80211/brcmsmac/main.c
index 9df2f86..5199f6a 100644
--- a/drivers/staging/brcm80211/brcmsmac/main.c
+++ b/drivers/staging/brcm80211/brcmsmac/main.c
@@ -3275,44 +3275,14 @@ static brcms_b_init(struct brcms_hardware *wlc_hw, u16 chanspec,
 		brcms_b_clkctl_clk(wlc_hw, CLK_DYNAMIC);
 }
 
-static u8 brcms_c_local_constraint_qdbm(struct brcms_c_info *wlc)
-{
-	u8 local;
-	s16 local_max;
-
-	local = BRCMS_TXPWR_MAX;
-	if (wlc->pub->associated &&
-	    (brcmu_chspec_ctlchan(wlc->chanspec) ==
-	     brcmu_chspec_ctlchan(wlc->home_chanspec))) {
-
-		/* get the local power constraint if we are on the AP's
-		 * channel [802.11h, 7.3.2.13]
-		 */
-		/* Clamp the value between 0 and BRCMS_TXPWR_MAX w/o
-		 * overflowing the target */
-		local_max =
-		    (wlc->txpwr_local_max -
-		     wlc->txpwr_local_constraint) * BRCMS_TXPWR_DB_FACTOR;
-		if (local_max > 0 && local_max < BRCMS_TXPWR_MAX)
-			return (u8) local_max;
-		if (local_max < 0)
-			return 0;
-	}
-
-	return local;
-}
-
 static void brcms_c_set_phy_chanspec(struct brcms_c_info *wlc,
 				     u16 chanspec)
 {
 	/* Save our copy of the chanspec */
 	wlc->chanspec = chanspec;
 
-	/* Set the chanspec and power limits for this locale after computing
-	 * any 11h local tx power constraints.
-	 */
-	brcms_c_channel_set_chanspec(wlc->cmi, chanspec,
-				 brcms_c_local_constraint_qdbm(wlc));
+	/* Set the chanspec and power limits for this locale */
+	brcms_c_channel_set_chanspec(wlc->cmi, chanspec, BRCMS_TXPWR_MAX);
 
 	if (wlc->stf->ss_algosel_auto)
 		brcms_c_stf_ss_algo_channel_get(wlc, &wlc->stf->ss_algo_channel,
diff --git a/drivers/staging/brcm80211/brcmsmac/main.h b/drivers/staging/brcm80211/brcmsmac/main.h
index 1ee283c..58d5c2e 100644
--- a/drivers/staging/brcm80211/brcmsmac/main.h
+++ b/drivers/staging/brcm80211/brcmsmac/main.h
@@ -467,8 +467,6 @@ struct brcms_txq_info {
  * war16165: PCI slow clock 16165 war flag.
  * txpend16165war: PCI slow clock 16165 war flag.
  * qvalid: DirFrmQValid and BcMcFrmQValid.
- * txpwr_local_max: regulatory local txpwr max.
- * txpwr_local_constraint: local power contraint in dB.
  * ampdu: ampdu module handler.
  * asi: antsel module handler.
  * cmi: channel manager module handler.
@@ -574,11 +572,6 @@ struct brcms_c_info {
 	/* packet queue */
 	uint qvalid;
 
-	/* Regulatory power limits */
-	s8 txpwr_local_max;
-	u8 txpwr_local_constraint;
-
-
 	struct ampdu_info *ampdu;
 	struct antsel_info *asi;
 	struct brcms_cm_info *cmi;
-- 
1.7.4.1



  parent reply	other threads:[~2011-09-12 10:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-12 10:14 [PATCH 00/20] staging: brcm80211: 4th reaction to mainline patch #2 Roland Vossen
2011-09-12 10:14 ` [PATCH 01/20] staging: brcm80211: stop using kthread for iscan status check in fullmac Roland Vossen
2011-09-12 10:14 ` [PATCH 02/20] staging: brcm80211: cleaned up softmac types.h macro's Roland Vossen
2011-09-12 10:14 ` [PATCH 03/20] staging: brcm80211: cleaned up brcmu_utils.h macro's Roland Vossen
2011-09-12 10:14 ` [PATCH 04/20] staging: brcm80211: cleaned up brcmu_wifi.h macro's Roland Vossen
2011-09-12 10:14 ` [PATCH 05/20] staging: brcm80211: cleaned up fullmac macro's Roland Vossen
2011-09-12 10:14 ` [PATCH 06/20] staging: brcm80211: removed fullmac BRCMF_IOCTL_MAGIC support Roland Vossen
2011-09-12 10:14 ` [PATCH 07/20] staging: brcm80211: removed fullmac function brcmf_sdcard_iovar_op() Roland Vossen
2011-09-12 10:14 ` [PATCH 08/20] staging: brcm80211: remove static function variable in brcmfmac Roland Vossen
2011-09-12 10:14 ` [PATCH 09/20] staging: brcm80211: remove static variables from wl_cfg80211.c Roland Vossen
2011-09-12 13:06   ` Dan Carpenter
2011-09-12 13:34     ` Roland Vossen
2011-09-12 10:14 ` [PATCH 10/20] staging: brcm80211: removed unused encryption/security functionality Roland Vossen
2011-09-12 13:13   ` Dan Carpenter
2011-09-12 10:14 ` [PATCH 11/20] staging: brcm80211: removed softmac 'tunable' functionality Roland Vossen
2011-09-12 10:14 ` [PATCH 12/20] staging: brcm80211: cleaned up unused softmac struct members Roland Vossen
2011-09-12 10:14 ` [PATCH 13/20] staging: brcm80211: removed softmac ratespec override functionality Roland Vossen
2011-09-12 13:21   ` Dan Carpenter
2011-09-12 13:24     ` Dan Carpenter
2011-09-12 13:30       ` Roland Vossen
2011-09-12 10:14 ` [PATCH 14/20] staging: brcm80211: removed unused softmac code after macro cleanup Roland Vossen
2011-09-12 10:14 ` [PATCH 15/20] staging: brcm80211: removed unused softmac struct brcms_c_if Roland Vossen
2011-09-12 10:15 ` [PATCH 16/20] staging: brcm80211: removed several unused softmac main.h struct members Roland Vossen
2011-09-12 10:15 ` Roland Vossen [this message]
2011-09-12 10:15 ` [PATCH 18/20] staging: brcm80211: removed more " Roland Vossen
2011-09-12 10:15 ` [PATCH 19/20] staging: brcm80211: removed softmac files alloc.c/alloc.h Roland Vossen
2011-09-12 10:15 ` [PATCH 20/20] staging: brcm80211: remove static function declaration in wl_cfg80211 Roland Vossen
2011-09-12 14:56 ` [PATCH 00/20] staging: brcm80211: 4th reaction to mainline patch #2 Greg KH

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=1315822504-24210-18-git-send-email-rvossen@broadcom.com \
    --to=rvossen@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.