Fix compilation with IEEE80211_DEBUG_REFCNT=1

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4164 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
proski 2011-08-15 18:59:53 +00:00
parent 2774fa543e
commit 2fc801acdb
3 changed files with 7 additions and 11 deletions

View File

@ -12389,7 +12389,7 @@ ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **bf)
atomic_dec(&sc->sc_txbuf_counter);
#ifdef IEEE80211_DEBUG_REFCNT
DPRINTF(sc, ATH_DEBUG_TXBUF,
"[TXBUF=%03d/%03d] returned txbuf %p.\n",
"[TXBUF=%03d/%03d] returned txbuf.\n",
ath_get_buffer_count(sc), ATH_TXBUF);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */
if (netif_queue_stopped(sc->sc_dev) &&

View File

@ -146,11 +146,7 @@ ieee80211_getmgtframe(u_int8_t **frm, u_int pktlen)
u_int len;
len = roundup(sizeof(struct ieee80211_frame) + pktlen, 4);
#ifdef IEEE80211_DEBUG_REFCNT
skb = ieee80211_dev_alloc_skb_debug(len + align - 1, func, line);
#else
skb = ieee80211_dev_alloc_skb(len + align - 1);
#endif
if (skb != NULL) {
u_int off = ((unsigned long) skb->data) % align;
if (off != 0)

View File

@ -273,20 +273,20 @@ track_skb(struct sk_buff *skb, int users_adjustment,
{
if (NULL == skb) {
skb_print_message(0 /* show_counter */,
skb, func2, line2,
skb, func, line,
"ERROR: NULL skb received. Skipping.");
return NULL;
}
if (M_FLAG_GET(skb, M_SKB_TRACKED)) {
skb_print_message(0 /* show_counter */,
skb, func2, line2,
skb, func, line,
"ERROR: Already tracked skb received. Skipping.");
dump_stack();
return skb;
}
if (skb_shared(skb)) {
skb_print_message(0 /* show_counter */,
skb, func2, line2,
skb, func, line,
"ERROR: Shared skb received. References leaked??");
dump_stack();
}
@ -294,7 +294,7 @@ track_skb(struct sk_buff *skb, int users_adjustment,
atomic_inc(&skb_refs_counter);
M_FLAG_SET(skb, M_SKB_TRACKED);
print_skb_trackchange_message(skb, users_adjustment,
func2, line2,
func, line,
" is now ** TRACKED **");
#ifdef IEEE80211_DEBUG_REFCNT_SKBDEST
/* Install our debug destructor, chaining to the original... */
@ -380,7 +380,7 @@ unref_skb(struct sk_buff *skb, int type,
if (skb_shared(skb)) {
atomic_dec(&skb_refs_counter);
print_skb_refchange_message(skb, -1, func2, line2);
print_skb_refchange_message(skb, -1, func, line);
}
else {
if (SKB_NI(skb) != NULL) {
@ -674,7 +674,7 @@ void kfree_skb_fast_debug(struct sk_buff *skb,
const char *func, int line)
{
/* NOT so fast... */
unref_skb(skb, UNREF_USE_DEV_KFREE_SKB_ANY, func, line, __func__, __LINE__);
unref_skb(skb, UNREF_USE_DEV_KFREE_SKB_ANY, func, line);
}
struct sk_buff *skb_unshare_debug(struct sk_buff *skb, gfp_t pri,