Commit b94436b5 authored by Mateusz Kulikowski's avatar Mateusz Kulikowski Committed by Greg Kroah-Hartman

staging: rtl8192e: Remove RTLLIB_DEBUG()

- Use netdev_dbg or netdev_vdbg instead of RTLLIB_DEBUG()
- Reformat some messages for better readability
- Remove RTLLIB_DEBUG messages that make no sense
Signed-off-by: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent def16d2e
......@@ -84,9 +84,9 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
u8 *tag = NULL;
u16 len = ieee->tx_headroom + 9;
RTLLIB_DEBUG(RTLLIB_DL_TRACE | RTLLIB_DL_BA,
"========>%s(), frame(%d) sentd to: %pM, ieee->dev:%p\n",
__func__, type, Dst, ieee->dev);
netdev_dbg(ieee->dev, "%s(): frame(%d) sentd to: %pM, ieee->dev:%p\n",
__func__, type, Dst, ieee->dev);
if (pBA == NULL) {
netdev_warn(ieee->dev, "pBA is NULL\n");
return NULL;
......@@ -148,9 +148,8 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
u16 len = 6 + ieee->tx_headroom;
if (net_ratelimit())
RTLLIB_DEBUG(RTLLIB_DL_TRACE | RTLLIB_DL_BA,
"========>%s(), ReasonCode(%d) sentd to: %pM\n",
__func__, ReasonCode, dst);
netdev_dbg(ieee->dev, "%s(): ReasonCode(%d) sentd to: %pM\n",
__func__, ReasonCode, dst);
memset(&DelbaParamSet, 0, 2);
......@@ -186,9 +185,6 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
tag += 2;
RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA|RTLLIB_DL_BA, skb->data, skb->len);
if (net_ratelimit())
RTLLIB_DEBUG(RTLLIB_DL_TRACE | RTLLIB_DL_BA, "<=====%s()\n",
__func__);
return skb;
}
......@@ -203,8 +199,7 @@ static void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst,
RT_TRACE(COMP_DBG, "====>to send ADDBAREQ!!!!!\n");
softmac_mgmt_xmit(skb, ieee);
} else {
RTLLIB_DEBUG(RTLLIB_DL_ERR,
"alloc skb error in function %s()\n", __func__);
netdev_dbg(ieee->dev, "Failed to generate ADDBAReq packet.\n");
}
}
......@@ -217,8 +212,7 @@ static void rtllib_send_ADDBARsp(struct rtllib_device *ieee, u8 *dst,
if (skb)
softmac_mgmt_xmit(skb, ieee);
else
RTLLIB_DEBUG(RTLLIB_DL_ERR,
"alloc skb error in function %s()\n", __func__);
netdev_dbg(ieee->dev, "Failed to generate ADDBARsp packet.\n");
}
static void rtllib_send_DELBA(struct rtllib_device *ieee, u8 *dst,
......@@ -231,8 +225,7 @@ static void rtllib_send_DELBA(struct rtllib_device *ieee, u8 *dst,
if (skb)
softmac_mgmt_xmit(skb, ieee);
else
RTLLIB_DEBUG(RTLLIB_DL_ERR,
"alloc skb error in function %s()\n", __func__);
netdev_dbg(ieee->dev, "Failed to generate DELBA packet.\n");
}
int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
......@@ -374,20 +367,20 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
if (pAdmittedBA->bValid == true) {
RTLLIB_DEBUG(RTLLIB_DL_BA,
"OnADDBARsp(): Recv ADDBA Rsp. Drop because already admit it!\n");
netdev_dbg(ieee->dev, "%s(): ADDBA response already admitted\n",
__func__);
return -1;
} else if ((pPendingBA->bValid == false) ||
(*pDialogToken != pPendingBA->DialogToken)) {
netdev_warn(ieee->dev,
"%s(): Recv ADDBA Rsp. BA invalid, DELBA!\n",
"%s(): ADDBA Rsp. BA invalid, DELBA!\n",
__func__);
ReasonCode = DELBA_REASON_UNKNOWN_BA;
goto OnADDBARsp_Reject;
} else {
RTLLIB_DEBUG(RTLLIB_DL_BA,
"OnADDBARsp(): Recv ADDBA Rsp. BA is admitted! Status code:%X\n",
*pStatusCode);
netdev_dbg(ieee->dev,
"%s(): Recv ADDBA Rsp. BA is admitted! Status code:%X\n",
__func__, *pStatusCode);
DeActivateBAEntry(ieee, pPendingBA);
}
......
......@@ -217,8 +217,7 @@ static void HTIOTPeerDetermine(struct rtllib_device *ieee)
else
pHTInfo->IOTPeer = HT_IOT_PEER_UNKNOWN;
RTLLIB_DEBUG(RTLLIB_DL_IOT, "Joseph debug!! IOTPEER: %x\n",
pHTInfo->IOTPeer);
netdev_dbg(ieee->dev, "IOTPEER: %x\n", pHTInfo->IOTPeer);
}
static u8 HTIOTActIsDisableMCS14(struct rtllib_device *ieee, u8 *PeerMacAddr)
......@@ -328,9 +327,9 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap,
pCapELE->LSigTxopProtect = 0;
RTLLIB_DEBUG(RTLLIB_DL_HT,
"TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n",
pCapELE->ChlWidth, pCapELE->MaxAMSDUSize, pCapELE->DssCCk);
netdev_dbg(ieee->dev,
"TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n",
pCapELE->ChlWidth, pCapELE->MaxAMSDUSize, pCapELE->DssCCk);
if (IsEncrypt) {
pCapELE->MPDUDensity = 7;
......@@ -541,7 +540,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
netdev_warn(ieee->dev, "%s(): HT_DISABLE\n", __func__);
return;
}
RTLLIB_DEBUG(RTLLIB_DL_HT, "===> HTOnAssocRsp_wq(): HT_ENABLE\n");
netdev_dbg(ieee->dev, "%s(): HT_ENABLE\n", __func__);
if (!memcmp(pHTInfo->PeerHTCapBuf, EWC11NHTCap, sizeof(EWC11NHTCap)))
pPeerHTCap = (struct ht_capab_ele *)(&pHTInfo->PeerHTCapBuf[4]);
......@@ -646,7 +645,7 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
RTLLIB_DEBUG(RTLLIB_DL_HT, "===========>%s()\n", __func__);
netdev_vdbg(ieee->dev, "%s()\n", __func__);
pHTInfo->bCurrentHTSupport = false;
pHTInfo->bCurBW40MHz = false;
......@@ -716,7 +715,7 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device *ieee,
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8 bIOTAction = 0;
RTLLIB_DEBUG(RTLLIB_DL_HT, "==============>%s()\n", __func__);
netdev_vdbg(ieee->dev, "%s()\n", __func__);
/* unmark bEnableHT flag here is the same reason why unmarked in
* function rtllib_softmac_new_net. WB 2008.09.10
*/
......@@ -840,8 +839,7 @@ u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame)
{
if (ieee->pHTInfo->bCurrentHTSupport) {
if ((IsQoSDataFrame(pFrame) && Frame_Order(pFrame)) == 1) {
RTLLIB_DEBUG(RTLLIB_DL_HT,
"HT CONTROL FILED EXIST!!\n");
netdev_dbg(ieee->dev, "HT CONTROL FILED EXIST!!\n");
return true;
}
}
......@@ -852,7 +850,8 @@ static void HTSetConnectBwModeCallback(struct rtllib_device *ieee)
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
RTLLIB_DEBUG(RTLLIB_DL_HT, "======>%s()\n", __func__);
netdev_vdbg(ieee->dev, "%s()\n", __func__);
if (pHTInfo->bCurBW40MHz) {
if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_UPPER)
ieee->set_chan(ieee->dev,
......
......@@ -58,9 +58,9 @@ static void RxPktPendingTimeout(unsigned long data)
pRxTs->RxIndicateSeq =
(pRxTs->RxIndicateSeq + 1) % 4096;
RTLLIB_DEBUG(RTLLIB_DL_REORDER,
"%s(): Indicate SeqNum: %d\n",
__func__, pReorderEntry->SeqNum);
netdev_dbg(ieee->dev,
"%s(): Indicate SeqNum: %d\n",
__func__, pReorderEntry->SeqNum);
ieee->stats_IndicateArray[index] =
pReorderEntry->prxb;
index++;
......@@ -105,8 +105,7 @@ static void TsAddBaProcess(unsigned long data)
TxTsRecord[num]);
TsInitAddBA(ieee, pTxTs, BA_POLICY_IMMEDIATE, false);
RTLLIB_DEBUG(RTLLIB_DL_BA,
"TsAddBaProcess(): ADDBA Req is started!!\n");
netdev_dbg(ieee->dev, "%s(): ADDBA Req is started\n", __func__);
}
static void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo)
......@@ -145,7 +144,7 @@ void TSInitialize(struct rtllib_device *ieee)
struct rx_reorder_entry *pRxReorderEntry = ieee->RxReorderEntry;
u8 count = 0;
RTLLIB_DEBUG(RTLLIB_DL_TS, "==========>%s()\n", __func__);
netdev_vdbg(ieee->dev, "%s()\n", __func__);
INIT_LIST_HEAD(&ieee->Tx_TS_Admit_List);
INIT_LIST_HEAD(&ieee->Tx_TS_Pending_List);
INIT_LIST_HEAD(&ieee->Tx_TS_Unused_List);
......@@ -356,8 +355,7 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
return true;
if (!bAddNewTs) {
RTLLIB_DEBUG(RTLLIB_DL_TS,
"add new TS failed(tid:%d)\n", UP);
netdev_dbg(ieee->dev, "add new TS failed(tid:%d)\n", UP);
return false;
}
......@@ -373,7 +371,6 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
((TxRxSelect == TX_DIR) ? DIR_DOWN : DIR_UP) :
((TxRxSelect == TX_DIR) ? DIR_UP : DIR_DOWN);
RTLLIB_DEBUG(RTLLIB_DL_TS, "to add Ts\n");
if (!list_empty(pUnusedList)) {
(*ppTS) = list_entry(pUnusedList->next,
struct ts_common_info, List);
......@@ -392,9 +389,9 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
ResetRxTsEntry(tmp);
}
RTLLIB_DEBUG(RTLLIB_DL_TS,
"to init current TS, UP:%d, Dir:%d, addr: %pM ppTs=%p\n",
UP, Dir, Addr, *ppTS);
netdev_dbg(ieee->dev,
"to init current TS, UP:%d, Dir:%d, addr: %pM ppTs=%p\n",
UP, Dir, Addr, *ppTS);
pTSInfo->field.ucTrafficType = 0;
pTSInfo->field.ucTSID = UP;
pTSInfo->field.ucDirection = Dir;
......@@ -436,9 +433,8 @@ static void RemoveTsEntry(struct rtllib_device *ieee, struct ts_common_info *pTs
pRxReorderEntry = (struct rx_reorder_entry *)
list_entry(pRxTS->RxPendingPktList.prev,
struct rx_reorder_entry, List);
RTLLIB_DEBUG(RTLLIB_DL_REORDER,
"%s(): Delete SeqNum %d!\n", __func__,
pRxReorderEntry->SeqNum);
netdev_dbg(ieee->dev, "%s(): Delete SeqNum %d!\n",
__func__, pRxReorderEntry->SeqNum);
list_del_init(&pRxReorderEntry->List);
{
int i = 0;
......@@ -538,16 +534,13 @@ void TsStartAddBaProcess(struct rtllib_device *ieee, struct tx_ts_record *pTxTS)
pTxTS->bAddBaReqInProgress = true;
if (pTxTS->bAddBaReqDelayed) {
RTLLIB_DEBUG(RTLLIB_DL_BA,
"TsStartAddBaProcess(): Delayed Start ADDBA after 60 sec!!\n");
netdev_dbg(ieee->dev, "Start ADDBA after 60 sec!!\n");
mod_timer(&pTxTS->TsAddBaTimer, jiffies +
msecs_to_jiffies(TS_ADDBA_DELAY));
} else {
RTLLIB_DEBUG(RTLLIB_DL_BA,
"TsStartAddBaProcess(): Immediately Start ADDBA now!!\n");
netdev_dbg(ieee->dev, "Immediately Start ADDBA\n");
mod_timer(&pTxTS->TsAddBaTimer, jiffies+10);
}
} else
RTLLIB_DEBUG(RTLLIB_DL_BA, "%s()==>BA timer is already added\n",
__func__);
netdev_dbg(ieee->dev, "BA timer is already added\n");
}
......@@ -643,11 +643,6 @@ enum wireless_network_type {
/* debug macros */
extern u32 rtllib_debug_level;
#define RTLLIB_DEBUG(level, fmt, args...) \
do { \
if (rtllib_debug_level & (level)) \
printk(KERN_DEBUG "rtllib: " fmt, ## args); \
} while (0)
#define RTLLIB_DEBUG_DATA(level, data, datalen) \
do { \
......
......@@ -536,7 +536,8 @@ void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee, struct rx_ts_record
}
pRxReorderEntry = (struct rx_reorder_entry *)list_entry(pTS->RxPendingPktList.prev, struct rx_reorder_entry, List);
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "%s(): Indicate SeqNum %d!\n", __func__, pRxReorderEntry->SeqNum);
netdev_dbg(ieee->dev, "%s(): Indicate SeqNum %d!\n", __func__,
pRxReorderEntry->SeqNum);
list_del_init(&pRxReorderEntry->List);
ieee->RfdArray[RfdCnt] = pRxReorderEntry->prxb;
......@@ -561,8 +562,9 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
bool bMatchWinStart = false, bPktInBuf = false;
unsigned long flags;
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "%s(): Seq is %d, pTS->RxIndicateSeq is %d, WinSize is %d\n", __func__, SeqNum,
pTS->RxIndicateSeq, WinSize);
netdev_dbg(ieee->dev,
"%s(): Seq is %d, pTS->RxIndicateSeq is %d, WinSize is %d\n",
__func__, SeqNum, pTS->RxIndicateSeq, WinSize);
spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
......@@ -573,8 +575,9 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
/* Drop out the packet which SeqNum is smaller than WinStart */
if (SN_LESS(SeqNum, pTS->RxIndicateSeq)) {
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "Packet Drop! IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum);
netdev_dbg(ieee->dev,
"Packet Drop! IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum);
pHTInfo->RxReorderDropCounter++;
{
int i;
......@@ -600,7 +603,9 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
pTS->RxIndicateSeq = SeqNum + 1 - WinSize;
else
pTS->RxIndicateSeq = 4095 - (WinSize - (SeqNum + 1)) + 1;
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "Window Shift! IndicateSeq: %d, NewSeq: %d\n", pTS->RxIndicateSeq, SeqNum);
netdev_dbg(ieee->dev,
"Window Shift! IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum);
}
/* Indication process.
......@@ -615,8 +620,8 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
*/
if (bMatchWinStart) {
/* Current packet is going to be indicated.*/
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "Packets indication!! IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum);
netdev_dbg(ieee->dev, "Packets indication! IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum);
ieee->prxbIndicateArray[0] = prxb;
index = 1;
} else {
......@@ -632,10 +637,10 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
pReorderEntry->prxb = prxb;
if (!AddReorderEntry(pTS, pReorderEntry)) {
RTLLIB_DEBUG(RTLLIB_DL_REORDER,
"%s(): Duplicate packet is dropped!! IndicateSeq: %d, NewSeq: %d\n",
__func__, pTS->RxIndicateSeq,
SeqNum);
netdev_dbg(ieee->dev,
"%s(): Duplicate packet is dropped. IndicateSeq: %d, NewSeq: %d\n",
__func__, pTS->RxIndicateSeq,
SeqNum);
list_add_tail(&pReorderEntry->List,
&ieee->RxReorder_Unused_List); {
int i;
......@@ -646,9 +651,9 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
prxb = NULL;
}
} else {
RTLLIB_DEBUG(RTLLIB_DL_REORDER,
"Pkt insert into struct buffer!! IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum);
netdev_dbg(ieee->dev,
"Pkt insert into struct buffer. IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum);
}
} else {
/* Packets are dropped if there are not enough reorder
......@@ -672,7 +677,8 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
/* Check if there is any packet need indicate.*/
while (!list_empty(&pTS->RxPendingPktList)) {
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "%s(): start RREORDER indicate\n", __func__);
netdev_dbg(ieee->dev, "%s(): start RREORDER indicate\n",
__func__);
pReorderEntry = (struct rx_reorder_entry *)list_entry(pTS->RxPendingPktList.prev,
struct rx_reorder_entry, List);
......@@ -693,7 +699,8 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
pTS->RxIndicateSeq = (pTS->RxIndicateSeq + 1) % 4096;
ieee->prxbIndicateArray[index] = pReorderEntry->prxb;
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "%s(): Indicate SeqNum %d!\n", __func__, pReorderEntry->SeqNum);
netdev_dbg(ieee->dev, "%s(): Indicate SeqNum %d!\n",
__func__, pReorderEntry->SeqNum);
index++;
list_add_tail(&pReorderEntry->List,
......@@ -725,8 +732,7 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
}
if (bPktInBuf && pTS->RxTimeoutIndicateSeq == 0xffff) {
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "%s(): SET rx timeout timer\n",
__func__);
netdev_dbg(ieee->dev, "%s(): SET rx timeout timer\n", __func__);
pTS->RxTimeoutIndicateSeq = pTS->RxIndicateSeq;
mod_timer(&pTS->RxPktPendingTimer, jiffies +
msecs_to_jiffies(pHTInfo->RxReorderPendingTime));
......@@ -1084,10 +1090,10 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
netdev_dbg(ieee->dev, "Rx Fragment received (%u)\n", frag);
if (!frag_skb) {
RTLLIB_DEBUG(RTLLIB_DL_RX | RTLLIB_DL_FRAG,
"Rx cannot get skb from fragment cache (morefrag=%d seq=%u frag=%u)\n",
(fc & RTLLIB_FCTL_MOREFRAGS) != 0,
WLAN_GET_SEQ_SEQ(sc), frag);
netdev_dbg(ieee->dev,
"Rx cannot get skb from fragment cache (morefrag=%d seq=%u frag=%u)\n",
(fc & RTLLIB_FCTL_MOREFRAGS) != 0,
WLAN_GET_SEQ_SEQ(sc), frag);
return -1;
}
flen = skb->len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment