]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging: brcm80211: removed unused softmac transmit power variables
authorRoland Vossen <rvossen@broadcom.com>
Mon, 12 Sep 2011 10:15:01 +0000 (12:15 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 12 Sep 2011 14:55:47 +0000 (16:55 +0200)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmsmac/main.c
drivers/staging/brcm80211/brcmsmac/main.h

index 9df2f8609ee9ef891554b9de763170b1a50fd9e5..5199f6aa6eea2067e6ba71837cf5598fba40a1b3 100644 (file)
@@ -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,
index 1ee283c5eb2307848a2bd8cd8bd659127a89b079..58d5c2ebcbafde3cff24a478dc837b48d617472a 100644 (file)
@@ -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;