require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&__PGTVAR_H__)) {
    eval 'sub __PGTVAR_H__ () {1;}' unless defined(&__PGTVAR_H__);
    eval 'sub PGT_RX_RADIOTAP_PRESENT () {((1<<  &IEEE80211_RADIOTAP_FLAGS) | (1<<  &IEEE80211_RADIOTAP_CHANNEL) | (1<<  &IEEE80211_RADIOTAP_RSSI));}' unless defined(&PGT_RX_RADIOTAP_PRESENT);
    eval 'sub PGT_TX_RADIOTAP_PRESENT () {((1<<  &IEEE80211_RADIOTAP_FLAGS) | (1<<  &IEEE80211_RADIOTAP_RATE) | (1<<  &IEEE80211_RADIOTAP_CHANNEL));}' unless defined(&PGT_TX_RADIOTAP_PRESENT);
    eval 'sub SC_NEEDS_FIRMWARE () {0x1;}' unless defined(&SC_NEEDS_FIRMWARE);
    eval 'sub SC_UNINITIALIZED () {0x2;}' unless defined(&SC_UNINITIALIZED);
    eval 'sub SC_DYING () {0x4;}' unless defined(&SC_DYING);
    eval 'sub SC_NEEDS_RESET () {0x8;}' unless defined(&SC_NEEDS_RESET);
    eval 'sub SC_INTR_RESET () {0x20;}' unless defined(&SC_INTR_RESET);
    eval 'sub SC_POWERSAVE () {0x40;}' unless defined(&SC_POWERSAVE);
    eval 'sub SC_NOFREE_ALLNODES () {0x100;}' unless defined(&SC_NOFREE_ALLNODES);
    eval 'sub SC_START_DESIRED () {0x200;}' unless defined(&SC_START_DESIRED);
    eval 'sub SC_KTHREAD () {0x400;}' unless defined(&SC_KTHREAD);
    eval 'sub SC_ISL3877 () {0x800;}' unless defined(&SC_ISL3877);
    eval 'sub SC_DEBUG_QUEUES () {0x1;}' unless defined(&SC_DEBUG_QUEUES);
    eval 'sub SC_DEBUG_MGMT () {0x2;}' unless defined(&SC_DEBUG_MGMT);
    eval 'sub SC_DEBUG_UNEXPECTED () {0x4;}' unless defined(&SC_DEBUG_UNEXPECTED);
    eval 'sub SC_DEBUG_TRIGGER () {0x8;}' unless defined(&SC_DEBUG_TRIGGER);
    eval 'sub SC_DEBUG_EVENTS () {0x10;}' unless defined(&SC_DEBUG_EVENTS);
    eval 'sub SC_DEBUG_POWER () {0x20;}' unless defined(&SC_DEBUG_POWER);
    eval 'sub SC_DEBUG_TRAP () {0x40;}' unless defined(&SC_DEBUG_TRAP);
    eval 'sub SC_DEBUG_LINK () {0x80;}' unless defined(&SC_DEBUG_LINK);
    eval 'sub SC_DEBUG_RXANNEX () {0x100;}' unless defined(&SC_DEBUG_RXANNEX);
    eval 'sub SC_DEBUG_RXFRAG () {0x200;}' unless defined(&SC_DEBUG_RXFRAG);
    eval 'sub SC_DEBUG_RXETHER () {0x400;}' unless defined(&SC_DEBUG_RXETHER);
    if((defined(&NBPFILTER) ? &NBPFILTER : 0) > 0) {
	eval 'sub sc_rxtap () { ($sc_rxtapu->{th});}' unless defined(&sc_rxtap);
	eval 'sub sc_txtap () { ($sc_txtapu->{th});}' unless defined(&sc_txtap);
    }
    eval 'sub pgt_queue_is_rx {
        my($pq) = @_;
	    eval q({ ($pq ==  &PGT_QUEUE_DATA_LOW_RX || $pq ==  &PGT_QUEUE_DATA_HIGH_RX || $pq ==  &PGT_QUEUE_MGMT_RX); });
    }' unless defined(&pgt_queue_is_rx);
    eval 'sub pgt_queue_is_tx {
        my($pq) = @_;
	    eval q({ ($pq ==  &PGT_QUEUE_DATA_LOW_TX || $pq ==  &PGT_QUEUE_DATA_HIGH_TX || $pq ==  &PGT_QUEUE_MGMT_TX); });
    }' unless defined(&pgt_queue_is_tx);
    eval 'sub pgt_queue_is_data {
        my($pq) = @_;
	    eval q({ ($pq ==  &PGT_QUEUE_DATA_LOW_RX || $pq ==  &PGT_QUEUE_DATA_HIGH_RX || $pq ==  &PGT_QUEUE_DATA_LOW_TX || $pq ==  &PGT_QUEUE_DATA_HIGH_TX); });
    }' unless defined(&pgt_queue_is_data);
    eval 'sub pgt_queue_is_mgmt {
        my($pq) = @_;
	    eval q({ ($pq ==  &PGT_QUEUE_MGMT_RX || $pq ==  &PGT_QUEUE_MGMT_TX); });
    }' unless defined(&pgt_queue_is_mgmt);
}
1;
