123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146 |
- #ifndef DRIVER_H
- #define DRIVER_H
- #define WPA_SUPPLICANT_DRIVER_VERSION 4
- #include "common/defs.h"
- #include "utils/list.h"
- #define HOSTAPD_CHAN_DISABLED 0x00000001
- #define HOSTAPD_CHAN_PASSIVE_SCAN 0x00000002
- #define HOSTAPD_CHAN_NO_IBSS 0x00000004
- #define HOSTAPD_CHAN_RADAR 0x00000008
- #define HOSTAPD_CHAN_HT40PLUS 0x00000010
- #define HOSTAPD_CHAN_HT40MINUS 0x00000020
- #define HOSTAPD_CHAN_HT40 0x00000040
- #define HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED 0x00000080
- #define HOSTAPD_CHAN_DFS_UNKNOWN 0x00000000
- #define HOSTAPD_CHAN_DFS_USABLE 0x00000100
- #define HOSTAPD_CHAN_DFS_UNAVAILABLE 0x00000200
- #define HOSTAPD_CHAN_DFS_AVAILABLE 0x00000300
- #define HOSTAPD_CHAN_DFS_MASK 0x00000300
- #define HOSTAPD_CHAN_VHT_10_70 0x00000800
- #define HOSTAPD_CHAN_VHT_30_50 0x00001000
- #define HOSTAPD_CHAN_VHT_50_30 0x00002000
- #define HOSTAPD_CHAN_VHT_70_10 0x00004000
- enum reg_change_initiator {
- REGDOM_SET_BY_CORE,
- REGDOM_SET_BY_USER,
- REGDOM_SET_BY_DRIVER,
- REGDOM_SET_BY_COUNTRY_IE,
- };
- struct hostapd_channel_data {
-
- short chan;
-
- int freq;
-
- int flag;
-
- u8 max_tx_power;
-
- struct dl_list survey_list;
-
- s8 min_nf;
- #ifdef CONFIG_ACS
-
- long double interference_factor;
- #endif
- };
- #define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN BIT(0)
- #define HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN BIT(1)
- struct hostapd_hw_modes {
-
- enum hostapd_hw_mode mode;
-
- int num_channels;
-
- struct hostapd_channel_data *channels;
-
- int num_rates;
-
- int *rates;
-
- u16 ht_capab;
-
- u8 mcs_set[16];
-
- u8 a_mpdu_params;
-
- u32 vht_capab;
-
- u8 vht_mcs_set[8];
- unsigned int flags;
- };
- #define IEEE80211_MODE_INFRA 0
- #define IEEE80211_MODE_IBSS 1
- #define IEEE80211_MODE_AP 2
- #define IEEE80211_CAP_ESS 0x0001
- #define IEEE80211_CAP_IBSS 0x0002
- #define IEEE80211_CAP_PRIVACY 0x0010
- #define IEEE80211_CAP_DMG_MASK 0x0003
- #define IEEE80211_CAP_DMG_IBSS 0x0001
- #define IEEE80211_CAP_DMG_PBSS 0x0002
- #define IEEE80211_CAP_DMG_AP 0x0003
- #define WPA_SCAN_QUAL_INVALID BIT(0)
- #define WPA_SCAN_NOISE_INVALID BIT(1)
- #define WPA_SCAN_LEVEL_INVALID BIT(2)
- #define WPA_SCAN_LEVEL_DBM BIT(3)
- #define WPA_SCAN_AUTHENTICATED BIT(4)
- #define WPA_SCAN_ASSOCIATED BIT(5)
- struct wpa_scan_res {
- unsigned int flags;
- u8 bssid[ETH_ALEN];
- int freq;
- u16 beacon_int;
- u16 caps;
- int qual;
- int noise;
- int level;
- u64 tsf;
- unsigned int age;
- size_t ie_len;
- size_t beacon_ie_len;
-
- };
- struct wpa_scan_results {
- struct wpa_scan_res **res;
- size_t num;
- struct os_time fetch_time;
- };
- struct wpa_interface_info {
- struct wpa_interface_info *next;
- char *ifname;
- char *desc;
- const char *drv_name;
- };
- #define WPAS_MAX_SCAN_SSIDS 16
- struct wpa_driver_scan_params {
-
- struct wpa_driver_scan_ssid {
-
- const u8 *ssid;
-
- size_t ssid_len;
- } ssids[WPAS_MAX_SCAN_SSIDS];
-
- size_t num_ssids;
-
- const u8 *extra_ies;
-
- size_t extra_ies_len;
-
- int *freqs;
-
- struct wpa_driver_scan_filter {
- u8 ssid[32];
- size_t ssid_len;
- } *filter_ssids;
-
- size_t num_filter_ssids;
-
- s32 filter_rssi;
-
- u8 p2p_probe;
- };
- struct wpa_driver_auth_params {
- int freq;
- const u8 *bssid;
- const u8 *ssid;
- size_t ssid_len;
- int auth_alg;
- const u8 *ie;
- size_t ie_len;
- const u8 *wep_key[4];
- size_t wep_key_len[4];
- int wep_tx_keyidx;
- int local_state_change;
-
- int p2p;
- const u8 *sae_data;
- size_t sae_data_len;
- };
- enum wps_mode {
- WPS_MODE_NONE ,
- WPS_MODE_OPEN ,
- WPS_MODE_PRIVACY
- };
- struct wpa_driver_associate_params {
-
- const u8 *bssid;
-
- const u8 *ssid;
-
- size_t ssid_len;
-
- int freq;
-
- int bg_scan_period;
-
- const u8 *wpa_ie;
-
- size_t wpa_ie_len;
-
- unsigned int wpa_proto;
-
- enum wpa_cipher pairwise_suite;
-
- enum wpa_cipher group_suite;
-
- enum wpa_key_mgmt key_mgmt_suite;
-
- int auth_alg;
-
- int mode;
-
- const u8 *wep_key[4];
-
- size_t wep_key_len[4];
-
- int wep_tx_keyidx;
-
- enum mfp_options mgmt_frame_protection;
-
- const u8 *ft_ies;
-
- size_t ft_ies_len;
-
- const u8 *ft_md;
-
- const char *passphrase;
-
- const u8 *psk;
-
- int drop_unencrypted;
-
- const u8 *prev_bssid;
-
- enum wps_mode wps;
-
- int p2p;
-
- int uapsd;
-
- int fixed_bssid;
-
- int disable_ht;
-
- const u8 *htcaps;
- const u8 *htcaps_mask;
- #ifdef CONFIG_VHT_OVERRIDES
-
- int disable_vht;
-
- const struct ieee80211_vht_capabilities *vhtcaps;
- const struct ieee80211_vht_capabilities *vhtcaps_mask;
- #endif
- };
- enum hide_ssid {
- NO_SSID_HIDING,
- HIDDEN_SSID_ZERO_LEN,
- HIDDEN_SSID_ZERO_CONTENTS
- };
- struct wpa_driver_ap_params {
-
- u8 *head;
-
- size_t head_len;
-
- u8 *tail;
-
- size_t tail_len;
-
- int dtim_period;
-
- int beacon_int;
-
- int *basic_rates;
-
- u8 *proberesp;
-
- size_t proberesp_len;
-
- const u8 *ssid;
-
- size_t ssid_len;
-
- enum hide_ssid hide_ssid;
-
- unsigned int pairwise_ciphers;
-
- unsigned int group_cipher;
-
- unsigned int key_mgmt_suites;
-
- unsigned int auth_algs;
-
- unsigned int wpa_version;
-
- int privacy;
-
- const struct wpabuf *beacon_ies;
-
- const struct wpabuf *proberesp_ies;
-
- const struct wpabuf *assocresp_ies;
-
- int isolate;
-
- int cts_protect;
-
- int preamble;
-
- int short_slot_time;
-
- int ht_opmode;
-
- int interworking;
-
- const u8 *hessid;
-
- u8 access_network_type;
-
- int ap_max_inactivity;
-
- int disable_dgaf;
- };
- struct wpa_driver_capa {
- #define WPA_DRIVER_CAPA_KEY_MGMT_WPA 0x00000001
- #define WPA_DRIVER_CAPA_KEY_MGMT_WPA2 0x00000002
- #define WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK 0x00000004
- #define WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK 0x00000008
- #define WPA_DRIVER_CAPA_KEY_MGMT_WPA_NONE 0x00000010
- #define WPA_DRIVER_CAPA_KEY_MGMT_FT 0x00000020
- #define WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK 0x00000040
- #define WPA_DRIVER_CAPA_KEY_MGMT_WAPI_PSK 0x00000080
- unsigned int key_mgmt;
- #define WPA_DRIVER_CAPA_ENC_WEP40 0x00000001
- #define WPA_DRIVER_CAPA_ENC_WEP104 0x00000002
- #define WPA_DRIVER_CAPA_ENC_TKIP 0x00000004
- #define WPA_DRIVER_CAPA_ENC_CCMP 0x00000008
- #define WPA_DRIVER_CAPA_ENC_WEP128 0x00000010
- #define WPA_DRIVER_CAPA_ENC_GCMP 0x00000020
- unsigned int enc;
- #define WPA_DRIVER_AUTH_OPEN 0x00000001
- #define WPA_DRIVER_AUTH_SHARED 0x00000002
- #define WPA_DRIVER_AUTH_LEAP 0x00000004
- unsigned int auth;
- #define WPA_DRIVER_FLAGS_DRIVER_IE 0x00000001
- #define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC 0x00000002
- #define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE 0x00000008
- #define WPA_DRIVER_FLAGS_WIRED 0x00000010
- #define WPA_DRIVER_FLAGS_SME 0x00000020
- #define WPA_DRIVER_FLAGS_AP 0x00000040
- #define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE 0x00000080
- #define WPA_DRIVER_FLAGS_P2P_MGMT 0x00000100
- #define WPA_DRIVER_FLAGS_P2P_CONCURRENT 0x00000200
- #define WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE 0x00000400
- #define WPA_DRIVER_FLAGS_P2P_CAPABLE 0x00000800
- #define WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P 0x00002000
- #define WPA_DRIVER_FLAGS_SANE_ERROR_CODES 0x00004000
- #define WPA_DRIVER_FLAGS_OFFCHANNEL_TX 0x00008000
- #define WPA_DRIVER_FLAGS_EAPOL_TX_STATUS 0x00010000
- #define WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS 0x00020000
- #define WPA_DRIVER_FLAGS_BSS_SELECTION 0x00040000
- #define WPA_DRIVER_FLAGS_TDLS_SUPPORT 0x00080000
- #define WPA_DRIVER_FLAGS_TDLS_EXTERNAL_SETUP 0x00100000
- #define WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD 0x00200000
- #define WPA_DRIVER_FLAGS_AP_UAPSD 0x00400000
- #define WPA_DRIVER_FLAGS_INACTIVITY_TIMER 0x00800000
- #define WPA_DRIVER_FLAGS_AP_MLME 0x01000000
- #define WPA_DRIVER_FLAGS_SAE 0x02000000
- #define WPA_DRIVER_FLAGS_OBSS_SCAN 0x04000000
- #define WPA_DRIVER_FLAGS_IBSS 0x08000000
- #define WPA_DRIVER_FLAGS_RADAR 0x10000000
- #define WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE 0x20000000
- unsigned int flags;
- int max_scan_ssids;
- int max_sched_scan_ssids;
- int sched_scan_supported;
- int max_match_sets;
-
- unsigned int max_remain_on_chan;
-
- unsigned int max_stations;
-
- #define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS 0x00000001
- #define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS2 0x00000002
- #define WPA_DRIVER_PROBE_RESP_OFFLOAD_P2P 0x00000004
- #define WPA_DRIVER_PROBE_RESP_OFFLOAD_INTERWORKING 0x00000008
- unsigned int probe_resp_offloads;
- unsigned int max_acl_mac_addrs;
-
- unsigned int num_multichan_concurrent;
-
- const u8 *extended_capa, *extended_capa_mask;
- unsigned int extended_capa_len;
- };
- struct hostapd_data;
- struct hostap_sta_driver_data {
- unsigned long rx_packets, tx_packets, rx_bytes, tx_bytes;
- unsigned long current_tx_rate;
- unsigned long inactive_msec;
- unsigned long flags;
- unsigned long num_ps_buf_frames;
- unsigned long tx_retry_failed;
- unsigned long tx_retry_count;
- int last_rssi;
- int last_ack_rssi;
- };
- struct hostapd_sta_add_params {
- const u8 *addr;
- u16 aid;
- u16 capability;
- const u8 *supp_rates;
- size_t supp_rates_len;
- u16 listen_interval;
- const struct ieee80211_ht_capabilities *ht_capabilities;
- const struct ieee80211_vht_capabilities *vht_capabilities;
- u32 flags;
- int set;
- u8 qosinfo;
- const u8 *ext_capab;
- size_t ext_capab_len;
- };
- struct hostapd_freq_params {
- int mode;
- int freq;
- int channel;
-
- int ht_enabled;
- int sec_channel_offset;
-
- int vht_enabled;
-
- int center_freq1, center_freq2;
- int bandwidth;
- };
- struct mac_address {
- u8 addr[ETH_ALEN];
- };
- struct hostapd_acl_params {
- u8 acl_policy;
- unsigned int num_mac_acl;
- struct mac_address mac_acl[0];
- };
- enum wpa_driver_if_type {
-
- WPA_IF_STATION,
-
- WPA_IF_AP_VLAN,
-
- WPA_IF_AP_BSS,
-
- WPA_IF_P2P_GO,
-
- WPA_IF_P2P_CLIENT,
-
- WPA_IF_P2P_GROUP,
-
- WPA_IF_P2P_DEVICE
- };
- struct wpa_init_params {
- void *global_priv;
- const u8 *bssid;
- const char *ifname;
- const u8 *ssid;
- size_t ssid_len;
- const char *test_socket;
- int use_pae_group_addr;
- char **bridge;
- size_t num_bridge;
- u8 *own_addr;
- };
- struct wpa_bss_params {
-
- const char *ifname;
-
- int enabled;
- int wpa;
- int ieee802_1x;
- int wpa_group;
- int wpa_pairwise;
- int wpa_key_mgmt;
- int rsn_preauth;
- enum mfp_options ieee80211w;
- };
- #define WPA_STA_AUTHORIZED BIT(0)
- #define WPA_STA_WMM BIT(1)
- #define WPA_STA_SHORT_PREAMBLE BIT(2)
- #define WPA_STA_MFP BIT(3)
- #define WPA_STA_TDLS_PEER BIT(4)
- struct p2p_params {
- const char *dev_name;
- u8 pri_dev_type[8];
- #define DRV_MAX_SEC_DEV_TYPES 5
- u8 sec_dev_type[DRV_MAX_SEC_DEV_TYPES][8];
- size_t num_sec_dev_types;
- };
- enum tdls_oper {
- TDLS_DISCOVERY_REQ,
- TDLS_SETUP,
- TDLS_TEARDOWN,
- TDLS_ENABLE_LINK,
- TDLS_DISABLE_LINK,
- TDLS_ENABLE,
- TDLS_DISABLE
- };
- enum wnm_oper {
- WNM_SLEEP_ENTER_CONFIRM,
- WNM_SLEEP_ENTER_FAIL,
- WNM_SLEEP_EXIT_CONFIRM,
- WNM_SLEEP_EXIT_FAIL,
- WNM_SLEEP_TFS_REQ_IE_ADD,
- WNM_SLEEP_TFS_REQ_IE_NONE,
- WNM_SLEEP_TFS_REQ_IE_SET,
- WNM_SLEEP_TFS_RESP_IE_ADD,
- WNM_SLEEP_TFS_RESP_IE_NONE,
- WNM_SLEEP_TFS_RESP_IE_SET,
- WNM_SLEEP_TFS_IE_DEL
- };
- enum chan_width {
- CHAN_WIDTH_20_NOHT,
- CHAN_WIDTH_20,
- CHAN_WIDTH_40,
- CHAN_WIDTH_80,
- CHAN_WIDTH_80P80,
- CHAN_WIDTH_160,
- CHAN_WIDTH_UNKNOWN
- };
- struct wpa_signal_info {
- u32 frequency;
- int above_threshold;
- int current_signal;
- int avg_signal;
- int current_noise;
- int current_txrate;
- enum chan_width chanwidth;
- int center_frq1;
- int center_frq2;
- };
- struct beacon_data {
- u8 *head, *tail;
- u8 *beacon_ies;
- u8 *proberesp_ies;
- u8 *assocresp_ies;
- u8 *probe_resp;
- size_t head_len, tail_len;
- size_t beacon_ies_len;
- size_t proberesp_ies_len;
- size_t assocresp_ies_len;
- size_t probe_resp_len;
- };
- struct csa_settings {
- u8 cs_count;
- u8 block_tx;
- struct hostapd_freq_params freq_params;
- struct beacon_data beacon_csa;
- struct beacon_data beacon_after;
- u16 counter_offset_beacon;
- u16 counter_offset_presp;
- };
- struct wpa_driver_ops {
-
- const char *name;
-
- const char *desc;
-
- int (*get_bssid)(void *priv, u8 *bssid);
-
- int (*get_ssid)(void *priv, u8 *ssid);
-
- int (*set_key)(const char *ifname, void *priv, enum wpa_alg alg,
- const u8 *addr, int key_idx, int set_tx,
- const u8 *seq, size_t seq_len,
- const u8 *key, size_t key_len);
-
- void * (*init)(void *ctx, const char *ifname);
-
- void (*deinit)(void *priv);
-
- int (*set_param)(void *priv, const char *param);
-
- int (*set_countermeasures)(void *priv, int enabled);
-
- int (*deauthenticate)(void *priv, const u8 *addr, int reason_code);
-
- int (*associate)(void *priv,
- struct wpa_driver_associate_params *params);
-
- int (*add_pmkid)(void *priv, const u8 *bssid, const u8 *pmkid);
-
- int (*remove_pmkid)(void *priv, const u8 *bssid, const u8 *pmkid);
-
- int (*flush_pmkid)(void *priv);
-
- int (*get_capa)(void *priv, struct wpa_driver_capa *capa);
-
- void (*poll)(void *priv);
-
- const char * (*get_ifname)(void *priv);
-
- const u8 * (*get_mac_addr)(void *priv);
-
- int (*send_eapol)(void *priv, const u8 *dest, u16 proto,
- const u8 *data, size_t data_len);
-
- int (*set_operstate)(void *priv, int state);
-
- int (*mlme_setprotection)(void *priv, const u8 *addr, int protect_type,
- int key_type);
-
- struct hostapd_hw_modes * (*get_hw_feature_data)(void *priv,
- u16 *num_modes,
- u16 *flags);
-
- int (*send_mlme)(void *priv, const u8 *data, size_t data_len,
- int noack);
-
- int (*update_ft_ies)(void *priv, const u8 *md, const u8 *ies,
- size_t ies_len);
-
- int (*send_ft_action)(void *priv, u8 action, const u8 *target_ap,
- const u8 *ies, size_t ies_len);
-
- struct wpa_scan_results * (*get_scan_results2)(void *priv);
-
- int (*set_country)(void *priv, const char *alpha2);
-
- int (*get_country)(void *priv, char *alpha2);
-
- void * (*global_init)(void);
-
- void (*global_deinit)(void *priv);
-
- void * (*init2)(void *ctx, const char *ifname, void *global_priv);
-
- struct wpa_interface_info * (*get_interfaces)(void *global_priv);
-
- int (*scan2)(void *priv, struct wpa_driver_scan_params *params);
-
- int (*authenticate)(void *priv,
- struct wpa_driver_auth_params *params);
-
- int (*set_ap)(void *priv, struct wpa_driver_ap_params *params);
-
- int (*set_acl)(void *priv, struct hostapd_acl_params *params);
-
- void * (*hapd_init)(struct hostapd_data *hapd,
- struct wpa_init_params *params);
-
- void (*hapd_deinit)(void *priv);
-
- int (*set_ieee8021x)(void *priv, struct wpa_bss_params *params);
-
- int (*set_privacy)(void *priv, int enabled);
-
- int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr,
- int idx, u8 *seq);
-
- int (*flush)(void *priv);
-
- int (*set_generic_elem)(void *priv, const u8 *elem, size_t elem_len);
-
- int (*read_sta_data)(void *priv, struct hostap_sta_driver_data *data,
- const u8 *addr);
-
- int (*hapd_send_eapol)(void *priv, const u8 *addr, const u8 *data,
- size_t data_len, int encrypt,
- const u8 *own_addr, u32 flags);
-
- int (*sta_deauth)(void *priv, const u8 *own_addr, const u8 *addr,
- int reason);
-
- int (*sta_disassoc)(void *priv, const u8 *own_addr, const u8 *addr,
- int reason);
-
- int (*sta_remove)(void *priv, const u8 *addr);
-
- int (*hapd_get_ssid)(void *priv, u8 *buf, int len);
-
- int (*hapd_set_ssid)(void *priv, const u8 *buf, int len);
-
- int (*hapd_set_countermeasures)(void *priv, int enabled);
-
- int (*sta_add)(void *priv, struct hostapd_sta_add_params *params);
-
- int (*get_inact_sec)(void *priv, const u8 *addr);
-
- int (*sta_clear_stats)(void *priv, const u8 *addr);
-
- int (*set_freq)(void *priv, struct hostapd_freq_params *freq);
-
- int (*set_rts)(void *priv, int rts);
-
- int (*set_frag)(void *priv, int frag);
-
- int (*sta_set_flags)(void *priv, const u8 *addr,
- int total_flags, int flags_or, int flags_and);
-
- int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
- int cw_max, int burst_time);
-
- int (*if_add)(void *priv, enum wpa_driver_if_type type,
- const char *ifname, const u8 *addr, void *bss_ctx,
- void **drv_priv, char *force_ifname, u8 *if_addr,
- const char *bridge, int use_existing);
-
- int (*if_remove)(void *priv, enum wpa_driver_if_type type,
- const char *ifname);
-
- int (*set_sta_vlan)(void *priv, const u8 *addr, const char *ifname,
- int vlan_id);
-
- int (*commit)(void *priv);
-
- int (*send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto,
- const u8 *data, size_t data_len);
-
- int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted,
- u32 session_timeout);
-
- int (*set_radius_acl_expire)(void *priv, const u8 *mac);
-
- int (*set_ap_wps_ie)(void *priv, const struct wpabuf *beacon,
- const struct wpabuf *proberesp,
- const struct wpabuf *assocresp);
-
- int (*set_supp_port)(void *priv, int authorized);
-
- int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val,
- const char *bridge_ifname, char *ifname_wds);
-
- int (*send_action)(void *priv, unsigned int freq, unsigned int wait,
- const u8 *dst, const u8 *src, const u8 *bssid,
- const u8 *data, size_t data_len, int no_cck);
-
- void (*send_action_cancel_wait)(void *priv);
-
- int (*remain_on_channel)(void *priv, unsigned int freq,
- unsigned int duration);
-
- int (*cancel_remain_on_channel)(void *priv);
-
- int (*probe_req_report)(void *priv, int report);
-
- int (*deinit_ap)(void *priv);
-
- int (*deinit_p2p_cli)(void *priv);
-
- void (*suspend)(void *priv);
-
- void (*resume)(void *priv);
-
- int (*signal_monitor)(void *priv, int threshold, int hysteresis);
-
- int (*send_frame)(void *priv, const u8 *data, size_t data_len,
- int encrypt);
-
- int (*shared_freq)(void *priv);
-
- int (*get_noa)(void *priv, u8 *buf, size_t buf_len);
-
- int (*set_noa)(void *priv, u8 count, int start, int duration);
-
- int (*set_p2p_powersave)(void *priv, int legacy_ps, int opp_ps,
- int ctwindow);
-
- int (*ampdu)(void *priv, int ampdu);
-
- const char * (*get_radio_name)(void *priv);
-
- int (*p2p_find)(void *priv, unsigned int timeout, int type);
-
- int (*p2p_stop_find)(void *priv);
-
- int (*p2p_listen)(void *priv, unsigned int timeout);
-
- int (*p2p_connect)(void *priv, const u8 *peer_addr, int wps_method,
- int go_intent, const u8 *own_interface_addr,
- unsigned int force_freq, int persistent_group);
-
- int (*wps_success_cb)(void *priv, const u8 *peer_addr);
-
- int (*p2p_group_formation_failed)(void *priv);
-
- int (*p2p_set_params)(void *priv, const struct p2p_params *params);
-
- int (*p2p_prov_disc_req)(void *priv, const u8 *peer_addr,
- u16 config_methods, int join);
-
- u64 (*p2p_sd_request)(void *priv, const u8 *dst,
- const struct wpabuf *tlvs);
-
- int (*p2p_sd_cancel_request)(void *priv, u64 req);
-
- int (*p2p_sd_response)(void *priv, int freq, const u8 *dst,
- u8 dialog_token,
- const struct wpabuf *resp_tlvs);
-
- int (*p2p_service_update)(void *priv);
-
- int (*p2p_reject)(void *priv, const u8 *addr);
-
- int (*p2p_invite)(void *priv, const u8 *peer, int role,
- const u8 *bssid, const u8 *ssid, size_t ssid_len,
- const u8 *go_dev_addr, int persistent_group);
-
- int (*send_tdls_mgmt)(void *priv, const u8 *dst, u8 action_code,
- u8 dialog_token, u16 status_code,
- const u8 *buf, size_t len);
-
- int (*tdls_oper)(void *priv, enum tdls_oper oper, const u8 *peer);
-
- int (*wnm_oper)(void *priv, enum wnm_oper oper, const u8 *peer,
- u8 *buf, u16 *buf_len);
-
- int (*set_qos_map)(void *priv, const u8 *qos_map_set,
- u8 qos_map_set_len);
-
- int (*signal_poll)(void *priv, struct wpa_signal_info *signal_info);
-
- int (*set_authmode)(void *priv, int authmode);
- #ifdef ANDROID
-
- int (*driver_cmd)(void *priv, char *cmd, char *buf, size_t buf_len);
- #endif
-
- void (*set_rekey_info)(void *priv, const u8 *kek, const u8 *kck,
- const u8 *replay_ctr);
-
- int (*sta_assoc)(void *priv, const u8 *own_addr, const u8 *addr,
- int reassoc, u16 status, const u8 *ie, size_t len);
-
- int (*sta_auth)(void *priv, const u8 *own_addr, const u8 *addr,
- u16 seq, u16 status, const u8 *ie, size_t len);
-
- int (*add_tspec)(void *priv, const u8 *addr, u8 *tspec_ie,
- size_t tspec_ielen);
-
- int (*add_sta_node)(void *priv, const u8 *addr, u16 auth_alg);
-
- int (*sched_scan)(void *priv, struct wpa_driver_scan_params *params,
- u32 interval);
-
- int (*stop_sched_scan)(void *priv);
-
- void (*poll_client)(void *priv, const u8 *own_addr,
- const u8 *addr, int qos);
-
- int (*radio_disable)(void *priv, int disabled);
-
- int (*switch_channel)(void *priv, struct csa_settings *settings);
-
- int (*start_dfs_cac)(void *priv, struct hostapd_freq_params *freq);
-
- int (*stop_ap)(void *priv);
-
- int (*get_survey)(void *priv, unsigned int freq);
-
- int (*status)(void *priv, char *buf, size_t buflen);
- };
- enum wpa_event_type {
-
- EVENT_ASSOC,
-
- EVENT_DISASSOC,
-
- EVENT_MICHAEL_MIC_FAILURE,
-
- EVENT_SCAN_RESULTS,
-
- EVENT_ASSOCINFO,
-
- EVENT_INTERFACE_STATUS,
-
- EVENT_PMKID_CANDIDATE,
-
- EVENT_STKSTART,
-
- EVENT_TDLS,
-
- EVENT_FT_RESPONSE,
-
- EVENT_IBSS_RSN_START,
-
- EVENT_AUTH,
-
- EVENT_DEAUTH,
-
- EVENT_ASSOC_REJECT,
-
- EVENT_AUTH_TIMED_OUT,
-
- EVENT_ASSOC_TIMED_OUT,
-
- EVENT_FT_RRB_RX,
-
- EVENT_WPS_BUTTON_PUSHED,
-
- EVENT_TX_STATUS,
-
- EVENT_RX_FROM_UNKNOWN,
-
- EVENT_RX_MGMT,
-
- EVENT_RX_ACTION,
-
- EVENT_REMAIN_ON_CHANNEL,
-
- EVENT_CANCEL_REMAIN_ON_CHANNEL,
-
- EVENT_MLME_RX,
-
- EVENT_RX_PROBE_REQ,
-
- EVENT_NEW_STA,
-
- EVENT_EAPOL_RX,
-
- EVENT_SIGNAL_CHANGE,
-
- EVENT_INTERFACE_ENABLED,
-
- EVENT_INTERFACE_DISABLED,
-
- EVENT_CHANNEL_LIST_CHANGED,
-
- EVENT_INTERFACE_UNAVAILABLE,
-
- EVENT_BEST_CHANNEL,
-
- EVENT_UNPROT_DEAUTH,
-
- EVENT_UNPROT_DISASSOC,
-
- EVENT_STATION_LOW_ACK,
-
- EVENT_P2P_DEV_FOUND,
-
- EVENT_P2P_GO_NEG_REQ_RX,
-
- EVENT_P2P_GO_NEG_COMPLETED,
- EVENT_P2P_PROV_DISC_REQUEST,
- EVENT_P2P_PROV_DISC_RESPONSE,
- EVENT_P2P_SD_REQUEST,
- EVENT_P2P_SD_RESPONSE,
-
- EVENT_IBSS_PEER_LOST,
-
- EVENT_DRIVER_GTK_REKEY,
-
- EVENT_SCHED_SCAN_STOPPED,
-
- EVENT_DRIVER_CLIENT_POLL_OK,
-
- EVENT_EAPOL_TX_STATUS,
-
- EVENT_CH_SWITCH,
-
- EVENT_WNM,
-
- EVENT_CONNECT_FAILED_REASON,
-
- EVENT_DFS_RADAR_DETECTED,
-
- EVENT_DFS_CAC_FINISHED,
-
- EVENT_DFS_CAC_ABORTED,
-
- EVENT_DFS_NOP_FINISHED,
-
- EVENT_SURVEY
- };
- struct freq_survey {
- u32 ifidx;
- unsigned int freq;
- s8 nf;
- u64 channel_time;
- u64 channel_time_busy;
- u64 channel_time_rx;
- u64 channel_time_tx;
- unsigned int filled;
- struct dl_list list;
- };
- #define SURVEY_HAS_NF BIT(0)
- #define SURVEY_HAS_CHAN_TIME BIT(1)
- #define SURVEY_HAS_CHAN_TIME_BUSY BIT(2)
- #define SURVEY_HAS_CHAN_TIME_RX BIT(3)
- #define SURVEY_HAS_CHAN_TIME_TX BIT(4)
- union wpa_event_data {
-
- struct assoc_info {
-
- int reassoc;
-
- const u8 *req_ies;
-
- size_t req_ies_len;
-
- const u8 *resp_ies;
-
- size_t resp_ies_len;
-
- const u8 *beacon_ies;
-
- size_t beacon_ies_len;
-
- unsigned int freq;
-
- const u8 *addr;
- } assoc_info;
-
- struct disassoc_info {
-
- const u8 *addr;
-
- u16 reason_code;
-
- const u8 *ie;
-
- size_t ie_len;
-
- int locally_generated;
- } disassoc_info;
-
- struct deauth_info {
-
- const u8 *addr;
-
- u16 reason_code;
-
- const u8 *ie;
-
- size_t ie_len;
-
- int locally_generated;
- } deauth_info;
-
- struct michael_mic_failure {
- int unicast;
- const u8 *src;
- } michael_mic_failure;
-
- struct interface_status {
- char ifname[100];
- enum {
- EVENT_INTERFACE_ADDED, EVENT_INTERFACE_REMOVED
- } ievent;
- } interface_status;
-
- struct pmkid_candidate {
-
- u8 bssid[ETH_ALEN];
-
- int index;
-
- int preauth;
- } pmkid_candidate;
-
- struct stkstart {
- u8 peer[ETH_ALEN];
- } stkstart;
-
- struct tdls {
- u8 peer[ETH_ALEN];
- enum {
- TDLS_REQUEST_SETUP,
- TDLS_REQUEST_TEARDOWN
- } oper;
- u16 reason_code;
- } tdls;
-
- struct wnm {
- u8 addr[ETH_ALEN];
- enum {
- WNM_OPER_SLEEP,
- } oper;
- enum {
- WNM_SLEEP_ENTER,
- WNM_SLEEP_EXIT
- } sleep_action;
- int sleep_intval;
- u16 reason_code;
- u8 *buf;
- u16 buf_len;
- } wnm;
-
- struct ft_ies {
- const u8 *ies;
- size_t ies_len;
- int ft_action;
- u8 target_ap[ETH_ALEN];
-
- const u8 *ric_ies;
-
- size_t ric_ies_len;
- } ft_ies;
-
- struct ibss_rsn_start {
- u8 peer[ETH_ALEN];
- } ibss_rsn_start;
-
- struct auth_info {
- u8 peer[ETH_ALEN];
- u8 bssid[ETH_ALEN];
- u16 auth_type;
- u16 auth_transaction;
- u16 status_code;
- const u8 *ies;
- size_t ies_len;
- } auth;
-
- struct assoc_reject {
-
- const u8 *bssid;
-
- const u8 *resp_ies;
-
- size_t resp_ies_len;
-
- u16 status_code;
- } assoc_reject;
- struct timeout_event {
- u8 addr[ETH_ALEN];
- } timeout_event;
-
- struct ft_rrb_rx {
- const u8 *src;
- const u8 *data;
- size_t data_len;
- } ft_rrb_rx;
-
- struct tx_status {
- u16 type;
- u16 stype;
- const u8 *dst;
- const u8 *data;
- size_t data_len;
- int ack;
- } tx_status;
-
- struct rx_from_unknown {
- const u8 *bssid;
- const u8 *addr;
- int wds;
- } rx_from_unknown;
-
- struct rx_mgmt {
- const u8 *frame;
- size_t frame_len;
- u32 datarate;
- int ssi_signal;
- } rx_mgmt;
-
- struct rx_action {
-
- const u8 *da;
-
- const u8 *sa;
-
- const u8 *bssid;
-
- u8 category;
-
- const u8 *data;
-
- size_t len;
-
- int freq;
- } rx_action;
-
- struct remain_on_channel {
-
- unsigned int freq;
-
- unsigned int duration;
- } remain_on_channel;
-
- struct scan_info {
- int aborted;
- const int *freqs;
- size_t num_freqs;
- struct wpa_driver_scan_ssid ssids[WPAS_MAX_SCAN_SSIDS];
- size_t num_ssids;
- } scan_info;
-
- struct mlme_rx {
- const u8 *buf;
- size_t len;
- int freq;
- int channel;
- int ssi;
- } mlme_rx;
-
- struct rx_probe_req {
-
- const u8 *sa;
-
- const u8 *da;
-
- const u8 *bssid;
-
- const u8 *ie;
-
- size_t ie_len;
-
- int ssi_signal;
- } rx_probe_req;
-
- struct new_sta {
- const u8 *addr;
- } new_sta;
-
- struct eapol_rx {
- const u8 *src;
- const u8 *data;
- size_t data_len;
- } eapol_rx;
-
- struct wpa_signal_info signal_change;
-
- struct best_channel {
- int freq_24;
- int freq_5;
- int freq_overall;
- } best_chan;
- struct unprot_deauth {
- const u8 *sa;
- const u8 *da;
- u16 reason_code;
- } unprot_deauth;
- struct unprot_disassoc {
- const u8 *sa;
- const u8 *da;
- u16 reason_code;
- } unprot_disassoc;
-
- struct low_ack {
- u8 addr[ETH_ALEN];
- } low_ack;
-
- struct p2p_dev_found {
- const u8 *addr;
- const u8 *dev_addr;
- const u8 *pri_dev_type;
- const char *dev_name;
- u16 config_methods;
- u8 dev_capab;
- u8 group_capab;
- } p2p_dev_found;
-
- struct p2p_go_neg_req_rx {
- const u8 *src;
- u16 dev_passwd_id;
- } p2p_go_neg_req_rx;
-
- struct p2p_go_neg_completed {
- struct p2p_go_neg_results *res;
- } p2p_go_neg_completed;
- struct p2p_prov_disc_req {
- const u8 *peer;
- u16 config_methods;
- const u8 *dev_addr;
- const u8 *pri_dev_type;
- const char *dev_name;
- u16 supp_config_methods;
- u8 dev_capab;
- u8 group_capab;
- } p2p_prov_disc_req;
- struct p2p_prov_disc_resp {
- const u8 *peer;
- u16 config_methods;
- } p2p_prov_disc_resp;
- struct p2p_sd_req {
- int freq;
- const u8 *sa;
- u8 dialog_token;
- u16 update_indic;
- const u8 *tlvs;
- size_t tlvs_len;
- } p2p_sd_req;
- struct p2p_sd_resp {
- const u8 *sa;
- u16 update_indic;
- const u8 *tlvs;
- size_t tlvs_len;
- } p2p_sd_resp;
-
- struct ibss_peer_lost {
- u8 peer[ETH_ALEN];
- } ibss_peer_lost;
-
- struct driver_gtk_rekey {
- const u8 *bssid;
- const u8 *replay_ctr;
- } driver_gtk_rekey;
-
- struct client_poll {
- u8 addr[ETH_ALEN];
- } client_poll;
-
- struct eapol_tx_status {
- const u8 *dst;
- const u8 *data;
- int data_len;
- int ack;
- } eapol_tx_status;
-
- struct ch_switch {
- int freq;
- int ht_enabled;
- int ch_offset;
- enum chan_width ch_width;
- int cf1;
- int cf2;
- } ch_switch;
-
- struct connect_failed_reason {
- u8 addr[ETH_ALEN];
- enum {
- MAX_CLIENT_REACHED,
- BLOCKED_CLIENT
- } code;
- } connect_failed_reason;
-
- struct dfs_event {
- int freq;
- int ht_enabled;
- int chan_offset;
- enum chan_width chan_width;
- int cf1;
- int cf2;
- } dfs_event;
-
- struct survey_results {
- unsigned int freq_filter;
- struct dl_list survey_list;
- } survey_results;
-
- struct channel_list_changed {
- enum reg_change_initiator initiator;
- } channel_list_changed;
- };
- void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
- union wpa_event_data *data);
- static inline void drv_event_assoc(void *ctx, const u8 *addr, const u8 *ie,
- size_t ielen, int reassoc)
- {
- union wpa_event_data event;
- os_memset(&event, 0, sizeof(event));
- event.assoc_info.reassoc = reassoc;
- event.assoc_info.req_ies = ie;
- event.assoc_info.req_ies_len = ielen;
- event.assoc_info.addr = addr;
- wpa_supplicant_event(ctx, EVENT_ASSOC, &event);
- }
- static inline void drv_event_disassoc(void *ctx, const u8 *addr)
- {
- union wpa_event_data event;
- os_memset(&event, 0, sizeof(event));
- event.disassoc_info.addr = addr;
- wpa_supplicant_event(ctx, EVENT_DISASSOC, &event);
- }
- static inline void drv_event_eapol_rx(void *ctx, const u8 *src, const u8 *data,
- size_t data_len)
- {
- union wpa_event_data event;
- os_memset(&event, 0, sizeof(event));
- event.eapol_rx.src = src;
- event.eapol_rx.data = data;
- event.eapol_rx.data_len = data_len;
- wpa_supplicant_event(ctx, EVENT_EAPOL_RX, &event);
- }
- void wpa_scan_results_free(struct wpa_scan_results *res);
- const char * event_to_string(enum wpa_event_type event);
- #endif
|