12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834 |
- struct wiphy;
- enum ieee80211_channel_flags {
- IEEE80211_CHAN_DISABLED = 1<<0,
- IEEE80211_CHAN_NO_IR = 1<<1,
-
- IEEE80211_CHAN_RADAR = 1<<3,
- IEEE80211_CHAN_NO_HT40PLUS = 1<<4,
- IEEE80211_CHAN_NO_HT40MINUS = 1<<5,
- IEEE80211_CHAN_NO_OFDM = 1<<6,
- IEEE80211_CHAN_NO_80MHZ = 1<<7,
- IEEE80211_CHAN_NO_160MHZ = 1<<8,
- IEEE80211_CHAN_INDOOR_ONLY = 1<<9,
- IEEE80211_CHAN_IR_CONCURRENT = 1<<10,
- IEEE80211_CHAN_NO_20MHZ = 1<<11,
- IEEE80211_CHAN_NO_10MHZ = 1<<12,
- };
- (IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS)
- struct ieee80211_channel {
- enum nl80211_band band;
- u16 center_freq;
- u16 hw_value;
- u32 flags;
- int max_antenna_gain;
- int max_power;
- int max_reg_power;
- bool beacon_found;
- u32 orig_flags;
- int orig_mag, orig_mpwr;
- enum nl80211_dfs_state dfs_state;
- unsigned long dfs_state_entered;
- unsigned int dfs_cac_ms;
- };
- enum ieee80211_rate_flags {
- IEEE80211_RATE_SHORT_PREAMBLE = 1<<0,
- IEEE80211_RATE_MANDATORY_A = 1<<1,
- IEEE80211_RATE_MANDATORY_B = 1<<2,
- IEEE80211_RATE_MANDATORY_G = 1<<3,
- IEEE80211_RATE_ERP_G = 1<<4,
- IEEE80211_RATE_SUPPORTS_5MHZ = 1<<5,
- IEEE80211_RATE_SUPPORTS_10MHZ = 1<<6,
- };
- enum ieee80211_bss_type {
- IEEE80211_BSS_TYPE_ESS,
- IEEE80211_BSS_TYPE_PBSS,
- IEEE80211_BSS_TYPE_IBSS,
- IEEE80211_BSS_TYPE_MBSS,
- IEEE80211_BSS_TYPE_ANY
- };
- enum ieee80211_privacy {
- IEEE80211_PRIVACY_ON,
- IEEE80211_PRIVACY_OFF,
- IEEE80211_PRIVACY_ANY
- };
- ((x) ? IEEE80211_PRIVACY_ON : IEEE80211_PRIVACY_OFF)
- struct ieee80211_rate {
- u32 flags;
- u16 bitrate;
- u16 hw_value, hw_value_short;
- };
- struct ieee80211_sta_ht_cap {
- u16 cap;
- bool ht_supported;
- u8 ampdu_factor;
- u8 ampdu_density;
- struct ieee80211_mcs_info mcs;
- };
- struct ieee80211_sta_vht_cap {
- bool vht_supported;
- u32 cap;
- struct ieee80211_vht_mcs_info vht_mcs;
- };
- struct ieee80211_supported_band {
- struct ieee80211_channel *channels;
- struct ieee80211_rate *bitrates;
- enum nl80211_band band;
- int n_channels;
- int n_bitrates;
- struct ieee80211_sta_ht_cap ht_cap;
- struct ieee80211_sta_vht_cap vht_cap;
- };
- WLAN_USER_POSITION_LEN)
- struct vif_params {
- int use_4addr;
- u8 macaddr[ETH_ALEN];
- u8 vht_mumimo_groups[VHT_MUMIMO_GROUPS_DATA_LEN];
- };
- struct key_params {
- const u8 *key;
- const u8 *seq;
- int key_len;
- int seq_len;
- u32 cipher;
- };
- struct cfg80211_chan_def {
- struct ieee80211_channel *chan;
- enum nl80211_chan_width width;
- u32 center_freq1;
- u32 center_freq2;
- };
- static inline enum nl80211_channel_type
- cfg80211_get_chandef_type(const struct cfg80211_chan_def *chandef)
- {
- switch (chandef->width) {
- case NL80211_CHAN_WIDTH_20_NOHT:
- return NL80211_CHAN_NO_HT;
- case NL80211_CHAN_WIDTH_20:
- return NL80211_CHAN_HT20;
- case NL80211_CHAN_WIDTH_40:
- if (chandef->center_freq1 > chandef->chan->center_freq)
- return NL80211_CHAN_HT40PLUS;
- return NL80211_CHAN_HT40MINUS;
- default:
- WARN_ON(1);
- return NL80211_CHAN_NO_HT;
- }
- }
- void cfg80211_chandef_create(struct cfg80211_chan_def *chandef,
- struct ieee80211_channel *channel,
- enum nl80211_channel_type chantype);
- static inline bool
- cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1,
- const struct cfg80211_chan_def *chandef2)
- {
- return (chandef1->chan == chandef2->chan &&
- chandef1->width == chandef2->width &&
- chandef1->center_freq1 == chandef2->center_freq1 &&
- chandef1->center_freq2 == chandef2->center_freq2);
- }
- const struct cfg80211_chan_def *
- cfg80211_chandef_compatible(const struct cfg80211_chan_def *chandef1,
- const struct cfg80211_chan_def *chandef2);
- bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef);
- bool cfg80211_chandef_usable(struct wiphy *wiphy,
- const struct cfg80211_chan_def *chandef,
- u32 prohibited_flags);
- int cfg80211_chandef_dfs_required(struct wiphy *wiphy,
- const struct cfg80211_chan_def *chandef,
- enum nl80211_iftype iftype);
- static inline enum ieee80211_rate_flags
- ieee80211_chandef_rate_flags(struct cfg80211_chan_def *chandef)
- {
- switch (chandef->width) {
- case NL80211_CHAN_WIDTH_5:
- return IEEE80211_RATE_SUPPORTS_5MHZ;
- case NL80211_CHAN_WIDTH_10:
- return IEEE80211_RATE_SUPPORTS_10MHZ;
- default:
- break;
- }
- return 0;
- }
- static inline int
- ieee80211_chandef_max_power(struct cfg80211_chan_def *chandef)
- {
- switch (chandef->width) {
- case NL80211_CHAN_WIDTH_5:
- return min(chandef->chan->max_reg_power - 6,
- chandef->chan->max_power);
- case NL80211_CHAN_WIDTH_10:
- return min(chandef->chan->max_reg_power - 3,
- chandef->chan->max_power);
- default:
- break;
- }
- return chandef->chan->max_power;
- }
- enum survey_info_flags {
- SURVEY_INFO_NOISE_DBM = BIT(0),
- SURVEY_INFO_IN_USE = BIT(1),
- SURVEY_INFO_TIME = BIT(2),
- SURVEY_INFO_TIME_BUSY = BIT(3),
- SURVEY_INFO_TIME_EXT_BUSY = BIT(4),
- SURVEY_INFO_TIME_RX = BIT(5),
- SURVEY_INFO_TIME_TX = BIT(6),
- SURVEY_INFO_TIME_SCAN = BIT(7),
- };
- struct survey_info {
- struct ieee80211_channel *channel;
- u64 time;
- u64 time_busy;
- u64 time_ext_busy;
- u64 time_rx;
- u64 time_tx;
- u64 time_scan;
- u32 filled;
- s8 noise;
- };
- struct cfg80211_crypto_settings {
- u32 wpa_versions;
- u32 cipher_group;
- int n_ciphers_pairwise;
- u32 ciphers_pairwise[NL80211_MAX_NR_CIPHER_SUITES];
- int n_akm_suites;
- u32 akm_suites[NL80211_MAX_NR_AKM_SUITES];
- bool control_port;
- __be16 control_port_ethertype;
- bool control_port_no_encrypt;
- struct key_params *wep_keys;
- int wep_tx_key;
- };
- struct cfg80211_beacon_data {
- const u8 *head, *tail;
- const u8 *beacon_ies;
- const u8 *proberesp_ies;
- const u8 *assocresp_ies;
- const 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 mac_address {
- u8 addr[ETH_ALEN];
- };
- struct cfg80211_acl_data {
- enum nl80211_acl_policy acl_policy;
- int n_acl_entries;
-
- struct mac_address mac_addrs[];
- };
- struct cfg80211_bitrate_mask {
- struct {
- u32 legacy;
- u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
- u16 vht_mcs[NL80211_VHT_NSS_MAX];
- enum nl80211_txrate_gi gi;
- } control[NUM_NL80211_BANDS];
- };
- struct cfg80211_ap_settings {
- struct cfg80211_chan_def chandef;
- struct cfg80211_beacon_data beacon;
- int beacon_interval, dtim_period;
- const u8 *ssid;
- size_t ssid_len;
- enum nl80211_hidden_ssid hidden_ssid;
- struct cfg80211_crypto_settings crypto;
- bool privacy;
- enum nl80211_auth_type auth_type;
- enum nl80211_smps_mode smps_mode;
- int inactivity_timeout;
- u8 p2p_ctwindow;
- bool p2p_opp_ps;
- const struct cfg80211_acl_data *acl;
- bool pbss;
- struct cfg80211_bitrate_mask beacon_rate;
- };
- struct cfg80211_csa_settings {
- struct cfg80211_chan_def chandef;
- struct cfg80211_beacon_data beacon_csa;
- const u16 *counter_offsets_beacon;
- const u16 *counter_offsets_presp;
- unsigned int n_counter_offsets_beacon;
- unsigned int n_counter_offsets_presp;
- struct cfg80211_beacon_data beacon_after;
- bool radar_required;
- bool block_tx;
- u8 count;
- };
- enum station_parameters_apply_mask {
- STATION_PARAM_APPLY_UAPSD = BIT(0),
- STATION_PARAM_APPLY_CAPABILITY = BIT(1),
- STATION_PARAM_APPLY_PLINK_STATE = BIT(2),
- };
- struct station_parameters {
- const u8 *supported_rates;
- struct net_device *vlan;
- u32 sta_flags_mask, sta_flags_set;
- u32 sta_modify_mask;
- int listen_interval;
- u16 aid;
- u16 peer_aid;
- u8 supported_rates_len;
- u8 plink_action;
- u8 plink_state;
- const struct ieee80211_ht_cap *ht_capa;
- const struct ieee80211_vht_cap *vht_capa;
- u8 uapsd_queues;
- u8 max_sp;
- enum nl80211_mesh_power_mode local_pm;
- u16 capability;
- const u8 *ext_capab;
- u8 ext_capab_len;
- const u8 *supported_channels;
- u8 supported_channels_len;
- const u8 *supported_oper_classes;
- u8 supported_oper_classes_len;
- u8 opmode_notif;
- bool opmode_notif_used;
- int support_p2p_ps;
- };
- struct station_del_parameters {
- const u8 *mac;
- u8 subtype;
- u16 reason_code;
- };
- enum cfg80211_station_type {
- CFG80211_STA_AP_CLIENT,
- CFG80211_STA_AP_CLIENT_UNASSOC,
- CFG80211_STA_AP_MLME_CLIENT,
- CFG80211_STA_AP_STA,
- CFG80211_STA_IBSS,
- CFG80211_STA_TDLS_PEER_SETUP,
- CFG80211_STA_TDLS_PEER_ACTIVE,
- CFG80211_STA_MESH_PEER_KERNEL,
- CFG80211_STA_MESH_PEER_USER,
- };
- int cfg80211_check_station_change(struct wiphy *wiphy,
- struct station_parameters *params,
- enum cfg80211_station_type statype);
- enum rate_info_flags {
- RATE_INFO_FLAGS_MCS = BIT(0),
- RATE_INFO_FLAGS_VHT_MCS = BIT(1),
- RATE_INFO_FLAGS_SHORT_GI = BIT(2),
- RATE_INFO_FLAGS_60G = BIT(3),
- };
- enum rate_info_bw {
- RATE_INFO_BW_20 = 0,
- RATE_INFO_BW_5,
- RATE_INFO_BW_10,
- RATE_INFO_BW_40,
- RATE_INFO_BW_80,
- RATE_INFO_BW_160,
- };
- struct rate_info {
- u8 flags;
- u8 mcs;
- u16 legacy;
- u8 nss;
- u8 bw;
- };
- enum bss_param_flags {
- BSS_PARAM_FLAGS_CTS_PROT = 1<<0,
- BSS_PARAM_FLAGS_SHORT_PREAMBLE = 1<<1,
- BSS_PARAM_FLAGS_SHORT_SLOT_TIME = 1<<2,
- };
- struct sta_bss_parameters {
- u8 flags;
- u8 dtim_period;
- u16 beacon_interval;
- };
- struct cfg80211_tid_stats {
- u32 filled;
- u64 rx_msdu;
- u64 tx_msdu;
- u64 tx_msdu_retries;
- u64 tx_msdu_failed;
- };
- struct station_info {
- u64 filled;
- u32 connected_time;
- u32 inactive_time;
- u64 rx_bytes;
- u64 tx_bytes;
- u16 llid;
- u16 plid;
- u8 plink_state;
- s8 signal;
- s8 signal_avg;
- u8 chains;
- s8 chain_signal[IEEE80211_MAX_CHAINS];
- s8 chain_signal_avg[IEEE80211_MAX_CHAINS];
- struct rate_info txrate;
- struct rate_info rxrate;
- u32 rx_packets;
- u32 tx_packets;
- u32 tx_retries;
- u32 tx_failed;
- u32 rx_dropped_misc;
- struct sta_bss_parameters bss_param;
- struct nl80211_sta_flag_update sta_flags;
- int generation;
- const u8 *assoc_req_ies;
- size_t assoc_req_ies_len;
- u32 beacon_loss_count;
- s64 t_offset;
- enum nl80211_mesh_power_mode local_pm;
- enum nl80211_mesh_power_mode peer_pm;
- enum nl80211_mesh_power_mode nonpeer_pm;
- u32 expected_throughput;
- u64 rx_beacon;
- u64 rx_duration;
- u8 rx_beacon_signal_avg;
- struct cfg80211_tid_stats pertid[IEEE80211_NUM_TIDS + 1];
- };
- int cfg80211_get_station(struct net_device *dev, const u8 *mac_addr,
- struct station_info *sinfo);
- static inline int cfg80211_get_station(struct net_device *dev,
- const u8 *mac_addr,
- struct station_info *sinfo)
- {
- return -ENOENT;
- }
- enum monitor_flags {
- MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL,
- MONITOR_FLAG_PLCPFAIL = 1<<NL80211_MNTR_FLAG_PLCPFAIL,
- MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL,
- MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS,
- MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES,
- MONITOR_FLAG_ACTIVE = 1<<NL80211_MNTR_FLAG_ACTIVE,
- };
- enum mpath_info_flags {
- MPATH_INFO_FRAME_QLEN = BIT(0),
- MPATH_INFO_SN = BIT(1),
- MPATH_INFO_METRIC = BIT(2),
- MPATH_INFO_EXPTIME = BIT(3),
- MPATH_INFO_DISCOVERY_TIMEOUT = BIT(4),
- MPATH_INFO_DISCOVERY_RETRIES = BIT(5),
- MPATH_INFO_FLAGS = BIT(6),
- };
- struct mpath_info {
- u32 filled;
- u32 frame_qlen;
- u32 sn;
- u32 metric;
- u32 exptime;
- u32 discovery_timeout;
- u8 discovery_retries;
- u8 flags;
- int generation;
- };
- struct bss_parameters {
- int use_cts_prot;
- int use_short_preamble;
- int use_short_slot_time;
- const u8 *basic_rates;
- u8 basic_rates_len;
- int ap_isolate;
- int ht_opmode;
- s8 p2p_ctwindow, p2p_opp_ps;
- };
- struct mesh_config {
- u16 dot11MeshRetryTimeout;
- u16 dot11MeshConfirmTimeout;
- u16 dot11MeshHoldingTimeout;
- u16 dot11MeshMaxPeerLinks;
- u8 dot11MeshMaxRetries;
- u8 dot11MeshTTL;
- u8 element_ttl;
- bool auto_open_plinks;
- u32 dot11MeshNbrOffsetMaxNeighbor;
- u8 dot11MeshHWMPmaxPREQretries;
- u32 path_refresh_time;
- u16 min_discovery_timeout;
- u32 dot11MeshHWMPactivePathTimeout;
- u16 dot11MeshHWMPpreqMinInterval;
- u16 dot11MeshHWMPperrMinInterval;
- u16 dot11MeshHWMPnetDiameterTraversalTime;
- u8 dot11MeshHWMPRootMode;
- u16 dot11MeshHWMPRannInterval;
- bool dot11MeshGateAnnouncementProtocol;
- bool dot11MeshForwarding;
- s32 rssi_threshold;
- u16 ht_opmode;
- u32 dot11MeshHWMPactivePathToRootTimeout;
- u16 dot11MeshHWMProotInterval;
- u16 dot11MeshHWMPconfirmationInterval;
- enum nl80211_mesh_power_mode power_mode;
- u16 dot11MeshAwakeWindowDuration;
- u32 plink_timeout;
- };
- struct mesh_setup {
- struct cfg80211_chan_def chandef;
- const u8 *mesh_id;
- u8 mesh_id_len;
- u8 sync_method;
- u8 path_sel_proto;
- u8 path_metric;
- u8 auth_id;
- const u8 *ie;
- u8 ie_len;
- bool is_authenticated;
- bool is_secure;
- bool user_mpm;
- u8 dtim_period;
- u16 beacon_interval;
- int mcast_rate[NUM_NL80211_BANDS];
- u32 basic_rates;
- struct cfg80211_bitrate_mask beacon_rate;
- };
- struct ocb_setup {
- struct cfg80211_chan_def chandef;
- };
- struct ieee80211_txq_params {
- enum nl80211_ac ac;
- u16 txop;
- u16 cwmin;
- u16 cwmax;
- u8 aifs;
- };
- struct cfg80211_ssid {
- u8 ssid[IEEE80211_MAX_SSID_LEN];
- u8 ssid_len;
- };
- struct cfg80211_scan_info {
- u64 scan_start_tsf;
- u8 tsf_bssid[ETH_ALEN] __aligned(2);
- bool aborted;
- };
- struct cfg80211_scan_request {
- struct cfg80211_ssid *ssids;
- int n_ssids;
- u32 n_channels;
- enum nl80211_bss_scan_width scan_width;
- const u8 *ie;
- size_t ie_len;
- u16 duration;
- bool duration_mandatory;
- u32 flags;
- u32 rates[NUM_NL80211_BANDS];
- struct wireless_dev *wdev;
- u8 mac_addr[ETH_ALEN] __aligned(2);
- u8 mac_addr_mask[ETH_ALEN] __aligned(2);
- u8 bssid[ETH_ALEN] __aligned(2);
-
- struct wiphy *wiphy;
- unsigned long scan_start;
- struct cfg80211_scan_info info;
- bool notified;
- bool no_cck;
-
- struct ieee80211_channel *channels[0];
- };
- static inline void get_random_mask_addr(u8 *buf, const u8 *addr, const u8 *mask)
- {
- int i;
- get_random_bytes(buf, ETH_ALEN);
- for (i = 0; i < ETH_ALEN; i++) {
- buf[i] &= ~mask[i];
- buf[i] |= addr[i] & mask[i];
- }
- }
- struct cfg80211_match_set {
- struct cfg80211_ssid ssid;
- s32 rssi_thold;
- };
- struct cfg80211_sched_scan_plan {
- u32 interval;
- u32 iterations;
- };
- struct cfg80211_sched_scan_request {
- struct cfg80211_ssid *ssids;
- int n_ssids;
- u32 n_channels;
- enum nl80211_bss_scan_width scan_width;
- const u8 *ie;
- size_t ie_len;
- u32 flags;
- struct cfg80211_match_set *match_sets;
- int n_match_sets;
- s32 min_rssi_thold;
- u32 delay;
- struct cfg80211_sched_scan_plan *scan_plans;
- int n_scan_plans;
- u8 mac_addr[ETH_ALEN] __aligned(2);
- u8 mac_addr_mask[ETH_ALEN] __aligned(2);
-
- struct wiphy *wiphy;
- struct net_device *dev;
- unsigned long scan_start;
- struct rcu_head rcu_head;
- u32 owner_nlportid;
-
- struct ieee80211_channel *channels[0];
- };
- enum cfg80211_signal_type {
- CFG80211_SIGNAL_TYPE_NONE,
- CFG80211_SIGNAL_TYPE_MBM,
- CFG80211_SIGNAL_TYPE_UNSPEC,
- };
- struct cfg80211_inform_bss {
- struct ieee80211_channel *chan;
- enum nl80211_bss_scan_width scan_width;
- s32 signal;
- u64 boottime_ns;
- u64 parent_tsf;
- u8 parent_bssid[ETH_ALEN] __aligned(2);
- };
- struct cfg80211_bss_ies {
- u64 tsf;
- struct rcu_head rcu_head;
- int len;
- bool from_beacon;
- u8 data[];
- };
- struct cfg80211_bss {
- struct ieee80211_channel *channel;
- enum nl80211_bss_scan_width scan_width;
- const struct cfg80211_bss_ies __rcu *ies;
- const struct cfg80211_bss_ies __rcu *beacon_ies;
- const struct cfg80211_bss_ies __rcu *proberesp_ies;
- struct cfg80211_bss *hidden_beacon_bss;
- s32 signal;
- u16 beacon_interval;
- u16 capability;
- u8 bssid[ETH_ALEN];
- u8 priv[0] __aligned(sizeof(void *));
- };
- const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie);
- struct cfg80211_auth_request {
- struct cfg80211_bss *bss;
- const u8 *ie;
- size_t ie_len;
- enum nl80211_auth_type auth_type;
- const u8 *key;
- u8 key_len, key_idx;
- const u8 *sae_data;
- size_t sae_data_len;
- };
- enum cfg80211_assoc_req_flags {
- ASSOC_REQ_DISABLE_HT = BIT(0),
- ASSOC_REQ_DISABLE_VHT = BIT(1),
- ASSOC_REQ_USE_RRM = BIT(2),
- };
- struct cfg80211_assoc_request {
- struct cfg80211_bss *bss;
- const u8 *ie, *prev_bssid;
- size_t ie_len;
- struct cfg80211_crypto_settings crypto;
- bool use_mfp;
- u32 flags;
- struct ieee80211_ht_cap ht_capa;
- struct ieee80211_ht_cap ht_capa_mask;
- struct ieee80211_vht_cap vht_capa, vht_capa_mask;
- };
- struct cfg80211_deauth_request {
- const u8 *bssid;
- const u8 *ie;
- size_t ie_len;
- u16 reason_code;
- bool local_state_change;
- };
- struct cfg80211_disassoc_request {
- struct cfg80211_bss *bss;
- const u8 *ie;
- size_t ie_len;
- u16 reason_code;
- bool local_state_change;
- };
- struct cfg80211_ibss_params {
- const u8 *ssid;
- const u8 *bssid;
- struct cfg80211_chan_def chandef;
- const u8 *ie;
- u8 ssid_len, ie_len;
- u16 beacon_interval;
- u32 basic_rates;
- bool channel_fixed;
- bool privacy;
- bool control_port;
- bool userspace_handles_dfs;
- int mcast_rate[NUM_NL80211_BANDS];
- struct ieee80211_ht_cap ht_capa;
- struct ieee80211_ht_cap ht_capa_mask;
- };
- struct cfg80211_bss_select_adjust {
- enum nl80211_band band;
- s8 delta;
- };
- struct cfg80211_bss_selection {
- enum nl80211_bss_select_attr behaviour;
- union {
- enum nl80211_band band_pref;
- struct cfg80211_bss_select_adjust adjust;
- } param;
- };
- struct cfg80211_connect_params {
- struct ieee80211_channel *channel;
- struct ieee80211_channel *channel_hint;
- const u8 *bssid;
- const u8 *bssid_hint;
- const u8 *ssid;
- size_t ssid_len;
- enum nl80211_auth_type auth_type;
- const u8 *ie;
- size_t ie_len;
- bool privacy;
- enum nl80211_mfp mfp;
- struct cfg80211_crypto_settings crypto;
- const u8 *key;
- u8 key_len, key_idx;
- u32 flags;
- int bg_scan_period;
- struct ieee80211_ht_cap ht_capa;
- struct ieee80211_ht_cap ht_capa_mask;
- struct ieee80211_vht_cap vht_capa;
- struct ieee80211_vht_cap vht_capa_mask;
- bool pbss;
- struct cfg80211_bss_selection bss_select;
- const u8 *prev_bssid;
- };
- enum wiphy_params_flags {
- WIPHY_PARAM_RETRY_SHORT = 1 << 0,
- WIPHY_PARAM_RETRY_LONG = 1 << 1,
- WIPHY_PARAM_FRAG_THRESHOLD = 1 << 2,
- WIPHY_PARAM_RTS_THRESHOLD = 1 << 3,
- WIPHY_PARAM_COVERAGE_CLASS = 1 << 4,
- WIPHY_PARAM_DYN_ACK = 1 << 5,
- };
- struct cfg80211_pmksa {
- const u8 *bssid;
- const u8 *pmkid;
- };
- struct cfg80211_pkt_pattern {
- const u8 *mask, *pattern;
- int pattern_len;
- int pkt_offset;
- };
- struct cfg80211_wowlan_tcp {
- struct socket *sock;
- __be32 src, dst;
- u16 src_port, dst_port;
- u8 dst_mac[ETH_ALEN];
- int payload_len;
- const u8 *payload;
- struct nl80211_wowlan_tcp_data_seq payload_seq;
- u32 data_interval;
- u32 wake_len;
- const u8 *wake_data, *wake_mask;
- u32 tokens_size;
-
- struct nl80211_wowlan_tcp_data_token payload_tok;
- };
- struct cfg80211_wowlan {
- bool any, disconnect, magic_pkt, gtk_rekey_failure,
- eap_identity_req, four_way_handshake,
- rfkill_release;
- struct cfg80211_pkt_pattern *patterns;
- struct cfg80211_wowlan_tcp *tcp;
- int n_patterns;
- struct cfg80211_sched_scan_request *nd_config;
- };
- struct cfg80211_coalesce_rules {
- int delay;
- enum nl80211_coalesce_condition condition;
- struct cfg80211_pkt_pattern *patterns;
- int n_patterns;
- };
- struct cfg80211_coalesce {
- struct cfg80211_coalesce_rules *rules;
- int n_rules;
- };
- struct cfg80211_wowlan_nd_match {
- struct cfg80211_ssid ssid;
- int n_channels;
- u32 channels[];
- };
- struct cfg80211_wowlan_nd_info {
- int n_matches;
- struct cfg80211_wowlan_nd_match *matches[];
- };
- struct cfg80211_wowlan_wakeup {
- bool disconnect, magic_pkt, gtk_rekey_failure,
- eap_identity_req, four_way_handshake,
- rfkill_release, packet_80211,
- tcp_match, tcp_connlost, tcp_nomoretokens;
- s32 pattern_idx;
- u32 packet_present_len, packet_len;
- const void *packet;
- struct cfg80211_wowlan_nd_info *net_detect;
- };
- struct cfg80211_gtk_rekey_data {
- const u8 *kek, *kck, *replay_ctr;
- };
- struct cfg80211_update_ft_ies_params {
- u16 md;
- const u8 *ie;
- size_t ie_len;
- };
- struct cfg80211_mgmt_tx_params {
- struct ieee80211_channel *chan;
- bool offchan;
- unsigned int wait;
- const u8 *buf;
- size_t len;
- bool no_cck;
- bool dont_wait_for_ack;
- int n_csa_offsets;
- const u16 *csa_offsets;
- };
- struct cfg80211_dscp_exception {
- u8 dscp;
- u8 up;
- };
- struct cfg80211_dscp_range {
- u8 low;
- u8 high;
- };
- (IEEE80211_QOS_MAP_LEN_MIN + 2 * IEEE80211_QOS_MAP_MAX_EX)
- struct cfg80211_qos_map {
- u8 num_des;
- struct cfg80211_dscp_exception dscp_exception[IEEE80211_QOS_MAP_MAX_EX];
- struct cfg80211_dscp_range up[8];
- };
- struct cfg80211_nan_conf {
- u8 master_pref;
- u8 dual;
- };
- enum cfg80211_nan_conf_changes {
- CFG80211_NAN_CONF_CHANGED_PREF = BIT(0),
- CFG80211_NAN_CONF_CHANGED_DUAL = BIT(1),
- };
- struct cfg80211_nan_func_filter {
- const u8 *filter;
- u8 len;
- };
- struct cfg80211_nan_func {
- enum nl80211_nan_function_type type;
- u8 service_id[NL80211_NAN_FUNC_SERVICE_ID_LEN];
- u8 publish_type;
- bool close_range;
- bool publish_bcast;
- bool subscribe_active;
- u8 followup_id;
- u8 followup_reqid;
- struct mac_address followup_dest;
- u32 ttl;
- const u8 *serv_spec_info;
- u8 serv_spec_info_len;
- bool srf_include;
- const u8 *srf_bf;
- u8 srf_bf_len;
- u8 srf_bf_idx;
- struct mac_address *srf_macs;
- int srf_num_macs;
- struct cfg80211_nan_func_filter *rx_filters;
- struct cfg80211_nan_func_filter *tx_filters;
- u8 num_tx_filters;
- u8 num_rx_filters;
- u8 instance_id;
- u64 cookie;
- };
- struct cfg80211_ops {
- int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
- int (*resume)(struct wiphy *wiphy);
- void (*set_wakeup)(struct wiphy *wiphy, bool enabled);
- struct wireless_dev * (*add_virtual_intf)(struct wiphy *wiphy,
- const char *name,
- unsigned char name_assign_type,
- enum nl80211_iftype type,
- u32 *flags,
- struct vif_params *params);
- int (*del_virtual_intf)(struct wiphy *wiphy,
- struct wireless_dev *wdev);
- int (*change_virtual_intf)(struct wiphy *wiphy,
- struct net_device *dev,
- enum nl80211_iftype type, u32 *flags,
- struct vif_params *params);
- int (*add_key)(struct wiphy *wiphy, struct net_device *netdev,
- u8 key_index, bool pairwise, const u8 *mac_addr,
- struct key_params *params);
- int (*get_key)(struct wiphy *wiphy, struct net_device *netdev,
- u8 key_index, bool pairwise, const u8 *mac_addr,
- void *cookie,
- void (*callback)(void *cookie, struct key_params*));
- int (*del_key)(struct wiphy *wiphy, struct net_device *netdev,
- u8 key_index, bool pairwise, const u8 *mac_addr);
- int (*set_default_key)(struct wiphy *wiphy,
- struct net_device *netdev,
- u8 key_index, bool unicast, bool multicast);
- int (*set_default_mgmt_key)(struct wiphy *wiphy,
- struct net_device *netdev,
- u8 key_index);
- int (*start_ap)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_ap_settings *settings);
- int (*change_beacon)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_beacon_data *info);
- int (*stop_ap)(struct wiphy *wiphy, struct net_device *dev);
- int (*add_station)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *mac,
- struct station_parameters *params);
- int (*del_station)(struct wiphy *wiphy, struct net_device *dev,
- struct station_del_parameters *params);
- int (*change_station)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *mac,
- struct station_parameters *params);
- int (*get_station)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *mac, struct station_info *sinfo);
- int (*dump_station)(struct wiphy *wiphy, struct net_device *dev,
- int idx, u8 *mac, struct station_info *sinfo);
- int (*add_mpath)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *dst, const u8 *next_hop);
- int (*del_mpath)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *dst);
- int (*change_mpath)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *dst, const u8 *next_hop);
- int (*get_mpath)(struct wiphy *wiphy, struct net_device *dev,
- u8 *dst, u8 *next_hop, struct mpath_info *pinfo);
- int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev,
- int idx, u8 *dst, u8 *next_hop,
- struct mpath_info *pinfo);
- int (*get_mpp)(struct wiphy *wiphy, struct net_device *dev,
- u8 *dst, u8 *mpp, struct mpath_info *pinfo);
- int (*dump_mpp)(struct wiphy *wiphy, struct net_device *dev,
- int idx, u8 *dst, u8 *mpp,
- struct mpath_info *pinfo);
- int (*get_mesh_config)(struct wiphy *wiphy,
- struct net_device *dev,
- struct mesh_config *conf);
- int (*update_mesh_config)(struct wiphy *wiphy,
- struct net_device *dev, u32 mask,
- const struct mesh_config *nconf);
- int (*join_mesh)(struct wiphy *wiphy, struct net_device *dev,
- const struct mesh_config *conf,
- const struct mesh_setup *setup);
- int (*leave_mesh)(struct wiphy *wiphy, struct net_device *dev);
- int (*join_ocb)(struct wiphy *wiphy, struct net_device *dev,
- struct ocb_setup *setup);
- int (*leave_ocb)(struct wiphy *wiphy, struct net_device *dev);
- int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
- struct bss_parameters *params);
- int (*set_txq_params)(struct wiphy *wiphy, struct net_device *dev,
- struct ieee80211_txq_params *params);
- int (*libertas_set_mesh_channel)(struct wiphy *wiphy,
- struct net_device *dev,
- struct ieee80211_channel *chan);
- int (*set_monitor_channel)(struct wiphy *wiphy,
- struct cfg80211_chan_def *chandef);
- int (*scan)(struct wiphy *wiphy,
- struct cfg80211_scan_request *request);
- void (*abort_scan)(struct wiphy *wiphy, struct wireless_dev *wdev);
- int (*auth)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_auth_request *req);
- int (*assoc)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_assoc_request *req);
- int (*deauth)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_deauth_request *req);
- int (*disassoc)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_disassoc_request *req);
- int (*connect)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_connect_params *sme);
- int (*disconnect)(struct wiphy *wiphy, struct net_device *dev,
- u16 reason_code);
- int (*join_ibss)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_ibss_params *params);
- int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev);
- int (*set_mcast_rate)(struct wiphy *wiphy, struct net_device *dev,
- int rate[NUM_NL80211_BANDS]);
- int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed);
- int (*set_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
- enum nl80211_tx_power_setting type, int mbm);
- int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
- int *dbm);
- int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *addr);
- void (*rfkill_poll)(struct wiphy *wiphy);
- int (*testmode_cmd)(struct wiphy *wiphy, struct wireless_dev *wdev,
- void *data, int len);
- int (*testmode_dump)(struct wiphy *wiphy, struct sk_buff *skb,
- struct netlink_callback *cb,
- void *data, int len);
- int (*set_bitrate_mask)(struct wiphy *wiphy,
- struct net_device *dev,
- const u8 *peer,
- const struct cfg80211_bitrate_mask *mask);
- int (*dump_survey)(struct wiphy *wiphy, struct net_device *netdev,
- int idx, struct survey_info *info);
- int (*set_pmksa)(struct wiphy *wiphy, struct net_device *netdev,
- struct cfg80211_pmksa *pmksa);
- int (*del_pmksa)(struct wiphy *wiphy, struct net_device *netdev,
- struct cfg80211_pmksa *pmksa);
- int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev);
- int (*remain_on_channel)(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- struct ieee80211_channel *chan,
- unsigned int duration,
- u64 *cookie);
- int (*cancel_remain_on_channel)(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- u64 cookie);
- int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params,
- u64 *cookie);
- int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- u64 cookie);
- int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev,
- bool enabled, int timeout);
- int (*set_cqm_rssi_config)(struct wiphy *wiphy,
- struct net_device *dev,
- s32 rssi_thold, u32 rssi_hyst);
- int (*set_cqm_txe_config)(struct wiphy *wiphy,
- struct net_device *dev,
- u32 rate, u32 pkts, u32 intvl);
- void (*mgmt_frame_register)(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- u16 frame_type, bool reg);
- int (*set_antenna)(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant);
- int (*get_antenna)(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant);
- int (*sched_scan_start)(struct wiphy *wiphy,
- struct net_device *dev,
- struct cfg80211_sched_scan_request *request);
- int (*sched_scan_stop)(struct wiphy *wiphy, struct net_device *dev);
- int (*set_rekey_data)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_gtk_rekey_data *data);
- int (*tdls_mgmt)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *peer, u8 action_code, u8 dialog_token,
- u16 status_code, u32 peer_capability,
- bool initiator, const u8 *buf, size_t len);
- int (*tdls_oper)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *peer, enum nl80211_tdls_operation oper);
- int (*probe_client)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *peer, u64 *cookie);
- int (*set_noack_map)(struct wiphy *wiphy,
- struct net_device *dev,
- u16 noack_map);
- int (*get_channel)(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- struct cfg80211_chan_def *chandef);
- int (*start_p2p_device)(struct wiphy *wiphy,
- struct wireless_dev *wdev);
- void (*stop_p2p_device)(struct wiphy *wiphy,
- struct wireless_dev *wdev);
- int (*set_mac_acl)(struct wiphy *wiphy, struct net_device *dev,
- const struct cfg80211_acl_data *params);
- int (*start_radar_detection)(struct wiphy *wiphy,
- struct net_device *dev,
- struct cfg80211_chan_def *chandef,
- u32 cac_time_ms);
- int (*update_ft_ies)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_update_ft_ies_params *ftie);
- int (*crit_proto_start)(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- enum nl80211_crit_proto_id protocol,
- u16 duration);
- void (*crit_proto_stop)(struct wiphy *wiphy,
- struct wireless_dev *wdev);
- int (*set_coalesce)(struct wiphy *wiphy,
- struct cfg80211_coalesce *coalesce);
- int (*channel_switch)(struct wiphy *wiphy,
- struct net_device *dev,
- struct cfg80211_csa_settings *params);
- int (*set_qos_map)(struct wiphy *wiphy,
- struct net_device *dev,
- struct cfg80211_qos_map *qos_map);
- int (*set_ap_chanwidth)(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_chan_def *chandef);
- int (*add_tx_ts)(struct wiphy *wiphy, struct net_device *dev,
- u8 tsid, const u8 *peer, u8 user_prio,
- u16 admitted_time);
- int (*del_tx_ts)(struct wiphy *wiphy, struct net_device *dev,
- u8 tsid, const u8 *peer);
- int (*tdls_channel_switch)(struct wiphy *wiphy,
- struct net_device *dev,
- const u8 *addr, u8 oper_class,
- struct cfg80211_chan_def *chandef);
- void (*tdls_cancel_channel_switch)(struct wiphy *wiphy,
- struct net_device *dev,
- const u8 *addr);
- int (*start_nan)(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_nan_conf *conf);
- void (*stop_nan)(struct wiphy *wiphy, struct wireless_dev *wdev);
- int (*add_nan_func)(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_nan_func *nan_func);
- void (*del_nan_func)(struct wiphy *wiphy, struct wireless_dev *wdev,
- u64 cookie);
- int (*nan_change_conf)(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- struct cfg80211_nan_conf *conf,
- u32 changes);
- };
- enum wiphy_flags {
-
-
-
- WIPHY_FLAG_NETNS_OK = BIT(3),
- WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4),
- WIPHY_FLAG_4ADDR_AP = BIT(5),
- WIPHY_FLAG_4ADDR_STATION = BIT(6),
- WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7),
- WIPHY_FLAG_IBSS_RSN = BIT(8),
- WIPHY_FLAG_MESH_AUTH = BIT(10),
- WIPHY_FLAG_SUPPORTS_SCHED_SCAN = BIT(11),
-
- WIPHY_FLAG_SUPPORTS_FW_ROAM = BIT(13),
- WIPHY_FLAG_AP_UAPSD = BIT(14),
- WIPHY_FLAG_SUPPORTS_TDLS = BIT(15),
- WIPHY_FLAG_TDLS_EXTERNAL_SETUP = BIT(16),
- WIPHY_FLAG_HAVE_AP_SME = BIT(17),
- WIPHY_FLAG_REPORTS_OBSS = BIT(18),
- WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19),
- WIPHY_FLAG_OFFCHAN_TX = BIT(20),
- WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21),
- WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22),
- WIPHY_FLAG_HAS_CHANNEL_SWITCH = BIT(23),
- WIPHY_FLAG_HAS_STATIC_WEP = BIT(24),
- };
- struct ieee80211_iface_limit {
- u16 max;
- u16 types;
- };
- struct ieee80211_iface_combination {
- const struct ieee80211_iface_limit *limits;
- u32 num_different_channels;
- u16 max_interfaces;
- u8 n_limits;
- bool beacon_int_infra_match;
- u8 radar_detect_widths;
- u8 radar_detect_regions;
- };
- struct ieee80211_txrx_stypes {
- u16 tx, rx;
- };
- enum wiphy_wowlan_support_flags {
- WIPHY_WOWLAN_ANY = BIT(0),
- WIPHY_WOWLAN_MAGIC_PKT = BIT(1),
- WIPHY_WOWLAN_DISCONNECT = BIT(2),
- WIPHY_WOWLAN_SUPPORTS_GTK_REKEY = BIT(3),
- WIPHY_WOWLAN_GTK_REKEY_FAILURE = BIT(4),
- WIPHY_WOWLAN_EAP_IDENTITY_REQ = BIT(5),
- WIPHY_WOWLAN_4WAY_HANDSHAKE = BIT(6),
- WIPHY_WOWLAN_RFKILL_RELEASE = BIT(7),
- WIPHY_WOWLAN_NET_DETECT = BIT(8),
- };
- struct wiphy_wowlan_tcp_support {
- const struct nl80211_wowlan_tcp_data_token_feature *tok;
- u32 data_payload_max;
- u32 data_interval_max;
- u32 wake_payload_max;
- bool seq;
- };
- struct wiphy_wowlan_support {
- u32 flags;
- int n_patterns;
- int pattern_max_len;
- int pattern_min_len;
- int max_pkt_offset;
- int max_nd_match_sets;
- const struct wiphy_wowlan_tcp_support *tcp;
- };
- struct wiphy_coalesce_support {
- int n_rules;
- int max_delay;
- int n_patterns;
- int pattern_max_len;
- int pattern_min_len;
- int max_pkt_offset;
- };
- enum wiphy_vendor_command_flags {
- WIPHY_VENDOR_CMD_NEED_WDEV = BIT(0),
- WIPHY_VENDOR_CMD_NEED_NETDEV = BIT(1),
- WIPHY_VENDOR_CMD_NEED_RUNNING = BIT(2),
- };
- struct wiphy_vendor_command {
- struct nl80211_vendor_cmd_info info;
- u32 flags;
- int (*doit)(struct wiphy *wiphy, struct wireless_dev *wdev,
- const void *data, int data_len);
- int (*dumpit)(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct sk_buff *skb, const void *data, int data_len,
- unsigned long *storage);
- };
- struct wiphy_iftype_ext_capab {
- enum nl80211_iftype iftype;
- const u8 *extended_capabilities;
- const u8 *extended_capabilities_mask;
- u8 extended_capabilities_len;
- };
- struct wiphy {
-
-
- u8 perm_addr[ETH_ALEN];
- u8 addr_mask[ETH_ALEN];
- struct mac_address *addresses;
- const struct ieee80211_txrx_stypes *mgmt_stypes;
- const struct ieee80211_iface_combination *iface_combinations;
- int n_iface_combinations;
- u16 software_iftypes;
- u16 n_addresses;
-
- u16 interface_modes;
- u16 max_acl_mac_addrs;
- u32 flags, regulatory_flags, features;
- u8 ext_features[DIV_ROUND_UP(NUM_NL80211_EXT_FEATURES, 8)];
- u32 ap_sme_capa;
- enum cfg80211_signal_type signal_type;
- int bss_priv_size;
- u8 max_scan_ssids;
- u8 max_sched_scan_ssids;
- u8 max_match_sets;
- u16 max_scan_ie_len;
- u16 max_sched_scan_ie_len;
- u32 max_sched_scan_plans;
- u32 max_sched_scan_plan_interval;
- u32 max_sched_scan_plan_iterations;
- int n_cipher_suites;
- const u32 *cipher_suites;
- u8 retry_short;
- u8 retry_long;
- u32 frag_threshold;
- u32 rts_threshold;
- u8 coverage_class;
- char fw_version[ETHTOOL_FWVERS_LEN];
- u32 hw_version;
- const struct wiphy_wowlan_support *wowlan;
- struct cfg80211_wowlan *wowlan_config;
- u16 max_remain_on_channel_duration;
- u8 max_num_pmkids;
- u32 available_antennas_tx;
- u32 available_antennas_rx;
-
- u32 probe_resp_offload;
- const u8 *extended_capabilities, *extended_capabilities_mask;
- u8 extended_capabilities_len;
- const struct wiphy_iftype_ext_capab *iftype_ext_capab;
- unsigned int num_iftype_ext_capab;
-
- const void *privid;
- struct ieee80211_supported_band *bands[NUM_NL80211_BANDS];
-
- void (*reg_notifier)(struct wiphy *wiphy,
- struct regulatory_request *request);
-
- const struct ieee80211_regdomain __rcu *regd;
-
- struct device dev;
-
- bool registered;
-
- struct dentry *debugfsdir;
- const struct ieee80211_ht_cap *ht_capa_mod_mask;
- const struct ieee80211_vht_cap *vht_capa_mod_mask;
- struct list_head wdev_list;
-
- possible_net_t _net;
- const struct iw_handler_def *wext;
- const struct wiphy_coalesce_support *coalesce;
- const struct wiphy_vendor_command *vendor_commands;
- const struct nl80211_vendor_cmd_info *vendor_events;
- int n_vendor_commands, n_vendor_events;
- u16 max_ap_assoc_sta;
- u8 max_num_csa_counters;
- u8 max_adj_channel_rssi_comp;
- u32 bss_select_support;
- u64 cookie_counter;
- char priv[0] __aligned(NETDEV_ALIGN);
- };
- static inline struct net *wiphy_net(struct wiphy *wiphy)
- {
- return read_pnet(&wiphy->_net);
- }
- static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net)
- {
- write_pnet(&wiphy->_net, net);
- }
- static inline void *wiphy_priv(struct wiphy *wiphy)
- {
- BUG_ON(!wiphy);
- return &wiphy->priv;
- }
- static inline struct wiphy *priv_to_wiphy(void *priv)
- {
- BUG_ON(!priv);
- return container_of(priv, struct wiphy, priv);
- }
- static inline void set_wiphy_dev(struct wiphy *wiphy, struct device *dev)
- {
- wiphy->dev.parent = dev;
- }
- static inline struct device *wiphy_dev(struct wiphy *wiphy)
- {
- return wiphy->dev.parent;
- }
- static inline const char *wiphy_name(const struct wiphy *wiphy)
- {
- return dev_name(&wiphy->dev);
- }
- struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
- const char *requested_name);
- static inline struct wiphy *wiphy_new(const struct cfg80211_ops *ops,
- int sizeof_priv)
- {
- return wiphy_new_nm(ops, sizeof_priv, NULL);
- }
- int wiphy_register(struct wiphy *wiphy);
- void wiphy_unregister(struct wiphy *wiphy);
- void wiphy_free(struct wiphy *wiphy);
- struct cfg80211_conn;
- struct cfg80211_internal_bss;
- struct cfg80211_cached_keys;
- struct wireless_dev {
- struct wiphy *wiphy;
- enum nl80211_iftype iftype;
-
- struct list_head list;
- struct net_device *netdev;
- u32 identifier;
- struct list_head mgmt_registrations;
- spinlock_t mgmt_registrations_lock;
- struct mutex mtx;
- bool use_4addr, p2p_started, nan_started;
- u8 address[ETH_ALEN] __aligned(sizeof(u16));
-
- u8 ssid[IEEE80211_MAX_SSID_LEN];
- u8 ssid_len, mesh_id_len, mesh_id_up_len;
- struct cfg80211_conn *conn;
- struct cfg80211_cached_keys *connect_keys;
- enum ieee80211_bss_type conn_bss_type;
- struct list_head event_list;
- spinlock_t event_lock;
- struct cfg80211_internal_bss *current_bss;
- struct cfg80211_chan_def preset_chandef;
- struct cfg80211_chan_def chandef;
- bool ibss_fixed;
- bool ibss_dfs_possible;
- bool ps;
- int ps_timeout;
- int beacon_interval;
- u32 ap_unexpected_nlportid;
- bool cac_started;
- unsigned long cac_start_time;
- unsigned int cac_time_ms;
- u32 owner_nlportid;
-
- struct {
- struct cfg80211_ibss_params ibss;
- struct cfg80211_connect_params connect;
- struct cfg80211_cached_keys *keys;
- const u8 *ie;
- size_t ie_len;
- u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
- u8 ssid[IEEE80211_MAX_SSID_LEN];
- s8 default_key, default_mgmt_key;
- bool prev_bssid_valid;
- } wext;
- };
- static inline u8 *wdev_address(struct wireless_dev *wdev)
- {
- if (wdev->netdev)
- return wdev->netdev->dev_addr;
- return wdev->address;
- }
- static inline void *wdev_priv(struct wireless_dev *wdev)
- {
- BUG_ON(!wdev);
- return wiphy_priv(wdev->wiphy);
- }
- int ieee80211_channel_to_frequency(int chan, enum nl80211_band band);
- int ieee80211_frequency_to_channel(int freq);
- struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
- int freq);
- static inline struct ieee80211_channel *
- ieee80211_get_channel(struct wiphy *wiphy, int freq)
- {
- return __ieee80211_get_channel(wiphy, freq);
- }
- struct ieee80211_rate *
- ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
- u32 basic_rates, int bitrate);
- u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband,
- enum nl80211_bss_scan_width scan_width);
- struct radiotap_align_size {
- uint8_t align:4, size:4;
- };
- struct ieee80211_radiotap_namespace {
- const struct radiotap_align_size *align_size;
- int n_bits;
- uint32_t oui;
- uint8_t subns;
- };
- struct ieee80211_radiotap_vendor_namespaces {
- const struct ieee80211_radiotap_namespace *ns;
- int n_ns;
- };
- struct ieee80211_radiotap_iterator {
- struct ieee80211_radiotap_header *_rtheader;
- const struct ieee80211_radiotap_vendor_namespaces *_vns;
- const struct ieee80211_radiotap_namespace *current_namespace;
- unsigned char *_arg, *_next_ns_data;
- __le32 *_next_bitmap;
- unsigned char *this_arg;
- int this_arg_index;
- int this_arg_size;
- int is_radiotap_ns;
- int _max_length;
- int _arg_index;
- uint32_t _bitmap_shifter;
- int _reset_on_ext;
- };
- int
- ieee80211_radiotap_iterator_init(struct ieee80211_radiotap_iterator *iterator,
- struct ieee80211_radiotap_header *radiotap_header,
- int max_length,
- const struct ieee80211_radiotap_vendor_namespaces *vns);
- int
- ieee80211_radiotap_iterator_next(struct ieee80211_radiotap_iterator *iterator);
- extern const unsigned char rfc1042_header[6];
- extern const unsigned char bridge_tunnel_header[6];
- unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
- unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc);
- unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr);
- int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
- const u8 *addr, enum nl80211_iftype iftype);
- static inline int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
- enum nl80211_iftype iftype)
- {
- return ieee80211_data_to_8023_exthdr(skb, NULL, addr, iftype);
- }
- int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr,
- enum nl80211_iftype iftype, const u8 *bssid,
- bool qos);
- void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
- const u8 *addr, enum nl80211_iftype iftype,
- const unsigned int extra_headroom,
- const u8 *check_da, const u8 *check_sa);
- unsigned int cfg80211_classify8021d(struct sk_buff *skb,
- struct cfg80211_qos_map *qos_map);
- const u8 *cfg80211_find_ie_match(u8 eid, const u8 *ies, int len,
- const u8 *match, int match_len,
- int match_offset);
- static inline const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len)
- {
- return cfg80211_find_ie_match(eid, ies, len, NULL, 0, 0);
- }
- const u8 *cfg80211_find_vendor_ie(unsigned int oui, int oui_type,
- const u8 *ies, int len);
- int regulatory_hint(struct wiphy *wiphy, const char *alpha2);
- int regulatory_set_wiphy_regd(struct wiphy *wiphy,
- struct ieee80211_regdomain *rd);
- int regulatory_set_wiphy_regd_sync_rtnl(struct wiphy *wiphy,
- struct ieee80211_regdomain *rd);
- void wiphy_apply_custom_regulatory(struct wiphy *wiphy,
- const struct ieee80211_regdomain *regd);
- const struct ieee80211_reg_rule *freq_reg_info(struct wiphy *wiphy,
- u32 center_freq);
- const char *reg_initiator_name(enum nl80211_reg_initiator initiator);
- void cfg80211_scan_done(struct cfg80211_scan_request *request,
- struct cfg80211_scan_info *info);
- void cfg80211_sched_scan_results(struct wiphy *wiphy);
- void cfg80211_sched_scan_stopped(struct wiphy *wiphy);
- void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy);
- struct cfg80211_bss * __must_check
- cfg80211_inform_bss_frame_data(struct wiphy *wiphy,
- struct cfg80211_inform_bss *data,
- struct ieee80211_mgmt *mgmt, size_t len,
- gfp_t gfp);
- static inline struct cfg80211_bss * __must_check
- cfg80211_inform_bss_width_frame(struct wiphy *wiphy,
- struct ieee80211_channel *rx_channel,
- enum nl80211_bss_scan_width scan_width,
- struct ieee80211_mgmt *mgmt, size_t len,
- s32 signal, gfp_t gfp)
- {
- struct cfg80211_inform_bss data = {
- .chan = rx_channel,
- .scan_width = scan_width,
- .signal = signal,
- };
- return cfg80211_inform_bss_frame_data(wiphy, &data, mgmt, len, gfp);
- }
- static inline struct cfg80211_bss * __must_check
- cfg80211_inform_bss_frame(struct wiphy *wiphy,
- struct ieee80211_channel *rx_channel,
- struct ieee80211_mgmt *mgmt, size_t len,
- s32 signal, gfp_t gfp)
- {
- struct cfg80211_inform_bss data = {
- .chan = rx_channel,
- .scan_width = NL80211_BSS_CHAN_WIDTH_20,
- .signal = signal,
- };
- return cfg80211_inform_bss_frame_data(wiphy, &data, mgmt, len, gfp);
- }
- enum cfg80211_bss_frame_type {
- CFG80211_BSS_FTYPE_UNKNOWN,
- CFG80211_BSS_FTYPE_BEACON,
- CFG80211_BSS_FTYPE_PRESP,
- };
- struct cfg80211_bss * __must_check
- cfg80211_inform_bss_data(struct wiphy *wiphy,
- struct cfg80211_inform_bss *data,
- enum cfg80211_bss_frame_type ftype,
- const u8 *bssid, u64 tsf, u16 capability,
- u16 beacon_interval, const u8 *ie, size_t ielen,
- gfp_t gfp);
- static inline struct cfg80211_bss * __must_check
- cfg80211_inform_bss_width(struct wiphy *wiphy,
- struct ieee80211_channel *rx_channel,
- enum nl80211_bss_scan_width scan_width,
- enum cfg80211_bss_frame_type ftype,
- const u8 *bssid, u64 tsf, u16 capability,
- u16 beacon_interval, const u8 *ie, size_t ielen,
- s32 signal, gfp_t gfp)
- {
- struct cfg80211_inform_bss data = {
- .chan = rx_channel,
- .scan_width = scan_width,
- .signal = signal,
- };
- return cfg80211_inform_bss_data(wiphy, &data, ftype, bssid, tsf,
- capability, beacon_interval, ie, ielen,
- gfp);
- }
- static inline struct cfg80211_bss * __must_check
- cfg80211_inform_bss(struct wiphy *wiphy,
- struct ieee80211_channel *rx_channel,
- enum cfg80211_bss_frame_type ftype,
- const u8 *bssid, u64 tsf, u16 capability,
- u16 beacon_interval, const u8 *ie, size_t ielen,
- s32 signal, gfp_t gfp)
- {
- struct cfg80211_inform_bss data = {
- .chan = rx_channel,
- .scan_width = NL80211_BSS_CHAN_WIDTH_20,
- .signal = signal,
- };
- return cfg80211_inform_bss_data(wiphy, &data, ftype, bssid, tsf,
- capability, beacon_interval, ie, ielen,
- gfp);
- }
- struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
- struct ieee80211_channel *channel,
- const u8 *bssid,
- const u8 *ssid, size_t ssid_len,
- enum ieee80211_bss_type bss_type,
- enum ieee80211_privacy);
- static inline struct cfg80211_bss *
- cfg80211_get_ibss(struct wiphy *wiphy,
- struct ieee80211_channel *channel,
- const u8 *ssid, size_t ssid_len)
- {
- return cfg80211_get_bss(wiphy, channel, NULL, ssid, ssid_len,
- IEEE80211_BSS_TYPE_IBSS,
- IEEE80211_PRIVACY_ANY);
- }
- void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
- void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
- void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
- static inline enum nl80211_bss_scan_width
- cfg80211_chandef_to_scan_width(const struct cfg80211_chan_def *chandef)
- {
- switch (chandef->width) {
- case NL80211_CHAN_WIDTH_5:
- return NL80211_BSS_CHAN_WIDTH_5;
- case NL80211_CHAN_WIDTH_10:
- return NL80211_BSS_CHAN_WIDTH_10;
- default:
- return NL80211_BSS_CHAN_WIDTH_20;
- }
- }
- void cfg80211_rx_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len);
- void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr);
- void cfg80211_rx_assoc_resp(struct net_device *dev,
- struct cfg80211_bss *bss,
- const u8 *buf, size_t len,
- int uapsd_queues);
- void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss);
- void cfg80211_abandon_assoc(struct net_device *dev, struct cfg80211_bss *bss);
- void cfg80211_tx_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len);
- void cfg80211_rx_unprot_mlme_mgmt(struct net_device *dev,
- const u8 *buf, size_t len);
- void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
- enum nl80211_key_type key_type, int key_id,
- const u8 *tsc, gfp_t gfp);
- void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
- struct ieee80211_channel *channel, gfp_t gfp);
- void cfg80211_notify_new_peer_candidate(struct net_device *dev,
- const u8 *macaddr, const u8 *ie, u8 ie_len, gfp_t gfp);
- void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool blocked);
- void wiphy_rfkill_start_polling(struct wiphy *wiphy);
- void wiphy_rfkill_stop_polling(struct wiphy *wiphy);
- struct sk_buff *__cfg80211_alloc_reply_skb(struct wiphy *wiphy,
- enum nl80211_commands cmd,
- enum nl80211_attrs attr,
- int approxlen);
- struct sk_buff *__cfg80211_alloc_event_skb(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- enum nl80211_commands cmd,
- enum nl80211_attrs attr,
- int vendor_event_idx,
- int approxlen, gfp_t gfp);
- void __cfg80211_send_event_skb(struct sk_buff *skb, gfp_t gfp);
- static inline struct sk_buff *
- cfg80211_vendor_cmd_alloc_reply_skb(struct wiphy *wiphy, int approxlen)
- {
- return __cfg80211_alloc_reply_skb(wiphy, NL80211_CMD_VENDOR,
- NL80211_ATTR_VENDOR_DATA, approxlen);
- }
- int cfg80211_vendor_cmd_reply(struct sk_buff *skb);
- static inline struct sk_buff *
- cfg80211_vendor_event_alloc(struct wiphy *wiphy, struct wireless_dev *wdev,
- int approxlen, int event_idx, gfp_t gfp)
- {
- return __cfg80211_alloc_event_skb(wiphy, wdev, NL80211_CMD_VENDOR,
- NL80211_ATTR_VENDOR_DATA,
- event_idx, approxlen, gfp);
- }
- static inline void cfg80211_vendor_event(struct sk_buff *skb, gfp_t gfp)
- {
- __cfg80211_send_event_skb(skb, gfp);
- }
- static inline struct sk_buff *
- cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy, int approxlen)
- {
- return __cfg80211_alloc_reply_skb(wiphy, NL80211_CMD_TESTMODE,
- NL80211_ATTR_TESTDATA, approxlen);
- }
- static inline int cfg80211_testmode_reply(struct sk_buff *skb)
- {
- return cfg80211_vendor_cmd_reply(skb);
- }
- static inline struct sk_buff *
- cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy, int approxlen, gfp_t gfp)
- {
- return __cfg80211_alloc_event_skb(wiphy, NULL, NL80211_CMD_TESTMODE,
- NL80211_ATTR_TESTDATA, -1,
- approxlen, gfp);
- }
- static inline void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp)
- {
- __cfg80211_send_event_skb(skb, gfp);
- }
- void cfg80211_connect_bss(struct net_device *dev, const u8 *bssid,
- struct cfg80211_bss *bss, const u8 *req_ie,
- size_t req_ie_len, const u8 *resp_ie,
- size_t resp_ie_len, int status, gfp_t gfp);
- static inline void
- cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
- const u8 *req_ie, size_t req_ie_len,
- const u8 *resp_ie, size_t resp_ie_len,
- u16 status, gfp_t gfp)
- {
- cfg80211_connect_bss(dev, bssid, NULL, req_ie, req_ie_len, resp_ie,
- resp_ie_len, status, gfp);
- }
- static inline void
- cfg80211_connect_timeout(struct net_device *dev, const u8 *bssid,
- const u8 *req_ie, size_t req_ie_len, gfp_t gfp)
- {
- cfg80211_connect_bss(dev, bssid, NULL, req_ie, req_ie_len, NULL, 0, -1,
- gfp);
- }
- void cfg80211_roamed(struct net_device *dev,
- struct ieee80211_channel *channel,
- const u8 *bssid,
- const u8 *req_ie, size_t req_ie_len,
- const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp);
- void cfg80211_roamed_bss(struct net_device *dev, struct cfg80211_bss *bss,
- const u8 *req_ie, size_t req_ie_len,
- const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp);
- void cfg80211_disconnected(struct net_device *dev, u16 reason,
- const u8 *ie, size_t ie_len,
- bool locally_generated, gfp_t gfp);
- void cfg80211_ready_on_channel(struct wireless_dev *wdev, u64 cookie,
- struct ieee80211_channel *chan,
- unsigned int duration, gfp_t gfp);
- void cfg80211_remain_on_channel_expired(struct wireless_dev *wdev, u64 cookie,
- struct ieee80211_channel *chan,
- gfp_t gfp);
- void cfg80211_new_sta(struct net_device *dev, const u8 *mac_addr,
- struct station_info *sinfo, gfp_t gfp);
- void cfg80211_del_sta_sinfo(struct net_device *dev, const u8 *mac_addr,
- struct station_info *sinfo, gfp_t gfp);
- static inline void cfg80211_del_sta(struct net_device *dev,
- const u8 *mac_addr, gfp_t gfp)
- {
- cfg80211_del_sta_sinfo(dev, mac_addr, NULL, gfp);
- }
- void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr,
- enum nl80211_connect_failed_reason reason,
- gfp_t gfp);
- bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
- const u8 *buf, size_t len, u32 flags);
- void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie,
- const u8 *buf, size_t len, bool ack, gfp_t gfp);
- void cfg80211_cqm_rssi_notify(struct net_device *dev,
- enum nl80211_cqm_rssi_threshold_event rssi_event,
- gfp_t gfp);
- void cfg80211_cqm_pktloss_notify(struct net_device *dev,
- const u8 *peer, u32 num_packets, gfp_t gfp);
- void cfg80211_cqm_txe_notify(struct net_device *dev, const u8 *peer,
- u32 num_packets, u32 rate, u32 intvl, gfp_t gfp);
- void cfg80211_cqm_beacon_loss_notify(struct net_device *dev, gfp_t gfp);
- void cfg80211_radar_event(struct wiphy *wiphy,
- struct cfg80211_chan_def *chandef, gfp_t gfp);
- void cfg80211_cac_event(struct net_device *netdev,
- const struct cfg80211_chan_def *chandef,
- enum nl80211_radar_event event, gfp_t gfp);
- void cfg80211_gtk_rekey_notify(struct net_device *dev, const u8 *bssid,
- const u8 *replay_ctr, gfp_t gfp);
- void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index,
- const u8 *bssid, bool preauth, gfp_t gfp);
- bool cfg80211_rx_spurious_frame(struct net_device *dev,
- const u8 *addr, gfp_t gfp);
- bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev,
- const u8 *addr, gfp_t gfp);
- void cfg80211_probe_status(struct net_device *dev, const u8 *addr,
- u64 cookie, bool acked, gfp_t gfp);
- void cfg80211_report_obss_beacon(struct wiphy *wiphy,
- const u8 *frame, size_t len,
- int freq, int sig_dbm);
- bool cfg80211_reg_can_beacon(struct wiphy *wiphy,
- struct cfg80211_chan_def *chandef,
- enum nl80211_iftype iftype);
- bool cfg80211_reg_can_beacon_relax(struct wiphy *wiphy,
- struct cfg80211_chan_def *chandef,
- enum nl80211_iftype iftype);
- void cfg80211_ch_switch_notify(struct net_device *dev,
- struct cfg80211_chan_def *chandef);
- void cfg80211_ch_switch_started_notify(struct net_device *dev,
- struct cfg80211_chan_def *chandef,
- u8 count);
- bool ieee80211_operating_class_to_band(u8 operating_class,
- enum nl80211_band *band);
- bool ieee80211_chandef_to_operating_class(struct cfg80211_chan_def *chandef,
- u8 *op_class);
- void cfg80211_tdls_oper_request(struct net_device *dev, const u8 *peer,
- enum nl80211_tdls_operation oper,
- u16 reason_code, gfp_t gfp);
- u32 cfg80211_calculate_bitrate(struct rate_info *rate);
- void cfg80211_unregister_wdev(struct wireless_dev *wdev);
- struct cfg80211_ft_event_params {
- const u8 *ies;
- size_t ies_len;
- const u8 *target_ap;
- const u8 *ric_ies;
- size_t ric_ies_len;
- };
- void cfg80211_ft_event(struct net_device *netdev,
- struct cfg80211_ft_event_params *ft_event);
- int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len,
- enum ieee80211_p2p_attr_id attr,
- u8 *buf, unsigned int bufsize);
- size_t ieee80211_ie_split_ric(const u8 *ies, size_t ielen,
- const u8 *ids, int n_ids,
- const u8 *after_ric, int n_after_ric,
- size_t offset);
- static inline size_t ieee80211_ie_split(const u8 *ies, size_t ielen,
- const u8 *ids, int n_ids, size_t offset)
- {
- return ieee80211_ie_split_ric(ies, ielen, ids, n_ids, NULL, 0, offset);
- }
- void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
- struct cfg80211_wowlan_wakeup *wakeup,
- gfp_t gfp);
- void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp);
- unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy);
- int cfg80211_check_combinations(struct wiphy *wiphy,
- const int num_different_channels,
- const u8 radar_detect,
- const int iftype_num[NUM_NL80211_IFTYPES]);
- int cfg80211_iter_combinations(struct wiphy *wiphy,
- const int num_different_channels,
- const u8 radar_detect,
- const int iftype_num[NUM_NL80211_IFTYPES],
- void (*iter)(const struct ieee80211_iface_combination *c,
- void *data),
- void *data);
- void cfg80211_stop_iface(struct wiphy *wiphy, struct wireless_dev *wdev,
- gfp_t gfp);
- void cfg80211_shutdown_all_interfaces(struct wiphy *wiphy);
- static inline void wiphy_ext_feature_set(struct wiphy *wiphy,
- enum nl80211_ext_feature_index ftidx)
- {
- u8 *ft_byte;
- ft_byte = &wiphy->ext_features[ftidx / 8];
- *ft_byte |= BIT(ftidx % 8);
- }
- static inline bool
- wiphy_ext_feature_isset(struct wiphy *wiphy,
- enum nl80211_ext_feature_index ftidx)
- {
- u8 ft_byte;
- ft_byte = wiphy->ext_features[ftidx / 8];
- return (ft_byte & BIT(ftidx % 8)) != 0;
- }
- void cfg80211_free_nan_func(struct cfg80211_nan_func *f);
- struct cfg80211_nan_match_params {
- enum nl80211_nan_function_type type;
- u8 inst_id;
- u8 peer_inst_id;
- const u8 *addr;
- u8 info_len;
- const u8 *info;
- u64 cookie;
- };
- void cfg80211_nan_match(struct wireless_dev *wdev,
- struct cfg80211_nan_match_params *match, gfp_t gfp);
- void cfg80211_nan_func_terminated(struct wireless_dev *wdev,
- u8 inst_id,
- enum nl80211_nan_func_term_reason reason,
- u64 cookie, gfp_t gfp);
- void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info);
- dev_printk(level, &(wiphy)->dev, format,
- dev_emerg(&(wiphy)->dev, format,
- dev_alert(&(wiphy)->dev, format,
- dev_crit(&(wiphy)->dev, format,
- dev_err(&(wiphy)->dev, format,
- dev_warn(&(wiphy)->dev, format,
- dev_notice(&(wiphy)->dev, format,
- dev_info(&(wiphy)->dev, format,
- wiphy_printk(KERN_DEBUG, wiphy, format,
- dev_dbg(&(wiphy)->dev, format,
- ({ \
- if (0) \
- wiphy_printk(KERN_DEBUG, wiphy, format,
- 0; \
- })
- WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy),
|