diff options
author | Michael Straube <straube.linux@gmail.com> | 2018-10-06 15:02:30 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-09 15:17:28 +0200 |
commit | 9fd3ad9d8a54caf12b291c9c2f134ce88b11ffd4 (patch) | |
tree | 0ec2d7de4b8e28a9da1765823ae5b81a835af489 | |
parent | staging: rtl8188eu: remove whitespace in rtw_mlme_ext.h (diff) | |
download | linux-9fd3ad9d8a54caf12b291c9c2f134ce88b11ffd4.tar.xz linux-9fd3ad9d8a54caf12b291c9c2f134ce88b11ffd4.zip |
staging: rtl8188eu: remove dead code from dm_fast_training_init()
The variable AntCombination is initialized to 2 and never changed.
So the else if path is never used. Remove the dead code and the
variable AntCombination.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8188eu/hal/odm_rtl8188e.c | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c b/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c index 3fb0ed604e3e..3430796d56a3 100644 --- a/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c +++ b/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c @@ -88,7 +88,6 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm) struct adapter *adapter = dm_odm->Adapter; u32 value32, i; struct fast_ant_train *dm_fat_tbl = &dm_odm->DM_FatTable; - u32 AntCombination = 2; if (*dm_odm->mp_mode == 1) return; @@ -119,35 +118,12 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm) phy_set_bb_reg(adapter, 0xca4, bMaskDWord, 0x000000a0); /* antenna mapping table */ - if (AntCombination == 2) { - if (!dm_odm->bIsMPChip) { /* testchip */ - phy_set_bb_reg(adapter, 0x858, BIT(10) | BIT(9) | BIT(8), 1); - phy_set_bb_reg(adapter, 0x858, BIT(13) | BIT(12) | BIT(11), 2); - } else { /* MPchip */ - phy_set_bb_reg(adapter, 0x914, bMaskByte0, 1); - phy_set_bb_reg(adapter, 0x914, bMaskByte1, 2); - } - } else if (AntCombination == 7) { - if (!dm_odm->bIsMPChip) { /* testchip */ - phy_set_bb_reg(adapter, 0x858, BIT(10) | BIT(9) | BIT(8), 0); - phy_set_bb_reg(adapter, 0x858, BIT(13) | BIT(12) | BIT(11), 1); - phy_set_bb_reg(adapter, 0x878, BIT(16), 0); - phy_set_bb_reg(adapter, 0x858, BIT(15) | BIT(14), 2); - phy_set_bb_reg(adapter, 0x878, BIT(19) | BIT(18) | BIT(17), 3); - phy_set_bb_reg(adapter, 0x878, BIT(22) | BIT(21) | BIT(20), 4); - phy_set_bb_reg(adapter, 0x878, BIT(25) | BIT(24) | BIT(23), 5); - phy_set_bb_reg(adapter, 0x878, BIT(28) | BIT(27) | BIT(26), 6); - phy_set_bb_reg(adapter, 0x878, BIT(31) | BIT(30) | BIT(29), 7); - } else { /* MPchip */ - phy_set_bb_reg(adapter, 0x914, bMaskByte0, 0); - phy_set_bb_reg(adapter, 0x914, bMaskByte1, 1); - phy_set_bb_reg(adapter, 0x914, bMaskByte2, 2); - phy_set_bb_reg(adapter, 0x914, bMaskByte3, 3); - phy_set_bb_reg(adapter, 0x918, bMaskByte0, 4); - phy_set_bb_reg(adapter, 0x918, bMaskByte1, 5); - phy_set_bb_reg(adapter, 0x918, bMaskByte2, 6); - phy_set_bb_reg(adapter, 0x918, bMaskByte3, 7); - } + if (!dm_odm->bIsMPChip) { /* testchip */ + phy_set_bb_reg(adapter, 0x858, BIT(10) | BIT(9) | BIT(8), 1); + phy_set_bb_reg(adapter, 0x858, BIT(13) | BIT(12) | BIT(11), 2); + } else { /* MPchip */ + phy_set_bb_reg(adapter, 0x914, bMaskByte0, 1); + phy_set_bb_reg(adapter, 0x914, bMaskByte1, 2); } /* Default Ant Setting when no fast training */ @@ -156,7 +132,7 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm) phy_set_bb_reg(adapter, 0x864, BIT(8) | BIT(7) | BIT(6), 1); /* Enter Traing state */ - phy_set_bb_reg(adapter, 0x864, BIT(2) | BIT(1) | BIT(0), (AntCombination-1)); + phy_set_bb_reg(adapter, 0x864, BIT(2) | BIT(1) | BIT(0), 1); phy_set_bb_reg(adapter, 0xc50, BIT(7), 1); } |