Remove some conditional SKB/reference handling.

* packets dropped in ath_hardstart are cleaned up there, so cleaning up in parent_queue_xmit is an error
* packets in ieee80211_pwrsave must always have a reference in the cb, so it is better that is fails noisily otherwise


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3074 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
mentor 2007-12-23 20:03:13 +00:00
parent 2de63dd9d2
commit 987156394d
2 changed files with 2 additions and 17 deletions

View File

@ -311,7 +311,6 @@ bad:
void ieee80211_parent_queue_xmit(struct sk_buff *skb) {
struct ieee80211vap *vap = skb->dev->priv;
struct ieee80211_node *ni;
vap->iv_devstats.tx_packets++;
vap->iv_devstats.tx_bytes += skb->len;
@ -320,21 +319,8 @@ void ieee80211_parent_queue_xmit(struct sk_buff *skb) {
/* Dispatch the packet to the parent device */
skb->dev = vap->iv_ic->ic_dev;
ni = SKB_CB(skb)->ni;
if (dev_queue_xmit(skb) == NET_XMIT_DROP) {
/* If queue dropped the packet because device was
* too busy */
if (dev_queue_xmit(skb) == NET_XMIT_DROP)
vap->iv_devstats.tx_dropped++;
if (ni != NULL) {
/* node reference was leaked */
ieee80211_unref_node(&ni);
}
}
else {
/* node reference was not leaked, forget about it */
ni = NULL;
}
skb = NULL; /* skb is no longer ours */
}
/*

View File

@ -224,8 +224,7 @@ ieee80211_pwrsave(struct ieee80211_node *ni, struct sk_buff *skb)
if (ieee80211_msg_dumppkts(vap))
ieee80211_dump_pkt(ni->ni_ic, skb->data, skb->len, -1, -1);
#endif
if (SKB_CB(skb)->ni != NULL)
ieee80211_unref_node(&SKB_CB(skb)->ni);
ieee80211_unref_node(&SKB_CB(skb)->ni);
ieee80211_dev_kfree_skb(&skb);
return;
}