require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_NET80211_IEEE80211_H_)) {
    eval 'sub _NET80211_IEEE80211_H_ () {1;}' unless defined(&_NET80211_IEEE80211_H_);
    eval 'sub IEEE80211_ADDR_LEN () {6;}' unless defined(&IEEE80211_ADDR_LEN);
    eval 'sub IEEE80211_IS_MULTICAST {
        my($_a) = @_;
	    eval q((*($_a) & 0x1));
    }' unless defined(&IEEE80211_IS_MULTICAST);
    eval 'sub IEEE80211_PLCP_SFD () {0xf3a0;}' unless defined(&IEEE80211_PLCP_SFD);
    eval 'sub IEEE80211_PLCP_SERVICE () {0x;}' unless defined(&IEEE80211_PLCP_SERVICE);
    eval 'sub IEEE80211_FC0_VERSION_MASK () {0x3;}' unless defined(&IEEE80211_FC0_VERSION_MASK);
    eval 'sub IEEE80211_FC0_VERSION_SHIFT () {0;}' unless defined(&IEEE80211_FC0_VERSION_SHIFT);
    eval 'sub IEEE80211_FC0_VERSION_0 () {0x;}' unless defined(&IEEE80211_FC0_VERSION_0);
    eval 'sub IEEE80211_FC0_TYPE_MASK () {0xc;}' unless defined(&IEEE80211_FC0_TYPE_MASK);
    eval 'sub IEEE80211_FC0_TYPE_SHIFT () {2;}' unless defined(&IEEE80211_FC0_TYPE_SHIFT);
    eval 'sub IEEE80211_FC0_TYPE_MGT () {0x;}' unless defined(&IEEE80211_FC0_TYPE_MGT);
    eval 'sub IEEE80211_FC0_TYPE_CTL () {0x4;}' unless defined(&IEEE80211_FC0_TYPE_CTL);
    eval 'sub IEEE80211_FC0_TYPE_DATA () {0x8;}' unless defined(&IEEE80211_FC0_TYPE_DATA);
    eval 'sub IEEE80211_FC0_SUBTYPE_MASK () {0xf0;}' unless defined(&IEEE80211_FC0_SUBTYPE_MASK);
    eval 'sub IEEE80211_FC0_SUBTYPE_SHIFT () {4;}' unless defined(&IEEE80211_FC0_SUBTYPE_SHIFT);
    eval 'sub IEEE80211_FC0_SUBTYPE_ASSOC_REQ () {0x;}' unless defined(&IEEE80211_FC0_SUBTYPE_ASSOC_REQ);
    eval 'sub IEEE80211_FC0_SUBTYPE_ASSOC_RESP () {0x10;}' unless defined(&IEEE80211_FC0_SUBTYPE_ASSOC_RESP);
    eval 'sub IEEE80211_FC0_SUBTYPE_REASSOC_REQ () {0x20;}' unless defined(&IEEE80211_FC0_SUBTYPE_REASSOC_REQ);
    eval 'sub IEEE80211_FC0_SUBTYPE_REASSOC_RESP () {0x30;}' unless defined(&IEEE80211_FC0_SUBTYPE_REASSOC_RESP);
    eval 'sub IEEE80211_FC0_SUBTYPE_PROBE_REQ () {0x40;}' unless defined(&IEEE80211_FC0_SUBTYPE_PROBE_REQ);
    eval 'sub IEEE80211_FC0_SUBTYPE_PROBE_RESP () {0x50;}' unless defined(&IEEE80211_FC0_SUBTYPE_PROBE_RESP);
    eval 'sub IEEE80211_FC0_SUBTYPE_BEACON () {0x80;}' unless defined(&IEEE80211_FC0_SUBTYPE_BEACON);
    eval 'sub IEEE80211_FC0_SUBTYPE_ATIM () {0x90;}' unless defined(&IEEE80211_FC0_SUBTYPE_ATIM);
    eval 'sub IEEE80211_FC0_SUBTYPE_DISASSOC () {0xa0;}' unless defined(&IEEE80211_FC0_SUBTYPE_DISASSOC);
    eval 'sub IEEE80211_FC0_SUBTYPE_AUTH () {0xb0;}' unless defined(&IEEE80211_FC0_SUBTYPE_AUTH);
    eval 'sub IEEE80211_FC0_SUBTYPE_DEAUTH () {0xc0;}' unless defined(&IEEE80211_FC0_SUBTYPE_DEAUTH);
    eval 'sub IEEE80211_FC0_SUBTYPE_PS_POLL () {0xa0;}' unless defined(&IEEE80211_FC0_SUBTYPE_PS_POLL);
    eval 'sub IEEE80211_FC0_SUBTYPE_RTS () {0xb0;}' unless defined(&IEEE80211_FC0_SUBTYPE_RTS);
    eval 'sub IEEE80211_FC0_SUBTYPE_CTS () {0xc0;}' unless defined(&IEEE80211_FC0_SUBTYPE_CTS);
    eval 'sub IEEE80211_FC0_SUBTYPE_ACK () {0xd0;}' unless defined(&IEEE80211_FC0_SUBTYPE_ACK);
    eval 'sub IEEE80211_FC0_SUBTYPE_CF_END () {0xe0;}' unless defined(&IEEE80211_FC0_SUBTYPE_CF_END);
    eval 'sub IEEE80211_FC0_SUBTYPE_CF_END_ACK () {0xf0;}' unless defined(&IEEE80211_FC0_SUBTYPE_CF_END_ACK);
    eval 'sub IEEE80211_FC0_SUBTYPE_DATA () {0x;}' unless defined(&IEEE80211_FC0_SUBTYPE_DATA);
    eval 'sub IEEE80211_FC0_SUBTYPE_CF_ACK () {0x10;}' unless defined(&IEEE80211_FC0_SUBTYPE_CF_ACK);
    eval 'sub IEEE80211_FC0_SUBTYPE_CF_POLL () {0x20;}' unless defined(&IEEE80211_FC0_SUBTYPE_CF_POLL);
    eval 'sub IEEE80211_FC0_SUBTYPE_CF_ACPL () {0x30;}' unless defined(&IEEE80211_FC0_SUBTYPE_CF_ACPL);
    eval 'sub IEEE80211_FC0_SUBTYPE_NODATA () {0x40;}' unless defined(&IEEE80211_FC0_SUBTYPE_NODATA);
    eval 'sub IEEE80211_FC0_SUBTYPE_CFACK () {0x50;}' unless defined(&IEEE80211_FC0_SUBTYPE_CFACK);
    eval 'sub IEEE80211_FC0_SUBTYPE_CFPOLL () {0x60;}' unless defined(&IEEE80211_FC0_SUBTYPE_CFPOLL);
    eval 'sub IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK () {0x70;}' unless defined(&IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK);
    eval 'sub IEEE80211_FC0_SUBTYPE_QOS () {0x80;}' unless defined(&IEEE80211_FC0_SUBTYPE_QOS);
    eval 'sub IEEE80211_FC0_SUBTYPE_QOS_NULL () {0xc0;}' unless defined(&IEEE80211_FC0_SUBTYPE_QOS_NULL);
    eval 'sub IEEE80211_FC1_DIR_MASK () {0x3;}' unless defined(&IEEE80211_FC1_DIR_MASK);
    eval 'sub IEEE80211_FC1_DIR_NODS () {0x;}' unless defined(&IEEE80211_FC1_DIR_NODS);
    eval 'sub IEEE80211_FC1_DIR_TODS () {0x1;}' unless defined(&IEEE80211_FC1_DIR_TODS);
    eval 'sub IEEE80211_FC1_DIR_FROMDS () {0x2;}' unless defined(&IEEE80211_FC1_DIR_FROMDS);
    eval 'sub IEEE80211_FC1_DIR_DSTODS () {0x3;}' unless defined(&IEEE80211_FC1_DIR_DSTODS);
    eval 'sub IEEE80211_IS_DSTODS {
        my($wh) = @_;
	    eval q(((($wh)-> $i_fc[1] &  &IEEE80211_FC1_DIR_MASK) ==  &IEEE80211_FC1_DIR_DSTODS));
    }' unless defined(&IEEE80211_IS_DSTODS);
    eval 'sub IEEE80211_FC1_MORE_FRAG () {0x4;}' unless defined(&IEEE80211_FC1_MORE_FRAG);
    eval 'sub IEEE80211_FC1_RETRY () {0x8;}' unless defined(&IEEE80211_FC1_RETRY);
    eval 'sub IEEE80211_FC1_PWR_MGT () {0x10;}' unless defined(&IEEE80211_FC1_PWR_MGT);
    eval 'sub IEEE80211_FC1_MORE_DATA () {0x20;}' unless defined(&IEEE80211_FC1_MORE_DATA);
    eval 'sub IEEE80211_FC1_PROTECTED () {0x40;}' unless defined(&IEEE80211_FC1_PROTECTED);
    eval 'sub IEEE80211_FC1_WEP () {0x40;}' unless defined(&IEEE80211_FC1_WEP);
    eval 'sub IEEE80211_FC1_ORDER () {0x80;}' unless defined(&IEEE80211_FC1_ORDER);
    eval 'sub IEEE80211_SEQ_FRAG_MASK () {0xf;}' unless defined(&IEEE80211_SEQ_FRAG_MASK);
    eval 'sub IEEE80211_SEQ_FRAG_SHIFT () {0;}' unless defined(&IEEE80211_SEQ_FRAG_SHIFT);
    eval 'sub IEEE80211_SEQ_SEQ_MASK () {0xfff0;}' unless defined(&IEEE80211_SEQ_SEQ_MASK);
    eval 'sub IEEE80211_SEQ_SEQ_SHIFT () {4;}' unless defined(&IEEE80211_SEQ_SEQ_SHIFT);
    eval 'sub IEEE80211_NWID_LEN () {32;}' unless defined(&IEEE80211_NWID_LEN);
    eval 'sub IEEE80211_QOS_TXOP () {0xff00;}' unless defined(&IEEE80211_QOS_TXOP);
    eval 'sub IEEE80211_QOS_AMSDU () {0x80;}' unless defined(&IEEE80211_QOS_AMSDU);
    eval 'sub IEEE80211_QOS_ACKPOLICY_NORMAL () {0x;}' unless defined(&IEEE80211_QOS_ACKPOLICY_NORMAL);
    eval 'sub IEEE80211_QOS_ACKPOLICY_NOACK () {0x20;}' unless defined(&IEEE80211_QOS_ACKPOLICY_NOACK);
    eval 'sub IEEE80211_QOS_ACKPOLICY_NOEXPLACK () {0x40;}' unless defined(&IEEE80211_QOS_ACKPOLICY_NOEXPLACK);
    eval 'sub IEEE80211_QOS_ACKPOLICY () {0x60;}' unless defined(&IEEE80211_QOS_ACKPOLICY);
    eval 'sub IEEE80211_QOS_ACKPOLICY_S () {5;}' unless defined(&IEEE80211_QOS_ACKPOLICY_S);
    eval 'sub IEEE80211_QOS_ACKPOLICY_MASK () {0x60;}' unless defined(&IEEE80211_QOS_ACKPOLICY_MASK);
    eval 'sub IEEE80211_QOS_ACKPOLICY_BA () {0x60;}' unless defined(&IEEE80211_QOS_ACKPOLICY_BA);
    eval 'sub IEEE80211_QOS_ESOP () {0x10;}' unless defined(&IEEE80211_QOS_ESOP);
    eval 'sub IEEE80211_QOS_ESOP_S () {4;}' unless defined(&IEEE80211_QOS_ESOP_S);
    eval 'sub IEEE80211_QOS_TID () {0xf;}' unless defined(&IEEE80211_QOS_TID);
    eval 'sub IEEE80211_QOS_HAS_SEQ {
        my($wh) = @_;
	    eval q(((($wh)-> $i_fc[0] & ( &IEEE80211_FC0_TYPE_MASK |  &IEEE80211_FC0_SUBTYPE_QOS)) == ( &IEEE80211_FC0_TYPE_DATA |  &IEEE80211_FC0_SUBTYPE_QOS)));
    }' unless defined(&IEEE80211_QOS_HAS_SEQ);
    eval("sub WME_AC_BE () { 0; }") unless defined(&WME_AC_BE);
    eval("sub WME_AC_BK () { 1; }") unless defined(&WME_AC_BK);
    eval("sub WME_AC_VI () { 2; }") unless defined(&WME_AC_VI);
    eval("sub WME_AC_VO () { 3; }") unless defined(&WME_AC_VO);
    eval 'sub WME_NUM_AC () {4;}' unless defined(&WME_NUM_AC);
    eval 'sub WME_PARAM_ACI () {0x60;}' unless defined(&WME_PARAM_ACI);
    eval 'sub WME_PARAM_ACI_S () {5;}' unless defined(&WME_PARAM_ACI_S);
    eval 'sub WME_PARAM_ACM () {0x10;}' unless defined(&WME_PARAM_ACM);
    eval 'sub WME_PARAM_ACM_S () {4;}' unless defined(&WME_PARAM_ACM_S);
    eval 'sub WME_PARAM_AIFSN () {0xf;}' unless defined(&WME_PARAM_AIFSN);
    eval 'sub WME_PARAM_AIFSN_S () {0;}' unless defined(&WME_PARAM_AIFSN_S);
    eval 'sub WME_PARAM_LOGCWMIN () {0xf;}' unless defined(&WME_PARAM_LOGCWMIN);
    eval 'sub WME_PARAM_LOGCWMIN_S () {0;}' unless defined(&WME_PARAM_LOGCWMIN_S);
    eval 'sub WME_PARAM_LOGCWMAX () {0xf0;}' unless defined(&WME_PARAM_LOGCWMAX);
    eval 'sub WME_PARAM_LOGCWMAX_S () {4;}' unless defined(&WME_PARAM_LOGCWMAX_S);
    eval 'sub WME_AC_TO_TID {
        my($_ac) = @_;
	    eval q(( (($_ac) ==  &WME_AC_VO) ? 6: (($_ac) ==  &WME_AC_VI) ? 5: (($_ac) ==  &WME_AC_BK) ? 1: 0));
    }' unless defined(&WME_AC_TO_TID);
    eval 'sub TID_TO_WME_AC {
        my($_tid) = @_;
	    eval q(( (($_tid) < 1) ?  &WME_AC_BE : (($_tid) < 3) ?  &WME_AC_BK : (($_tid) < 6) ?  &WME_AC_VI :  &WME_AC_VO));
    }' unless defined(&TID_TO_WME_AC);
    eval 'sub WME_QOSINFO_COUNT () {0xf;}' unless defined(&WME_QOSINFO_COUNT);
    eval 'sub MNF_SETUP_REQ () {0;}' unless defined(&MNF_SETUP_REQ);
    eval 'sub MNF_SETUP_RESP () {1;}' unless defined(&MNF_SETUP_RESP);
    eval 'sub MNF_TEARDOWN () {2;}' unless defined(&MNF_TEARDOWN);
    eval 'sub ieee80211_has_seq {
        my($wh) = @_;
	    eval q({ ( ($wh->{i_fc[0]}) &  &IEEE80211_FC0_TYPE_MASK) !=  &IEEE80211_FC0_TYPE_CTL; });
    }' unless defined(&ieee80211_has_seq);
    eval 'sub ieee80211_has_addr4 {
        my($wh) = @_;
	    eval q({ ( ($wh->{i_fc[1]}) &  &IEEE80211_FC1_DIR_MASK) ==  &IEEE80211_FC1_DIR_DSTODS; });
    }' unless defined(&ieee80211_has_addr4);
    eval 'sub ieee80211_has_qos {
        my($wh) = @_;
	    eval q({ ( ($wh->{i_fc[0]}) & ( &IEEE80211_FC0_TYPE_MASK |  &IEEE80211_FC0_SUBTYPE_QOS)) == ( &IEEE80211_FC0_TYPE_DATA |  &IEEE80211_FC0_SUBTYPE_QOS); });
    }' unless defined(&ieee80211_has_qos);
    eval 'sub ieee80211_has_htc {
        my($wh) = @_;
	    eval q({ ( ($wh->{i_fc[1]}) &  &IEEE80211_FC1_ORDER)  && ( &ieee80211_has_qos($wh) || ( ($wh->{i_fc[0]}) &  &IEEE80211_FC0_TYPE_MASK) ==  &IEEE80211_FC0_TYPE_MGT); });
    }' unless defined(&ieee80211_has_htc);
    eval 'sub ieee80211_get_qos {
        my($wh) = @_;
	    eval q({  &const  &u_int8_t * &frm;  &if ( &ieee80211_has_addr4($wh))  &frm = (( &const \'struct ieee80211_qosframe_addr4\' *)$wh)-> &i_qos;  &else  &frm = (( &const \'struct ieee80211_qosframe\' *)$wh)-> &i_qos;  &le16toh(*( &const  &u_int16_t *) &frm); });
    }' unless defined(&ieee80211_get_qos);
    eval 'sub IEEE80211_BEACON_INTERVAL {
        my($beacon) = @_;
	    eval q((($beacon)[8] | (($beacon)[9] << 8)));
    }' unless defined(&IEEE80211_BEACON_INTERVAL);
    eval 'sub IEEE80211_BEACON_CAPABILITY {
        my($beacon) = @_;
	    eval q((($beacon)[10] | (($beacon)[11] << 8)));
    }' unless defined(&IEEE80211_BEACON_CAPABILITY);
    eval 'sub IEEE80211_CAPINFO_ESS () {0x1;}' unless defined(&IEEE80211_CAPINFO_ESS);
    eval 'sub IEEE80211_CAPINFO_IBSS () {0x2;}' unless defined(&IEEE80211_CAPINFO_IBSS);
    eval 'sub IEEE80211_CAPINFO_CF_POLLABLE () {0x4;}' unless defined(&IEEE80211_CAPINFO_CF_POLLABLE);
    eval 'sub IEEE80211_CAPINFO_CF_POLLREQ () {0x8;}' unless defined(&IEEE80211_CAPINFO_CF_POLLREQ);
    eval 'sub IEEE80211_CAPINFO_PRIVACY () {0x10;}' unless defined(&IEEE80211_CAPINFO_PRIVACY);
    eval 'sub IEEE80211_CAPINFO_SHORT_PREAMBLE () {0x20;}' unless defined(&IEEE80211_CAPINFO_SHORT_PREAMBLE);
    eval 'sub IEEE80211_CAPINFO_PBCC () {0x40;}' unless defined(&IEEE80211_CAPINFO_PBCC);
    eval 'sub IEEE80211_CAPINFO_CHNL_AGILITY () {0x80;}' unless defined(&IEEE80211_CAPINFO_CHNL_AGILITY);
    eval 'sub IEEE80211_CAPINFO_SHORT_SLOTTIME () {0x400;}' unless defined(&IEEE80211_CAPINFO_SHORT_SLOTTIME);
    eval 'sub IEEE80211_CAPINFO_RSN () {0x800;}' unless defined(&IEEE80211_CAPINFO_RSN);
    eval 'sub IEEE80211_CAPINFO_DSSSOFDM () {0x2000;}' unless defined(&IEEE80211_CAPINFO_DSSSOFDM);
    eval("sub IEEE80211_ELEMID_SSID () { 0; }") unless defined(&IEEE80211_ELEMID_SSID);
    eval("sub IEEE80211_ELEMID_RATES () { 1; }") unless defined(&IEEE80211_ELEMID_RATES);
    eval("sub IEEE80211_ELEMID_FHPARMS () { 2; }") unless defined(&IEEE80211_ELEMID_FHPARMS);
    eval("sub IEEE80211_ELEMID_DSPARMS () { 3; }") unless defined(&IEEE80211_ELEMID_DSPARMS);
    eval("sub IEEE80211_ELEMID_CFPARMS () { 4; }") unless defined(&IEEE80211_ELEMID_CFPARMS);
    eval("sub IEEE80211_ELEMID_TIM () { 5; }") unless defined(&IEEE80211_ELEMID_TIM);
    eval("sub IEEE80211_ELEMID_IBSSPARMS () { 6; }") unless defined(&IEEE80211_ELEMID_IBSSPARMS);
    eval("sub IEEE80211_ELEMID_COUNTRY () { 7; }") unless defined(&IEEE80211_ELEMID_COUNTRY);
    eval("sub IEEE80211_ELEMID_EDCAPARMS () { 12; }") unless defined(&IEEE80211_ELEMID_EDCAPARMS);
    eval("sub IEEE80211_ELEMID_CHALLENGE () { 16; }") unless defined(&IEEE80211_ELEMID_CHALLENGE);
    eval("sub IEEE80211_ELEMID_PWRCNSTR () { 32; }") unless defined(&IEEE80211_ELEMID_PWRCNSTR);
    eval("sub IEEE80211_ELEMID_PWRCAP () { 33; }") unless defined(&IEEE80211_ELEMID_PWRCAP);
    eval("sub IEEE80211_ELEMID_TPCREQ () { 34; }") unless defined(&IEEE80211_ELEMID_TPCREQ);
    eval("sub IEEE80211_ELEMID_TPCREP () { 35; }") unless defined(&IEEE80211_ELEMID_TPCREP);
    eval("sub IEEE80211_ELEMID_SUPPCHAN () { 36; }") unless defined(&IEEE80211_ELEMID_SUPPCHAN);
    eval("sub IEEE80211_ELEMID_CHANSWITCHANN () { 37; }") unless defined(&IEEE80211_ELEMID_CHANSWITCHANN);
    eval("sub IEEE80211_ELEMID_MEASREQ () { 38; }") unless defined(&IEEE80211_ELEMID_MEASREQ);
    eval("sub IEEE80211_ELEMID_MEASREP () { 39; }") unless defined(&IEEE80211_ELEMID_MEASREP);
    eval("sub IEEE80211_ELEMID_QUIET () { 40; }") unless defined(&IEEE80211_ELEMID_QUIET);
    eval("sub IEEE80211_ELEMID_IBSSDFS () { 41; }") unless defined(&IEEE80211_ELEMID_IBSSDFS);
    eval("sub IEEE80211_ELEMID_ERP () { 42; }") unless defined(&IEEE80211_ELEMID_ERP);
    eval("sub IEEE80211_ELEMID_HTCAP () { 45; }") unless defined(&IEEE80211_ELEMID_HTCAP);
    eval("sub IEEE80211_ELEMID_QOS_CAP () { 46; }") unless defined(&IEEE80211_ELEMID_QOS_CAP);
    eval("sub IEEE80211_ELEMID_RSN () { 48; }") unless defined(&IEEE80211_ELEMID_RSN);
    eval("sub IEEE80211_ELEMID_XRATES () { 50; }") unless defined(&IEEE80211_ELEMID_XRATES);
    eval("sub IEEE80211_ELEMID_TIE () { 56; }") unless defined(&IEEE80211_ELEMID_TIE);
    eval("sub IEEE80211_ELEMID_HTINFO () { 61; }") unless defined(&IEEE80211_ELEMID_HTINFO);
    eval("sub IEEE80211_ELEMID_MMIE () { 76; }") unless defined(&IEEE80211_ELEMID_MMIE);
    eval("sub IEEE80211_ELEMID_TPC () { 150; }") unless defined(&IEEE80211_ELEMID_TPC);
    eval("sub IEEE80211_ELEMID_CCKM () { 156; }") unless defined(&IEEE80211_ELEMID_CCKM);
    eval("sub IEEE80211_ELEMID_VENDOR () { 221; }") unless defined(&IEEE80211_ELEMID_VENDOR);
    eval 'sub IEEE80211_CHALLENGE_LEN () {128;}' unless defined(&IEEE80211_CHALLENGE_LEN);
    eval 'sub IEEE80211_RATE_BASIC () {0x80;}' unless defined(&IEEE80211_RATE_BASIC);
    eval 'sub IEEE80211_RATE_VAL () {0x7f;}' unless defined(&IEEE80211_RATE_VAL);
    eval 'sub IEEE80211_ERP_NON_ERP_PRESENT () {0x1;}' unless defined(&IEEE80211_ERP_NON_ERP_PRESENT);
    eval 'sub IEEE80211_ERP_USE_PROTECTION () {0x2;}' unless defined(&IEEE80211_ERP_USE_PROTECTION);
    eval 'sub IEEE80211_ERP_LONG_PREAMBLE () {0x4;}' unless defined(&IEEE80211_ERP_LONG_PREAMBLE);
    eval 'sub ATHEROS_CAP_TURBO_PRIME () {0x1;}' unless defined(&ATHEROS_CAP_TURBO_PRIME);
    eval 'sub ATHEROS_CAP_COMPRESSION () {0x2;}' unless defined(&ATHEROS_CAP_COMPRESSION);
    eval 'sub ATHEROS_CAP_FAST_FRAME () {0x4;}' unless defined(&ATHEROS_CAP_FAST_FRAME);
    eval 'sub ATHEROS_CAP_BOOST () {0x80;}' unless defined(&ATHEROS_CAP_BOOST);
    eval 'sub ATH_OUI () {0x7f0300;}' unless defined(&ATH_OUI);
    eval 'sub ATH_OUI_TYPE () {0x1;}' unless defined(&ATH_OUI_TYPE);
    eval 'sub ATH_OUI_VERSION () {0x1;}' unless defined(&ATH_OUI_VERSION);
    eval 'sub WPA_OUI () {0xf25000;}' unless defined(&WPA_OUI);
    eval 'sub WPA_OUI_TYPE () {0x1;}' unless defined(&WPA_OUI_TYPE);
    eval 'sub WPA_VERSION () {1;}' unless defined(&WPA_VERSION);
    eval 'sub WPA_CSE_NULL () {0x;}' unless defined(&WPA_CSE_NULL);
    eval 'sub WPA_CSE_WEP40 () {0x1;}' unless defined(&WPA_CSE_WEP40);
    eval 'sub WPA_CSE_TKIP () {0x2;}' unless defined(&WPA_CSE_TKIP);
    eval 'sub WPA_CSE_CCMP () {0x4;}' unless defined(&WPA_CSE_CCMP);
    eval 'sub WPA_CSE_WEP104 () {0x5;}' unless defined(&WPA_CSE_WEP104);
    eval 'sub WPA_ASE_NONE () {0x;}' unless defined(&WPA_ASE_NONE);
    eval 'sub WPA_ASE_8021X_UNSPEC () {0x1;}' unless defined(&WPA_ASE_8021X_UNSPEC);
    eval 'sub WPA_ASE_8021X_PSK () {0x2;}' unless defined(&WPA_ASE_8021X_PSK);
    eval 'sub RSN_OUI () {0xac0f00;}' unless defined(&RSN_OUI);
    eval 'sub RSN_VERSION () {1;}' unless defined(&RSN_VERSION);
    eval 'sub RSN_CSE_NULL () {0x;}' unless defined(&RSN_CSE_NULL);
    eval 'sub RSN_CSE_WEP40 () {0x1;}' unless defined(&RSN_CSE_WEP40);
    eval 'sub RSN_CSE_TKIP () {0x2;}' unless defined(&RSN_CSE_TKIP);
    eval 'sub RSN_CSE_WRAP () {0x3;}' unless defined(&RSN_CSE_WRAP);
    eval 'sub RSN_CSE_CCMP () {0x4;}' unless defined(&RSN_CSE_CCMP);
    eval 'sub RSN_CSE_WEP104 () {0x5;}' unless defined(&RSN_CSE_WEP104);
    eval 'sub RSN_ASE_NONE () {0x;}' unless defined(&RSN_ASE_NONE);
    eval 'sub RSN_ASE_8021X_UNSPEC () {0x1;}' unless defined(&RSN_ASE_8021X_UNSPEC);
    eval 'sub RSN_ASE_8021X_PSK () {0x2;}' unless defined(&RSN_ASE_8021X_PSK);
    eval 'sub RSN_CAP_PREAUTH () {0x1;}' unless defined(&RSN_CAP_PREAUTH);
    eval 'sub WME_OUI () {0xf25000;}' unless defined(&WME_OUI);
    eval 'sub WME_OUI_TYPE () {0x2;}' unless defined(&WME_OUI_TYPE);
    eval 'sub WME_INFO_OUI_SUBTYPE () {0x;}' unless defined(&WME_INFO_OUI_SUBTYPE);
    eval 'sub WME_PARAM_OUI_SUBTYPE () {0x1;}' unless defined(&WME_PARAM_OUI_SUBTYPE);
    eval 'sub WME_VERSION () {1;}' unless defined(&WME_VERSION);
    eval 'sub IEEE80211_AUTH_ALGORITHM {
        my($auth) = @_;
	    eval q((($auth)[0] | (($auth)[1] << 8)));
    }' unless defined(&IEEE80211_AUTH_ALGORITHM);
    eval 'sub IEEE80211_AUTH_TRANSACTION {
        my($auth) = @_;
	    eval q((($auth)[2] | (($auth)[3] << 8)));
    }' unless defined(&IEEE80211_AUTH_TRANSACTION);
    eval 'sub IEEE80211_AUTH_STATUS {
        my($auth) = @_;
	    eval q((($auth)[4] | (($auth)[5] << 8)));
    }' unless defined(&IEEE80211_AUTH_STATUS);
    eval 'sub IEEE80211_AUTH_ALG_OPEN () {0x;}' unless defined(&IEEE80211_AUTH_ALG_OPEN);
    eval 'sub IEEE80211_AUTH_ALG_SHARED () {0x1;}' unless defined(&IEEE80211_AUTH_ALG_SHARED);
    eval 'sub IEEE80211_AUTH_ALG_LEAP () {0x80;}' unless defined(&IEEE80211_AUTH_ALG_LEAP);
    eval("sub IEEE80211_AUTH_OPEN_REQUEST () { 1; }") unless defined(&IEEE80211_AUTH_OPEN_REQUEST);
    eval("sub IEEE80211_AUTH_OPEN_RESPONSE () { 2; }") unless defined(&IEEE80211_AUTH_OPEN_RESPONSE);
    eval("sub IEEE80211_AUTH_SHARED_REQUEST () { 1; }") unless defined(&IEEE80211_AUTH_SHARED_REQUEST);
    eval("sub IEEE80211_AUTH_SHARED_CHALLENGE () { 2; }") unless defined(&IEEE80211_AUTH_SHARED_CHALLENGE);
    eval("sub IEEE80211_AUTH_SHARED_RESPONSE () { 3; }") unless defined(&IEEE80211_AUTH_SHARED_RESPONSE);
    eval("sub IEEE80211_AUTH_SHARED_PASS () { 4; }") unless defined(&IEEE80211_AUTH_SHARED_PASS);
    eval("sub IEEE80211_REASON_UNSPECIFIED () { 1; }") unless defined(&IEEE80211_REASON_UNSPECIFIED);
    eval("sub IEEE80211_REASON_AUTH_EXPIRE () { 2; }") unless defined(&IEEE80211_REASON_AUTH_EXPIRE);
    eval("sub IEEE80211_REASON_AUTH_LEAVE () { 3; }") unless defined(&IEEE80211_REASON_AUTH_LEAVE);
    eval("sub IEEE80211_REASON_ASSOC_EXPIRE () { 4; }") unless defined(&IEEE80211_REASON_ASSOC_EXPIRE);
    eval("sub IEEE80211_REASON_ASSOC_TOOMANY () { 5; }") unless defined(&IEEE80211_REASON_ASSOC_TOOMANY);
    eval("sub IEEE80211_REASON_NOT_AUTHED () { 6; }") unless defined(&IEEE80211_REASON_NOT_AUTHED);
    eval("sub IEEE80211_REASON_NOT_ASSOCED () { 7; }") unless defined(&IEEE80211_REASON_NOT_ASSOCED);
    eval("sub IEEE80211_REASON_ASSOC_LEAVE () { 8; }") unless defined(&IEEE80211_REASON_ASSOC_LEAVE);
    eval("sub IEEE80211_REASON_ASSOC_NOT_AUTHED () { 9; }") unless defined(&IEEE80211_REASON_ASSOC_NOT_AUTHED);
    eval("sub IEEE80211_REASON_RSN_REQUIRED () { 11; }") unless defined(&IEEE80211_REASON_RSN_REQUIRED);
    eval("sub IEEE80211_REASON_RSN_INCONSISTENT () { 12; }") unless defined(&IEEE80211_REASON_RSN_INCONSISTENT);
    eval("sub IEEE80211_REASON_IE_INVALID () { 13; }") unless defined(&IEEE80211_REASON_IE_INVALID);
    eval("sub IEEE80211_REASON_MIC_FAILURE () { 14; }") unless defined(&IEEE80211_REASON_MIC_FAILURE);
    eval("sub IEEE80211_STATUS_SUCCESS () { 0; }") unless defined(&IEEE80211_STATUS_SUCCESS);
    eval("sub IEEE80211_STATUS_UNSPECIFIED () { 1; }") unless defined(&IEEE80211_STATUS_UNSPECIFIED);
    eval("sub IEEE80211_STATUS_CAPINFO () { 10; }") unless defined(&IEEE80211_STATUS_CAPINFO);
    eval("sub IEEE80211_STATUS_NOT_ASSOCED () { 11; }") unless defined(&IEEE80211_STATUS_NOT_ASSOCED);
    eval("sub IEEE80211_STATUS_OTHER () { 12; }") unless defined(&IEEE80211_STATUS_OTHER);
    eval("sub IEEE80211_STATUS_ALG () { 13; }") unless defined(&IEEE80211_STATUS_ALG);
    eval("sub IEEE80211_STATUS_SEQUENCE () { 14; }") unless defined(&IEEE80211_STATUS_SEQUENCE);
    eval("sub IEEE80211_STATUS_CHALLENGE () { 15; }") unless defined(&IEEE80211_STATUS_CHALLENGE);
    eval("sub IEEE80211_STATUS_TIMEOUT () { 16; }") unless defined(&IEEE80211_STATUS_TIMEOUT);
    eval("sub IEEE80211_STATUS_TOOMANY () { 17; }") unless defined(&IEEE80211_STATUS_TOOMANY);
    eval("sub IEEE80211_STATUS_BASIC_RATE () { 18; }") unless defined(&IEEE80211_STATUS_BASIC_RATE);
    eval("sub IEEE80211_STATUS_SP_REQUIRED () { 19; }") unless defined(&IEEE80211_STATUS_SP_REQUIRED);
    eval("sub IEEE80211_STATUS_PBCC_REQUIRED () { 20; }") unless defined(&IEEE80211_STATUS_PBCC_REQUIRED);
    eval("sub IEEE80211_STATUS_CA_REQUIRED () { 21; }") unless defined(&IEEE80211_STATUS_CA_REQUIRED);
    eval("sub IEEE80211_STATUS_TOO_MANY_STATIONS () { 22; }") unless defined(&IEEE80211_STATUS_TOO_MANY_STATIONS);
    eval("sub IEEE80211_STATUS_RATES () { 23; }") unless defined(&IEEE80211_STATUS_RATES);
    eval("sub IEEE80211_STATUS_SHORTSLOT_REQUIRED () { 25; }") unless defined(&IEEE80211_STATUS_SHORTSLOT_REQUIRED);
    eval("sub IEEE80211_STATUS_DSSSOFDM_REQUIRED () { 26; }") unless defined(&IEEE80211_STATUS_DSSSOFDM_REQUIRED);
    eval 'sub IEEE80211_WEP_KEYLEN () {5;}' unless defined(&IEEE80211_WEP_KEYLEN);
    eval 'sub IEEE80211_WEP_IVLEN () {3;}' unless defined(&IEEE80211_WEP_IVLEN);
    eval 'sub IEEE80211_WEP_KIDLEN () {1;}' unless defined(&IEEE80211_WEP_KIDLEN);
    eval 'sub IEEE80211_WEP_CRCLEN () {4;}' unless defined(&IEEE80211_WEP_CRCLEN);
    eval 'sub IEEE80211_WEP_TOTLEN () {( &IEEE80211_WEP_IVLEN +  &IEEE80211_WEP_KIDLEN +  &IEEE80211_WEP_CRCLEN);}' unless defined(&IEEE80211_WEP_TOTLEN);
    eval 'sub IEEE80211_WEP_NKID () {4;}' unless defined(&IEEE80211_WEP_NKID);
    eval 'sub IEEE80211_WEP_EXTIV () {0x20;}' unless defined(&IEEE80211_WEP_EXTIV);
    eval 'sub IEEE80211_WEP_EXTIVLEN () {4;}' unless defined(&IEEE80211_WEP_EXTIVLEN);
    eval 'sub IEEE80211_WEP_MICLEN () {8;}' unless defined(&IEEE80211_WEP_MICLEN);
    eval 'sub IEEE80211_CRC_LEN () {4;}' unless defined(&IEEE80211_CRC_LEN);
    eval 'sub IEEE80211_MTU_MAX () {2290;}' unless defined(&IEEE80211_MTU_MAX);
    eval 'sub IEEE80211_MTU_MIN () {32;}' unless defined(&IEEE80211_MTU_MIN);
    eval 'sub IEEE80211_MAX_LEN () {(2300+  &IEEE80211_CRC_LEN + ( &IEEE80211_WEP_IVLEN +  &IEEE80211_WEP_KIDLEN +  &IEEE80211_WEP_CRCLEN));}' unless defined(&IEEE80211_MAX_LEN);
    eval 'sub IEEE80211_ACK_LEN () {($sizeof{\'struct ieee80211_frame_ack\'} +  &IEEE80211_CRC_LEN);}' unless defined(&IEEE80211_ACK_LEN);
    eval 'sub IEEE80211_MIN_LEN () {($sizeof{\'struct ieee80211_frame_min\'} +  &IEEE80211_CRC_LEN);}' unless defined(&IEEE80211_MIN_LEN);
    eval 'sub IEEE80211_AID_MAX () {2007;}' unless defined(&IEEE80211_AID_MAX);
    eval 'sub IEEE80211_AID_DEF () {128;}' unless defined(&IEEE80211_AID_DEF);
    eval 'sub IEEE80211_AID {
        my($b) = @_;
	    eval q((($b) &~ 0xc000));
    }' unless defined(&IEEE80211_AID);
    eval 'sub IEEE80211_RTS_MIN () {1;}' unless defined(&IEEE80211_RTS_MIN);
    eval 'sub IEEE80211_RTS_MAX () {2346;}' unless defined(&IEEE80211_RTS_MAX);
    eval 'sub IEEE80211_FRAG_MIN () {256;}' unless defined(&IEEE80211_FRAG_MIN);
    eval 'sub IEEE80211_FRAG_MAX () {2346;}' unless defined(&IEEE80211_FRAG_MAX);
    eval 'sub IEEE80211_DUR_TU () {1024;}' unless defined(&IEEE80211_DUR_TU);
    eval 'sub IEEE80211_DUR_DS_LONG_PREAMBLE () {144;}' unless defined(&IEEE80211_DUR_DS_LONG_PREAMBLE);
    eval 'sub IEEE80211_DUR_DS_SHORT_PREAMBLE () {72;}' unless defined(&IEEE80211_DUR_DS_SHORT_PREAMBLE);
    eval 'sub IEEE80211_DUR_DS_SLOW_PLCPHDR () {48;}' unless defined(&IEEE80211_DUR_DS_SLOW_PLCPHDR);
    eval 'sub IEEE80211_DUR_DS_FAST_PLCPHDR () {24;}' unless defined(&IEEE80211_DUR_DS_FAST_PLCPHDR);
    eval 'sub IEEE80211_DUR_DS_SLOW_ACK () {112;}' unless defined(&IEEE80211_DUR_DS_SLOW_ACK);
    eval 'sub IEEE80211_DUR_DS_FAST_ACK () {56;}' unless defined(&IEEE80211_DUR_DS_FAST_ACK);
    eval 'sub IEEE80211_DUR_DS_SLOW_CTS () {112;}' unless defined(&IEEE80211_DUR_DS_SLOW_CTS);
    eval 'sub IEEE80211_DUR_DS_FAST_CTS () {56;}' unless defined(&IEEE80211_DUR_DS_FAST_CTS);
    eval 'sub IEEE80211_DUR_DS_SLOT () {20;}' unless defined(&IEEE80211_DUR_DS_SLOT);
    eval 'sub IEEE80211_DUR_DS_SIFS () {10;}' unless defined(&IEEE80211_DUR_DS_SIFS);
    eval 'sub IEEE80211_DUR_DS_PIFS () {( &IEEE80211_DUR_DS_SIFS +  &IEEE80211_DUR_DS_SLOT);}' unless defined(&IEEE80211_DUR_DS_PIFS);
    eval 'sub IEEE80211_DUR_DS_DIFS () {( &IEEE80211_DUR_DS_SIFS + 2*  &IEEE80211_DUR_DS_SLOT);}' unless defined(&IEEE80211_DUR_DS_DIFS);
    eval 'sub IEEE80211_DUR_DS_EIFS () {( &IEEE80211_DUR_DS_SIFS +  &IEEE80211_DUR_DS_SLOW_ACK +  &IEEE80211_DUR_DS_LONG_PREAMBLE +  &IEEE80211_DUR_DS_SLOW_PLCPHDR +  &IEEE80211_DUR_DS_DIFS);}' unless defined(&IEEE80211_DUR_DS_EIFS);
}
1;
