Record stat's before dispatch, and generally don't try to access NULL pointers

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3674 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
mentor 2008-05-22 16:09:19 +00:00
parent 03b00b0e45
commit c0466a75a6

View File

@ -1171,6 +1171,10 @@ ieee80211_deliver_data(struct ieee80211_node *ni, struct sk_buff *skb)
}
if (skb != NULL) {
vap->iv_devstats.rx_packets++;
vap->iv_devstats.rx_bytes += skb->len;
dev->last_rx = jiffies;
skb->dev = dev;
#ifdef USE_HEADERLEN_RESV
skb->protocol = ath_eth_type_trans(skb, dev);
@ -1191,10 +1195,6 @@ ieee80211_deliver_data(struct ieee80211_node *ni, struct sk_buff *skb)
vap->iv_devstats.rx_dropped++;
}
skb = NULL; /* SKB is no longer ours */
vap->iv_devstats.rx_packets++;
vap->iv_devstats.rx_bytes += skb->len;
dev->last_rx = jiffies;
}
}