require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&ATHN_DEBUG)) {
    sub ATHN_DEBUG () {	1;}
}
unless(defined(&ATHN_BT_COEXISTENCE)) {
    sub ATHN_BT_COEXISTENCE () {	1;}
}
if(defined(&ATHN_DEBUG)) {
    eval 'sub DPRINTF {
        my($x) = @_;
	    eval q( &do {  &if ( &athn_debug > 0)  &printf $x; }  &while (0));
    }' unless defined(&DPRINTF);
    eval 'sub DPRINTFN {
        my($n, $x) = @_;
	    eval q( &do {  &if ( &athn_debug >= ($n))  &printf $x; }  &while (0));
    }' unless defined(&DPRINTFN);
} else {
    eval 'sub DPRINTF {
        my($x) = @_;
	    eval q();
    }' unless defined(&DPRINTF);
    eval 'sub DPRINTFN {
        my($n, $x) = @_;
	    eval q();
    }' unless defined(&DPRINTFN);
}
unless(defined(&ATHN_RXBUFSZ)) {
    sub ATHN_RXBUFSZ () {	3872;}
}
unless(defined(&ATHN_TXBUFSZ)) {
    sub ATHN_TXBUFSZ () {	4096;}
}
unless(defined(&ATHN_NRXBUFS)) {
    sub ATHN_NRXBUFS () {	64;}
}
unless(defined(&ATHN_NTXBUFS)) {
    sub ATHN_NTXBUFS () {	64;}
}
unless(defined(&ATHN_MAX_SCATTER)) {
    sub ATHN_MAX_SCATTER () {	16;}
}
unless(defined(&ATHN_RX_RADIOTAP_PRESENT)) {
    sub ATHN_RX_RADIOTAP_PRESENT () {	(1<<  &IEEE80211_RADIOTAP_TSFT | 1<<  &IEEE80211_RADIOTAP_FLAGS | 1<<  &IEEE80211_RADIOTAP_RATE | 1<<  &IEEE80211_RADIOTAP_CHANNEL | 1<<  &IEEE80211_RADIOTAP_DBM_ANTSIGNAL | 1<<  &IEEE80211_RADIOTAP_ANTENNA);}
}
unless(defined(&ATHN_TX_RADIOTAP_PRESENT)) {
    sub ATHN_TX_RADIOTAP_PRESENT () {	(1<<  &IEEE80211_RADIOTAP_FLAGS | 1<<  &IEEE80211_RADIOTAP_RATE | 1<<  &IEEE80211_RADIOTAP_CHANNEL | 1<<  &IEEE80211_RADIOTAP_HWQUEUE);}
}
unless(defined(&ATHN_RIDX_CCK1)) {
    sub ATHN_RIDX_CCK1 () {	0;}
}
unless(defined(&ATHN_RIDX_CCK2)) {
    sub ATHN_RIDX_CCK2 () {	1;}
}
unless(defined(&ATHN_RIDX_OFDM6)) {
    sub ATHN_RIDX_OFDM6 () {	4;}
}
unless(defined(&ATHN_RIDX_MCS0)) {
    sub ATHN_RIDX_MCS0 () {	12;}
}
unless(defined(&ATHN_RIDX_MCS15)) {
    sub ATHN_RIDX_MCS15 () {	27;}
}
unless(defined(&ATHN_RIDX_MAX)) {
    sub ATHN_RIDX_MAX () {	27;}
}
unless(defined(&ATHN_IS_HT_RIDX)) {
    sub ATHN_IS_HT_RIDX {
	my($ridx) = @_;
	eval q((($ridx) >=  &ATHN_RIDX_MCS0));
    }
}
unless(defined(&IEEE80211_NO_HT)) {
}
unless(defined(&ATHN_QID_AC_BE)) {
    sub ATHN_QID_AC_BE () {	0;}
}
unless(defined(&ATHN_QID_PSPOLL)) {
    sub ATHN_QID_PSPOLL () {	1;}
}
unless(defined(&ATHN_QID_AC_BK)) {
    sub ATHN_QID_AC_BK () {	2;}
}
unless(defined(&ATHN_QID_AC_VI)) {
    sub ATHN_QID_AC_VI () {	3;}
}
unless(defined(&ATHN_QID_AC_VO)) {
    sub ATHN_QID_AC_VO () {	4;}
}
unless(defined(&ATHN_QID_UAPSD)) {
    sub ATHN_QID_UAPSD () {	5;}
}
unless(defined(&ATHN_QID_CAB)) {
    sub ATHN_QID_CAB () {	6;}
}
unless(defined(&ATHN_QID_BEACON)) {
    sub ATHN_QID_BEACON () {	7;}
}
unless(defined(&ATHN_QID_COUNT)) {
    sub ATHN_QID_COUNT () {	8;}
}
unless(defined(&ATHN_POWER_OFDM6)) {
    sub ATHN_POWER_OFDM6 () {	0;}
}
unless(defined(&ATHN_POWER_OFDM9)) {
    sub ATHN_POWER_OFDM9 () {	1;}
}
unless(defined(&ATHN_POWER_OFDM12)) {
    sub ATHN_POWER_OFDM12 () {	2;}
}
unless(defined(&ATHN_POWER_OFDM18)) {
    sub ATHN_POWER_OFDM18 () {	3;}
}
unless(defined(&ATHN_POWER_OFDM24)) {
    sub ATHN_POWER_OFDM24 () {	4;}
}
unless(defined(&ATHN_POWER_OFDM36)) {
    sub ATHN_POWER_OFDM36 () {	5;}
}
unless(defined(&ATHN_POWER_OFDM48)) {
    sub ATHN_POWER_OFDM48 () {	6;}
}
unless(defined(&ATHN_POWER_OFDM54)) {
    sub ATHN_POWER_OFDM54 () {	7;}
}
unless(defined(&ATHN_POWER_CCK1_LP)) {
    sub ATHN_POWER_CCK1_LP () {	8;}
}
unless(defined(&ATHN_POWER_CCK2_LP)) {
    sub ATHN_POWER_CCK2_LP () {	9;}
}
unless(defined(&ATHN_POWER_CCK2_SP)) {
    sub ATHN_POWER_CCK2_SP () {	10;}
}
unless(defined(&ATHN_POWER_CCK55_LP)) {
    sub ATHN_POWER_CCK55_LP () {	11;}
}
unless(defined(&ATHN_POWER_CCK55_SP)) {
    sub ATHN_POWER_CCK55_SP () {	12;}
}
unless(defined(&ATHN_POWER_CCK11_LP)) {
    sub ATHN_POWER_CCK11_LP () {	13;}
}
unless(defined(&ATHN_POWER_CCK11_SP)) {
    sub ATHN_POWER_CCK11_SP () {	14;}
}
unless(defined(&ATHN_POWER_XR)) {
    sub ATHN_POWER_XR () {	15;}
}
unless(defined(&ATHN_POWER_HT20)) {
    sub ATHN_POWER_HT20 {
	my($mcs) = @_;
	eval q((16+ ($mcs)));
    }
}
unless(defined(&ATHN_POWER_HT40)) {
    sub ATHN_POWER_HT40 {
	my($mcs) = @_;
	eval q((24+ ($mcs)));
    }
}
unless(defined(&ATHN_POWER_CCK_DUP)) {
    sub ATHN_POWER_CCK_DUP () {	32;}
}
unless(defined(&ATHN_POWER_OFDM_DUP)) {
    sub ATHN_POWER_OFDM_DUP () {	33;}
}
unless(defined(&ATHN_POWER_CCK_EXT)) {
    sub ATHN_POWER_CCK_EXT () {	34;}
}
unless(defined(&ATHN_POWER_OFDM_EXT)) {
    sub ATHN_POWER_OFDM_EXT () {	35;}
}
unless(defined(&ATHN_POWER_COUNT)) {
    sub ATHN_POWER_COUNT () {	36;}
}
unless(defined(&ATHN_ANI_PERIOD)) {
    sub ATHN_ANI_PERIOD () {	100;}
}
unless(defined(&ATHN_ANI_RSSI_THR_HIGH)) {
    sub ATHN_ANI_RSSI_THR_HIGH () {	40;}
}
unless(defined(&ATHN_ANI_RSSI_THR_LOW)) {
    sub ATHN_ANI_RSSI_THR_LOW () {	7;}
}
unless(defined(&ATHN_NF_CAL_HIST_MAX)) {
    sub ATHN_NF_CAL_HIST_MAX () {	5;}
}
unless(defined(&ATHN_FLAG_PCIE)) {
    sub ATHN_FLAG_PCIE () {	(1<< 0);}
}
unless(defined(&ATHN_FLAG_OLPC)) {
    sub ATHN_FLAG_OLPC () {	(1<< 1);}
}
unless(defined(&ATHN_FLAG_SPLIT_MMIC)) {
    sub ATHN_FLAG_SPLIT_MMIC () {	(1<< 2);}
}
unless(defined(&ATHN_FLAG_RFSILENT)) {
    sub ATHN_FLAG_RFSILENT () {	(1<< 3);}
}
unless(defined(&ATHN_FLAG_RFSILENT_REVERSED)) {
    sub ATHN_FLAG_RFSILENT_REVERSED () {	(1<< 4);}
}
unless(defined(&ATHN_FLAG_BTCOEX2WIRE)) {
    sub ATHN_FLAG_BTCOEX2WIRE () {	(1<< 5);}
}
unless(defined(&ATHN_FLAG_BTCOEX3WIRE)) {
    sub ATHN_FLAG_BTCOEX3WIRE () {	(1<< 6);}
}
unless(defined(&ATHN_FLAG_BTCOEX)) {
    sub ATHN_FLAG_BTCOEX () {	( &ATHN_FLAG_BTCOEX2WIRE |  &ATHN_FLAG_BTCOEX3WIRE);}
}
unless(defined(&ATHN_CAL_IQ)) {
    sub ATHN_CAL_IQ () {	(1<< 0);}
}
unless(defined(&ATHN_CAL_ADC_GAIN)) {
    sub ATHN_CAL_ADC_GAIN () {	(1<< 1);}
}
unless(defined(&ATHN_CAL_ADC_DC)) {
    sub ATHN_CAL_ADC_DC () {	(1<< 2);}
}
if((defined(&NBPFILTER) ? &NBPFILTER : undef) > 0) {
    eval 'sub sc_rxtap () { ($sc_rxtapu->{th});}' unless defined(&sc_rxtap);
    eval 'sub sc_txtap () { ($sc_txtapu->{th});}' unless defined(&sc_txtap);
}
1;
