staging: brcm80211: remove checkpatch warnings from phy_n.c
The source file phy_n.c had couple of checkpatch warnings that have been fixed in this patch. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
d558dea791
commit
bfaa5765fd
1 changed files with 22 additions and 29 deletions
|
@ -14705,12 +14705,10 @@ void WLBANDINITFN(wlc_phy_init_nphy) (struct brcms_phy *pi)
|
||||||
tx_pwrctrl_tbl = wlc_phy_get_ipa_gaintbl_nphy(pi);
|
tx_pwrctrl_tbl = wlc_phy_get_ipa_gaintbl_nphy(pi);
|
||||||
} else {
|
} else {
|
||||||
if (CHSPEC_IS5G(pi->radio_chanspec)) {
|
if (CHSPEC_IS5G(pi->radio_chanspec)) {
|
||||||
if NREV_IS
|
if (NREV_IS(pi->pubpi.phy_rev, 3)) {
|
||||||
(pi->pubpi.phy_rev, 3) {
|
|
||||||
tx_pwrctrl_tbl =
|
tx_pwrctrl_tbl =
|
||||||
nphy_tpc_5GHz_txgain_rev3;
|
nphy_tpc_5GHz_txgain_rev3;
|
||||||
} else if NREV_IS
|
} else if (NREV_IS(pi->pubpi.phy_rev, 4)) {
|
||||||
(pi->pubpi.phy_rev, 4) {
|
|
||||||
tx_pwrctrl_tbl =
|
tx_pwrctrl_tbl =
|
||||||
(pi->srom_fem5g.extpagain == 3) ?
|
(pi->srom_fem5g.extpagain == 3) ?
|
||||||
nphy_tpc_5GHz_txgain_HiPwrEPA :
|
nphy_tpc_5GHz_txgain_HiPwrEPA :
|
||||||
|
@ -22515,21 +22513,21 @@ struct nphy_txgains wlc_phy_get_tx_gain_nphy(struct brcms_phy *pi)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
uint phyrev = pi->pubpi.phy_rev;
|
||||||
|
|
||||||
base_idx[0] = (read_phy_reg(pi, 0x1ed) >> 8) & 0x7f;
|
base_idx[0] = (read_phy_reg(pi, 0x1ed) >> 8) & 0x7f;
|
||||||
base_idx[1] = (read_phy_reg(pi, 0x1ee) >> 8) & 0x7f;
|
base_idx[1] = (read_phy_reg(pi, 0x1ee) >> 8) & 0x7f;
|
||||||
for (core_no = 0; core_no < 2; core_no++) {
|
for (core_no = 0; core_no < 2; core_no++) {
|
||||||
if (NREV_GE(pi->pubpi.phy_rev, 3)) {
|
if (NREV_GE(phyrev, 3)) {
|
||||||
if (PHY_IPA(pi)) {
|
if (PHY_IPA(pi)) {
|
||||||
tx_pwrctrl_tbl =
|
tx_pwrctrl_tbl =
|
||||||
wlc_phy_get_ipa_gaintbl_nphy(pi);
|
wlc_phy_get_ipa_gaintbl_nphy(pi);
|
||||||
} else {
|
} else {
|
||||||
if (CHSPEC_IS5G(pi->radio_chanspec)) {
|
if (CHSPEC_IS5G(pi->radio_chanspec)) {
|
||||||
if NREV_IS
|
if (NREV_IS(phyrev, 3)) {
|
||||||
(pi->pubpi.phy_rev, 3) {
|
|
||||||
tx_pwrctrl_tbl =
|
tx_pwrctrl_tbl =
|
||||||
nphy_tpc_5GHz_txgain_rev3;
|
nphy_tpc_5GHz_txgain_rev3;
|
||||||
} else if NREV_IS
|
} else if (NREV_IS(phyrev, 4)) {
|
||||||
(pi->pubpi.phy_rev, 4) {
|
|
||||||
tx_pwrctrl_tbl =
|
tx_pwrctrl_tbl =
|
||||||
(pi->srom_fem5g.
|
(pi->srom_fem5g.
|
||||||
extpagain ==
|
extpagain ==
|
||||||
|
@ -22542,8 +22540,7 @@ struct nphy_txgains wlc_phy_get_tx_gain_nphy(struct brcms_phy *pi)
|
||||||
nphy_tpc_5GHz_txgain_rev5;
|
nphy_tpc_5GHz_txgain_rev5;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (NREV_GE
|
if (NREV_GE(phyrev, 7)) {
|
||||||
(pi->pubpi.phy_rev, 7)) {
|
|
||||||
if (pi->pubpi.
|
if (pi->pubpi.
|
||||||
radiorev == 3) {
|
radiorev == 3) {
|
||||||
tx_pwrctrl_tbl =
|
tx_pwrctrl_tbl =
|
||||||
|
@ -22556,9 +22553,7 @@ struct nphy_txgains wlc_phy_get_tx_gain_nphy(struct brcms_phy *pi)
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (NREV_GE
|
if (NREV_GE(phyrev, 5)
|
||||||
(pi->pubpi.phy_rev,
|
|
||||||
5)
|
|
||||||
&& (pi->srom_fem2g.
|
&& (pi->srom_fem2g.
|
||||||
extpagain ==
|
extpagain ==
|
||||||
3)) {
|
3)) {
|
||||||
|
@ -22571,8 +22566,7 @@ struct nphy_txgains wlc_phy_get_tx_gain_nphy(struct brcms_phy *pi)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if NREV_GE
|
if (NREV_GE(phyrev, 7)) {
|
||||||
(pi->pubpi.phy_rev, 7) {
|
|
||||||
target_gain.ipa[core_no] =
|
target_gain.ipa[core_no] =
|
||||||
(tx_pwrctrl_tbl[base_idx[core_no]]
|
(tx_pwrctrl_tbl[base_idx[core_no]]
|
||||||
>> 16) & 0x7;
|
>> 16) & 0x7;
|
||||||
|
@ -27449,20 +27443,20 @@ void wlc_phy_txpwr_fixpower_nphy(struct brcms_phy *pi)
|
||||||
pi->nphy_txpwrindex[PHY_CORE_1].index_internal_save = txpi[1];
|
pi->nphy_txpwrindex[PHY_CORE_1].index_internal_save = txpi[1];
|
||||||
|
|
||||||
for (core = 0; core < pi->pubpi.phy_corenum; core++) {
|
for (core = 0; core < pi->pubpi.phy_corenum; core++) {
|
||||||
if (NREV_GE(pi->pubpi.phy_rev, 3)) {
|
uint phyrev = pi->pubpi.phy_rev;
|
||||||
|
|
||||||
|
if (NREV_GE(phyrev, 3)) {
|
||||||
if (PHY_IPA(pi)) {
|
if (PHY_IPA(pi)) {
|
||||||
u32 *tx_gaintbl =
|
u32 *tx_gaintbl =
|
||||||
wlc_phy_get_ipa_gaintbl_nphy(pi);
|
wlc_phy_get_ipa_gaintbl_nphy(pi);
|
||||||
txgain = tx_gaintbl[txpi[core]];
|
txgain = tx_gaintbl[txpi[core]];
|
||||||
} else {
|
} else {
|
||||||
if (CHSPEC_IS5G(pi->radio_chanspec)) {
|
if (CHSPEC_IS5G(pi->radio_chanspec)) {
|
||||||
if NREV_IS
|
if (NREV_IS(phyrev, 3)) {
|
||||||
(pi->pubpi.phy_rev, 3) {
|
|
||||||
txgain =
|
txgain =
|
||||||
nphy_tpc_5GHz_txgain_rev3
|
nphy_tpc_5GHz_txgain_rev3
|
||||||
[txpi[core]];
|
[txpi[core]];
|
||||||
} else if NREV_IS
|
} else if (NREV_IS(phyrev, 4)) {
|
||||||
(pi->pubpi.phy_rev, 4) {
|
|
||||||
txgain =
|
txgain =
|
||||||
(pi->srom_fem5g.extpagain ==
|
(pi->srom_fem5g.extpagain ==
|
||||||
3) ?
|
3) ?
|
||||||
|
@ -27476,7 +27470,7 @@ void wlc_phy_txpwr_fixpower_nphy(struct brcms_phy *pi)
|
||||||
[txpi[core]];
|
[txpi[core]];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (NREV_GE(pi->pubpi.phy_rev, 5) &&
|
if (NREV_GE(phyrev, 5) &&
|
||||||
(pi->srom_fem2g.extpagain == 3)) {
|
(pi->srom_fem2g.extpagain == 3)) {
|
||||||
txgain =
|
txgain =
|
||||||
nphy_tpc_txgain_HiPwrEPA
|
nphy_tpc_txgain_HiPwrEPA
|
||||||
|
@ -27492,20 +27486,19 @@ void wlc_phy_txpwr_fixpower_nphy(struct brcms_phy *pi)
|
||||||
txgain = nphy_tpc_txgain[txpi[core]];
|
txgain = nphy_tpc_txgain[txpi[core]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NREV_GE(pi->pubpi.phy_rev, 3)) {
|
if (NREV_GE(phyrev, 3))
|
||||||
rad_gain = (txgain >> 16) & ((1 << (32 - 16 + 1)) - 1);
|
rad_gain = (txgain >> 16) & ((1 << (32 - 16 + 1)) - 1);
|
||||||
} else {
|
else
|
||||||
rad_gain = (txgain >> 16) & ((1 << (28 - 16 + 1)) - 1);
|
rad_gain = (txgain >> 16) & ((1 << (28 - 16 + 1)) - 1);
|
||||||
}
|
|
||||||
|
|
||||||
if (NREV_GE(pi->pubpi.phy_rev, 7)) {
|
if (NREV_GE(phyrev, 7))
|
||||||
dac_gain = (txgain >> 8) & ((1 << (10 - 8 + 1)) - 1);
|
dac_gain = (txgain >> 8) & ((1 << (10 - 8 + 1)) - 1);
|
||||||
} else {
|
else
|
||||||
dac_gain = (txgain >> 8) & ((1 << (13 - 8 + 1)) - 1);
|
dac_gain = (txgain >> 8) & ((1 << (13 - 8 + 1)) - 1);
|
||||||
}
|
|
||||||
bbmult = (txgain >> 0) & ((1 << (7 - 0 + 1)) - 1);
|
bbmult = (txgain >> 0) & ((1 << (7 - 0 + 1)) - 1);
|
||||||
|
|
||||||
if (NREV_GE(pi->pubpi.phy_rev, 3)) {
|
if (NREV_GE(phyrev, 3)) {
|
||||||
mod_phy_reg(pi, ((core == PHY_CORE_0) ? 0x8f :
|
mod_phy_reg(pi, ((core == PHY_CORE_0) ? 0x8f :
|
||||||
0xa5), (0x1 << 8), (0x1 << 8));
|
0xa5), (0x1 << 8), (0x1 << 8));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue