Commit 7ea47240 authored by Larry Finger's avatar Larry Finger Committed by John W. Linville

rtlwifi: Modify some rtl8192ce routines for merging rtl8192cu

Modify some rtl8192ce routines for merging with rtl8192cu. In addition,
remove some usage of Hungarian notation.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0e80b9d1
...@@ -399,21 +399,21 @@ static void _rtl_query_protection_mode(struct ieee80211_hw *hw, ...@@ -399,21 +399,21 @@ static void _rtl_query_protection_mode(struct ieee80211_hw *hw,
u8 rate_flag = info->control.rates[0].flags; u8 rate_flag = info->control.rates[0].flags;
/* Common Settings */ /* Common Settings */
tcb_desc->b_rts_stbc = false; tcb_desc->rts_stbc = false;
tcb_desc->b_cts_enable = false; tcb_desc->cts_enable = false;
tcb_desc->rts_sc = 0; tcb_desc->rts_sc = 0;
tcb_desc->b_rts_bw = false; tcb_desc->rts_bw = false;
tcb_desc->b_rts_use_shortpreamble = false; tcb_desc->rts_use_shortpreamble = false;
tcb_desc->b_rts_use_shortgi = false; tcb_desc->rts_use_shortgi = false;
if (rate_flag & IEEE80211_TX_RC_USE_CTS_PROTECT) { if (rate_flag & IEEE80211_TX_RC_USE_CTS_PROTECT) {
/* Use CTS-to-SELF in protection mode. */ /* Use CTS-to-SELF in protection mode. */
tcb_desc->b_rts_enable = true; tcb_desc->rts_enable = true;
tcb_desc->b_cts_enable = true; tcb_desc->cts_enable = true;
tcb_desc->rts_rate = rtlpriv->cfg->maps[RTL_RC_OFDM_RATE24M]; tcb_desc->rts_rate = rtlpriv->cfg->maps[RTL_RC_OFDM_RATE24M];
} else if (rate_flag & IEEE80211_TX_RC_USE_RTS_CTS) { } else if (rate_flag & IEEE80211_TX_RC_USE_RTS_CTS) {
/* Use RTS-CTS in protection mode. */ /* Use RTS-CTS in protection mode. */
tcb_desc->b_rts_enable = true; tcb_desc->rts_enable = true;
tcb_desc->rts_rate = rtlpriv->cfg->maps[RTL_RC_OFDM_RATE24M]; tcb_desc->rts_rate = rtlpriv->cfg->maps[RTL_RC_OFDM_RATE24M];
} }
...@@ -429,7 +429,7 @@ static void _rtl_txrate_selectmode(struct ieee80211_hw *hw, ...@@ -429,7 +429,7 @@ static void _rtl_txrate_selectmode(struct ieee80211_hw *hw,
if (mac->opmode == NL80211_IFTYPE_STATION) if (mac->opmode == NL80211_IFTYPE_STATION)
tcb_desc->ratr_index = 0; tcb_desc->ratr_index = 0;
else if (mac->opmode == NL80211_IFTYPE_ADHOC) { else if (mac->opmode == NL80211_IFTYPE_ADHOC) {
if (tcb_desc->b_multicast || tcb_desc->b_broadcast) { if (tcb_desc->multicast || tcb_desc->broadcast) {
tcb_desc->hw_rate = tcb_desc->hw_rate =
rtlpriv->cfg->maps[RTL_RC_CCK_RATE2M]; rtlpriv->cfg->maps[RTL_RC_CCK_RATE2M];
tcb_desc->use_driver_rate = 1; tcb_desc->use_driver_rate = 1;
...@@ -439,7 +439,7 @@ static void _rtl_txrate_selectmode(struct ieee80211_hw *hw, ...@@ -439,7 +439,7 @@ static void _rtl_txrate_selectmode(struct ieee80211_hw *hw,
} }
} }
if (rtlpriv->dm.b_useramask) { if (rtlpriv->dm.useramask) {
/* TODO we will differentiate adhoc and station futrue */ /* TODO we will differentiate adhoc and station futrue */
tcb_desc->mac_id = 0; tcb_desc->mac_id = 0;
...@@ -461,19 +461,19 @@ static void _rtl_query_bandwidth_mode(struct ieee80211_hw *hw, ...@@ -461,19 +461,19 @@ static void _rtl_query_bandwidth_mode(struct ieee80211_hw *hw,
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
tcb_desc->b_packet_bw = false; tcb_desc->packet_bw = false;
if (!mac->bw_40 || !mac->ht_enable) if (!mac->bw_40 || !mac->ht_enable)
return; return;
if (tcb_desc->b_multicast || tcb_desc->b_broadcast) if (tcb_desc->multicast || tcb_desc->broadcast)
return; return;
/*use legency rate, shall use 20MHz */ /*use legency rate, shall use 20MHz */
if (tcb_desc->hw_rate <= rtlpriv->cfg->maps[RTL_RC_OFDM_RATE54M]) if (tcb_desc->hw_rate <= rtlpriv->cfg->maps[RTL_RC_OFDM_RATE54M])
return; return;
tcb_desc->b_packet_bw = true; tcb_desc->packet_bw = true;
} }
static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw) static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw)
...@@ -545,9 +545,9 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw, ...@@ -545,9 +545,9 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw,
} }
if (is_multicast_ether_addr(ieee80211_get_DA(hdr))) if (is_multicast_ether_addr(ieee80211_get_DA(hdr)))
tcb_desc->b_multicast = 1; tcb_desc->multicast = 1;
else if (is_broadcast_ether_addr(ieee80211_get_DA(hdr))) else if (is_broadcast_ether_addr(ieee80211_get_DA(hdr)))
tcb_desc->b_broadcast = 1; tcb_desc->broadcast = 1;
_rtl_txrate_selectmode(hw, tcb_desc); _rtl_txrate_selectmode(hw, tcb_desc);
_rtl_query_bandwidth_mode(hw, tcb_desc); _rtl_query_bandwidth_mode(hw, tcb_desc);
...@@ -777,10 +777,10 @@ void rtl_watchdog_wq_callback(void *data) ...@@ -777,10 +777,10 @@ void rtl_watchdog_wq_callback(void *data)
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
bool b_busytraffic = false; bool busytraffic = false;
bool b_higher_busytraffic = false; bool higher_busytraffic = false;
bool b_higher_busyrxtraffic = false; bool higher_busyrxtraffic = false;
bool b_higher_busytxtraffic = false; bool higher_busytxtraffic = false;
u8 idx = 0; u8 idx = 0;
u32 rx_cnt_inp4eriod = 0; u32 rx_cnt_inp4eriod = 0;
...@@ -788,7 +788,7 @@ void rtl_watchdog_wq_callback(void *data) ...@@ -788,7 +788,7 @@ void rtl_watchdog_wq_callback(void *data)
u32 aver_rx_cnt_inperiod = 0; u32 aver_rx_cnt_inperiod = 0;
u32 aver_tx_cnt_inperiod = 0; u32 aver_tx_cnt_inperiod = 0;
bool benter_ps = false; bool enter_ps = false;
if (is_hal_stop(rtlhal)) if (is_hal_stop(rtlhal))
return; return;
...@@ -832,29 +832,29 @@ void rtl_watchdog_wq_callback(void *data) ...@@ -832,29 +832,29 @@ void rtl_watchdog_wq_callback(void *data)
/* (2) check traffic busy */ /* (2) check traffic busy */
if (aver_rx_cnt_inperiod > 100 || aver_tx_cnt_inperiod > 100) if (aver_rx_cnt_inperiod > 100 || aver_tx_cnt_inperiod > 100)
b_busytraffic = true; busytraffic = true;
/* Higher Tx/Rx data. */ /* Higher Tx/Rx data. */
if (aver_rx_cnt_inperiod > 4000 || if (aver_rx_cnt_inperiod > 4000 ||
aver_tx_cnt_inperiod > 4000) { aver_tx_cnt_inperiod > 4000) {
b_higher_busytraffic = true; higher_busytraffic = true;
/* Extremely high Rx data. */ /* Extremely high Rx data. */
if (aver_rx_cnt_inperiod > 5000) if (aver_rx_cnt_inperiod > 5000)
b_higher_busyrxtraffic = true; higher_busyrxtraffic = true;
else else
b_higher_busytxtraffic = false; higher_busytxtraffic = false;
} }
if (((rtlpriv->link_info.num_rx_inperiod + if (((rtlpriv->link_info.num_rx_inperiod +
rtlpriv->link_info.num_tx_inperiod) > 8) || rtlpriv->link_info.num_tx_inperiod) > 8) ||
(rtlpriv->link_info.num_rx_inperiod > 2)) (rtlpriv->link_info.num_rx_inperiod > 2))
benter_ps = false; enter_ps = false;
else else
benter_ps = true; enter_ps = true;
/* LeisurePS only work in infra mode. */ /* LeisurePS only work in infra mode. */
if (benter_ps) if (enter_ps)
rtl_lps_enter(hw); rtl_lps_enter(hw);
else else
rtl_lps_leave(hw); rtl_lps_leave(hw);
...@@ -863,9 +863,9 @@ void rtl_watchdog_wq_callback(void *data) ...@@ -863,9 +863,9 @@ void rtl_watchdog_wq_callback(void *data)
rtlpriv->link_info.num_rx_inperiod = 0; rtlpriv->link_info.num_rx_inperiod = 0;
rtlpriv->link_info.num_tx_inperiod = 0; rtlpriv->link_info.num_tx_inperiod = 0;
rtlpriv->link_info.b_busytraffic = b_busytraffic; rtlpriv->link_info.busytraffic = busytraffic;
rtlpriv->link_info.b_higher_busytraffic = b_higher_busytraffic; rtlpriv->link_info.higher_busytraffic = higher_busytraffic;
rtlpriv->link_info.b_higher_busyrxtraffic = b_higher_busyrxtraffic; rtlpriv->link_info.higher_busyrxtraffic = higher_busyrxtraffic;
} }
......
...@@ -666,7 +666,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -666,7 +666,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_BASIC_RATE, rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_BASIC_RATE,
(u8 *) (&basic_rates)); (u8 *) (&basic_rates));
if (rtlpriv->dm.b_useramask) if (rtlpriv->dm.useramask)
rtlpriv->cfg->ops->update_rate_mask(hw, 0); rtlpriv->cfg->ops->update_rate_mask(hw, 0);
else else
rtlpriv->cfg->ops->update_rate_table(hw); rtlpriv->cfg->ops->update_rate_table(hw);
...@@ -681,7 +681,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -681,7 +681,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
*/ */
if (changed & BSS_CHANGED_ASSOC) { if (changed & BSS_CHANGED_ASSOC) {
if (bss_conf->assoc) { if (bss_conf->assoc) {
if (ppsc->b_fwctrl_lps) { if (ppsc->fwctrl_lps) {
u8 mstatus = RT_MEDIA_CONNECT; u8 mstatus = RT_MEDIA_CONNECT;
rtlpriv->cfg->ops->set_hw_reg(hw, rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_H2C_FW_JOINBSSRPT, HW_VAR_H2C_FW_JOINBSSRPT,
...@@ -689,7 +689,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -689,7 +689,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
ppsc->report_linked = true; ppsc->report_linked = true;
} }
} else { } else {
if (ppsc->b_fwctrl_lps) { if (ppsc->fwctrl_lps) {
u8 mstatus = RT_MEDIA_DISCONNECT; u8 mstatus = RT_MEDIA_DISCONNECT;
rtlpriv->cfg->ops->set_hw_reg(hw, rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_H2C_FW_JOINBSSRPT, HW_VAR_H2C_FW_JOINBSSRPT,
...@@ -818,7 +818,7 @@ static void rtl_op_sw_scan_complete(struct ieee80211_hw *hw) ...@@ -818,7 +818,7 @@ static void rtl_op_sw_scan_complete(struct ieee80211_hw *hw)
/* fix fwlps issue */ /* fix fwlps issue */
rtlpriv->cfg->ops->set_network_type(hw, mac->opmode); rtlpriv->cfg->ops->set_network_type(hw, mac->opmode);
if (rtlpriv->dm.b_useramask) if (rtlpriv->dm.useramask)
rtlpriv->cfg->ops->update_rate_mask(hw, 0); rtlpriv->cfg->ops->update_rate_mask(hw, 0);
else else
rtlpriv->cfg->ops->update_rate_table(hw); rtlpriv->cfg->ops->update_rate_table(hw);
......
...@@ -50,7 +50,7 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw) ...@@ -50,7 +50,7 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw)
u8 pcibridge_vendor = pcipriv->ndis_adapter.pcibridge_vendor; u8 pcibridge_vendor = pcipriv->ndis_adapter.pcibridge_vendor;
ppsc->reg_rfps_level = 0; ppsc->reg_rfps_level = 0;
ppsc->b_support_aspm = 0; ppsc->support_aspm = 0;
/*Update PCI ASPM setting */ /*Update PCI ASPM setting */
ppsc->const_amdpci_aspm = rtlpci->const_amdpci_aspm; ppsc->const_amdpci_aspm = rtlpci->const_amdpci_aspm;
...@@ -115,29 +115,29 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw) ...@@ -115,29 +115,29 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw)
switch (rtlpci->const_support_pciaspm) { switch (rtlpci->const_support_pciaspm) {
case 0:{ case 0:{
/*Not support ASPM. */ /*Not support ASPM. */
bool b_support_aspm = false; bool support_aspm = false;
ppsc->b_support_aspm = b_support_aspm; ppsc->support_aspm = support_aspm;
break; break;
} }
case 1:{ case 1:{
/*Support ASPM. */ /*Support ASPM. */
bool b_support_aspm = true; bool support_aspm = true;
bool b_support_backdoor = true; bool support_backdoor = true;
ppsc->b_support_aspm = b_support_aspm; ppsc->support_aspm = support_aspm;
/*if(priv->oem_id == RT_CID_TOSHIBA && /*if(priv->oem_id == RT_CID_TOSHIBA &&
!priv->ndis_adapter.amd_l1_patch) !priv->ndis_adapter.amd_l1_patch)
b_support_backdoor = false; */ support_backdoor = false; */
ppsc->b_support_backdoor = b_support_backdoor; ppsc->support_backdoor = support_backdoor;
break; break;
} }
case 2: case 2:
/*ASPM value set by chipset. */ /*ASPM value set by chipset. */
if (pcibridge_vendor == PCI_BRIDGE_VENDOR_INTEL) { if (pcibridge_vendor == PCI_BRIDGE_VENDOR_INTEL) {
bool b_support_aspm = true; bool support_aspm = true;
ppsc->b_support_aspm = b_support_aspm; ppsc->support_aspm = support_aspm;
} }
break; break;
default: default:
...@@ -585,7 +585,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) ...@@ -585,7 +585,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
hdr = (struct ieee80211_hdr *)(skb->data); hdr = (struct ieee80211_hdr *)(skb->data);
fc = le16_to_cpu(hdr->frame_control); fc = le16_to_cpu(hdr->frame_control);
if (!stats.b_crc) { if (!stats.crc) {
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, memcpy(IEEE80211_SKB_RXCB(skb), &rx_status,
sizeof(rx_status)); sizeof(rx_status));
...@@ -890,17 +890,17 @@ static void _rtl_pci_init_struct(struct ieee80211_hw *hw, ...@@ -890,17 +890,17 @@ static void _rtl_pci_init_struct(struct ieee80211_hw *hw,
rtlhal->hw = hw; rtlhal->hw = hw;
rtlpci->pdev = pdev; rtlpci->pdev = pdev;
ppsc->b_inactiveps = false; ppsc->inactiveps = false;
ppsc->b_leisure_ps = true; ppsc->leisure_ps = true;
ppsc->b_fwctrl_lps = true; ppsc->fwctrl_lps = true;
ppsc->b_reg_fwctrl_lps = 3; ppsc->reg_fwctrl_lps = 3;
ppsc->reg_max_lps_awakeintvl = 5; ppsc->reg_max_lps_awakeintvl = 5;
if (ppsc->b_reg_fwctrl_lps == 1) if (ppsc->reg_fwctrl_lps == 1)
ppsc->fwctrl_psmode = FW_PS_MIN_MODE; ppsc->fwctrl_psmode = FW_PS_MIN_MODE;
else if (ppsc->b_reg_fwctrl_lps == 2) else if (ppsc->reg_fwctrl_lps == 2)
ppsc->fwctrl_psmode = FW_PS_MAX_MODE; ppsc->fwctrl_psmode = FW_PS_MAX_MODE;
else if (ppsc->b_reg_fwctrl_lps == 3) else if (ppsc->reg_fwctrl_lps == 3)
ppsc->fwctrl_psmode = FW_PS_DTIM_MODE; ppsc->fwctrl_psmode = FW_PS_DTIM_MODE;
/*Tx/Rx related var */ /*Tx/Rx related var */
......
...@@ -86,7 +86,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw, ...@@ -86,7 +86,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
enum rf_pwrstate rtstate; enum rf_pwrstate rtstate;
bool b_actionallowed = false; bool actionallowed = false;
u16 rfwait_cnt = 0; u16 rfwait_cnt = 0;
unsigned long flag; unsigned long flag;
...@@ -139,13 +139,13 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw, ...@@ -139,13 +139,13 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
ppsc->rfoff_reason &= (~changesource); ppsc->rfoff_reason &= (~changesource);
if ((changesource == RF_CHANGE_BY_HW) && if ((changesource == RF_CHANGE_BY_HW) &&
(ppsc->b_hwradiooff == true)) { (ppsc->hwradiooff == true)) {
ppsc->b_hwradiooff = false; ppsc->hwradiooff = false;
} }
if (!ppsc->rfoff_reason) { if (!ppsc->rfoff_reason) {
ppsc->rfoff_reason = 0; ppsc->rfoff_reason = 0;
b_actionallowed = true; actionallowed = true;
} }
break; break;
...@@ -153,17 +153,17 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw, ...@@ -153,17 +153,17 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
case ERFOFF: case ERFOFF:
if ((changesource == RF_CHANGE_BY_HW) if ((changesource == RF_CHANGE_BY_HW)
&& (ppsc->b_hwradiooff == false)) { && (ppsc->hwradiooff == false)) {
ppsc->b_hwradiooff = true; ppsc->hwradiooff = true;
} }
ppsc->rfoff_reason |= changesource; ppsc->rfoff_reason |= changesource;
b_actionallowed = true; actionallowed = true;
break; break;
case ERFSLEEP: case ERFSLEEP:
ppsc->rfoff_reason |= changesource; ppsc->rfoff_reason |= changesource;
b_actionallowed = true; actionallowed = true;
break; break;
default: default:
...@@ -172,7 +172,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw, ...@@ -172,7 +172,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
break; break;
} }
if (b_actionallowed) if (actionallowed)
rtlpriv->cfg->ops->set_rf_power_state(hw, state_toset); rtlpriv->cfg->ops->set_rf_power_state(hw, state_toset);
if (!protect_or_not) { if (!protect_or_not) {
...@@ -181,7 +181,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw, ...@@ -181,7 +181,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flag); spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flag);
} }
return b_actionallowed; return actionallowed;
} }
EXPORT_SYMBOL(rtl_ps_set_rf_state); EXPORT_SYMBOL(rtl_ps_set_rf_state);
...@@ -191,7 +191,7 @@ static void _rtl_ps_inactive_ps(struct ieee80211_hw *hw) ...@@ -191,7 +191,7 @@ static void _rtl_ps_inactive_ps(struct ieee80211_hw *hw)
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
ppsc->b_swrf_processing = true; ppsc->swrf_processing = true;
if (ppsc->inactive_pwrstate == ERFON && rtlhal->interface == INTF_PCI) { if (ppsc->inactive_pwrstate == ERFON && rtlhal->interface == INTF_PCI) {
if ((ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM) && if ((ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM) &&
...@@ -213,7 +213,7 @@ static void _rtl_ps_inactive_ps(struct ieee80211_hw *hw) ...@@ -213,7 +213,7 @@ static void _rtl_ps_inactive_ps(struct ieee80211_hw *hw)
} }
} }
ppsc->b_swrf_processing = false; ppsc->swrf_processing = false;
} }
void rtl_ips_nic_off_wq_callback(void *data) void rtl_ips_nic_off_wq_callback(void *data)
...@@ -239,13 +239,13 @@ void rtl_ips_nic_off_wq_callback(void *data) ...@@ -239,13 +239,13 @@ void rtl_ips_nic_off_wq_callback(void *data)
if (rtlpriv->sec.being_setkey) if (rtlpriv->sec.being_setkey)
return; return;
if (ppsc->b_inactiveps) { if (ppsc->inactiveps) {
rtstate = ppsc->rfpwr_state; rtstate = ppsc->rfpwr_state;
/* /*
*Do not enter IPS in the following conditions: *Do not enter IPS in the following conditions:
*(1) RF is already OFF or Sleep *(1) RF is already OFF or Sleep
*(2) b_swrf_processing (indicates the IPS is still under going) *(2) swrf_processing (indicates the IPS is still under going)
*(3) Connectted (only disconnected can trigger IPS) *(3) Connectted (only disconnected can trigger IPS)
*(4) IBSS (send Beacon) *(4) IBSS (send Beacon)
*(5) AP mode (send Beacon) *(5) AP mode (send Beacon)
...@@ -253,14 +253,14 @@ void rtl_ips_nic_off_wq_callback(void *data) ...@@ -253,14 +253,14 @@ void rtl_ips_nic_off_wq_callback(void *data)
*/ */
if (rtstate == ERFON && if (rtstate == ERFON &&
!ppsc->b_swrf_processing && !ppsc->swrf_processing &&
(mac->link_state == MAC80211_NOLINK) && (mac->link_state == MAC80211_NOLINK) &&
!mac->act_scanning) { !mac->act_scanning) {
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE,
("IPSEnter(): Turn off RF.\n")); ("IPSEnter(): Turn off RF.\n"));
ppsc->inactive_pwrstate = ERFOFF; ppsc->inactive_pwrstate = ERFOFF;
ppsc->b_in_powersavemode = true; ppsc->in_powersavemode = true;
/*rtl_pci_reset_trx_ring(hw); */ /*rtl_pci_reset_trx_ring(hw); */
_rtl_ps_inactive_ps(hw); _rtl_ps_inactive_ps(hw);
...@@ -290,15 +290,15 @@ void rtl_ips_nic_on(struct ieee80211_hw *hw) ...@@ -290,15 +290,15 @@ void rtl_ips_nic_on(struct ieee80211_hw *hw)
spin_lock_irqsave(&rtlpriv->locks.ips_lock, flags); spin_lock_irqsave(&rtlpriv->locks.ips_lock, flags);
if (ppsc->b_inactiveps) { if (ppsc->inactiveps) {
rtstate = ppsc->rfpwr_state; rtstate = ppsc->rfpwr_state;
if (rtstate != ERFON && if (rtstate != ERFON &&
!ppsc->b_swrf_processing && !ppsc->swrf_processing &&
ppsc->rfoff_reason <= RF_CHANGE_BY_IPS) { ppsc->rfoff_reason <= RF_CHANGE_BY_IPS) {
ppsc->inactive_pwrstate = ERFON; ppsc->inactive_pwrstate = ERFON;
ppsc->b_in_powersavemode = false; ppsc->in_powersavemode = false;
_rtl_ps_inactive_ps(hw); _rtl_ps_inactive_ps(hw);
} }
...@@ -370,9 +370,9 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) ...@@ -370,9 +370,9 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode)
* mode and set RPWM to turn RF on. * mode and set RPWM to turn RF on.
*/ */
if ((ppsc->b_fwctrl_lps) && (ppsc->b_leisure_ps) && if ((ppsc->fwctrl_lps) && (ppsc->leisure_ps) &&
ppsc->report_linked) { ppsc->report_linked) {
bool b_fw_current_inps; bool fw_current_inps;
if (ppsc->dot11_psmode == EACTIVE) { if (ppsc->dot11_psmode == EACTIVE) {
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("FW LPS leave ps_mode:%x\n", ("FW LPS leave ps_mode:%x\n",
...@@ -385,11 +385,11 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) ...@@ -385,11 +385,11 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode)
rtlpriv->cfg->ops->set_hw_reg(hw, rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_H2C_FW_PWRMODE, HW_VAR_H2C_FW_PWRMODE,
(u8 *) (&fw_pwrmode)); (u8 *) (&fw_pwrmode));
b_fw_current_inps = false; fw_current_inps = false;
rtlpriv->cfg->ops->set_hw_reg(hw, rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_FW_PSMODE_STATUS, HW_VAR_FW_PSMODE_STATUS,
(u8 *) (&b_fw_current_inps)); (u8 *) (&fw_current_inps));
} else { } else {
if (rtl_get_fwlps_doze(hw)) { if (rtl_get_fwlps_doze(hw)) {
...@@ -398,10 +398,10 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) ...@@ -398,10 +398,10 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode)
ppsc->fwctrl_psmode)); ppsc->fwctrl_psmode));
rpwm_val = 0x02; /* RF off */ rpwm_val = 0x02; /* RF off */
b_fw_current_inps = true; fw_current_inps = true;
rtlpriv->cfg->ops->set_hw_reg(hw, rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_FW_PSMODE_STATUS, HW_VAR_FW_PSMODE_STATUS,
(u8 *) (&b_fw_current_inps)); (u8 *) (&fw_current_inps));
rtlpriv->cfg->ops->set_hw_reg(hw, rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_H2C_FW_PWRMODE, HW_VAR_H2C_FW_PWRMODE,
(u8 *) (&ppsc->fwctrl_psmode)); (u8 *) (&ppsc->fwctrl_psmode));
...@@ -425,13 +425,13 @@ void rtl_lps_enter(struct ieee80211_hw *hw) ...@@ -425,13 +425,13 @@ void rtl_lps_enter(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
unsigned long flag; unsigned long flag;
if (!(ppsc->b_fwctrl_lps && ppsc->b_leisure_ps)) if (!(ppsc->fwctrl_lps && ppsc->leisure_ps))
return; return;
if (rtlpriv->sec.being_setkey) if (rtlpriv->sec.being_setkey)
return; return;
if (rtlpriv->link_info.b_busytraffic) if (rtlpriv->link_info.busytraffic)
return; return;
/*sleep after linked 10s, to let DHCP and 4-way handshake ok enough!! */ /*sleep after linked 10s, to let DHCP and 4-way handshake ok enough!! */
...@@ -446,7 +446,7 @@ void rtl_lps_enter(struct ieee80211_hw *hw) ...@@ -446,7 +446,7 @@ void rtl_lps_enter(struct ieee80211_hw *hw)
spin_lock_irqsave(&rtlpriv->locks.lps_lock, flag); spin_lock_irqsave(&rtlpriv->locks.lps_lock, flag);
if (ppsc->b_leisure_ps) { if (ppsc->leisure_ps) {
/* Idle for a while if we connect to AP a while ago. */ /* Idle for a while if we connect to AP a while ago. */
if (mac->cnt_after_linked >= 2) { if (mac->cnt_after_linked >= 2) {
if (ppsc->dot11_psmode == EACTIVE) { if (ppsc->dot11_psmode == EACTIVE) {
...@@ -470,7 +470,7 @@ void rtl_lps_leave(struct ieee80211_hw *hw) ...@@ -470,7 +470,7 @@ void rtl_lps_leave(struct ieee80211_hw *hw)
spin_lock_irqsave(&rtlpriv->locks.lps_lock, flag); spin_lock_irqsave(&rtlpriv->locks.lps_lock, flag);
if (ppsc->b_fwctrl_lps && ppsc->b_leisure_ps) { if (ppsc->fwctrl_lps && ppsc->leisure_ps) {
if (ppsc->dot11_psmode != EACTIVE) { if (ppsc->dot11_psmode != EACTIVE) {
/*FIX ME */ /*FIX ME */
......
...@@ -306,12 +306,12 @@ static void rtl92c_dm_initial_gain_multi_sta(struct ieee80211_hw *hw) ...@@ -306,12 +306,12 @@ static void rtl92c_dm_initial_gain_multi_sta(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
long rssi_strength = rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb; long rssi_strength = rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
bool b_multi_sta = false; bool multi_sta = false;
if (mac->opmode == NL80211_IFTYPE_ADHOC) if (mac->opmode == NL80211_IFTYPE_ADHOC)
b_multi_sta = true; multi_sta = true;
if ((b_multi_sta == false) || (dm_digtable.cursta_connectctate != if ((multi_sta == false) || (dm_digtable.cursta_connectctate !=
DIG_STA_DISCONNECT)) { DIG_STA_DISCONNECT)) {
binitialized = false; binitialized = false;
dm_digtable.dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; dm_digtable.dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX;
...@@ -479,7 +479,7 @@ static void rtl92c_dm_dig(struct ieee80211_hw *hw) ...@@ -479,7 +479,7 @@ static void rtl92c_dm_dig(struct ieee80211_hw *hw)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
if (rtlpriv->dm.b_dm_initialgain_enable == false) if (rtlpriv->dm.dm_initialgain_enable == false)
return; return;
if (dm_digtable.dig_enable_flag == false) if (dm_digtable.dig_enable_flag == false)
return; return;
...@@ -492,7 +492,7 @@ static void rtl92c_dm_init_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -492,7 +492,7 @@ static void rtl92c_dm_init_dynamic_txpower(struct ieee80211_hw *hw)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
rtlpriv->dm.bdynamic_txpower_enable = false; rtlpriv->dm.dynamic_txpower_enable = false;
rtlpriv->dm.last_dtp_lvl = TXHIGHPWRLEVEL_NORMAL; rtlpriv->dm.last_dtp_lvl = TXHIGHPWRLEVEL_NORMAL;
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL;
...@@ -550,9 +550,9 @@ static void rtl92c_dm_pwdb_monitor(struct ieee80211_hw *hw) ...@@ -550,9 +550,9 @@ static void rtl92c_dm_pwdb_monitor(struct ieee80211_hw *hw)
void rtl92c_dm_init_edca_turbo(struct ieee80211_hw *hw) void rtl92c_dm_init_edca_turbo(struct ieee80211_hw *hw)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
rtlpriv->dm.bcurrent_turbo_edca = false; rtlpriv->dm.current_turbo_edca = false;
rtlpriv->dm.bis_any_nonbepkts = false; rtlpriv->dm.is_any_nonbepkts = false;
rtlpriv->dm.bis_cur_rdlstate = false; rtlpriv->dm.is_cur_rdlstate = false;
} }
static void rtl92c_dm_check_edca_turbo(struct ieee80211_hw *hw) static void rtl92c_dm_check_edca_turbo(struct ieee80211_hw *hw)
...@@ -570,7 +570,7 @@ static void rtl92c_dm_check_edca_turbo(struct ieee80211_hw *hw) ...@@ -570,7 +570,7 @@ static void rtl92c_dm_check_edca_turbo(struct ieee80211_hw *hw)
goto dm_checkedcaturbo_exit; goto dm_checkedcaturbo_exit;
if (mac->link_state != MAC80211_LINKED) { if (mac->link_state != MAC80211_LINKED) {
rtlpriv->dm.bcurrent_turbo_edca = false; rtlpriv->dm.current_turbo_edca = false;
return; return;
} }
...@@ -582,40 +582,40 @@ static void rtl92c_dm_check_edca_turbo(struct ieee80211_hw *hw) ...@@ -582,40 +582,40 @@ static void rtl92c_dm_check_edca_turbo(struct ieee80211_hw *hw)
edca_be_dl |= 0x005e0000; edca_be_dl |= 0x005e0000;
} }
if ((!rtlpriv->dm.bis_any_nonbepkts) && if ((!rtlpriv->dm.is_any_nonbepkts) &&
(!rtlpriv->dm.b_disable_framebursting)) { (!rtlpriv->dm.disable_framebursting)) {
cur_txok_cnt = rtlpriv->stats.txbytesunicast - last_txok_cnt; cur_txok_cnt = rtlpriv->stats.txbytesunicast - last_txok_cnt;
cur_rxok_cnt = rtlpriv->stats.rxbytesunicast - last_rxok_cnt; cur_rxok_cnt = rtlpriv->stats.rxbytesunicast - last_rxok_cnt;
if (cur_rxok_cnt > 4 * cur_txok_cnt) { if (cur_rxok_cnt > 4 * cur_txok_cnt) {
if (!rtlpriv->dm.bis_cur_rdlstate || if (!rtlpriv->dm.is_cur_rdlstate ||
!rtlpriv->dm.bcurrent_turbo_edca) { !rtlpriv->dm.current_turbo_edca) {
rtl_write_dword(rtlpriv, rtl_write_dword(rtlpriv,
REG_EDCA_BE_PARAM, REG_EDCA_BE_PARAM,
edca_be_dl); edca_be_dl);
rtlpriv->dm.bis_cur_rdlstate = true; rtlpriv->dm.is_cur_rdlstate = true;
} }
} else { } else {
if (rtlpriv->dm.bis_cur_rdlstate || if (rtlpriv->dm.is_cur_rdlstate ||
!rtlpriv->dm.bcurrent_turbo_edca) { !rtlpriv->dm.current_turbo_edca) {
rtl_write_dword(rtlpriv, rtl_write_dword(rtlpriv,
REG_EDCA_BE_PARAM, REG_EDCA_BE_PARAM,
edca_be_ul); edca_be_ul);
rtlpriv->dm.bis_cur_rdlstate = false; rtlpriv->dm.is_cur_rdlstate = false;
} }
} }
rtlpriv->dm.bcurrent_turbo_edca = true; rtlpriv->dm.current_turbo_edca = true;
} else { } else {
if (rtlpriv->dm.bcurrent_turbo_edca) { if (rtlpriv->dm.current_turbo_edca) {
u8 tmp = AC0_BE; u8 tmp = AC0_BE;
rtlpriv->cfg->ops->set_hw_reg(hw, rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_AC_PARAM, HW_VAR_AC_PARAM,
(u8 *) (&tmp)); (u8 *) (&tmp));
rtlpriv->dm.bcurrent_turbo_edca = false; rtlpriv->dm.current_turbo_edca = false;
} }
} }
dm_checkedcaturbo_exit: dm_checkedcaturbo_exit:
rtlpriv->dm.bis_any_nonbepkts = false; rtlpriv->dm.is_any_nonbepkts = false;
last_txok_cnt = rtlpriv->stats.txbytesunicast; last_txok_cnt = rtlpriv->stats.txbytesunicast;
last_rxok_cnt = rtlpriv->stats.rxbytesunicast; last_rxok_cnt = rtlpriv->stats.rxbytesunicast;
} }
...@@ -636,7 +636,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw ...@@ -636,7 +636,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
u8 txpwr_level[2] = {0, 0}; u8 txpwr_level[2] = {0, 0};
u8 ofdm_min_index = 6, rf; u8 ofdm_min_index = 6, rf;
rtlpriv->dm.btxpower_trackingInit = true; rtlpriv->dm.txpower_trackingInit = true;
RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
("rtl92c_dm_txpower_tracking_callback_thermalmeter\n")); ("rtl92c_dm_txpower_tracking_callback_thermalmeter\n"));
...@@ -696,7 +696,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw ...@@ -696,7 +696,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
rtl_get_bbreg(hw, RCCK0_TXFILTER2, MASKDWORD) & MASKCCK; rtl_get_bbreg(hw, RCCK0_TXFILTER2, MASKDWORD) & MASKCCK;
for (i = 0; i < CCK_TABLE_LENGTH; i++) { for (i = 0; i < CCK_TABLE_LENGTH; i++) {
if (rtlpriv->dm.b_cck_inch14) { if (rtlpriv->dm.cck_inch14) {
if (memcmp((void *)&temp_cck, if (memcmp((void *)&temp_cck,
(void *)&cckswing_table_ch14[i][2], (void *)&cckswing_table_ch14[i][2],
4) == 0) { 4) == 0) {
...@@ -708,7 +708,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw ...@@ -708,7 +708,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
"cck_index=0x%x, ch 14 %d\n", "cck_index=0x%x, ch 14 %d\n",
RCCK0_TXFILTER2, temp_cck, RCCK0_TXFILTER2, temp_cck,
cck_index_old, cck_index_old,
rtlpriv->dm.b_cck_inch14)); rtlpriv->dm.cck_inch14));
break; break;
} }
} else { } else {
...@@ -724,7 +724,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw ...@@ -724,7 +724,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
"cck_index=0x%x, ch14 %d\n", "cck_index=0x%x, ch14 %d\n",
RCCK0_TXFILTER2, temp_cck, RCCK0_TXFILTER2, temp_cck,
cck_index_old, cck_index_old,
rtlpriv->dm.b_cck_inch14)); rtlpriv->dm.cck_inch14));
break; break;
} }
} }
...@@ -937,7 +937,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw ...@@ -937,7 +937,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
BIT(31) | BIT(29), 0x00); BIT(31) | BIT(29), 0x00);
} }
if (!rtlpriv->dm.b_cck_inch14) { if (!rtlpriv->dm.cck_inch14) {
rtl_write_byte(rtlpriv, 0xa22, rtl_write_byte(rtlpriv, 0xa22,
cckswing_table_ch1ch13[cck_index] cckswing_table_ch1ch13[cck_index]
[0]); [0]);
...@@ -1057,12 +1057,12 @@ static void rtl92c_dm_initialize_txpower_tracking_thermalmeter( ...@@ -1057,12 +1057,12 @@ static void rtl92c_dm_initialize_txpower_tracking_thermalmeter(
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
rtlpriv->dm.btxpower_tracking = true; rtlpriv->dm.txpower_tracking = true;
rtlpriv->dm.btxpower_trackingInit = false; rtlpriv->dm.txpower_trackingInit = false;
RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
("pMgntInfo->btxpower_tracking = %d\n", ("pMgntInfo->txpower_tracking = %d\n",
rtlpriv->dm.btxpower_tracking)); rtlpriv->dm.txpower_tracking));
} }
static void rtl92c_dm_initialize_txpower_tracking(struct ieee80211_hw *hw) static void rtl92c_dm_initialize_txpower_tracking(struct ieee80211_hw *hw)
...@@ -1081,7 +1081,7 @@ static void rtl92c_dm_check_txpower_tracking_thermal_meter( ...@@ -1081,7 +1081,7 @@ static void rtl92c_dm_check_txpower_tracking_thermal_meter(
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
static u8 tm_trigger; static u8 tm_trigger;
if (!rtlpriv->dm.btxpower_tracking) if (!rtlpriv->dm.txpower_tracking)
return; return;
if (!tm_trigger) { if (!tm_trigger) {
...@@ -1113,9 +1113,9 @@ void rtl92c_dm_init_rate_adaptive_mask(struct ieee80211_hw *hw) ...@@ -1113,9 +1113,9 @@ void rtl92c_dm_init_rate_adaptive_mask(struct ieee80211_hw *hw)
p_ra->pre_ratr_state = DM_RATR_STA_INIT; p_ra->pre_ratr_state = DM_RATR_STA_INIT;
if (rtlpriv->dm.dm_type == DM_TYPE_BYDRIVER) if (rtlpriv->dm.dm_type == DM_TYPE_BYDRIVER)
rtlpriv->dm.b_useramask = true; rtlpriv->dm.useramask = true;
else else
rtlpriv->dm.b_useramask = false; rtlpriv->dm.useramask = false;
} }
...@@ -1133,7 +1133,7 @@ static void rtl92c_dm_refresh_rate_adaptive_mask(struct ieee80211_hw *hw) ...@@ -1133,7 +1133,7 @@ static void rtl92c_dm_refresh_rate_adaptive_mask(struct ieee80211_hw *hw)
return; return;
} }
if (!rtlpriv->dm.b_useramask) { if (!rtlpriv->dm.useramask) {
RT_TRACE(rtlpriv, COMP_RATE, DBG_LOUD, RT_TRACE(rtlpriv, COMP_RATE, DBG_LOUD,
("<---- driver does not control rate adaptive mask\n")); ("<---- driver does not control rate adaptive mask\n"));
return; return;
...@@ -1365,16 +1365,16 @@ void rtl92c_dm_watchdog(struct ieee80211_hw *hw) ...@@ -1365,16 +1365,16 @@ void rtl92c_dm_watchdog(struct ieee80211_hw *hw)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
bool b_fw_current_inpsmode = false; bool fw_current_inpsmode = false;
bool b_fw_ps_awake = true; bool fw_ps_awake = true;
rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_FW_PSMODE_STATUS, rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_FW_PSMODE_STATUS,
(u8 *) (&b_fw_current_inpsmode)); (u8 *) (&fw_current_inpsmode));
rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_FWLPS_RF_ON, rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_FWLPS_RF_ON,
(u8 *) (&b_fw_ps_awake)); (u8 *) (&fw_ps_awake));
if ((ppsc->rfpwr_state == ERFON) && ((!b_fw_current_inpsmode) && if ((ppsc->rfpwr_state == ERFON) && ((!fw_current_inpsmode) &&
b_fw_ps_awake) fw_ps_awake)
&& (!ppsc->rfchange_inprogress)) { && (!ppsc->rfchange_inprogress)) {
rtl92c_dm_pwdb_monitor(hw); rtl92c_dm_pwdb_monitor(hw);
rtl92c_dm_dig(hw); rtl92c_dm_dig(hw);
......
...@@ -44,7 +44,7 @@ void rtl92c_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -44,7 +44,7 @@ void rtl92c_dm_dynamic_txpower(struct ieee80211_hw *hw)
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
long undecorated_smoothed_pwdb; long undecorated_smoothed_pwdb;
if (!rtlpriv->dm.bdynamic_txpower_enable) if (!rtlpriv->dm.dynamic_txpower_enable)
return; return;
if (rtlpriv->dm.dm_flag & HAL_DM_HIPWR_DISABLE) { if (rtlpriv->dm.dm_flag & HAL_DM_HIPWR_DISABLE) {
......
...@@ -316,12 +316,12 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -316,12 +316,12 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
while (true) { while (true) {
spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
if (rtlhal->b_h2c_setinprogress) { if (rtlhal->h2c_setinprogress) {
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD,
("H2C set in progress! Wait to set.." ("H2C set in progress! Wait to set.."
"element_id(%d).\n", element_id)); "element_id(%d).\n", element_id));
while (rtlhal->b_h2c_setinprogress) { while (rtlhal->h2c_setinprogress) {
spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock,
flag); flag);
h2c_waitcounter++; h2c_waitcounter++;
...@@ -337,7 +337,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -337,7 +337,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
} }
spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
} else { } else {
rtlhal->b_h2c_setinprogress = true; rtlhal->h2c_setinprogress = true;
spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
break; break;
} }
...@@ -493,7 +493,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -493,7 +493,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
} }
spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
rtlhal->b_h2c_setinprogress = false; rtlhal->h2c_setinprogress = false;
spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, ("go out\n")); RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, ("go out\n"));
...@@ -505,7 +505,7 @@ void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw, ...@@ -505,7 +505,7 @@ void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw,
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
u32 tmp_cmdbuf[2]; u32 tmp_cmdbuf[2];
if (rtlhal->bfw_ready == false) { if (rtlhal->fw_ready == false) {
RT_ASSERT(false, ("return H2C cmd because of Fw " RT_ASSERT(false, ("return H2C cmd because of Fw "
"download fail!!!\n")); "download fail!!!\n"));
return; return;
......
This diff is collapsed.
...@@ -57,7 +57,7 @@ void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -57,7 +57,7 @@ void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
("switch case not process\n")); ("switch case not process\n"));
break; break;
} }
pled->b_ledon = true; pled->ledon = true;
} }
void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
...@@ -76,7 +76,7 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -76,7 +76,7 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
break; break;
case LED_PIN_LED0: case LED_PIN_LED0:
ledcfg &= 0xf0; ledcfg &= 0xf0;
if (pcipriv->ledctl.bled_opendrain == true) if (pcipriv->ledctl.led_opendrain == true)
rtl_write_byte(rtlpriv, REG_LEDCFG2, rtl_write_byte(rtlpriv, REG_LEDCFG2,
(ledcfg | BIT(1) | BIT(5) | BIT(6))); (ledcfg | BIT(1) | BIT(5) | BIT(6)));
else else
...@@ -92,7 +92,7 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -92,7 +92,7 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
("switch case not process\n")); ("switch case not process\n"));
break; break;
} }
pled->b_ledon = false; pled->ledon = false;
} }
void rtl92ce_init_sw_leds(struct ieee80211_hw *hw) void rtl92ce_init_sw_leds(struct ieee80211_hw *hw)
......
...@@ -330,7 +330,7 @@ bool rtl92c_phy_bb_config(struct ieee80211_hw *hw) ...@@ -330,7 +330,7 @@ bool rtl92c_phy_bb_config(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
u16 regval; u16 regval;
u32 regvaldw; u32 regvaldw;
u8 b_reg_hwparafile = 1; u8 reg_hwparafile = 1;
_rtl92c_phy_init_bb_rf_register_definition(hw); _rtl92c_phy_init_bb_rf_register_definition(hw);
regval = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN); regval = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN);
...@@ -345,7 +345,7 @@ bool rtl92c_phy_bb_config(struct ieee80211_hw *hw) ...@@ -345,7 +345,7 @@ bool rtl92c_phy_bb_config(struct ieee80211_hw *hw)
rtl_write_byte(rtlpriv, REG_AFE_XTAL_CTRL + 1, 0x80); rtl_write_byte(rtlpriv, REG_AFE_XTAL_CTRL + 1, 0x80);
regvaldw = rtl_read_dword(rtlpriv, REG_LEDCFG0); regvaldw = rtl_read_dword(rtlpriv, REG_LEDCFG0);
rtl_write_dword(rtlpriv, REG_LEDCFG0, regvaldw | BIT(23)); rtl_write_dword(rtlpriv, REG_LEDCFG0, regvaldw | BIT(23));
if (b_reg_hwparafile == 1) if (reg_hwparafile == 1)
rtstatus = _rtl92c_phy_bb8192c_config_parafile(hw); rtstatus = _rtl92c_phy_bb8192c_config_parafile(hw);
return rtstatus; return rtstatus;
} }
...@@ -388,7 +388,7 @@ static bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw) ...@@ -388,7 +388,7 @@ static bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw)
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("AGC Table Fail\n")); RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("AGC Table Fail\n"));
return false; return false;
} }
rtlphy->bcck_high_power = (bool) (rtl_get_bbreg(hw, rtlphy->cck_high_power = (bool) (rtl_get_bbreg(hw,
RFPGA0_XA_HSSIPARAMETER2, RFPGA0_XA_HSSIPARAMETER2,
0x200)); 0x200));
return true; return true;
...@@ -954,7 +954,7 @@ void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel) ...@@ -954,7 +954,7 @@ void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel)
struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
u8 cckpowerlevel[2], ofdmpowerlevel[2]; u8 cckpowerlevel[2], ofdmpowerlevel[2];
if (rtlefuse->b_txpwr_fromeprom == false) if (rtlefuse->txpwr_fromeprom == false)
return; return;
_rtl92c_get_txpower_index(hw, channel, _rtl92c_get_txpower_index(hw, channel,
&cckpowerlevel[0], &ofdmpowerlevel[0]); &cckpowerlevel[0], &ofdmpowerlevel[0]);
...@@ -1437,7 +1437,7 @@ static u8 _rtl92c_phy_path_b_iqk(struct ieee80211_hw *hw) ...@@ -1437,7 +1437,7 @@ static u8 _rtl92c_phy_path_b_iqk(struct ieee80211_hw *hw)
} }
static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw, static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw,
bool b_iqk_ok, long result[][8], bool iqk_ok, long result[][8],
u8 final_candidate, bool btxonly) u8 final_candidate, bool btxonly)
{ {
u32 oldval_0, x, tx0_a, reg; u32 oldval_0, x, tx0_a, reg;
...@@ -1445,7 +1445,7 @@ static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw, ...@@ -1445,7 +1445,7 @@ static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw,
if (final_candidate == 0xFF) if (final_candidate == 0xFF)
return; return;
else if (b_iqk_ok) { else if (iqk_ok) {
oldval_0 = (rtl_get_bbreg(hw, ROFDM0_XATXIQIMBALANCE, oldval_0 = (rtl_get_bbreg(hw, ROFDM0_XATXIQIMBALANCE,
MASKDWORD) >> 22) & 0x3FF; MASKDWORD) >> 22) & 0x3FF;
x = result[final_candidate][0]; x = result[final_candidate][0];
...@@ -1477,7 +1477,7 @@ static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw, ...@@ -1477,7 +1477,7 @@ static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw,
} }
static void _rtl92c_phy_path_b_fill_iqk_matrix(struct ieee80211_hw *hw, static void _rtl92c_phy_path_b_fill_iqk_matrix(struct ieee80211_hw *hw,
bool b_iqk_ok, long result[][8], bool iqk_ok, long result[][8],
u8 final_candidate, bool btxonly) u8 final_candidate, bool btxonly)
{ {
u32 oldval_1, x, tx1_a, reg; u32 oldval_1, x, tx1_a, reg;
...@@ -1485,7 +1485,7 @@ static void _rtl92c_phy_path_b_fill_iqk_matrix(struct ieee80211_hw *hw, ...@@ -1485,7 +1485,7 @@ static void _rtl92c_phy_path_b_fill_iqk_matrix(struct ieee80211_hw *hw,
if (final_candidate == 0xFF) if (final_candidate == 0xFF)
return; return;
else if (b_iqk_ok) { else if (iqk_ok) {
oldval_1 = (rtl_get_bbreg(hw, ROFDM0_XBTXIQIMBALANCE, oldval_1 = (rtl_get_bbreg(hw, ROFDM0_XBTXIQIMBALANCE,
MASKDWORD) >> 22) & 0x3FF; MASKDWORD) >> 22) & 0x3FF;
x = result[final_candidate][4]; x = result[final_candidate][4];
...@@ -1698,11 +1698,11 @@ static void _rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, ...@@ -1698,11 +1698,11 @@ static void _rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw,
} }
_rtl92c_phy_path_adda_on(hw, adda_reg, true, is2t); _rtl92c_phy_path_adda_on(hw, adda_reg, true, is2t);
if (t == 0) { if (t == 0) {
rtlphy->b_rfpi_enable = (u8) rtl_get_bbreg(hw, rtlphy->rfpi_enable = (u8) rtl_get_bbreg(hw,
RFPGA0_XA_HSSIPARAMETER1, RFPGA0_XA_HSSIPARAMETER1,
BIT(8)); BIT(8));
} }
if (!rtlphy->b_rfpi_enable) if (!rtlphy->rfpi_enable)
_rtl92c_phy_pi_mode_switch(hw, true); _rtl92c_phy_pi_mode_switch(hw, true);
if (t == 0) { if (t == 0) {
rtlphy->reg_c04 = rtl_get_bbreg(hw, 0xc04, MASKDWORD); rtlphy->reg_c04 = rtl_get_bbreg(hw, 0xc04, MASKDWORD);
...@@ -1783,7 +1783,7 @@ static void _rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, ...@@ -1783,7 +1783,7 @@ static void _rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw,
if (is2t) if (is2t)
rtl_set_bbreg(hw, 0x844, MASKDWORD, 0x00032ed3); rtl_set_bbreg(hw, 0x844, MASKDWORD, 0x00032ed3);
if (t != 0) { if (t != 0) {
if (!rtlphy->b_rfpi_enable) if (!rtlphy->rfpi_enable)
_rtl92c_phy_pi_mode_switch(hw, false); _rtl92c_phy_pi_mode_switch(hw, false);
_rtl92c_phy_reload_adda_registers(hw, adda_reg, _rtl92c_phy_reload_adda_registers(hw, adda_reg,
rtlphy->adda_backup, 16); rtlphy->adda_backup, 16);
...@@ -2370,7 +2370,7 @@ void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta) ...@@ -2370,7 +2370,7 @@ void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta)
struct rtl_phy *rtlphy = &(rtlpriv->phy); struct rtl_phy *rtlphy = &(rtlpriv->phy);
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
if (rtlphy->b_apk_done) if (rtlphy->apk_done)
return; return;
if (IS_92C_SERIAL(rtlhal->version)) if (IS_92C_SERIAL(rtlhal->version))
_rtl92c_phy_ap_calibrate(hw, delta, true); _rtl92c_phy_ap_calibrate(hw, delta, true);
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
#define RTL92C_MAX_PATH_NUM 2 #define RTL92C_MAX_PATH_NUM 2
#define CHANNEL_MAX_NUMBER 14 #define CHANNEL_MAX_NUMBER 14
#define CHANNEL_GROUP_MAX 3 #define CHANNEL_GROUP_MAX 3
#define LLT_LAST_ENTRY_OF_TX_PKT_BUFFER 255
enum swchnlcmd_id { enum swchnlcmd_id {
CMDID_END, CMDID_END,
CMDID_SET_TXPOWEROWER_LEVEL, CMDID_SET_TXPOWEROWER_LEVEL,
...@@ -233,5 +233,6 @@ void rtl92c_phy_config_bb_external_pa(struct ieee80211_hw *hw); ...@@ -233,5 +233,6 @@ void rtl92c_phy_config_bb_external_pa(struct ieee80211_hw *hw);
void rtl92ce_phy_set_rf_on(struct ieee80211_hw *hw); void rtl92ce_phy_set_rf_on(struct ieee80211_hw *hw);
bool rtl92c_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype); bool rtl92c_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype);
void rtl92c_phy_set_io(struct ieee80211_hw *hw); void rtl92c_phy_set_io(struct ieee80211_hw *hw);
void rtl92c_bb_block_on(struct ieee80211_hw *hw);
#endif #endif
...@@ -46,9 +46,9 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) ...@@ -46,9 +46,9 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
rtlpriv->dm.b_dm_initialgain_enable = 1; rtlpriv->dm.dm_initialgain_enable = 1;
rtlpriv->dm.dm_flag = 0; rtlpriv->dm.dm_flag = 0;
rtlpriv->dm.b_disable_framebursting = 0;; rtlpriv->dm.disable_framebursting = 0;
rtlpriv->dm.thermalvalue = 0; rtlpriv->dm.thermalvalue = 0;
rtlpci->transmit_config = CFENDFORM | BIT(12) | BIT(13); rtlpci->transmit_config = CFENDFORM | BIT(12) | BIT(13);
......
...@@ -366,10 +366,10 @@ static int _rtl_usb_init_sw(struct ieee80211_hw *hw) ...@@ -366,10 +366,10 @@ static int _rtl_usb_init_sw(struct ieee80211_hw *hw)
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
rtlhal->hw = hw; rtlhal->hw = hw;
ppsc->b_inactiveps = false; ppsc->inactiveps = false;
ppsc->b_leisure_ps = false; ppsc->leisure_ps = false;
ppsc->b_fwctrl_lps = false; ppsc->fwctrl_lps = false;
ppsc->b_reg_fwctrl_lps = 3; ppsc->reg_fwctrl_lps = 3;
ppsc->reg_max_lps_awakeintvl = 5; ppsc->reg_max_lps_awakeintvl = 5;
ppsc->fwctrl_psmode = FW_PS_DTIM_MODE; ppsc->fwctrl_psmode = FW_PS_DTIM_MODE;
...@@ -450,7 +450,7 @@ static void _rtl_usb_rx_process_agg(struct ieee80211_hw *hw, ...@@ -450,7 +450,7 @@ static void _rtl_usb_rx_process_agg(struct ieee80211_hw *hw,
skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift)); skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift));
hdr = (struct ieee80211_hdr *)(skb->data); hdr = (struct ieee80211_hdr *)(skb->data);
fc = le16_to_cpu(hdr->frame_control); fc = le16_to_cpu(hdr->frame_control);
if (!stats.b_crc) { if (!stats.crc) {
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
if (is_broadcast_ether_addr(hdr->addr1)) { if (is_broadcast_ether_addr(hdr->addr1)) {
...@@ -493,7 +493,7 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw, ...@@ -493,7 +493,7 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw,
skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift)); skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift));
hdr = (struct ieee80211_hdr *)(skb->data); hdr = (struct ieee80211_hdr *)(skb->data);
fc = le16_to_cpu(hdr->frame_control); fc = le16_to_cpu(hdr->frame_control);
if (!stats.b_crc) { if (!stats.crc) {
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
if (is_broadcast_ether_addr(hdr->addr1)) { if (is_broadcast_ether_addr(hdr->addr1)) {
......
...@@ -578,11 +578,11 @@ struct rtl_probe_rsp { ...@@ -578,11 +578,11 @@ struct rtl_probe_rsp {
struct rtl_led { struct rtl_led {
void *hw; void *hw;
enum rtl_led_pin ledpin; enum rtl_led_pin ledpin;
bool b_ledon; bool ledon;
}; };
struct rtl_led_ctl { struct rtl_led_ctl {
bool bled_opendrain; bool led_opendrain;
struct rtl_led sw_led0; struct rtl_led sw_led0;
struct rtl_led sw_led1; struct rtl_led sw_led1;
}; };
...@@ -727,10 +727,10 @@ struct rtl_phy { ...@@ -727,10 +727,10 @@ struct rtl_phy {
u32 iqk_mac_backup[IQK_MAC_REG_NUM]; u32 iqk_mac_backup[IQK_MAC_REG_NUM];
u32 iqk_bb_backup[10]; u32 iqk_bb_backup[10];
bool b_rfpi_enable; bool rfpi_enable;
u8 pwrgroup_cnt; u8 pwrgroup_cnt;
u8 bcck_high_power; u8 cck_high_power;
/* 3 groups of pwr diff by rates*/ /* 3 groups of pwr diff by rates*/
u32 mcs_txpwrlevel_origoffset[4][16]; u32 mcs_txpwrlevel_origoffset[4][16];
u8 default_initialgain[4]; u8 default_initialgain[4];
...@@ -740,7 +740,7 @@ struct rtl_phy { ...@@ -740,7 +740,7 @@ struct rtl_phy {
u8 cur_ofdm24g_txpwridx; u8 cur_ofdm24g_txpwridx;
u32 rfreg_chnlval[2]; u32 rfreg_chnlval[2];
bool b_apk_done; bool apk_done;
/*fsync*/ /*fsync*/
u8 framesync; u8 framesync;
...@@ -867,9 +867,9 @@ struct rtl_hal { ...@@ -867,9 +867,9 @@ struct rtl_hal {
/*firmware */ /*firmware */
u8 *pfirmware; u8 *pfirmware;
bool b_h2c_setinprogress; bool h2c_setinprogress;
u8 last_hmeboxnum; u8 last_hmeboxnum;
bool bfw_ready; bool fw_ready;
/*Reserve page start offset except beacon in TxQ. */ /*Reserve page start offset except beacon in TxQ. */
u8 fw_rsvdpage_startoffset; u8 fw_rsvdpage_startoffset;
}; };
...@@ -900,17 +900,17 @@ struct rtl_dm { ...@@ -900,17 +900,17 @@ struct rtl_dm {
long entry_min_undecoratedsmoothed_pwdb; long entry_min_undecoratedsmoothed_pwdb;
long undecorated_smoothed_pwdb; /*out dm */ long undecorated_smoothed_pwdb; /*out dm */
long entry_max_undecoratedsmoothed_pwdb; long entry_max_undecoratedsmoothed_pwdb;
bool b_dm_initialgain_enable; bool dm_initialgain_enable;
bool bdynamic_txpower_enable; bool dynamic_txpower_enable;
bool bcurrent_turbo_edca; bool current_turbo_edca;
bool bis_any_nonbepkts; /*out dm */ bool is_any_nonbepkts; /*out dm */
bool bis_cur_rdlstate; bool is_cur_rdlstate;
bool btxpower_trackingInit; bool txpower_trackingInit;
bool b_disable_framebursting; bool disable_framebursting;
bool b_cck_inch14; bool cck_inch14;
bool btxpower_tracking; bool txpower_tracking;
bool b_useramask; bool useramask;
bool brfpath_rxenable[4]; bool rfpath_rxenable[4];
u8 thermalvalue_iqk; u8 thermalvalue_iqk;
u8 thermalvalue_lck; u8 thermalvalue_lck;
...@@ -928,7 +928,7 @@ struct rtl_dm { ...@@ -928,7 +928,7 @@ struct rtl_dm {
#define EFUSE_MAX_LOGICAL_SIZE 128 #define EFUSE_MAX_LOGICAL_SIZE 128
struct rtl_efuse { struct rtl_efuse {
bool bautoLoad_ok; bool autoLoad_ok;
bool bootfromefuse; bool bootfromefuse;
u16 max_physical_size; u16 max_physical_size;
u8 contents[EFUSE_MAX_LOGICAL_SIZE]; u8 contents[EFUSE_MAX_LOGICAL_SIZE];
...@@ -950,7 +950,7 @@ struct rtl_efuse { ...@@ -950,7 +950,7 @@ struct rtl_efuse {
u8 dev_addr[6]; u8 dev_addr[6];
bool b_txpwr_fromeprom; bool txpwr_fromeprom;
u8 eeprom_tssi[2]; u8 eeprom_tssi[2];
u8 eeprom_pwrlimit_ht20[3]; u8 eeprom_pwrlimit_ht20[3];
u8 eeprom_pwrlimit_ht40[3]; u8 eeprom_pwrlimit_ht40[3];
...@@ -974,15 +974,15 @@ struct rtl_efuse { ...@@ -974,15 +974,15 @@ struct rtl_efuse {
u8 thermalmeter[2]; u8 thermalmeter[2];
u8 legacy_ht_txpowerdiff; /*Legacy to HT rate power diff */ u8 legacy_ht_txpowerdiff; /*Legacy to HT rate power diff */
bool b_apk_thermalmeterignore; bool apk_thermalmeterignore;
}; };
struct rtl_ps_ctl { struct rtl_ps_ctl {
bool set_rfpowerstate_inprogress; bool set_rfpowerstate_inprogress;
bool b_in_powersavemode; bool in_powersavemode;
bool rfchange_inprogress; bool rfchange_inprogress;
bool b_swrf_processing; bool swrf_processing;
bool b_hwradiooff; bool hwradiooff;
u32 last_sleep_jiffies; u32 last_sleep_jiffies;
u32 last_awake_jiffies; u32 last_awake_jiffies;
...@@ -993,23 +993,23 @@ struct rtl_ps_ctl { ...@@ -993,23 +993,23 @@ struct rtl_ps_ctl {
* If it supports ASPM, Offset[560h] = 0x40, * If it supports ASPM, Offset[560h] = 0x40,
* otherwise Offset[560h] = 0x00. * otherwise Offset[560h] = 0x00.
* */ * */
bool b_support_aspm; bool support_aspm;
bool b_support_backdoor; bool support_backdoor;
/*for LPS */ /*for LPS */
enum rt_psmode dot11_psmode; /*Power save mode configured. */ enum rt_psmode dot11_psmode; /*Power save mode configured. */
bool b_leisure_ps; bool leisure_ps;
bool b_fwctrl_lps; bool fwctrl_lps;
u8 fwctrl_psmode; u8 fwctrl_psmode;
/*For Fw control LPS mode */ /*For Fw control LPS mode */
u8 b_reg_fwctrl_lps; u8 reg_fwctrl_lps;
/*Record Fw PS mode status. */ /*Record Fw PS mode status. */
bool b_fw_current_inpsmode; bool fw_current_inpsmode;
u8 reg_max_lps_awakeintvl; u8 reg_max_lps_awakeintvl;
bool report_linked; bool report_linked;
/*for IPS */ /*for IPS */
bool b_inactiveps; bool inactiveps;
u32 rfoff_reason; u32 rfoff_reason;
...@@ -1047,10 +1047,10 @@ struct rtl_stats { ...@@ -1047,10 +1047,10 @@ struct rtl_stats {
s32 recvsignalpower; s32 recvsignalpower;
s8 rxpower; /*in dBm Translate from PWdB */ s8 rxpower; /*in dBm Translate from PWdB */
u8 signalstrength; /*in 0-100 index. */ u8 signalstrength; /*in 0-100 index. */
u16 b_hwerror:1; u16 hwerror:1;
u16 b_crc:1; u16 crc:1;
u16 b_icv:1; u16 icv:1;
u16 b_shortpreamble:1; u16 shortpreamble:1;
u16 antenna:1; u16 antenna:1;
u16 decrypted:1; u16 decrypted:1;
u16 wakeup:1; u16 wakeup:1;
...@@ -1059,15 +1059,15 @@ struct rtl_stats { ...@@ -1059,15 +1059,15 @@ struct rtl_stats {
u8 rx_drvinfo_size; u8 rx_drvinfo_size;
u8 rx_bufshift; u8 rx_bufshift;
bool b_isampdu; bool isampdu;
bool rx_is40Mhzpacket; bool rx_is40Mhzpacket;
u32 rx_pwdb_all; u32 rx_pwdb_all;
u8 rx_mimo_signalstrength[4]; /*in 0~100 index */ u8 rx_mimo_signalstrength[4]; /*in 0~100 index */
s8 rx_mimo_signalquality[2]; s8 rx_mimo_signalquality[2];
bool b_packet_matchbssid; bool packet_matchbssid;
bool b_is_cck; bool is_cck;
bool b_packet_toself; bool packet_toself;
bool b_packet_beacon; /*for rssi */ bool packet_beacon; /*for rssi */
char cck_adc_pwdb[4]; /*for rx path selection */ char cck_adc_pwdb[4]; /*for rx path selection */
}; };
...@@ -1078,23 +1078,23 @@ struct rt_link_detect { ...@@ -1078,23 +1078,23 @@ struct rt_link_detect {
u32 num_tx_inperiod; u32 num_tx_inperiod;
u32 num_rx_inperiod; u32 num_rx_inperiod;
bool b_busytraffic; bool busytraffic;
bool b_higher_busytraffic; bool higher_busytraffic;
bool b_higher_busyrxtraffic; bool higher_busyrxtraffic;
}; };
struct rtl_tcb_desc { struct rtl_tcb_desc {
u8 b_packet_bw:1; u8 packet_bw:1;
u8 b_multicast:1; u8 multicast:1;
u8 b_broadcast:1; u8 broadcast:1;
u8 b_rts_stbc:1; u8 rts_stbc:1;
u8 b_rts_enable:1; u8 rts_enable:1;
u8 b_cts_enable:1; u8 cts_enable:1;
u8 b_rts_use_shortpreamble:1; u8 rts_use_shortpreamble:1;
u8 b_rts_use_shortgi:1; u8 rts_use_shortgi:1;
u8 rts_sc:1; u8 rts_sc:1;
u8 b_rts_bw:1; u8 rts_bw:1;
u8 rts_rate; u8 rts_rate;
u8 use_shortgi:1; u8 use_shortgi:1;
...@@ -1137,23 +1137,23 @@ struct rtl_hal_ops { ...@@ -1137,23 +1137,23 @@ struct rtl_hal_ops {
struct ieee80211_tx_info *info, struct ieee80211_tx_info *info,
struct sk_buff *skb, unsigned int queue_index); struct sk_buff *skb, unsigned int queue_index);
void (*fill_tx_cmddesc) (struct ieee80211_hw *hw, u8 *pdesc, void (*fill_tx_cmddesc) (struct ieee80211_hw *hw, u8 *pdesc,
bool b_firstseg, bool b_lastseg, bool firstseg, bool lastseg,
struct sk_buff *skb); struct sk_buff *skb);
bool (*cmd_send_packet)(struct ieee80211_hw *hw, struct sk_buff *skb); bool (*cmd_send_packet)(struct ieee80211_hw *hw, struct sk_buff *skb);
bool(*query_rx_desc) (struct ieee80211_hw *hw, bool (*query_rx_desc) (struct ieee80211_hw *hw,
struct rtl_stats *stats, struct rtl_stats *stats,
struct ieee80211_rx_status *rx_status, struct ieee80211_rx_status *rx_status,
u8 *pdesc, struct sk_buff *skb); u8 *pdesc, struct sk_buff *skb);
void (*set_channel_access) (struct ieee80211_hw *hw); void (*set_channel_access) (struct ieee80211_hw *hw);
bool(*radio_onoff_checking) (struct ieee80211_hw *hw, u8 *valid); bool (*radio_onoff_checking) (struct ieee80211_hw *hw, u8 *valid);
void (*dm_watchdog) (struct ieee80211_hw *hw); void (*dm_watchdog) (struct ieee80211_hw *hw);
void (*scan_operation_backup) (struct ieee80211_hw *hw, u8 operation); void (*scan_operation_backup) (struct ieee80211_hw *hw, u8 operation);
bool(*set_rf_power_state) (struct ieee80211_hw *hw, bool (*set_rf_power_state) (struct ieee80211_hw *hw,
enum rf_pwrstate rfpwr_state); enum rf_pwrstate rfpwr_state);
void (*led_control) (struct ieee80211_hw *hw, void (*led_control) (struct ieee80211_hw *hw,
enum led_ctl_mode ledaction); enum led_ctl_mode ledaction);
void (*set_desc) (u8 *pdesc, bool istx, u8 desc_name, u8 *val); void (*set_desc) (u8 *pdesc, bool istx, u8 desc_name, u8 *val);
u32(*get_desc) (u8 *pdesc, bool istx, u8 desc_name); u32 (*get_desc) (u8 *pdesc, bool istx, u8 desc_name);
void (*tx_polling) (struct ieee80211_hw *hw, unsigned int hw_queue); void (*tx_polling) (struct ieee80211_hw *hw, unsigned int hw_queue);
void (*enable_hw_sec) (struct ieee80211_hw *hw); void (*enable_hw_sec) (struct ieee80211_hw *hw);
void (*set_key) (struct ieee80211_hw *hw, u32 key_index, void (*set_key) (struct ieee80211_hw *hw, u32 key_index,
...@@ -1161,10 +1161,10 @@ struct rtl_hal_ops { ...@@ -1161,10 +1161,10 @@ struct rtl_hal_ops {
bool is_wepkey, bool clear_all); bool is_wepkey, bool clear_all);
void (*init_sw_leds) (struct ieee80211_hw *hw); void (*init_sw_leds) (struct ieee80211_hw *hw);
void (*deinit_sw_leds) (struct ieee80211_hw *hw); void (*deinit_sw_leds) (struct ieee80211_hw *hw);
u32(*get_bbreg) (struct ieee80211_hw *hw, u32 regaddr, u32 bitmask); u32 (*get_bbreg) (struct ieee80211_hw *hw, u32 regaddr, u32 bitmask);
void (*set_bbreg) (struct ieee80211_hw *hw, u32 regaddr, u32 bitmask, void (*set_bbreg) (struct ieee80211_hw *hw, u32 regaddr, u32 bitmask,
u32 data); u32 data);
u32(*get_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath, u32 (*get_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath,
u32 regaddr, u32 bitmask); u32 regaddr, u32 bitmask);
void (*set_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath, void (*set_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath,
u32 regaddr, u32 bitmask, u32 data); u32 regaddr, u32 bitmask, u32 data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment