Ticket #907: madwifi-refcount-ng-debug-dependency-cycle.diff

File madwifi-refcount-ng-debug-dependency-cycle.diff, 3.0 kB (added by mike.taylor@apprion.com, 5 years ago)

Signed patch describing/resolving cycle in ieee 80211 debugging code

  • madwifi/net80211/ieee80211_var.h

    old new  
    4141 
    4242#include <net80211/_ieee80211.h> 
    4343#include <net80211/ieee80211.h> 
     44#include <net80211/ieee80211_debug.h> 
    4445#include <net80211/ieee80211_crypto.h> 
    4546#include <net80211/ieee80211_ioctl.h>           /* for ieee80211_stats */ 
    4647#include <net80211/ieee80211_node.h> 
     
    239240        u_int32_t app_filter;                           /* filters which management frames are forwarded to app */ 
    240241}; 
    241242 
    242 /* Debug functions need the defintion of struct ieee80211vap because iv_debug  
    243  * is used at runtime to determine if we should log an event 
    244  */ 
    245 #include <net80211/ieee80211_debug.h> 
    246  
    247243struct ieee80211com { 
    248244        struct net_device *ic_dev;              /* associated device */ 
    249245        ieee80211com_lock_t ic_comlock;         /* state update lock */ 
  • madwifi/net80211/ieee80211_node.c

    old new  
    19751975                ni->ni_vap = vap; 
    19761976                ni->ni_ic = vap->iv_ic; 
    19771977} 
     1978 
     1979#ifdef IEEE80211_DEBUG_REFCNT 
     1980void 
     1981ieee80211_unref_node_debug(struct ieee80211_node **pni, const char *func, int line) 
     1982{        
     1983        struct ieee80211_node *ni = *pni; 
     1984        IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_NODE, 
     1985                "%s (%s:%u) %p<%s> refcnt %d\n", __func__, func, line, ni, 
     1986                 ether_sprintf(ni->ni_macaddr), ieee80211_node_refcnt(ni) - 1); 
     1987        _ieee80211_unref_node(ni);  
     1988        *pni = NULL;                    /* guard against use */ 
     1989 } 
     1990#endif 
     1991