aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/base.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2013-07-12 16:32:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-07-18 16:22:00 -0400
commit6f334c2b3966f10cbd089bb124ec0e114d8d8c77 (patch)
tree6b31c76f567436e99b1c2ccb9d6080c5fc4a77ae /drivers/net/wireless/rtlwifi/base.c
parentf287cbd01f2e8e1b325b96233c373619c2d25ee2 (diff)
rtlwifi: Fix build errors for unusual cases
The present build configuration for the rtlwifi family of drivers will fail under two known conditions: (1) If rtlwifi is selected without selecting any of the dependent drivers, there are errors in the build. (2) If the PCI drivers are built into the kernel and the USB drivers are modules, or vice versa, there are missing globals. The first condition is fixed by never building rtlwifi unless at least one of the device drivers is selected. The second failure is fixed by splitting the PCI and USB codes out of rtlwifi, and creating their own mini drivers. If the drivers that use them are modules, they will also be modules. Although a number of files are touched by this patch, only Makefile and Kconfig have undergone significant changes. The only modifications to the other files were to export entry points needed by the new rtl_pci and rtl_usb units, or to rename two variables that had names that were likely to cause namespace collisions. Reported-by: Fengguang Wu <fengguang.wu@intel.com> [Condition 1] Reported-by: Ben Hutchings <bhutchings@solarflare.com> [Condition 2] Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ben Hutchings <bhutchings@solarflare.com> Cc: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/base.c')
-rw-r--r--drivers/net/wireless/rtlwifi/base.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 9d558ac77b0c..7651f5acc14b 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -172,6 +172,7 @@ u8 rtl_tid_to_ac(u8 tid)
172{ 172{
173 return tid_to_ac[tid]; 173 return tid_to_ac[tid];
174} 174}
175EXPORT_SYMBOL_GPL(rtl_tid_to_ac);
175 176
176static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, 177static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
177 struct ieee80211_sta_ht_cap *ht_cap) 178 struct ieee80211_sta_ht_cap *ht_cap)
@@ -406,6 +407,7 @@ void rtl_deinit_deferred_work(struct ieee80211_hw *hw)
406 cancel_delayed_work(&rtlpriv->works.ps_rfon_wq); 407 cancel_delayed_work(&rtlpriv->works.ps_rfon_wq);
407 cancel_delayed_work(&rtlpriv->works.fwevt_wq); 408 cancel_delayed_work(&rtlpriv->works.fwevt_wq);
408} 409}
410EXPORT_SYMBOL_GPL(rtl_deinit_deferred_work);
409 411
410void rtl_init_rfkill(struct ieee80211_hw *hw) 412void rtl_init_rfkill(struct ieee80211_hw *hw)
411{ 413{
@@ -439,6 +441,7 @@ void rtl_deinit_rfkill(struct ieee80211_hw *hw)
439{ 441{
440 wiphy_rfkill_stop_polling(hw->wiphy); 442 wiphy_rfkill_stop_polling(hw->wiphy);
441} 443}
444EXPORT_SYMBOL_GPL(rtl_deinit_rfkill);
442 445
443int rtl_init_core(struct ieee80211_hw *hw) 446int rtl_init_core(struct ieee80211_hw *hw)
444{ 447{
@@ -489,10 +492,12 @@ int rtl_init_core(struct ieee80211_hw *hw)
489 492
490 return 0; 493 return 0;
491} 494}
495EXPORT_SYMBOL_GPL(rtl_init_core);
492 496
493void rtl_deinit_core(struct ieee80211_hw *hw) 497void rtl_deinit_core(struct ieee80211_hw *hw)
494{ 498{
495} 499}
500EXPORT_SYMBOL_GPL(rtl_deinit_core);
496 501
497void rtl_init_rx_config(struct ieee80211_hw *hw) 502void rtl_init_rx_config(struct ieee80211_hw *hw)
498{ 503{
@@ -501,6 +506,7 @@ void rtl_init_rx_config(struct ieee80211_hw *hw)
501 506
502 rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *) (&mac->rx_conf)); 507 rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *) (&mac->rx_conf));
503} 508}
509EXPORT_SYMBOL_GPL(rtl_init_rx_config);
504 510
505/********************************************************* 511/*********************************************************
506 * 512 *
@@ -879,6 +885,7 @@ bool rtl_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb)
879 885
880 return true; 886 return true;
881} 887}
888EXPORT_SYMBOL_GPL(rtl_tx_mgmt_proc);
882 889
883void rtl_get_tcb_desc(struct ieee80211_hw *hw, 890void rtl_get_tcb_desc(struct ieee80211_hw *hw,
884 struct ieee80211_tx_info *info, 891 struct ieee80211_tx_info *info,
@@ -1052,6 +1059,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
1052 1059
1053 return true; 1060 return true;
1054} 1061}
1062EXPORT_SYMBOL_GPL(rtl_action_proc);
1055 1063
1056/*should call before software enc*/ 1064/*should call before software enc*/
1057u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) 1065u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
@@ -1125,6 +1133,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
1125 1133
1126 return false; 1134 return false;
1127} 1135}
1136EXPORT_SYMBOL_GPL(rtl_is_special_data);
1128 1137
1129/********************************************************* 1138/*********************************************************
1130 * 1139 *
@@ -1300,6 +1309,7 @@ void rtl_beacon_statistic(struct ieee80211_hw *hw, struct sk_buff *skb)
1300 1309
1301 rtlpriv->link_info.bcn_rx_inperiod++; 1310 rtlpriv->link_info.bcn_rx_inperiod++;
1302} 1311}
1312EXPORT_SYMBOL_GPL(rtl_beacon_statistic);
1303 1313
1304void rtl_watchdog_wq_callback(void *data) 1314void rtl_watchdog_wq_callback(void *data)
1305{ 1315{
@@ -1793,6 +1803,7 @@ void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len)
1793 1803
1794 mac->vendor = vendor; 1804 mac->vendor = vendor;
1795} 1805}
1806EXPORT_SYMBOL_GPL(rtl_recognize_peer);
1796 1807
1797/********************************************************* 1808/*********************************************************
1798 * 1809 *
@@ -1849,6 +1860,7 @@ struct attribute_group rtl_attribute_group = {
1849 .name = "rtlsysfs", 1860 .name = "rtlsysfs",
1850 .attrs = rtl_sysfs_entries, 1861 .attrs = rtl_sysfs_entries,
1851}; 1862};
1863EXPORT_SYMBOL_GPL(rtl_attribute_group);
1852 1864
1853MODULE_AUTHOR("lizhaoming <chaoming_li@realsil.com.cn>"); 1865MODULE_AUTHOR("lizhaoming <chaoming_li@realsil.com.cn>");
1854MODULE_AUTHOR("Realtek WlanFAE <wlanfae@realtek.com>"); 1866MODULE_AUTHOR("Realtek WlanFAE <wlanfae@realtek.com>");
@@ -1856,7 +1868,8 @@ MODULE_AUTHOR("Larry Finger <Larry.FInger@lwfinger.net>");
1856MODULE_LICENSE("GPL"); 1868MODULE_LICENSE("GPL");
1857MODULE_DESCRIPTION("Realtek 802.11n PCI wireless core"); 1869MODULE_DESCRIPTION("Realtek 802.11n PCI wireless core");
1858 1870
1859struct rtl_global_var global_var = {}; 1871struct rtl_global_var rtl_global_var = {};
1872EXPORT_SYMBOL_GPL(rtl_global_var);
1860 1873
1861static int __init rtl_core_module_init(void) 1874static int __init rtl_core_module_init(void)
1862{ 1875{
@@ -1864,8 +1877,8 @@ static int __init rtl_core_module_init(void)
1864 pr_err("Unable to register rtl_rc, use default RC !!\n"); 1877 pr_err("Unable to register rtl_rc, use default RC !!\n");
1865 1878
1866 /* init some global vars */ 1879 /* init some global vars */
1867 INIT_LIST_HEAD(&global_var.glb_priv_list); 1880 INIT_LIST_HEAD(&rtl_global_var.glb_priv_list);
1868 spin_lock_init(&global_var.glb_list_lock); 1881 spin_lock_init(&rtl_global_var.glb_list_lock);
1869 1882
1870 return 0; 1883 return 0;
1871} 1884}