aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r--drivers/net/wireless/rtlwifi/cam.h10
-rw-r--r--drivers/net/wireless/rtlwifi/core.c10
-rw-r--r--drivers/net/wireless/rtlwifi/efuse.h29
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8188ee/phy.h50
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192ce/phy.h47
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192ce/rf.h13
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192cu/rf.h13
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/hw.h7
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/phy.h44
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/rf.h18
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/phy.h60
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/rf.h13
-rw-r--r--drivers/net/wireless/rtlwifi/wifi.h2
13 files changed, 151 insertions, 165 deletions
diff --git a/drivers/net/wireless/rtlwifi/cam.h b/drivers/net/wireless/rtlwifi/cam.h
index 35e00086a520..0105e6c1901e 100644
--- a/drivers/net/wireless/rtlwifi/cam.h
+++ b/drivers/net/wireless/rtlwifi/cam.h
@@ -41,12 +41,12 @@
41#define CAM_CONFIG_USEDK 1 41#define CAM_CONFIG_USEDK 1
42#define CAM_CONFIG_NO_USEDK 0 42#define CAM_CONFIG_NO_USEDK 0
43 43
44extern void rtl_cam_reset_all_entry(struct ieee80211_hw *hw); 44void rtl_cam_reset_all_entry(struct ieee80211_hw *hw);
45extern u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr, 45u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
46 u32 ul_key_id, u32 ul_entry_idx, u32 ul_enc_alg, 46 u32 ul_key_id, u32 ul_entry_idx, u32 ul_enc_alg,
47 u32 ul_default_key, u8 *key_content); 47 u32 ul_default_key, u8 *key_content);
48int rtl_cam_delete_one_entry(struct ieee80211_hw *hw, u8 *mac_addr, 48int rtl_cam_delete_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
49 u32 ul_key_id); 49 u32 ul_key_id);
50void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index); 50void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index);
51void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index); 51void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index);
52void rtl_cam_reset_sec_info(struct ieee80211_hw *hw); 52void rtl_cam_reset_sec_info(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 733b7ce7f0e2..210ce7cd94d8 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -115,7 +115,7 @@ static void rtl_op_stop(struct ieee80211_hw *hw)
115 mutex_lock(&rtlpriv->locks.conf_mutex); 115 mutex_lock(&rtlpriv->locks.conf_mutex);
116 116
117 mac->link_state = MAC80211_NOLINK; 117 mac->link_state = MAC80211_NOLINK;
118 memset(mac->bssid, 0, 6); 118 memset(mac->bssid, 0, ETH_ALEN);
119 mac->vendor = PEER_UNKNOWN; 119 mac->vendor = PEER_UNKNOWN;
120 120
121 /*reset sec info */ 121 /*reset sec info */
@@ -280,7 +280,7 @@ static void rtl_op_remove_interface(struct ieee80211_hw *hw,
280 mac->p2p = 0; 280 mac->p2p = 0;
281 mac->vif = NULL; 281 mac->vif = NULL;
282 mac->link_state = MAC80211_NOLINK; 282 mac->link_state = MAC80211_NOLINK;
283 memset(mac->bssid, 0, 6); 283 memset(mac->bssid, 0, ETH_ALEN);
284 mac->vendor = PEER_UNKNOWN; 284 mac->vendor = PEER_UNKNOWN;
285 mac->opmode = NL80211_IFTYPE_UNSPECIFIED; 285 mac->opmode = NL80211_IFTYPE_UNSPECIFIED;
286 rtlpriv->cfg->ops->set_network_type(hw, mac->opmode); 286 rtlpriv->cfg->ops->set_network_type(hw, mac->opmode);
@@ -721,7 +721,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
721 mac->link_state = MAC80211_LINKED; 721 mac->link_state = MAC80211_LINKED;
722 mac->cnt_after_linked = 0; 722 mac->cnt_after_linked = 0;
723 mac->assoc_id = bss_conf->aid; 723 mac->assoc_id = bss_conf->aid;
724 memcpy(mac->bssid, bss_conf->bssid, 6); 724 memcpy(mac->bssid, bss_conf->bssid, ETH_ALEN);
725 725
726 if (rtlpriv->cfg->ops->linked_set_reg) 726 if (rtlpriv->cfg->ops->linked_set_reg)
727 rtlpriv->cfg->ops->linked_set_reg(hw); 727 rtlpriv->cfg->ops->linked_set_reg(hw);
@@ -750,7 +750,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
750 if (ppsc->p2p_ps_info.p2p_ps_mode > P2P_PS_NONE) 750 if (ppsc->p2p_ps_info.p2p_ps_mode > P2P_PS_NONE)
751 rtl_p2p_ps_cmd(hw, P2P_PS_DISABLE); 751 rtl_p2p_ps_cmd(hw, P2P_PS_DISABLE);
752 mac->link_state = MAC80211_NOLINK; 752 mac->link_state = MAC80211_NOLINK;
753 memset(mac->bssid, 0, 6); 753 memset(mac->bssid, 0, ETH_ALEN);
754 mac->vendor = PEER_UNKNOWN; 754 mac->vendor = PEER_UNKNOWN;
755 755
756 if (rtlpriv->dm.supp_phymode_switch) { 756 if (rtlpriv->dm.supp_phymode_switch) {
@@ -826,7 +826,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
826 bss_conf->bssid); 826 bss_conf->bssid);
827 827
828 mac->vendor = PEER_UNKNOWN; 828 mac->vendor = PEER_UNKNOWN;
829 memcpy(mac->bssid, bss_conf->bssid, 6); 829 memcpy(mac->bssid, bss_conf->bssid, ETH_ALEN);
830 rtlpriv->cfg->ops->set_network_type(hw, vif->type); 830 rtlpriv->cfg->ops->set_network_type(hw, vif->type);
831 831
832 rcu_read_lock(); 832 rcu_read_lock();
diff --git a/drivers/net/wireless/rtlwifi/efuse.h b/drivers/net/wireless/rtlwifi/efuse.h
index 395a326acfb4..1663b3afd41e 100644
--- a/drivers/net/wireless/rtlwifi/efuse.h
+++ b/drivers/net/wireless/rtlwifi/efuse.h
@@ -104,20 +104,19 @@ struct efuse_priv {
104 u8 tx_power_g[14]; 104 u8 tx_power_g[14];
105}; 105};
106 106
107extern void read_efuse_byte(struct ieee80211_hw *hw, u16 _offset, u8 *pbuf); 107void read_efuse_byte(struct ieee80211_hw *hw, u16 _offset, u8 *pbuf);
108extern void efuse_initialize(struct ieee80211_hw *hw); 108void efuse_initialize(struct ieee80211_hw *hw);
109extern u8 efuse_read_1byte(struct ieee80211_hw *hw, u16 address); 109u8 efuse_read_1byte(struct ieee80211_hw *hw, u16 address);
110extern void efuse_write_1byte(struct ieee80211_hw *hw, u16 address, u8 value); 110void efuse_write_1byte(struct ieee80211_hw *hw, u16 address, u8 value);
111extern void read_efuse(struct ieee80211_hw *hw, u16 _offset, 111void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf);
112 u16 _size_byte, u8 *pbuf); 112void efuse_shadow_read(struct ieee80211_hw *hw, u8 type, u16 offset,
113extern void efuse_shadow_read(struct ieee80211_hw *hw, u8 type, 113 u32 *value);
114 u16 offset, u32 *value); 114void efuse_shadow_write(struct ieee80211_hw *hw, u8 type, u16 offset,
115extern void efuse_shadow_write(struct ieee80211_hw *hw, u8 type, 115 u32 value);
116 u16 offset, u32 value); 116bool efuse_shadow_update(struct ieee80211_hw *hw);
117extern bool efuse_shadow_update(struct ieee80211_hw *hw); 117bool efuse_shadow_update_chk(struct ieee80211_hw *hw);
118extern bool efuse_shadow_update_chk(struct ieee80211_hw *hw); 118void rtl_efuse_shadow_map_update(struct ieee80211_hw *hw);
119extern void rtl_efuse_shadow_map_update(struct ieee80211_hw *hw); 119void efuse_force_write_vendor_Id(struct ieee80211_hw *hw);
120extern void efuse_force_write_vendor_Id(struct ieee80211_hw *hw); 120void efuse_re_pg_section(struct ieee80211_hw *hw, u8 section_idx);
121extern void efuse_re_pg_section(struct ieee80211_hw *hw, u8 section_idx);
122 121
123#endif 122#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h b/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h
index d4545f06e185..89f0f1ef1465 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h
@@ -200,35 +200,35 @@ enum _ANT_DIV_TYPE {
200 CGCS_RX_SW_ANTDIV = 0x05, 200 CGCS_RX_SW_ANTDIV = 0x05,
201}; 201};
202 202
203extern u32 rtl88e_phy_query_bb_reg(struct ieee80211_hw *hw, 203u32 rtl88e_phy_query_bb_reg(struct ieee80211_hw *hw,
204 u32 regaddr, u32 bitmask); 204 u32 regaddr, u32 bitmask);
205extern void rtl88e_phy_set_bb_reg(struct ieee80211_hw *hw, 205void rtl88e_phy_set_bb_reg(struct ieee80211_hw *hw,
206 u32 regaddr, u32 bitmask, u32 data); 206 u32 regaddr, u32 bitmask, u32 data);
207extern u32 rtl88e_phy_query_rf_reg(struct ieee80211_hw *hw, 207u32 rtl88e_phy_query_rf_reg(struct ieee80211_hw *hw,
208 enum radio_path rfpath, u32 regaddr, 208 enum radio_path rfpath, u32 regaddr,
209 u32 bitmask); 209 u32 bitmask);
210extern void rtl88e_phy_set_rf_reg(struct ieee80211_hw *hw, 210void rtl88e_phy_set_rf_reg(struct ieee80211_hw *hw,
211 enum radio_path rfpath, u32 regaddr, 211 enum radio_path rfpath, u32 regaddr,
212 u32 bitmask, u32 data); 212 u32 bitmask, u32 data);
213extern bool rtl88e_phy_mac_config(struct ieee80211_hw *hw); 213bool rtl88e_phy_mac_config(struct ieee80211_hw *hw);
214extern bool rtl88e_phy_bb_config(struct ieee80211_hw *hw); 214bool rtl88e_phy_bb_config(struct ieee80211_hw *hw);
215extern bool rtl88e_phy_rf_config(struct ieee80211_hw *hw); 215bool rtl88e_phy_rf_config(struct ieee80211_hw *hw);
216extern void rtl88e_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw); 216void rtl88e_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
217extern void rtl88e_phy_get_txpower_level(struct ieee80211_hw *hw, 217void rtl88e_phy_get_txpower_level(struct ieee80211_hw *hw,
218 long *powerlevel); 218 long *powerlevel);
219extern void rtl88e_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel); 219void rtl88e_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
220extern void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw); 220void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
221extern void rtl88e_phy_set_bw_mode(struct ieee80211_hw *hw, 221void rtl88e_phy_set_bw_mode(struct ieee80211_hw *hw,
222 enum nl80211_channel_type ch_type); 222 enum nl80211_channel_type ch_type);
223extern void rtl88e_phy_sw_chnl_callback(struct ieee80211_hw *hw); 223void rtl88e_phy_sw_chnl_callback(struct ieee80211_hw *hw);
224extern u8 rtl88e_phy_sw_chnl(struct ieee80211_hw *hw); 224u8 rtl88e_phy_sw_chnl(struct ieee80211_hw *hw);
225extern void rtl88e_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery); 225void rtl88e_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery);
226void rtl88e_phy_lc_calibrate(struct ieee80211_hw *hw); 226void rtl88e_phy_lc_calibrate(struct ieee80211_hw *hw);
227void rtl88e_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain); 227void rtl88e_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain);
228bool rtl88e_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, 228bool rtl88e_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
229 enum radio_path rfpath); 229 enum radio_path rfpath);
230bool rtl88e_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype); 230bool rtl88e_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype);
231extern bool rtl88e_phy_set_rf_power_state(struct ieee80211_hw *hw, 231bool rtl88e_phy_set_rf_power_state(struct ieee80211_hw *hw,
232 enum rf_pwrstate rfpwr_state); 232 enum rf_pwrstate rfpwr_state);
233 233
234#endif 234#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
index aeb268b190c6..94486cca4000 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
@@ -186,34 +186,29 @@ struct tx_power_struct {
186}; 186};
187 187
188bool rtl92c_phy_bb_config(struct ieee80211_hw *hw); 188bool rtl92c_phy_bb_config(struct ieee80211_hw *hw);
189u32 rtl92c_phy_query_bb_reg(struct ieee80211_hw *hw, 189u32 rtl92c_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask);
190 u32 regaddr, u32 bitmask); 190void rtl92c_phy_set_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask,
191void rtl92c_phy_set_bb_reg(struct ieee80211_hw *hw, 191 u32 data);
192 u32 regaddr, u32 bitmask, u32 data); 192u32 rtl92c_phy_query_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
193u32 rtl92c_phy_query_rf_reg(struct ieee80211_hw *hw, 193 u32 regaddr, u32 bitmask);
194 enum radio_path rfpath, u32 regaddr, 194void rtl92ce_phy_set_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
195 u32 bitmask); 195 u32 regaddr, u32 bitmask, u32 data);
196extern void rtl92ce_phy_set_rf_reg(struct ieee80211_hw *hw,
197 enum radio_path rfpath, u32 regaddr,
198 u32 bitmask, u32 data);
199bool rtl92c_phy_mac_config(struct ieee80211_hw *hw); 196bool rtl92c_phy_mac_config(struct ieee80211_hw *hw);
200bool rtl92ce_phy_bb_config(struct ieee80211_hw *hw); 197bool rtl92ce_phy_bb_config(struct ieee80211_hw *hw);
201bool rtl92c_phy_rf_config(struct ieee80211_hw *hw); 198bool rtl92c_phy_rf_config(struct ieee80211_hw *hw);
202bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw, 199bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw,
203 enum radio_path rfpath); 200 enum radio_path rfpath);
204void rtl92c_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw); 201void rtl92c_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
205void rtl92c_phy_get_txpower_level(struct ieee80211_hw *hw, 202void rtl92c_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel);
206 long *powerlevel);
207void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel); 203void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
208bool rtl92c_phy_update_txpower_dbm(struct ieee80211_hw *hw, 204bool rtl92c_phy_update_txpower_dbm(struct ieee80211_hw *hw,
209 long power_indbm); 205 long power_indbm);
210void rtl92c_phy_set_bw_mode(struct ieee80211_hw *hw, 206void rtl92c_phy_set_bw_mode(struct ieee80211_hw *hw,
211 enum nl80211_channel_type ch_type); 207 enum nl80211_channel_type ch_type);
212void rtl92c_phy_sw_chnl_callback(struct ieee80211_hw *hw); 208void rtl92c_phy_sw_chnl_callback(struct ieee80211_hw *hw);
213u8 rtl92c_phy_sw_chnl(struct ieee80211_hw *hw); 209u8 rtl92c_phy_sw_chnl(struct ieee80211_hw *hw);
214void rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery); 210void rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery);
215void rtl92c_phy_set_beacon_hw_reg(struct ieee80211_hw *hw, 211void rtl92c_phy_set_beacon_hw_reg(struct ieee80211_hw *hw, u16 beaconinterval);
216 u16 beaconinterval);
217void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta); 212void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta);
218void rtl92c_phy_lc_calibrate(struct ieee80211_hw *hw); 213void rtl92c_phy_lc_calibrate(struct ieee80211_hw *hw);
219void _rtl92ce_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t); 214void _rtl92ce_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t);
@@ -221,27 +216,25 @@ void rtl92c_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain);
221bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, 216bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
222 enum radio_path rfpath); 217 enum radio_path rfpath);
223bool rtl8192_phy_check_is_legal_rfpath(struct ieee80211_hw *hw, 218bool rtl8192_phy_check_is_legal_rfpath(struct ieee80211_hw *hw,
224 u32 rfpath); 219 u32 rfpath);
225bool rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw, 220bool rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
226 enum rf_pwrstate rfpwr_state); 221 enum rf_pwrstate rfpwr_state);
227void rtl92ce_phy_set_rf_on(struct ieee80211_hw *hw); 222void rtl92ce_phy_set_rf_on(struct ieee80211_hw *hw);
228bool rtl92c_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype); 223bool rtl92c_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype);
229void rtl92c_phy_set_io(struct ieee80211_hw *hw); 224void rtl92c_phy_set_io(struct ieee80211_hw *hw);
230void rtl92c_bb_block_on(struct ieee80211_hw *hw); 225void rtl92c_bb_block_on(struct ieee80211_hw *hw);
231u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw, 226u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw, enum radio_path rfpath,
232 enum radio_path rfpath, u32 offset); 227 u32 offset);
233u32 _rtl92c_phy_fw_rf_serial_read(struct ieee80211_hw *hw, 228u32 _rtl92c_phy_fw_rf_serial_read(struct ieee80211_hw *hw,
234 enum radio_path rfpath, u32 offset); 229 enum radio_path rfpath, u32 offset);
235u32 _rtl92c_phy_calculate_bit_shift(u32 bitmask); 230u32 _rtl92c_phy_calculate_bit_shift(u32 bitmask);
236void _rtl92c_phy_rf_serial_write(struct ieee80211_hw *hw, 231void _rtl92c_phy_rf_serial_write(struct ieee80211_hw *hw,
237 enum radio_path rfpath, u32 offset, 232 enum radio_path rfpath, u32 offset, u32 data);
238 u32 data);
239void _rtl92c_phy_fw_rf_serial_write(struct ieee80211_hw *hw, 233void _rtl92c_phy_fw_rf_serial_write(struct ieee80211_hw *hw,
240 enum radio_path rfpath, u32 offset, 234 enum radio_path rfpath, u32 offset,
241 u32 data); 235 u32 data);
242void _rtl92c_store_pwrIndex_diffrate_offset(struct ieee80211_hw *hw, 236void _rtl92c_store_pwrIndex_diffrate_offset(struct ieee80211_hw *hw,
243 u32 regaddr, u32 bitmask, 237 u32 regaddr, u32 bitmask, u32 data);
244 u32 data);
245bool _rtl92ce_phy_config_mac_with_headerfile(struct ieee80211_hw *hw); 238bool _rtl92ce_phy_config_mac_with_headerfile(struct ieee80211_hw *hw);
246void _rtl92c_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw); 239void _rtl92c_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw);
247bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw); 240bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/rf.h b/drivers/net/wireless/rtlwifi/rtl8192ce/rf.h
index 6c8d56efceae..d8fe68b389d2 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/rf.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/rf.h
@@ -34,11 +34,10 @@
34#define RF6052_MAX_REG 0x3F 34#define RF6052_MAX_REG 0x3F
35#define RF6052_MAX_PATH 2 35#define RF6052_MAX_PATH 2
36 36
37extern void rtl92ce_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, 37void rtl92ce_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth);
38 u8 bandwidth); 38void rtl92ce_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
39extern void rtl92ce_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, 39 u8 *ppowerlevel);
40 u8 *ppowerlevel); 40void rtl92ce_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
41extern void rtl92ce_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw, 41 u8 *ppowerlevel, u8 channel);
42 u8 *ppowerlevel, u8 channel); 42bool rtl92ce_phy_rf6052_config(struct ieee80211_hw *hw);
43extern bool rtl92ce_phy_rf6052_config(struct ieee80211_hw *hw);
44#endif 43#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h
index 090fd33a158d..11b439d6b671 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h
@@ -34,15 +34,14 @@
34#define RF6052_MAX_REG 0x3F 34#define RF6052_MAX_REG 0x3F
35#define RF6052_MAX_PATH 2 35#define RF6052_MAX_PATH 2
36 36
37extern void rtl92cu_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, 37void rtl92cu_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth);
38 u8 bandwidth); 38void rtl92c_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
39extern void rtl92c_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, 39 u8 *ppowerlevel);
40 u8 *ppowerlevel); 40void rtl92c_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
41extern void rtl92c_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw, 41 u8 *ppowerlevel, u8 channel);
42 u8 *ppowerlevel, u8 channel);
43bool rtl92cu_phy_rf6052_config(struct ieee80211_hw *hw); 42bool rtl92cu_phy_rf6052_config(struct ieee80211_hw *hw);
44bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, 43bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
45 enum radio_path rfpath); 44 enum radio_path rfpath);
46void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, 45void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
47 u8 *ppowerlevel); 46 u8 *ppowerlevel);
48void rtl92cu_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw, 47void rtl92cu_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.h b/drivers/net/wireless/rtlwifi/rtl8192de/hw.h
index 7c9f7a2f1e42..1bc7b1a96d4a 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.h
@@ -55,10 +55,9 @@ void rtl92de_set_key(struct ieee80211_hw *hw, u32 key_index,
55 u8 *p_macaddr, bool is_group, u8 enc_algo, 55 u8 *p_macaddr, bool is_group, u8 enc_algo,
56 bool is_wepkey, bool clear_all); 56 bool is_wepkey, bool clear_all);
57 57
58extern void rtl92de_write_dword_dbi(struct ieee80211_hw *hw, u16 offset, 58void rtl92de_write_dword_dbi(struct ieee80211_hw *hw, u16 offset, u32 value,
59 u32 value, u8 direct); 59 u8 direct);
60extern u32 rtl92de_read_dword_dbi(struct ieee80211_hw *hw, u16 offset, 60u32 rtl92de_read_dword_dbi(struct ieee80211_hw *hw, u16 offset, u8 direct);
61 u8 direct);
62void rtl92de_suspend(struct ieee80211_hw *hw); 61void rtl92de_suspend(struct ieee80211_hw *hw);
63void rtl92de_resume(struct ieee80211_hw *hw); 62void rtl92de_resume(struct ieee80211_hw *hw);
64void rtl92d_linked_set_reg(struct ieee80211_hw *hw); 63void rtl92d_linked_set_reg(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.h b/drivers/net/wireless/rtlwifi/rtl8192de/phy.h
index bef3040555dd..48d5c6835b6a 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.h
@@ -125,32 +125,32 @@ static inline void rtl92d_release_cckandrw_pagea_ctl(struct ieee80211_hw *hw,
125 *flag); 125 *flag);
126} 126}
127 127
128extern u32 rtl92d_phy_query_bb_reg(struct ieee80211_hw *hw, 128u32 rtl92d_phy_query_bb_reg(struct ieee80211_hw *hw,
129 u32 regaddr, u32 bitmask); 129 u32 regaddr, u32 bitmask);
130extern void rtl92d_phy_set_bb_reg(struct ieee80211_hw *hw, 130void rtl92d_phy_set_bb_reg(struct ieee80211_hw *hw,
131 u32 regaddr, u32 bitmask, u32 data); 131 u32 regaddr, u32 bitmask, u32 data);
132extern u32 rtl92d_phy_query_rf_reg(struct ieee80211_hw *hw, 132u32 rtl92d_phy_query_rf_reg(struct ieee80211_hw *hw,
133 enum radio_path rfpath, u32 regaddr, 133 enum radio_path rfpath, u32 regaddr,
134 u32 bitmask); 134 u32 bitmask);
135extern void rtl92d_phy_set_rf_reg(struct ieee80211_hw *hw, 135void rtl92d_phy_set_rf_reg(struct ieee80211_hw *hw,
136 enum radio_path rfpath, u32 regaddr, 136 enum radio_path rfpath, u32 regaddr,
137 u32 bitmask, u32 data); 137 u32 bitmask, u32 data);
138extern bool rtl92d_phy_mac_config(struct ieee80211_hw *hw); 138bool rtl92d_phy_mac_config(struct ieee80211_hw *hw);
139extern bool rtl92d_phy_bb_config(struct ieee80211_hw *hw); 139bool rtl92d_phy_bb_config(struct ieee80211_hw *hw);
140extern bool rtl92d_phy_rf_config(struct ieee80211_hw *hw); 140bool rtl92d_phy_rf_config(struct ieee80211_hw *hw);
141extern bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw, 141bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw,
142 enum radio_path rfpath); 142 enum radio_path rfpath);
143extern void rtl92d_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw); 143void rtl92d_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
144extern void rtl92d_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel); 144void rtl92d_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
145extern void rtl92d_phy_set_bw_mode(struct ieee80211_hw *hw, 145void rtl92d_phy_set_bw_mode(struct ieee80211_hw *hw,
146 enum nl80211_channel_type ch_type); 146 enum nl80211_channel_type ch_type);
147extern u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw); 147u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw);
148bool rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, 148bool rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
149 enum rf_content content, 149 enum rf_content content,
150 enum radio_path rfpath); 150 enum radio_path rfpath);
151bool rtl92d_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype); 151bool rtl92d_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype);
152extern bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw, 152bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
153 enum rf_pwrstate rfpwr_state); 153 enum rf_pwrstate rfpwr_state);
154 154
155void rtl92d_phy_config_macphymode(struct ieee80211_hw *hw); 155void rtl92d_phy_config_macphymode(struct ieee80211_hw *hw);
156void rtl92d_phy_config_macphymode_info(struct ieee80211_hw *hw); 156void rtl92d_phy_config_macphymode_info(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/rf.h b/drivers/net/wireless/rtlwifi/rtl8192de/rf.h
index 0fe1a48593e8..7303d12c266f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/rf.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/rf.h
@@ -30,15 +30,13 @@
30#ifndef __RTL92D_RF_H__ 30#ifndef __RTL92D_RF_H__
31#define __RTL92D_RF_H__ 31#define __RTL92D_RF_H__
32 32
33extern void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, 33void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth);
34 u8 bandwidth); 34void rtl92d_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
35extern void rtl92d_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, 35 u8 *ppowerlevel);
36 u8 *ppowerlevel); 36void rtl92d_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
37extern void rtl92d_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw, 37 u8 *ppowerlevel, u8 channel);
38 u8 *ppowerlevel, u8 channel); 38bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw);
39extern bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw); 39bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0);
40extern bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0); 40void rtl92d_phy_powerdown_anotherphy(struct ieee80211_hw *hw, bool bmac0);
41extern void rtl92d_phy_powerdown_anotherphy(struct ieee80211_hw *hw,
42 bool bmac0);
43 41
44#endif 42#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h
index 3d8f9e3aad76..007ebdbbe108 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h
@@ -183,40 +183,40 @@ struct tx_power_struct {
183 u32 mcs_original_offset[4][16]; 183 u32 mcs_original_offset[4][16];
184}; 184};
185 185
186extern u32 rtl8723ae_phy_query_bb_reg(struct ieee80211_hw *hw, 186u32 rtl8723ae_phy_query_bb_reg(struct ieee80211_hw *hw,
187 u32 regaddr, u32 bitmask); 187 u32 regaddr, u32 bitmask);
188extern void rtl8723ae_phy_set_bb_reg(struct ieee80211_hw *hw, 188void rtl8723ae_phy_set_bb_reg(struct ieee80211_hw *hw,
189 u32 regaddr, u32 bitmask, u32 data); 189 u32 regaddr, u32 bitmask, u32 data);
190extern u32 rtl8723ae_phy_query_rf_reg(struct ieee80211_hw *hw, 190u32 rtl8723ae_phy_query_rf_reg(struct ieee80211_hw *hw,
191 enum radio_path rfpath, u32 regaddr, 191 enum radio_path rfpath, u32 regaddr,
192 u32 bitmask); 192 u32 bitmask);
193extern void rtl8723ae_phy_set_rf_reg(struct ieee80211_hw *hw, 193void rtl8723ae_phy_set_rf_reg(struct ieee80211_hw *hw,
194 enum radio_path rfpath, u32 regaddr, 194 enum radio_path rfpath, u32 regaddr,
195 u32 bitmask, u32 data); 195 u32 bitmask, u32 data);
196extern bool rtl8723ae_phy_mac_config(struct ieee80211_hw *hw); 196bool rtl8723ae_phy_mac_config(struct ieee80211_hw *hw);
197extern bool rtl8723ae_phy_bb_config(struct ieee80211_hw *hw); 197bool rtl8723ae_phy_bb_config(struct ieee80211_hw *hw);
198extern bool rtl8723ae_phy_rf_config(struct ieee80211_hw *hw); 198bool rtl8723ae_phy_rf_config(struct ieee80211_hw *hw);
199extern bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw, 199bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw,
200 enum radio_path rfpath); 200 enum radio_path rfpath);
201extern void rtl8723ae_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw); 201void rtl8723ae_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
202extern void rtl8723ae_phy_get_txpower_level(struct ieee80211_hw *hw, 202void rtl8723ae_phy_get_txpower_level(struct ieee80211_hw *hw,
203 long *powerlevel); 203 long *powerlevel);
204extern void rtl8723ae_phy_set_txpower_level(struct ieee80211_hw *hw, 204void rtl8723ae_phy_set_txpower_level(struct ieee80211_hw *hw,
205 u8 channel); 205 u8 channel);
206extern bool rtl8723ae_phy_update_txpower_dbm(struct ieee80211_hw *hw, 206bool rtl8723ae_phy_update_txpower_dbm(struct ieee80211_hw *hw,
207 long power_indbm); 207 long power_indbm);
208extern void rtl8723ae_phy_set_bw_mode_callback(struct ieee80211_hw *hw); 208void rtl8723ae_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
209extern void rtl8723ae_phy_set_bw_mode(struct ieee80211_hw *hw, 209void rtl8723ae_phy_set_bw_mode(struct ieee80211_hw *hw,
210 enum nl80211_channel_type ch_type); 210 enum nl80211_channel_type ch_type);
211extern void rtl8723ae_phy_sw_chnl_callback(struct ieee80211_hw *hw); 211void rtl8723ae_phy_sw_chnl_callback(struct ieee80211_hw *hw);
212extern u8 rtl8723ae_phy_sw_chnl(struct ieee80211_hw *hw); 212u8 rtl8723ae_phy_sw_chnl(struct ieee80211_hw *hw);
213extern void rtl8723ae_phy_iq_calibrate(struct ieee80211_hw *hw, bool recovery); 213void rtl8723ae_phy_iq_calibrate(struct ieee80211_hw *hw, bool recovery);
214void rtl8723ae_phy_lc_calibrate(struct ieee80211_hw *hw); 214void rtl8723ae_phy_lc_calibrate(struct ieee80211_hw *hw);
215void rtl8723ae_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain); 215void rtl8723ae_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain);
216bool rtl8723ae_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, 216bool rtl8723ae_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
217 enum radio_path rfpath); 217 enum radio_path rfpath);
218bool rtl8723ae_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype); 218bool rtl8723ae_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype);
219extern bool rtl8723ae_phy_set_rf_power_state(struct ieee80211_hw *hw, 219bool rtl8723ae_phy_set_rf_power_state(struct ieee80211_hw *hw,
220 enum rf_pwrstate rfpwr_state); 220 enum rf_pwrstate rfpwr_state);
221 221
222#endif 222#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/rf.h b/drivers/net/wireless/rtlwifi/rtl8723ae/rf.h
index d0f9dd79abea..57f1933ee663 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/rf.h
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/rf.h
@@ -32,12 +32,11 @@
32 32
33#define RF6052_MAX_TX_PWR 0x3F 33#define RF6052_MAX_TX_PWR 0x3F
34 34
35extern void rtl8723ae_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, 35void rtl8723ae_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth);
36 u8 bandwidth); 36void rtl8723ae_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
37extern void rtl8723ae_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, 37 u8 *ppowerlevel);
38 u8 *ppowerlevel); 38void rtl8723ae_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
39extern void rtl8723ae_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw, 39 u8 *ppowerlevel, u8 channel);
40 u8 *ppowerlevel, u8 channel); 40bool rtl8723ae_phy_rf6052_config(struct ieee80211_hw *hw);
41extern bool rtl8723ae_phy_rf6052_config(struct ieee80211_hw *hw);
42 41
43#endif 42#endif
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index 96763dcff5ae..d224dc3bb092 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -2055,7 +2055,7 @@ struct rtl_priv {
2055 that it points to the data allocated 2055 that it points to the data allocated
2056 beyond this structure like: 2056 beyond this structure like:
2057 rtl_pci_priv or rtl_usb_priv */ 2057 rtl_pci_priv or rtl_usb_priv */
2058 u8 priv[0]; 2058 u8 priv[0] __aligned(sizeof(void *));
2059}; 2059};
2060 2060
2061#define rtl_priv(hw) (((struct rtl_priv *)(hw)->priv)) 2061#define rtl_priv(hw) (((struct rtl_priv *)(hw)->priv))