brcmsmac: phy_lcn: remove duplicate code
Remove and refactor some code in order to avoid having identical code for different branches. Notice that this piece of code hasn't been modified since 2011. Addresses-Coverity-ID: 1226756 ("Identical code for different branches") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
1f589e2510
commit
863683cfbb
1 changed files with 2 additions and 7 deletions
|
@ -3388,13 +3388,8 @@ void wlc_lcnphy_deaf_mode(struct brcms_phy *pi, bool mode)
|
||||||
u8 phybw40;
|
u8 phybw40;
|
||||||
phybw40 = CHSPEC_IS40(pi->radio_chanspec);
|
phybw40 = CHSPEC_IS40(pi->radio_chanspec);
|
||||||
|
|
||||||
if (LCNREV_LT(pi->pubpi.phy_rev, 2)) {
|
mod_phy_reg(pi, 0x4b0, (0x1 << 5), (mode) << 5);
|
||||||
mod_phy_reg(pi, 0x4b0, (0x1 << 5), (mode) << 5);
|
mod_phy_reg(pi, 0x4b1, (0x1 << 9), 0 << 9);
|
||||||
mod_phy_reg(pi, 0x4b1, (0x1 << 9), 0 << 9);
|
|
||||||
} else {
|
|
||||||
mod_phy_reg(pi, 0x4b0, (0x1 << 5), (mode) << 5);
|
|
||||||
mod_phy_reg(pi, 0x4b1, (0x1 << 9), 0 << 9);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (phybw40 == 0) {
|
if (phybw40 == 0) {
|
||||||
mod_phy_reg((pi), 0x410,
|
mod_phy_reg((pi), 0x410,
|
||||||
|
|
Loading…
Add table
Reference in a new issue