mirror of https://github.com/proski/madwifi
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:
parent
03b00b0e45
commit
c0466a75a6
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue