1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176 |
- #ifndef DRIVER_H
- #define DRIVER_H
- #define WPA_SUPPLICANT_DRIVER_VERSION 4
- #include "common/defs.h"
- #include "common/ieee802_11_defs.h"
- #ifdef CONFIG_MACSEC
- #include "pae/ieee802_1x_kay.h"
- #endif
- #include "utils/list.h"
- #define HOSTAPD_CHAN_DISABLED 0x00000001
- #define HOSTAPD_CHAN_NO_IR 0x00000002
- #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
- #define HOSTAPD_CHAN_INDOOR_ONLY 0x00010000
- #define HOSTAPD_CHAN_GO_CONCURRENT 0x00020000
- #define HOSTAPD_CHAN_VHT_10_150 0x00100000
- #define HOSTAPD_CHAN_VHT_30_130 0x00200000
- #define HOSTAPD_CHAN_VHT_50_110 0x00400000
- #define HOSTAPD_CHAN_VHT_70_90 0x00800000
- #define HOSTAPD_CHAN_VHT_90_70 0x01000000
- #define HOSTAPD_CHAN_VHT_110_50 0x02000000
- #define HOSTAPD_CHAN_VHT_130_30 0x04000000
- #define HOSTAPD_CHAN_VHT_150_10 0x08000000
- #define WPA_DATA_FRAME_FILTER_FLAG_ARP BIT(0)
- #define WPA_DATA_FRAME_FILTER_FLAG_NA BIT(1)
- #define WPA_DATA_FRAME_FILTER_FLAG_GTK BIT(2)
- enum reg_change_initiator {
- REGDOM_SET_BY_CORE,
- REGDOM_SET_BY_USER,
- REGDOM_SET_BY_DRIVER,
- REGDOM_SET_BY_COUNTRY_IE,
- REGDOM_BEACON_HINT,
- };
- enum reg_type {
- REGDOM_TYPE_UNKNOWN,
- REGDOM_TYPE_COUNTRY,
- REGDOM_TYPE_WORLD,
- REGDOM_TYPE_CUSTOM_WORLD,
- REGDOM_TYPE_INTERSECTION,
- };
- 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
-
- unsigned int dfs_cac_ms;
- };
- #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_MODE_MESH 5
- #define IEEE80211_CAP_ESS 0x0001
- #define IEEE80211_CAP_IBSS 0x0002
- #define IEEE80211_CAP_PRIVACY 0x0010
- #define IEEE80211_CAP_RRM 0x1000
- #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_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;
- unsigned int est_throughput;
- int snr;
- u64 parent_tsf;
- u8 tsf_bssid[ETH_ALEN];
- size_t ie_len;
- size_t beacon_ie_len;
-
- };
- struct wpa_scan_results {
- struct wpa_scan_res **res;
- size_t num;
- struct os_reltime 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_ssid {
- const u8 *ssid;
- size_t ssid_len;
- };
- struct wpa_driver_scan_params {
-
- struct wpa_driver_scan_ssid 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[SSID_MAX_LEN];
- size_t ssid_len;
- } *filter_ssids;
-
- size_t num_filter_ssids;
-
- s32 filter_rssi;
-
- unsigned int p2p_probe:1;
-
- unsigned int only_new_results:1;
-
- unsigned int low_priority:1;
-
- unsigned int mac_addr_rand:1;
-
- const u8 *mac_addr;
-
- const u8 *mac_addr_mask;
-
- struct sched_scan_plan {
- u32 interval;
- u32 iterations;
- } *sched_scan_plans;
-
- unsigned int sched_scan_plans_num;
-
- const u8 *bssid;
-
- u64 scan_cookie;
-
- u16 duration;
-
- unsigned int duration_mandatory:1;
-
- unsigned int relative_rssi_set:1;
-
- s8 relative_rssi;
-
- enum set_band relative_adjust_band;
-
- s8 relative_adjust_rssi;
-
- };
- 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 *auth_data;
-
- size_t auth_data_len;
- };
- enum wps_mode {
-
- WPS_MODE_NONE,
-
- WPS_MODE_OPEN,
-
- WPS_MODE_PRIVACY
- };
- struct hostapd_freq_params {
-
- enum hostapd_hw_mode mode;
-
- int freq;
-
- int channel;
-
- int ht_enabled;
-
- int sec_channel_offset;
-
- int vht_enabled;
-
- int center_freq1;
-
- int center_freq2;
-
- int bandwidth;
- };
- struct wpa_driver_associate_params {
-
- const u8 *bssid;
-
- const u8 *bssid_hint;
-
- const u8 *ssid;
-
- size_t ssid_len;
-
- struct hostapd_freq_params freq;
-
- int freq_hint;
-
- int bg_scan_period;
-
- int beacon_int;
-
- const u8 *wpa_ie;
-
- size_t wpa_ie_len;
-
- unsigned int wpa_proto;
-
- unsigned int pairwise_suite;
-
- unsigned int group_suite;
-
- unsigned int 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 fixed_freq;
-
- 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
-
- int req_key_mgmt_offload;
-
- int rrm_used;
-
- int pbss;
-
- const u8 *fils_kek;
-
- size_t fils_kek_len;
-
- const u8 *fils_nonces;
-
- size_t fils_nonces_len;
- };
- enum hide_ssid {
- NO_SSID_HIDING,
- HIDDEN_SSID_ZERO_LEN,
- HIDDEN_SSID_ZERO_CONTENTS
- };
- struct wowlan_triggers {
- u8 any;
- u8 disconnect;
- u8 magic_pkt;
- u8 gtk_rekey_failure;
- u8 eap_identity_req;
- u8 four_way_handshake;
- u8 rfkill_release;
- };
- 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;
-
- unsigned int beacon_rate;
-
- enum beacon_rate_type rate_type;
-
- 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;
-
- u8 p2p_go_ctwindow;
-
- unsigned int smps_mode;
-
- int disable_dgaf;
-
- int osen;
-
- struct hostapd_freq_params *freq;
-
- int reenable;
-
- int pbss;
-
- int multicast_to_unicast;
- };
- struct wpa_driver_mesh_bss_params {
- #define WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS 0x00000001
- #define WPA_DRIVER_MESH_CONF_FLAG_PEER_LINK_TIMEOUT 0x00000002
- #define WPA_DRIVER_MESH_CONF_FLAG_MAX_PEER_LINKS 0x00000004
- #define WPA_DRIVER_MESH_CONF_FLAG_HT_OP_MODE 0x00000008
-
- unsigned int flags;
- int auto_plinks;
- int peer_link_timeout;
- int max_peer_links;
- u16 ht_opmode;
- };
- struct wpa_driver_mesh_join_params {
- const u8 *meshid;
- int meshid_len;
- const int *basic_rates;
- const u8 *ies;
- int ie_len;
- struct hostapd_freq_params freq;
- int beacon_int;
- int dtim_period;
- struct wpa_driver_mesh_bss_params conf;
- #define WPA_DRIVER_MESH_FLAG_USER_MPM 0x00000001
- #define WPA_DRIVER_MESH_FLAG_DRIVER_MPM 0x00000002
- #define WPA_DRIVER_MESH_FLAG_SAE_AUTH 0x00000004
- #define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008
- unsigned int flags;
- };
- 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
- #define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B 0x00000100
- #define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B_192 0x00000200
-
- 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
- #define WPA_DRIVER_CAPA_ENC_GCMP_256 0x00000040
- #define WPA_DRIVER_CAPA_ENC_CCMP_256 0x00000080
- #define WPA_DRIVER_CAPA_ENC_BIP 0x00000100
- #define WPA_DRIVER_CAPA_ENC_BIP_GMAC_128 0x00000200
- #define WPA_DRIVER_CAPA_ENC_BIP_GMAC_256 0x00000400
- #define WPA_DRIVER_CAPA_ENC_BIP_CMAC_256 0x00000800
- #define WPA_DRIVER_CAPA_ENC_GTK_NOT_USED 0x00001000
-
- 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_DFS_OFFLOAD 0x00000004
- #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_HT_2040_COEX 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_AP_TEARDOWN_SUPPORT 0x00001000
- #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
- #define WPA_DRIVER_FLAGS_QOS_MAPPING 0x40000000
- #define WPA_DRIVER_FLAGS_AP_CSA 0x80000000
- #define WPA_DRIVER_FLAGS_MESH 0x0000000100000000ULL
- #define WPA_DRIVER_FLAGS_ACS_OFFLOAD 0x0000000200000000ULL
- #define WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD 0x0000000400000000ULL
- #define WPA_DRIVER_FLAGS_TDLS_CHANNEL_SWITCH 0x0000000800000000ULL
- #define WPA_DRIVER_FLAGS_HT_IBSS 0x0000001000000000ULL
- #define WPA_DRIVER_FLAGS_VHT_IBSS 0x0000002000000000ULL
- #define WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY 0x0000004000000000ULL
- #define WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS 0x0000008000000000ULL
- #define WPA_DRIVER_FLAGS_FULL_AP_CLIENT_STATE 0x0000010000000000ULL
- #define WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD 0x0000020000000000ULL
- #define WPA_DRIVER_FLAGS_SUPPORT_FILS 0x0000040000000000ULL
- #define WPA_DRIVER_FLAGS_BEACON_RATE_LEGACY 0x0000080000000000ULL
- #define WPA_DRIVER_FLAGS_BEACON_RATE_HT 0x0000100000000000ULL
- #define WPA_DRIVER_FLAGS_BEACON_RATE_VHT 0x0000200000000000ULL
- #define WPA_DRIVER_FLAGS_MGMT_TX_RANDOM_TA 0x0000400000000000ULL
- #define WPA_DRIVER_FLAGS_MGMT_TX_RANDOM_TA_CONNECTED 0x0000800000000000ULL
- #define WPA_DRIVER_FLAGS_SCHED_SCAN_RELATIVE_RSSI 0x0001000000000000ULL
- u64 flags;
- #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
- (drv_flags & WPA_DRIVER_FLAGS_FULL_AP_CLIENT_STATE)
- #define WPA_DRIVER_SMPS_MODE_STATIC 0x00000001
- #define WPA_DRIVER_SMPS_MODE_DYNAMIC 0x00000002
- unsigned int smps_modes;
- unsigned int wmm_ac_supported:1;
- unsigned int mac_addr_rand_scan_supported:1;
- unsigned int mac_addr_rand_sched_scan_supported:1;
-
- int max_scan_ssids;
-
- int max_sched_scan_ssids;
-
- unsigned int max_sched_scan_plans;
-
- u32 max_sched_scan_plan_interval;
-
- u32 max_sched_scan_plan_iterations;
-
- 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 wowlan_triggers wowlan_triggers;
- #define WPA_DRIVER_FLAGS_DS_PARAM_SET_IE_IN_PROBES 0x00000001
- #define WPA_DRIVER_FLAGS_WFA_TPC_IE_IN_PROBES 0x00000002
- #define WPA_DRIVER_FLAGS_QUIET 0x00000004
- #define WPA_DRIVER_FLAGS_TX_POWER_INSERTION 0x00000008
- #define WPA_DRIVER_FLAGS_SUPPORT_RRM 0x00000010
- #define WPA_DRIVER_FLAGS_SUPPORT_SET_SCAN_DWELL 0x00000020
- #define WPA_DRIVER_FLAGS_SUPPORT_BEACON_REPORT 0x00000040
- u32 rrm_flags;
-
- unsigned int conc_capab;
-
- unsigned int max_conc_chan_2_4;
-
- unsigned int max_conc_chan_5_0;
-
- u16 max_csa_counters;
- };
- struct hostapd_data;
- struct hostap_sta_driver_data {
- unsigned long rx_packets, tx_packets;
- unsigned long long rx_bytes, tx_bytes;
- int bytes_64bit;
- 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;
- int vht_opmode_enabled;
- u8 vht_opmode;
- u32 flags;
- u32 flags_mask;
- #ifdef CONFIG_MESH
- enum mesh_plink_state plink_state;
- u16 peer_aid;
- #endif
- int set;
- u8 qosinfo;
- const u8 *ext_capab;
- size_t ext_capab_len;
- const u8 *supp_channels;
- size_t supp_channels_len;
- const u8 *supp_oper_classes;
- size_t supp_oper_classes_len;
- int support_p2p_ps;
- };
- 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,
-
- WPA_IF_MESH,
-
- WPA_IF_TDLS,
-
- WPA_IF_IBSS,
- };
- struct wpa_init_params {
- void *global_priv;
- const u8 *bssid;
- const char *ifname;
- const char *driver_params;
- 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)
- #define WPA_STA_AUTHENTICATED BIT(5)
- #define WPA_STA_ASSOCIATED BIT(6)
- 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 avg_beacon_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[2];
- u16 counter_offset_presp[2];
- };
- enum tdls_peer_capability {
- TDLS_PEER_HT = BIT(0),
- TDLS_PEER_VHT = BIT(1),
- TDLS_PEER_WMM = BIT(2),
- };
- enum wmm_params_valid_info {
- WMM_PARAMS_UAPSD_QUEUES_INFO = BIT(0),
- };
- struct wmm_params {
- u8 info_bitmap;
- u8 uapsd_queues;
- };
- #ifdef CONFIG_MACSEC
- struct macsec_init_params {
- Boolean always_include_sci;
- Boolean use_es;
- Boolean use_scb;
- };
- #endif
- enum drv_br_port_attr {
- DRV_BR_PORT_ATTR_PROXYARP,
- DRV_BR_PORT_ATTR_HAIRPIN_MODE,
- };
- enum drv_br_net_param {
- DRV_BR_NET_PARAM_GARP_ACCEPT,
- DRV_BR_MULTICAST_SNOOPING,
- };
- struct drv_acs_params {
-
- enum hostapd_hw_mode hw_mode;
-
- int ht_enabled;
-
- int ht40_enabled;
-
- int vht_enabled;
-
- u16 ch_width;
-
- unsigned int ch_list_len;
- const u8 *ch_list;
- const int *freq_list;
- };
- 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);
-
- unsigned int (*get_ifindex)(void *priv);
-
- const char * (*get_ifname)(void *priv);
-
- const u8 * (*get_mac_addr)(void *priv);
-
- 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, unsigned int freq, const u16 *csa_offs,
- size_t csa_offs_len);
-
- int (*update_ft_ies)(void *priv, const u8 *md, 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 *ctx);
-
- 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,
- unsigned int total_flags, unsigned int flags_or,
- unsigned 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 setup_ap);
-
- 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 (*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 (*send_tdls_mgmt)(void *priv, const u8 *dst, u8 action_code,
- u8 dialog_token, u16 status_code, u32 peer_capab,
- int initiator, 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 (*br_add_ip_neigh)(void *priv, u8 version, const u8 *ipaddr,
- int prefixlen, const u8 *addr);
-
- int (*br_delete_ip_neigh)(void *priv, u8 version, const u8 *ipaddr);
-
- int (*br_port_set_attr)(void *priv, enum drv_br_port_attr attr,
- unsigned int val);
-
- int (*br_set_net_param)(void *priv, enum drv_br_net_param param,
- unsigned int val);
-
- int (*set_wowlan)(void *priv, const struct wowlan_triggers *triggers);
-
- 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
-
- int (*vendor_cmd)(void *priv, unsigned int vendor_id,
- unsigned int subcmd, const u8 *data, size_t data_len,
- struct wpabuf *buf);
-
- void (*set_rekey_info)(void *priv, const u8 *kek, size_t kek_len,
- const u8 *kck, size_t kck_len,
- 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);
-
- 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 (*add_tx_ts)(void *priv, u8 tsid, const u8 *addr, u8 user_prio,
- u16 admitted_time);
-
- int (*del_tx_ts)(void *priv, u8 tsid, const u8 *addr);
-
- int (*tdls_enable_channel_switch)(
- void *priv, const u8 *addr, u8 oper_class,
- const struct hostapd_freq_params *params);
-
- int (*tdls_disable_channel_switch)(void *priv, const u8 *addr);
-
- 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);
-
- int (*roaming)(void *priv, int allowed, const u8 *bssid);
-
- int (*set_mac_addr)(void *priv, const u8 *addr);
- #ifdef CONFIG_MACSEC
- int (*macsec_init)(void *priv, struct macsec_init_params *params);
- int (*macsec_deinit)(void *priv);
-
- int (*macsec_get_capability)(void *priv, enum macsec_cap *cap);
-
- int (*enable_protect_frames)(void *priv, Boolean enabled);
-
- int (*enable_encrypt)(void *priv, Boolean enabled);
-
- int (*set_replay_protect)(void *priv, Boolean enabled, u32 window);
-
- int (*set_current_cipher_suite)(void *priv, u64 cs);
-
- int (*enable_controlled_port)(void *priv, Boolean enabled);
-
- int (*get_receive_lowest_pn)(void *priv, struct receive_sa *sa);
-
- int (*get_transmit_next_pn)(void *priv, struct transmit_sa *sa);
-
- int (*set_transmit_next_pn)(void *priv, struct transmit_sa *sa);
-
- int (*create_receive_sc)(void *priv, struct receive_sc *sc,
- unsigned int conf_offset,
- int validation);
-
- int (*delete_receive_sc)(void *priv, struct receive_sc *sc);
-
- int (*create_receive_sa)(void *priv, struct receive_sa *sa);
-
- int (*delete_receive_sa)(void *priv, struct receive_sa *sa);
-
- int (*enable_receive_sa)(void *priv, struct receive_sa *sa);
-
- int (*disable_receive_sa)(void *priv, struct receive_sa *sa);
-
- int (*create_transmit_sc)(void *priv, struct transmit_sc *sc,
- unsigned int conf_offset);
-
- int (*delete_transmit_sc)(void *priv, struct transmit_sc *sc);
-
- int (*create_transmit_sa)(void *priv, struct transmit_sa *sa);
-
- int (*delete_transmit_sa)(void *priv, struct transmit_sa *sa);
-
- int (*enable_transmit_sa)(void *priv, struct transmit_sa *sa);
-
- int (*disable_transmit_sa)(void *priv, struct transmit_sa *sa);
- #endif
-
- int (*init_mesh)(void *priv);
-
- int (*join_mesh)(void *priv,
- struct wpa_driver_mesh_join_params *params);
-
- int (*leave_mesh)(void *priv);
-
- int (*do_acs)(void *priv, struct drv_acs_params *params);
-
- int (*set_band)(void *priv, enum set_band band);
-
- int (*get_pref_freq_list)(void *priv, enum wpa_driver_if_type if_type,
- unsigned int *num, unsigned int *freq_list);
-
- int (*set_prob_oper_freq)(void *priv, unsigned int freq);
-
- int (*abort_scan)(void *priv, u64 scan_cookie);
-
- int (*configure_data_frame_filters)(void *priv, u32 filter_flags);
-
- int (*get_ext_capab)(void *priv, enum wpa_driver_if_type type,
- const u8 **ext_capab, const u8 **ext_capab_mask,
- unsigned int *ext_capab_len);
-
- int (*p2p_lo_start)(void *priv, unsigned int freq,
- unsigned int period, unsigned int interval,
- unsigned int count,
- const u8 *device_types, size_t dev_types_len,
- const u8 *ies, size_t ies_len);
-
- int (*p2p_lo_stop)(void *priv);
-
- int (*set_default_scan_ies)(void *priv, const u8 *ies, size_t ies_len);
-
- int (*set_tdls_mode)(void *priv, int tdls_external_control);
- };
- 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_WPS_BUTTON_PUSHED,
-
- EVENT_TX_STATUS,
-
- EVENT_RX_FROM_UNKNOWN,
-
- EVENT_RX_MGMT,
-
- EVENT_REMAIN_ON_CHANNEL,
-
- EVENT_CANCEL_REMAIN_ON_CHANNEL,
-
- 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_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,
-
- EVENT_SCAN_STARTED,
-
- EVENT_AVOID_FREQUENCIES,
-
- EVENT_NEW_PEER_CANDIDATE,
-
- EVENT_ACS_CHANNEL_SELECTED,
-
- EVENT_DFS_CAC_STARTED,
-
- EVENT_P2P_LO_STOP,
-
- EVENT_BEACON_LOSS,
- };
- 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 *resp_frame;
-
- size_t resp_frame_len;
-
- const u8 *beacon_ies;
-
- size_t beacon_ies_len;
-
- unsigned int freq;
-
- struct wmm_params wmm_params;
-
- const u8 *addr;
-
-
- int authorized;
-
- const u8 *key_replay_ctr;
-
- size_t key_replay_ctr_len;
-
- const u8 *ptk_kck;
-
- size_t ptk_kck_len;
-
- const u8 *ptk_kek;
-
- size_t ptk_kek_len;
-
- u8 subnet_status;
- } 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 {
- unsigned int ifindex;
- 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,
- TDLS_REQUEST_DISCOVER,
- } 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;
-
- int timed_out;
- } assoc_reject;
- struct timeout_event {
- u8 addr[ETH_ALEN];
- } timeout_event;
-
- 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;
-
- void *drv_priv;
-
- int freq;
-
- int ssi_signal;
- } rx_mgmt;
-
- 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;
- int external_scan;
- int nl_scan_event;
- u64 scan_start_tsf;
- u8 scan_start_tsf_bssid[ETH_ALEN];
- } scan_info;
-
- 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];
- u32 num_packets;
- } low_ack;
-
- 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;
- enum reg_type type;
- char alpha2[3];
- } channel_list_changed;
-
- struct wpa_freq_range_list freq_range;
-
- struct mesh_peer {
- const u8 *peer;
- const u8 *ies;
- size_t ie_len;
- } mesh_peer;
-
- struct acs_selected_channels {
- u8 pri_channel;
- u8 sec_channel;
- u8 vht_seg0_center_ch;
- u8 vht_seg1_center_ch;
- u16 ch_width;
- enum hostapd_hw_mode hw_mode;
- } acs_selected_channels;
-
- struct p2p_lo_stop {
- enum {
- P2P_LO_STOPPED_REASON_COMPLETE = 0,
- P2P_LO_STOPPED_REASON_RECV_STOP_CMD,
- P2P_LO_STOPPED_REASON_INVALID_PARAM,
- P2P_LO_STOPPED_REASON_NOT_SUPPORTED,
- } reason_code;
- } p2p_lo_stop;
- };
- void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
- union wpa_event_data *data);
- void wpa_supplicant_event_global(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);
- const char * channel_width_to_string(enum chan_width width);
- int ht_supported(const struct hostapd_hw_modes *mode);
- int vht_supported(const struct hostapd_hw_modes *mode);
- struct wowlan_triggers *
- wpa_get_wowlan_triggers(const char *wowlan_triggers,
- const struct wpa_driver_capa *capa);
- const char * driver_flag_to_string(u64 flag);
- extern const struct wpa_driver_ops *const wpa_drivers[];
- #ifdef CONFIG_DRIVER_WEXT
- extern const struct wpa_driver_ops wpa_driver_wext_ops;
- #endif
- #ifdef CONFIG_DRIVER_NL80211
- extern const struct wpa_driver_ops wpa_driver_nl80211_ops;
- #endif
- #ifdef CONFIG_DRIVER_HOSTAP
- extern const struct wpa_driver_ops wpa_driver_hostap_ops;
- #endif
- #ifdef CONFIG_DRIVER_BSD
- extern const struct wpa_driver_ops wpa_driver_bsd_ops;
- #endif
- #ifdef CONFIG_DRIVER_OPENBSD
- extern const struct wpa_driver_ops wpa_driver_openbsd_ops;
- #endif
- #ifdef CONFIG_DRIVER_NDIS
- extern struct wpa_driver_ops wpa_driver_ndis_ops;
- #endif
- #ifdef CONFIG_DRIVER_WIRED
- extern const struct wpa_driver_ops wpa_driver_wired_ops;
- #endif
- #ifdef CONFIG_DRIVER_MACSEC_QCA
- extern const struct wpa_driver_ops wpa_driver_macsec_qca_ops;
- #endif
- #ifdef CONFIG_DRIVER_MACSEC_LINUX
- extern const struct wpa_driver_ops wpa_driver_macsec_linux_ops;
- #endif
- #ifdef CONFIG_DRIVER_ROBOSWITCH
- extern const struct wpa_driver_ops wpa_driver_roboswitch_ops;
- #endif
- #ifdef CONFIG_DRIVER_ATHEROS
- extern const struct wpa_driver_ops wpa_driver_atheros_ops;
- #endif
- #ifdef CONFIG_DRIVER_NONE
- extern const struct wpa_driver_ops wpa_driver_none_ops;
- #endif
- #endif
|