Skip to contentSkip to conversation

rtl8192c: fix compilation errors

PATCH Superseded Johannes Berg 2 participants 4 messages Feb 24, 2011 Networking drivers (wireless)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 rtl8192c: fix compilation errors

From: Johannes Berg <[email protected]>

On my G5 this fails to compile with

drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict

since you can't export static functions.

---
 drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c +6 -6
@@ -644,9 +644,9 @@ void rtl92c_phy_set_beacon_hw_reg(struct
 }
 EXPORT_SYMBOL(rtl92c_phy_set_beacon_hw_reg);
 
-static u8 _rtl92c_phy_dbm_to_txpwr_Idx(struct ieee80211_hw *hw,
-				       enum wireless_mode wirelessmode,
-				       long power_indbm)
+u8 _rtl92c_phy_dbm_to_txpwr_Idx(struct ieee80211_hw *hw,
+				enum wireless_mode wirelessmode,
+				long power_indbm)
 {
 	u8 txpwridx;
 	long offset;
@@ -676,9 +676,9 @@ static u8 _rtl92c_phy_dbm_to_txpwr_Idx(s
 }
 EXPORT_SYMBOL(_rtl92c_phy_dbm_to_txpwr_Idx);
 
-static long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
-					 enum wireless_mode wirelessmode,
-					 u8 txpwridx)
+long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
+				  enum wireless_mode wirelessmode,
+				  u8 txpwridx)
 {
 	long offset;
 	long pwrout_dbm;
author maintainer
#1 lore raw

PATCH v2 1/1 rtl8192c: fix compilation errors

From: Johannes Berg <[email protected]>

On my G5 this fails to compile with

drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict

since you can't export static functions.

---
 drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c |   12 ++++++------
 drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c +6 -6
@@ -644,9 +644,9 @@ void rtl92c_phy_set_beacon_hw_reg(struct
 }
 EXPORT_SYMBOL(rtl92c_phy_set_beacon_hw_reg);
 
-static u8 _rtl92c_phy_dbm_to_txpwr_Idx(struct ieee80211_hw *hw,
-				       enum wireless_mode wirelessmode,
-				       long power_indbm)
+u8 _rtl92c_phy_dbm_to_txpwr_Idx(struct ieee80211_hw *hw,
+				enum wireless_mode wirelessmode,
+				long power_indbm)
 {
 	u8 txpwridx;
 	long offset;
@@ -676,9 +676,9 @@ static u8 _rtl92c_phy_dbm_to_txpwr_Idx(s
 }
 EXPORT_SYMBOL(_rtl92c_phy_dbm_to_txpwr_Idx);
 
-static long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
-					 enum wireless_mode wirelessmode,
-					 u8 txpwridx)
+long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
+				  enum wireless_mode wirelessmode,
+				  u8 txpwridx)
 {
 	long offset;
 	long pwrout_dbm;
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h +6 -6
@@ -228,12 +228,12 @@ void rtl92ce_phy_set_rf_on(struct ieee80
 void rtl92c_phy_set_io(struct ieee80211_hw *hw);
 void rtl92c_bb_block_on(struct ieee80211_hw *hw);
 u32 _rtl92c_phy_calculate_bit_shift(u32 bitmask);
-static long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
-					 enum wireless_mode wirelessmode,
-					 u8 txpwridx);
-static u8 _rtl92c_phy_dbm_to_txpwr_Idx(struct ieee80211_hw *hw,
-				       enum wireless_mode wirelessmode,
-				       long power_indbm);
+long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
+				  enum wireless_mode wirelessmode,
+				  u8 txpwridx);
+u8 _rtl92c_phy_dbm_to_txpwr_Idx(struct ieee80211_hw *hw,
+				enum wireless_mode wirelessmode,
+				long power_indbm);
 void _rtl92c_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw);
 static bool _rtl92c_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
 					     u32 cmdtableidx, u32 cmdtablesz,
#2 lore raw
Quoted 9 lines · Johannes Berg

From: Johannes Berg<[email protected]>

On my G5 this fails to compile with

drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict

Quoted 4 lines

since you can't export static functions.

---

ACK.

Your V2 is better than the one I submitted last night as I missed the change in the header file.

Why does the PowerPC compiler flag this when the X86_64 one does not?

Larry

Quoted 56 lines
  drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c |   12 ++++++------
  drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h |   12 ++++++------
  2 files changed, 12 insertions(+), 12 deletions(-)
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c +6 -6
@@ -644,9 +644,9 @@ void rtl92c_phy_set_beacon_hw_reg(struct
  }
  EXPORT_SYMBOL(rtl92c_phy_set_beacon_hw_reg);
 
-static u8 _rtl92c_phy_dbm_to_txpwr_Idx(struct ieee80211_hw *hw,
-				       enum wireless_mode wirelessmode,
-				       long power_indbm)
+u8 _rtl92c_phy_dbm_to_txpwr_Idx(struct ieee80211_hw *hw,
+				enum wireless_mode wirelessmode,
+				long power_indbm)
  {
  	u8 txpwridx;
  	long offset;
@@ -676,9 +676,9 @@ static u8 _rtl92c_phy_dbm_to_txpwr_Idx(s
  }
  EXPORT_SYMBOL(_rtl92c_phy_dbm_to_txpwr_Idx);
 
-static long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
-					 enum wireless_mode wirelessmode,
-					 u8 txpwridx)
+long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
+				  enum wireless_mode wirelessmode,
+				  u8 txpwridx)
  {
  	long offset;
  	long pwrout_dbm;
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h +6 -6
@@ -228,12 +228,12 @@ void rtl92ce_phy_set_rf_on(struct ieee80
  void rtl92c_phy_set_io(struct ieee80211_hw *hw);
  void rtl92c_bb_block_on(struct ieee80211_hw *hw);
  u32 _rtl92c_phy_calculate_bit_shift(u32 bitmask);
-static long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
-					 enum wireless_mode wirelessmode,
-					 u8 txpwridx);
-static u8 _rtl92c_phy_dbm_to_txpwr_Idx(struct ieee80211_hw *hw,
-				       enum wireless_mode wirelessmode,
-				       long power_indbm);
+long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
+				  enum wireless_mode wirelessmode,
+				  u8 txpwridx);
+u8 _rtl92c_phy_dbm_to_txpwr_Idx(struct ieee80211_hw *hw,
+				enum wireless_mode wirelessmode,
+				long power_indbm);
  void _rtl92c_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw);
  static bool _rtl92c_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
  					     u32 cmdtableidx, u32 cmdtablesz,
author maintainer
#3 lore raw
Quoted 2 lines · Larry Finger

Your V2 is better than the one I submitted last night as I missed the change in the header file.

Oh I missed yours, but without changing the header file it still fails to compile so ...

Quoted 1 line

Why does the PowerPC compiler flag this when the X86_64 one does not?

I have no idea, something about the section layout maybe.

johannes