Skip to content

Commit

Permalink
rtlwifi: rtl8192ce: Change rtl8192ce routines phy and trx and modify …
Browse files Browse the repository at this point in the history
…rtl8192cu for addition of rtl8192se and rtl8192de

Change rtl8192ce routines phy and trx for addition of RTL8192SE and RTL8192DE.
In addition, make necessary modifications to rtl8192cu. This patch also
removes the temporary patches needed to enable intermediate steps to build
without error.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Chaoming_Li authored and John W. Linville committed Apr 26, 2011
1 parent e0b5a50 commit 76c34f9
Show file tree
Hide file tree
Showing 13 changed files with 109 additions and 197 deletions.
4 changes: 0 additions & 4 deletions drivers/net/wireless/rtlwifi/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,7 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
_rtl_update_earlymode_info(hw, skb,
&tcb_desc, tid);

#if 0 /* temporary */
rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
#endif
}
}
}
Expand Down Expand Up @@ -1100,10 +1098,8 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
hdr = rtl_get_hdr(pskb);
info = IEEE80211_SKB_CB(pskb);
pdesc = &ring->desc[0];
#if 0 /* temporary */
rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc,
info, pskb, BEACON_QUEUE, &tcb_desc);
#endif

__skb_queue_tail(&ring->queue, pskb);

Expand Down
13 changes: 6 additions & 7 deletions drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void rtl92c_phy_set_bb_reg(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(rtl92c_phy_set_bb_reg);

static u32 _rtl92c_phy_fw_rf_serial_read(struct ieee80211_hw *hw,
u32 _rtl92c_phy_fw_rf_serial_read(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 offset)
{
RT_ASSERT(false, ("deprecated!\n"));
Expand All @@ -91,15 +91,15 @@ static u32 _rtl92c_phy_fw_rf_serial_read(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(_rtl92c_phy_fw_rf_serial_read);

static void _rtl92c_phy_fw_rf_serial_write(struct ieee80211_hw *hw,
void _rtl92c_phy_fw_rf_serial_write(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 offset,
u32 data)
{
RT_ASSERT(false, ("deprecated!\n"));
}
EXPORT_SYMBOL(_rtl92c_phy_fw_rf_serial_write);

static u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw,
u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 offset)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
Expand Down Expand Up @@ -150,7 +150,7 @@ static u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(_rtl92c_phy_rf_serial_read);

static void _rtl92c_phy_rf_serial_write(struct ieee80211_hw *hw,
void _rtl92c_phy_rf_serial_write(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 offset,
u32 data)
{
Expand Down Expand Up @@ -208,7 +208,7 @@ bool rtl92c_phy_rf_config(struct ieee80211_hw *hw)
}
EXPORT_SYMBOL(rtl92c_phy_rf_config);

static bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw)
bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &(rtlpriv->phy);
Expand Down Expand Up @@ -1364,8 +1364,7 @@ static void _rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw,
static void _rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw,
char delta, bool is2t)
{
/* This routine is deliberately dummied out for later fixes */
#if 0
#if 0 /* This routine is deliberately dummied out for later fixes */
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &(rtlpriv->phy);
struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,10 +930,8 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)
}

rtlhal->last_hmeboxnum = 0;
#if 0 /* temporary */
rtl92c_phy_mac_config(hw);
rtl92c_phy_bb_config(hw);
#endif
rtlphy->rf_mode = RF_OP_BY_SW_3WIRE;
rtl92c_phy_rf_config(hw);
rtlphy->rfreg_chnlval[0] = rtl_get_rfreg(hw, (enum radio_path)0,
Expand Down
25 changes: 1 addition & 24 deletions drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
return true;
}

static void rtl92c_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
void rtl92c_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
Expand Down Expand Up @@ -430,34 +430,11 @@ static void rtl92c_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
("unknown bandwidth: %#X\n", rtlphy->current_chan_bw));
break;
}
#if 0 /* temporary */
rtl92ce_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw);
#endif
rtlphy->set_bwmode_inprogress = false;
RT_TRACE(rtlpriv, COMP_SCAN, DBG_TRACE, ("<==\n"));
}

void rtl92c_phy_set_bw_mode(struct ieee80211_hw *hw,
enum nl80211_channel_type ch_type)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &(rtlpriv->phy);
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
u8 tmp_bw = rtlphy->current_chan_bw;

if (rtlphy->set_bwmode_inprogress)
return;
rtlphy->set_bwmode_inprogress = true;
if ((!is_hal_stop(rtlhal)) && !(RT_CANNOT_IO(hw))) {
rtl92c_phy_set_bw_mode_callback(hw);
} else {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("FALSE driver sleep or unload\n"));
rtlphy->set_bwmode_inprogress = false;
rtlphy->current_chan_bw = tmp_bw;
}
}

void _rtl92ce_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t)
{
u8 tmpreg;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ struct rtl_hal_ops rtl8192ce_hal_ops = {
.switch_channel = rtl92c_phy_sw_chnl,
.dm_watchdog = rtl92c_dm_watchdog,
.scan_operation_backup = rtl92c_phy_scan_operation_backup,
#if 0 /* temporary */
.set_rf_power_state = rtl92c_phy_set_rf_power_state,
.led_control = rtl92ce_led_control,
.set_desc = rtl92ce_set_desc,
Expand All @@ -234,7 +233,6 @@ struct rtl_hal_ops rtl8192ce_hal_ops = {
.config_bb_with_pgheaderfile = _rtl92ce_phy_config_bb_with_pgheaderfile,
.phy_lc_calibrate = _rtl92ce_phy_lc_calibrate,
.dm_dynamic_txpower = rtl92ce_dm_dynamic_txpower,
#endif
};

struct rtl_mod_params rtl92ce_mod_params = {
Expand Down
Loading

0 comments on commit 76c34f9

Please sign in to comment.