diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-02-08 21:56:52 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-22 14:47:38 -0500 |
commit | 02b6ab0ab936b058632cf0cfdf226778a1005882 (patch) | |
tree | 6a32c7592e6014c8dc2a90ec75b0ff511d43d836 /drivers/net/wireless/rtlwifi/rtl8192se | |
parent | b6df7f1d3b0513529c496b7ef70f0f14b5177407 (diff) |
rtlwifi: rtl8192c-common: rtl8192se: rtl8192de: Simplify if statements
Devendra Naga <devendra.aaru@gmail.com> submitted a patch for rtl8192c_common
to change the tests in _rtl92c_store_pwrIndex_diffrate_offset(). This patch
improves on those changes and applies similar modifications to drivers rtl8192se
and rtl8192de.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192se')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c index 05b4e2790e99..6d5bbd0e4d38 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c | |||
@@ -678,30 +678,28 @@ static void _rtl92s_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw, | |||
678 | { | 678 | { |
679 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 679 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
680 | struct rtl_phy *rtlphy = &(rtlpriv->phy); | 680 | struct rtl_phy *rtlphy = &(rtlpriv->phy); |
681 | int index; | ||
681 | 682 | ||
682 | if (reg_addr == RTXAGC_RATE18_06) | 683 | if (reg_addr == RTXAGC_RATE18_06) |
683 | rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][0] = | 684 | index = 0; |
684 | data; | 685 | else if (reg_addr == RTXAGC_RATE54_24) |
685 | if (reg_addr == RTXAGC_RATE54_24) | 686 | index = 1; |
686 | rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][1] = | 687 | else if (reg_addr == RTXAGC_CCK_MCS32) |
687 | data; | 688 | index = 6; |
688 | if (reg_addr == RTXAGC_CCK_MCS32) | 689 | else if (reg_addr == RTXAGC_MCS03_MCS00) |
689 | rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][6] = | 690 | index = 2; |
690 | data; | 691 | else if (reg_addr == RTXAGC_MCS07_MCS04) |
691 | if (reg_addr == RTXAGC_MCS03_MCS00) | 692 | index = 3; |
692 | rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][2] = | 693 | else if (reg_addr == RTXAGC_MCS11_MCS08) |
693 | data; | 694 | index = 4; |
694 | if (reg_addr == RTXAGC_MCS07_MCS04) | 695 | else if (reg_addr == RTXAGC_MCS15_MCS12) |
695 | rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][3] = | 696 | index = 5; |
696 | data; | 697 | else |
697 | if (reg_addr == RTXAGC_MCS11_MCS08) | 698 | return; |
698 | rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][4] = | 699 | |
699 | data; | 700 | rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][index] = data; |
700 | if (reg_addr == RTXAGC_MCS15_MCS12) { | 701 | if (index == 5) |
701 | rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][5] = | ||
702 | data; | ||
703 | rtlphy->pwrgroup_cnt++; | 702 | rtlphy->pwrgroup_cnt++; |
704 | } | ||
705 | } | 703 | } |
706 | 704 | ||
707 | static void _rtl92s_phy_init_register_definition(struct ieee80211_hw *hw) | 705 | static void _rtl92s_phy_init_register_definition(struct ieee80211_hw *hw) |