forked from Minki/linux
rtlwifi: Change REG_CR+2 to MSR
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>
This commit is contained in:
parent
01fbd4ecff
commit
e480e13448
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)));
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user