require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_ATH_ATHVAR_H)) {
    eval 'sub _DEV_ATH_ATHVAR_H () {1;}' unless defined(&_DEV_ATH_ATHVAR_H);
    require 'net80211/ieee80211_radiotap.ph';
    require 'dev/ic/ar5xxx.ph';
    if(defined(&notyet)) {
	require 'gpio.ph';
    }
    eval 'sub ATH_TIMEOUT () {1000;}' unless defined(&ATH_TIMEOUT);
    eval 'sub ATH_RXBUF () {40;}' unless defined(&ATH_RXBUF);
    eval 'sub ATH_TXBUF () {60;}' unless defined(&ATH_TXBUF);
    eval 'sub ATH_TXDESC () {8;}' unless defined(&ATH_TXDESC);
    eval 'sub ATH_MAXGPIO () {10;}' unless defined(&ATH_MAXGPIO);
    eval 'sub ATH_RHIST_SIZE () {16;}' unless defined(&ATH_RHIST_SIZE);
    eval 'sub ATH_RHIST_NOTIME () {(~0);}' unless defined(&ATH_RHIST_NOTIME);
    eval 'sub SIOCGATHSTATS () { &_IOWR(ord(\'i\'), 137, \'struct ifreq\');}' unless defined(&SIOCGATHSTATS);
    eval 'sub ATH_RX_RADIOTAP_PRESENT () {( (1<<  &IEEE80211_RADIOTAP_FLAGS) | (1<<  &IEEE80211_RADIOTAP_RATE) | (1<<  &IEEE80211_RADIOTAP_CHANNEL) | (1<<  &IEEE80211_RADIOTAP_ANTENNA) | (1<<  &IEEE80211_RADIOTAP_RSSI) | 0);}' unless defined(&ATH_RX_RADIOTAP_PRESENT);
    eval 'sub ATH_TX_RADIOTAP_PRESENT () {( (1<<  &IEEE80211_RADIOTAP_FLAGS) | (1<<  &IEEE80211_RADIOTAP_RATE) | (1<<  &IEEE80211_RADIOTAP_CHANNEL) | (1<<  &IEEE80211_RADIOTAP_DBM_TX_POWER) | (1<<  &IEEE80211_RADIOTAP_ANTENNA) | (1<<  &IEEE80211_RADIOTAP_HWQUEUE) | 0);}' unless defined(&ATH_TX_RADIOTAP_PRESENT);
    eval 'sub ATH_NODE {
        my($_n) = @_;
	    eval q((($_n)));
    }' unless defined(&ATH_NODE);
    eval 'sub bf_nseg () { ($bf_dmamap->{dm_nsegs});}' unless defined(&bf_nseg);
    eval 'sub bf_mapsize () { ($bf_dmamap->{dm_mapsize});}' unless defined(&bf_mapsize);
    eval 'sub bf_segs () { ($bf_dmamap->{dm_segs});}' unless defined(&bf_segs);
    eval 'sub ATH_MAX_SCATTER () {64;}' unless defined(&ATH_MAX_SCATTER);
    unless(defined(&__FreeBSD__)) {
    }
    unless(defined(&__FreeBSD__)) {
    }
    if(defined(&__FreeBSD__)) {
    }
    if(defined(&__FreeBSD__)) {
    }
    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);
    }
    unless(defined(&__NetBSD__)) {
    }
    if(defined(&__FreeBSD__)) {
    }
    if(defined(&__FreeBSD__)) {
    }
    if(defined(&__OpenBSD__)) {
    } else {
    }
    unless(defined(&__FreeBSD__)) {
    }
    eval 'sub LE_READ_2 {
        my($p) = @_;
	    eval q((( &u_int16_t) (((( &u_int8_t *)($p))[0] ) | ((( &u_int8_t *)($p))[1] << 8))));
    }' unless defined(&LE_READ_2);
    eval 'sub LE_READ_4 {
        my($p) = @_;
	    eval q((( &u_int32_t) (((( &u_int8_t *)($p))[0] ) | ((( &u_int8_t *)($p))[1] << 8) | ((( &u_int8_t *)($p))[2] << 16) | ((( &u_int8_t *)($p))[3] << 24))));
    }' unless defined(&LE_READ_4);
    if(defined(&AR_DEBUG)) {
	eval("sub ATH_DEBUG_XMIT () { 0x00000001; }") unless defined(&ATH_DEBUG_XMIT);
	eval("sub ATH_DEBUG_XMIT_DESC () { 0x00000002; }") unless defined(&ATH_DEBUG_XMIT_DESC);
	eval("sub ATH_DEBUG_RECV () { 0x00000004; }") unless defined(&ATH_DEBUG_RECV);
	eval("sub ATH_DEBUG_RECV_DESC () { 0x00000008; }") unless defined(&ATH_DEBUG_RECV_DESC);
	eval("sub ATH_DEBUG_RATE () { 0x00000010; }") unless defined(&ATH_DEBUG_RATE);
	eval("sub ATH_DEBUG_RESET () { 0x00000020; }") unless defined(&ATH_DEBUG_RESET);
	eval("sub ATH_DEBUG_MODE () { 0x00000040; }") unless defined(&ATH_DEBUG_MODE);
	eval("sub ATH_DEBUG_BEACON () { 0x00000080; }") unless defined(&ATH_DEBUG_BEACON);
	eval("sub ATH_DEBUG_WATCHDOG () { 0x00000100; }") unless defined(&ATH_DEBUG_WATCHDOG);
	eval("sub ATH_DEBUG_INTR () { 0x00001000; }") unless defined(&ATH_DEBUG_INTR);
	eval("sub ATH_DEBUG_TX_PROC () { 0x00002000; }") unless defined(&ATH_DEBUG_TX_PROC);
	eval("sub ATH_DEBUG_RX_PROC () { 0x00004000; }") unless defined(&ATH_DEBUG_RX_PROC);
	eval("sub ATH_DEBUG_BEACON_PROC () { 0x00008000; }") unless defined(&ATH_DEBUG_BEACON_PROC);
	eval("sub ATH_DEBUG_CALIBRATE () { 0x00010000; }") unless defined(&ATH_DEBUG_CALIBRATE);
	eval("sub ATH_DEBUG_ANY () { 0xffffffff; }") unless defined(&ATH_DEBUG_ANY);
	eval 'sub IFF_DUMPPKTS {
	    my($_ifp, $_m) = @_;
    	    eval q((( &ath_debug & $_m) || (($_ifp)-> &if_flags & ( &IFF_DEBUG| &IFF_LINK2)) == ( &IFF_DEBUG| &IFF_LINK2)));
	}' unless defined(&IFF_DUMPPKTS);
	eval 'sub DPRINTF {
	    my($_m,$X) = @_;
    	    eval q( &if ( &ath_debug & ($_m))  &printf $X);
	}' unless defined(&DPRINTF);
    } else {
	eval 'sub IFF_DUMPPKTS {
	    my($_ifp, $_m) = @_;
    	    eval q(((($_ifp)-> &if_flags & ( &IFF_DEBUG| &IFF_LINK2)) == ( &IFF_DEBUG| &IFF_LINK2)));
	}' unless defined(&IFF_DUMPPKTS);
	eval 'sub DPRINTF {
	    my($_m, $X) = @_;
    	    eval q();
	}' unless defined(&DPRINTF);
    }
    unless(defined(&__FreeBSD__)) {
	undef(&KASSERT) if defined(&KASSERT);
	eval 'sub KASSERT {
	    my($cond, $complaint) = @_;
    	    eval q( &if (!($cond))  &panic $complaint);
	}' unless defined(&KASSERT);
	eval 'sub ATH_ATTACHED () {0x1;}' unless defined(&ATH_ATTACHED);
	eval 'sub ATH_ENABLED () {0x2;}' unless defined(&ATH_ENABLED);
	eval 'sub ATH_GPIO () {0x4;}' unless defined(&ATH_GPIO);
	eval 'sub ATH_IS_ENABLED {
	    my($sc) = @_;
    	    eval q((($sc)-> &sc_flags &  &ATH_ENABLED));
	}' unless defined(&ATH_IS_ENABLED);
    }
    eval 'sub ATH_LOCK_INIT {
        my($_sc) = @_;
	    eval q( &mtx_init(($_sc)-> &sc_mtx,  &device_get_nameunit(($_sc)-> &sc_dev),  &MTX_NETWORK_LOCK,  &MTX_DEF |  &MTX_RECURSE));
    }' unless defined(&ATH_LOCK_INIT);
    eval 'sub ATH_LOCK_DESTROY {
        my($_sc) = @_;
	    eval q( &mtx_destroy(($_sc)-> &sc_mtx));
    }' unless defined(&ATH_LOCK_DESTROY);
    eval 'sub ATH_LOCK {
        my($_sc) = @_;
	    eval q( &mtx_lock(($_sc)-> &sc_mtx));
    }' unless defined(&ATH_LOCK);
    eval 'sub ATH_UNLOCK {
        my($_sc) = @_;
	    eval q( &mtx_unlock(($_sc)-> &sc_mtx));
    }' unless defined(&ATH_UNLOCK);
    eval 'sub ATH_LOCK_ASSERT {
        my($_sc) = @_;
	    eval q( &mtx_assert(($_sc)-> &sc_mtx,  &MA_OWNED));
    }' unless defined(&ATH_LOCK_ASSERT);
    eval 'sub ATH_TXBUF_LOCK_INIT {
        my($_sc) = @_;
	    eval q( &mtx_init(($_sc)-> &sc_txbuflock,  &device_get_nameunit(($_sc)-> &sc_dev), \\"xmit buf q\\",  &MTX_DEF));
    }' unless defined(&ATH_TXBUF_LOCK_INIT);
    eval 'sub ATH_TXBUF_LOCK_DESTROY {
        my($_sc) = @_;
	    eval q( &mtx_destroy(($_sc)-> &sc_txbuflock));
    }' unless defined(&ATH_TXBUF_LOCK_DESTROY);
    eval 'sub ATH_TXBUF_LOCK {
        my($_sc) = @_;
	    eval q( &mtx_lock(($_sc)-> &sc_txbuflock));
    }' unless defined(&ATH_TXBUF_LOCK);
    eval 'sub ATH_TXBUF_UNLOCK {
        my($_sc) = @_;
	    eval q( &mtx_unlock(($_sc)-> &sc_txbuflock));
    }' unless defined(&ATH_TXBUF_UNLOCK);
    eval 'sub ATH_TXBUF_LOCK_ASSERT {
        my($_sc) = @_;
	    eval q( &mtx_assert(($_sc)-> &sc_txbuflock,  &MA_OWNED));
    }' unless defined(&ATH_TXBUF_LOCK_ASSERT);
    eval 'sub ATH_TXQ_LOCK_INIT {
        my($_sc) = @_;
	    eval q( &mtx_init(($_sc)-> &sc_txqlock,  &device_get_nameunit(($_sc)-> &sc_dev), \\"xmit q\\",  &MTX_DEF));
    }' unless defined(&ATH_TXQ_LOCK_INIT);
    eval 'sub ATH_TXQ_LOCK_DESTROY {
        my($_sc) = @_;
	    eval q( &mtx_destroy(($_sc)-> &sc_txqlock));
    }' unless defined(&ATH_TXQ_LOCK_DESTROY);
    eval 'sub ATH_TXQ_LOCK {
        my($_sc) = @_;
	    eval q( &mtx_lock(($_sc)-> &sc_txqlock));
    }' unless defined(&ATH_TXQ_LOCK);
    eval 'sub ATH_TXQ_UNLOCK {
        my($_sc) = @_;
	    eval q( &mtx_unlock(($_sc)-> &sc_txqlock));
    }' unless defined(&ATH_TXQ_UNLOCK);
    eval 'sub ATH_TXQ_LOCK_ASSERT {
        my($_sc) = @_;
	    eval q( &mtx_assert(($_sc)-> &sc_txqlock,  &MA_OWNED));
    }' unless defined(&ATH_TXQ_LOCK_ASSERT);
    eval 'sub ATH_TICKS () {
        eval q(( &tick));
    }' unless defined(&ATH_TICKS);
    eval 'sub ATH_CALLOUT_INIT {
        my($chp) = @_;
	    eval q( &callout_init(($chp)));
    }' unless defined(&ATH_CALLOUT_INIT);
    eval 'sub ATH_TASK_INIT {
        my($task, $func, $context) = @_;
	    eval q( &do { ($task)-> &t_func = ($func); ($task)-> &t_context = ($context); }  &while (0));
    }' unless defined(&ATH_TASK_INIT);
    eval 'sub ATH_TASK_RUN_OR_ENQUEUE {
        my($task) = @_;
	    eval q(((*($task)-> &t_func)(($task)-> &t_context, 1)));
    }' unless defined(&ATH_TASK_RUN_OR_ENQUEUE);
    if(defined(&__NetBSD__)) {
    }
    eval 'sub ath_hal_reset {
        my($_ah, $_opmode, $_chan, $_outdoor, $_pstatus) = @_;
	    eval q(((*($_ah)-> &ah_reset)(($_ah), ($_opmode), ($_chan), ($_outdoor), ($_pstatus))));
    }' unless defined(&ath_hal_reset);
    eval 'sub ath_hal_get_rate_table {
        my($_ah, $_mode) = @_;
	    eval q(((*($_ah)-> &ah_get_rate_table)(($_ah), ($_mode))));
    }' unless defined(&ath_hal_get_rate_table);
    eval 'sub ath_hal_get_lladdr {
        my($_ah, $_mac) = @_;
	    eval q(((*($_ah)-> &ah_get_lladdr)(($_ah), ($_mac))));
    }' unless defined(&ath_hal_get_lladdr);
    eval 'sub ath_hal_set_lladdr {
        my($_ah, $_mac) = @_;
	    eval q(((*($_ah)-> &ah_set_lladdr)(($_ah), ($_mac))));
    }' unless defined(&ath_hal_set_lladdr);
    eval 'sub ath_hal_set_intr {
        my($_ah, $_mask) = @_;
	    eval q(((*($_ah)-> &ah_set_intr)(($_ah), ($_mask))));
    }' unless defined(&ath_hal_set_intr);
    eval 'sub ath_hal_get_intr {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_get_intr)(($_ah))));
    }' unless defined(&ath_hal_get_intr);
    eval 'sub ath_hal_is_intr_pending {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_is_intr_pending)(($_ah))));
    }' unless defined(&ath_hal_is_intr_pending);
    eval 'sub ath_hal_get_isr {
        my($_ah, $_pmask) = @_;
	    eval q(((*($_ah)-> &ah_get_isr)(($_ah), ($_pmask))));
    }' unless defined(&ath_hal_get_isr);
    eval 'sub ath_hal_update_tx_triglevel {
        my($_ah, $_inc) = @_;
	    eval q(((*($_ah)-> &ah_update_tx_triglevel)(($_ah), ($_inc))));
    }' unless defined(&ath_hal_update_tx_triglevel);
    eval 'sub ath_hal_set_power {
        my($_ah, $_mode, $_sleepduration) = @_;
	    eval q(((*($_ah)-> &ah_set_power)(($_ah), ($_mode),  &AH_TRUE, ($_sleepduration))));
    }' unless defined(&ath_hal_set_power);
    eval 'sub ath_hal_reset_key {
        my($_ah, $_ix) = @_;
	    eval q(((*($_ah)-> &ah_reset_key)(($_ah), ($_ix))));
    }' unless defined(&ath_hal_reset_key);
    eval 'sub ath_hal_set_key {
        my($_ah, $_ix, $_pk) = @_;
	    eval q(((*($_ah)-> &ah_set_key)(($_ah), ($_ix), ($_pk),  &NULL,  &AH_FALSE)));
    }' unless defined(&ath_hal_set_key);
    eval 'sub ath_hal_is_key_valid {
        my($_ah, $_ix) = @_;
	    eval q((((*($_ah)-> &ah_is_key_valid)(($_ah), ($_ix)))));
    }' unless defined(&ath_hal_is_key_valid);
    eval 'sub ath_hal_set_key_lladdr {
        my($_ah, $_ix, $_mac) = @_;
	    eval q(((*($_ah)-> &ah_set_key_lladdr)(($_ah), ($_ix), ($_mac))));
    }' unless defined(&ath_hal_set_key_lladdr);
    eval 'sub ath_hal_get_rx_filter {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_get_rx_filter)(($_ah))));
    }' unless defined(&ath_hal_get_rx_filter);
    eval 'sub ath_hal_set_rx_filter {
        my($_ah, $_filter) = @_;
	    eval q(((*($_ah)-> &ah_set_rx_filter)(($_ah), ($_filter))));
    }' unless defined(&ath_hal_set_rx_filter);
    eval 'sub ath_hal_set_mcast_filter {
        my($_ah, $_mfilt0, $_mfilt1) = @_;
	    eval q(((*($_ah)-> &ah_set_mcast_filter)(($_ah), ($_mfilt0), ($_mfilt1))));
    }' unless defined(&ath_hal_set_mcast_filter);
    eval 'sub ath_hal_wait_for_beacon {
        my($_ah, $_bf) = @_;
	    eval q(((*($_ah)-> &ah_wait_for_beacon)(($_ah), ($_bf)-> &bf_daddr)));
    }' unless defined(&ath_hal_wait_for_beacon);
    eval 'sub ath_hal_put_rx_buf {
        my($_ah, $_bufaddr) = @_;
	    eval q(((*($_ah)-> &ah_put_rx_buf)(($_ah), ($_bufaddr))));
    }' unless defined(&ath_hal_put_rx_buf);
    eval 'sub ath_hal_get_tsf32 {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_get_tsf32)(($_ah))));
    }' unless defined(&ath_hal_get_tsf32);
    eval 'sub ath_hal_get_tsf64 {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_get_tsf64)(($_ah))));
    }' unless defined(&ath_hal_get_tsf64);
    eval 'sub ath_hal_reset_tsf {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_reset_tsf)(($_ah))));
    }' unless defined(&ath_hal_reset_tsf);
    eval 'sub ath_hal_start_rx {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_start_rx)(($_ah))));
    }' unless defined(&ath_hal_start_rx);
    eval 'sub ath_hal_put_tx_buf {
        my($_ah, $_q, $_bufaddr) = @_;
	    eval q(((*($_ah)-> &ah_put_tx_buf)(($_ah), ($_q), ($_bufaddr))));
    }' unless defined(&ath_hal_put_tx_buf);
    eval 'sub ath_hal_get_tx_buf {
        my($_ah, $_q) = @_;
	    eval q(((*($_ah)-> &ah_get_tx_buf)(($_ah), ($_q))));
    }' unless defined(&ath_hal_get_tx_buf);
    eval 'sub ath_hal_get_rx_buf {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_get_rx_buf)(($_ah))));
    }' unless defined(&ath_hal_get_rx_buf);
    eval 'sub ath_hal_tx_start {
        my($_ah, $_q) = @_;
	    eval q(((*($_ah)-> &ah_tx_start)(($_ah), ($_q))));
    }' unless defined(&ath_hal_tx_start);
    eval 'sub ath_hal_setchannel {
        my($_ah, $_chan) = @_;
	    eval q(((*($_ah)-> &ah_setchannel)(($_ah), ($_chan))));
    }' unless defined(&ath_hal_setchannel);
    eval 'sub ath_hal_calibrate {
        my($_ah, $_chan) = @_;
	    eval q(((*($_ah)-> &ah_calibrate)(($_ah), ($_chan))));
    }' unless defined(&ath_hal_calibrate);
    eval 'sub ath_hal_set_ledstate {
        my($_ah, $_state) = @_;
	    eval q(((*($_ah)-> &ah_set_ledstate)(($_ah), ($_state))));
    }' unless defined(&ath_hal_set_ledstate);
    eval 'sub ath_hal_init_beacon {
        my($_ah, $_nextb, $_bperiod) = @_;
	    eval q(((*($_ah)-> &ah_init_beacon)(($_ah), ($_nextb), ($_bperiod))));
    }' unless defined(&ath_hal_init_beacon);
    eval 'sub ath_hal_reset_beacon {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_reset_beacon)(($_ah))));
    }' unless defined(&ath_hal_reset_beacon);
    eval 'sub ath_hal_set_beacon_timers {
        my($_ah, $_bs, $_tsf, $_dc, $_cc) = @_;
	    eval q(((*($_ah)-> &ah_set_beacon_timers)(($_ah), ($_bs), ($_tsf), ($_dc), ($_cc))));
    }' unless defined(&ath_hal_set_beacon_timers);
    eval 'sub ath_hal_set_associd {
        my($_ah, $_bss, $_associd) = @_;
	    eval q(((*($_ah)-> &ah_set_associd)(($_ah), ($_bss), ($_associd), 0)));
    }' unless defined(&ath_hal_set_associd);
    eval 'sub ath_hal_get_regdomain {
        my($_ah, $_prd) = @_;
	    eval q((*($_prd) = ($_ah)-> &ah_get_regdomain($_ah)));
    }' unless defined(&ath_hal_get_regdomain);
    eval 'sub ath_hal_detach {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_detach)($_ah)));
    }' unless defined(&ath_hal_detach);
    eval 'sub ath_hal_set_slot_time {
        my($_ah, $_t) = @_;
	    eval q(((*($_ah)-> &ah_set_slot_time)($_ah, $_t)));
    }' unless defined(&ath_hal_set_slot_time);
    eval 'sub ath_hal_set_gpio_output {
        my($_ah, $_gpio) = @_;
	    eval q(((*($_ah)-> &ah_set_gpio_output)(($_ah), ($_gpio))));
    }' unless defined(&ath_hal_set_gpio_output);
    eval 'sub ath_hal_set_gpio_input {
        my($_ah, $_gpio) = @_;
	    eval q(((*($_ah)-> &ah_set_gpio_input)(($_ah), ($_gpio))));
    }' unless defined(&ath_hal_set_gpio_input);
    eval 'sub ath_hal_get_gpio {
        my($_ah, $_gpio) = @_;
	    eval q(((*($_ah)-> &ah_get_gpio)(($_ah), ($_gpio))));
    }' unless defined(&ath_hal_get_gpio);
    eval 'sub ath_hal_set_gpio {
        my($_ah, $_gpio, $_b) = @_;
	    eval q(((*($_ah)-> &ah_set_gpio)(($_ah), ($_gpio), ($_b))));
    }' unless defined(&ath_hal_set_gpio);
    eval 'sub ath_hal_set_gpio_intr {
        my($_ah, $_gpio, $_b) = @_;
	    eval q(((*($_ah)-> &ah_set_gpio_intr)(($_ah), ($_gpio), ($_b))));
    }' unless defined(&ath_hal_set_gpio_intr);
    eval 'sub ath_hal_set_opmode {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_set_opmode)(($_ah))));
    }' unless defined(&ath_hal_set_opmode);
    eval 'sub ath_hal_stop_tx_dma {
        my($_ah, $_qnum) = @_;
	    eval q(((*($_ah)-> &ah_stop_tx_dma)(($_ah), ($_qnum))));
    }' unless defined(&ath_hal_stop_tx_dma);
    eval 'sub ath_hal_stop_pcu_recv {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_stop_pcu_recv)(($_ah))));
    }' unless defined(&ath_hal_stop_pcu_recv);
    eval 'sub ath_hal_start_rx_pcu {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_start_rx_pcu)(($_ah))));
    }' unless defined(&ath_hal_start_rx_pcu);
    eval 'sub ath_hal_stop_rx_dma {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_stop_rx_dma)(($_ah))));
    }' unless defined(&ath_hal_stop_rx_dma);
    eval 'sub ath_hal_get_diag_state {
        my($_ah, $_id, $_indata, $_insize, $_outdata, $_outsize) = @_;
	    eval q(((*($_ah)-> &ah_get_diag_state)(($_ah), ($_id), ($_indata), ($_insize), ($_outdata), ($_outsize))));
    }' unless defined(&ath_hal_get_diag_state);
    eval 'sub ath_hal_setup_tx_queue {
        my($_ah, $_type, $_qinfo) = @_;
	    eval q(((*($_ah)-> &ah_setup_tx_queue)(($_ah), ($_type), ($_qinfo))));
    }' unless defined(&ath_hal_setup_tx_queue);
    eval 'sub ath_hal_reset_tx_queue {
        my($_ah, $_q) = @_;
	    eval q(((*($_ah)-> &ah_reset_tx_queue)(($_ah), ($_q))));
    }' unless defined(&ath_hal_reset_tx_queue);
    eval 'sub ath_hal_release_tx_queue {
        my($_ah, $_q) = @_;
	    eval q(((*($_ah)-> &ah_release_tx_queue)(($_ah), ($_q))));
    }' unless defined(&ath_hal_release_tx_queue);
    eval 'sub ath_hal_has_veol {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_has_veol)(($_ah))));
    }' unless defined(&ath_hal_has_veol);
    eval 'sub ath_hal_update_mib_counters {
        my($_ah, $_stats) = @_;
	    eval q(((*($_ah)-> &ah_update_mib_counters)(($_ah), ($_stats))));
    }' unless defined(&ath_hal_update_mib_counters);
    eval 'sub ath_hal_get_rf_gain {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_get_rf_gain)(($_ah))));
    }' unless defined(&ath_hal_get_rf_gain);
    eval 'sub ath_hal_set_rx_signal {
        my($_ah) = @_;
	    eval q(((*($_ah)-> &ah_set_rx_signal)(($_ah))));
    }' unless defined(&ath_hal_set_rx_signal);
    eval 'sub ath_hal_setup_rx_desc {
        my($_ah, $_ds, $_size, $_intreq) = @_;
	    eval q(((*($_ah)-> &ah_setup_rx_desc)(($_ah), ($_ds), ($_size), ($_intreq))));
    }' unless defined(&ath_hal_setup_rx_desc);
    eval 'sub ath_hal_proc_rx_desc {
        my($_ah, $_ds, $_dspa, $_dsnext) = @_;
	    eval q(((*($_ah)-> &ah_proc_rx_desc)(($_ah), ($_ds), ($_dspa), ($_dsnext))));
    }' unless defined(&ath_hal_proc_rx_desc);
    eval 'sub ath_hal_setup_tx_desc {
        my($_ah, $_ds, $_plen, $_hlen, $_atype, $_txpow, 	    $_txr0, $_txtr0, $_keyix, $_ant, $_flags, 	    $_rtsrate, $_rtsdura) = @_;
	    eval q(((*($_ah)-> &ah_setup_tx_desc)(($_ah), ($_ds), ($_plen), ($_hlen), ($_atype), ($_txpow), ($_txr0), ($_txtr0), ($_keyix), ($_ant), ($_flags), ($_rtsrate), ($_rtsdura))));
    }' unless defined(&ath_hal_setup_tx_desc);
    eval 'sub ath_hal_setup_xtx_desc {
        my($_ah, $_ds, 	    $_txr1, $_txtr1, $_txr2, $_txtr2, $_txr3, $_txtr3) = @_;
	    eval q(((*($_ah)-> &ah_setup_xtx_desc)(($_ah), ($_ds), ($_txr1), ($_txtr1), ($_txr2), ($_txtr2), ($_txr3), ($_txtr3))));
    }' unless defined(&ath_hal_setup_xtx_desc);
    eval 'sub ath_hal_fill_tx_desc {
        my($_ah, $_ds, $_l, $_first, $_last) = @_;
	    eval q(((*($_ah)-> &ah_fill_tx_desc)(($_ah), ($_ds), ($_l), ($_first), ($_last))));
    }' unless defined(&ath_hal_fill_tx_desc);
    eval 'sub ath_hal_proc_tx_desc {
        my($_ah, $_ds) = @_;
	    eval q(((*($_ah)-> &ah_proc_tx_desc)(($_ah), ($_ds))));
    }' unless defined(&ath_hal_proc_tx_desc);
}
1;
