aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/base.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2011-02-19 17:28:57 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-02-21 15:39:57 -0500
commit7ea4724036ed17ec811cb8082af7760f04484ef7 (patch)
tree7c90e84760d7d2f28814a13b21a6226960fe8e49 /drivers/net/wireless/rtlwifi/base.c
parent0e80b9d1c51883e01603e2ff0caae608eda09fa5 (diff)
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: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/base.c')
-rw-r--r--drivers/net/wireless/rtlwifi/base.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index cf0b73e51fc2..1d6cc1f3c6bf 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -399,21 +399,21 @@ static void _rtl_query_protection_mode(struct ieee80211_hw *hw,
399 u8 rate_flag = info->control.rates[0].flags; 399 u8 rate_flag = info->control.rates[0].flags;
400 400
401 /* Common Settings */ 401 /* Common Settings */
402 tcb_desc->b_rts_stbc = false; 402 tcb_desc->rts_stbc = false;
403 tcb_desc->b_cts_enable = false; 403 tcb_desc->cts_enable = false;
404 tcb_desc->rts_sc = 0; 404 tcb_desc->rts_sc = 0;
405 tcb_desc->b_rts_bw = false; 405 tcb_desc->rts_bw = false;
406 tcb_desc->b_rts_use_shortpreamble = false; 406 tcb_desc->rts_use_shortpreamble = false;
407 tcb_desc->b_rts_use_shortgi = false; 407 tcb_desc->rts_use_shortgi = false;
408 408
409 if (rate_flag & IEEE80211_TX_RC_USE_CTS_PROTECT) { 409 if (rate_flag & IEEE80211_TX_RC_USE_CTS_PROTECT) {
410 /* Use CTS-to-SELF in protection mode. */ 410 /* Use CTS-to-SELF in protection mode. */
411 tcb_desc->b_rts_enable = true; 411 tcb_desc->rts_enable = true;
412 tcb_desc->b_cts_enable = true; 412 tcb_desc->cts_enable = true;
413 tcb_desc->rts_rate = rtlpriv->cfg->maps[RTL_RC_OFDM_RATE24M]; 413 tcb_desc->rts_rate = rtlpriv->cfg->maps[RTL_RC_OFDM_RATE24M];
414 } else if (rate_flag & IEEE80211_TX_RC_USE_RTS_CTS) { 414 } else if (rate_flag & IEEE80211_TX_RC_USE_RTS_CTS) {
415 /* Use RTS-CTS in protection mode. */ 415 /* Use RTS-CTS in protection mode. */
416 tcb_desc->b_rts_enable = true; 416 tcb_desc->rts_enable = true;
417 tcb_desc->rts_rate = rtlpriv->cfg->maps[RTL_RC_OFDM_RATE24M]; 417 tcb_desc->rts_rate = rtlpriv->cfg->maps[RTL_RC_OFDM_RATE24M];
418 } 418 }
419 419
@@ -429,7 +429,7 @@ static void _rtl_txrate_selectmode(struct ieee80211_hw *hw,
429 if (mac->opmode == NL80211_IFTYPE_STATION) 429 if (mac->opmode == NL80211_IFTYPE_STATION)
430 tcb_desc->ratr_index = 0; 430 tcb_desc->ratr_index = 0;
431 else if (mac->opmode == NL80211_IFTYPE_ADHOC) { 431 else if (mac->opmode == NL80211_IFTYPE_ADHOC) {
432 if (tcb_desc->b_multicast || tcb_desc->b_broadcast) { 432 if (tcb_desc->multicast || tcb_desc->broadcast) {
433 tcb_desc->hw_rate = 433 tcb_desc->hw_rate =
434 rtlpriv->cfg->maps[RTL_RC_CCK_RATE2M]; 434 rtlpriv->cfg->maps[RTL_RC_CCK_RATE2M];
435 tcb_desc->use_driver_rate = 1; 435 tcb_desc->use_driver_rate = 1;
@@ -439,7 +439,7 @@ static void _rtl_txrate_selectmode(struct ieee80211_hw *hw,
439 } 439 }
440 } 440 }
441 441
442 if (rtlpriv->dm.b_useramask) { 442 if (rtlpriv->dm.useramask) {
443 /* TODO we will differentiate adhoc and station futrue */ 443 /* TODO we will differentiate adhoc and station futrue */
444 tcb_desc->mac_id = 0; 444 tcb_desc->mac_id = 0;
445 445
@@ -461,19 +461,19 @@ static void _rtl_query_bandwidth_mode(struct ieee80211_hw *hw,
461 struct rtl_priv *rtlpriv = rtl_priv(hw); 461 struct rtl_priv *rtlpriv = rtl_priv(hw);
462 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); 462 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
463 463
464 tcb_desc->b_packet_bw = false; 464 tcb_desc->packet_bw = false;
465 465
466 if (!mac->bw_40 || !mac->ht_enable) 466 if (!mac->bw_40 || !mac->ht_enable)
467 return; 467 return;
468 468
469 if (tcb_desc->b_multicast || tcb_desc->b_broadcast) 469 if (tcb_desc->multicast || tcb_desc->broadcast)
470 return; 470 return;
471 471
472 /*use legency rate, shall use 20MHz */ 472 /*use legency rate, shall use 20MHz */
473 if (tcb_desc->hw_rate <= rtlpriv->cfg->maps[RTL_RC_OFDM_RATE54M]) 473 if (tcb_desc->hw_rate <= rtlpriv->cfg->maps[RTL_RC_OFDM_RATE54M])
474 return; 474 return;
475 475
476 tcb_desc->b_packet_bw = true; 476 tcb_desc->packet_bw = true;
477} 477}
478 478
479static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw) 479static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw)
@@ -545,9 +545,9 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw,
545 } 545 }
546 546
547 if (is_multicast_ether_addr(ieee80211_get_DA(hdr))) 547 if (is_multicast_ether_addr(ieee80211_get_DA(hdr)))
548 tcb_desc->b_multicast = 1; 548 tcb_desc->multicast = 1;
549 else if (is_broadcast_ether_addr(ieee80211_get_DA(hdr))) 549 else if (is_broadcast_ether_addr(ieee80211_get_DA(hdr)))
550 tcb_desc->b_broadcast = 1; 550 tcb_desc->broadcast = 1;
551 551
552 _rtl_txrate_selectmode(hw, tcb_desc); 552 _rtl_txrate_selectmode(hw, tcb_desc);
553 _rtl_query_bandwidth_mode(hw, tcb_desc); 553 _rtl_query_bandwidth_mode(hw, tcb_desc);
@@ -777,10 +777,10 @@ void rtl_watchdog_wq_callback(void *data)
777 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); 777 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
778 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); 778 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
779 779
780 bool b_busytraffic = false; 780 bool busytraffic = false;
781 bool b_higher_busytraffic = false; 781 bool higher_busytraffic = false;
782 bool b_higher_busyrxtraffic = false; 782 bool higher_busyrxtraffic = false;
783 bool b_higher_busytxtraffic = false; 783 bool higher_busytxtraffic = false;
784 784
785 u8 idx = 0; 785 u8 idx = 0;
786 u32 rx_cnt_inp4eriod = 0; 786 u32 rx_cnt_inp4eriod = 0;
@@ -788,7 +788,7 @@ void rtl_watchdog_wq_callback(void *data)
788 u32 aver_rx_cnt_inperiod = 0; 788 u32 aver_rx_cnt_inperiod = 0;
789 u32 aver_tx_cnt_inperiod = 0; 789 u32 aver_tx_cnt_inperiod = 0;
790 790
791 bool benter_ps = false; 791 bool enter_ps = false;
792 792
793 if (is_hal_stop(rtlhal)) 793 if (is_hal_stop(rtlhal))
794 return; 794 return;
@@ -832,29 +832,29 @@ void rtl_watchdog_wq_callback(void *data)
832 832
833 /* (2) check traffic busy */ 833 /* (2) check traffic busy */
834 if (aver_rx_cnt_inperiod > 100 || aver_tx_cnt_inperiod > 100) 834 if (aver_rx_cnt_inperiod > 100 || aver_tx_cnt_inperiod > 100)
835 b_busytraffic = true; 835 busytraffic = true;
836 836
837 /* Higher Tx/Rx data. */ 837 /* Higher Tx/Rx data. */
838 if (aver_rx_cnt_inperiod > 4000 || 838 if (aver_rx_cnt_inperiod > 4000 ||
839 aver_tx_cnt_inperiod > 4000) { 839 aver_tx_cnt_inperiod > 4000) {
840 b_higher_busytraffic = true; 840 higher_busytraffic = true;
841 841
842 /* Extremely high Rx data. */ 842 /* Extremely high Rx data. */
843 if (aver_rx_cnt_inperiod > 5000) 843 if (aver_rx_cnt_inperiod > 5000)
844 b_higher_busyrxtraffic = true; 844 higher_busyrxtraffic = true;
845 else 845 else
846 b_higher_busytxtraffic = false; 846 higher_busytxtraffic = false;
847 } 847 }
848 848
849 if (((rtlpriv->link_info.num_rx_inperiod + 849 if (((rtlpriv->link_info.num_rx_inperiod +
850 rtlpriv->link_info.num_tx_inperiod) > 8) || 850 rtlpriv->link_info.num_tx_inperiod) > 8) ||
851 (rtlpriv->link_info.num_rx_inperiod > 2)) 851 (rtlpriv->link_info.num_rx_inperiod > 2))
852 benter_ps = false; 852 enter_ps = false;
853 else 853 else
854 benter_ps = true; 854 enter_ps = true;
855 855
856 /* LeisurePS only work in infra mode. */ 856 /* LeisurePS only work in infra mode. */
857 if (benter_ps) 857 if (enter_ps)
858 rtl_lps_enter(hw); 858 rtl_lps_enter(hw);
859 else 859 else
860 rtl_lps_leave(hw); 860 rtl_lps_leave(hw);
@@ -863,9 +863,9 @@ void rtl_watchdog_wq_callback(void *data)
863 rtlpriv->link_info.num_rx_inperiod = 0; 863 rtlpriv->link_info.num_rx_inperiod = 0;
864 rtlpriv->link_info.num_tx_inperiod = 0; 864 rtlpriv->link_info.num_tx_inperiod = 0;
865 865
866 rtlpriv->link_info.b_busytraffic = b_busytraffic; 866 rtlpriv->link_info.busytraffic = busytraffic;
867 rtlpriv->link_info.b_higher_busytraffic = b_higher_busytraffic; 867 rtlpriv->link_info.higher_busytraffic = higher_busytraffic;
868 rtlpriv->link_info.b_higher_busyrxtraffic = b_higher_busyrxtraffic; 868 rtlpriv->link_info.higher_busyrxtraffic = higher_busyrxtraffic;
869 869
870} 870}
871 871