Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 237438
b: refs/heads/master
c: 7ea4724
h: refs/heads/master
v: v3
  • Loading branch information
Larry Finger authored and John W. Linville committed Feb 21, 2011
1 parent fb3858c commit 57dcf3b
Show file tree
Hide file tree
Showing 16 changed files with 322 additions and 322 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e80b9d1c51883e01603e2ff0caae608eda09fa5
refs/heads/master: 7ea4724036ed17ec811cb8082af7760f04484ef7
60 changes: 30 additions & 30 deletions trunk/drivers/net/wireless/rtlwifi/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,21 +399,21 @@ static void _rtl_query_protection_mode(struct ieee80211_hw *hw,
u8 rate_flag = info->control.rates[0].flags;

/* Common Settings */
tcb_desc->b_rts_stbc = false;
tcb_desc->b_cts_enable = false;
tcb_desc->rts_stbc = false;
tcb_desc->cts_enable = false;
tcb_desc->rts_sc = 0;
tcb_desc->b_rts_bw = false;
tcb_desc->b_rts_use_shortpreamble = false;
tcb_desc->b_rts_use_shortgi = false;
tcb_desc->rts_bw = false;
tcb_desc->rts_use_shortpreamble = false;
tcb_desc->rts_use_shortgi = false;

if (rate_flag & IEEE80211_TX_RC_USE_CTS_PROTECT) {
/* Use CTS-to-SELF in protection mode. */
tcb_desc->b_rts_enable = true;
tcb_desc->b_cts_enable = true;
tcb_desc->rts_enable = true;
tcb_desc->cts_enable = true;
tcb_desc->rts_rate = rtlpriv->cfg->maps[RTL_RC_OFDM_RATE24M];
} else if (rate_flag & IEEE80211_TX_RC_USE_RTS_CTS) {
/* 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];
}

Expand All @@ -429,7 +429,7 @@ static void _rtl_txrate_selectmode(struct ieee80211_hw *hw,
if (mac->opmode == NL80211_IFTYPE_STATION)
tcb_desc->ratr_index = 0;
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 =
rtlpriv->cfg->maps[RTL_RC_CCK_RATE2M];
tcb_desc->use_driver_rate = 1;
Expand All @@ -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 */
tcb_desc->mac_id = 0;

Expand All @@ -461,19 +461,19 @@ static void _rtl_query_bandwidth_mode(struct ieee80211_hw *hw,
struct rtl_priv *rtlpriv = 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)
return;

if (tcb_desc->b_multicast || tcb_desc->b_broadcast)
if (tcb_desc->multicast || tcb_desc->broadcast)
return;

/*use legency rate, shall use 20MHz */
if (tcb_desc->hw_rate <= rtlpriv->cfg->maps[RTL_RC_OFDM_RATE54M])
return;

tcb_desc->b_packet_bw = true;
tcb_desc->packet_bw = true;
}

static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw)
Expand Down Expand Up @@ -545,9 +545,9 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw,
}

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)))
tcb_desc->b_broadcast = 1;
tcb_desc->broadcast = 1;

_rtl_txrate_selectmode(hw, tcb_desc);
_rtl_query_bandwidth_mode(hw, tcb_desc);
Expand Down Expand Up @@ -777,18 +777,18 @@ void rtl_watchdog_wq_callback(void *data)
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));

bool b_busytraffic = false;
bool b_higher_busytraffic = false;
bool b_higher_busyrxtraffic = false;
bool b_higher_busytxtraffic = false;
bool busytraffic = false;
bool higher_busytraffic = false;
bool higher_busyrxtraffic = false;
bool higher_busytxtraffic = false;

u8 idx = 0;
u32 rx_cnt_inp4eriod = 0;
u32 tx_cnt_inp4eriod = 0;
u32 aver_rx_cnt_inperiod = 0;
u32 aver_tx_cnt_inperiod = 0;

bool benter_ps = false;
bool enter_ps = false;

if (is_hal_stop(rtlhal))
return;
Expand Down Expand Up @@ -832,29 +832,29 @@ void rtl_watchdog_wq_callback(void *data)

/* (2) check traffic busy */
if (aver_rx_cnt_inperiod > 100 || aver_tx_cnt_inperiod > 100)
b_busytraffic = true;
busytraffic = true;

/* Higher Tx/Rx data. */
if (aver_rx_cnt_inperiod > 4000 ||
aver_tx_cnt_inperiod > 4000) {
b_higher_busytraffic = true;
higher_busytraffic = true;

/* Extremely high Rx data. */
if (aver_rx_cnt_inperiod > 5000)
b_higher_busyrxtraffic = true;
higher_busyrxtraffic = true;
else
b_higher_busytxtraffic = false;
higher_busytxtraffic = false;
}

