aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2012-10-25 14:46:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-11-14 14:55:31 -0500
commit0f01545346cd97f823fc0aaf0c02d4fc7bec6d46 (patch)
tree4ec829f93837777e96c32a20cd651613f643094a /drivers/net/wireless/rtlwifi
parenta29059359dea80065559cd4d56149cbe10350cf9 (diff)
rtlwifi: rtl8192ce: rtl8192cu: rtl8192se: rtl81723ae: Turn on building of the new driver
This patch completes the addition of the new driver for the Realtek RTL8723AE devices by adding the make file and by modifying Kconfig and Makefile of rtlwifi. Some variable names were shortened to ease the problem of limiting all lines to 80 characters, thus changes were made to wifi.h and rtl8192{ce,cu,sw}/hw.c. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: <chaoming_li@realsil.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r--drivers/net/wireless/rtlwifi/Makefile4
-rw-r--r--drivers/net/wireless/rtlwifi/base.c24
-rw-r--r--drivers/net/wireless/rtlwifi/base.h2
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c20
-rw-r--r--drivers/net/wireless/rtlwifi/pci.h1
-rw-r--r--drivers/net/wireless/rtlwifi/rc.c3
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/Makefile22
-rw-r--r--drivers/net/wireless/rtlwifi/stats.c27
-rw-r--r--drivers/net/wireless/rtlwifi/wifi.h108
9 files changed, 181 insertions, 30 deletions
diff --git a/drivers/net/wireless/rtlwifi/Makefile b/drivers/net/wireless/rtlwifi/Makefile
index 97935c565bab..3b1cbac741e3 100644
--- a/drivers/net/wireless/rtlwifi/Makefile
+++ b/drivers/net/wireless/rtlwifi/Makefile
@@ -7,7 +7,8 @@ rtlwifi-objs := \
7 efuse.o \ 7 efuse.o \
8 ps.o \ 8 ps.o \
9 rc.o \ 9 rc.o \
10 regd.o 10 regd.o \
11 stats.o
11 12
12rtl8192c_common-objs += \ 13rtl8192c_common-objs += \
13 14
@@ -24,5 +25,6 @@ obj-$(CONFIG_RTL8192CE) += rtl8192ce/
24obj-$(CONFIG_RTL8192CU) += rtl8192cu/ 25obj-$(CONFIG_RTL8192CU) += rtl8192cu/
25obj-$(CONFIG_RTL8192SE) += rtl8192se/ 26obj-$(CONFIG_RTL8192SE) += rtl8192se/
26obj-$(CONFIG_RTL8192DE) += rtl8192de/ 27obj-$(CONFIG_RTL8192DE) += rtl8192de/
28obj-$(CONFIG_RTL8723AE) += rtl8723ae/
27 29
28ccflags-y += -D__CHECK_ENDIAN__ 30ccflags-y += -D__CHECK_ENDIAN__
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 59381fe8ed06..4494d130b37c 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -826,6 +826,30 @@ int rtlwifi_rate_mapping(struct ieee80211_hw *hw,
826} 826}
827EXPORT_SYMBOL(rtlwifi_rate_mapping); 827EXPORT_SYMBOL(rtlwifi_rate_mapping);
828 828
829bool rtl_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb)
830{
831 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
832 struct rtl_priv *rtlpriv = rtl_priv(hw);
833 __le16 fc = rtl_get_fc(skb);
834
835 if (rtlpriv->dm.supp_phymode_switch &&
836 mac->link_state < MAC80211_LINKED &&
837 (ieee80211_is_auth(fc) || ieee80211_is_probe_req(fc))) {
838 if (rtlpriv->cfg->ops->check_switch_to_dmdp)
839 rtlpriv->cfg->ops->check_switch_to_dmdp(hw);
840 }
841 if (ieee80211_is_auth(fc)) {
842 RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n");
843 rtl_ips_nic_on(hw);
844
845 mac->link_state = MAC80211_LINKING;
846 /* Dual mac */
847 rtlpriv->phy.need_iqk = true;
848 }
849
850 return true;
851}
852
829void rtl_get_tcb_desc(struct ieee80211_hw *hw, 853void rtl_get_tcb_desc(struct ieee80211_hw *hw,
830 struct ieee80211_tx_info *info, 854 struct ieee80211_tx_info *info,
831 struct ieee80211_sta *sta, 855 struct ieee80211_sta *sta,
diff --git a/drivers/net/wireless/rtlwifi/base.h b/drivers/net/wireless/rtlwifi/base.h
index f35af0fdaaf0..5a8c80e259f7 100644
--- a/drivers/net/wireless/rtlwifi/base.h
+++ b/drivers/net/wireless/rtlwifi/base.h
@@ -142,4 +142,6 @@ u8 rtl_tid_to_ac(u8 tid);
142extern struct attribute_group rtl_attribute_group; 142extern struct attribute_group rtl_attribute_group;
143int rtlwifi_rate_mapping(struct ieee80211_hw *hw, 143int rtlwifi_rate_mapping(struct ieee80211_hw *hw,
144 bool isht, u8 desc_rate, bool first_ampdu); 144 bool isht, u8 desc_rate, bool first_ampdu);
145bool rtl_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb);
146
145#endif 147#endif
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index abc306b502ac..f38e30a947bc 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1309,6 +1309,7 @@ static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
1309 struct rtl_priv *rtlpriv = rtl_priv(hw); 1309 struct rtl_priv *rtlpriv = rtl_priv(hw);
1310 struct rtl_sta_info *sta_entry = NULL; 1310 struct rtl_sta_info *sta_entry = NULL;
1311 u8 tid = rtl_get_tid(skb); 1311 u8 tid = rtl_get_tid(skb);
1312 __le16 fc = rtl_get_fc(skb);
1312 1313
1313 if (!sta) 1314 if (!sta)
1314 return false; 1315 return false;
@@ -1316,6 +1317,12 @@ static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
1316 1317
1317 if (!rtlpriv->rtlhal.earlymode_enable) 1318 if (!rtlpriv->rtlhal.earlymode_enable)
1318 return false; 1319 return false;
1320 if (ieee80211_is_nullfunc(fc))
1321 return false;
1322 if (ieee80211_is_qos_nullfunc(fc))
1323 return false;
1324 if (ieee80211_is_pspoll(fc))
1325 return false;
1319 if (sta_entry->tids[tid].agg.agg_state != RTL_AGG_OPERATIONAL) 1326 if (sta_entry->tids[tid].agg.agg_state != RTL_AGG_OPERATIONAL)
1320 return false; 1327 return false;
1321 if (_rtl_mac_to_hwqueue(hw, skb) > VO_QUEUE) 1328 if (_rtl_mac_to_hwqueue(hw, skb) > VO_QUEUE)
@@ -1357,10 +1364,8 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
1357 u8 own; 1364 u8 own;
1358 u8 temp_one = 1; 1365 u8 temp_one = 1;
1359 1366
1360 if (ieee80211_is_auth(fc)) { 1367 if (ieee80211_is_mgmt(fc))
1361 RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n"); 1368 rtl_tx_mgmt_proc(hw, skb);
1362 rtl_ips_nic_on(hw);
1363 }
1364 1369
1365 if (rtlpriv->psc.sw_ps_enabled) { 1370 if (rtlpriv->psc.sw_ps_enabled) {
1366 if (ieee80211_is_data(fc) && !ieee80211_is_nullfunc(fc) && 1371 if (ieee80211_is_data(fc) && !ieee80211_is_nullfunc(fc) &&
@@ -1628,7 +1633,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
1628 "8192 PCI-E is found - vid/did=%x/%x\n", 1633 "8192 PCI-E is found - vid/did=%x/%x\n",
1629 venderid, deviceid); 1634 venderid, deviceid);
1630 rtlhal->hw_type = HARDWARE_TYPE_RTL8192E; 1635 rtlhal->hw_type = HARDWARE_TYPE_RTL8192E;
1631 break; 1636 return false;
1632 case RTL_PCI_REVISION_ID_8192SE: 1637 case RTL_PCI_REVISION_ID_8192SE:
1633 RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, 1638 RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
1634 "8192SE is found - vid/did=%x/%x\n", 1639 "8192SE is found - vid/did=%x/%x\n",
@@ -1643,6 +1648,11 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
1643 break; 1648 break;
1644 1649
1645 } 1650 }
1651 } else if (deviceid == RTL_PCI_8723AE_DID) {
1652 rtlhal->hw_type = HARDWARE_TYPE_RTL8723AE;
1653 RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
1654 "8723AE PCI-E is found - "
1655 "vid/did=%x/%x\n", venderid, deviceid);
1646 } else if (deviceid == RTL_PCI_8192CET_DID || 1656 } else if (deviceid == RTL_PCI_8192CET_DID ||
1647 deviceid == RTL_PCI_8192CE_DID || 1657 deviceid == RTL_PCI_8192CE_DID ||
1648 deviceid == RTL_PCI_8191CE_DID || 1658 deviceid == RTL_PCI_8191CE_DID ||
diff --git a/drivers/net/wireless/rtlwifi/pci.h b/drivers/net/wireless/rtlwifi/pci.h
index b29de936272c..f71b12aa8cb4 100644
--- a/drivers/net/wireless/rtlwifi/pci.h
+++ b/drivers/net/wireless/rtlwifi/pci.h
@@ -79,6 +79,7 @@
79#define RTL_PCI_8173_DID 0x8173 /*8191 SE Crab */ 79#define RTL_PCI_8173_DID 0x8173 /*8191 SE Crab */
80#define RTL_PCI_8172_DID 0x8172 /*8191 SE RE */ 80#define RTL_PCI_8172_DID 0x8172 /*8191 SE RE */
81#define RTL_PCI_8171_DID 0x8171 /*8191 SE Unicron */ 81#define RTL_PCI_8171_DID 0x8171 /*8191 SE Unicron */
82#define RTL_PCI_8723AE_DID 0x8723 /*8723AE */
82#define RTL_PCI_0045_DID 0x0045 /*8190 PCI for Ceraga */ 83#define RTL_PCI_0045_DID 0x0045 /*8190 PCI for Ceraga */
83#define RTL_PCI_0046_DID 0x0046 /*8190 Cardbus for Ceraga */ 84#define RTL_PCI_0046_DID 0x0046 /*8190 Cardbus for Ceraga */
84#define RTL_PCI_0044_DID 0x0044 /*8192e PCIE for Ceraga */ 85#define RTL_PCI_0044_DID 0x0044 /*8192e PCIE for Ceraga */
diff --git a/drivers/net/wireless/rtlwifi/rc.c b/drivers/net/wireless/rtlwifi/rc.c
index d5cbf01da8ac..c1e065f136ba 100644
--- a/drivers/net/wireless/rtlwifi/rc.c
+++ b/drivers/net/wireless/rtlwifi/rc.c
@@ -55,7 +55,8 @@ static u8 _rtl_rc_get_highest_rix(struct rtl_priv *rtlpriv,
55 * 1M we will not use FW rate but user rate. 55 * 1M we will not use FW rate but user rate.
56 */ 56 */
57 if (rtlmac->opmode == NL80211_IFTYPE_AP || 57 if (rtlmac->opmode == NL80211_IFTYPE_AP ||
58 rtlmac->opmode == NL80211_IFTYPE_ADHOC) { 58 rtlmac->opmode == NL80211_IFTYPE_ADHOC ||
59 rtlmac->opmode == NL80211_IFTYPE_MESH_POINT) {
59 if (sta) { 60 if (sta) {
60 sta_entry = (struct rtl_sta_info *) sta->drv_priv; 61 sta_entry = (struct rtl_sta_info *) sta->drv_priv;
61 wireless_mode = sta_entry->wireless_mode; 62 wireless_mode = sta_entry->wireless_mode;
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/Makefile b/drivers/net/wireless/rtlwifi/rtl8723ae/Makefile
new file mode 100644
index 000000000000..4ed731f09b1f
--- /dev/null
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/Makefile
@@ -0,0 +1,22 @@
1obj-m := rtl8723ae.o
2
3
4rtl8723ae-objs := \
5 dm.o \
6 fw.o \
7 hal_btc.o \
8 hal_bt_coexist.o\
9 hw.o \
10 led.o \
11 phy.o \
12 pwrseq.o \
13 pwrseqcmd.o \
14 rf.o \
15 sw.o \
16 table.o \
17 trx.o \
18
19
20obj-$(CONFIG_RTL8723AE) += rtl8723ae.o
21
22ccflags-y += -D__CHECK_ENDIAN__
diff --git a/drivers/net/wireless/rtlwifi/stats.c b/drivers/net/wireless/rtlwifi/stats.c
index 25f6f424d6fb..8ed31744a054 100644
--- a/drivers/net/wireless/rtlwifi/stats.c
+++ b/drivers/net/wireless/rtlwifi/stats.c
@@ -175,7 +175,7 @@ static void rtl_process_pwdb(struct ieee80211_hw *hw, struct rtl_stats *pstatus)
175 struct rtl_priv *rtlpriv = rtl_priv(hw); 175 struct rtl_priv *rtlpriv = rtl_priv(hw);
176 struct rtl_sta_info *drv_priv = NULL; 176 struct rtl_sta_info *drv_priv = NULL;
177 struct ieee80211_sta *sta = NULL; 177 struct ieee80211_sta *sta = NULL;
178 long undecorated_smoothed_pwdb; 178 long undec_sm_pwdb;
179 179
180 rcu_read_lock(); 180 rcu_read_lock();
181 if (rtlpriv->mac80211.opmode != NL80211_IFTYPE_STATION) 181 if (rtlpriv->mac80211.opmode != NL80211_IFTYPE_STATION)
@@ -184,32 +184,27 @@ static void rtl_process_pwdb(struct ieee80211_hw *hw, struct rtl_stats *pstatus)
184 /* adhoc or ap mode */ 184 /* adhoc or ap mode */
185 if (sta) { 185 if (sta) {
186 drv_priv = (struct rtl_sta_info *) sta->drv_priv; 186 drv_priv = (struct rtl_sta_info *) sta->drv_priv;
187 undecorated_smoothed_pwdb = 187 undec_sm_pwdb = drv_priv->rssi_stat.undec_sm_pwdb;
188 drv_priv->rssi_stat.undecorated_smoothed_pwdb;
189 } else { 188 } else {
190 undecorated_smoothed_pwdb = 189 undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
191 rtlpriv->dm.undecorated_smoothed_pwdb;
192 } 190 }
193 191
194 if (undecorated_smoothed_pwdb < 0) 192 if (undec_sm_pwdb < 0)
195 undecorated_smoothed_pwdb = pstatus->rx_pwdb_all; 193 undec_sm_pwdb = pstatus->rx_pwdb_all;
196 if (pstatus->rx_pwdb_all > (u32) undecorated_smoothed_pwdb) { 194 if (pstatus->rx_pwdb_all > (u32) undec_sm_pwdb) {
197 undecorated_smoothed_pwdb = (((undecorated_smoothed_pwdb) * 195 undec_sm_pwdb = (((undec_sm_pwdb) *
198 (RX_SMOOTH_FACTOR - 1)) + 196 (RX_SMOOTH_FACTOR - 1)) +
199 (pstatus->rx_pwdb_all)) / (RX_SMOOTH_FACTOR); 197 (pstatus->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
200 undecorated_smoothed_pwdb = undecorated_smoothed_pwdb + 1; 198 undec_sm_pwdb = undec_sm_pwdb + 1;
201 } else { 199 } else {
202 undecorated_smoothed_pwdb = (((undecorated_smoothed_pwdb) * 200 undec_sm_pwdb = (((undec_sm_pwdb) * (RX_SMOOTH_FACTOR - 1)) +
203 (RX_SMOOTH_FACTOR - 1)) +
204 (pstatus->rx_pwdb_all)) / (RX_SMOOTH_FACTOR); 201 (pstatus->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
205 } 202 }
206 203
207 if (sta) { 204 if (sta) {
208 drv_priv->rssi_stat.undecorated_smoothed_pwdb = 205 drv_priv->rssi_stat.undec_sm_pwdb = undec_sm_pwdb;
209 undecorated_smoothed_pwdb;
210 } else { 206 } else {
211 rtlpriv->dm.undecorated_smoothed_pwdb = 207 rtlpriv->dm.undec_sm_pwdb = undec_sm_pwdb;
212 undecorated_smoothed_pwdb;
213 } 208 }
214 rcu_read_unlock(); 209 rcu_read_unlock();
215 210
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index 6794b688dd7d..21a5f4f4a135 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -350,6 +350,11 @@ enum rt_oem_id {
350 RT_CID_819x_WNC_COREGA = 31, 350 RT_CID_819x_WNC_COREGA = 31,
351 RT_CID_819x_Foxcoon = 32, 351 RT_CID_819x_Foxcoon = 32,
352 RT_CID_819x_DELL = 33, 352 RT_CID_819x_DELL = 33,
353 RT_CID_819x_PRONETS = 34,
354 RT_CID_819x_Edimax_ASUS = 35,
355 RT_CID_NETGEAR = 36,
356 RT_CID_PLANEX = 37,
357 RT_CID_CC_C = 38,
353}; 358};
354 359
355enum hw_descs { 360enum hw_descs {
@@ -505,6 +510,7 @@ enum rtl_var_map {
505 RTL_IMR_ROK, /*Receive DMA OK Interrupt */ 510 RTL_IMR_ROK, /*Receive DMA OK Interrupt */
506 RTL_IBSS_INT_MASKS, /*(RTL_IMR_BcnInt | RTL_IMR_TBDOK | 511 RTL_IBSS_INT_MASKS, /*(RTL_IMR_BcnInt | RTL_IMR_TBDOK |
507 * RTL_IMR_TBDER) */ 512 * RTL_IMR_TBDER) */
513 RTL_IMR_C2HCMD, /*fw interrupt*/
508 514
509 /*CCK Rates, TxHT = 0 */ 515 /*CCK Rates, TxHT = 0 */
510 RTL_RC_CCK_RATE1M, 516 RTL_RC_CCK_RATE1M,
@@ -661,6 +667,11 @@ enum ba_action {
661 ACT_DELBA = 2, 667 ACT_DELBA = 2,
662}; 668};
663 669
670enum rt_polarity_ctl {
671 RT_POLARITY_LOW_ACT = 0,
672 RT_POLARITY_HIGH_ACT = 1,
673};
674
664struct octet_string { 675struct octet_string {
665 u8 *octet; 676 u8 *octet;
666 u16 length; 677 u16 length;
@@ -903,6 +914,8 @@ struct rtl_phy {
903 u8 num_total_rfpath; 914 u8 num_total_rfpath;
904 struct phy_parameters hwparam_tables[MAX_TAB]; 915 struct phy_parameters hwparam_tables[MAX_TAB];
905 u16 rf_pathmap; 916 u16 rf_pathmap;
917
918 enum rt_polarity_ctl polarity_ctl;
906}; 919};
907 920
908#define MAX_TID_COUNT 9 921#define MAX_TID_COUNT 9
@@ -1042,13 +1055,64 @@ struct rtl_mac {
1042 /*QOS & EDCA */ 1055 /*QOS & EDCA */
1043 struct ieee80211_tx_queue_params edca_param[RTL_MAC80211_NUM_QUEUE]; 1056 struct ieee80211_tx_queue_params edca_param[RTL_MAC80211_NUM_QUEUE];
1044 struct rtl_qos_parameters ac[AC_MAX]; 1057 struct rtl_qos_parameters ac[AC_MAX];
1058
1059 /* counters */
1060 u64 last_txok_cnt;
1061 u64 last_rxok_cnt;
1062 u32 last_bt_edca_ul;
1063 u32 last_bt_edca_dl;
1064};
1065
1066struct btdm_8723 {
1067 bool all_off;
1068 bool agc_table_en;
1069 bool adc_back_off_on;
1070 bool b2_ant_hid_en;
1071 bool low_penalty_rate_adaptive;
1072 bool rf_rx_lpf_shrink;
1073 bool reject_aggre_pkt;
1074 bool tra_tdma_on;
1075 u8 tra_tdma_nav;
1076 u8 tra_tdma_ant;
1077 bool tdma_on;
1078 u8 tdma_ant;
1079 u8 tdma_nav;
1080 u8 tdma_dac_swing;
1081 u8 fw_dac_swing_lvl;
1082 bool ps_tdma_on;
1083 u8 ps_tdma_byte[5];
1084 bool pta_on;
1085 u32 val_0x6c0;
1086 u32 val_0x6c8;
1087 u32 val_0x6cc;
1088 bool sw_dac_swing_on;
1089 u32 sw_dac_swing_lvl;
1090 u32 wlan_act_hi;
1091 u32 wlan_act_lo;
1092 u32 bt_retry_index;
1093 bool dec_bt_pwr;
1094 bool ignore_wlan_act;
1095};
1096
1097struct bt_coexist_8723 {
1098 u32 high_priority_tx;
1099 u32 high_priority_rx;
1100 u32 low_priority_tx;
1101 u32 low_priority_rx;
1102 u8 c2h_bt_info;
1103 bool c2h_bt_info_req_sent;
1104 bool c2h_bt_inquiry_page;
1105 u32 bt_inq_page_start_time;
1106 u8 bt_retry_cnt;
1107 u8 c2h_bt_info_original;
1108 u8 bt_inquiry_page_cnt;
1109 struct btdm_8723 btdm;
1045}; 1110};
1046 1111
1047struct rtl_hal { 1112struct rtl_hal {
1048 struct ieee80211_hw *hw; 1113 struct ieee80211_hw *hw;
1049 1114 struct bt_coexist_8723 hal_coex_8723;
1050 bool up_first_time; 1115 bool up_first_time;
1051 bool first_init;
1052 bool being_init_adapter; 1116 bool being_init_adapter;
1053 bool bbrf_ready; 1117 bool bbrf_ready;
1054 1118
@@ -1312,6 +1376,7 @@ struct rtl_ps_ctl {
1312}; 1376};
1313 1377
1314struct rtl_stats { 1378struct rtl_stats {
1379 u8 psaddr[ETH_ALEN];
1315 u32 mac_time[2]; 1380 u32 mac_time[2];
1316 s8 rssi; 1381 s8 rssi;
1317 u8 signal; 1382 u8 signal;
@@ -1503,6 +1568,7 @@ struct rtl_hal_ops {
1503 void (*phy_lc_calibrate) (struct ieee80211_hw *hw, bool is2t); 1568 void (*phy_lc_calibrate) (struct ieee80211_hw *hw, bool is2t);
1504 void (*phy_set_bw_mode_callback) (struct ieee80211_hw *hw); 1569 void (*phy_set_bw_mode_callback) (struct ieee80211_hw *hw);
1505 void (*dm_dynamic_txpower) (struct ieee80211_hw *hw); 1570 void (*dm_dynamic_txpower) (struct ieee80211_hw *hw);
1571 void (*c2h_command_handle) (struct ieee80211_hw *hw);
1506 void (*bt_wifi_media_status_notify) (struct ieee80211_hw *hw, 1572 void (*bt_wifi_media_status_notify) (struct ieee80211_hw *hw,
1507 bool mstate); 1573 bool mstate);
1508 void (*bt_coex_off_before_lps) (struct ieee80211_hw *hw); 1574 void (*bt_coex_off_before_lps) (struct ieee80211_hw *hw);
@@ -1784,9 +1850,22 @@ struct rtl_priv {
1784 struct dig_t dm_digtable; 1850 struct dig_t dm_digtable;
1785 struct ps_t dm_pstable; 1851 struct ps_t dm_pstable;
1786 1852
1787 /* data buffer pointer for USB reads */ 1853 /* section shared by individual drivers */
1788 __le32 *usb_data; 1854 union {
1789 int usb_data_index; 1855 struct { /* data buffer pointer for USB reads */
1856 __le32 *usb_data;
1857 int usb_data_index;
1858 bool initialized;
1859 };
1860 struct { /* section for 8723ae */
1861 bool reg_init; /* true if regs saved */
1862 u32 reg_874;
1863 u32 reg_c70;
1864 u32 reg_85c;
1865 u32 reg_a74;
1866 bool bt_operation_on;
1867 };
1868 };
1790 1869
1791 /*This must be the last item so 1870 /*This must be the last item so
1792 that it points to the data allocated 1871 that it points to the data allocated
@@ -1818,6 +1897,7 @@ enum bt_co_type {
1818 BT_CSR_BC4 = 3, 1897 BT_CSR_BC4 = 3,
1819 BT_CSR_BC8 = 4, 1898 BT_CSR_BC8 = 4,
1820 BT_RTL8756 = 5, 1899 BT_RTL8756 = 5,
1900 BT_RTL8723A = 6,
1821}; 1901};
1822 1902
1823enum bt_cur_state { 1903enum bt_cur_state {
@@ -1876,13 +1956,27 @@ struct bt_coexist_info {
1876 1956
1877 bool fw_coexist_all_off; 1957 bool fw_coexist_all_off;
1878 bool sw_coexist_all_off; 1958 bool sw_coexist_all_off;
1879 u32 current_state; 1959 bool hw_coexist_all_off;
1960 u32 cstate;
1880 u32 previous_state; 1961 u32 previous_state;
1962 u32 cstate_h;
1963 u32 previous_state_h;
1964
1881 u8 bt_pre_rssi_state; 1965 u8 bt_pre_rssi_state;
1966 u8 bt_pre_rssi_state1;
1882 1967
1883 u8 reg_bt_iso; 1968 u8 reg_bt_iso;
1884 u8 reg_bt_sco; 1969 u8 reg_bt_sco;
1885 1970 bool balance_on;
1971 u8 bt_active_zero_cnt;
1972 bool cur_bt_disabled;
1973 bool pre_bt_disabled;
1974
1975 u8 bt_profile_case;
1976 u8 bt_profile_action;
1977 bool bt_busy;
1978 bool hold_for_bt_operation;
1979 u8 lps_counter;
1886}; 1980};
1887 1981
1888 1982