diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2011-02-19 17:28:57 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-21 15:39:57 -0500 |
commit | 7ea4724036ed17ec811cb8082af7760f04484ef7 (patch) | |
tree | 7c90e84760d7d2f28814a13b21a6226960fe8e49 /drivers/net | |
parent | 0e80b9d1c51883e01603e2ff0caae608eda09fa5 (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')
-rw-r--r-- | drivers/net/wireless/rtlwifi/base.c | 60 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/core.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/ps.c | 58 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 82 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/dm.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/fw.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 101 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/led.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/phy.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | 116 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/usb.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/wifi.h | 120 |
15 files changed, 321 insertions, 321 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 | ||
479 | static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw) | 479 | 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 | } | 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 | ||
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c index 25d2d667ffba..2d1e3e833568 100644 --- a/drivers/net/wireless/rtlwifi/core.c +++ b/drivers/net/wireless/rtlwifi/core.c | |||
@@ -666,7 +666,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, | |||
666 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_BASIC_RATE, | 666 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_BASIC_RATE, |
667 | (u8 *) (&basic_rates)); | 667 | (u8 *) (&basic_rates)); |
668 | 668 | ||
669 | if (rtlpriv->dm.b_useramask) | 669 | if (rtlpriv->dm.useramask) |
670 | rtlpriv->cfg->ops->update_rate_mask(hw, 0); | 670 | rtlpriv->cfg->ops->update_rate_mask(hw, 0); |
671 | else | 671 | else |
672 | rtlpriv->cfg->ops->update_rate_table(hw); | 672 | rtlpriv->cfg->ops->update_rate_table(hw); |
@@ -681,7 +681,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, | |||
681 | */ | 681 | */ |
682 | if (changed & BSS_CHANGED_ASSOC) { | 682 | if (changed & BSS_CHANGED_ASSOC) { |
683 | if (bss_conf->assoc) { | 683 | if (bss_conf->assoc) { |
684 | if (ppsc->b_fwctrl_lps) { | 684 | if (ppsc->fwctrl_lps) { |
685 | u8 mstatus = RT_MEDIA_CONNECT; | 685 | u8 mstatus = RT_MEDIA_CONNECT; |
686 | rtlpriv->cfg->ops->set_hw_reg(hw, | 686 | rtlpriv->cfg->ops->set_hw_reg(hw, |
687 | HW_VAR_H2C_FW_JOINBSSRPT, | 687 | HW_VAR_H2C_FW_JOINBSSRPT, |
@@ -689,7 +689,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, | |||
689 | ppsc->report_linked = true; | 689 | ppsc->report_linked = true; |
690 | } | 690 | } |
691 | } else { | 691 | } else { |
692 | if (ppsc->b_fwctrl_lps) { | 692 | if (ppsc->fwctrl_lps) { |
693 | u8 mstatus = RT_MEDIA_DISCONNECT; | 693 | u8 mstatus = RT_MEDIA_DISCONNECT; |
694 | rtlpriv->cfg->ops->set_hw_reg(hw, | 694 | rtlpriv->cfg->ops->set_hw_reg(hw, |
695 | HW_VAR_H2C_FW_JOINBSSRPT, | 695 | HW_VAR_H2C_FW_JOINBSSRPT, |
@@ -818,7 +818,7 @@ static void rtl_op_sw_scan_complete(struct ieee80211_hw *hw) | |||
818 | /* fix fwlps issue */ | 818 | /* fix fwlps issue */ |
819 | rtlpriv->cfg->ops->set_network_type(hw, mac->opmode); | 819 | rtlpriv->cfg->ops->set_network_type(hw, mac->opmode); |
820 | 820 | ||
821 | if (rtlpriv->dm.b_useramask) | 821 | if (rtlpriv->dm.useramask) |
822 | rtlpriv->cfg->ops->update_rate_mask(hw, 0); | 822 | rtlpriv->cfg->ops->update_rate_mask(hw, 0); |
823 | else | 823 | else |
824 | rtlpriv->cfg->ops->update_rate_table(hw); | 824 | rtlpriv->cfg->ops->update_rate_table(hw); |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index a508ea51a1f8..2da164380771 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -50,7 +50,7 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw) | |||
50 | u8 pcibridge_vendor = pcipriv->ndis_adapter.pcibridge_vendor; | 50 | u8 pcibridge_vendor = pcipriv->ndis_adapter.pcibridge_vendor; |
51 | 51 | ||
52 | ppsc->reg_rfps_level = 0; | 52 | ppsc->reg_rfps_level = 0; |
53 | ppsc->b_support_aspm = 0; | 53 | ppsc->support_aspm = 0; |
54 | 54 | ||
55 | /*Update PCI ASPM setting */ | 55 | /*Update PCI ASPM setting */ |
56 | ppsc->const_amdpci_aspm = rtlpci->const_amdpci_aspm; | 56 | ppsc->const_amdpci_aspm = rtlpci->const_amdpci_aspm; |
@@ -115,29 +115,29 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw) | |||
115 | switch (rtlpci->const_support_pciaspm) { | 115 | switch (rtlpci->const_support_pciaspm) { |
116 | case 0:{ | 116 | case 0:{ |
117 | /*Not support ASPM. */ | 117 | /*Not support ASPM. */ |
118 | bool b_support_aspm = false; | 118 | bool support_aspm = false; |
119 | ppsc->b_support_aspm = b_support_aspm; | 119 | ppsc->support_aspm = support_aspm; |
120 | break; | 120 | break; |
121 | } | 121 | } |
122 | case 1:{ | 122 | case 1:{ |
123 | /*Support ASPM. */ | 123 | /*Support ASPM. */ |
124 | bool b_support_aspm = true; | 124 | bool support_aspm = true; |
125 | bool b_support_backdoor = true; | 125 | bool support_backdoor = true; |
126 | ppsc->b_support_aspm = b_support_aspm; | 126 | ppsc->support_aspm = support_aspm; |
127 | 127 | ||
128 | /*if(priv->oem_id == RT_CID_TOSHIBA && | 128 | /*if(priv->oem_id == RT_CID_TOSHIBA && |
129 | !priv->ndis_adapter.amd_l1_patch) | 129 | !priv->ndis_adapter.amd_l1_patch) |
130 | b_support_backdoor = false; */ | 130 | support_backdoor = false; */ |
131 | 131 | ||
132 | ppsc->b_support_backdoor = b_support_backdoor; | 132 | ppsc->support_backdoor = support_backdoor; |
133 | 133 | ||
134 | break; | 134 | break; |
135 | } | 135 | } |
136 | case 2: | 136 | case 2: |
137 | /*ASPM value set by chipset. */ | 137 | /*ASPM value set by chipset. */ |
138 | if (pcibridge_vendor == PCI_BRIDGE_VENDOR_INTEL) { | 138 | if (pcibridge_vendor == PCI_BRIDGE_VENDOR_INTEL) { |
139 | bool b_support_aspm = true; | 139 | bool support_aspm = true; |
140 | ppsc->b_support_aspm = b_support_aspm; | 140 | ppsc->support_aspm = support_aspm; |
141 | } | 141 | } |
142 | break; | 142 | break; |
143 | default: | 143 | default: |
@@ -585,7 +585,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
585 | hdr = (struct ieee80211_hdr *)(skb->data); | 585 | hdr = (struct ieee80211_hdr *)(skb->data); |
586 | fc = le16_to_cpu(hdr->frame_control); | 586 | fc = le16_to_cpu(hdr->frame_control); |
587 | 587 | ||
588 | if (!stats.b_crc) { | 588 | if (!stats.crc) { |
589 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, | 589 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, |
590 | sizeof(rx_status)); | 590 | sizeof(rx_status)); |
591 | 591 | ||
@@ -890,17 +890,17 @@ static void _rtl_pci_init_struct(struct ieee80211_hw *hw, | |||
890 | rtlhal->hw = hw; | 890 | rtlhal->hw = hw; |
891 | rtlpci->pdev = pdev; | 891 | rtlpci->pdev = pdev; |
892 | 892 | ||
893 | ppsc->b_inactiveps = false; | 893 | ppsc->inactiveps = false; |
894 | ppsc->b_leisure_ps = true; | 894 | ppsc->leisure_ps = true; |
895 | ppsc->b_fwctrl_lps = true; | 895 | ppsc->fwctrl_lps = true; |
896 | ppsc->b_reg_fwctrl_lps = 3; | 896 | ppsc->reg_fwctrl_lps = 3; |
897 | ppsc->reg_max_lps_awakeintvl = 5; | 897 | ppsc->reg_max_lps_awakeintvl = 5; |
898 | 898 | ||
899 | if (ppsc->b_reg_fwctrl_lps == 1) | 899 | if (ppsc->reg_fwctrl_lps == 1) |
900 | ppsc->fwctrl_psmode = FW_PS_MIN_MODE; | 900 | ppsc->fwctrl_psmode = FW_PS_MIN_MODE; |
901 | else if (ppsc->b_reg_fwctrl_lps == 2) | 901 | else if (ppsc->reg_fwctrl_lps == 2) |
902 | ppsc->fwctrl_psmode = FW_PS_MAX_MODE; | 902 | ppsc->fwctrl_psmode = FW_PS_MAX_MODE; |
903 | else if (ppsc->b_reg_fwctrl_lps == 3) | 903 | else if (ppsc->reg_fwctrl_lps == 3) |
904 | ppsc->fwctrl_psmode = FW_PS_DTIM_MODE; | 904 | ppsc->fwctrl_psmode = FW_PS_DTIM_MODE; |
905 | 905 | ||
906 | /*Tx/Rx related var */ | 906 | /*Tx/Rx related var */ |
diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c index d2326c13449e..6b7e217b6b89 100644 --- a/drivers/net/wireless/rtlwifi/ps.c +++ b/drivers/net/wireless/rtlwifi/ps.c | |||
@@ -86,7 +86,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw, | |||
86 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 86 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
87 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 87 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
88 | enum rf_pwrstate rtstate; | 88 | enum rf_pwrstate rtstate; |
89 | bool b_actionallowed = false; | 89 | bool actionallowed = false; |
90 | u16 rfwait_cnt = 0; | 90 | u16 rfwait_cnt = 0; |
91 | unsigned long flag; | 91 | unsigned long flag; |
92 | 92 | ||
@@ -139,13 +139,13 @@ no_protect: | |||
139 | ppsc->rfoff_reason &= (~changesource); | 139 | ppsc->rfoff_reason &= (~changesource); |
140 | 140 | ||
141 | if ((changesource == RF_CHANGE_BY_HW) && | 141 | if ((changesource == RF_CHANGE_BY_HW) && |
142 | (ppsc->b_hwradiooff == true)) { | 142 | (ppsc->hwradiooff == true)) { |
143 | ppsc->b_hwradiooff = false; | 143 | ppsc->hwradiooff = false; |
144 | } | 144 | } |
145 | 145 | ||
146 | if (!ppsc->rfoff_reason) { | 146 | if (!ppsc->rfoff_reason) { |
147 | ppsc->rfoff_reason = 0; | 147 | ppsc->rfoff_reason = 0; |
148 | b_actionallowed = true; | 148 | actionallowed = true; |
149 | } | 149 | } |
150 | 150 | ||
151 | break; | 151 | break; |
@@ -153,17 +153,17 @@ no_protect: | |||
153 | case ERFOFF: | 153 | case ERFOFF: |
154 | 154 | ||
155 | if ((changesource == RF_CHANGE_BY_HW) | 155 | if ((changesource == RF_CHANGE_BY_HW) |
156 | && (ppsc->b_hwradiooff == false)) { | 156 | && (ppsc->hwradiooff == false)) { |
157 | ppsc->b_hwradiooff = true; | 157 | ppsc->hwradiooff = true; |
158 | } | 158 | } |
159 | 159 | ||
160 | ppsc->rfoff_reason |= changesource; | 160 | ppsc->rfoff_reason |= changesource; |
161 | b_actionallowed = true; | 161 | actionallowed = true; |
162 | break; | 162 | break; |
163 | 163 | ||
164 | case ERFSLEEP: | 164 | case ERFSLEEP: |
165 | ppsc->rfoff_reason |= changesource; | 165 | ppsc->rfoff_reason |= changesource; |
166 | b_actionallowed = true; | 166 | actionallowed = true; |
167 | break; | 167 | break; |
168 | 168 | ||
169 | default: | 169 | default: |
@@ -172,7 +172,7 @@ no_protect: | |||
172 | break; | 172 | break; |
173 | } | 173 | } |
174 | 174 | ||
175 | if (b_actionallowed) | 175 | if (actionallowed) |
176 | rtlpriv->cfg->ops->set_rf_power_state(hw, state_toset); | 176 | rtlpriv->cfg->ops->set_rf_power_state(hw, state_toset); |
177 | 177 | ||
178 | if (!protect_or_not) { | 178 | if (!protect_or_not) { |
@@ -181,7 +181,7 @@ no_protect: | |||
181 | spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flag); | 181 | spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flag); |
182 | } | 182 | } |
183 | 183 | ||
184 | return b_actionallowed; | 184 | return actionallowed; |
185 | } | 185 | } |
186 | EXPORT_SYMBOL(rtl_ps_set_rf_state); | 186 | EXPORT_SYMBOL(rtl_ps_set_rf_state); |
187 | 187 | ||
@@ -191,7 +191,7 @@ static void _rtl_ps_inactive_ps(struct ieee80211_hw *hw) | |||
191 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); | 191 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); |
192 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 192 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
193 | 193 | ||
194 | ppsc->b_swrf_processing = true; | 194 | ppsc->swrf_processing = true; |
195 | 195 | ||
196 | if (ppsc->inactive_pwrstate == ERFON && rtlhal->interface == INTF_PCI) { | 196 | if (ppsc->inactive_pwrstate == ERFON && rtlhal->interface == INTF_PCI) { |
197 | if ((ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM) && | 197 | 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 | } | 213 | } |
214 | } | 214 | } |
215 | 215 | ||
216 | ppsc->b_swrf_processing = false; | 216 | ppsc->swrf_processing = false; |
217 | } | 217 | } |
218 | 218 | ||
219 | void rtl_ips_nic_off_wq_callback(void *data) | 219 | void rtl_ips_nic_off_wq_callback(void *data) |
@@ -239,13 +239,13 @@ void rtl_ips_nic_off_wq_callback(void *data) | |||
239 | if (rtlpriv->sec.being_setkey) | 239 | if (rtlpriv->sec.being_setkey) |
240 | return; | 240 | return; |
241 | 241 | ||
242 | if (ppsc->b_inactiveps) { | 242 | if (ppsc->inactiveps) { |
243 | rtstate = ppsc->rfpwr_state; | 243 | rtstate = ppsc->rfpwr_state; |
244 | 244 | ||
245 | /* | 245 | /* |
246 | *Do not enter IPS in the following conditions: | 246 | *Do not enter IPS in the following conditions: |
247 | *(1) RF is already OFF or Sleep | 247 | *(1) RF is already OFF or Sleep |
248 | *(2) b_swrf_processing (indicates the IPS is still under going) | 248 | *(2) swrf_processing (indicates the IPS is still under going) |
249 | *(3) Connectted (only disconnected can trigger IPS) | 249 | *(3) Connectted (only disconnected can trigger IPS) |
250 | *(4) IBSS (send Beacon) | 250 | *(4) IBSS (send Beacon) |
251 | *(5) AP mode (send Beacon) | 251 | *(5) AP mode (send Beacon) |
@@ -253,14 +253,14 @@ void rtl_ips_nic_off_wq_callback(void *data) | |||
253 | */ | 253 | */ |
254 | 254 | ||
255 | if (rtstate == ERFON && | 255 | if (rtstate == ERFON && |
256 | !ppsc->b_swrf_processing && | 256 | !ppsc->swrf_processing && |
257 | (mac->link_state == MAC80211_NOLINK) && | 257 | (mac->link_state == MAC80211_NOLINK) && |
258 | !mac->act_scanning) { | 258 | !mac->act_scanning) { |
259 | RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, | 259 | RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, |
260 | ("IPSEnter(): Turn off RF.\n")); | 260 | ("IPSEnter(): Turn off RF.\n")); |
261 | 261 | ||
262 | ppsc->inactive_pwrstate = ERFOFF; | 262 | ppsc->inactive_pwrstate = ERFOFF; |
263 | ppsc->b_in_powersavemode = true; | 263 | ppsc->in_powersavemode = true; |
264 | 264 | ||
265 | /*rtl_pci_reset_trx_ring(hw); */ | 265 | /*rtl_pci_reset_trx_ring(hw); */ |
266 | _rtl_ps_inactive_ps(hw); | 266 | _rtl_ps_inactive_ps(hw); |
@@ -290,15 +290,15 @@ void rtl_ips_nic_on(struct ieee80211_hw *hw) | |||
290 | 290 | ||
291 | spin_lock_irqsave(&rtlpriv->locks.ips_lock, flags); | 291 | spin_lock_irqsave(&rtlpriv->locks.ips_lock, flags); |
292 | 292 | ||
293 | if (ppsc->b_inactiveps) { | 293 | if (ppsc->inactiveps) { |
294 | rtstate = ppsc->rfpwr_state; | 294 | rtstate = ppsc->rfpwr_state; |
295 | 295 | ||
296 | if (rtstate != ERFON && | 296 | if (rtstate != ERFON && |
297 | !ppsc->b_swrf_processing && | 297 | !ppsc->swrf_processing && |
298 | ppsc->rfoff_reason <= RF_CHANGE_BY_IPS) { | 298 | ppsc->rfoff_reason <= RF_CHANGE_BY_IPS) { |
299 | 299 | ||
300 | ppsc->inactive_pwrstate = ERFON; | 300 | ppsc->inactive_pwrstate = ERFON; |
301 | ppsc->b_in_powersavemode = false; | 301 | ppsc->in_powersavemode = false; |
302 | 302 | ||
303 | _rtl_ps_inactive_ps(hw); | 303 | _rtl_ps_inactive_ps(hw); |
304 | } | 304 | } |
@@ -370,9 +370,9 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) | |||
370 | * mode and set RPWM to turn RF on. | 370 | * mode and set RPWM to turn RF on. |
371 | */ | 371 | */ |
372 | 372 | ||
373 | if ((ppsc->b_fwctrl_lps) && (ppsc->b_leisure_ps) && | 373 | if ((ppsc->fwctrl_lps) && (ppsc->leisure_ps) && |
374 | ppsc->report_linked) { | 374 | ppsc->report_linked) { |
375 | bool b_fw_current_inps; | 375 | bool fw_current_inps; |
376 | if (ppsc->dot11_psmode == EACTIVE) { | 376 | if (ppsc->dot11_psmode == EACTIVE) { |
377 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, | 377 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, |
378 | ("FW LPS leave ps_mode:%x\n", | 378 | ("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 | rtlpriv->cfg->ops->set_hw_reg(hw, | 385 | rtlpriv->cfg->ops->set_hw_reg(hw, |
386 | HW_VAR_H2C_FW_PWRMODE, | 386 | HW_VAR_H2C_FW_PWRMODE, |
387 | (u8 *) (&fw_pwrmode)); | 387 | (u8 *) (&fw_pwrmode)); |
388 | b_fw_current_inps = false; | 388 | fw_current_inps = false; |
389 | 389 | ||
390 | rtlpriv->cfg->ops->set_hw_reg(hw, | 390 | rtlpriv->cfg->ops->set_hw_reg(hw, |
391 | HW_VAR_FW_PSMODE_STATUS, | 391 | HW_VAR_FW_PSMODE_STATUS, |
392 | (u8 *) (&b_fw_current_inps)); | 392 | (u8 *) (&fw_current_inps)); |
393 | 393 | ||
394 | } else { | 394 | } else { |
395 | if (rtl_get_fwlps_doze(hw)) { | 395 | if (rtl_get_fwlps_doze(hw)) { |
@@ -398,10 +398,10 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) | |||
398 | ppsc->fwctrl_psmode)); | 398 | ppsc->fwctrl_psmode)); |
399 | 399 | ||
400 | rpwm_val = 0x02; /* RF off */ | 400 | rpwm_val = 0x02; /* RF off */ |
401 | b_fw_current_inps = true; | 401 | fw_current_inps = true; |
402 | rtlpriv->cfg->ops->set_hw_reg(hw, | 402 | rtlpriv->cfg->ops->set_hw_reg(hw, |
403 | HW_VAR_FW_PSMODE_STATUS, | 403 | HW_VAR_FW_PSMODE_STATUS, |
404 | (u8 *) (&b_fw_current_inps)); | 404 | (u8 *) (&fw_current_inps)); |
405 | rtlpriv->cfg->ops->set_hw_reg(hw, | 405 | rtlpriv->cfg->ops->set_hw_reg(hw, |
406 | HW_VAR_H2C_FW_PWRMODE, | 406 | HW_VAR_H2C_FW_PWRMODE, |
407 | (u8 *) (&ppsc->fwctrl_psmode)); | 407 | (u8 *) (&ppsc->fwctrl_psmode)); |
@@ -425,13 +425,13 @@ void rtl_lps_enter(struct ieee80211_hw *hw) | |||
425 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 425 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
426 | unsigned long flag; | 426 | unsigned long flag; |
427 | 427 | ||
428 | if (!(ppsc->b_fwctrl_lps && ppsc->b_leisure_ps)) | 428 | if (!(ppsc->fwctrl_lps && ppsc->leisure_ps)) |
429 | return; | 429 | return; |
430 | 430 | ||
431 | if (rtlpriv->sec.being_setkey) | 431 | if (rtlpriv->sec.being_setkey) |
432 | return; | 432 | return; |
433 | 433 | ||
434 | if (rtlpriv->link_info.b_busytraffic) | 434 | if (rtlpriv->link_info.busytraffic) |
435 | return; | 435 | return; |
436 | 436 | ||
437 | /*sleep after linked 10s, to let DHCP and 4-way handshake ok enough!! */ | 437 | /*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 | 446 | ||
447 | spin_lock_irqsave(&rtlpriv->locks.lps_lock, flag); | 447 | spin_lock_irqsave(&rtlpriv->locks.lps_lock, flag); |
448 | 448 | ||
449 | if (ppsc->b_leisure_ps) { | 449 | if (ppsc->leisure_ps) { |
450 | /* Idle for a while if we connect to AP a while ago. */ | 450 | /* Idle for a while if we connect to AP a while ago. */ |
451 | if (mac->cnt_after_linked >= 2) { | 451 | if (mac->cnt_after_linked >= 2) { |
452 | if (ppsc->dot11_psmode == EACTIVE) { | 452 | if (ppsc->dot11_psmode == EACTIVE) { |
@@ -470,7 +470,7 @@ void rtl_lps_leave(struct ieee80211_hw *hw) | |||
470 | 470 | ||
471 | spin_lock_irqsave(&rtlpriv->locks.lps_lock, flag); | 471 | spin_lock_irqsave(&rtlpriv->locks.lps_lock, flag); |
472 | 472 | ||
473 | if (ppsc->b_fwctrl_lps && ppsc->b_leisure_ps) { | 473 | if (ppsc->fwctrl_lps && ppsc->leisure_ps) { |
474 | if (ppsc->dot11_psmode != EACTIVE) { | 474 | if (ppsc->dot11_psmode != EACTIVE) { |
475 | 475 | ||
476 | /*FIX ME */ | 476 | /*FIX ME */ |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c index b08b7802f04f..b4f1e4e6b733 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | |||
@@ -306,13 +306,13 @@ static void rtl92c_dm_initial_gain_multi_sta(struct ieee80211_hw *hw) | |||
306 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 306 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
307 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); | 307 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); |
308 | long rssi_strength = rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb; | 308 | long rssi_strength = rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb; |
309 | bool b_multi_sta = false; | 309 | bool multi_sta = false; |
310 | 310 | ||
311 | if (mac->opmode == NL80211_IFTYPE_ADHOC) | 311 | if (mac->opmode == NL80211_IFTYPE_ADHOC) |
312 | b_multi_sta = true; | 312 | multi_sta = true; |
313 | 313 | ||
314 | if ((b_multi_sta == false) || (dm_digtable.cursta_connectctate != | 314 | if ((multi_sta == false) || (dm_digtable.cursta_connectctate != |
315 | DIG_STA_DISCONNECT)) { | 315 | DIG_STA_DISCONNECT)) { |
316 | binitialized = false; | 316 | binitialized = false; |
317 | dm_digtable.dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; | 317 | dm_digtable.dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; |
318 | return; | 318 | return; |
@@ -479,7 +479,7 @@ static void rtl92c_dm_dig(struct ieee80211_hw *hw) | |||
479 | { | 479 | { |
480 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 480 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
481 | 481 | ||
482 | if (rtlpriv->dm.b_dm_initialgain_enable == false) | 482 | if (rtlpriv->dm.dm_initialgain_enable == false) |
483 | return; | 483 | return; |
484 | if (dm_digtable.dig_enable_flag == false) | 484 | if (dm_digtable.dig_enable_flag == false) |
485 | return; | 485 | return; |
@@ -492,7 +492,7 @@ static void rtl92c_dm_init_dynamic_txpower(struct ieee80211_hw *hw) | |||
492 | { | 492 | { |
493 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 493 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
494 | 494 | ||
495 | rtlpriv->dm.bdynamic_txpower_enable = false; | 495 | rtlpriv->dm.dynamic_txpower_enable = false; |
496 | 496 | ||
497 | rtlpriv->dm.last_dtp_lvl = TXHIGHPWRLEVEL_NORMAL; | 497 | rtlpriv->dm.last_dtp_lvl = TXHIGHPWRLEVEL_NORMAL; |
498 | rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; | 498 | rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; |
@@ -550,9 +550,9 @@ static void rtl92c_dm_pwdb_monitor(struct ieee80211_hw *hw) | |||
550 | void rtl92c_dm_init_edca_turbo(struct ieee80211_hw *hw) | 550 | void rtl92c_dm_init_edca_turbo(struct ieee80211_hw *hw) |
551 | { | 551 | { |
552 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 552 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
553 | rtlpriv->dm.bcurrent_turbo_edca = false; | 553 | rtlpriv->dm.current_turbo_edca = false; |
554 | rtlpriv->dm.bis_any_nonbepkts = false; | 554 | rtlpriv->dm.is_any_nonbepkts = false; |
555 | rtlpriv->dm.bis_cur_rdlstate = false; | 555 | rtlpriv->dm.is_cur_rdlstate = false; |
556 | } | 556 | } |
557 | 557 | ||
558 | static void rtl92c_dm_check_edca_turbo(struct ieee80211_hw *hw) | 558 | 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 | goto dm_checkedcaturbo_exit; | 570 | goto dm_checkedcaturbo_exit; |
571 | 571 | ||
572 | if (mac->link_state != MAC80211_LINKED) { | 572 | if (mac->link_state != MAC80211_LINKED) { |
573 | rtlpriv->dm.bcurrent_turbo_edca = false; | 573 | rtlpriv->dm.current_turbo_edca = false; |
574 | return; | 574 | return; |
575 | } | 575 | } |
576 | 576 | ||
@@ -582,40 +582,40 @@ static void rtl92c_dm_check_edca_turbo(struct ieee80211_hw *hw) | |||
582 | edca_be_dl |= 0x005e0000; | 582 | edca_be_dl |= 0x005e0000; |
583 | } | 583 | } |
584 | 584 | ||
585 | if ((!rtlpriv->dm.bis_any_nonbepkts) && | 585 | if ((!rtlpriv->dm.is_any_nonbepkts) && |
586 | (!rtlpriv->dm.b_disable_framebursting)) { | 586 | (!rtlpriv->dm.disable_framebursting)) { |
587 | cur_txok_cnt = rtlpriv->stats.txbytesunicast - last_txok_cnt; | 587 | cur_txok_cnt = rtlpriv->stats.txbytesunicast - last_txok_cnt; |
588 | cur_rxok_cnt = rtlpriv->stats.rxbytesunicast - last_rxok_cnt; | 588 | cur_rxok_cnt = rtlpriv->stats.rxbytesunicast - last_rxok_cnt; |
589 | if (cur_rxok_cnt > 4 * cur_txok_cnt) { | 589 | if (cur_rxok_cnt > 4 * cur_txok_cnt) { |
590 | if (!rtlpriv->dm.bis_cur_rdlstate || | 590 | if (!rtlpriv->dm.is_cur_rdlstate || |
591 | !rtlpriv->dm.bcurrent_turbo_edca) { | 591 | !rtlpriv->dm.current_turbo_edca) { |
592 | rtl_write_dword(rtlpriv, | 592 | rtl_write_dword(rtlpriv, |
593 | REG_EDCA_BE_PARAM, | 593 | REG_EDCA_BE_PARAM, |
594 | edca_be_dl); | 594 | edca_be_dl); |
595 | rtlpriv->dm.bis_cur_rdlstate = true; | 595 | rtlpriv->dm.is_cur_rdlstate = true; |
596 | } | 596 | } |
597 | } else { | 597 | } else { |
598 | if (rtlpriv->dm.bis_cur_rdlstate || | 598 | if (rtlpriv->dm.is_cur_rdlstate || |
599 | !rtlpriv->dm.bcurrent_turbo_edca) { | 599 | !rtlpriv->dm.current_turbo_edca) { |
600 | rtl_write_dword(rtlpriv, | 600 | rtl_write_dword(rtlpriv, |
601 | REG_EDCA_BE_PARAM, | 601 | REG_EDCA_BE_PARAM, |
602 | edca_be_ul); | 602 | edca_be_ul); |
603 | rtlpriv->dm.bis_cur_rdlstate = false; | 603 | rtlpriv->dm.is_cur_rdlstate = false; |
604 | } | 604 | } |
605 | } | 605 | } |
606 | rtlpriv->dm.bcurrent_turbo_edca = true; | 606 | rtlpriv->dm.current_turbo_edca = true; |
607 | } else { | 607 | } else { |
608 | if (rtlpriv->dm.bcurrent_turbo_edca) { | 608 | if (rtlpriv->dm.current_turbo_edca) { |
609 | u8 tmp = AC0_BE; | 609 | u8 tmp = AC0_BE; |
610 | rtlpriv->cfg->ops->set_hw_reg(hw, | 610 | rtlpriv->cfg->ops->set_hw_reg(hw, |
611 | HW_VAR_AC_PARAM, | 611 | HW_VAR_AC_PARAM, |
612 | (u8 *) (&tmp)); | 612 | (u8 *) (&tmp)); |
613 | rtlpriv->dm.bcurrent_turbo_edca = false; | 613 | rtlpriv->dm.current_turbo_edca = false; |
614 | } | 614 | } |
615 | } | 615 | } |
616 | 616 | ||
617 | dm_checkedcaturbo_exit: | 617 | dm_checkedcaturbo_exit: |
618 | rtlpriv->dm.bis_any_nonbepkts = false; | 618 | rtlpriv->dm.is_any_nonbepkts = false; |
619 | last_txok_cnt = rtlpriv->stats.txbytesunicast; | 619 | last_txok_cnt = rtlpriv->stats.txbytesunicast; |
620 | last_rxok_cnt = rtlpriv->stats.rxbytesunicast; | 620 | last_rxok_cnt = rtlpriv->stats.rxbytesunicast; |
621 | } | 621 | } |
@@ -636,7 +636,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw | |||
636 | u8 txpwr_level[2] = {0, 0}; | 636 | u8 txpwr_level[2] = {0, 0}; |
637 | u8 ofdm_min_index = 6, rf; | 637 | u8 ofdm_min_index = 6, rf; |
638 | 638 | ||
639 | rtlpriv->dm.btxpower_trackingInit = true; | 639 | rtlpriv->dm.txpower_trackingInit = true; |
640 | RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, | 640 | RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, |
641 | ("rtl92c_dm_txpower_tracking_callback_thermalmeter\n")); | 641 | ("rtl92c_dm_txpower_tracking_callback_thermalmeter\n")); |
642 | 642 | ||
@@ -696,7 +696,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw | |||
696 | rtl_get_bbreg(hw, RCCK0_TXFILTER2, MASKDWORD) & MASKCCK; | 696 | rtl_get_bbreg(hw, RCCK0_TXFILTER2, MASKDWORD) & MASKCCK; |
697 | 697 | ||
698 | for (i = 0; i < CCK_TABLE_LENGTH; i++) { | 698 | for (i = 0; i < CCK_TABLE_LENGTH; i++) { |
699 | if (rtlpriv->dm.b_cck_inch14) { | 699 | if (rtlpriv->dm.cck_inch14) { |
700 | if (memcmp((void *)&temp_cck, | 700 | if (memcmp((void *)&temp_cck, |
701 | (void *)&cckswing_table_ch14[i][2], | 701 | (void *)&cckswing_table_ch14[i][2], |
702 | 4) == 0) { | 702 | 4) == 0) { |
@@ -708,7 +708,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw | |||
708 | "cck_index=0x%x, ch 14 %d\n", | 708 | "cck_index=0x%x, ch 14 %d\n", |
709 | RCCK0_TXFILTER2, temp_cck, | 709 | RCCK0_TXFILTER2, temp_cck, |
710 | cck_index_old, | 710 | cck_index_old, |
711 | rtlpriv->dm.b_cck_inch14)); | 711 | rtlpriv->dm.cck_inch14)); |
712 | break; | 712 | break; |
713 | } | 713 | } |
714 | } else { | 714 | } else { |
@@ -724,7 +724,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw | |||
724 | "cck_index=0x%x, ch14 %d\n", | 724 | "cck_index=0x%x, ch14 %d\n", |
725 | RCCK0_TXFILTER2, temp_cck, | 725 | RCCK0_TXFILTER2, temp_cck, |
726 | cck_index_old, | 726 | cck_index_old, |
727 | rtlpriv->dm.b_cck_inch14)); | 727 | rtlpriv->dm.cck_inch14)); |
728 | break; | 728 | break; |
729 | } | 729 | } |
730 | } | 730 | } |
@@ -937,7 +937,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw | |||
937 | BIT(31) | BIT(29), 0x00); | 937 | BIT(31) | BIT(29), 0x00); |
938 | } | 938 | } |
939 | 939 | ||
940 | if (!rtlpriv->dm.b_cck_inch14) { | 940 | if (!rtlpriv->dm.cck_inch14) { |
941 | rtl_write_byte(rtlpriv, 0xa22, | 941 | rtl_write_byte(rtlpriv, 0xa22, |
942 | cckswing_table_ch1ch13[cck_index] | 942 | cckswing_table_ch1ch13[cck_index] |
943 | [0]); | 943 | [0]); |
@@ -1057,12 +1057,12 @@ static void rtl92c_dm_initialize_txpower_tracking_thermalmeter( | |||
1057 | { | 1057 | { |
1058 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 1058 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
1059 | 1059 | ||
1060 | rtlpriv->dm.btxpower_tracking = true; | 1060 | rtlpriv->dm.txpower_tracking = true; |
1061 | rtlpriv->dm.btxpower_trackingInit = false; | 1061 | rtlpriv->dm.txpower_trackingInit = false; |
1062 | 1062 | ||
1063 | RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, | 1063 | RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, |
1064 | ("pMgntInfo->btxpower_tracking = %d\n", | 1064 | ("pMgntInfo->txpower_tracking = %d\n", |
1065 | rtlpriv->dm.btxpower_tracking)); | 1065 | rtlpriv->dm.txpower_tracking)); |
1066 | } | 1066 | } |
1067 | 1067 | ||
1068 | static void rtl92c_dm_initialize_txpower_tracking(struct ieee80211_hw *hw) | 1068 | 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 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 1081 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
1082 | static u8 tm_trigger; | 1082 | static u8 tm_trigger; |
1083 | 1083 | ||
1084 | if (!rtlpriv->dm.btxpower_tracking) | 1084 | if (!rtlpriv->dm.txpower_tracking) |
1085 | return; | 1085 | return; |
1086 | 1086 | ||
1087 | if (!tm_trigger) { | 1087 | if (!tm_trigger) { |
@@ -1113,9 +1113,9 @@ void rtl92c_dm_init_rate_adaptive_mask(struct ieee80211_hw *hw) | |||
1113 | p_ra->pre_ratr_state = DM_RATR_STA_INIT; | 1113 | p_ra->pre_ratr_state = DM_RATR_STA_INIT; |
1114 | 1114 | ||
1115 | if (rtlpriv->dm.dm_type == DM_TYPE_BYDRIVER) | 1115 | if (rtlpriv->dm.dm_type == DM_TYPE_BYDRIVER) |
1116 | rtlpriv->dm.b_useramask = true; | 1116 | rtlpriv->dm.useramask = true; |
1117 | else | 1117 | else |
1118 | rtlpriv->dm.b_useramask = false; | 1118 | rtlpriv->dm.useramask = false; |
1119 | 1119 | ||
1120 | } | 1120 | } |
1121 | 1121 | ||
@@ -1133,7 +1133,7 @@ static void rtl92c_dm_refresh_rate_adaptive_mask(struct ieee80211_hw *hw) | |||
1133 | return; | 1133 | return; |
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | if (!rtlpriv->dm.b_useramask) { | 1136 | if (!rtlpriv->dm.useramask) { |
1137 | RT_TRACE(rtlpriv, COMP_RATE, DBG_LOUD, | 1137 | RT_TRACE(rtlpriv, COMP_RATE, DBG_LOUD, |
1138 | ("<---- driver does not control rate adaptive mask\n")); | 1138 | ("<---- driver does not control rate adaptive mask\n")); |
1139 | return; | 1139 | return; |
@@ -1365,16 +1365,16 @@ void rtl92c_dm_watchdog(struct ieee80211_hw *hw) | |||
1365 | { | 1365 | { |
1366 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 1366 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
1367 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 1367 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
1368 | bool b_fw_current_inpsmode = false; | 1368 | bool fw_current_inpsmode = false; |
1369 | bool b_fw_ps_awake = true; | 1369 | bool fw_ps_awake = true; |
1370 | 1370 | ||
1371 | rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_FW_PSMODE_STATUS, | 1371 | rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_FW_PSMODE_STATUS, |
1372 | (u8 *) (&b_fw_current_inpsmode)); | 1372 | (u8 *) (&fw_current_inpsmode)); |
1373 | rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_FWLPS_RF_ON, | 1373 | rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_FWLPS_RF_ON, |
1374 | (u8 *) (&b_fw_ps_awake)); | 1374 | (u8 *) (&fw_ps_awake)); |
1375 | 1375 | ||
1376 | if ((ppsc->rfpwr_state == ERFON) && ((!b_fw_current_inpsmode) && | 1376 | if ((ppsc->rfpwr_state == ERFON) && ((!fw_current_inpsmode) && |
1377 | b_fw_ps_awake) | 1377 | fw_ps_awake) |
1378 | && (!ppsc->rfchange_inprogress)) { | 1378 | && (!ppsc->rfchange_inprogress)) { |
1379 | rtl92c_dm_pwdb_monitor(hw); | 1379 | rtl92c_dm_pwdb_monitor(hw); |
1380 | rtl92c_dm_dig(hw); | 1380 | rtl92c_dm_dig(hw); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/dm.c b/drivers/net/wireless/rtlwifi/rtl8192ce/dm.c index ddf0a41a7a81..888df5e2d2fc 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/dm.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/dm.c | |||
@@ -44,7 +44,7 @@ void rtl92c_dm_dynamic_txpower(struct ieee80211_hw *hw) | |||
44 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); | 44 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); |
45 | long undecorated_smoothed_pwdb; | 45 | long undecorated_smoothed_pwdb; |
46 | 46 | ||
47 | if (!rtlpriv->dm.bdynamic_txpower_enable) | 47 | if (!rtlpriv->dm.dynamic_txpower_enable) |
48 | return; | 48 | return; |
49 | 49 | ||
50 | if (rtlpriv->dm.dm_flag & HAL_DM_HIPWR_DISABLE) { | 50 | if (rtlpriv->dm.dm_flag & HAL_DM_HIPWR_DISABLE) { |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/fw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/fw.c index b0776a34b817..11c8bdb4af59 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/fw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/fw.c | |||
@@ -316,12 +316,12 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, | |||
316 | 316 | ||
317 | while (true) { | 317 | while (true) { |
318 | spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); | 318 | spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); |
319 | if (rtlhal->b_h2c_setinprogress) { | 319 | if (rtlhal->h2c_setinprogress) { |
320 | RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, | 320 | RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, |
321 | ("H2C set in progress! Wait to set.." | 321 | ("H2C set in progress! Wait to set.." |
322 | "element_id(%d).\n", element_id)); | 322 | "element_id(%d).\n", element_id)); |
323 | 323 | ||
324 | while (rtlhal->b_h2c_setinprogress) { | 324 | while (rtlhal->h2c_setinprogress) { |
325 | spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, | 325 | spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, |
326 | flag); | 326 | flag); |
327 | h2c_waitcounter++; | 327 | h2c_waitcounter++; |
@@ -337,7 +337,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, | |||
337 | } | 337 | } |
338 | spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); | 338 | spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); |
339 | } else { | 339 | } else { |
340 | rtlhal->b_h2c_setinprogress = true; | 340 | rtlhal->h2c_setinprogress = true; |
341 | spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); | 341 | spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); |
342 | break; | 342 | break; |
343 | } | 343 | } |
@@ -493,7 +493,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, | |||
493 | } | 493 | } |
494 | 494 | ||
495 | spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); | 495 | spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); |
496 | rtlhal->b_h2c_setinprogress = false; | 496 | rtlhal->h2c_setinprogress = false; |
497 | spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); | 497 | spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); |
498 | 498 | ||
499 | RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, ("go out\n")); | 499 | RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, ("go out\n")); |
@@ -505,7 +505,7 @@ void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw, | |||
505 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); | 505 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); |
506 | u32 tmp_cmdbuf[2]; | 506 | u32 tmp_cmdbuf[2]; |
507 | 507 | ||
508 | if (rtlhal->bfw_ready == false) { | 508 | if (rtlhal->fw_ready == false) { |
509 | RT_ASSERT(false, ("return H2C cmd because of Fw " | 509 | RT_ASSERT(false, ("return H2C cmd because of Fw " |
510 | "download fail!!!\n")); | 510 | "download fail!!!\n")); |
511 | return; | 511 | return; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c index 0e280995aace..7a1bfa92375f 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | |||
@@ -124,7 +124,7 @@ void rtl92ce_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
124 | break; | 124 | break; |
125 | } | 125 | } |
126 | case HW_VAR_FW_PSMODE_STATUS: | 126 | case HW_VAR_FW_PSMODE_STATUS: |
127 | *((bool *) (val)) = ppsc->b_fw_current_inpsmode; | 127 | *((bool *) (val)) = ppsc->fw_current_inpsmode; |
128 | break; | 128 | break; |
129 | case HW_VAR_CORRECT_TSF:{ | 129 | case HW_VAR_CORRECT_TSF:{ |
130 | u64 tsf; | 130 | u64 tsf; |
@@ -173,15 +173,15 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
173 | break; | 173 | break; |
174 | } | 174 | } |
175 | case HW_VAR_BASIC_RATE:{ | 175 | case HW_VAR_BASIC_RATE:{ |
176 | u16 b_rate_cfg = ((u16 *) val)[0]; | 176 | u16 rate_cfg = ((u16 *) val)[0]; |
177 | u8 rate_index = 0; | 177 | u8 rate_index = 0; |
178 | b_rate_cfg = b_rate_cfg & 0x15f; | 178 | rate_cfg &= 0x15f; |
179 | b_rate_cfg |= 0x01; | 179 | rate_cfg |= 0x01; |
180 | rtl_write_byte(rtlpriv, REG_RRSR, b_rate_cfg & 0xff); | 180 | rtl_write_byte(rtlpriv, REG_RRSR, rate_cfg & 0xff); |
181 | rtl_write_byte(rtlpriv, REG_RRSR + 1, | 181 | rtl_write_byte(rtlpriv, REG_RRSR + 1, |
182 | (b_rate_cfg >> 8)&0xff); | 182 | (rate_cfg >> 8)&0xff); |
183 | while (b_rate_cfg > 0x1) { | 183 | while (rate_cfg > 0x1) { |
184 | b_rate_cfg = (b_rate_cfg >> 1); | 184 | rate_cfg = (rate_cfg >> 1); |
185 | rate_index++; | 185 | rate_index++; |
186 | } | 186 | } |
187 | rtl_write_byte(rtlpriv, REG_INIRTS_RATE_SEL, | 187 | rtl_write_byte(rtlpriv, REG_INIRTS_RATE_SEL, |
@@ -469,12 +469,12 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
469 | break; | 469 | break; |
470 | } | 470 | } |
471 | case HW_VAR_FW_PSMODE_STATUS: | 471 | case HW_VAR_FW_PSMODE_STATUS: |
472 | ppsc->b_fw_current_inpsmode = *((bool *) val); | 472 | ppsc->fw_current_inpsmode = *((bool *) val); |
473 | break; | 473 | break; |
474 | case HW_VAR_H2C_FW_JOINBSSRPT:{ | 474 | case HW_VAR_H2C_FW_JOINBSSRPT:{ |
475 | u8 mstatus = (*(u8 *) val); | 475 | u8 mstatus = (*(u8 *) val); |
476 | u8 tmp_regcr, tmp_reg422; | 476 | u8 tmp_regcr, tmp_reg422; |
477 | bool b_recover = false; | 477 | bool recover = false; |
478 | 478 | ||
479 | if (mstatus == RT_MEDIA_CONNECT) { | 479 | if (mstatus == RT_MEDIA_CONNECT) { |
480 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_AID, | 480 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_AID, |
@@ -491,7 +491,7 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
491 | rtl_read_byte(rtlpriv, | 491 | rtl_read_byte(rtlpriv, |
492 | REG_FWHW_TXQ_CTRL + 2); | 492 | REG_FWHW_TXQ_CTRL + 2); |
493 | if (tmp_reg422 & BIT(6)) | 493 | if (tmp_reg422 & BIT(6)) |
494 | b_recover = true; | 494 | recover = true; |
495 | rtl_write_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2, | 495 | rtl_write_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2, |
496 | tmp_reg422 & (~BIT(6))); | 496 | tmp_reg422 & (~BIT(6))); |
497 | 497 | ||
@@ -500,7 +500,7 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
500 | _rtl92ce_set_bcn_ctrl_reg(hw, BIT(3), 0); | 500 | _rtl92ce_set_bcn_ctrl_reg(hw, BIT(3), 0); |
501 | _rtl92ce_set_bcn_ctrl_reg(hw, 0, BIT(4)); | 501 | _rtl92ce_set_bcn_ctrl_reg(hw, 0, BIT(4)); |
502 | 502 | ||
503 | if (b_recover) { | 503 | if (recover) { |
504 | rtl_write_byte(rtlpriv, | 504 | rtl_write_byte(rtlpriv, |
505 | REG_FWHW_TXQ_CTRL + 2, | 505 | REG_FWHW_TXQ_CTRL + 2, |
506 | tmp_reg422); | 506 | tmp_reg422); |
@@ -868,7 +868,7 @@ static void _rtl92ce_enable_aspm_back_door(struct ieee80211_hw *hw) | |||
868 | rtl_write_word(rtlpriv, 0x350, 0x870c); | 868 | rtl_write_word(rtlpriv, 0x350, 0x870c); |
869 | rtl_write_byte(rtlpriv, 0x352, 0x1); | 869 | rtl_write_byte(rtlpriv, 0x352, 0x1); |
870 | 870 | ||
871 | if (ppsc->b_support_backdoor) | 871 | if (ppsc->support_backdoor) |
872 | rtl_write_byte(rtlpriv, 0x349, 0x1b); | 872 | rtl_write_byte(rtlpriv, 0x349, 0x1b); |
873 | else | 873 | else |
874 | rtl_write_byte(rtlpriv, 0x349, 0x03); | 874 | rtl_write_byte(rtlpriv, 0x349, 0x03); |
@@ -940,10 +940,10 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw) | |||
940 | ("Failed to download FW. Init HW " | 940 | ("Failed to download FW. Init HW " |
941 | "without FW now..\n")); | 941 | "without FW now..\n")); |
942 | err = 1; | 942 | err = 1; |
943 | rtlhal->bfw_ready = false; | 943 | rtlhal->fw_ready = false; |
944 | return err; | 944 | return err; |
945 | } else { | 945 | } else { |
946 | rtlhal->bfw_ready = true; | 946 | rtlhal->fw_ready = true; |
947 | } | 947 | } |
948 | 948 | ||
949 | rtlhal->last_hmeboxnum = 0; | 949 | rtlhal->last_hmeboxnum = 0; |
@@ -1237,7 +1237,7 @@ static void _rtl92ce_poweroff_adapter(struct ieee80211_hw *hw) | |||
1237 | rtl_write_byte(rtlpriv, REG_APSD_CTRL, 0x40); | 1237 | rtl_write_byte(rtlpriv, REG_APSD_CTRL, 0x40); |
1238 | rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE2); | 1238 | rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE2); |
1239 | rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE0); | 1239 | rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE0); |
1240 | if ((rtl_read_byte(rtlpriv, REG_MCUFWDL) & BIT(7)) && rtlhal->bfw_ready) | 1240 | if ((rtl_read_byte(rtlpriv, REG_MCUFWDL) & BIT(7)) && rtlhal->fw_ready) |
1241 | rtl92c_firmware_selfreset(hw); | 1241 | rtl92c_firmware_selfreset(hw); |
1242 | rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, 0x51); | 1242 | rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, 0x51); |
1243 | rtl_write_byte(rtlpriv, REG_MCUFWDL, 0x00); | 1243 | rtl_write_byte(rtlpriv, REG_MCUFWDL, 0x00); |
@@ -1555,7 +1555,7 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1555 | rtlefuse->eeprom_thermalmeter = (tempval & 0x1f); | 1555 | rtlefuse->eeprom_thermalmeter = (tempval & 0x1f); |
1556 | 1556 | ||
1557 | if (rtlefuse->eeprom_thermalmeter == 0x1f || autoload_fail) | 1557 | if (rtlefuse->eeprom_thermalmeter == 0x1f || autoload_fail) |
1558 | rtlefuse->b_apk_thermalmeterignore = true; | 1558 | rtlefuse->apk_thermalmeterignore = true; |
1559 | 1559 | ||
1560 | rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; | 1560 | rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; |
1561 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1561 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
@@ -1612,7 +1612,7 @@ static void _rtl92ce_read_adapter_info(struct ieee80211_hw *hw) | |||
1612 | 1612 | ||
1613 | rtlefuse->eeprom_channelplan = *(u8 *)&hwinfo[EEPROM_CHANNELPLAN]; | 1613 | rtlefuse->eeprom_channelplan = *(u8 *)&hwinfo[EEPROM_CHANNELPLAN]; |
1614 | rtlefuse->eeprom_version = *(u16 *)&hwinfo[EEPROM_VERSION]; | 1614 | rtlefuse->eeprom_version = *(u16 *)&hwinfo[EEPROM_VERSION]; |
1615 | rtlefuse->b_txpwr_fromeprom = true; | 1615 | rtlefuse->txpwr_fromeprom = true; |
1616 | rtlefuse->eeprom_oemid = *(u8 *)&hwinfo[EEPROM_CUSTOMER_ID]; | 1616 | rtlefuse->eeprom_oemid = *(u8 *)&hwinfo[EEPROM_CUSTOMER_ID]; |
1617 | 1617 | ||
1618 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, | 1618 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, |
@@ -1655,7 +1655,7 @@ static void _rtl92ce_hal_customized_behavior(struct ieee80211_hw *hw) | |||
1655 | 1655 | ||
1656 | switch (rtlhal->oem_id) { | 1656 | switch (rtlhal->oem_id) { |
1657 | case RT_CID_819x_HP: | 1657 | case RT_CID_819x_HP: |
1658 | pcipriv->ledctl.bled_opendrain = true; | 1658 | pcipriv->ledctl.led_opendrain = true; |
1659 | break; | 1659 | break; |
1660 | case RT_CID_819x_Lenovo: | 1660 | case RT_CID_819x_Lenovo: |
1661 | case RT_CID_DEFAULT: | 1661 | case RT_CID_DEFAULT: |
@@ -1680,10 +1680,10 @@ void rtl92ce_read_eeprom_info(struct ieee80211_hw *hw) | |||
1680 | 1680 | ||
1681 | rtlhal->version = _rtl92ce_read_chip_version(hw); | 1681 | rtlhal->version = _rtl92ce_read_chip_version(hw); |
1682 | if (get_rf_type(rtlphy) == RF_1T1R) | 1682 | if (get_rf_type(rtlphy) == RF_1T1R) |
1683 | rtlpriv->dm.brfpath_rxenable[0] = true; | 1683 | rtlpriv->dm.rfpath_rxenable[0] = true; |
1684 | else | 1684 | else |
1685 | rtlpriv->dm.brfpath_rxenable[0] = | 1685 | rtlpriv->dm.rfpath_rxenable[0] = |
1686 | rtlpriv->dm.brfpath_rxenable[1] = true; | 1686 | rtlpriv->dm.rfpath_rxenable[1] = true; |
1687 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("VersionID = 0x%4x\n", | 1687 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("VersionID = 0x%4x\n", |
1688 | rtlhal->version)); | 1688 | rtlhal->version)); |
1689 | tmp_u1b = rtl_read_byte(rtlpriv, REG_9346CR); | 1689 | tmp_u1b = rtl_read_byte(rtlpriv, REG_9346CR); |
@@ -1714,13 +1714,13 @@ void rtl92ce_update_hal_rate_table(struct ieee80211_hw *hw) | |||
1714 | u32 ratr_value = (u32) mac->basic_rates; | 1714 | u32 ratr_value = (u32) mac->basic_rates; |
1715 | u8 *p_mcsrate = mac->mcs; | 1715 | u8 *p_mcsrate = mac->mcs; |
1716 | u8 ratr_index = 0; | 1716 | u8 ratr_index = 0; |
1717 | u8 b_nmode = mac->ht_enable; | 1717 | u8 nmode = mac->ht_enable; |
1718 | u8 mimo_ps = 1; | 1718 | u8 mimo_ps = 1; |
1719 | u16 shortgi_rate; | 1719 | u16 shortgi_rate; |
1720 | u32 tmp_ratr_value; | 1720 | u32 tmp_ratr_value; |
1721 | u8 b_curtxbw_40mhz = mac->bw_40; | 1721 | u8 curtxbw_40mhz = mac->bw_40; |
1722 | u8 b_curshortgi_40mhz = mac->sgi_40; | 1722 | u8 curshortgi_40mhz = mac->sgi_40; |
1723 | u8 b_curshortgi_20mhz = mac->sgi_20; | 1723 | u8 curshortgi_20mhz = mac->sgi_20; |
1724 | enum wireless_mode wirelessmode = mac->mode; | 1724 | enum wireless_mode wirelessmode = mac->mode; |
1725 | 1725 | ||
1726 | ratr_value |= EF2BYTE((*(u16 *) (p_mcsrate))) << 12; | 1726 | ratr_value |= EF2BYTE((*(u16 *) (p_mcsrate))) << 12; |
@@ -1737,7 +1737,7 @@ void rtl92ce_update_hal_rate_table(struct ieee80211_hw *hw) | |||
1737 | break; | 1737 | break; |
1738 | case WIRELESS_MODE_N_24G: | 1738 | case WIRELESS_MODE_N_24G: |
1739 | case WIRELESS_MODE_N_5G: | 1739 | case WIRELESS_MODE_N_5G: |
1740 | b_nmode = 1; | 1740 | nmode = 1; |
1741 | if (mimo_ps == 0) { | 1741 | if (mimo_ps == 0) { |
1742 | ratr_value &= 0x0007F005; | 1742 | ratr_value &= 0x0007F005; |
1743 | } else { | 1743 | } else { |
@@ -1763,9 +1763,8 @@ void rtl92ce_update_hal_rate_table(struct ieee80211_hw *hw) | |||
1763 | 1763 | ||
1764 | ratr_value &= 0x0FFFFFFF; | 1764 | ratr_value &= 0x0FFFFFFF; |
1765 | 1765 | ||
1766 | if (b_nmode && ((b_curtxbw_40mhz && | 1766 | if (nmode && ((curtxbw_40mhz && curshortgi_40mhz) || (!curtxbw_40mhz && |
1767 | b_curshortgi_40mhz) || (!b_curtxbw_40mhz && | 1767 | curshortgi_20mhz))) { |
1768 | b_curshortgi_20mhz))) { | ||
1769 | 1768 | ||
1770 | ratr_value |= 0x10000000; | 1769 | ratr_value |= 0x10000000; |
1771 | tmp_ratr_value = (ratr_value >> 12); | 1770 | tmp_ratr_value = (ratr_value >> 12); |
@@ -1793,11 +1792,11 @@ void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) | |||
1793 | u32 ratr_bitmap = (u32) mac->basic_rates; | 1792 | u32 ratr_bitmap = (u32) mac->basic_rates; |
1794 | u8 *p_mcsrate = mac->mcs; | 1793 | u8 *p_mcsrate = mac->mcs; |
1795 | u8 ratr_index; | 1794 | u8 ratr_index; |
1796 | u8 b_curtxbw_40mhz = mac->bw_40; | 1795 | u8 curtxbw_40mhz = mac->bw_40; |
1797 | u8 b_curshortgi_40mhz = mac->sgi_40; | 1796 | u8 curshortgi_40mhz = mac->sgi_40; |
1798 | u8 b_curshortgi_20mhz = mac->sgi_20; | 1797 | u8 curshortgi_20mhz = mac->sgi_20; |
1799 | enum wireless_mode wirelessmode = mac->mode; | 1798 | enum wireless_mode wirelessmode = mac->mode; |
1800 | bool b_shortgi = false; | 1799 | bool shortgi = false; |
1801 | u8 rate_mask[5]; | 1800 | u8 rate_mask[5]; |
1802 | u8 macid = 0; | 1801 | u8 macid = 0; |
1803 | u8 mimops = 1; | 1802 | u8 mimops = 1; |
@@ -1839,7 +1838,7 @@ void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) | |||
1839 | } else { | 1838 | } else { |
1840 | if (rtlphy->rf_type == RF_1T2R || | 1839 | if (rtlphy->rf_type == RF_1T2R || |
1841 | rtlphy->rf_type == RF_1T1R) { | 1840 | rtlphy->rf_type == RF_1T1R) { |
1842 | if (b_curtxbw_40mhz) { | 1841 | if (curtxbw_40mhz) { |
1843 | if (rssi_level == 1) | 1842 | if (rssi_level == 1) |
1844 | ratr_bitmap &= 0x000f0000; | 1843 | ratr_bitmap &= 0x000f0000; |
1845 | else if (rssi_level == 2) | 1844 | else if (rssi_level == 2) |
@@ -1855,7 +1854,7 @@ void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) | |||
1855 | ratr_bitmap &= 0x000ff005; | 1854 | ratr_bitmap &= 0x000ff005; |
1856 | } | 1855 | } |
1857 | } else { | 1856 | } else { |
1858 | if (b_curtxbw_40mhz) { | 1857 | if (curtxbw_40mhz) { |
1859 | if (rssi_level == 1) | 1858 | if (rssi_level == 1) |
1860 | ratr_bitmap &= 0x0f0f0000; | 1859 | ratr_bitmap &= 0x0f0f0000; |
1861 | else if (rssi_level == 2) | 1860 | else if (rssi_level == 2) |
@@ -1873,13 +1872,13 @@ void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) | |||
1873 | } | 1872 | } |
1874 | } | 1873 | } |
1875 | 1874 | ||
1876 | if ((b_curtxbw_40mhz && b_curshortgi_40mhz) || | 1875 | if ((curtxbw_40mhz && curshortgi_40mhz) || |
1877 | (!b_curtxbw_40mhz && b_curshortgi_20mhz)) { | 1876 | (!curtxbw_40mhz && curshortgi_20mhz)) { |
1878 | 1877 | ||
1879 | if (macid == 0) | 1878 | if (macid == 0) |
1880 | b_shortgi = true; | 1879 | shortgi = true; |
1881 | else if (macid == 1) | 1880 | else if (macid == 1) |
1882 | b_shortgi = false; | 1881 | shortgi = false; |
1883 | } | 1882 | } |
1884 | break; | 1883 | break; |
1885 | default: | 1884 | default: |
@@ -1895,7 +1894,7 @@ void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level) | |||
1895 | ("ratr_bitmap :%x\n", ratr_bitmap)); | 1894 | ("ratr_bitmap :%x\n", ratr_bitmap)); |
1896 | *(u32 *)&rate_mask = EF4BYTE((ratr_bitmap & 0x0fffffff) | | 1895 | *(u32 *)&rate_mask = EF4BYTE((ratr_bitmap & 0x0fffffff) | |
1897 | (ratr_index << 28)); | 1896 | (ratr_index << 28)); |
1898 | rate_mask[4] = macid | (b_shortgi ? 0x20 : 0x00) | 0x80; | 1897 | rate_mask[4] = macid | (shortgi ? 0x20 : 0x00) | 0x80; |
1899 | RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, ("Rate_index:%x, " | 1898 | RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, ("Rate_index:%x, " |
1900 | "ratr_val:%x, %x:%x:%x:%x:%x\n", | 1899 | "ratr_val:%x, %x:%x:%x:%x:%x\n", |
1901 | ratr_index, ratr_bitmap, | 1900 | ratr_index, ratr_bitmap, |
@@ -1927,13 +1926,13 @@ bool rtl92ce_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 * valid) | |||
1927 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 1926 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); |
1928 | enum rf_pwrstate e_rfpowerstate_toset, cur_rfstate; | 1927 | enum rf_pwrstate e_rfpowerstate_toset, cur_rfstate; |
1929 | u8 u1tmp; | 1928 | u8 u1tmp; |
1930 | bool b_actuallyset = false; | 1929 | bool actuallyset = false; |
1931 | unsigned long flag; | 1930 | unsigned long flag; |
1932 | 1931 | ||
1933 | if ((rtlpci->up_first_time == 1) || (rtlpci->being_init_adapter)) | 1932 | if ((rtlpci->up_first_time == 1) || (rtlpci->being_init_adapter)) |
1934 | return false; | 1933 | return false; |
1935 | 1934 | ||
1936 | if (ppsc->b_swrf_processing) | 1935 | if (ppsc->swrf_processing) |
1937 | return false; | 1936 | return false; |
1938 | 1937 | ||
1939 | spin_lock_irqsave(&rtlpriv->locks.rf_ps_lock, flag); | 1938 | spin_lock_irqsave(&rtlpriv->locks.rf_ps_lock, flag); |
@@ -1959,24 +1958,24 @@ bool rtl92ce_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 * valid) | |||
1959 | u1tmp = rtl_read_byte(rtlpriv, REG_GPIO_IO_SEL); | 1958 | u1tmp = rtl_read_byte(rtlpriv, REG_GPIO_IO_SEL); |
1960 | e_rfpowerstate_toset = (u1tmp & BIT(3)) ? ERFON : ERFOFF; | 1959 | e_rfpowerstate_toset = (u1tmp & BIT(3)) ? ERFON : ERFOFF; |
1961 | 1960 | ||
1962 | if ((ppsc->b_hwradiooff == true) && (e_rfpowerstate_toset == ERFON)) { | 1961 | if ((ppsc->hwradiooff == true) && (e_rfpowerstate_toset == ERFON)) { |
1963 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, | 1962 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, |
1964 | ("GPIOChangeRF - HW Radio ON, RF ON\n")); | 1963 | ("GPIOChangeRF - HW Radio ON, RF ON\n")); |
1965 | 1964 | ||
1966 | e_rfpowerstate_toset = ERFON; | 1965 | e_rfpowerstate_toset = ERFON; |
1967 | ppsc->b_hwradiooff = false; | 1966 | ppsc->hwradiooff = false; |
1968 | b_actuallyset = true; | 1967 | actuallyset = true; |
1969 | } else if ((ppsc->b_hwradiooff == false) | 1968 | } else if ((ppsc->hwradiooff == false) |
1970 | && (e_rfpowerstate_toset == ERFOFF)) { | 1969 | && (e_rfpowerstate_toset == ERFOFF)) { |
1971 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, | 1970 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, |
1972 | ("GPIOChangeRF - HW Radio OFF, RF OFF\n")); | 1971 | ("GPIOChangeRF - HW Radio OFF, RF OFF\n")); |
1973 | 1972 | ||
1974 | e_rfpowerstate_toset = ERFOFF; | 1973 | e_rfpowerstate_toset = ERFOFF; |
1975 | ppsc->b_hwradiooff = true; | 1974 | ppsc->hwradiooff = true; |
1976 | b_actuallyset = true; | 1975 | actuallyset = true; |
1977 | } | 1976 | } |
1978 | 1977 | ||
1979 | if (b_actuallyset) { | 1978 | if (actuallyset) { |
1980 | if (e_rfpowerstate_toset == ERFON) { | 1979 | if (e_rfpowerstate_toset == ERFON) { |
1981 | if ((ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM) && | 1980 | if ((ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM) && |
1982 | RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_ASPM)) { | 1981 | RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_ASPM)) { |
@@ -2015,7 +2014,7 @@ bool rtl92ce_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 * valid) | |||
2015 | } | 2014 | } |
2016 | 2015 | ||
2017 | *valid = 1; | 2016 | *valid = 1; |
2018 | return !ppsc->b_hwradiooff; | 2017 | return !ppsc->hwradiooff; |
2019 | 2018 | ||
2020 | } | 2019 | } |
2021 | 2020 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/led.c b/drivers/net/wireless/rtlwifi/rtl8192ce/led.c index 78a0569208ea..7b1da8d7508f 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/led.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/led.c | |||
@@ -57,7 +57,7 @@ void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) | |||
57 | ("switch case not process\n")); | 57 | ("switch case not process\n")); |
58 | break; | 58 | break; |
59 | } | 59 | } |
60 | pled->b_ledon = true; | 60 | pled->ledon = true; |
61 | } | 61 | } |
62 | 62 | ||
63 | void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) | 63 | 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 | break; | 76 | break; |
77 | case LED_PIN_LED0: | 77 | case LED_PIN_LED0: |
78 | ledcfg &= 0xf0; | 78 | ledcfg &= 0xf0; |
79 | if (pcipriv->ledctl.bled_opendrain == true) | 79 | if (pcipriv->ledctl.led_opendrain == true) |
80 | rtl_write_byte(rtlpriv, REG_LEDCFG2, | 80 | rtl_write_byte(rtlpriv, REG_LEDCFG2, |
81 | (ledcfg | BIT(1) | BIT(5) | BIT(6))); | 81 | (ledcfg | BIT(1) | BIT(5) | BIT(6))); |
82 | else | 82 | else |
@@ -92,7 +92,7 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) | |||
92 | ("switch case not process\n")); | 92 | ("switch case not process\n")); |
93 | break; | 93 | break; |
94 | } | 94 | } |
95 | pled->b_ledon = false; | 95 | pled->ledon = false; |
96 | } | 96 | } |
97 | 97 | ||
98 | void rtl92ce_init_sw_leds(struct ieee80211_hw *hw) | 98 | void rtl92ce_init_sw_leds(struct ieee80211_hw *hw) |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c index 05f7a45b30e1..4b256d0bebcc 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | |||
@@ -330,7 +330,7 @@ bool rtl92c_phy_bb_config(struct ieee80211_hw *hw) | |||
330 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 330 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
331 | u16 regval; | 331 | u16 regval; |
332 | u32 regvaldw; | 332 | u32 regvaldw; |
333 | u8 b_reg_hwparafile = 1; | 333 | u8 reg_hwparafile = 1; |
334 | 334 | ||
335 | _rtl92c_phy_init_bb_rf_register_definition(hw); | 335 | _rtl92c_phy_init_bb_rf_register_definition(hw); |
336 | regval = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN); | 336 | regval = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN); |
@@ -345,7 +345,7 @@ bool rtl92c_phy_bb_config(struct ieee80211_hw *hw) | |||
345 | rtl_write_byte(rtlpriv, REG_AFE_XTAL_CTRL + 1, 0x80); | 345 | rtl_write_byte(rtlpriv, REG_AFE_XTAL_CTRL + 1, 0x80); |
346 | regvaldw = rtl_read_dword(rtlpriv, REG_LEDCFG0); | 346 | regvaldw = rtl_read_dword(rtlpriv, REG_LEDCFG0); |
347 | rtl_write_dword(rtlpriv, REG_LEDCFG0, regvaldw | BIT(23)); | 347 | rtl_write_dword(rtlpriv, REG_LEDCFG0, regvaldw | BIT(23)); |
348 | if (b_reg_hwparafile == 1) | 348 | if (reg_hwparafile == 1) |
349 | rtstatus = _rtl92c_phy_bb8192c_config_parafile(hw); | 349 | rtstatus = _rtl92c_phy_bb8192c_config_parafile(hw); |
350 | return rtstatus; | 350 | return rtstatus; |
351 | } | 351 | } |
@@ -388,7 +388,7 @@ static bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw) | |||
388 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("AGC Table Fail\n")); | 388 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("AGC Table Fail\n")); |
389 | return false; | 389 | return false; |
390 | } | 390 | } |
391 | rtlphy->bcck_high_power = (bool) (rtl_get_bbreg(hw, | 391 | rtlphy->cck_high_power = (bool) (rtl_get_bbreg(hw, |
392 | RFPGA0_XA_HSSIPARAMETER2, | 392 | RFPGA0_XA_HSSIPARAMETER2, |
393 | 0x200)); | 393 | 0x200)); |
394 | return true; | 394 | return true; |
@@ -954,7 +954,7 @@ void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel) | |||
954 | struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); | 954 | struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); |
955 | u8 cckpowerlevel[2], ofdmpowerlevel[2]; | 955 | u8 cckpowerlevel[2], ofdmpowerlevel[2]; |
956 | 956 | ||
957 | if (rtlefuse->b_txpwr_fromeprom == false) | 957 | if (rtlefuse->txpwr_fromeprom == false) |
958 | return; | 958 | return; |
959 | _rtl92c_get_txpower_index(hw, channel, | 959 | _rtl92c_get_txpower_index(hw, channel, |
960 | &cckpowerlevel[0], &ofdmpowerlevel[0]); | 960 | &cckpowerlevel[0], &ofdmpowerlevel[0]); |
@@ -1437,7 +1437,7 @@ static u8 _rtl92c_phy_path_b_iqk(struct ieee80211_hw *hw) | |||
1437 | } | 1437 | } |
1438 | 1438 | ||
1439 | static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw, | 1439 | static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw, |
1440 | bool b_iqk_ok, long result[][8], | 1440 | bool iqk_ok, long result[][8], |
1441 | u8 final_candidate, bool btxonly) | 1441 | u8 final_candidate, bool btxonly) |
1442 | { | 1442 | { |
1443 | u32 oldval_0, x, tx0_a, reg; | 1443 | 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 | 1445 | ||
1446 | if (final_candidate == 0xFF) | 1446 | if (final_candidate == 0xFF) |
1447 | return; | 1447 | return; |
1448 | else if (b_iqk_ok) { | 1448 | else if (iqk_ok) { |
1449 | oldval_0 = (rtl_get_bbreg(hw, ROFDM0_XATXIQIMBALANCE, | 1449 | oldval_0 = (rtl_get_bbreg(hw, ROFDM0_XATXIQIMBALANCE, |
1450 | MASKDWORD) >> 22) & 0x3FF; | 1450 | MASKDWORD) >> 22) & 0x3FF; |
1451 | x = result[final_candidate][0]; | 1451 | x = result[final_candidate][0]; |
@@ -1477,7 +1477,7 @@ static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw, | |||
1477 | } | 1477 | } |
1478 | 1478 | ||
1479 | static void _rtl92c_phy_path_b_fill_iqk_matrix(struct ieee80211_hw *hw, | 1479 | static void _rtl92c_phy_path_b_fill_iqk_matrix(struct ieee80211_hw *hw, |
1480 | bool b_iqk_ok, long result[][8], | 1480 | bool iqk_ok, long result[][8], |
1481 | u8 final_candidate, bool btxonly) | 1481 | u8 final_candidate, bool btxonly) |
1482 | { | 1482 | { |
1483 | u32 oldval_1, x, tx1_a, reg; | 1483 | 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 | 1485 | ||
1486 | if (final_candidate == 0xFF) | 1486 | if (final_candidate == 0xFF) |
1487 | return; | 1487 | return; |
1488 | else if (b_iqk_ok) { | 1488 | else if (iqk_ok) { |
1489 | oldval_1 = (rtl_get_bbreg(hw, ROFDM0_XBTXIQIMBALANCE, | 1489 | oldval_1 = (rtl_get_bbreg(hw, ROFDM0_XBTXIQIMBALANCE, |
1490 | MASKDWORD) >> 22) & 0x3FF; | 1490 | MASKDWORD) >> 22) & 0x3FF; |
1491 | x = result[final_candidate][4]; | 1491 | x = result[final_candidate][4]; |
@@ -1698,11 +1698,11 @@ static void _rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, | |||
1698 | } | 1698 | } |
1699 | _rtl92c_phy_path_adda_on(hw, adda_reg, true, is2t); | 1699 | _rtl92c_phy_path_adda_on(hw, adda_reg, true, is2t); |
1700 | if (t == 0) { | 1700 | if (t == 0) { |
1701 | rtlphy->b_rfpi_enable = (u8) rtl_get_bbreg(hw, | 1701 | rtlphy->rfpi_enable = (u8) rtl_get_bbreg(hw, |
1702 | RFPGA0_XA_HSSIPARAMETER1, | 1702 | RFPGA0_XA_HSSIPARAMETER1, |
1703 | BIT(8)); | 1703 | BIT(8)); |
1704 | } | 1704 | } |
1705 | if (!rtlphy->b_rfpi_enable) | 1705 | if (!rtlphy->rfpi_enable) |
1706 | _rtl92c_phy_pi_mode_switch(hw, true); | 1706 | _rtl92c_phy_pi_mode_switch(hw, true); |
1707 | if (t == 0) { | 1707 | if (t == 0) { |
1708 | rtlphy->reg_c04 = rtl_get_bbreg(hw, 0xc04, MASKDWORD); | 1708 | rtlphy->reg_c04 = rtl_get_bbreg(hw, 0xc04, MASKDWORD); |
@@ -1783,7 +1783,7 @@ static void _rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, | |||
1783 | if (is2t) | 1783 | if (is2t) |
1784 | rtl_set_bbreg(hw, 0x844, MASKDWORD, 0x00032ed3); | 1784 | rtl_set_bbreg(hw, 0x844, MASKDWORD, 0x00032ed3); |
1785 | if (t != 0) { | 1785 | if (t != 0) { |
1786 | if (!rtlphy->b_rfpi_enable) | 1786 | if (!rtlphy->rfpi_enable) |
1787 | _rtl92c_phy_pi_mode_switch(hw, false); | 1787 | _rtl92c_phy_pi_mode_switch(hw, false); |
1788 | _rtl92c_phy_reload_adda_registers(hw, adda_reg, | 1788 | _rtl92c_phy_reload_adda_registers(hw, adda_reg, |
1789 | rtlphy->adda_backup, 16); | 1789 | rtlphy->adda_backup, 16); |
@@ -2370,7 +2370,7 @@ void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta) | |||
2370 | struct rtl_phy *rtlphy = &(rtlpriv->phy); | 2370 | struct rtl_phy *rtlphy = &(rtlpriv->phy); |
2371 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); | 2371 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); |
2372 | 2372 | ||
2373 | if (rtlphy->b_apk_done) | 2373 | if (rtlphy->apk_done) |
2374 | return; | 2374 | return; |
2375 | if (IS_92C_SERIAL(rtlhal->version)) | 2375 | if (IS_92C_SERIAL(rtlhal->version)) |
2376 | _rtl92c_phy_ap_calibrate(hw, delta, true); | 2376 | _rtl92c_phy_ap_calibrate(hw, delta, true); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h index ca4daee6e9a8..4bdeb998ba82 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h | |||
@@ -80,7 +80,7 @@ | |||
80 | #define RTL92C_MAX_PATH_NUM 2 | 80 | #define RTL92C_MAX_PATH_NUM 2 |
81 | #define CHANNEL_MAX_NUMBER 14 | 81 | #define CHANNEL_MAX_NUMBER 14 |
82 | #define CHANNEL_GROUP_MAX 3 | 82 | #define CHANNEL_GROUP_MAX 3 |
83 | 83 | #define LLT_LAST_ENTRY_OF_TX_PKT_BUFFER 255 | |
84 | enum swchnlcmd_id { | 84 | enum swchnlcmd_id { |
85 | CMDID_END, | 85 | CMDID_END, |
86 | CMDID_SET_TXPOWEROWER_LEVEL, | 86 | CMDID_SET_TXPOWEROWER_LEVEL, |
@@ -233,5 +233,6 @@ void rtl92c_phy_config_bb_external_pa(struct ieee80211_hw *hw); | |||
233 | void rtl92ce_phy_set_rf_on(struct ieee80211_hw *hw); | 233 | void rtl92ce_phy_set_rf_on(struct ieee80211_hw *hw); |
234 | bool rtl92c_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype); | 234 | bool rtl92c_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype); |
235 | void rtl92c_phy_set_io(struct ieee80211_hw *hw); | 235 | void rtl92c_phy_set_io(struct ieee80211_hw *hw); |
236 | void rtl92c_bb_block_on(struct ieee80211_hw *hw); | ||
236 | 237 | ||
237 | #endif | 238 | #endif |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c index 40ae618a0262..b4df0b332832 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | |||
@@ -46,9 +46,9 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) | |||
46 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 46 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
47 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 47 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); |
48 | 48 | ||
49 | rtlpriv->dm.b_dm_initialgain_enable = 1; | 49 | rtlpriv->dm.dm_initialgain_enable = 1; |
50 | rtlpriv->dm.dm_flag = 0; | 50 | rtlpriv->dm.dm_flag = 0; |
51 | rtlpriv->dm.b_disable_framebursting = 0;; | 51 | rtlpriv->dm.disable_framebursting = 0; |
52 | rtlpriv->dm.thermalvalue = 0; | 52 | rtlpriv->dm.thermalvalue = 0; |
53 | rtlpci->transmit_config = CFENDFORM | BIT(12) | BIT(13); | 53 | rtlpci->transmit_config = CFENDFORM | BIT(12) | BIT(13); |
54 | 54 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c index 003bf108193f..58d7d36924e8 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | |||
@@ -245,9 +245,9 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, | |||
245 | struct rtl_stats *pstats, | 245 | struct rtl_stats *pstats, |
246 | struct rx_desc_92c *pdesc, | 246 | struct rx_desc_92c *pdesc, |
247 | struct rx_fwinfo_92c *p_drvinfo, | 247 | struct rx_fwinfo_92c *p_drvinfo, |
248 | bool bpacket_match_bssid, | 248 | bool packet_match_bssid, |
249 | bool bpacket_toself, | 249 | bool packet_toself, |
250 | bool b_packet_beacon) | 250 | bool packet_beacon) |
251 | { | 251 | { |
252 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 252 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
253 | struct phy_sts_cck_8192s_t *cck_buf; | 253 | struct phy_sts_cck_8192s_t *cck_buf; |
@@ -258,11 +258,11 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, | |||
258 | bool is_cck_rate; | 258 | bool is_cck_rate; |
259 | 259 | ||
260 | is_cck_rate = RX_HAL_IS_CCK_RATE(pdesc); | 260 | is_cck_rate = RX_HAL_IS_CCK_RATE(pdesc); |
261 | pstats->b_packet_matchbssid = bpacket_match_bssid; | 261 | pstats->packet_matchbssid = packet_match_bssid; |
262 | pstats->b_packet_toself = bpacket_toself; | 262 | pstats->packet_toself = packet_toself; |
263 | pstats->b_is_cck = is_cck_rate; | 263 | pstats->is_cck = is_cck_rate; |
264 | pstats->b_packet_beacon = b_packet_beacon; | 264 | pstats->packet_beacon = packet_beacon; |
265 | pstats->b_is_cck = is_cck_rate; | 265 | pstats->is_cck = is_cck_rate; |
266 | pstats->rx_mimo_signalquality[0] = -1; | 266 | pstats->rx_mimo_signalquality[0] = -1; |
267 | pstats->rx_mimo_signalquality[1] = -1; | 267 | pstats->rx_mimo_signalquality[1] = -1; |
268 | 268 | ||
@@ -315,7 +315,7 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, | |||
315 | pstats->rx_pwdb_all = pwdb_all; | 315 | pstats->rx_pwdb_all = pwdb_all; |
316 | pstats->recvsignalpower = rx_pwr_all; | 316 | pstats->recvsignalpower = rx_pwr_all; |
317 | 317 | ||
318 | if (bpacket_match_bssid) { | 318 | if (packet_match_bssid) { |
319 | u8 sq; | 319 | u8 sq; |
320 | if (pstats->rx_pwdb_all > 40) | 320 | if (pstats->rx_pwdb_all > 40) |
321 | sq = 100; | 321 | sq = 100; |
@@ -334,10 +334,10 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, | |||
334 | pstats->rx_mimo_signalquality[1] = -1; | 334 | pstats->rx_mimo_signalquality[1] = -1; |
335 | } | 335 | } |
336 | } else { | 336 | } else { |
337 | rtlpriv->dm.brfpath_rxenable[0] = | 337 | rtlpriv->dm.rfpath_rxenable[0] = |
338 | rtlpriv->dm.brfpath_rxenable[1] = true; | 338 | rtlpriv->dm.rfpath_rxenable[1] = true; |
339 | for (i = RF90_PATH_A; i < RF90_PATH_MAX; i++) { | 339 | for (i = RF90_PATH_A; i < RF90_PATH_MAX; i++) { |
340 | if (rtlpriv->dm.brfpath_rxenable[i]) | 340 | if (rtlpriv->dm.rfpath_rxenable[i]) |
341 | rf_rx_num++; | 341 | rf_rx_num++; |
342 | 342 | ||
343 | rx_pwr[i] = | 343 | rx_pwr[i] = |
@@ -347,7 +347,7 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, | |||
347 | rtlpriv->stats.rx_snr_db[i] = | 347 | rtlpriv->stats.rx_snr_db[i] = |
348 | (long)(p_drvinfo->rxsnr[i] / 2); | 348 | (long)(p_drvinfo->rxsnr[i] / 2); |
349 | 349 | ||
350 | if (bpacket_match_bssid) | 350 | if (packet_match_bssid) |
351 | pstats->rx_mimo_signalstrength[i] = (u8) rssi; | 351 | pstats->rx_mimo_signalstrength[i] = (u8) rssi; |
352 | } | 352 | } |
353 | 353 | ||
@@ -366,7 +366,7 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, | |||
366 | for (i = 0; i < max_spatial_stream; i++) { | 366 | for (i = 0; i < max_spatial_stream; i++) { |
367 | evm = _rtl92c_evm_db_to_percentage(p_drvinfo->rxevm[i]); | 367 | evm = _rtl92c_evm_db_to_percentage(p_drvinfo->rxevm[i]); |
368 | 368 | ||
369 | if (bpacket_match_bssid) { | 369 | if (packet_match_bssid) { |
370 | if (i == 0) | 370 | if (i == 0) |
371 | pstats->signalquality = | 371 | pstats->signalquality = |
372 | (u8) (evm & 0xff); | 372 | (u8) (evm & 0xff); |
@@ -393,7 +393,7 @@ static void _rtl92ce_process_ui_rssi(struct ieee80211_hw *hw, | |||
393 | u8 rfpath; | 393 | u8 rfpath; |
394 | u32 last_rssi, tmpval; | 394 | u32 last_rssi, tmpval; |
395 | 395 | ||
396 | if (pstats->b_packet_toself || pstats->b_packet_beacon) { | 396 | if (pstats->packet_toself || pstats->packet_beacon) { |
397 | rtlpriv->stats.rssi_calculate_cnt++; | 397 | rtlpriv->stats.rssi_calculate_cnt++; |
398 | 398 | ||
399 | if (rtlpriv->stats.ui_rssi.total_num++ >= | 399 | if (rtlpriv->stats.ui_rssi.total_num++ >= |
@@ -421,7 +421,7 @@ static void _rtl92ce_process_ui_rssi(struct ieee80211_hw *hw, | |||
421 | pstats->rssi = rtlpriv->stats.signal_strength; | 421 | pstats->rssi = rtlpriv->stats.signal_strength; |
422 | } | 422 | } |
423 | 423 | ||
424 | if (!pstats->b_is_cck && pstats->b_packet_toself) { | 424 | if (!pstats->is_cck && pstats->packet_toself) { |
425 | for (rfpath = RF90_PATH_A; rfpath < rtlphy->num_total_rfpath; | 425 | for (rfpath = RF90_PATH_A; rfpath < rtlphy->num_total_rfpath; |
426 | rfpath++) { | 426 | rfpath++) { |
427 | 427 | ||
@@ -493,7 +493,7 @@ static void _rtl92ce_process_pwdb(struct ieee80211_hw *hw, | |||
493 | rtlpriv->dm.undecorated_smoothed_pwdb; | 493 | rtlpriv->dm.undecorated_smoothed_pwdb; |
494 | } | 494 | } |
495 | 495 | ||
496 | if (pstats->b_packet_toself || pstats->b_packet_beacon) { | 496 | if (pstats->packet_toself || pstats->packet_beacon) { |
497 | if (undecorated_smoothed_pwdb < 0) | 497 | if (undecorated_smoothed_pwdb < 0) |
498 | undecorated_smoothed_pwdb = pstats->rx_pwdb_all; | 498 | undecorated_smoothed_pwdb = pstats->rx_pwdb_all; |
499 | 499 | ||
@@ -525,7 +525,7 @@ static void _rtl92ce_process_ui_link_quality(struct ieee80211_hw *hw, | |||
525 | u32 last_evm, n_spatialstream, tmpval; | 525 | u32 last_evm, n_spatialstream, tmpval; |
526 | 526 | ||
527 | if (pstats->signalquality != 0) { | 527 | if (pstats->signalquality != 0) { |
528 | if (pstats->b_packet_toself || pstats->b_packet_beacon) { | 528 | if (pstats->packet_toself || pstats->packet_beacon) { |
529 | 529 | ||
530 | if (rtlpriv->stats.ui_link_quality.total_num++ >= | 530 | if (rtlpriv->stats.ui_link_quality.total_num++ >= |
531 | PHY_LINKQUALITY_SLID_WIN_MAX) { | 531 | PHY_LINKQUALITY_SLID_WIN_MAX) { |
@@ -595,8 +595,8 @@ static void _rtl92ce_process_phyinfo(struct ieee80211_hw *hw, | |||
595 | struct rtl_stats *pcurrent_stats) | 595 | struct rtl_stats *pcurrent_stats) |
596 | { | 596 | { |
597 | 597 | ||
598 | if (!pcurrent_stats->b_packet_matchbssid && | 598 | if (!pcurrent_stats->packet_matchbssid && |
599 | !pcurrent_stats->b_packet_beacon) | 599 | !pcurrent_stats->packet_beacon) |
600 | return; | 600 | return; |
601 | 601 | ||
602 | _rtl92ce_process_ui_rssi(hw, pcurrent_stats); | 602 | _rtl92ce_process_ui_rssi(hw, pcurrent_stats); |
@@ -618,7 +618,7 @@ static void _rtl92ce_translate_rx_signal_stuff(struct ieee80211_hw *hw, | |||
618 | u8 *praddr; | 618 | u8 *praddr; |
619 | u8 *psaddr; | 619 | u8 *psaddr; |
620 | u16 fc, type; | 620 | u16 fc, type; |
621 | bool b_packet_matchbssid, b_packet_toself, b_packet_beacon; | 621 | bool packet_matchbssid, packet_toself, packet_beacon; |
622 | 622 | ||
623 | tmp_buf = skb->data + pstats->rx_drvinfo_size + pstats->rx_bufshift; | 623 | tmp_buf = skb->data + pstats->rx_drvinfo_size + pstats->rx_bufshift; |
624 | 624 | ||
@@ -628,23 +628,23 @@ static void _rtl92ce_translate_rx_signal_stuff(struct ieee80211_hw *hw, | |||
628 | praddr = hdr->addr1; | 628 | praddr = hdr->addr1; |
629 | psaddr = hdr->addr2; | 629 | psaddr = hdr->addr2; |
630 | 630 | ||
631 | b_packet_matchbssid = | 631 | packet_matchbssid = |
632 | ((IEEE80211_FTYPE_CTL != type) && | 632 | ((IEEE80211_FTYPE_CTL != type) && |
633 | (!compare_ether_addr(mac->bssid, | 633 | (!compare_ether_addr(mac->bssid, |
634 | (fc & IEEE80211_FCTL_TODS) ? | 634 | (fc & IEEE80211_FCTL_TODS) ? |
635 | hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ? | 635 | hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ? |
636 | hdr->addr2 : hdr->addr3)) && | 636 | hdr->addr2 : hdr->addr3)) && |
637 | (!pstats->b_hwerror) && (!pstats->b_crc) && (!pstats->b_icv)); | 637 | (!pstats->hwerror) && (!pstats->crc) && (!pstats->icv)); |
638 | 638 | ||
639 | b_packet_toself = b_packet_matchbssid && | 639 | packet_toself = packet_matchbssid && |
640 | (!compare_ether_addr(praddr, rtlefuse->dev_addr)); | 640 | (!compare_ether_addr(praddr, rtlefuse->dev_addr)); |
641 | 641 | ||
642 | if (ieee80211_is_beacon(fc)) | 642 | if (ieee80211_is_beacon(fc)) |
643 | b_packet_beacon = true; | 643 | packet_beacon = true; |
644 | 644 | ||
645 | _rtl92ce_query_rxphystatus(hw, pstats, pdesc, p_drvinfo, | 645 | _rtl92ce_query_rxphystatus(hw, pstats, pdesc, p_drvinfo, |
646 | b_packet_matchbssid, b_packet_toself, | 646 | packet_matchbssid, packet_toself, |
647 | b_packet_beacon); | 647 | packet_beacon); |
648 | 648 | ||
649 | _rtl92ce_process_phyinfo(hw, tmp_buf, pstats); | 649 | _rtl92ce_process_phyinfo(hw, tmp_buf, pstats); |
650 | } | 650 | } |
@@ -662,14 +662,14 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw, | |||
662 | stats->rx_drvinfo_size = (u8) GET_RX_DESC_DRV_INFO_SIZE(pdesc) * | 662 | stats->rx_drvinfo_size = (u8) GET_RX_DESC_DRV_INFO_SIZE(pdesc) * |
663 | RX_DRV_INFO_SIZE_UNIT; | 663 | RX_DRV_INFO_SIZE_UNIT; |
664 | stats->rx_bufshift = (u8) (GET_RX_DESC_SHIFT(pdesc) & 0x03); | 664 | stats->rx_bufshift = (u8) (GET_RX_DESC_SHIFT(pdesc) & 0x03); |
665 | stats->b_icv = (u16) GET_RX_DESC_ICV(pdesc); | 665 | stats->icv = (u16) GET_RX_DESC_ICV(pdesc); |
666 | stats->b_crc = (u16) GET_RX_DESC_CRC32(pdesc); | 666 | stats->crc = (u16) GET_RX_DESC_CRC32(pdesc); |
667 | stats->b_hwerror = (stats->b_crc | stats->b_icv); | 667 | stats->hwerror = (stats->crc | stats->icv); |
668 | stats->decrypted = !GET_RX_DESC_SWDEC(pdesc); | 668 | stats->decrypted = !GET_RX_DESC_SWDEC(pdesc); |
669 | stats->rate = (u8) GET_RX_DESC_RXMCS(pdesc); | 669 | stats->rate = (u8) GET_RX_DESC_RXMCS(pdesc); |
670 | stats->b_shortpreamble = (u16) GET_RX_DESC_SPLCP(pdesc); | 670 | stats->shortpreamble = (u16) GET_RX_DESC_SPLCP(pdesc); |
671 | stats->b_isampdu = (bool) (GET_RX_DESC_PAGGR(pdesc) == 1); | 671 | stats->isampdu = (bool) (GET_RX_DESC_PAGGR(pdesc) == 1); |
672 | stats->b_isampdu = (bool) ((GET_RX_DESC_PAGGR(pdesc) == 1) | 672 | stats->isampdu = (bool) ((GET_RX_DESC_PAGGR(pdesc) == 1) |
673 | && (GET_RX_DESC_FAGGR(pdesc) == 1)); | 673 | && (GET_RX_DESC_FAGGR(pdesc) == 1)); |
674 | stats->timestamp_low = GET_RX_DESC_TSFL(pdesc); | 674 | stats->timestamp_low = GET_RX_DESC_TSFL(pdesc); |
675 | stats->rx_is40Mhzpacket = (bool) GET_RX_DESC_BW(pdesc); | 675 | stats->rx_is40Mhzpacket = (bool) GET_RX_DESC_BW(pdesc); |
@@ -727,7 +727,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
727 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); | 727 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); |
728 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 728 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); |
729 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 729 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
730 | bool b_defaultadapter = true; | 730 | bool defaultadapter = true; |
731 | 731 | ||
732 | struct ieee80211_sta *sta = ieee80211_find_sta(mac->vif, mac->bssid); | 732 | struct ieee80211_sta *sta = ieee80211_find_sta(mac->vif, mac->bssid); |
733 | 733 | ||
@@ -743,11 +743,11 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
743 | _rtl92ce_map_hwqueue_to_fwqueue(le16_to_cpu(hdr->frame_control), | 743 | _rtl92ce_map_hwqueue_to_fwqueue(le16_to_cpu(hdr->frame_control), |
744 | queue_index); | 744 | queue_index); |
745 | 745 | ||
746 | bool b_firstseg = ((hdr->seq_ctrl & | 746 | bool firstseg = ((hdr->seq_ctrl & |
747 | cpu_to_le16(IEEE80211_SCTL_FRAG)) == 0); | 747 | cpu_to_le16(IEEE80211_SCTL_FRAG)) == 0); |
748 | 748 | ||
749 | bool b_lastseg = ((hdr->frame_control & | 749 | bool lastseg = ((hdr->frame_control & |
750 | cpu_to_le16(IEEE80211_FCTL_MOREFRAGS)) == 0); | 750 | cpu_to_le16(IEEE80211_FCTL_MOREFRAGS)) == 0); |
751 | 751 | ||
752 | dma_addr_t mapping = pci_map_single(rtlpci->pdev, | 752 | dma_addr_t mapping = pci_map_single(rtlpci->pdev, |
753 | skb->data, skb->len, | 753 | skb->data, skb->len, |
@@ -759,7 +759,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
759 | 759 | ||
760 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, sizeof(struct tx_desc_92c)); | 760 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, sizeof(struct tx_desc_92c)); |
761 | 761 | ||
762 | if (b_firstseg) { | 762 | if (firstseg) { |
763 | SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN); | 763 | SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN); |
764 | 764 | ||
765 | SET_TX_DESC_TX_RATE(pdesc, tcb_desc.hw_rate); | 765 | SET_TX_DESC_TX_RATE(pdesc, tcb_desc.hw_rate); |
@@ -774,25 +774,25 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
774 | } | 774 | } |
775 | SET_TX_DESC_SEQ(pdesc, seq_number); | 775 | SET_TX_DESC_SEQ(pdesc, seq_number); |
776 | 776 | ||
777 | SET_TX_DESC_RTS_ENABLE(pdesc, ((tcb_desc.b_rts_enable && | 777 | SET_TX_DESC_RTS_ENABLE(pdesc, ((tcb_desc.rts_enable && |
778 | !tcb_desc. | 778 | !tcb_desc. |
779 | b_cts_enable) ? 1 : 0)); | 779 | cts_enable) ? 1 : 0)); |
780 | SET_TX_DESC_HW_RTS_ENABLE(pdesc, | 780 | SET_TX_DESC_HW_RTS_ENABLE(pdesc, |
781 | ((tcb_desc.b_rts_enable | 781 | ((tcb_desc.rts_enable |
782 | || tcb_desc.b_cts_enable) ? 1 : 0)); | 782 | || tcb_desc.cts_enable) ? 1 : 0)); |
783 | SET_TX_DESC_CTS2SELF(pdesc, ((tcb_desc.b_cts_enable) ? 1 : 0)); | 783 | SET_TX_DESC_CTS2SELF(pdesc, ((tcb_desc.cts_enable) ? 1 : 0)); |
784 | SET_TX_DESC_RTS_STBC(pdesc, ((tcb_desc.b_rts_stbc) ? 1 : 0)); | 784 | SET_TX_DESC_RTS_STBC(pdesc, ((tcb_desc.rts_stbc) ? 1 : 0)); |
785 | 785 | ||
786 | SET_TX_DESC_RTS_RATE(pdesc, tcb_desc.rts_rate); | 786 | SET_TX_DESC_RTS_RATE(pdesc, tcb_desc.rts_rate); |
787 | SET_TX_DESC_RTS_BW(pdesc, 0); | 787 | SET_TX_DESC_RTS_BW(pdesc, 0); |
788 | SET_TX_DESC_RTS_SC(pdesc, tcb_desc.rts_sc); | 788 | SET_TX_DESC_RTS_SC(pdesc, tcb_desc.rts_sc); |
789 | SET_TX_DESC_RTS_SHORT(pdesc, | 789 | SET_TX_DESC_RTS_SHORT(pdesc, |
790 | ((tcb_desc.rts_rate <= DESC92C_RATE54M) ? | 790 | ((tcb_desc.rts_rate <= DESC92C_RATE54M) ? |
791 | (tcb_desc.b_rts_use_shortpreamble ? 1 : 0) | 791 | (tcb_desc.rts_use_shortpreamble ? 1 : 0) |
792 | : (tcb_desc.b_rts_use_shortgi ? 1 : 0))); | 792 | : (tcb_desc.rts_use_shortgi ? 1 : 0))); |
793 | 793 | ||
794 | if (mac->bw_40) { | 794 | if (mac->bw_40) { |
795 | if (tcb_desc.b_packet_bw) { | 795 | if (tcb_desc.packet_bw) { |
796 | SET_TX_DESC_DATA_BW(pdesc, 1); | 796 | SET_TX_DESC_DATA_BW(pdesc, 1); |
797 | SET_TX_DESC_TX_SUB_CARRIER(pdesc, 3); | 797 | SET_TX_DESC_TX_SUB_CARRIER(pdesc, 3); |
798 | } else { | 798 | } else { |
@@ -854,14 +854,14 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
854 | } | 854 | } |
855 | } | 855 | } |
856 | 856 | ||
857 | SET_TX_DESC_FIRST_SEG(pdesc, (b_firstseg ? 1 : 0)); | 857 | SET_TX_DESC_FIRST_SEG(pdesc, (firstseg ? 1 : 0)); |
858 | SET_TX_DESC_LAST_SEG(pdesc, (b_lastseg ? 1 : 0)); | 858 | SET_TX_DESC_LAST_SEG(pdesc, (lastseg ? 1 : 0)); |
859 | 859 | ||
860 | SET_TX_DESC_TX_BUFFER_SIZE(pdesc, (u16) skb->len); | 860 | SET_TX_DESC_TX_BUFFER_SIZE(pdesc, (u16) skb->len); |
861 | 861 | ||
862 | SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, cpu_to_le32(mapping)); | 862 | SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, cpu_to_le32(mapping)); |
863 | 863 | ||
864 | if (rtlpriv->dm.b_useramask) { | 864 | if (rtlpriv->dm.useramask) { |
865 | SET_TX_DESC_RATE_ID(pdesc, tcb_desc.ratr_index); | 865 | SET_TX_DESC_RATE_ID(pdesc, tcb_desc.ratr_index); |
866 | SET_TX_DESC_MACID(pdesc, tcb_desc.mac_id); | 866 | SET_TX_DESC_MACID(pdesc, tcb_desc.mac_id); |
867 | } else { | 867 | } else { |
@@ -869,16 +869,16 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
869 | SET_TX_DESC_MACID(pdesc, tcb_desc.ratr_index); | 869 | SET_TX_DESC_MACID(pdesc, tcb_desc.ratr_index); |
870 | } | 870 | } |
871 | 871 | ||
872 | if ((!ieee80211_is_data_qos(fc)) && ppsc->b_leisure_ps && | 872 | if ((!ieee80211_is_data_qos(fc)) && ppsc->leisure_ps && |
873 | ppsc->b_fwctrl_lps) { | 873 | ppsc->fwctrl_lps) { |
874 | SET_TX_DESC_HWSEQ_EN(pdesc, 1); | 874 | SET_TX_DESC_HWSEQ_EN(pdesc, 1); |
875 | SET_TX_DESC_PKT_ID(pdesc, 8); | 875 | SET_TX_DESC_PKT_ID(pdesc, 8); |
876 | 876 | ||
877 | if (!b_defaultadapter) | 877 | if (!defaultadapter) |
878 | SET_TX_DESC_QOS(pdesc, 1); | 878 | SET_TX_DESC_QOS(pdesc, 1); |
879 | } | 879 | } |
880 | 880 | ||
881 | SET_TX_DESC_MORE_FRAG(pdesc, (b_lastseg ? 0 : 1)); | 881 | SET_TX_DESC_MORE_FRAG(pdesc, (lastseg ? 0 : 1)); |
882 | 882 | ||
883 | if (is_multicast_ether_addr(ieee80211_get_DA(hdr)) || | 883 | if (is_multicast_ether_addr(ieee80211_get_DA(hdr)) || |
884 | is_broadcast_ether_addr(ieee80211_get_DA(hdr))) { | 884 | is_broadcast_ether_addr(ieee80211_get_DA(hdr))) { |
@@ -889,8 +889,8 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
889 | } | 889 | } |
890 | 890 | ||
891 | void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, | 891 | void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, |
892 | u8 *pdesc, bool b_firstseg, | 892 | u8 *pdesc, bool firstseg, |
893 | bool b_lastseg, struct sk_buff *skb) | 893 | bool lastseg, struct sk_buff *skb) |
894 | { | 894 | { |
895 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 895 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
896 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 896 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); |
@@ -905,7 +905,7 @@ void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, | |||
905 | 905 | ||
906 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); | 906 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); |
907 | 907 | ||
908 | if (b_firstseg) | 908 | if (firstseg) |
909 | SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN); | 909 | SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN); |
910 | 910 | ||
911 | SET_TX_DESC_TX_RATE(pdesc, DESC92C_RATE1M); | 911 | SET_TX_DESC_TX_RATE(pdesc, DESC92C_RATE1M); |
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index fbf24a0f9054..91340c547dbb 100644 --- a/drivers/net/wireless/rtlwifi/usb.c +++ b/drivers/net/wireless/rtlwifi/usb.c | |||
@@ -366,10 +366,10 @@ static int _rtl_usb_init_sw(struct ieee80211_hw *hw) | |||
366 | struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); | 366 | struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); |
367 | 367 | ||
368 | rtlhal->hw = hw; | 368 | rtlhal->hw = hw; |
369 | ppsc->b_inactiveps = false; | 369 | ppsc->inactiveps = false; |
370 | ppsc->b_leisure_ps = false; | 370 | ppsc->leisure_ps = false; |
371 | ppsc->b_fwctrl_lps = false; | 371 | ppsc->fwctrl_lps = false; |
372 | ppsc->b_reg_fwctrl_lps = 3; | 372 | ppsc->reg_fwctrl_lps = 3; |
373 | ppsc->reg_max_lps_awakeintvl = 5; | 373 | ppsc->reg_max_lps_awakeintvl = 5; |
374 | ppsc->fwctrl_psmode = FW_PS_DTIM_MODE; | 374 | ppsc->fwctrl_psmode = FW_PS_DTIM_MODE; |
375 | 375 | ||
@@ -450,7 +450,7 @@ static void _rtl_usb_rx_process_agg(struct ieee80211_hw *hw, | |||
450 | skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift)); | 450 | skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift)); |
451 | hdr = (struct ieee80211_hdr *)(skb->data); | 451 | hdr = (struct ieee80211_hdr *)(skb->data); |
452 | fc = le16_to_cpu(hdr->frame_control); | 452 | fc = le16_to_cpu(hdr->frame_control); |
453 | if (!stats.b_crc) { | 453 | if (!stats.crc) { |
454 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); | 454 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); |
455 | 455 | ||
456 | if (is_broadcast_ether_addr(hdr->addr1)) { | 456 | if (is_broadcast_ether_addr(hdr->addr1)) { |
@@ -493,7 +493,7 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw, | |||
493 | skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift)); | 493 | skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift)); |
494 | hdr = (struct ieee80211_hdr *)(skb->data); | 494 | hdr = (struct ieee80211_hdr *)(skb->data); |
495 | fc = le16_to_cpu(hdr->frame_control); | 495 | fc = le16_to_cpu(hdr->frame_control); |
496 | if (!stats.b_crc) { | 496 | if (!stats.crc) { |
497 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); | 497 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); |
498 | 498 | ||
499 | if (is_broadcast_ether_addr(hdr->addr1)) { | 499 | if (is_broadcast_ether_addr(hdr->addr1)) { |
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h index ae55efad7a19..35e13eef9583 100644 --- a/drivers/net/wireless/rtlwifi/wifi.h +++ b/drivers/net/wireless/rtlwifi/wifi.h | |||
@@ -578,11 +578,11 @@ struct rtl_probe_rsp { | |||
578 | struct rtl_led { | 578 | struct rtl_led { |
579 | void *hw; | 579 | void *hw; |
580 | enum rtl_led_pin ledpin; | 580 | enum rtl_led_pin ledpin; |
581 | bool b_ledon; | 581 | bool ledon; |
582 | }; | 582 | }; |
583 | 583 | ||
584 | struct rtl_led_ctl { | 584 | struct rtl_led_ctl { |
585 | bool bled_opendrain; | 585 | bool led_opendrain; |
586 | struct rtl_led sw_led0; | 586 | struct rtl_led sw_led0; |
587 | struct rtl_led sw_led1; | 587 | struct rtl_led sw_led1; |
588 | }; | 588 | }; |
@@ -727,10 +727,10 @@ struct rtl_phy { | |||
727 | u32 iqk_mac_backup[IQK_MAC_REG_NUM]; | 727 | u32 iqk_mac_backup[IQK_MAC_REG_NUM]; |
728 | u32 iqk_bb_backup[10]; | 728 | u32 iqk_bb_backup[10]; |
729 | 729 | ||
730 | bool b_rfpi_enable; | 730 | bool rfpi_enable; |
731 | 731 | ||
732 | u8 pwrgroup_cnt; | 732 | u8 pwrgroup_cnt; |
733 | u8 bcck_high_power; | 733 | u8 cck_high_power; |
734 | /* 3 groups of pwr diff by rates*/ | 734 | /* 3 groups of pwr diff by rates*/ |
735 | u32 mcs_txpwrlevel_origoffset[4][16]; | 735 | u32 mcs_txpwrlevel_origoffset[4][16]; |
736 | u8 default_initialgain[4]; | 736 | u8 default_initialgain[4]; |
@@ -740,7 +740,7 @@ struct rtl_phy { | |||
740 | u8 cur_ofdm24g_txpwridx; | 740 | u8 cur_ofdm24g_txpwridx; |
741 | 741 | ||
742 | u32 rfreg_chnlval[2]; | 742 | u32 rfreg_chnlval[2]; |
743 | bool b_apk_done; | 743 | bool apk_done; |
744 | 744 | ||
745 | /*fsync*/ | 745 | /*fsync*/ |
746 | u8 framesync; | 746 | u8 framesync; |
@@ -867,9 +867,9 @@ struct rtl_hal { | |||
867 | 867 | ||
868 | /*firmware */ | 868 | /*firmware */ |
869 | u8 *pfirmware; | 869 | u8 *pfirmware; |
870 | bool b_h2c_setinprogress; | 870 | bool h2c_setinprogress; |
871 | u8 last_hmeboxnum; | 871 | u8 last_hmeboxnum; |
872 | bool bfw_ready; | 872 | bool fw_ready; |
873 | /*Reserve page start offset except beacon in TxQ. */ | 873 | /*Reserve page start offset except beacon in TxQ. */ |
874 | u8 fw_rsvdpage_startoffset; | 874 | u8 fw_rsvdpage_startoffset; |
875 | }; | 875 | }; |
@@ -900,17 +900,17 @@ struct rtl_dm { | |||
900 | long entry_min_undecoratedsmoothed_pwdb; | 900 | long entry_min_undecoratedsmoothed_pwdb; |
901 | long undecorated_smoothed_pwdb; /*out dm */ | 901 | long undecorated_smoothed_pwdb; /*out dm */ |
902 | long entry_max_undecoratedsmoothed_pwdb; | 902 | long entry_max_undecoratedsmoothed_pwdb; |
903 | bool b_dm_initialgain_enable; | 903 | bool dm_initialgain_enable; |
904 | bool bdynamic_txpower_enable; | 904 | bool dynamic_txpower_enable; |
905 | bool bcurrent_turbo_edca; | 905 | bool current_turbo_edca; |
906 | bool bis_any_nonbepkts; /*out dm */ | 906 | bool is_any_nonbepkts; /*out dm */ |
907 | bool bis_cur_rdlstate; | 907 | bool is_cur_rdlstate; |
908 | bool btxpower_trackingInit; | 908 | bool txpower_trackingInit; |
909 | bool b_disable_framebursting; | 909 | bool disable_framebursting; |
910 | bool b_cck_inch14; | 910 | bool cck_inch14; |
911 | bool btxpower_tracking; | 911 | bool txpower_tracking; |
912 | bool b_useramask; | 912 | bool useramask; |
913 | bool brfpath_rxenable[4]; | 913 | bool rfpath_rxenable[4]; |
914 | 914 | ||
915 | u8 thermalvalue_iqk; | 915 | u8 thermalvalue_iqk; |
916 | u8 thermalvalue_lck; | 916 | u8 thermalvalue_lck; |
@@ -928,7 +928,7 @@ struct rtl_dm { | |||
928 | #define EFUSE_MAX_LOGICAL_SIZE 128 | 928 | #define EFUSE_MAX_LOGICAL_SIZE 128 |
929 | 929 | ||
930 | struct rtl_efuse { | 930 | struct rtl_efuse { |
931 | bool bautoLoad_ok; | 931 | bool autoLoad_ok; |
932 | bool bootfromefuse; | 932 | bool bootfromefuse; |
933 | u16 max_physical_size; | 933 | u16 max_physical_size; |
934 | u8 contents[EFUSE_MAX_LOGICAL_SIZE]; | 934 | u8 contents[EFUSE_MAX_LOGICAL_SIZE]; |
@@ -950,7 +950,7 @@ struct rtl_efuse { | |||
950 | 950 | ||
951 | u8 dev_addr[6]; | 951 | u8 dev_addr[6]; |
952 | 952 | ||
953 | bool b_txpwr_fromeprom; | 953 | bool txpwr_fromeprom; |
954 | u8 eeprom_tssi[2]; | 954 | u8 eeprom_tssi[2]; |
955 | u8 eeprom_pwrlimit_ht20[3]; | 955 | u8 eeprom_pwrlimit_ht20[3]; |
956 | u8 eeprom_pwrlimit_ht40[3]; | 956 | u8 eeprom_pwrlimit_ht40[3]; |
@@ -974,15 +974,15 @@ struct rtl_efuse { | |||
974 | u8 thermalmeter[2]; | 974 | u8 thermalmeter[2]; |
975 | 975 | ||
976 | u8 legacy_ht_txpowerdiff; /*Legacy to HT rate power diff */ | 976 | u8 legacy_ht_txpowerdiff; /*Legacy to HT rate power diff */ |
977 | bool b_apk_thermalmeterignore; | 977 | bool apk_thermalmeterignore; |
978 | }; | 978 | }; |
979 | 979 | ||
980 | struct rtl_ps_ctl { | 980 | struct rtl_ps_ctl { |
981 | bool set_rfpowerstate_inprogress; | 981 | bool set_rfpowerstate_inprogress; |
982 | bool b_in_powersavemode; | 982 | bool in_powersavemode; |
983 | bool rfchange_inprogress; | 983 | bool rfchange_inprogress; |
984 | bool b_swrf_processing; | 984 | bool swrf_processing; |
985 | bool b_hwradiooff; | 985 | bool hwradiooff; |
986 | 986 | ||
987 | u32 last_sleep_jiffies; | 987 | u32 last_sleep_jiffies; |
988 | u32 last_awake_jiffies; | 988 | u32 last_awake_jiffies; |
@@ -993,23 +993,23 @@ struct rtl_ps_ctl { | |||
993 | * If it supports ASPM, Offset[560h] = 0x40, | 993 | * If it supports ASPM, Offset[560h] = 0x40, |
994 | * otherwise Offset[560h] = 0x00. | 994 | * otherwise Offset[560h] = 0x00. |
995 | * */ | 995 | * */ |
996 | bool b_support_aspm; | 996 | bool support_aspm; |
997 | bool b_support_backdoor; | 997 | bool support_backdoor; |
998 | 998 | ||
999 | /*for LPS */ | 999 | /*for LPS */ |
1000 | enum rt_psmode dot11_psmode; /*Power save mode configured. */ | 1000 | enum rt_psmode dot11_psmode; /*Power save mode configured. */ |
1001 | bool b_leisure_ps; | 1001 | bool leisure_ps; |
1002 | bool b_fwctrl_lps; | 1002 | bool fwctrl_lps; |
1003 | u8 fwctrl_psmode; | 1003 | u8 fwctrl_psmode; |
1004 | /*For Fw control LPS mode */ | 1004 | /*For Fw control LPS mode */ |
1005 | u8 b_reg_fwctrl_lps; | 1005 | u8 reg_fwctrl_lps; |
1006 | /*Record Fw PS mode status. */ | 1006 | /*Record Fw PS mode status. */ |
1007 | bool b_fw_current_inpsmode; | 1007 | bool fw_current_inpsmode; |
1008 | u8 reg_max_lps_awakeintvl; | 1008 | u8 reg_max_lps_awakeintvl; |
1009 | bool report_linked; | 1009 | bool report_linked; |
1010 | 1010 | ||
1011 | /*for IPS */ | 1011 | /*for IPS */ |
1012 | bool b_inactiveps; | 1012 | bool inactiveps; |
1013 | 1013 | ||
1014 | u32 rfoff_reason; | 1014 | u32 rfoff_reason; |
1015 | 1015 | ||
@@ -1047,10 +1047,10 @@ struct rtl_stats { | |||
1047 | s32 recvsignalpower; | 1047 | s32 recvsignalpower; |
1048 | s8 rxpower; /*in dBm Translate from PWdB */ | 1048 | s8 rxpower; /*in dBm Translate from PWdB */ |
1049 | u8 signalstrength; /*in 0-100 index. */ | 1049 | u8 signalstrength; /*in 0-100 index. */ |
1050 | u16 b_hwerror:1; | 1050 | u16 hwerror:1; |
1051 | u16 b_crc:1; | 1051 | u16 crc:1; |
1052 | u16 b_icv:1; | 1052 | u16 icv:1; |
1053 | u16 b_shortpreamble:1; | 1053 | u16 shortpreamble:1; |
1054 | u16 antenna:1; | 1054 | u16 antenna:1; |
1055 | u16 decrypted:1; | 1055 | u16 decrypted:1; |
1056 | u16 wakeup:1; | 1056 | u16 wakeup:1; |
@@ -1059,15 +1059,15 @@ struct rtl_stats { | |||
1059 | 1059 | ||
1060 | u8 rx_drvinfo_size; | 1060 | u8 rx_drvinfo_size; |
1061 | u8 rx_bufshift; | 1061 | u8 rx_bufshift; |
1062 | bool b_isampdu; | 1062 | bool isampdu; |
1063 | bool rx_is40Mhzpacket; | 1063 | bool rx_is40Mhzpacket; |
1064 | u32 rx_pwdb_all; | 1064 | u32 rx_pwdb_all; |
1065 | u8 rx_mimo_signalstrength[4]; /*in 0~100 index */ | 1065 | u8 rx_mimo_signalstrength[4]; /*in 0~100 index */ |
1066 | s8 rx_mimo_signalquality[2]; | 1066 | s8 rx_mimo_signalquality[2]; |
1067 | bool b_packet_matchbssid; | 1067 | bool packet_matchbssid; |
1068 | bool b_is_cck; | 1068 | bool is_cck; |
1069 | bool b_packet_toself; | 1069 | bool packet_toself; |
1070 | bool b_packet_beacon; /*for rssi */ | 1070 | bool packet_beacon; /*for rssi */ |
1071 | char cck_adc_pwdb[4]; /*for rx path selection */ | 1071 | char cck_adc_pwdb[4]; /*for rx path selection */ |
1072 | }; | 1072 | }; |
1073 | 1073 | ||
@@ -1078,23 +1078,23 @@ struct rt_link_detect { | |||
1078 | u32 num_tx_inperiod; | 1078 | u32 num_tx_inperiod; |
1079 | u32 num_rx_inperiod; | 1079 | u32 num_rx_inperiod; |
1080 | 1080 | ||
1081 | bool b_busytraffic; | 1081 | bool busytraffic; |
1082 | bool b_higher_busytraffic; | 1082 | bool higher_busytraffic; |
1083 | bool b_higher_busyrxtraffic; | 1083 | bool higher_busyrxtraffic; |
1084 | }; | 1084 | }; |
1085 | 1085 | ||
1086 | struct rtl_tcb_desc { | 1086 | struct rtl_tcb_desc { |
1087 | u8 b_packet_bw:1; | 1087 | u8 packet_bw:1; |
1088 | u8 b_multicast:1; | 1088 | u8 multicast:1; |
1089 | u8 b_broadcast:1; | 1089 | u8 broadcast:1; |
1090 | 1090 | ||
1091 | u8 b_rts_stbc:1; | 1091 | u8 rts_stbc:1; |
1092 | u8 b_rts_enable:1; | 1092 | u8 rts_enable:1; |
1093 | u8 b_cts_enable:1; | 1093 | u8 cts_enable:1; |
1094 | u8 b_rts_use_shortpreamble:1; | 1094 | u8 rts_use_shortpreamble:1; |
1095 | u8 b_rts_use_shortgi:1; | 1095 | u8 rts_use_shortgi:1; |
1096 | u8 rts_sc:1; | 1096 | u8 rts_sc:1; |
1097 | u8 b_rts_bw:1; | 1097 | u8 rts_bw:1; |
1098 | u8 rts_rate; | 1098 | u8 rts_rate; |
1099 | 1099 | ||
1100 | u8 use_shortgi:1; | 1100 | u8 use_shortgi:1; |
@@ -1137,23 +1137,23 @@ struct rtl_hal_ops { | |||
1137 | struct ieee80211_tx_info *info, | 1137 | struct ieee80211_tx_info *info, |
1138 | struct sk_buff *skb, unsigned int queue_index); | 1138 | struct sk_buff *skb, unsigned int queue_index); |
1139 | void (*fill_tx_cmddesc) (struct ieee80211_hw *hw, u8 *pdesc, | 1139 | void (*fill_tx_cmddesc) (struct ieee80211_hw *hw, u8 *pdesc, |
1140 | bool b_firstseg, bool b_lastseg, | 1140 | bool firstseg, bool lastseg, |
1141 | struct sk_buff *skb); | 1141 | struct sk_buff *skb); |
1142 | bool (*cmd_send_packet)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1142 | bool (*cmd_send_packet)(struct ieee80211_hw *hw, struct sk_buff *skb); |
1143 | bool(*query_rx_desc) (struct ieee80211_hw *hw, | 1143 | bool (*query_rx_desc) (struct ieee80211_hw *hw, |
1144 | struct rtl_stats *stats, | 1144 | struct rtl_stats *stats, |
1145 | struct ieee80211_rx_status *rx_status, | 1145 | struct ieee80211_rx_status *rx_status, |
1146 | u8 *pdesc, struct sk_buff *skb); | 1146 | u8 *pdesc, struct sk_buff *skb); |
1147 | void (*set_channel_access) (struct ieee80211_hw *hw); | 1147 | void (*set_channel_access) (struct ieee80211_hw *hw); |
1148 | bool(*radio_onoff_checking) (struct ieee80211_hw *hw, u8 *valid); | 1148 | bool (*radio_onoff_checking) (struct ieee80211_hw *hw, u8 *valid); |
1149 | void (*dm_watchdog) (struct ieee80211_hw *hw); | 1149 | void (*dm_watchdog) (struct ieee80211_hw *hw); |
1150 | void (*scan_operation_backup) (struct ieee80211_hw *hw, u8 operation); | 1150 | void (*scan_operation_backup) (struct ieee80211_hw *hw, u8 operation); |
1151 | bool(*set_rf_power_state) (struct ieee80211_hw *hw, | 1151 | bool (*set_rf_power_state) (struct ieee80211_hw *hw, |
1152 | enum rf_pwrstate rfpwr_state); | 1152 | enum rf_pwrstate rfpwr_state); |
1153 | void (*led_control) (struct ieee80211_hw *hw, | 1153 | void (*led_control) (struct ieee80211_hw *hw, |
1154 | enum led_ctl_mode ledaction); | 1154 | enum led_ctl_mode ledaction); |
1155 | void (*set_desc) (u8 *pdesc, bool istx, u8 desc_name, u8 *val); | 1155 | void (*set_desc) (u8 *pdesc, bool istx, u8 desc_name, u8 *val); |
1156 | u32(*get_desc) (u8 *pdesc, bool istx, u8 desc_name); | 1156 | u32 (*get_desc) (u8 *pdesc, bool istx, u8 desc_name); |
1157 | void (*tx_polling) (struct ieee80211_hw *hw, unsigned int hw_queue); | 1157 | void (*tx_polling) (struct ieee80211_hw *hw, unsigned int hw_queue); |
1158 | void (*enable_hw_sec) (struct ieee80211_hw *hw); | 1158 | void (*enable_hw_sec) (struct ieee80211_hw *hw); |
1159 | void (*set_key) (struct ieee80211_hw *hw, u32 key_index, | 1159 | void (*set_key) (struct ieee80211_hw *hw, u32 key_index, |
@@ -1161,10 +1161,10 @@ struct rtl_hal_ops { | |||
1161 | bool is_wepkey, bool clear_all); | 1161 | bool is_wepkey, bool clear_all); |
1162 | void (*init_sw_leds) (struct ieee80211_hw *hw); | 1162 | void (*init_sw_leds) (struct ieee80211_hw *hw); |
1163 | void (*deinit_sw_leds) (struct ieee80211_hw *hw); | 1163 | void (*deinit_sw_leds) (struct ieee80211_hw *hw); |
1164 | u32(*get_bbreg) (struct ieee80211_hw *hw, u32 regaddr, u32 bitmask); | 1164 | u32 (*get_bbreg) (struct ieee80211_hw *hw, u32 regaddr, u32 bitmask); |
1165 | void (*set_bbreg) (struct ieee80211_hw *hw, u32 regaddr, u32 bitmask, | 1165 | void (*set_bbreg) (struct ieee80211_hw *hw, u32 regaddr, u32 bitmask, |
1166 | u32 data); | 1166 | u32 data); |
1167 | u32(*get_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath, | 1167 | u32 (*get_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath, |
1168 | u32 regaddr, u32 bitmask); | 1168 | u32 regaddr, u32 bitmask); |
1169 | void (*set_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath, | 1169 | void (*set_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath, |
1170 | u32 regaddr, u32 bitmask, u32 data); | 1170 | u32 regaddr, u32 bitmask, u32 data); |