if (((rtlpriv->link_info.num_rx_inperiod +
rtlpriv->link_info.num_tx_inperiod) > 8) ||
(rtlpriv->link_info.num_rx_inperiod > 2))
benter_ps = false;
enter_ps = false;
else
benter_ps = true;
enter_ps = true;

/* LeisurePS only work in infra mode. */
if (benter_ps)
if (enter_ps)
rtl_lps_enter(hw);
else
rtl_lps_leave(hw);
Expand All @@ -863,9 +863,9 @@ void rtl_watchdog_wq_callback(void *data)
rtlpriv->link_info.num_rx_inperiod = 0;
rtlpriv->link_info.num_tx_inperiod = 0;

rtlpriv->link_info.b_busytraffic = b_busytraffic;
rtlpriv->link_info.b_higher_busytraffic = b_higher_busytraffic;
rtlpriv->link_info.b_higher_busyrxtraffic = b_higher_busyrxtraffic;
rtlpriv->link_info.busytraffic = busytraffic;
rtlpriv->link_info.higher_busytraffic = higher_busytraffic;
rtlpriv->link_info.higher_busyrxtraffic = higher_busyrxtraffic;

}

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/wireless/rtlwifi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
(u8 *) (&basic_rates));

if (rtlpriv->dm.b_useramask)
if (rtlpriv->dm.useramask)
rtlpriv->cfg->ops->update_rate_mask(hw, 0);
else
rtlpriv->cfg->ops->update_rate_table(hw);
Expand All @@ -681,15 +681,15 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
*/
if (changed & BSS_CHANGED_ASSOC) {
if (bss_conf->assoc) {
if (ppsc->b_fwctrl_lps) {
if (ppsc->fwctrl_lps) {
u8 mstatus = RT_MEDIA_CONNECT;
rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_H2C_FW_JOINBSSRPT,
(u8 *) (&mstatus));
ppsc->report_linked = true;
}
} else {
if (ppsc->b_fwctrl_lps) {
if (ppsc->fwctrl_lps) {
u8 mstatus = RT_MEDIA_DISCONNECT;
rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_H2C_FW_JOINBSSRPT,
Expand Down Expand Up @@ -818,7 +818,7 @@ static void rtl_op_sw_scan_complete(struct ieee80211_hw *hw)
/* fix fwlps issue */
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);
else
rtlpriv->cfg->ops->update_rate_table(hw);
Expand Down
36 changes: 18 additions & 18 deletions trunk/drivers/net/wireless/rtlwifi/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw)
u8 pcibridge_vendor = pcipriv->ndis_adapter.pcibridge_vendor;

ppsc->reg_rfps_level = 0;
ppsc->b_support_aspm = 0;
ppsc->support_aspm = 0;

/*Update PCI ASPM setting */
ppsc->const_amdpci_aspm = rtlpci->const_amdpci_aspm;
Expand Down Expand Up @@ -115,29 +115,29 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw)
switch (rtlpci->const_support_pciaspm) {
case 0:{
/*Not support ASPM. */
bool b_support_aspm = false;
ppsc->b_support_aspm = b_support_aspm;
bool support_aspm = false;
ppsc->support_aspm = support_aspm;
break;
}
case 1:{
/*Support ASPM. */
bool b_support_aspm = true;
bool b_support_backdoor = true;
ppsc->b_support_aspm = b_support_aspm;
bool support_aspm = true;
bool support_backdoor = true;
ppsc->support_aspm = support_aspm;

/*if(priv->oem_id == RT_CID_TOSHIBA &&
!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;
}
case 2:
/*ASPM value set by chipset. */
if (pcibridge_vendor == PCI_BRIDGE_VENDOR_INTEL) {
bool b_support_aspm = true;
ppsc->b_support_aspm = b_support_aspm;
bool support_aspm = true;
ppsc->support_aspm = support_aspm;
}
break;
default:
Expand Down Expand Up @@ -585,7 +585,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
hdr = (struct ieee80211_hdr *)(skb->data);
fc = le16_to_cpu(hdr->frame_control);

if (!stats.b_crc) {
if (!stats.crc) {
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status,
sizeof(rx_status));

Expand Down Expand Up @@ -890,17 +890,17 @@ static void _rtl_pci_init_struct(struct ieee80211_hw *hw,
rtlhal->hw = hw;
rtlpci->pdev = pdev;

ppsc->b_inactiveps = false;
ppsc->b_leisure_ps = true;
ppsc->b_fwctrl_lps = true;
ppsc->b_reg_fwctrl_lps = 3;
ppsc->inactiveps = false;
ppsc->leisure_ps = true;
ppsc->fwctrl_lps = true;
ppsc->reg_fwctrl_lps = 3;
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;
else if (ppsc->b_reg_fwctrl_lps == 2)
else if (ppsc->reg_fwctrl_lps == 2)
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;

/*Tx/Rx related var */
Expand Down
Loading

0 comments on commit 57dcf3b

Please sign in to comment.