update madwifi
[linux-2.6/zen-sources.git] / drivers / net / wireless / madwifi / net80211 / ieee80211_skb.c
blob610b82ac239db3cc008ce2e44510d1d213ba10f1
1 /*-
2 * Copyright (c) 2007 Michael Taylor, Apprion
3 * All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. The name of the author may not be used to endorse or promote products
14 * derived from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 * $Id: ieee80211_linux.c 2829 2007-11-05 20:43:50Z mtaylor $
30 #ifndef EXPORT_SYMTAB
31 #define EXPORT_SYMTAB
32 #endif
35 * IEEE 802.11 support (Linux-specific code)
37 #ifndef AUTOCONF_INCLUDED
38 #include <linux/config.h>
39 #endif
40 #include <linux/version.h>
41 #include <linux/module.h>
42 #include <linux/kmod.h>
43 #include <linux/init.h>
44 #include <linux/skbuff.h>
45 #include <linux/sysctl.h>
46 #include <linux/netdevice.h>
47 #include <linux/etherdevice.h>
48 #include <linux/if_vlan.h>
49 #include <linux/vmalloc.h>
50 #include <linux/proc_fs.h>
52 #include <net/iw_handler.h>
53 #include <linux/wireless.h>
54 #include <linux/if_arp.h> /* XXX for ARPHRD_* */
56 #include <asm/uaccess.h>
58 #include "if_media.h"
59 #include "if_ethersubr.h"
61 #include <net80211/ieee80211_var.h>
62 #include <net80211/ieee80211_monitor.h>
64 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
65 #include <linux/device.h>
66 #endif
68 #undef alloc_skb
69 #undef dev_alloc_skb
70 #undef dev_kfree_skb
71 #undef dev_kfree_skb_any
72 #undef dev_kfree_skb_irq
73 #undef dev_queue_xmit
74 #undef kfree_skb
75 #undef kfree_skb_fast
76 #undef netif_rx
77 #undef pskb_copy
78 #undef skb_clone
79 #undef skb_copy
80 #undef skb_copy_expand
81 #undef skb_get
82 #undef skb_realloc_headroom
83 #undef skb_share_check
84 #undef skb_unshare
85 #undef vlan_hwaccel_rx
87 atomic_t skb_total_counter = ATOMIC_INIT(0);
88 EXPORT_SYMBOL(skb_total_counter);
90 #ifdef IEEE80211_DEBUG_REFCNT
91 atomic_t skb_refs_counter = ATOMIC_INIT(0);
92 EXPORT_SYMBOL(skb_refs_counter);
93 #endif
95 /*******************************************************************************
96 * Debug Helpers
97 ******************************************************************************/
99 static void skb_print_message(
100 int show_counter,
101 const struct sk_buff *skb,
102 const char *func, int line,
103 const char *message,
104 ...)
106 va_list args;
107 char skb_count[32] = { '\0' };
108 char expanded_message[1024] = { '\0' };
109 if (show_counter) {
110 #ifdef IEEE80211_DEBUG_REFCNT
111 snprintf(skb_count,
112 sizeof(skb_count),
113 "[#SKB=%05d #REF=%05d] ",
114 atomic_read(&skb_total_counter),
115 atomic_read(&skb_refs_counter));
116 #else
117 snprintf(skb_count,
118 sizeof(skb_count),
119 "[#SKB=%05d] ",
120 atomic_read(&skb_total_counter));
121 #endif
124 va_start(args, message);
125 vsnprintf(expanded_message, sizeof(expanded_message), message, args);
126 printk(KERN_DEBUG "%s: %s%s:%d %s\n",
127 ((skb != NULL) ? DEV_NAME(skb->dev) : "none"),
128 skb_count,
129 func, line,
130 expanded_message);
131 va_end(args);
132 #ifdef IEEE80211_DEBUG_REFCNT
133 dump_stack();
134 #endif
137 #ifdef IEEE80211_DEBUG_REFCNT
139 static void
140 print_skb_refchange_message(
141 const struct sk_buff *skb, int users_adjustment,
142 const char *func, int line);
143 static void
144 print_skb_trackchange_message(
145 const struct sk_buff *skb, int users_adjustment,
146 const char *func, int line,
147 char *message);
149 /* Called automatically when an SKB reaches zero users,
150 * reporting any leaked node references. */
151 #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST
152 static void skb_destructor(struct sk_buff *skb);
153 #endif
154 static void get_skb_description(char *dst, int dst_size, const char *label,
155 const struct sk_buff *skb, int users_adjustment);
157 static struct sk_buff *
158 clean_clone_or_copy(struct sk_buff *skb);
160 static struct sk_buff *
161 track_skb(struct sk_buff *skb, int users_adjustment,
162 const char *func, int line);
164 static struct sk_buff *
165 untrack_skb(struct sk_buff *skb, int users_adjustment,
166 const char *func, int line);
168 #define UNREF_USE_KFREE_SKB 0
169 #define UNREF_USE_DEV_KFREE_SKB_ANY 1
170 #define UNREF_USE_DEV_KFREE_SKB 2
171 #define UNREF_USE_DEV_KFREE_SKB_IRQ 3
173 /* Assumes SKB is not yet freed at the time of the call and shows the new users
174 * count as (users - 1). */
175 static void unref_skb(struct sk_buff *skb, int type,
176 const char *func, int line);
178 /* Assumes SKB reference counter has already been updated and reports count as
179 * atomic_read(&skb->users). */
180 static struct sk_buff *
181 ref_skb(struct sk_buff *skb,
182 const char *func, int line);
185 #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST
186 /* Destructor for reporting node reference leaks */
187 static void skb_destructor(struct sk_buff *skb) {
188 /* Report any node reference leaks - caused by kernel net device queue
189 * dropping buffer, rather than passing it to the driver. */
190 if (SKB_NI(skb) != NULL) {
191 printk(KERN_ERR "%s:%d - ERROR: non-NULL node pointer in %p, %p<" MAC_FMT ">! "
192 "Leak Detected!\n",
193 __func__, __LINE__,
194 skb, SKB_NI(skb), MAC_ADDR(SKB_NI(skb)->ni_macaddr));
195 dump_stack();
197 if (SKB_CB(skb)->next_destructor != NULL) {
198 SKB_CB(skb)->next_destructor(skb);
201 EXPORT_SYMBOL(skb_destructor);
202 #endif /* #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST */
204 static void get_skb_description(char *dst, int dst_size, const char *label, const struct sk_buff *skb, int users_adjustment) {
205 dst[0] = '\0';
206 if (NULL != skb) {
207 int adj_users = atomic_read(&skb->users) + users_adjustment;
208 if (SKB_NI(skb) != NULL) {
209 snprintf(dst, dst_size,
210 " [%s%s%p,users=%d,node=%p<" MAC_FMT ">,aid=%d%s%s]",
211 label,
212 (label != NULL ? ": " : ""),
213 skb,
214 adj_users,
215 SKB_NI(skb),
216 MAC_ADDR(SKB_NI(skb)->ni_macaddr),
217 SKB_NI(skb)->ni_associd,
218 ((adj_users < 0) ? " ** CORRUPTED **" : ""),
219 ((adj_users == 0) ? " ** RELEASED **" : "")
222 else {
223 snprintf(dst, dst_size,
224 " [%s%s%p,users=%d,node=NULL,aid=N/A%s%s]",
225 label,
226 (label != NULL ? ": " : ""),
227 skb,
228 adj_users,
229 ((adj_users < 0) ? " ** CORRUPTED **" : ""),
230 ((adj_users == 0) ? " ** RELEASED **" : "")
233 dst[dst_size-1] = '\0';
237 static void print_skb_refchange_message(
238 const struct sk_buff *skb, int users_adjustment,
239 const char *func, int line)
241 char skb_desc[128] = { '\0' };
242 if (0 == (ath_debug_global & GLOBAL_DEBUG_SKB_REF))
243 return;
244 get_skb_description(skb_desc, sizeof(skb_desc),
245 "skb", skb, users_adjustment);
246 skb_print_message(0 /* no global count */, skb,
247 func, line,
248 skb_desc);
251 static void print_skb_trackchange_message(
252 const struct sk_buff *skb, int users_adjustment,
253 const char *func, int line,
254 char *message)
256 char skb_desc[128] = { '\0' };
257 if (0 == (ath_debug_global & GLOBAL_DEBUG_SKB))
258 return;
259 get_skb_description(skb_desc, sizeof(skb_desc),
260 "skb", skb, users_adjustment);
261 skb_print_message(1 /* show global count */, skb,
262 func, line,
263 "%s%s", skb_desc, message);
266 static struct sk_buff *
267 clean_clone_or_copy(struct sk_buff *skb) {
268 if (skb != NULL)
269 M_FLAG_CLR(skb, M_SKB_TRACKED);
270 return skb;
273 static struct sk_buff *
274 track_skb(struct sk_buff *skb, int users_adjustment,
275 const char *func, int line)
277 if (NULL == skb) {
278 skb_print_message(0 /* show_counter */,
279 skb, func2, line2,
280 "ERROR: NULL skb received. Skipping.");
281 return NULL;
283 if (M_FLAG_GET(skb, M_SKB_TRACKED)) {
284 skb_print_message(0 /* show_counter */,
285 skb, func2, line2,
286 "ERROR: Already tracked skb received. Skipping.");
287 dump_stack();
288 return skb;
290 if (skb_shared(skb)) {
291 skb_print_message(0 /* show_counter */,
292 skb, func2, line2,
293 "ERROR: Shared skb received. References leaked??");
294 dump_stack();
296 atomic_inc(&skb_total_counter);
297 atomic_inc(&skb_refs_counter);
298 M_FLAG_SET(skb, M_SKB_TRACKED);
299 print_skb_trackchange_message(skb, users_adjustment,
300 func2, line2,
301 " is now ** TRACKED **");
302 #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST
303 /* Install our debug destructor, chaining to the original... */
304 if (skb->destructor != skb_destructor) {
305 SKB_CB(skb)->next_destructor = skb->destructor;
306 skb->destructor = skb_destructor;
308 #endif /* #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST */
309 return skb;
312 static struct sk_buff *
313 untrack_skb(struct sk_buff *skb, int users_adjustment,
314 const char *func, int line)
316 if (NULL == skb) {
317 skb_print_message(0 /* show_counter */,
318 skb, func, line,
319 "ERROR: NULL skb received. No changes made.");
320 return NULL;
322 if (!M_FLAG_GET(skb, M_SKB_TRACKED)) {
323 skb_print_message(0 /* show_counter */,
324 skb, func, line,
325 "ERROR: Untracked skb received. No changes made.");
326 return skb;
328 if (skb_shared(skb)) {
329 skb_print_message(0 /* show_counter */,
330 skb, func, line,
331 "ERROR: Shared skb received. References leaked??");
333 atomic_dec(&skb_total_counter);
334 atomic_dec(&skb_refs_counter);
335 M_FLAG_CLR(skb, M_SKB_TRACKED);
336 #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST
337 /* Uninstall our debug destructor, restoring any original... */
338 if (skb->destructor == skb_destructor) {
339 skb->destructor = SKB_CB(skb)->next_destructor;
340 SKB_CB(skb)->next_destructor = NULL;
342 #endif /* #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST */
343 print_skb_trackchange_message(skb, users_adjustment,
344 func, line,
345 " is now ** UNTRACKED **");
346 return skb;
349 #define UNREF_USE_KFREE_SKB 0
350 #define UNREF_USE_DEV_KFREE_SKB_ANY 1
351 #define UNREF_USE_DEV_KFREE_SKB 2
352 #define UNREF_USE_DEV_KFREE_SKB_IRQ 3
354 /* Assumes SKB is not yet freed at the time of the call and shows the new users
355 * count as (users - 1). */
356 static void
357 unref_skb(struct sk_buff *skb, int type,
358 const char *func, int line)
360 if (NULL == skb) {
361 skb_print_message(0 /* show_counter */,
362 skb, func, line,
363 "ERROR: NULL skb received.");
364 dump_stack();
365 return;
367 if (!M_FLAG_GET(skb, M_SKB_TRACKED)) {
368 skb_print_message(0 /* show_counter */,
369 skb, func, line,
370 "ERROR: Untracked skb received. Probable duplicate free error!");
371 dump_stack();
372 return;
374 /* If free is unacceptable for current user count, report the error. */
375 if (atomic_read(&skb->users) < 1) {
376 skb_print_message(0 /* show_counter */,
377 skb, func, line,
378 "ERROR: free an skb with %d users",
379 atomic_read(&skb->users));
380 dump_stack();
381 return;
384 if (skb_shared(skb)) {
385 atomic_dec(&skb_refs_counter);
386 print_skb_refchange_message(skb, -1, func2, line2);
388 else {
389 if (SKB_NI(skb) != NULL) {
390 printk(KERN_ERR "%s:%d - ERROR: non-NULL node pointer in %p, %p<" MAC_FMT ">! "
391 "Driver Leak Detected!\n",
392 __func__, __LINE__,
393 skb, SKB_NI(skb), MAC_ADDR(SKB_NI(skb)->ni_macaddr));
394 dump_stack();
395 /* Allow the leak and let programmer fix it, but do not
396 * report it again in the destructor. */
397 SKB_NI(skb) = NULL;
399 untrack_skb(skb, -1, func, line);
402 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
403 if ((in_irq() || irqs_disabled()) &&
404 (type == UNREF_USE_KFREE_SKB ||
405 type == UNREF_USE_DEV_KFREE_SKB)) {
406 skb_print_message(0 /* show_counter */,
407 skb, func, line,
408 "ERROR: free an skb in interrupt context using a non-"
409 "safe form of skb free function.");
410 type = UNREF_USE_DEV_KFREE_SKB_ANY;
411 dump_stack();
413 #endif
415 switch (type) {
416 case UNREF_USE_DEV_KFREE_SKB_ANY:
417 dev_kfree_skb_any(skb);
418 break;
419 case UNREF_USE_DEV_KFREE_SKB_IRQ:
420 dev_kfree_skb_irq(skb);
421 break;
422 case UNREF_USE_DEV_KFREE_SKB:
423 /* NOTE: dev_kfree_skb is a macro pointing to kfree_skb, so
424 * fallthrough... */
425 case UNREF_USE_KFREE_SKB:
426 /* fallthrough */
427 default:
428 kfree_skb(skb);
429 break;
433 /* Assumes SKB reference counter has already been updated and reports count as
434 * atomic_read(&skb->users). */
435 static struct sk_buff *
436 ref_skb(struct sk_buff *skb,
437 const char *func, int line)
439 if (NULL == skb) {
440 skb_print_message(0 /* show_counter */,
441 skb, func, line,
442 "ERROR: NULL skb received. No changes made.");
443 dump_stack();
444 return NULL;
446 if (!M_FLAG_GET(skb, M_SKB_TRACKED)) {
447 skb_print_message(0 /* show_counter */,
448 skb, func, line,
449 "ERROR: Untracked skb received. Probable use after free! "
450 "No changes made.");
451 dump_stack();
452 return skb;
454 print_skb_refchange_message(skb, 0, func, line);
455 return skb;
458 #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
460 /*******************************************************************************
461 * Public API
462 ******************************************************************************/
464 /* ieee80211_dev_kfree_skb will release one reference from SKB.
465 * If SKB refcount is going to zero:
466 * - Free the node reference and set it to null.
467 * - Break the linked list, clearing next skb's prev pointer if possible. */
468 void ieee80211_dev_kfree_skb(struct sk_buff **pskb)
470 struct sk_buff *skb;
472 /* Do not fail on null, as we are going to use this in cleanup code. */
473 if (!pskb || !(skb = *pskb))
474 return;
476 /* Release the SKB references, for fragments of chain that are
477 * unshared... starting at skb passed in. */
478 if (skb->prev == NULL) {
479 if (skb->next != NULL)
480 skb->next->prev = NULL;
481 skb->next = NULL;
484 if (SKB_NI(skb) != NULL)
485 ieee80211_unref_node(&SKB_NI(skb));
487 #ifdef IEEE80211_DEBUG_REFCNT
488 unref_skb(skb, UNREF_USE_DEV_KFREE_SKB_ANY,
489 __func__, __LINE__);
490 #else
491 dev_kfree_skb_any(skb);
492 #endif
494 *pskb = NULL;
497 /* ieee80211_dev_kfree_skb_list will invoke ieee80211_dev_kfree_skb on each node in
498 * a list of skbs, starting with the first. */
499 void
500 ieee80211_dev_kfree_skb_list(struct sk_buff **pskb)
502 struct sk_buff *skb, *tskb;
504 /* Do not fail on null, as we are going to use this in cleanup code */
505 if (!pskb || !(skb = *pskb))
506 return;
508 while (skb) {
509 tskb = skb->next;
511 ieee80211_dev_kfree_skb(&skb);
512 skb = tskb;
515 *pskb = NULL;
518 struct sk_buff *
519 ieee80211_dev_alloc_skb(int size)
521 struct sk_buff *skb = dev_alloc_skb(size);
522 if (skb == NULL) {
523 skb_print_message(
524 0 /* show_counter */,
525 NULL /* skb */,
526 __func__, __LINE__,
527 "sk_buff allocation of size %u failed",
528 size);
529 return NULL;
532 #ifdef IEEE80211_DEBUG_REFCNT
533 return track_skb(skb, 0, __func__, __LINE__);
534 #else
535 return skb;
536 #endif
539 void
540 ieee80211_skb_track(struct sk_buff *skb) {
541 #ifdef IEEE80211_DEBUG_REFCNT
542 track_skb(skb, 0 /* users_adjustment */,
543 __func__, __LINE__);
544 #else
545 /* Just a dumb counter, in no-debug builds */
546 atomic_inc(&skb_total_counter);
547 #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
550 void
551 ieee80211_skb_untrack(struct sk_buff *skb) {
552 /* Just a dumb counter, in no-debug builds */
553 atomic_dec(&skb_total_counter);
556 #ifdef IEEE80211_DEBUG_REFCNT
557 int
558 ieee80211_skb_counter(void) {
559 return atomic_read(&skb_total_counter);
563 ieee80211_skb_references(void) {
564 return atomic_read(&skb_refs_counter);
566 #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
568 /*******************************************************************************
569 * skbuff leak/refcount debugging Replacement Functions
570 * PUT last in order to avoid conflicts with use of original functions in
571 * inline functions above this point.
572 ******************************************************************************/
574 #ifdef IEEE80211_DEBUG_REFCNT
576 int vlan_hwaccel_rx_debug(struct sk_buff *skb,
577 struct vlan_group *grp, unsigned short vlan_tag,
578 const char *func, int line) {
579 return vlan_hwaccel_rx(
580 untrack_skb(skb, 0, __func__, __LINE__),
581 grp, vlan_tag);
584 int netif_rx_debug(struct sk_buff *skb, const char *func, int line) {
585 return netif_rx(untrack_skb(skb, 0, __func__, __LINE__));
588 struct sk_buff *alloc_skb_debug(unsigned int length, gfp_t gfp_mask,
589 const char *func, int line) {
590 return track_skb(alloc_skb(length, gfp_mask),
591 0 /* users_adjustment */,
592 __func__, __LINE__);
595 struct sk_buff *dev_alloc_skb_debug(unsigned int length,
596 const char *func, int line)
598 return track_skb(dev_alloc_skb(length),
599 0 /* users_adjustment */,
600 __func__, __LINE__);
605 struct sk_buff *skb_clone_debug(struct sk_buff *skb, gfp_t pri,
606 const char *func, int line)
608 return track_skb(
609 clean_clone_or_copy(skb_clone(skb, pri)),
610 0 /* users_adjustment */,
611 __func__, __LINE__);
614 struct sk_buff *skb_copy_debug(struct sk_buff *skb, gfp_t pri,
615 const char *func, int line)
617 return track_skb(
618 clean_clone_or_copy(skb_copy(skb, pri)), 0 /* users_adjustment */,
619 __func__, __LINE__);
622 struct sk_buff *skb_get_debug(struct sk_buff *skb,
623 const char *func, int line)
625 return ref_skb(skb_get(skb),
626 __func__, __LINE__);
629 struct sk_buff *skb_realloc_headroom_debug(struct sk_buff *skb, unsigned int headroom,
630 const char *func, int line)
632 /* skb_realloc_headroom ALWAYS returns a copy or a clone, refcount of
633 * new one is always zero and refcount of original is not touched. */
634 return track_skb(
635 clean_clone_or_copy(
636 skb_realloc_headroom(skb, headroom)),
637 0 /* users_adjustment */,
638 __func__, __LINE__);
641 struct sk_buff *pskb_copy_debug(struct sk_buff *skb, gfp_t pri,
642 const char *func, int line)
644 return track_skb(
645 clean_clone_or_copy(pskb_copy(skb, pri)),
646 0 /* users_adjustment */,
647 __func__, __LINE__);
650 int dev_queue_xmit_debug(struct sk_buff *skb,
651 const char *func, int line)
653 return dev_queue_xmit(untrack_skb(skb, 0, __func__, __LINE__));
656 struct sk_buff *skb_share_check_debug(struct sk_buff *skb, gfp_t pri,
657 const char *func, int line)
659 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
660 might_sleep_if(pri & __GFP_WAIT);
661 #endif
662 if (skb_shared(skb)) {
663 struct sk_buff *nskb = track_skb(
664 clean_clone_or_copy(skb_clone(skb, pri)),
666 __func__, __LINE__);
667 unref_skb(skb, UNREF_USE_DEV_KFREE_SKB_ANY,
668 __func__, __LINE__);
669 skb = nskb;
671 return skb;
674 void kfree_skb_fast_debug(struct sk_buff *skb,
675 const char *func, int line)
677 /* NOT so fast... */
678 unref_skb(skb, UNREF_USE_DEV_KFREE_SKB_ANY, func, line, __func__, __LINE__);
681 struct sk_buff *skb_unshare_debug(struct sk_buff *skb, gfp_t pri,
682 const char *func, int line)
684 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
685 might_sleep_if(pri & __GFP_WAIT);
686 #endif
687 if (skb_cloned(skb)) {
688 struct sk_buff *nskb = track_skb(
689 clean_clone_or_copy(skb_copy(skb, pri)), 0,
690 __func__, __LINE__);
691 unref_skb(skb, UNREF_USE_DEV_KFREE_SKB_ANY,
692 __func__, __LINE__);
693 skb = nskb;
695 return skb;
698 struct sk_buff *skb_copy_expand_debug(const struct sk_buff *skb, int newheadroom,
699 int newtailroom, gfp_t gfp_mask,
700 const char *func, int line)
702 return track_skb(
703 clean_clone_or_copy(
704 skb_copy_expand(skb, newheadroom, newtailroom, gfp_mask)),
705 0 /* users_adjustment */,
706 __func__, __LINE__);
709 EXPORT_SYMBOL(vlan_hwaccel_rx_debug);
710 EXPORT_SYMBOL(netif_rx_debug);
711 EXPORT_SYMBOL(alloc_skb_debug);
712 EXPORT_SYMBOL(dev_alloc_skb_debug);
713 EXPORT_SYMBOL(skb_clone_debug);
714 EXPORT_SYMBOL(skb_copy_debug);
715 EXPORT_SYMBOL(skb_get_debug);
716 EXPORT_SYMBOL(skb_realloc_headroom_debug);
717 EXPORT_SYMBOL(pskb_copy_debug);
718 EXPORT_SYMBOL(dev_queue_xmit_debug);
719 EXPORT_SYMBOL(skb_share_check_debug);
720 EXPORT_SYMBOL(kfree_skb_fast_debug);
721 EXPORT_SYMBOL(skb_unshare_debug);
722 EXPORT_SYMBOL(skb_copy_expand_debug);
724 EXPORT_SYMBOL(ieee80211_skb_counter);
725 EXPORT_SYMBOL(ieee80211_skb_references);
726 #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
728 EXPORT_SYMBOL(ieee80211_dev_alloc_skb);
729 EXPORT_SYMBOL(ieee80211_skb_untrack);
730 EXPORT_SYMBOL(ieee80211_dev_kfree_skb_list);
731 EXPORT_SYMBOL(ieee80211_dev_kfree_skb);
732 EXPORT_SYMBOL(ieee80211_skb_track);