rtlwifi: rtl8192c: rtl8192ce: Add support for B-CUT version of RTL8188CE
Realtek devices with designation RTL8188CE-VL have the so-called B-cut of the wireless chip. This patch adds the special programming needed by these devices. In addition, a variable that was static has been moved into the private data area as it is now needed in two different routines. This change also fixes a minor bug that would be present if a system had more than one RTL81{88,92}CE devices. Other drivers in the rtlwifi family had already made this change, thus the variable already exists in the private data structure. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Anisse Astier <anisse@astier.eu> Cc: Li Chaoming <chaoming_li@realsil.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
ab3d59d265
commit
0bd899e764
@@ -724,6 +724,26 @@ u8 rtl92c_phy_sw_chnl(struct ieee80211_hw *hw)
|
||||
}
|
||||
EXPORT_SYMBOL(rtl92c_phy_sw_chnl);
|
||||
|
||||
static void _rtl92c_phy_sw_rf_setting(struct ieee80211_hw *hw, u8 channel)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_phy *rtlphy = &(rtlpriv->phy);
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
|
||||
|
||||
if (IS_81xxC_VENDOR_UMC_B_CUT(rtlhal->version)) {
|
||||
if (channel == 6 && rtlphy->current_chan_bw ==
|
||||
HT_CHANNEL_WIDTH_20)
|
||||
rtl_set_rfreg(hw, RF90_PATH_A, RF_RX_G1, MASKDWORD,
|
||||
0x00255);
|
||||
else{
|
||||
u32 backupRF0x1A = (u32)rtl_get_rfreg(hw, RF90_PATH_A,
|
||||
RF_RX_G1, RFREG_OFFSET_MASK);
|
||||
rtl_set_rfreg(hw, RF90_PATH_A, RF_RX_G1, MASKDWORD,
|
||||
backupRF0x1A);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool _rtl92c_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
|
||||
u32 cmdtableidx, u32 cmdtablesz,
|
||||
enum swchnlcmd_id cmdid,
|
||||
@@ -837,6 +857,7 @@ bool _rtl92c_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
|
||||
currentcmd->para1,
|
||||
RFREG_OFFSET_MASK,
|
||||
rtlphy->rfreg_chnlval[rfpath]);
|
||||
_rtl92c_phy_sw_rf_setting(hw, channel);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user