Skip to content

Commit

Permalink
Fix compilation with IEEE80211_DEBUG_REFCNT=1
Browse files Browse the repository at this point in the history
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4164 0192ed92-7a03-0410-a25b-9323aeb14dbd
  • Loading branch information
proski committed Aug 15, 2011
1 parent 2774fa5 commit 2fc801a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ath/if_ath.c
Expand Up @@ -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) &&
Expand Down
4 changes: 0 additions & 4 deletions net80211/ieee80211_linux.c
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions net80211/ieee80211_skb.c
Expand Up @@ -273,28 +273,28 @@ 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();
}
atomic_inc(&skb_total_counter);
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... */
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2fc801a

Please sign in to comment.