require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NET80211_IEEE80211_NODE_H_)) {
    eval 'sub _NET80211_IEEE80211_NODE_H_ () {1;}' unless defined(&_NET80211_IEEE80211_NODE_H_);
    eval 'sub IEEE80211_PSCAN_WAIT () {5;}' unless defined(&IEEE80211_PSCAN_WAIT);
    eval 'sub IEEE80211_TRANS_WAIT () {5;}' unless defined(&IEEE80211_TRANS_WAIT);
    eval 'sub IEEE80211_INACT_WAIT () {5;}' unless defined(&IEEE80211_INACT_WAIT);
    eval 'sub IEEE80211_INACT_MAX () {(300/ &IEEE80211_INACT_WAIT);}' unless defined(&IEEE80211_INACT_MAX);
    eval 'sub IEEE80211_CACHE_SIZE () {100;}' unless defined(&IEEE80211_CACHE_SIZE);
    eval("sub IEEE80211_STA_CACHE () { 0; }") unless defined(&IEEE80211_STA_CACHE);
    eval("sub IEEE80211_STA_BSS () { 1; }") unless defined(&IEEE80211_STA_BSS);
    eval("sub IEEE80211_STA_AUTH () { 2; }") unless defined(&IEEE80211_STA_AUTH);
    eval("sub IEEE80211_STA_ASSOC () { 3; }") unless defined(&IEEE80211_STA_ASSOC);
    eval("sub IEEE80211_STA_COLLECT () { 4; }") unless defined(&IEEE80211_STA_COLLECT);
    eval 'sub ieee80211_node_newstate {
        my($__ni, $__state) = @_;
	    eval q( &do { ($__ni)-> &ni_state = ($__state); }  &while (0));
    }' unless defined(&ieee80211_node_newstate);
    eval("sub IEEE80211_PS_AWAKE () { 0; }") unless defined(&IEEE80211_PS_AWAKE);
    eval("sub IEEE80211_PS_DOZE () { 1; }") unless defined(&IEEE80211_PS_DOZE);
    eval 'sub IEEE80211_PS_MAX_QUEUE () {50;}' unless defined(&IEEE80211_PS_MAX_QUEUE);
    eval("sub RSNA_INITIALIZE () { 0; }") unless defined(&RSNA_INITIALIZE);
    eval("sub RSNA_AUTHENTICATION () { 1; }") unless defined(&RSNA_AUTHENTICATION);
    eval("sub RSNA_AUTHENTICATION_2 () { 2; }") unless defined(&RSNA_AUTHENTICATION_2);
    eval("sub RSNA_INITPMK () { 3; }") unless defined(&RSNA_INITPMK);
    eval("sub RSNA_INITPSK () { 4; }") unless defined(&RSNA_INITPSK);
    eval("sub RSNA_PTKSTART () { 5; }") unless defined(&RSNA_PTKSTART);
    eval("sub RSNA_PTKCALCNEGOTIATING () { 6; }") unless defined(&RSNA_PTKCALCNEGOTIATING);
    eval("sub RSNA_PTKCALCNEGOTIATING_2 () { 7; }") unless defined(&RSNA_PTKCALCNEGOTIATING_2);
    eval("sub RSNA_PTKINITNEGOTIATING () { 8; }") unless defined(&RSNA_PTKINITNEGOTIATING);
    eval("sub RSNA_PTKINITDONE () { 9; }") unless defined(&RSNA_PTKINITDONE);
    eval("sub RSNA_DISCONNECT () { 10; }") unless defined(&RSNA_DISCONNECT);
    eval("sub RSNA_DISCONNECTED () { 11; }") unless defined(&RSNA_DISCONNECTED);
    eval("sub RSNA_IDLE () { 0; }") unless defined(&RSNA_IDLE);
    eval("sub RSNA_REKEYNEGOTIATING () { 1; }") unless defined(&RSNA_REKEYNEGOTIATING);
    eval("sub RSNA_REKEYESTABLISHED () { 2; }") unless defined(&RSNA_REKEYESTABLISHED);
    eval("sub RSNA_KEYERROR () { 3; }") unless defined(&RSNA_KEYERROR);
    if(defined(&notyet)) {
    }
    eval 'sub IEEE80211_NODE_ERP () {0x1;}' unless defined(&IEEE80211_NODE_ERP);
    eval 'sub IEEE80211_NODE_QOS () {0x2;}' unless defined(&IEEE80211_NODE_QOS);
    eval 'sub IEEE80211_NODE_REKEY () {0x4;}' unless defined(&IEEE80211_NODE_REKEY);
    eval 'sub IEEE80211_NODE_RXPROT () {0x8;}' unless defined(&IEEE80211_NODE_RXPROT);
    eval 'sub IEEE80211_NODE_TXPROT () {0x10;}' unless defined(&IEEE80211_NODE_TXPROT);
    eval 'sub IEEE80211_NODE_TXRXPROT () {( &IEEE80211_NODE_TXPROT |  &IEEE80211_NODE_RXPROT);}' unless defined(&IEEE80211_NODE_TXRXPROT);
    eval 'sub ieee80211_node_incref {
        my($ni) = @_;
	    eval q( &do { \'int\'  &_s =  &splnet(); ($ni)-> &ni_refcnt++;  &splx( &_s); }  &while (0));
    }' unless defined(&ieee80211_node_incref);
    eval 'sub ieee80211_node_decref {
        my($ni) = @_;
	    eval q({ \'int\'  &refcnt,  &s;  &s =  &splnet();  &refcnt = -- ($ni->{ni_refcnt});  &splx( &s);  &refcnt; });
    }' unless defined(&ieee80211_node_decref);
    eval 'sub ieee80211_ref_node {
        my($ni) = @_;
	    eval q({  &ieee80211_node_incref($ni); $ni; });
    }' unless defined(&ieee80211_ref_node);
    eval 'sub ieee80211_unref_node {
        my($ni) = @_;
	    eval q({  &ieee80211_node_decref(*$ni); *$ni =  &NULL; });
    }' unless defined(&ieee80211_unref_node);
    if(defined(&MALLOC_DECLARE)) {
    }
}
1;
