[PATCH 01/10] Add WCN36XX_DBG_BEACON

Kalle Valo kvalo at qca.qualcomm.com
Mon May 27 07:52:35 EDT 2013


This is to make it easy to filter out beacon messages from the log file as they
easily spam the log and hide relevant information.

Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
---
 txrx.c    |    9 +++++++--
 wcn36xx.h |    1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/txrx.c b/txrx.c
index c469e68..a534125 100644
--- a/txrx.c
+++ b/txrx.c
@@ -45,8 +45,13 @@ int  wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
 
 	hdr = (struct ieee80211_hdr *) skb2->data;
 
-	wcn36xx_dbg(WCN36XX_DBG_RX, "rx skb %p len %d fc %02x",
-		    skb2, skb2->len, __le16_to_cpu(hdr->frame_control));
+	if (ieee80211_is_beacon(hdr->frame_control)) {
+		wcn36xx_dbg(WCN36XX_DBG_BEACON, "beacon skb %p len %d fc %02x",
+			    skb2, skb2->len, __le16_to_cpu(hdr->frame_control));
+	} else {
+		wcn36xx_dbg(WCN36XX_DBG_RX, "rx skb %p len %d fc %02x",
+			    skb2, skb2->len, __le16_to_cpu(hdr->frame_control));
+	}
 
 	wcn36xx_dbg_dump(WCN36XX_DBG_RX_DUMP, "SKB <<< ",
 			 (char*)skb2->data, skb2->len);
diff --git a/wcn36xx.h b/wcn36xx.h
index 4fb26b6..91eacb4 100644
--- a/wcn36xx.h
+++ b/wcn36xx.h
@@ -46,6 +46,7 @@ enum wcn36xx_debug_mask {
 	WCN36XX_DBG_HAL		= 0x00000100,
 	WCN36XX_DBG_HAL_DUMP	= 0x00000200,
 	WCN36XX_DBG_MAC		= 0x00000400,
+	WCN36XX_DBG_BEACON	= 0x00000800,
 	WCN36XX_DBG_ANY		= 0xffffffff,
 };
 




More information about the wcn36xx mailing list