rtlwifi: Change REG_CR+2 to MSR
authorTaehee Yoo <ap420073@gmail.com>
Fri, 20 Mar 2015 10:31:33 +0000 (19:31 +0900)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 30 Mar 2015 08:30:07 +0000 (11:30 +0300)
I changed REG_CR+2 and (MSR) to MSR because MSR is defined as (REG_CR + 2).

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
drivers/net/wireless/rtlwifi/rtl8192de/hw.c
drivers/net/wireless/rtlwifi/rtl8192ee/hw.c
drivers/net/wireless/rtlwifi/rtl8192se/hw.c
drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
drivers/net/wireless/rtlwifi/rtl8723be/hw.c
drivers/net/wireless/rtlwifi/rtl8821ae/hw.c

index bb9f5382da17ecb2599fff98e6f2936b96e7bb68..86ce5b1930e6d2824b66f7d5c95210c59fca6cb7 100644 (file)
@@ -886,7 +886,7 @@ static bool _rtl88ee_init_mac(struct ieee80211_hw *hw)
 
        rtl_write_word(rtlpriv, REG_CR, 0x2ff);
        rtl_write_byte(rtlpriv, REG_CR+1, 0x06);
-       rtl_write_byte(rtlpriv, REG_CR+2, 0x00);
+       rtl_write_byte(rtlpriv, MSR, 0x00);
 
        if (!rtlhal->mac_func_enable) {
                if (_rtl88ee_llt_table_init(hw) == false) {
@@ -1278,7 +1278,7 @@ static int _rtl88ee_set_media_status(struct ieee80211_hw *hw,
                         mode);
        }
 
-       rtl_write_byte(rtlpriv, (MSR), bt_msr | mode);
+       rtl_write_byte(rtlpriv, MSR, bt_msr | mode);
        rtlpriv->cfg->ops->led_control(hw, ledaction);
        if (mode == MSR_AP)
                rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
index 43b2b20e3fcf2480f1a8a81bef2914d6fc4e2d78..d310d55d800efd584f9dd9a6d8e143539c0c777c 100644 (file)
@@ -1364,7 +1364,7 @@ static int _rtl92cu_set_media_status(struct ieee80211_hw *hw,
                         "Network type %d not supported!\n", type);
                goto error_out;
        }
-       rtl_write_byte(rtlpriv, (MSR), bt_msr);
+       rtl_write_byte(rtlpriv, MSR, bt_msr);
        rtlpriv->cfg->ops->led_control(hw, ledaction);
        if ((bt_msr & MSR_MASK) == MSR_AP)
                rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
index 133e395b7401fc80f286792441c72fbb7f56a397..adb810794eef71e27080cd9590a07911eba5123b 100644 (file)
@@ -497,7 +497,7 @@ int rtl92c_set_network_type(struct ieee80211_hw *hw, enum nl80211_iftype type)
                         "Network type %d not supported!\n", type);
                return -EOPNOTSUPP;
        }
-       rtl_write_byte(rtlpriv, (REG_CR + 2), value);
+       rtl_write_byte(rtlpriv, MSR, value);
        return 0;
 }
 
index 01bcc2d218dc5d215a1f0e6125699a007d94b574..f49b60d314502d7565eea0badb7666b8e5e76a55 100644 (file)
@@ -1126,7 +1126,7 @@ static int _rtl92de_set_media_status(struct ieee80211_hw *hw,
                break;
 
        }
-       rtl_write_byte(rtlpriv, REG_CR + 2, bt_msr);
+       rtl_write_byte(rtlpriv, MSR, bt_msr);
        rtlpriv->cfg->ops->led_control(hw, ledaction);
        if ((bt_msr & MSR_MASK) == MSR_AP)
                rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
index db230a3f0137e0650f3e64d3ae87dfd20d6c5e87..da0a6125f314b7c582eefb5ea297fd2efd593ca0 100644 (file)
@@ -1510,7 +1510,7 @@ static int _rtl92ee_set_media_status(struct ieee80211_hw *hw,
                         mode);
        }
 
-       rtl_write_byte(rtlpriv, (MSR), bt_msr | mode);
+       rtl_write_byte(rtlpriv, MSR, bt_msr | mode);
        rtlpriv->cfg->ops->led_control(hw, ledaction);
        if (mode == MSR_AP)
                rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
index dee88a80bee136946523a37076b4bdbaee14cf44..12b0978ba4faf26161e57f34d61644149544fa9d 100644 (file)
@@ -1204,7 +1204,7 @@ static int _rtl92se_set_media_status(struct ieee80211_hw *hw,
        if (type != NL80211_IFTYPE_AP &&
            rtlpriv->mac80211.link_state < MAC80211_LINKED)
                bt_msr = rtl_read_byte(rtlpriv, MSR) & ~MSR_LINK_MASK;
-       rtl_write_byte(rtlpriv, (MSR), bt_msr);
+       rtl_write_byte(rtlpriv, MSR, bt_msr);
 
        temp = rtl_read_dword(rtlpriv, TCR);
        rtl_write_dword(rtlpriv, TCR, temp & (~BIT(8)));
index b3b094759f6dc1d76ea3db83392d64599262666e..67bb47d77b68c5d45bd6bb6dc0f0721c2461fa2c 100644 (file)
@@ -1183,7 +1183,7 @@ static int _rtl8723e_set_media_status(struct ieee80211_hw *hw,
                         mode);
        }
 
-       rtl_write_byte(rtlpriv, (MSR), bt_msr | mode);
+       rtl_write_byte(rtlpriv, MSR, bt_msr | mode);
        rtlpriv->cfg->ops->led_control(hw, ledaction);
        if (mode == MSR_AP)
                rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
index b46998341c409ea00cdb635f5132954c305b2a49..b681af3c7a355d66fb411c71dcdcbba5bb8dfc01 100644 (file)
@@ -1558,7 +1558,7 @@ static int _rtl8723be_set_media_status(struct ieee80211_hw *hw,
                         mode);
        }
 
-       rtl_write_byte(rtlpriv, (MSR), bt_msr | mode);
+       rtl_write_byte(rtlpriv, MSR, bt_msr | mode);
        rtlpriv->cfg->ops->led_control(hw, ledaction);
        if (mode == MSR_AP)
                rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
index 2a0a71bac00c84d331972fd27e234fafe70ec5f3..8704eee9f3a495108e93135d6e306a090c322bc7 100644 (file)
@@ -423,7 +423,7 @@ void rtl8821ae_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
                *((u16 *)(val+4)) = rtl_read_word(rtlpriv, REG_BSSID+4);
                break;
        case HW_VAR_MEDIA_STATUS:
-               val[0] = rtl_read_byte(rtlpriv, REG_CR+2) & 0x3;
+               val[0] = rtl_read_byte(rtlpriv, MSR) & 0x3;
                break;
        case HW_VAR_SLOT_TIME:
                *((u8 *)(val)) = mac->slot_time;
@@ -2178,7 +2178,7 @@ static int _rtl8821ae_set_media_status(struct ieee80211_hw *hw,
                return 1;
        }
 
-       rtl_write_byte(rtlpriv, (MSR), bt_msr);
+       rtl_write_byte(rtlpriv, MSR, bt_msr);
        rtlpriv->cfg->ops->led_control(hw, ledaction);
        if ((bt_msr & 0xfc) == MSR_AP)
                rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);