Re: [PATCH 3/3] Move rtl8192e from staging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The RT_TRACE function was stubbed out in the rtllib directory.
Implement RTLLIB_TRACE.

Signed-off-by: Sean MacLennan <seanm@xxxxxxxx>
---
diff --git a/drivers/net/wireless/rtllib/rtl8192e/rtl_core.h b/drivers/net/wireless/rtllib/rtl8192e/rtl_core.h
index 39999d0..05f88a6 100644
--- a/drivers/net/wireless/rtllib/rtl8192e/rtl_core.h
+++ b/drivers/net/wireless/rtllib/rtl8192e/rtl_core.h
@@ -215,41 +215,6 @@ enum RTL819x_PHY_PARAM {
 	RTL819X_EFUSE_MAP			= 19,
 };
 
-enum RTL_DEBUG {
-	COMP_TRACE		= BIT0,
-	COMP_DBG		= BIT1,
-	COMP_INIT		= BIT2,
-	COMP_RECV		= BIT3,
-	COMP_SEND		= BIT4,
-	COMP_CMD		= BIT5,
-	COMP_POWER		= BIT6,
-	COMP_EPROM		= BIT7,
-	COMP_SWBW		= BIT8,
-	COMP_SEC		= BIT9,
-	COMP_LPS		= BIT10,
-	COMP_QOS		= BIT11,
-	COMP_RATE		= BIT12,
-	COMP_RXDESC		= BIT13,
-	COMP_PHY		= BIT14,
-	COMP_DIG		= BIT15,
-	COMP_TXAGC		= BIT16,
-	COMP_HALDM		= BIT17,
-	COMP_POWER_TRACKING	= BIT18,
-	COMP_CH			= BIT19,
-	COMP_RF			= BIT20,
-	COMP_FIRMWARE		= BIT21,
-	COMP_HT			= BIT22,
-	COMP_RESET		= BIT23,
-	COMP_CMDPKT		= BIT24,
-	COMP_SCAN		= BIT25,
-	COMP_PS			= BIT26,
-	COMP_DOWN		= BIT27,
-	COMP_INTR		= BIT28,
-	COMP_LED		= BIT29,
-	COMP_MLME		= BIT30,
-	COMP_ERR		= BIT31
-};
-
 enum nic_t {
 	NIC_UNKNOWN     = 0,
 	NIC_8192E       = 1,
diff --git a/drivers/net/wireless/rtllib/rtl8192e/rtl_debug.c b/drivers/net/wireless/rtllib/rtl8192e/rtl_debug.c
index 22bc2dd..c40c497 100644
--- a/drivers/net/wireless/rtllib/rtl8192e/rtl_debug.c
+++ b/drivers/net/wireless/rtllib/rtl8192e/rtl_debug.c
@@ -29,9 +29,6 @@
 #include "r8190P_rtl8256.h" /* RTL8225 Radio frontend */
 #include "r8192E_cmdpkt.h"
 
-u32 rt_global_debug_component = \
-				COMP_ERR ;
-
 /*------------------Declare variable-----------------------*/
 u32	DBGP_Type[DBGP_TYPE_MAX];
 
diff --git a/drivers/net/wireless/rtllib/rtl8192e/rtl_debug.h b/drivers/net/wireless/rtllib/rtl8192e/rtl_debug.h
index 50fb9a9..d3d535f 100644
--- a/drivers/net/wireless/rtllib/rtl8192e/rtl_debug.h
+++ b/drivers/net/wireless/rtllib/rtl8192e/rtl_debug.h
@@ -29,6 +29,8 @@
 #include <linux/version.h>
 #include <linux/debugfs.h>
 
+#include "../rtllib_debug.h"
+
 struct r8192_priv;
 struct _tx_desc_8192se;
 struct _TX_DESC_8192CE;
diff --git a/drivers/net/wireless/rtllib/rtl819x_BAProc.c b/drivers/net/wireless/rtllib/rtl819x_BAProc.c
index 46ae64b..8dba840 100644
--- a/drivers/net/wireless/rtllib/rtl819x_BAProc.c
+++ b/drivers/net/wireless/rtllib/rtl819x_BAProc.c
@@ -17,11 +17,9 @@
  * wlanfae <wlanfae@xxxxxxxxxxx>
 ******************************************************************************/
 #include "rtllib.h"
+#include "rtllib_debug.h"
 #include "rtl819x_BA.h"
 
-// FIXME - Defined in rtl_debug.h
-#define RT_TRACE(a, b, ...)
-
 static void ActivateBAEntry(struct rtllib_device *ieee, struct ba_record *pBA,
 			    u16 Time)
 {
@@ -117,7 +115,7 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
 	*tag ++= pBA->DialogToken;
 
 	if (ACT_ADDBARSP == type) {
-		RT_TRACE(COMP_DBG, "====>to send ADDBARSP\n");
+		RTLLIB_TRACE(COMP_DBG, "====>to send ADDBARSP\n");
 		tmp = cpu_to_le16(StatusCode);
 		memcpy(tag, (u8 *)&tmp, 2);
 		tag += 2;
@@ -202,7 +200,7 @@ static void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst,
 	skb = rtllib_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ);
 
 	if (skb) {
-		RT_TRACE(COMP_DBG, "====>to send ADDBAREQ!!!!!\n");
+		RTLLIB_TRACE(COMP_DBG, "====>to send ADDBAREQ!!!!!\n");
 		softmac_mgmt_xmit(skb, ieee);
 	} else {
 		RTLLIB_DEBUG(RTLLIB_DL_ERR, "alloc skb error in function"
@@ -267,7 +265,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 	pBaTimeoutVal = (u16 *)(tag + 5);
 	pBaStartSeqCtrl = (union sequence_control *)(req + 7);
 
-	RT_TRACE(COMP_DBG, "====>rx ADDBAREQ from : %pM\n", dst);
+	RTLLIB_TRACE(COMP_DBG, "====>rx ADDBAREQ from : %pM\n", dst);
 	if (ieee->current_network.qos_data.active == 0  ||
 	    (ieee->pHTInfo->bCurrentHTSupport == false) ||
 	    (ieee->pHTInfo->IOTAction & HT_IOT_ACT_REJECT_ADDBA_REQ)) {
@@ -349,7 +347,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
 	pBaParamSet = (union ba_param_set *)(tag + 5);
 	pBaTimeoutVal = (u16 *)(tag + 7);
 
-	RT_TRACE(COMP_DBG, "====>rx ADDBARSP from : %pM\n", dst);
+	RTLLIB_TRACE(COMP_DBG, "====>rx ADDBARSP from : %pM\n", dst);
 	if (ieee->current_network.qos_data.active == 0  ||
 	    ieee->pHTInfo->bCurrentHTSupport == false ||
 	    ieee->pHTInfo->bCurrentAMPDUEnable == false) {
diff --git a/drivers/net/wireless/rtllib/rtllib_module.c b/drivers/net/wireless/rtllib/rtllib_module.c
index f74fb4b..246cf74 100644
--- a/drivers/net/wireless/rtllib/rtllib_module.c
+++ b/drivers/net/wireless/rtllib/rtllib_module.c
@@ -52,6 +52,11 @@
 #include <net/arp.h>
 
 #include "rtllib.h"
+#include "rtllib_debug.h"
+
+
+u32 rt_global_debug_component = COMP_ERR;
+EXPORT_SYMBOL(rt_global_debug_component);
 
 
 void _setup_timer(struct timer_list *ptimer, void *fun, unsigned long data)
diff --git a/drivers/net/wireless/rtllib/rtllib_softmac.c b/drivers/net/wireless/rtllib/rtllib_softmac.c
index ef2036e..fde42cf 100644
--- a/drivers/net/wireless/rtllib/rtllib_softmac.c
+++ b/drivers/net/wireless/rtllib/rtllib_softmac.c
@@ -15,9 +15,7 @@
 
 
 #include "rtllib.h"
-
-// FIXME - Defined in rtl_debug.h
-#define RT_TRACE(a, b, ...)
+#include "rtllib_debug.h"
 
 #include <linux/random.h>
 #include <linux/delay.h>
@@ -757,7 +755,7 @@ EXPORT_SYMBOL(rtllib_act_scanning);
 /* called with ieee->lock held */
 static void rtllib_start_scan(struct rtllib_device *ieee)
 {
-	RT_TRACE(COMP_DBG, "===>%s()\n", __func__);
+	RTLLIB_TRACE(COMP_DBG, "===>%s()\n", __func__);
 	if (ieee->rtllib_ips_leave_wq != NULL)
 		ieee->rtllib_ips_leave_wq(ieee->dev);
 
@@ -1617,11 +1615,11 @@ static void rtllib_associate_procedure_wq(void *data)
 		ieee->data_hard_stop(ieee->dev);
 
 	rtllib_stop_scan(ieee);
-	RT_TRACE(COMP_DBG, "===>%s(), chan:%d\n", __func__,
+	RTLLIB_TRACE(COMP_DBG, "===>%s(), chan:%d\n", __func__,
 		 ieee->current_network.channel);
 	HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
 	if (ieee->eRFPowerState == eRfOff) {
-		RT_TRACE(COMP_DBG, "=============>%s():Rf state is eRfOff,"
+		RTLLIB_TRACE(COMP_DBG, "=============>%s():Rf state is eRfOff,"
 			 " schedule ipsleave wq again,return\n", __func__);
 		if (ieee->rtllib_ips_leave_wq != NULL)
 			ieee->rtllib_ips_leave_wq(ieee->dev);
@@ -2075,7 +2073,7 @@ static inline void rtllib_sta_ps(struct rtllib_device *ieee)
 	if ((ieee->ps == RTLLIB_PS_DISABLED ||
 	     ieee->iw_mode != IW_MODE_INFRA ||
 	     ieee->state != RTLLIB_LINKED)) {
-		RT_TRACE(COMP_DBG, "=====>%s(): no need to ps,wake up!! "
+		RTLLIB_TRACE(COMP_DBG, "=====>%s(): no need to ps,wake up!! "
 			 "ieee->ps is %d, ieee->iw_mode is %d, ieee->state"
 			 " is %d\n", __func__, ieee->ps, ieee->iw_mode,
 			  ieee->state);
diff --git a/drivers/net/wireless/rtllib/rtllib_softmac_wx.c b/drivers/net/wireless/rtllib/rtllib_softmac_wx.c
index 0f7ac35..c599c3a 100644
--- a/drivers/net/wireless/rtllib/rtllib_softmac_wx.c
+++ b/drivers/net/wireless/rtllib/rtllib_softmac_wx.c
@@ -15,12 +15,10 @@
 
 
 #include "rtllib.h"
+#include "rtllib_debug.h"
 #include "dot11d.h"
 /* FIXME: add A freqs */
 
-// FIXME - Defined in rtl_debug.h
-#define RT_TRACE(a, b, ...)
-
 const long rtllib_wlan_frequencies[] = {
 	2412, 2417, 2422, 2427,
 	2432, 2437, 2442, 2447,
@@ -379,7 +377,7 @@ void rtllib_wx_sync_scan_wq(void *data)
 		b40M = 1;
 		chan_offset = ieee->pHTInfo->CurSTAExtChnlOffset;
 		bandwidth = (enum ht_channel_width)ieee->pHTInfo->bCurBW40MHz;
-		RT_TRACE(COMP_DBG, "Scan in 40M, force to 20M first:%d, %d\n",
+		RTLLIB_TRACE(COMP_DBG, "Scan in 40M, force to 20M first:%d, %d\n",
 			 chan_offset, bandwidth);
 		ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20,
 				       HT_EXTCHNL_OFFSET_NO_EXT);
@@ -388,7 +386,7 @@ void rtllib_wx_sync_scan_wq(void *data)
 	rtllib_start_scan_syncro(ieee, 0);
 
 	if (b40M) {
-		RT_TRACE(COMP_DBG, "Scan in 20M, back to 40M\n");
+		RTLLIB_TRACE(COMP_DBG, "Scan in 20M, back to 40M\n");
 		if (chan_offset == HT_EXTCHNL_OFFSET_UPPER)
 			ieee->set_chan(ieee->dev, chan + 2);
 		else if (chan_offset == HT_EXTCHNL_OFFSET_LOWER)
@@ -603,13 +601,13 @@ int rtllib_wx_set_power(struct rtllib_device *ieee,
 	down(&ieee->wx_sem);
 
 	if (wrqu->power.disabled) {
-		RT_TRACE(COMP_DBG, "===>%s(): power disable\n", __func__);
+		RTLLIB_TRACE(COMP_DBG, "===>%s(): power disable\n", __func__);
 		ieee->ps = RTLLIB_PS_DISABLED;
 		goto exit;
 	}
 	if (wrqu->power.flags & IW_POWER_TIMEOUT) {
 		ieee->ps_timeout = wrqu->power.value / 1000;
-		RT_TRACE(COMP_DBG, "===>%s():ps_timeout is %d\n", __func__,
+		RTLLIB_TRACE(COMP_DBG, "===>%s():ps_timeout is %d\n", __func__,
 			 ieee->ps_timeout);
 	}
 
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux