Skip to contentSkip to conversation

mac80211: Print unknown packet type

RFC In review Larry Finger 2 participants 2 messages Dec 17, 2008 mac80211

lore
Share & tools
lore
#0 lore raw

RFC 1/1 mac80211: Print unknown packet type

Johannes,

I'm trying to find a problem with p54usb that causes it to go belly-up under stress testing. In one of my runs, I hit the WARN_ON in ieee80211_tasklet_handler(). Unfortunately, I got no indication of what was in skb->pkt_type, just that it was not one of the expected types.

Do you think that adding the printk below would be worthwhile?

Thanks,

Larry
---

net/mac80211/main.c +2 -0
Index: wireless-testing/net/mac80211/main.c
===================================================================
@@ -341,6 +341,8 @@ static void ieee80211_tasklet_handler(un
 			dev_kfree_skb(skb);
 			break ;
 		default:
+			printk(KERN_INFO "mac80211: Packet is of unknown type"
+					 " %d\n", skb->pkt_type);
 			WARN_ON(1);
 			dev_kfree_skb(skb);
 			break;
maintainer
#1 lore raw
Quoted 6 lines · Larry Finger

Johannes,

I'm trying to find a problem with p54usb that causes it to go belly-up under stress testing. In one of my runs, I hit the WARN_ON in ieee80211_tasklet_handler(). Unfortunately, I got no indication of what was in skb->pkt_type, just that it was not one of the expected types.

That really points to memory corruption somewhere.

Quoted 12 lines

Do you think that adding the printk below would be worthwhile?

Thanks,

Larry
---

Index: wireless-testing/net/mac80211/main.c
===================================================================

net/mac80211/main.c static void ieee80211_tasklet_handler(un · line 346

Quoted 6 lines
net/mac80211/main.c +2 -0
@@ -341,6 +341,8 @@ static void ieee80211_tasklet_handler(un
 			dev_kfree_skb(skb);
 			break ;
 		default:
+			printk(KERN_INFO "mac80211: Packet is of unknown type"
+					 " %d\n", skb->pkt_type);
 			WARN_ON(1);

Seems reasonable to me. I'd do

+ WARN(1, "mac80211: ...", skb->pkt_type);
- WARN_ON(1);

instead.

johannes