lkml.org 
[lkml]   [2014]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.5 18/88] rtlwifi: rtl8192cu: Fix some code in RF handling
    Date
    3.5.7.30 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Larry Finger <Larry.Finger@lwfinger.net>

    commit e9b0784bb9de3152e787ee779868c626b137fb3b upstream.

    Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
    ---
    drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 29 ++++++++++++++++-------------
    1 file changed, 16 insertions(+), 13 deletions(-)

    diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
    index 4763426..bbe9a78 100644
    --- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
    +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
    @@ -85,17 +85,15 @@ void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
    if (mac->act_scanning) {
    tx_agc[RF90_PATH_A] = 0x3f3f3f3f;
    tx_agc[RF90_PATH_B] = 0x3f3f3f3f;
    - if (turbo_scanoff) {
    - for (idx1 = RF90_PATH_A; idx1 <= RF90_PATH_B; idx1++) {
    - tx_agc[idx1] = ppowerlevel[idx1] |
    - (ppowerlevel[idx1] << 8) |
    - (ppowerlevel[idx1] << 16) |
    - (ppowerlevel[idx1] << 24);
    - if (rtlhal->interface == INTF_USB) {
    - if (tx_agc[idx1] > 0x20 &&
    - rtlefuse->external_pa)
    - tx_agc[idx1] = 0x20;
    - }
    + for (idx1 = RF90_PATH_A; idx1 <= RF90_PATH_B; idx1++) {
    + tx_agc[idx1] = ppowerlevel[idx1] |
    + (ppowerlevel[idx1] << 8) |
    + (ppowerlevel[idx1] << 16) |
    + (ppowerlevel[idx1] << 24);
    + if (rtlhal->interface == INTF_USB) {
    + if (tx_agc[idx1] > 0x20 &&
    + rtlefuse->external_pa)
    + tx_agc[idx1] = 0x20;
    }
    }
    } else {
    @@ -107,7 +105,7 @@ void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
    TXHIGHPWRLEVEL_LEVEL2) {
    tx_agc[RF90_PATH_A] = 0x00000000;
    tx_agc[RF90_PATH_B] = 0x00000000;
    - } else{
    + } else {
    for (idx1 = RF90_PATH_A; idx1 <= RF90_PATH_B; idx1++) {
    tx_agc[idx1] = ppowerlevel[idx1] |
    (ppowerlevel[idx1] << 8) |
    @@ -379,7 +377,12 @@ static void _rtl92c_write_ofdm_power_reg(struct ieee80211_hw *hw,
    regoffset == RTXAGC_B_MCS07_MCS04)
    regoffset = 0xc98;
    for (i = 0; i < 3; i++) {
    - writeVal = (writeVal > 6) ? (writeVal - 6) : 0;
    + if (i != 2)
    + writeVal = (writeVal > 8) ?
    + (writeVal - 8) : 0;
    + else
    + writeVal = (writeVal > 6) ?
    + (writeVal - 6) : 0;
    rtl_write_byte(rtlpriv, (u32)(regoffset + i),
    (u8)writeVal);
    }
    --
    1.8.3.2


    \
     
     \ /
      Last update: 2014-02-07 12:41    [W:8.216 / U:0.500 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site