require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NET80211_IEEE80211_PROTO_H_)) {
    eval 'sub _NET80211_IEEE80211_PROTO_H_ () {1;}' unless defined(&_NET80211_IEEE80211_PROTO_H_);
    eval("sub IEEE80211_S_INIT () { 0; }") unless defined(&IEEE80211_S_INIT);
    eval("sub IEEE80211_S_SCAN () { 1; }") unless defined(&IEEE80211_S_SCAN);
    eval("sub IEEE80211_S_AUTH () { 2; }") unless defined(&IEEE80211_S_AUTH);
    eval("sub IEEE80211_S_ASSOC () { 3; }") unless defined(&IEEE80211_S_ASSOC);
    eval("sub IEEE80211_S_RUN () { 4; }") unless defined(&IEEE80211_S_RUN);
    eval 'sub IEEE80211_S_MAX () {( &IEEE80211_S_RUN+1);}' unless defined(&IEEE80211_S_MAX);
    eval 'sub IEEE80211_SEND_MGMT {
        my($_ic,$_ni,$_type,$_arg) = @_;
	    eval q(((*($_ic)-> &ic_send_mgmt)($_ic, $_ni, $_type, $_arg)));
    }' unless defined(&IEEE80211_SEND_MGMT);
    eval 'sub ieee80211_new_state {
        my($_ic, $_nstate, $_arg) = @_;
	    eval q(((($_ic)-> &ic_newstate)(($_ic), ($_nstate), ($_arg))));
    }' unless defined(&ieee80211_new_state);
}
1;
