1 Index: madwifi-trunk-r3280/net80211/ieee80211_input.c
2 ===================================================================
3 --- madwifi-trunk-r3280.orig/net80211/ieee80211_input.c 2008-01-28 17:36:55.186089457 +0100
4 +++ madwifi-trunk-r3280/net80211/ieee80211_input.c 2008-01-28 17:38:42.816222949 +0100
7 skb1 = skb_copy(skb, GFP_ATOMIC);
8 /* Increment reference count after copy */
10 - ieee80211_skb_copy_noderef(skb, skb1);
14 + ieee80211_skb_copy_noderef(skb, skb1);
16 /* we now have 802.3 MAC hdr followed by 802.2 LLC/SNAP; convert to EthernetII.
17 * Note that the frame is at least IEEE80211_MIN_LEN, due to the driver code. */
18 @@ -1056,9 +1058,11 @@
21 ni->ni_rxfrag = skb_copy(skb, GFP_ATOMIC);
22 - /* We duplicate the reference after skb_copy */
23 - ieee80211_skb_copy_noderef(skb, ni->ni_rxfrag);
24 - ieee80211_dev_kfree_skb(&skb);
25 + if (ni->ni_rxfrag) {
26 + /* We duplicate the reference after skb_copy */
27 + ieee80211_skb_copy_noderef(skb, ni->ni_rxfrag);
28 + ieee80211_dev_kfree_skb(&skb);
32 * Check that we have enough space to hold
34 (skb_end_pointer(skb) - skb->head),
36 /* We duplicate the reference after skb_copy */
37 - if (skb != ni->ni_rxfrag)
38 + if ((skb != ni->ni_rxfrag) && ni->ni_rxfrag)
39 ieee80211_skb_copy_noderef(skb, ni->ni_rxfrag);
40 ieee80211_dev_kfree_skb(&skb);
43 if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
44 /* Create a SKB for the BSS to send out. */
45 skb1 = skb_copy(skb, GFP_ATOMIC);
46 - SKB_CB(skb1)->ni = ieee80211_ref_node(vap->iv_bss);
48 + SKB_CB(skb1)->ni = ieee80211_ref_node(vap->iv_bss);
54 /* XXX: does this always work? */
55 tskb = skb_copy(skb, GFP_ATOMIC);
59 /* We duplicate the reference after skb_copy */
60 ieee80211_skb_copy_noderef(skb, tskb);
61 ieee80211_dev_kfree_skb(&skb);