123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655 |
- #ifndef WMA_H
- #define WMA_H
- #include "a_types.h"
- #include "qdf_types.h"
- #include "osapi_linux.h"
- #include "htc_packet.h"
- #include "i_qdf_event.h"
- #include "wmi_services.h"
- #include "wmi_unified.h"
- #include "wmi_version.h"
- #include "qdf_types.h"
- #include "qdf_status.h"
- #include "cds_sched.h"
- #include "cds_config.h"
- #include "sir_mac_prot_def.h"
- #include "wma_types.h"
- #include <linux/workqueue.h>
- #include "utils_api.h"
- #include "lim_types.h"
- #include "wmi_unified_api.h"
- #include "cdp_txrx_cmn.h"
- #include "dbglog.h"
- #include "cds_ieee80211_common.h"
- #include "wlan_objmgr_psoc_obj.h"
- #include <cdp_txrx_handle.h>
- #include <wlan_policy_mgr_api.h>
- #include "wma_api.h"
- #include "wmi_unified_param.h"
- #include "wmi.h"
- #define QCA_OL_11AC_TX_MAX_FRAGS 2
- #define WMA_READY_EVENTID_TIMEOUT 6000
- #define WMA_SERVICE_READY_EXT_TIMEOUT 6000
- #define NAN_CLUSTER_ID_BYTES 4
- #define WMA_CRASH_INJECT_TIMEOUT 5000
- #define WMA_MAC_TO_PDEV_MAP(x) ((x) + (1))
- #define WMA_PDEV_TO_MAC_MAP(x) ((x) - (1))
- #define WMA_MAX_MGMT_MPDU_LEN 2000
- #define MAX_PRINT_FAILURE_CNT 50
- #define WMA_INVALID_VDEV_ID 0xFF
- #define WMA_LOGD(params ...) \
- QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_WMA, params)
- #define WMA_LOGI(params ...) \
- QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_WMA, params)
- #define WMA_LOGW(params ...) \
- QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_WMA, params)
- #define WMA_LOGE(params ...) \
- QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_WMA, params)
- #define WMA_LOGP(params ...) \
- QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_WMA, params)
- #define wma_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_WMA, params)
- #define wma_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_WMA, params)
- #define wma_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_WMA, params)
- #define wma_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_WMA, params)
- #define wma_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_WMA, params)
- #define wma_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_WMA, params)
- #define wma_err_rl(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_WMA, params)
- #define wma_nofl_alert(params...) \
- QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_WMA, params)
- #define wma_nofl_err(params...) \
- QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_WMA, params)
- #define wma_nofl_warn(params...) \
- QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_WMA, params)
- #define wma_nofl_info(params...) \
- QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_WMA, params)
- #define wma_nofl_debug(params...) \
- QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_WMA, params)
- #define WMA_DEBUG_ALWAYS
- #ifdef WMA_DEBUG_ALWAYS
- #define WMA_LOGA(params ...) \
- QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_WMA, params)
- #else
- #define WMA_LOGA(params ...)
- #endif
- #define WMA_WILDCARD_PDEV_ID 0x0
- #define WMA_HW_DEF_SCAN_MAX_DURATION 30000
- #define WMA_EAPOL_SUBTYPE_GET_MIN_LEN 21
- #define WMA_EAPOL_INFO_GET_MIN_LEN 23
- #define WMA_IS_DHCP_GET_MIN_LEN 38
- #define WMA_DHCP_SUBTYPE_GET_MIN_LEN 0x11D
- #define WMA_DHCP_INFO_GET_MIN_LEN 50
- #define WMA_ARP_SUBTYPE_GET_MIN_LEN 22
- #define WMA_IPV4_PROTO_GET_MIN_LEN 24
- #define WMA_IPV4_PKT_INFO_GET_MIN_LEN 42
- #define WMA_ICMP_SUBTYPE_GET_MIN_LEN 35
- #define WMA_IPV6_PROTO_GET_MIN_LEN 21
- #define WMA_IPV6_PKT_INFO_GET_MIN_LEN 62
- #define WMA_ICMPV6_SUBTYPE_GET_MIN_LEN 55
- #define WMA_BEACON_TX_RATE_1_M 10
- #define WMA_BEACON_TX_RATE_2_M 20
- #define WMA_BEACON_TX_RATE_5_5_M 55
- #define WMA_BEACON_TX_RATE_11_M 110
- #define WMA_BEACON_TX_RATE_6_M 60
- #define WMA_BEACON_TX_RATE_9_M 90
- #define WMA_BEACON_TX_RATE_12_M 120
- #define WMA_BEACON_TX_RATE_18_M 180
- #define WMA_BEACON_TX_RATE_24_M 240
- #define WMA_BEACON_TX_RATE_36_M 360
- #define WMA_BEACON_TX_RATE_48_M 480
- #define WMA_BEACON_TX_RATE_54_M 540
- #define WMA_ROAM_SCAN_CHANNEL_SWITCH_TIME (4)
- #define WMA_NOISE_FLOOR_DBM_DEFAULT (-96)
- #define WMA_RSSI_MIN_VALUE (-128)
- #define WMA_RSSI_MAX_VALUE (127)
- #define WMA_ROAM_RSSI_DIFF_DEFAULT (5)
- #define WMA_ROAM_DWELL_TIME_ACTIVE_DEFAULT (100)
- #define WMA_ROAM_DWELL_TIME_PASSIVE_DEFAULT (110)
- #define WMA_ROAM_MIN_REST_TIME_DEFAULT (50)
- #define WMA_ROAM_MAX_REST_TIME_DEFAULT (500)
- #define WMA_INVALID_KEY_IDX 0xff
- #define WMA_MAX_RF_CHAINS(x) ((1 << x) - 1)
- #define WMA_MIN_RF_CHAINS (1)
- #define WMA_MAX_NSS (2)
- #define WMA_NOA_IE_SIZE(num_desc) (2 + (13 * (num_desc)))
- #define WMA_MAX_NOA_DESCRIPTORS 4
- #define WMA_TIM_SUPPORTED_PVB_LENGTH ((HAL_NUM_STA / 8) + 1)
- #define WMA_BSS_STATUS_STARTED 0x1
- #define WMA_BSS_STATUS_STOPPED 0x2
- #define WMA_PEER_ASSOC_CNF_START 0x01
- #define WMA_PEER_ASSOC_TIMEOUT SIR_PEER_ASSOC_TIMEOUT
- #define WMA_DELETE_STA_RSP_START 0x02
- #define WMA_DELETE_STA_TIMEOUT SIR_DELETE_STA_TIMEOUT
- #define WMA_DEL_P2P_SELF_STA_RSP_START 0x03
- #define WMA_SET_LINK_PEER_RSP 0x04
- #define WMA_DELETE_PEER_RSP 0x05
- #define WMA_PDEV_SET_HW_MODE_RESP 0x06
- #define WMA_PDEV_MAC_CFG_RESP 0x07
- #define WMA_VDEV_PLCY_MGR_TIMEOUT SIR_VDEV_PLCY_MGR_TIMEOUT
- #define WMA_VDEV_HW_MODE_REQUEST_TIMEOUT WMA_VDEV_PLCY_MGR_TIMEOUT
- #define WMA_VDEV_DUAL_MAC_CFG_TIMEOUT WMA_VDEV_PLCY_MGR_TIMEOUT
- #define WMA_VDEV_PLCY_MGR_WAKE_LOCK_TIMEOUT \
- (WMA_VDEV_PLCY_MGR_TIMEOUT + 500)
- #define WMA_VDEV_SET_KEY_WAKELOCK_TIMEOUT WAKELOCK_DURATION_RECOMMENDED
- #define WMA_TX_Q_RECHECK_TIMER_WAIT 2
- #define WMA_MAX_NUM_ARGS 8
- #define WMA_SMPS_PARAM_VALUE_S 29
- #define WMA_TX_FRAME_COMPLETE_TIMEOUT 1000
- #define WMA_TX_FRAME_BUFFER_NO_FREE 0
- #define WMA_TX_FRAME_BUFFER_FREE 1
- #define WMI_CMDID_MAX (WMI_TXBF_CMDID + 1)
- #define WMA_NLO_FREQ_THRESH 1000
- #define WMA_MSEC_TO_USEC(msec) (msec * 1000)
- #define WMA_AUTH_REQ_RECV_WAKE_LOCK_TIMEOUT WAKELOCK_DURATION_RECOMMENDED
- #define WMA_ASSOC_REQ_RECV_WAKE_LOCK_DURATION WAKELOCK_DURATION_RECOMMENDED
- #define WMA_DEAUTH_RECV_WAKE_LOCK_DURATION WAKELOCK_DURATION_RECOMMENDED
- #define WMA_DISASSOC_RECV_WAKE_LOCK_DURATION WAKELOCK_DURATION_RECOMMENDED
- #define WMA_ROAM_HO_WAKE_LOCK_DURATION (500)
- #define WMA_ROAM_PREAUTH_WAKE_LOCK_DURATION (2 * 1000)
- #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
- #define WMA_AUTO_SHUTDOWN_WAKE_LOCK_DURATION WAKELOCK_DURATION_RECOMMENDED
- #endif
- #define WMA_BMISS_EVENT_WAKE_LOCK_DURATION WAKELOCK_DURATION_RECOMMENDED
- #define WMA_FW_RSP_EVENT_WAKE_LOCK_DURATION WAKELOCK_DURATION_MAX
- #define WMA_TXMIC_LEN 8
- #define WMA_RXMIC_LEN 8
- #define WMA_IV_KEY_LEN 16
- #define WMA_P2P_NOA_IE_OPP_PS_SET (0x80)
- #define WMA_P2P_NOA_IE_CTWIN_MASK (0x7F)
- #define WMA_P2P_IE_ID 0xdd
- #define WMA_P2P_WFA_OUI { 0x50, 0x6f, 0x9a }
- #define WMA_P2P_WFA_VER 0x09
- #define WMA_P2P_SUB_ELEMENT_STATUS 0
- #define WMA_P2P_SUB_ELEMENT_MINOR_REASON 1
- #define WMA_P2P_SUB_ELEMENT_CAPABILITY 2
- #define WMA_P2P_SUB_ELEMENT_DEVICE_ID 3
- #define WMA_P2P_SUB_ELEMENT_GO_INTENT 4
- #define WMA_P2P_SUB_ELEMENT_CONFIGURATION_TIMEOUT 5
- #define WMA_P2P_SUB_ELEMENT_LISTEN_CHANNEL 6
- #define WMA_P2P_SUB_ELEMENT_GROUP_BSSID 7
- #define WMA_P2P_SUB_ELEMENT_EXTENDED_LISTEN_TIMING 8
- #define WMA_P2P_SUB_ELEMENT_INTENDED_INTERFACE_ADDR 9
- #define WMA_P2P_SUB_ELEMENT_MANAGEABILITY 10
- #define WMA_P2P_SUB_ELEMENT_CHANNEL_LIST 11
- #define WMA_P2P_SUB_ELEMENT_NOA 12
- #define WMA_P2P_SUB_ELEMENT_DEVICE_INFO 13
- #define WMA_P2P_SUB_ELEMENT_GROUP_INFO 14
- #define WMA_P2P_SUB_ELEMENT_GROUP_ID 15
- #define WMA_P2P_SUB_ELEMENT_INTERFACE 16
- #define WMA_P2P_SUB_ELEMENT_OP_CHANNEL 17
- #define WMA_P2P_SUB_ELEMENT_INVITATION_FLAGS 18
- #define WMA_P2P_SUB_ELEMENT_VENDOR 221
- #define P2PIE_PUT_LE16(a, val) \
- do { \
- (a)[1] = ((uint16_t) (val)) >> 8; \
- (a)[0] = ((uint16_t) (val)) & 0xff; \
- } while (0)
- #define P2PIE_PUT_LE32(a, val) \
- do { \
- (a)[3] = (uint8_t) ((((uint32_t) (val)) >> 24) & 0xff); \
- (a)[2] = (uint8_t) ((((uint32_t) (val)) >> 16) & 0xff); \
- (a)[1] = (uint8_t) ((((uint32_t) (val)) >> 8) & 0xff); \
- (a)[0] = (uint8_t) (((uint32_t) (val)) & 0xff); \
- } while (0)
- #define WMA_DEFAULT_MAX_PSPOLL_BEFORE_WAKE 1
- #define WMA_VHT_PPS_PAID_MATCH 1
- #define WMA_VHT_PPS_GID_MATCH 2
- #define WMA_VHT_PPS_DELIM_CRC_FAIL 3
- #define WMA_DEFAULT_HW_MODE_INDEX 0xFFFF
- #define TWO_THIRD (2/3)
- #define WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
- #define WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
- #define WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
- #define WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
- #define WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
- #define WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
- #define WMA_HW_MODE_DBS_MODE_BITPOS (7)
- #define WMA_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
- #define WMA_HW_MODE_SBS_MODE_BITPOS (5)
- #define WMA_HW_MODE_MAC0_TX_STREAMS_MASK \
- (0xf << WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS)
- #define WMA_HW_MODE_MAC0_RX_STREAMS_MASK \
- (0xf << WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS)
- #define WMA_HW_MODE_MAC1_TX_STREAMS_MASK \
- (0xf << WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS)
- #define WMA_HW_MODE_MAC1_RX_STREAMS_MASK \
- (0xf << WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS)
- #define WMA_HW_MODE_MAC0_BANDWIDTH_MASK \
- (0xf << WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS)
- #define WMA_HW_MODE_MAC1_BANDWIDTH_MASK \
- (0xf << WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS)
- #define WMA_HW_MODE_DBS_MODE_MASK \
- (0x1 << WMA_HW_MODE_DBS_MODE_BITPOS)
- #define WMA_HW_MODE_AGILE_DFS_MODE_MASK \
- (0x1 << WMA_HW_MODE_AGILE_DFS_MODE_BITPOS)
- #define WMA_HW_MODE_SBS_MODE_MASK \
- (0x1 << WMA_HW_MODE_SBS_MODE_BITPOS)
- #define WMA_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
- WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
- #define WMA_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
- WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
- #define WMA_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
- WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
- #define WMA_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
- WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
- #define WMA_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
- WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
- #define WMA_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
- WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
- #define WMA_HW_MODE_DBS_MODE_SET(hw_mode, value) \
- WMI_SET_BITS(hw_mode, WMA_HW_MODE_DBS_MODE_BITPOS, 1, value)
- #define WMA_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
- WMI_SET_BITS(hw_mode, WMA_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
- #define WMA_HW_MODE_SBS_MODE_SET(hw_mode, value) \
- WMI_SET_BITS(hw_mode, WMA_HW_MODE_SBS_MODE_BITPOS, 1, value)
- #define WMA_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
- ((hw_mode & WMA_HW_MODE_MAC0_TX_STREAMS_MASK) >> \
- WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS)
- #define WMA_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
- ((hw_mode & WMA_HW_MODE_MAC0_RX_STREAMS_MASK) >> \
- WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS)
- #define WMA_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
- ((hw_mode & WMA_HW_MODE_MAC1_TX_STREAMS_MASK) >> \
- WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS)
- #define WMA_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
- ((hw_mode & WMA_HW_MODE_MAC1_RX_STREAMS_MASK) >> \
- WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS)
- #define WMA_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
- ((hw_mode & WMA_HW_MODE_MAC0_BANDWIDTH_MASK) >> \
- WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS)
- #define WMA_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
- ((hw_mode & WMA_HW_MODE_MAC1_BANDWIDTH_MASK) >> \
- WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS)
- #define WMA_HW_MODE_DBS_MODE_GET(hw_mode) \
- ((hw_mode & WMA_HW_MODE_DBS_MODE_MASK) >> \
- WMA_HW_MODE_DBS_MODE_BITPOS)
- #define WMA_HW_MODE_AGILE_DFS_GET(hw_mode) \
- ((hw_mode & WMA_HW_MODE_AGILE_DFS_MODE_MASK) >> \
- WMA_HW_MODE_AGILE_DFS_MODE_BITPOS)
- #define WMA_HW_MODE_SBS_MODE_GET(hw_mode) \
- ((hw_mode & WMA_HW_MODE_SBS_MODE_MASK) >> \
- WMA_HW_MODE_SBS_MODE_BITPOS)
- #define EXTRACT_TX_CHAIN_MASK_2G(chainmask) ((chainmask) & 0xFF)
- #define EXTRACT_RX_CHAIN_MASK_2G(chainmask) (((chainmask) >> 8) & 0xFF)
- #define EXTRACT_TX_CHAIN_MASK_5G(chainmask) (((chainmask) >> 16) & 0xFF)
- #define EXTRACT_RX_CHAIN_MASK_5G(chainmask) (((chainmask) >> 24) & 0xFF)
- #define PROBE_REQ_TX_DELAY 10
- #define PROBE_REQ_TX_TIME_GAP 20
- typedef void (*txFailIndCallback)(uint8_t *peer_mac, uint8_t seqNo);
- enum wma_rx_exec_ctx {
- WMA_RX_WORK_CTX = WMI_RX_WORK_CTX,
- WMA_RX_TASKLET_CTX = WMI_RX_TASKLET_CTX,
- WMA_RX_SERIALIZER_CTX = WMI_RX_SERIALIZER_CTX,
- };
- struct beacon_info {
- qdf_nbuf_t buf;
- uint32_t len;
- uint8_t dma_mapped;
- uint32_t tim_ie_offset;
- uint8_t dtim_count;
- uint16_t seq_no;
- uint8_t noa_sub_ie[2 + WMA_NOA_IE_SIZE(WMA_MAX_NOA_DESCRIPTORS)];
- uint16_t noa_sub_ie_len;
- uint8_t *noa_ie;
- uint16_t p2p_ie_offset;
- qdf_spinlock_t lock;
- };
- struct beacon_tim_ie {
- uint8_t tim_ie;
- uint8_t tim_len;
- uint8_t dtim_count;
- uint8_t dtim_period;
- uint8_t tim_bitctl;
- uint8_t tim_bitmap[1];
- } __ATTRIB_PACK;
- struct pps {
- bool paid_match_enable;
- bool gid_match_enable;
- bool tim_clear;
- bool dtim_clear;
- bool eof_delim;
- bool mac_match;
- bool delim_fail;
- bool nsts_zero;
- bool rssi_chk;
- bool ebt_5g;
- };
- struct qpower_params {
- uint32_t max_ps_poll_cnt;
- uint32_t max_tx_before_wake;
- uint32_t spec_ps_poll_wake_interval;
- uint32_t max_spec_nodata_ps_poll;
- };
- typedef struct {
- uint32_t gtxRTMask[2];
- uint32_t gtxUsrcfg;
- uint32_t gtxPERThreshold;
- uint32_t gtxPERMargin;
- uint32_t gtxTPCstep;
- uint32_t gtxTPCMin;
- uint32_t gtxBWMask;
- } gtx_config_t;
- typedef struct {
- uint32_t ani_enable;
- uint32_t ani_poll_len;
- uint32_t ani_listen_len;
- uint32_t ani_ofdm_level;
- uint32_t ani_cck_level;
- uint32_t cwmenable;
- uint32_t cts_cbw;
- uint32_t txchainmask;
- uint32_t rxchainmask;
- uint32_t txpow2g;
- uint32_t txpow5g;
- } pdev_cli_config_t;
- typedef struct {
- uint32_t nss;
- uint32_t ldpc;
- uint32_t tx_stbc;
- uint32_t rx_stbc;
- uint32_t shortgi;
- uint32_t rtscts_en;
- uint32_t chwidth;
- uint32_t tx_rate;
- uint32_t ampdu;
- uint32_t amsdu;
- uint32_t erx_adjust;
- uint32_t erx_bmiss_num;
- uint32_t erx_bmiss_cycle;
- uint32_t erx_slop_step;
- uint32_t erx_init_slop;
- uint32_t erx_adj_pause;
- uint32_t erx_dri_sample;
- struct pps pps_params;
- struct qpower_params qpower_params;
- gtx_config_t gtx_info;
- #ifdef WLAN_FEATURE_11AX
- uint8_t dcm;
- uint8_t range_ext;
- #endif
- } vdev_cli_config_t;
- struct wma_version_info {
- u_int32_t major;
- u_int32_t minor;
- u_int32_t revision;
- };
- #ifdef WLAN_FEATURE_11W
- #define CMAC_IPN_LEN (6)
- #define WMA_IGTK_KEY_INDEX_4 (4)
- #define WMA_IGTK_KEY_INDEX_5 (5)
- typedef struct {
- uint8_t ipn[CMAC_IPN_LEN];
- } wma_igtk_ipn_t;
- typedef struct {
- uint16_t key_length;
- uint8_t key[CSR_AES_GMAC_256_KEY_LEN];
-
- wma_igtk_ipn_t key_id[2];
- uint32_t key_cipher;
- } wma_igtk_key_t;
- #endif
- struct roam_synch_frame_ind {
- uint32_t bcn_probe_rsp_len;
- uint8_t *bcn_probe_rsp;
- uint8_t is_beacon;
- uint32_t reassoc_req_len;
- uint8_t *reassoc_req;
- uint32_t reassoc_rsp_len;
- uint8_t *reassoc_rsp;
- };
- #define INVALID_PEER_MAX_NUM 5
- struct wma_invalid_peer_params {
- uint8_t rx_macaddr[QDF_MAC_ADDR_SIZE];
- };
- struct wma_txrx_node {
- struct wlan_objmgr_vdev *vdev;
- struct beacon_info *beacon;
- vdev_cli_config_t config;
- uint32_t type;
- uint32_t sub_type;
- #ifdef FEATURE_WLAN_ESE
- bool plm_in_progress;
- #endif
- tSirMacBeaconInterval beaconInterval;
- uint8_t llbCoexist;
- uint8_t shortSlotTimeSupported;
- uint8_t dtimPeriod;
- A_UINT32 mhz;
- enum phy_ch_width chan_width;
- bool vdev_active;
- uint64_t tsfadjust;
- tAddStaParams *addBssStaContext;
- uint8_t aid;
- uint8_t rmfEnabled;
- #ifdef WLAN_FEATURE_11W
- wma_igtk_key_t key;
- #endif
- uint32_t uapsd_cached_val;
- void *del_staself_req;
- bool is_del_sta_defered;
- qdf_atomic_t bss_status;
- enum tx_rate_info rate_flags;
- uint8_t nss;
- uint16_t pause_bitmap;
- uint32_t nwType;
- tSetStaKeyParams *staKeyParams;
- uint32_t peer_count;
- bool roam_synch_in_progress;
- void *plink_status_req;
- void *psnr_req;
- uint8_t delay_before_vdev_stop;
- #ifdef FEATURE_WLAN_EXTSCAN
- bool extscan_in_progress;
- #endif
- uint32_t tx_streams;
- uint32_t mac_id;
- bool roaming_in_progress;
- int32_t roam_synch_delay;
- uint8_t wep_default_key_idx;
- struct sme_rcpi_req *rcpi_req;
- bool in_bmps;
- struct beacon_filter_param beacon_filter;
- bool beacon_filter_enabled;
- qdf_wake_lock_t vdev_set_key_wakelock;
- qdf_runtime_lock_t vdev_set_key_runtime_wakelock;
- struct roam_synch_frame_ind roam_synch_frame_ind;
- bool is_waiting_for_key;
- uint32_t ch_freq;
- uint16_t ch_flagext;
- struct sir_roam_scan_stats *roam_scan_stats_req;
- struct wma_invalid_peer_params invalid_peers[INVALID_PEER_MAX_NUM];
- uint8_t invalid_peer_idx;
- };
- typedef struct {
- uint32_t atimWindowLength;
- uint32_t isPowerSaveAllowed;
- uint32_t isPowerCollapseAllowed;
- uint32_t isAwakeonTxRxEnabled;
- uint32_t inactivityCount;
- uint32_t txSPEndInactivityTime;
- uint32_t ibssPsWarmupTime;
- uint32_t ibssPs1RxChainInAtimEnable;
- } ibss_power_save_params;
- struct mac_ss_bw_info {
- uint32_t mac_tx_stream;
- uint32_t mac_rx_stream;
- uint32_t mac_bw;
- };
- struct wma_ini_config {
- uint8_t max_no_of_peers;
- };
- struct wma_valid_channels {
- uint8_t num_channels;
- uint32_t ch_freq_list[MAX_NUM_CHAN];
- };
- #ifdef FEATURE_WLM_STATS
- struct wma_wlm_stats_data {
- uint32_t wlm_stats_max_size;
- void *wlm_stats_cookie;
- wma_wlm_stats_cb wlm_stats_callback;
- };
- #endif
- typedef struct {
- void *wmi_handle;
- void *cds_context;
- struct mac_context *mac_context;
- struct wlan_objmgr_psoc *psoc;
- struct wlan_objmgr_pdev *pdev;
- qdf_event_t target_suspend;
- qdf_event_t runtime_suspend;
- qdf_event_t recovery_event;
- uint16_t max_station;
- uint16_t max_bssid;
- uint8_t myaddr[QDF_MAC_ADDR_SIZE];
- uint8_t hwaddr[QDF_MAC_ADDR_SIZE];
- #ifdef WLAN_FEATURE_LPSS
- uint8_t lpss_support;
- #endif
- uint8_t ap_arpns_support;
- bool wmi_ready;
- uint32_t wlan_init_status;
- qdf_device_t qdf_dev;
- uint32_t wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
- uint32_t wmi_service_ext_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
- wma_tx_dwnld_comp_callback tx_frm_download_comp_cb;
- qdf_event_t tx_frm_download_comp_event;
- qdf_event_t tx_queue_empty_event;
- wma_tx_ota_comp_callback umac_data_ota_ack_cb;
- unsigned long last_umac_data_ota_timestamp;
- qdf_nbuf_t last_umac_data_nbuf;
- bool needShutdown;
- wma_tgt_cfg_cb tgt_cfg_update_cb;
- HAL_REG_CAPABILITIES reg_cap;
- uint32_t scan_id;
- struct wma_txrx_node *interfaces;
- pdev_cli_config_t pdevconfig;
- qdf_list_t wma_hold_req_queue;
- qdf_spinlock_t wma_hold_req_q_lock;
- uint32_t vht_supp_mcs;
- uint8_t is_fw_assert;
- struct wma_tx_ack_work_ctx *ack_work_ctx;
- uint8_t powersave_mode;
- void *pGetRssiReq;
- bool get_one_peer_info;
- struct qdf_mac_addr peer_macaddr;
- t_thermal_mgmt thermal_mgmt_info;
- bool enable_mc_list;
- uint8_t ibss_started;
- tSetBssKeyParams ibsskey_info;
- txFailIndCallback hddTxFailCb;
- #ifdef FEATURE_WLAN_EXTSCAN
- qdf_wake_lock_t extscan_wake_lock;
- #endif
- qdf_wake_lock_t wow_wake_lock;
- qdf_wake_lock_t wow_auth_req_wl;
- qdf_wake_lock_t wow_assoc_req_wl;
- qdf_wake_lock_t wow_deauth_rec_wl;
- qdf_wake_lock_t wow_disassoc_rec_wl;
- qdf_wake_lock_t wow_ap_assoc_lost_wl;
- qdf_wake_lock_t wow_auto_shutdown_wl;
- qdf_wake_lock_t roam_ho_wl;
- qdf_wake_lock_t roam_preauth_wl;
- int wow_nack;
- qdf_atomic_t is_wow_bus_suspended;
- bool suitable_ap_hb_failure;
- uint32_t suitable_ap_hb_failure_rssi;
- ibss_power_save_params wma_ibss_power_save_params;
- #ifdef WLAN_FEATURE_LPSS
- bool is_lpass_enabled;
- #endif
- uint8_t staMaxLIModDtim;
- uint8_t staModDtim;
- uint8_t staDynamicDtim;
- uint32_t hw_bd_id;
- uint32_t hw_bd_info[HW_BD_INFO_SIZE];
- uint32_t miracast_value;
- qdf_mc_timer_t log_completion_timer;
- uint32_t num_dbs_hw_modes;
- struct dbs_hw_mode_info hw_mode;
- uint32_t old_hw_mode_index;
- uint32_t new_hw_mode_index;
- wma_peer_authorized_fp peer_authorized_cb;
- struct sir_ocb_config *ocb_config_req;
- uint16_t self_gen_frm_pwr;
- bool tx_chain_mask_cck;
- qdf_mc_timer_t service_ready_ext_timer;
- QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac,
- struct roam_offload_synch_ind *roam_synch_data,
- struct bss_description *bss_desc_ptr,
- enum sir_roam_op_code reason);
- QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac,
- uint8_t vdev_id,
- struct qdf_mac_addr bssid);
- QDF_STATUS (*pe_roam_synch_cb)(struct mac_context *mac,
- struct roam_offload_synch_ind *roam_synch_data,
- struct bss_description *bss_desc_ptr,
- enum sir_roam_op_code reason);
- QDF_STATUS (*pe_disconnect_cb) (struct mac_context *mac,
- uint8_t vdev_id,
- uint8_t *deauth_disassoc_frame,
- uint16_t deauth_disassoc_frame_len);
- qdf_wake_lock_t wmi_cmd_rsp_wake_lock;
- qdf_runtime_lock_t wmi_cmd_rsp_runtime_lock;
- qdf_runtime_lock_t sap_prevent_runtime_pm_lock;
- enum active_apf_mode active_uc_apf_mode;
- enum active_apf_mode active_mc_bc_apf_mode;
- struct wma_ini_config ini_config;
- struct wma_valid_channels saved_chan;
- bool nan_datapath_enabled;
- bool fw_timeout_crash;
- bool sub_20_support;
- bool is_dfs_offloaded;
- ol_txrx_pktdump_cb wma_mgmt_tx_packetdump_cb;
- ol_txrx_pktdump_cb wma_mgmt_rx_packetdump_cb;
- bool rcpi_enabled;
- tSirLLStatsResults *link_stats_results;
- uint64_t tx_fail_cnt;
- #ifdef FEATURE_WLM_STATS
- struct wma_wlm_stats_data wlm_data;
- #endif
- #ifdef WLAN_FEATURE_11AX
- struct he_capability he_cap;
- #endif
- uint8_t bandcapability;
- bool tx_bfee_8ss_enabled;
- bool in_imps;
- bool dynamic_nss_chains_support;
- uint8_t ito_repeat_count;
- qdf_mc_timer_t wma_fw_time_sync_timer;
- bool fw_therm_throt_support;
- bool enable_tx_compl_tsf64;
- } t_wma_handle, *tp_wma_handle;
- QDF_STATUS
- wma_vdev_nss_chain_params_send(uint8_t vdev_id,
- struct wlan_mlme_nss_chains *user_cfg);
- void wma_send_regdomain_info_to_fw(uint32_t reg_dmn, uint16_t regdmn2G,
- uint16_t regdmn5G, uint8_t ctl2G,
- uint8_t ctl5G);
- enum frame_index {
- GENERIC_NODOWNLD_NOACK_COMP_INDEX,
- GENERIC_DOWNLD_COMP_NOACK_COMP_INDEX,
- GENERIC_DOWNLD_COMP_ACK_COMP_INDEX,
- GENERIC_NODOWLOAD_ACK_COMP_INDEX,
- FRAME_INDEX_MAX
- };
- struct wma_tx_ack_work_ctx {
- tp_wma_handle wma_handle;
- uint16_t sub_type;
- int32_t status;
- qdf_work_t ack_cmp_work;
- };
- struct wma_target_req {
- qdf_mc_timer_t event_timeout;
- qdf_list_node_t node;
- void *user_data;
- uint32_t msg_type;
- uint8_t vdev_id;
- uint8_t type;
- };
- struct wma_set_key_params {
- uint8_t vdev_id;
-
- uint32_t def_key_idx;
- uint16_t key_len;
- uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
- uint8_t singl_tid_rc;
- enum eAniEdType key_type;
- uint32_t key_idx;
- bool unicast;
- uint8_t key_data[SIR_MAC_MAX_KEY_LENGTH];
- uint8_t key_rsc[WLAN_CRYPTO_RSC_SIZE];
- };
- typedef struct {
- uint16_t minTemp;
- uint16_t maxTemp;
- uint8_t thermalEnable;
- } t_thermal_cmd_params, *tp_thermal_cmd_params;
- enum wma_cfg_cmd_id {
- WMA_VDEV_TXRX_FWSTATS_ENABLE_CMDID = WMI_CMDID_MAX,
- WMA_VDEV_TXRX_FWSTATS_RESET_CMDID,
- WMA_VDEV_MCC_SET_TIME_LATENCY,
- WMA_VDEV_MCC_SET_TIME_QUOTA,
- WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE,
- WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED,
- WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED,
- WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX,
- WMA_VDEV_IBSS_SET_INACTIVITY_TIME,
- WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME,
- WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS,
- WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW,
- WMA_VDEV_TXRX_GET_IPA_UC_FW_STATS_CMDID,
- WMA_VDEV_TXRX_GET_IPA_UC_SHARING_STATS_CMDID,
- WMA_VDEV_TXRX_SET_IPA_UC_QUOTA_CMDID,
- WMA_CMD_ID_MAX
- };
- typedef struct wma_trigger_uapsd_params {
- uint32_t wmm_ac;
- uint32_t user_priority;
- uint32_t service_interval;
- uint32_t suspend_interval;
- uint32_t delay_interval;
- } t_wma_trigger_uapsd_params, *tp_wma_trigger_uapsd_params;
- enum uapsd_peer_param_max_sp {
- UAPSD_MAX_SP_LEN_UNLIMITED = 0,
- UAPSD_MAX_SP_LEN_2 = 2,
- UAPSD_MAX_SP_LEN_4 = 4,
- UAPSD_MAX_SP_LEN_6 = 6
- };
- enum uapsd_peer_param_enabled_ac {
- UAPSD_VO_ENABLED = 0x01,
- UAPSD_VI_ENABLED = 0x02,
- UAPSD_BK_ENABLED = 0x04,
- UAPSD_BE_ENABLED = 0x08
- };
- enum profile_id_t {
- PROF_CPU_IDLE,
- PROF_PPDU_PROC,
- PROF_PPDU_POST,
- PROF_HTT_TX_INPUT,
- PROF_MSDU_ENQ,
- PROF_PPDU_POST_HAL,
- PROF_COMPUTE_TX_TIME,
- PROF_MAX_ID,
- };
- struct p2p_ie {
- uint8_t p2p_id;
- uint8_t p2p_len;
- uint8_t p2p_oui[3];
- uint8_t p2p_oui_type;
- } __packed;
- struct p2p_noa_descriptor {
- uint8_t type_count;
- uint32_t duration;
- uint32_t interval;
- uint32_t start_time;
- } __packed;
- struct p2p_sub_element_noa {
- uint8_t p2p_sub_id;
- uint8_t p2p_sub_len;
- uint8_t index;
- uint8_t oppPS:1,
- ctwindow:7;
- uint8_t num_descriptors;
- struct p2p_noa_descriptor noa_descriptors[WMA_MAX_NOA_DESCRIPTORS];
- };
- struct wma_decap_info_t {
- uint8_t hdr[sizeof(struct ieee80211_qosframe_addr4)];
- int32_t hdr_len;
- };
- typedef enum {
- WMI_VDEV_PPS_PAID_MATCH = 0,
- WMI_VDEV_PPS_GID_MATCH = 1,
- WMI_VDEV_PPS_EARLY_TIM_CLEAR = 2,
- WMI_VDEV_PPS_EARLY_DTIM_CLEAR = 3,
- WMI_VDEV_PPS_EOF_PAD_DELIM = 4,
- WMI_VDEV_PPS_MACADDR_MISMATCH = 5,
- WMI_VDEV_PPS_DELIM_CRC_FAIL = 6,
- WMI_VDEV_PPS_GID_NSTS_ZERO = 7,
- WMI_VDEV_PPS_RSSI_CHECK = 8,
- WMI_VDEV_VHT_SET_GID_MGMT = 9,
- WMI_VDEV_PPS_5G_EBT = 10
- } packet_power_save;
- typedef enum {
- WMI_VDEV_PARAM_GTX_HT_MCS,
- WMI_VDEV_PARAM_GTX_VHT_MCS,
- WMI_VDEV_PARAM_GTX_USR_CFG,
- WMI_VDEV_PARAM_GTX_THRE,
- WMI_VDEV_PARAM_GTX_MARGIN,
- WMI_VDEV_PARAM_GTX_STEP,
- WMI_VDEV_PARAM_GTX_MINTPC,
- WMI_VDEV_PARAM_GTX_BW_MASK,
- } green_tx_param;
- enum uapsd_ac {
- UAPSD_BE,
- UAPSD_BK,
- UAPSD_VI,
- UAPSD_VO
- };
- QDF_STATUS wma_disable_uapsd_per_ac(tp_wma_handle wma_handle,
- uint32_t vdev_id, enum uapsd_ac ac);
- enum uapsd_up {
- UAPSD_UP_BE,
- UAPSD_UP_BK,
- UAPSD_UP_RESV,
- UAPSD_UP_EE,
- UAPSD_UP_CL,
- UAPSD_UP_VI,
- UAPSD_UP_VO,
- UAPSD_UP_NC,
- UAPSD_UP_MAX
- };
- struct wma_roam_invoke_cmd {
- uint32_t vdev_id;
- uint8_t bssid[QDF_MAC_ADDR_SIZE];
- uint32_t ch_freq;
- uint32_t frame_len;
- uint8_t *frame_buf;
- uint8_t is_same_bssid;
- bool forced_roaming;
- };
- A_UINT32 e_csr_auth_type_to_rsn_authmode(enum csr_akm_type authtype,
- eCsrEncryptionType encr);
- A_UINT32 e_csr_encryption_type_to_rsn_cipherset(eCsrEncryptionType encr);
- QDF_STATUS wma_trigger_uapsd_params(tp_wma_handle wma_handle, uint32_t vdev_id,
- tp_wma_trigger_uapsd_params
- trigger_uapsd_params);
- void wma_send_flush_logs_to_fw(tp_wma_handle wma_handle);
- void wma_log_completion_timeout(void *data);
- #ifdef FEATURE_RSSI_MONITOR
- QDF_STATUS wma_set_rssi_monitoring(tp_wma_handle wma,
- struct rssi_monitor_param *req);
- #else
- static inline
- QDF_STATUS wma_set_rssi_monitoring(tp_wma_handle wma,
- struct rssi_monitor_param *req)
- {
- return QDF_STATUS_SUCCESS;
- }
- #endif
- QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
- struct set_pcl_req *msg);
- QDF_STATUS wma_send_pdev_set_hw_mode_cmd(tp_wma_handle wma_handle,
- struct policy_mgr_hw_mode *msg);
- QDF_STATUS wma_send_pdev_set_dual_mac_config(tp_wma_handle wma_handle,
- struct policy_mgr_dual_mac_config *msg);
- QDF_STATUS wma_send_pdev_set_antenna_mode(tp_wma_handle wma_handle,
- struct sir_antenna_mode_param *msg);
- struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma,
- uint8_t vdev_id, uint32_t msg_type,
- uint8_t type, void *params,
- uint32_t timeout);
- int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params,
- uint32_t len);
- int wma_mgmt_tx_bundle_completion_handler(void *handle,
- uint8_t *cmpl_event_params, uint32_t len);
- uint32_t wma_get_vht_ch_width(void);
- QDF_STATUS
- wma_config_debug_module_cmd(wmi_unified_t wmi_handle, A_UINT32 param,
- A_UINT32 val, A_UINT32 *module_id_bitmap,
- A_UINT32 bitmap_len);
- #ifdef FEATURE_LFR_SUBNET_DETECTION
- QDF_STATUS wma_set_gateway_params(tp_wma_handle wma,
- struct gateway_update_req_param *req);
- #else
- static inline
- QDF_STATUS wma_set_gateway_params(tp_wma_handle wma,
- struct gateway_update_req_param *req)
- {
- return QDF_STATUS_SUCCESS;
- }
- #endif
- QDF_STATUS wma_lro_config_cmd(void *handle,
- struct cdp_lro_hash_config *wma_lro_cmd);
- QDF_STATUS wma_ht40_stop_obss_scan(tp_wma_handle wma_handle,
- int32_t vdev_id);
- QDF_STATUS wma_process_fw_test_cmd(WMA_HANDLE handle,
- struct set_fwtest_params *wma_fwtest);
- QDF_STATUS wma_send_ht40_obss_scanind(tp_wma_handle wma,
- struct obss_ht40_scanind *req);
- uint32_t wma_get_num_of_setbits_from_bitmask(uint32_t mask);
- #ifdef FEATURE_WLAN_APF
- int wma_get_apf_caps_event_handler(void *handle,
- u_int8_t *cmd_param_info,
- u_int32_t len);
- QDF_STATUS wma_get_apf_capabilities(tp_wma_handle wma);
- QDF_STATUS
- wma_set_apf_instructions(tp_wma_handle wma,
- struct sir_apf_set_offload *apf_set_offload);
- QDF_STATUS wma_send_apf_enable_cmd(WMA_HANDLE handle, uint8_t vdev_id,
- bool apf_enable);
- QDF_STATUS
- wma_send_apf_write_work_memory_cmd(WMA_HANDLE handle,
- struct wmi_apf_write_memory_params
- *write_params);
- QDF_STATUS
- wma_send_apf_read_work_memory_cmd(WMA_HANDLE handle,
- struct wmi_apf_read_memory_params
- *read_params);
- int wma_apf_read_work_memory_event_handler(void *handle, uint8_t *evt_buf,
- uint32_t len);
- #else
- static inline QDF_STATUS wma_get_apf_capabilities(tp_wma_handle wma)
- {
- return QDF_STATUS_SUCCESS;
- }
- static inline QDF_STATUS
- wma_set_apf_instructions(tp_wma_handle wma,
- struct sir_apf_set_offload *apf_set_offload)
- {
- return QDF_STATUS_SUCCESS;
- }
- #endif
- void wma_process_set_pdev_ie_req(tp_wma_handle wma,
- struct set_ie_param *ie_params);
- void wma_process_set_pdev_ht_ie_req(tp_wma_handle wma,
- struct set_ie_param *ie_params);
- void wma_process_set_pdev_vht_ie_req(tp_wma_handle wma,
- struct set_ie_param *ie_params);
- QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
- uint8_t vdev_id, void *peer,
- bool roam_synch_in_progress);
- QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
- struct cdp_vdev *vdev, uint8_t peer_addr[6],
- u_int32_t peer_type, u_int8_t vdev_id,
- bool roam_synch_in_progress);
- QDF_STATUS wma_peer_unmap_conf_cb(uint8_t vdev_id,
- uint32_t peer_id_cnt,
- uint16_t *peer_id_list);
- QDF_STATUS wma_get_cca_stats(tp_wma_handle wma_handle,
- uint8_t vdev_id);
- struct wma_ini_config *wma_get_ini_handle(tp_wma_handle wma_handle);
- enum wlan_phymode wma_chan_phy_mode(uint32_t freq, enum phy_ch_width chan_width,
- uint8_t dot11_mode);
- WMI_HOST_WLAN_PHY_MODE wma_host_to_fw_phymode(enum wlan_phymode host_phymode);
- enum wlan_phymode wma_fw_to_host_phymode(WMI_HOST_WLAN_PHY_MODE phymode);
- #ifdef FEATURE_OEM_DATA_SUPPORT
- QDF_STATUS wma_start_oem_req_cmd(tp_wma_handle wma_handle,
- struct oem_data_req *oem_data_req);
- #endif
- #ifdef FEATURE_OEM_DATA
- QDF_STATUS wma_start_oem_data_cmd(tp_wma_handle wma_handle,
- struct oem_data *oem_data);
- #endif
- QDF_STATUS wma_enable_disable_caevent_ind(tp_wma_handle wma_handle,
- uint8_t val);
- void wma_register_packetdump_callback(
- ol_txrx_pktdump_cb wma_mgmt_tx_packetdump_cb,
- ol_txrx_pktdump_cb wma_mgmt_rx_packetdump_cb);
- void wma_deregister_packetdump_callback(void);
- void wma_update_sta_inactivity_timeout(tp_wma_handle wma,
- struct sme_sta_inactivity_timeout *sta_inactivity_timer);
- int wma_form_rx_packet(qdf_nbuf_t buf,
- struct mgmt_rx_event_params *mgmt_rx_params,
- cds_pkt_t *rx_pkt);
- QDF_STATUS wma_mgmt_unified_cmd_send(struct wlan_objmgr_vdev *vdev,
- qdf_nbuf_t buf, uint32_t desc_id,
- void *mgmt_tx_params);
- #ifndef CONFIG_HL_SUPPORT
- void wma_mgmt_nbuf_unmap_cb(struct wlan_objmgr_pdev *pdev,
- qdf_nbuf_t buf);
- #else
- static inline void wma_mgmt_nbuf_unmap_cb(struct wlan_objmgr_pdev *pdev,
- qdf_nbuf_t buf)
- {}
- #endif
- int wma_chan_info_event_handler(void *handle, uint8_t *event_buf,
- uint32_t len);
- static inline
- void wma_vdev_update_pause_bitmap(uint8_t vdev_id, uint16_t value)
- {
- tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
- struct wma_txrx_node *iface;
- if (!wma) {
- WMA_LOGE("%s: WMA context is invald!", __func__);
- return;
- }
- if (vdev_id >= wma->max_bssid) {
- WMA_LOGE("%s: Invalid vdev_id: %d", __func__, vdev_id);
- return;
- }
- iface = &wma->interfaces[vdev_id];
- if (!iface || !iface->vdev) {
- WMA_LOGE("%s: Vdev is NULL", __func__);
- return;
- }
- if (!wlan_vdev_get_dp_handle(iface->vdev)) {
- WMA_LOGE("%s: Failed to get dp handle", __func__);
- return;
- }
- iface->pause_bitmap = value;
- }
- static inline
- uint16_t wma_vdev_get_pause_bitmap(uint8_t vdev_id)
- {
- tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
- struct wma_txrx_node *iface;
- if (!wma) {
- WMA_LOGE("%s: WMA context is invald!", __func__);
- return 0;
- }
- iface = &wma->interfaces[vdev_id];
- if (!iface || !iface->vdev) {
- WMA_LOGE("%s: Vdev is NULL", __func__);
- return 0;
- }
- if (!wlan_vdev_get_dp_handle(iface->vdev)) {
- WMA_LOGE("%s: Failed to get dp handle", __func__);
- return 0;
- }
- return iface->pause_bitmap;
- }
- static inline bool wma_vdev_is_device_in_low_pwr_mode(uint8_t vdev_id)
- {
- tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
- struct wma_txrx_node *iface;
- if (!wma) {
- WMA_LOGE("%s: WMA context is invald!", __func__);
- return 0;
- }
- iface = &wma->interfaces[vdev_id];
- if (!iface || !iface->vdev) {
- WMA_LOGE("%s: Vdev is NULL", __func__);
- return 0;
- }
- if (!wlan_vdev_get_dp_handle(iface->vdev)) {
- WMA_LOGE("%s: Failed to get dp handle", __func__);
- return 0;
- }
- return iface->in_bmps || wma->in_imps;
- }
- static inline
- QDF_STATUS wma_vdev_get_dtim_period(uint8_t vdev_id, uint8_t *value)
- {
- tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
- struct wma_txrx_node *iface;
-
- *value = 0;
- if (!wma)
- return QDF_STATUS_E_FAILURE;
- iface = &wma->interfaces[vdev_id];
- if (!iface || !iface->vdev || !wlan_vdev_get_dp_handle(iface->vdev))
- return QDF_STATUS_E_FAILURE;
- *value = iface->dtimPeriod;
- return QDF_STATUS_SUCCESS;
- }
- static inline
- QDF_STATUS wma_vdev_get_beacon_interval(uint8_t vdev_id, uint16_t *value)
- {
- tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
- struct wma_txrx_node *iface;
-
- *value = 0;
- if (!wma)
- return QDF_STATUS_E_FAILURE;
- iface = &wma->interfaces[vdev_id];
- if (!iface || !iface->vdev || !wlan_vdev_get_dp_handle(iface->vdev))
- return QDF_STATUS_E_FAILURE;
- *value = iface->beaconInterval;
- return QDF_STATUS_SUCCESS;
- }
- static inline QDF_STATUS
- wma_get_vdev_rate_flag(struct wlan_objmgr_vdev *vdev, uint32_t *rate_flag)
- {
- struct vdev_mlme_obj *mlme_obj;
- if (!vdev) {
- WMA_LOGE("%s vdev is NULL", __func__);
- return QDF_STATUS_E_FAILURE;
- }
- mlme_obj = wlan_vdev_mlme_get_cmpt_obj(vdev);
- if (!mlme_obj) {
- WMA_LOGE("%s Failed to get mlme_obj", __func__);
- return QDF_STATUS_E_FAILURE;
- }
- *rate_flag = mlme_obj->mgmt.rate_info.rate_flags;
- return QDF_STATUS_SUCCESS;
- }
- static inline
- void wma_vdev_set_pause_bit(uint8_t vdev_id, wmi_tx_pause_type bit_pos)
- {
- tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
- struct wma_txrx_node *iface;
- if (!wma) {
- WMA_LOGE("%s: WMA context is invald!", __func__);
- return;
- }
- iface = &wma->interfaces[vdev_id];
- if (!iface || !iface->vdev) {
- WMA_LOGE("%s: Vdev is NULL", __func__);
- return;
- }
- if (!wlan_vdev_get_dp_handle(iface->vdev)) {
- WMA_LOGE("%s: Failed to get dp handle", __func__);
- return;
- }
- iface->pause_bitmap |= (1 << bit_pos);
- }
- static inline
- void wma_vdev_clear_pause_bit(uint8_t vdev_id, wmi_tx_pause_type bit_pos)
- {
- tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
- struct wma_txrx_node *iface;
- if (!wma) {
- WMA_LOGE("%s: WMA context is invald!", __func__);
- return;
- }
- iface = &wma->interfaces[vdev_id];
- if (!iface || !iface->vdev) {
- WMA_LOGE("%s: Vdev is NULL", __func__);
- return;
- }
- if (!wlan_vdev_get_dp_handle(iface->vdev)) {
- WMA_LOGE("%s: Failed to get dp handle", __func__);
- return;
- }
- iface->pause_bitmap &= ~(1 << bit_pos);
- }
- QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
- struct roam_offload_scan_req *roam_req);
- #ifdef WLAN_FEATURE_ROAM_OFFLOAD
- void
- wma_send_roam_preauth_status(tp_wma_handle wma_handle,
- struct wmi_roam_auth_status_params *params);
- #else
- static inline void
- wma_send_roam_preauth_status(tp_wma_handle wma_handle,
- struct wmi_roam_auth_status_params *params)
- {}
- #endif
- void wma_handle_roam_sync_timeout(tp_wma_handle wma_handle,
- struct roam_sync_timeout_timer_info *info);
- #ifdef WMI_INTERFACE_EVENT_LOGGING
- static inline void wma_print_wmi_cmd_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
- if (wma) {
- print(print_priv, "Command Log (count %u)", count);
- wmi_print_cmd_log(wma->wmi_handle, count, print, print_priv);
- }
- }
- static inline void wma_print_wmi_cmd_tx_cmp_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
- if (wma) {
- print(print_priv, "Command Tx Complete Log (count %u)", count);
- wmi_print_cmd_tx_cmp_log(wma->wmi_handle, count, print,
- print_priv);
- }
- }
- static inline void wma_print_wmi_mgmt_cmd_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
- if (wma) {
- print(print_priv, "Management Command Log (count %u)", count);
- wmi_print_mgmt_cmd_log(wma->wmi_handle, count, print,
- print_priv);
- }
- }
- static inline void wma_print_wmi_mgmt_cmd_tx_cmp_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
- if (wma) {
- print(print_priv,
- "Management Command Tx Complete Log (count %u)", count);
- wmi_print_mgmt_cmd_tx_cmp_log(wma->wmi_handle, count, print,
- print_priv);
- }
- }
- static inline void wma_print_wmi_event_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
- if (wma) {
- print(print_priv, "Event Log (count %u)", count);
- wmi_print_event_log(wma->wmi_handle, count, print, print_priv);
- }
- }
- static inline void wma_print_wmi_rx_event_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
- if (wma) {
- print(print_priv, "Rx Event Log (count %u)", count);
- wmi_print_rx_event_log(wma->wmi_handle, count, print,
- print_priv);
- }
- }
- static inline void wma_print_wmi_mgmt_event_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
- if (wma) {
- print(print_priv, "Management Event Log (count %u)", count);
- wmi_print_mgmt_event_log(wma->wmi_handle, count, print,
- print_priv);
- }
- }
- #else
- static inline void wma_print_wmi_cmd_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- }
- static inline void wma_print_wmi_cmd_tx_cmp_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- }
- static inline void wma_print_wmi_mgmt_cmd_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- }
- static inline void wma_print_wmi_mgmt_cmd_tx_cmp_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- }
- static inline void wma_print_wmi_event_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- }
- static inline void wma_print_wmi_rx_event_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- }
- static inline void wma_print_wmi_mgmt_event_log(uint32_t count,
- qdf_abstract_print *print,
- void *print_priv)
- {
- }
- #endif
- QDF_STATUS wma_set_rx_reorder_timeout_val(tp_wma_handle wma_handle,
- struct sir_set_rx_reorder_timeout_val *reorder_timeout);
- QDF_STATUS wma_set_rx_blocksize(tp_wma_handle wma_handle,
- struct sir_peer_set_rx_blocksize *peer_rx_blocksize);
- QDF_STATUS wma_configure_smps_params(uint32_t vdev_id, uint32_t param_id,
- uint32_t param_val);
- int wma_chip_power_save_failure_detected_handler(void *handle,
- uint8_t *cmd_param_info,
- uint32_t len);
- QDF_STATUS wma_get_chain_rssi(tp_wma_handle wma_handle,
- struct get_chain_rssi_req_params *req_params);
- QDF_STATUS wma_config_bmiss_bcnt_params(uint32_t vdev_id, uint32_t first_cnt,
- uint32_t final_cnt);
- #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD
- void wma_check_and_set_wake_timer(uint32_t time);
- #endif
- void wma_delete_invalid_peer_entries(uint8_t vdev_id, uint8_t *peer_mac_addr);
- uint8_t wma_rx_invalid_peer_ind(uint8_t vdev_id, void *wh);
- bool wma_is_roam_in_progress(uint32_t vdev_id);
- struct wlan_objmgr_psoc *wma_get_psoc_from_scn_handle(void *scn_handle);
- #ifdef CRYPTO_SET_KEY_CONVERGED
- void wma_set_peer_ucast_cipher(uint8_t *mac_addr,
- enum wlan_crypto_cipher_type cipher);
- void wma_update_set_key(uint8_t session_id, bool pairwise,
- uint8_t key_index,
- enum wlan_crypto_cipher_type cipher_type);
- #endif
- uint8_t *wma_get_igtk(struct wma_txrx_node *iface, uint16_t *key_len);
- #ifdef WLAN_FEATURE_MOTION_DETECTION
- int wma_motion_det_host_event_handler(void *handle, u_int8_t *event,
- u_int32_t len);
- int wma_motion_det_base_line_host_event_handler(void *handle, u_int8_t *event,
- u_int32_t len);
- #endif
- QDF_STATUS wma_add_bss_peer_sta(uint8_t *self_mac, uint8_t *bssid,
- bool roam_sync);
- QDF_STATUS wma_send_vdev_stop(uint8_t vdev_id);
- QDF_STATUS wma_pre_assoc_req(struct bss_params *add_bss);
- void wma_add_bss_lfr3(tp_wma_handle wma, struct bss_params *add_bss);
- #ifdef WLAN_FEATURE_HOST_ROAM
- QDF_STATUS wma_add_bss_lfr2_vdev_start(struct wlan_objmgr_vdev *vdev,
- struct bss_params *add_bss);
- #endif
- QDF_STATUS wma_send_peer_assoc_req(struct bss_params *add_bss);
- QDF_STATUS wma_get_rx_chainmask(uint8_t pdev_id, uint32_t *chainmask_2g,
- uint32_t *chainmask_5g);
- QDF_STATUS wma_handle_channel_switch_resp(tp_wma_handle wma,
- struct vdev_start_response *rsp);
- QDF_STATUS wma_pre_chan_switch_setup(uint8_t vdev_id);
- QDF_STATUS wma_post_chan_switch_setup(uint8_t vdev_id);
- QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart);
- void wma_remove_bss_peer_on_vdev_start_failure(tp_wma_handle wma,
- uint8_t vdev_id);
- void wma_send_add_bss_resp(tp_wma_handle wma, uint8_t vdev_id,
- QDF_STATUS status);
- QDF_STATUS wma_post_vdev_start_setup(uint8_t vdev_id);
- QDF_STATUS wma_pre_vdev_start_setup(uint8_t vdev_id,
- struct bss_params *add_bss);
- #ifdef FEATURE_ANI_LEVEL_REQUEST
- QDF_STATUS wma_send_ani_level_request(tp_wma_handle wma_handle,
- uint32_t *freqs, uint8_t num_freqs);
- #endif
- #endif
|