123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668 |
- /*
- * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
- /**
- * @file cdp_txrx_ops.h
- * @brief Define the host data path converged API functions
- * called by the host control SW and the OS interface module
- */
- #ifndef _CDP_TXRX_CMN_OPS_H_
- #define _CDP_TXRX_CMN_OPS_H_
- #include <cdp_txrx_cmn_struct.h>
- #include <cdp_txrx_stats_struct.h>
- #include "cdp_txrx_handle.h"
- #include <cdp_txrx_mon_struct.h>
- #include "wlan_objmgr_psoc_obj.h"
- #include <wmi_unified_api.h>
- #include <wdi_event_api.h>
- #ifdef IPA_OFFLOAD
- #ifdef CONFIG_IPA_WDI_UNIFIED_API
- #include <qdf_ipa_wdi3.h>
- #else
- #include <qdf_ipa.h>
- #endif
- #endif
- /**
- * bitmap values to indicate special handling of peer_delete
- */
- #define CDP_PEER_DELETE_NO_SPECIAL 0
- #define CDP_PEER_DO_NOT_START_UNMAP_TIMER 1
- struct hif_opaque_softc;
- /* same as ieee80211_nac_param */
- enum cdp_nac_param_cmd {
- /* IEEE80211_NAC_PARAM_ADD */
- CDP_NAC_PARAM_ADD = 1,
- /* IEEE80211_NAC_PARAM_DEL */
- CDP_NAC_PARAM_DEL,
- /* IEEE80211_NAC_PARAM_LIST */
- CDP_NAC_PARAM_LIST,
- };
- /**
- * enum vdev_peer_protocol_enter_exit - whether ingress or egress
- * @CDP_VDEV_PEER_PROTOCOL_IS_INGRESS: ingress
- * @CDP_VDEV_PEER_PROTOCOL_IS_EGRESS: egress
- *
- * whether ingress or egress
- */
- enum vdev_peer_protocol_enter_exit {
- CDP_VDEV_PEER_PROTOCOL_IS_INGRESS,
- CDP_VDEV_PEER_PROTOCOL_IS_EGRESS
- };
- /**
- * enum vdev_peer_protocol_tx_rx - whether tx or rx
- * @CDP_VDEV_PEER_PROTOCOL_IS_TX: tx
- * @CDP_VDEV_PEER_PROTOCOL_IS_RX: rx
- *
- * whether tx or rx
- */
- enum vdev_peer_protocol_tx_rx {
- CDP_VDEV_PEER_PROTOCOL_IS_TX,
- CDP_VDEV_PEER_PROTOCOL_IS_RX
- };
- /******************************************************************************
- *
- * Control Interface (A Interface)
- *
- *****************************************************************************/
- struct cdp_cmn_ops {
- QDF_STATUS (*txrx_soc_attach_target)(ol_txrx_soc_handle soc);
- int (*txrx_pdev_attach_target)(ol_txrx_soc_handle soc, uint8_t pdev_id);
- QDF_STATUS (*txrx_vdev_attach)
- (struct cdp_soc_t *soc, uint8_t pdev_id, uint8_t *mac,
- uint8_t vdev_id, enum wlan_op_mode op_mode,
- enum wlan_op_subtype subtype);
- QDF_STATUS
- (*txrx_vdev_detach)(struct cdp_soc_t *cdp_soc, uint8_t vdev_id,
- ol_txrx_vdev_delete_cb callback,
- void *cb_context);
- QDF_STATUS (*txrx_pdev_attach)
- (ol_txrx_soc_handle soc, HTC_HANDLE htc_pdev,
- qdf_device_t osdev, uint8_t pdev_id);
- int (*txrx_pdev_post_attach)(struct cdp_soc_t *soc, uint8_t pdev_id);
- void
- (*txrx_pdev_pre_detach)(struct cdp_soc_t *soc, uint8_t pdev_id,
- int force);
- QDF_STATUS
- (*txrx_pdev_detach)(struct cdp_soc_t *psoc, uint8_t pdev_id,
- int force);
- /**
- * txrx_pdev_deinit() - Deinitialize pdev and dp ring memory
- * @soc: soc dp handle
- * @pdev_id: id of Dp pdev handle
- * @force: Force deinit or not
- *
- * Return: QDF_STATUS
- */
- QDF_STATUS
- (*txrx_pdev_deinit)(struct cdp_soc_t *soc, uint8_t pdev_id,
- int force);
- QDF_STATUS
- (*txrx_peer_create)
- (ol_txrx_soc_handle soc, uint8_t vdev_id,
- uint8_t *peer_mac_addr);
- QDF_STATUS
- (*txrx_peer_setup)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
- uint8_t *peer_mac);
- QDF_STATUS
- (*txrx_cp_peer_del_response)
- (ol_txrx_soc_handle soc, uint8_t vdev_id,
- uint8_t *peer_mac_addr);
- QDF_STATUS
- (*txrx_peer_teardown)
- (struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *peer_mac);
- int (*txrx_peer_add_ast)
- (ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac,
- uint8_t *mac_addr, enum cdp_txrx_ast_entry_type type,
- uint32_t flags);
- int (*txrx_peer_update_ast)
- (ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac,
- uint8_t *mac_addr, uint32_t flags);
- bool (*txrx_peer_get_ast_info_by_soc)
- (ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
- struct cdp_ast_entry_info *ast_entry_info);
- bool (*txrx_peer_get_ast_info_by_pdev)
- (ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
- uint8_t pdev_id,
- struct cdp_ast_entry_info *ast_entry_info);
- QDF_STATUS (*txrx_peer_ast_delete_by_soc)
- (ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
- txrx_ast_free_cb callback,
- void *cookie);
- QDF_STATUS (*txrx_peer_ast_delete_by_pdev)
- (ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
- uint8_t pdev_id,
- txrx_ast_free_cb callback,
- void *cookie);
- QDF_STATUS
- (*txrx_peer_delete)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint8_t *peer_mac, uint32_t bitmap);
- QDF_STATUS (*txrx_set_monitor_mode)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- uint8_t smart_monitor);
- void (*txrx_peer_delete_sync)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint8_t *peer_mac,
- QDF_STATUS(*delete_cb)(
- uint8_t vdev_id,
- uint32_t peerid_cnt,
- uint16_t *peerid_list),
- uint32_t bitmap);
- void (*txrx_peer_unmap_sync_cb_set)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- ol_txrx_peer_unmap_sync_cb
- peer_unmap_sync);
- QDF_STATUS
- (*txrx_get_peer_mac_from_peer_id)
- (struct cdp_soc_t *cdp_soc,
- uint32_t peer_id, uint8_t *peer_mac);
- void
- (*txrx_vdev_tx_lock)(struct cdp_soc_t *soc, uint8_t vdev_id);
- void
- (*txrx_vdev_tx_unlock)(struct cdp_soc_t *soc, uint8_t vdev_id);
- QDF_STATUS
- (*txrx_ath_getstats)(struct cdp_soc_t *soc, uint8_t id,
- struct cdp_dev_stats *stats, uint8_t type);
- QDF_STATUS
- (*txrx_set_gid_flag)(struct cdp_soc_t *soc, uint8_t pdev_id,
- u_int8_t *mem_status,
- u_int8_t *user_position);
- uint32_t (*txrx_fw_supported_enh_stats_version)(struct cdp_soc_t *soc,
- uint8_t pdev_id);
- QDF_STATUS
- (*txrx_if_mgmt_drain)(struct cdp_soc_t *soc, uint8_t pdev_id,
- int force);
- QDF_STATUS
- (*txrx_set_curchan)(struct cdp_soc_t *soc, uint8_t pdev_id,
- uint32_t chan_mhz);
- QDF_STATUS
- (*txrx_set_privacy_filters)
- (struct cdp_soc_t *soc, uint8_t vdev_id, void *filter,
- uint32_t num);
- uint32_t (*txrx_get_cfg)(struct cdp_soc_t *soc, enum cdp_dp_cfg cfg);
- /********************************************************************
- * Data Interface (B Interface)
- ********************************************************************/
- QDF_STATUS
- (*txrx_vdev_register)(struct cdp_soc_t *soc, uint8_t vdev_id,
- ol_osif_vdev_handle osif_vdev,
- struct ol_txrx_ops *txrx_ops);
- int (*txrx_mgmt_send)(struct cdp_soc_t *soc, uint8_t vdev_id,
- qdf_nbuf_t tx_mgmt_frm, uint8_t type);
- int (*txrx_mgmt_send_ext)(struct cdp_soc_t *soc, uint8_t vdev_id,
- qdf_nbuf_t tx_mgmt_frm, uint8_t type,
- uint8_t use_6mbps, uint16_t chanfreq);
- /**
- * ol_txrx_mgmt_tx_cb - tx management delivery notification
- * callback function
- */
- QDF_STATUS
- (*txrx_mgmt_tx_cb_set)(struct cdp_soc_t *soc, uint8_t pdev_id,
- uint8_t type,
- ol_txrx_mgmt_tx_cb download_cb,
- ol_txrx_mgmt_tx_cb ota_ack_cb,
- void *ctxt);
- /**
- * ol_txrx_data_tx_cb - Function registered with the data path
- * that is called when tx frames marked as "no free" are
- * done being transmitted
- */
- void (*txrx_data_tx_cb_set)(struct cdp_soc_t *soc, uint8_t vdev_id,
- ol_txrx_data_tx_cb callback, void *ctxt);
- qdf_nbuf_t (*tx_send_exc)
- (ol_txrx_soc_handle soc, uint8_t vdev_id, qdf_nbuf_t msdu_list,
- struct cdp_tx_exception_metadata *tx_exc_metadata);
- /*******************************************************************
- * Statistics and Debugging Interface (C Interface)
- ********************************************************************/
- int (*txrx_aggr_cfg)(struct cdp_soc_t *soc, uint8_t vdev_id,
- int max_subfrms_ampdu,
- int max_subfrms_amsdu);
- A_STATUS
- (*txrx_fw_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id,
- struct ol_txrx_stats_req *req,
- bool per_vdev, bool response_expected);
- int (*txrx_debug)(struct cdp_soc_t *soc, uint8_t vdev_id,
- int debug_specs);
- QDF_STATUS
- (*txrx_fw_stats_cfg)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint8_t cfg_stats_type, uint32_t cfg_val);
- void (*txrx_print_level_set)(unsigned level);
- /**
- * ol_txrx_get_vdev_mac_addr() - Return mac addr of vdev
- * @soc: datapath soc handle
- * @vdev_id: vdev id
- *
- * Return: vdev mac address
- */
- uint8_t * (*txrx_get_vdev_mac_addr)(struct cdp_soc_t *soc,
- uint8_t vdev_id);
- /**
- * ol_txrx_get_ctrl_pdev_from_vdev() - Return control pdev of vdev
- * @soc: datapath soc handle
- * @vdev_id: vdev id
- *
- * Return: Handle to control pdev
- */
- struct cdp_cfg *(*txrx_get_ctrl_pdev_from_vdev)(struct cdp_soc_t *soc,
- uint8_t vdev_id);
- /**
- * txrx_get_mon_vdev_from_pdev() - Return monitor mode vdev
- * @soc: datapath soc handle
- * @pdev: pdev id
- *
- * Return: vdev_id
- */
- uint8_t (*txrx_get_mon_vdev_from_pdev)(struct cdp_soc_t *soc,
- uint8_t pdev_id);
- void (*txrx_soc_detach)(struct cdp_soc_t *soc);
- /**
- * txrx_soc_deinit() - Deinitialize dp soc and dp ring memory
- * @soc: Opaque Dp handle
- *
- * Return None
- */
- void (*txrx_soc_deinit)(struct cdp_soc_t *soc);
- /**
- * txrx_soc_init() - Initialize dp soc and dp ring memory
- * @soc: Opaque Dp handle
- * @ctrl_psoc: Opaque Cp handle
- * @htchdl: Opaque htc handle
- * @hifhdl: Opaque hif handle
- *
- * Return: None
- */
- void *(*txrx_soc_init)(struct cdp_soc_t *soc,
- struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
- struct hif_opaque_softc *hif_handle,
- HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
- struct ol_if_ops *ol_ops, uint16_t device_id);
- /**
- * txrx_tso_soc_attach() - TSO attach handler triggered during
- * dynamic tso activation
- * @soc: Opaque Dp handle
- *
- * Return: QDF status
- */
- QDF_STATUS (*txrx_tso_soc_attach)(struct cdp_soc_t *soc);
- /**
- * txrx_tso_soc_detach() - TSO detach handler triggered during
- * dynamic tso de-activation
- * @soc: Opaque Dp handle
- *
- * Return: QDF status
- */
- QDF_STATUS (*txrx_tso_soc_detach)(struct cdp_soc_t *soc);
- int (*addba_resp_tx_completion)(struct cdp_soc_t *cdp_soc,
- uint8_t *peer_mac,
- uint16_t vdev_id, uint8_t tid,
- int status);
- int (*addba_requestprocess)(struct cdp_soc_t *cdp_soc,
- uint8_t *peer_mac,
- uint16_t vdev_id,
- uint8_t dialogtoken,
- uint16_t tid, uint16_t batimeout,
- uint16_t buffersize,
- uint16_t startseqnum);
- QDF_STATUS
- (*addba_responsesetup)(struct cdp_soc_t *cdp_soc,
- uint8_t *peer_mac,
- uint16_t vdev_id, uint8_t tid,
- uint8_t *dialogtoken, uint16_t *statuscode,
- uint16_t *buffersize, uint16_t *batimeout);
- int (*delba_process)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac,
- uint16_t vdev_id, int tid, uint16_t reasoncode);
- /**
- * delba_tx_completion() - Indicate delba tx status
- * @cdp_soc: soc handle
- * @peer_mac: Peer mac address
- * @vdev_id: vdev id
- * @tid: Tid number
- * @status: Tx completion status
- *
- * Return: 0 on Success, 1 on failure
- */
- int (*delba_tx_completion)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac,
- uint16_t vdev_id,
- uint8_t tid, int status);
- QDF_STATUS
- (*set_addba_response)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac,
- uint16_t vdev_id, uint8_t tid,
- uint16_t statuscode);
- QDF_STATUS
- (*set_vdev_dscp_tid_map)(struct cdp_soc_t *soc_handle,
- uint8_t vdev_id, uint8_t map_id);
- int (*txrx_get_total_per)(struct cdp_soc_t *soc, uint8_t pdev_id);
- void (*flush_cache_rx_queue)(void);
- QDF_STATUS (*set_pdev_dscp_tid_map)(struct cdp_soc_t *soc_handle,
- uint8_t pdev_id,
- uint8_t map_id,
- uint8_t tos, uint8_t tid);
- QDF_STATUS (*txrx_stats_request)(struct cdp_soc_t *soc_handle,
- uint8_t vdev_id,
- struct cdp_txrx_stats_req *req);
- QDF_STATUS (*display_stats)(struct cdp_soc_t *psoc, uint16_t value,
- enum qdf_stats_verbosity_level level);
- QDF_STATUS (*txrx_intr_attach)(struct cdp_soc_t *soc_handle);
- void (*txrx_intr_detach)(struct cdp_soc_t *soc_handle);
- QDF_STATUS (*set_pn_check)(struct cdp_soc_t *soc_handle,
- uint8_t vdev_id, uint8_t *peermac,
- enum cdp_sec_type sec_type,
- uint32_t *rx_pn);
- QDF_STATUS(*set_key_sec_type)(struct cdp_soc_t *soc_handle,
- uint8_t vdev_id, uint8_t *peermac,
- enum cdp_sec_type sec_type,
- bool is_unicast);
- QDF_STATUS (*update_config_parameters)(struct cdp_soc *psoc,
- struct cdp_config_params *params);
- void *(*get_dp_txrx_handle)(ol_txrx_soc_handle soc, uint8_t pdev_id);
- void (*set_dp_txrx_handle)(ol_txrx_soc_handle soc, uint8_t pdev_id,
- void *dp_hdl);
- void *(*get_vdev_dp_ext_txrx_handle)(struct cdp_soc_t *soc,
- uint8_t vdev_id);
- QDF_STATUS (*set_vdev_dp_ext_txrx_handle)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- uint16_t size);
- void *(*get_soc_dp_txrx_handle)(struct cdp_soc *soc_handle);
- void (*set_soc_dp_txrx_handle)(struct cdp_soc *soc_handle,
- void *dp_txrx_handle);
- QDF_STATUS (*map_pdev_to_lmac)(ol_txrx_soc_handle soc, uint8_t pdev_id,
- uint32_t lmac_id);
- QDF_STATUS (*handle_mode_change)(ol_txrx_soc_handle soc,
- uint8_t pdev_id, uint32_t lmac_id);
- QDF_STATUS (*set_pdev_status_down)(struct cdp_soc_t *soc_handle,
- uint8_t pdev_id, bool is_pdev_down);
- QDF_STATUS (*txrx_peer_reset_ast)
- (ol_txrx_soc_handle soc, uint8_t *ast_macaddr,
- uint8_t *peer_macaddr, uint8_t vdev_id);
- QDF_STATUS (*txrx_peer_reset_ast_table)(ol_txrx_soc_handle soc,
- uint8_t vdev_id);
- void (*txrx_peer_flush_ast_table)(ol_txrx_soc_handle soc);
- void (*txrx_set_ba_aging_timeout)(struct cdp_soc_t *soc_handle,
- uint8_t ac, uint32_t value);
- void (*txrx_get_ba_aging_timeout)(struct cdp_soc_t *soc_handle,
- uint8_t ac, uint32_t *value);
- QDF_STATUS (*txrx_peer_map_attach)(ol_txrx_soc_handle soc,
- uint32_t num_peers,
- uint32_t max_ast_index,
- bool peer_map_unmap_v2);
- ol_txrx_tx_fp tx_send;
- /**
- * txrx_get_os_rx_handles_from_vdev() - Return function, osif vdev
- * to deliver pkt to stack.
- * @soc: datapath soc handle
- * @vdev: vdev id
- * @stack_fn: pointer to - function pointer to deliver RX pkt to stack
- * @osif_vdev: pointer to - osif vdev to deliver RX packet to.
- */
- void (*txrx_get_os_rx_handles_from_vdev)
- (ol_txrx_soc_handle soc,
- uint8_t vdev_id,
- ol_txrx_rx_fp *stack_fn,
- ol_osif_vdev_handle *osif_vdev);
- void (*set_rate_stats_ctx)(struct cdp_soc_t *soc,
- void *ctx);
- int (*txrx_classify_update)
- (struct cdp_soc_t *soc, uint8_t vdev_id, qdf_nbuf_t skb,
- enum txrx_direction, struct ol_txrx_nbuf_classify *nbuf_class);
- bool (*get_dp_capabilities)(struct cdp_soc_t *soc,
- enum cdp_capabilities dp_caps);
- void* (*get_rate_stats_ctx)(struct cdp_soc_t *soc);
- QDF_STATUS (*txrx_peer_flush_rate_stats)(struct cdp_soc_t *soc,
- uint8_t pdev_id,
- void *buf);
- QDF_STATUS (*txrx_flush_rate_stats_request)(struct cdp_soc_t *soc,
- uint8_t pdev_id);
- QDF_STATUS (*set_pdev_pcp_tid_map)(struct cdp_soc_t *soc,
- uint8_t pdev_id,
- uint8_t pcp, uint8_t tid);
- QDF_STATUS (*set_vdev_pcp_tid_map)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- uint8_t pcp, uint8_t tid);
- #ifdef QCA_MULTIPASS_SUPPORT
- QDF_STATUS (*set_vlan_groupkey)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint16_t vlan_id, uint16_t group_key);
- #endif
- uint16_t (*get_peer_mac_list)
- (ol_txrx_soc_handle soc, uint8_t vdev_id,
- u_int8_t newmac[][QDF_MAC_ADDR_SIZE], uint16_t mac_cnt);
- };
- struct cdp_ctrl_ops {
- int
- (*txrx_mempools_attach)(ol_txrx_soc_handle dp_soc);
- int
- (*txrx_update_filter_neighbour_peers)(
- struct cdp_soc_t *soc, uint8_t vdev_id,
- uint32_t cmd, uint8_t *macaddr);
- /* Is this similar to ol_txrx_peer_state_update() in MCL */
- /**
- * @brief Update the authorize peer object at association time
- * @details
- * For the host-based implementation of rate-control, it
- * updates the peer/node-related parameters within rate-control
- * context of the peer at association.
- *
- * @param soc_hdl - pointer to the soc object
- * @param vdev_id - id of the virtual object
- * @param peer_mac - mac address of the node's object
- * @authorize - either to authorize or unauthorize peer
- *
- * @return QDF_STATUS
- */
- QDF_STATUS
- (*txrx_peer_authorize)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id,
- uint8_t *peer_mac,
- u_int32_t authorize);
- void (*tx_flush_buffers)(struct cdp_soc_t *soc, uint8_t vdev_id);
- int (*txrx_is_target_ar900b)(struct cdp_soc_t *soc_hdl);
- QDF_STATUS
- (*txrx_set_vdev_param)(struct cdp_soc_t *soc, uint8_t vdev_id,
- enum cdp_vdev_param_type param,
- cdp_config_param_type val);
- /**
- * @brief Set the reo dest ring num of the radio
- * @details
- * Set the reo destination ring no on which we will receive
- * pkts for this radio.
- *
- * @txrx_soc - soc handle
- * @param pdev_id - id of physical device
- * @return the reo destination ring number
- * @param reo_dest_ring_num - value ranges between 1 - 4
- */
- QDF_STATUS (*txrx_set_pdev_reo_dest)(
- struct cdp_soc_t *txrx_soc,
- uint8_t pdev_id,
- enum cdp_host_reo_dest_ring reo_dest_ring_num);
- /**
- * @brief Get the reo dest ring num of the radio
- * @details
- * Get the reo destination ring no on which we will receive
- * pkts for this radio.
- *
- * @txrx_soc - soc handle
- * @param pdev_id - id of physical device
- * @return the reo destination ring number
- */
- enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)(
- struct cdp_soc_t *txrx_soc,
- uint8_t pdev_id);
- int (*txrx_wdi_event_sub)(struct cdp_soc_t *soc, uint8_t pdev_id,
- wdi_event_subscribe *event_cb_sub,
- uint32_t event);
- int (*txrx_wdi_event_unsub)(struct cdp_soc_t *soc, uint8_t pdev_id,
- wdi_event_subscribe *event_cb_sub,
- uint32_t event);
- int (*txrx_get_sec_type)(ol_txrx_soc_handle soc, uint8_t vdev_id,
- uint8_t *peer_mac, uint8_t sec_idx);
- QDF_STATUS
- (*txrx_update_mgmt_txpow_vdev)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- uint8_t subtype, uint8_t tx_power);
- /**
- * txrx_set_pdev_param() - callback to set pdev parameter
- * @soc: opaque soc handle
- * @pdev_id:id of data path pdev handle
- * @val: value of pdev_tx_capture
- *
- * Return: status: 0 - Success, non-zero: Failure
- */
- QDF_STATUS (*txrx_set_pdev_param)(struct cdp_soc_t *soc,
- uint8_t pdev_id,
- enum cdp_pdev_param_type type,
- cdp_config_param_type val);
- QDF_STATUS (*txrx_get_pdev_param)(struct cdp_soc_t *soc,
- uint8_t pdev_id,
- enum cdp_pdev_param_type type,
- cdp_config_param_type *val);
- QDF_STATUS (*txrx_set_peer_param)(struct cdp_soc_t *soc,
- uint8_t vdev_id, uint8_t *peer_mac,
- enum cdp_peer_param_type param,
- cdp_config_param_type val);
- QDF_STATUS (*txrx_get_peer_param)(struct cdp_soc_t *soc,
- uint8_t vdev_id, uint8_t *peer_mac,
- enum cdp_peer_param_type param,
- cdp_config_param_type *val);
- void * (*txrx_get_pldev)(struct cdp_soc_t *soc, uint8_t pdev_id);
- #ifdef VDEV_PEER_PROTOCOL_COUNT
- void (*txrx_peer_protocol_cnt)(struct cdp_soc_t *soc,
- int8_t vdev_id,
- qdf_nbuf_t nbuf,
- bool is_egress,
- bool is_rx);
- #endif
- #ifdef ATH_SUPPORT_NAC_RSSI
- QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_soc_t *cdp_soc,
- uint8_t vdev_id,
- enum cdp_nac_param_cmd cmd,
- char *bssid,
- char *client_macaddr,
- uint8_t chan_num);
- QDF_STATUS (*txrx_vdev_get_neighbour_rssi)(struct cdp_soc_t *cdp_soc,
- uint8_t vdev_id,
- char *macaddr,
- uint8_t *rssi);
- #endif
- QDF_STATUS
- (*set_key)(struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *mac,
- bool is_unicast, uint32_t *key);
- QDF_STATUS (*txrx_get_vdev_param)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- enum cdp_vdev_param_type param,
- cdp_config_param_type *val);
- int (*enable_peer_based_pktlog)(struct cdp_soc_t *cdp_soc,
- uint8_t pdev_id,
- uint8_t *macaddr, uint8_t enb_dsb);
- QDF_STATUS
- (*calculate_delay_stats)(struct cdp_soc_t *cdp_soc,
- uint8_t vdev_id, qdf_nbuf_t nbuf);
- #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
- QDF_STATUS (*txrx_update_pdev_rx_protocol_tag)(
- struct cdp_soc_t *soc, uint8_t pdev_id,
- uint32_t protocol_mask, uint16_t protocol_type,
- uint16_t tag);
- #ifdef WLAN_SUPPORT_RX_TAG_STATISTICS
- void (*txrx_dump_pdev_rx_protocol_tag_stats)(
- struct cdp_soc_t *soc, uint8_t pdev_id,
- uint16_t protocol_type);
- #endif /* WLAN_SUPPORT_RX_TAG_STATISTICS */
- #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
- #ifdef WLAN_SUPPORT_RX_FLOW_TAG
- QDF_STATUS (*txrx_set_rx_flow_tag)(
- struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
- struct cdp_rx_flow_info *flow_info);
- QDF_STATUS (*txrx_dump_rx_flow_tag_stats)(
- struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
- struct cdp_rx_flow_info *flow_info);
- #endif /* WLAN_SUPPORT_RX_FLOW_TAG */
- #ifdef QCA_MULTIPASS_SUPPORT
- void (*txrx_peer_set_vlan_id)(struct cdp_soc_t *cdp_soc,
- uint8_t vdev_id, uint8_t *peer_mac,
- uint16_t vlan_id);
- #endif
- #if defined(WLAN_TX_PKT_CAPTURE_ENH) || defined(WLAN_RX_PKT_CAPTURE_ENH)
- QDF_STATUS (*txrx_update_peer_pkt_capture_params)(
- ol_txrx_soc_handle soc, uint8_t pdev_id,
- bool is_rx_pkt_cap_enable, uint8_t is_tx_pkt_cap_enable,
- uint8_t *peer_mac);
- #endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */
- QDF_STATUS
- (*txrx_set_psoc_param)(struct cdp_soc_t *soc,
- enum cdp_psoc_param_type param,
- cdp_config_param_type val);
- QDF_STATUS (*txrx_get_psoc_param)(ol_txrx_soc_handle soc,
- enum cdp_psoc_param_type type,
- cdp_config_param_type *val);
- #ifdef VDEV_PEER_PROTOCOL_COUNT
- /*
- * Enable per-peer protocol counters
- */
- void (*txrx_enable_peer_protocol_count)(struct cdp_soc_t *soc,
- int8_t vdev_id, bool enable);
- void (*txrx_set_peer_protocol_drop_mask)(struct cdp_soc_t *soc,
- int8_t vdev_id, int mask);
- int (*txrx_is_peer_protocol_count_enabled)(struct cdp_soc_t *soc,
- int8_t vdev_id);
- int (*txrx_get_peer_protocol_drop_mask)(struct cdp_soc_t *soc,
- int8_t vdev_id);
- #endif
- };
- struct cdp_me_ops {
- void (*tx_me_alloc_descriptor)(struct cdp_soc_t *soc,
- uint8_t pdev_id);
- void (*tx_me_free_descriptor)(struct cdp_soc_t *soc, uint8_t pdev_id);
- uint16_t (*tx_me_convert_ucast)(struct cdp_soc_t *soc, uint8_t vdev_id,
- qdf_nbuf_t wbuf, u_int8_t newmac[][6],
- uint8_t newmaccnt);
- };
- struct cdp_mon_ops {
- QDF_STATUS (*txrx_reset_monitor_mode)
- (ol_txrx_soc_handle soc, uint8_t pdev_id, u_int8_t smart_monitor);
- QDF_STATUS (*txrx_deliver_tx_mgmt)
- (struct cdp_soc_t *cdp_soc, uint8_t pdev_id, qdf_nbuf_t nbuf);
- /* HK advance monitor filter support */
- QDF_STATUS (*txrx_set_advance_monitor_filter)
- (struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- struct cdp_monitor_filter *filter_val);
- /* Configure full monitor mode */
- QDF_STATUS
- (*config_full_mon_mode)(struct cdp_soc_t *soc, uint8_t val);
- };
- #ifdef WLAN_FEATURE_PKT_CAPTURE
- struct cdp_pktcapture_ops {
- void (*txrx_pktcapture_set_mode)
- (struct cdp_soc_t *soc,
- uint8_t pdev_id,
- uint8_t mode);
- uint8_t (*txrx_pktcapture_get_mode)
- (struct cdp_soc_t *soc,
- uint8_t pdev_id);
- QDF_STATUS (*txrx_pktcapture_cb_register)
- (struct cdp_soc_t *soc,
- uint8_t pdev_id,
- void *context,
- QDF_STATUS(cb)(void *, qdf_nbuf_t));
- QDF_STATUS (*txrx_pktcapture_cb_deregister)
- (struct cdp_soc_t *soc,
- uint8_t pdev_id);
- QDF_STATUS (*txrx_pktcapture_mgmtpkt_process)
- (struct cdp_soc_t *soc,
- uint8_t pdev_id,
- struct mon_rx_status *txrx_status,
- qdf_nbuf_t nbuf, uint8_t status);
- void (*txrx_pktcapture_record_channel)
- (struct cdp_soc_t *soc,
- uint8_t pdev_id,
- int chan_no);
- };
- #endif /* #ifdef WLAN_FEATURE_PKT_CAPTURE */
- struct cdp_host_stats_ops {
- int (*txrx_host_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id,
- struct ol_txrx_stats_req *req);
- QDF_STATUS (*txrx_host_stats_clr)(struct cdp_soc_t *soc,
- uint8_t vdev_id);
- QDF_STATUS
- (*txrx_host_ce_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
- int (*txrx_stats_publish)(struct cdp_soc_t *soc, uint8_t pdev_id,
- struct cdp_stats_extd *buf);
- /**
- * @brief Enable enhanced stats functionality.
- *
- * @param soc - the soc handle
- * @param pdev_id - pdev_id of pdev
- * @return - QDF_STATUS
- */
- QDF_STATUS (*txrx_enable_enhanced_stats)(struct cdp_soc_t *soc,
- uint8_t pdev_id);
- /**
- * @brief Disable enhanced stats functionality.
- *
- * @param soc - the soc handle
- * @param pdev_id - pdev_id of pdev
- * @return - QDF_STATUS
- */
- QDF_STATUS (*txrx_disable_enhanced_stats)(struct cdp_soc_t *soc,
- uint8_t pdev_id);
- QDF_STATUS
- (*tx_print_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
- QDF_STATUS
- (*tx_rst_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
- QDF_STATUS
- (*tx_print_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
- QDF_STATUS
- (*tx_rst_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
- QDF_STATUS
- (*print_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
- QDF_STATUS
- (*rst_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
- QDF_STATUS
- (*txrx_host_me_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
- QDF_STATUS
- (*txrx_per_peer_stats)(struct cdp_soc_t *soc, uint8_t *addr);
- int (*txrx_host_msdu_ttl_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
- struct ol_txrx_stats_req *req);
- int (*ol_txrx_update_peer_stats)(struct cdp_soc_t *soc,
- uint8_t pdev_id,
- uint8_t *addr, void *stats,
- uint32_t last_tx_rate_mcs,
- uint32_t stats_id);
- QDF_STATUS
- (*get_fw_peer_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
- uint8_t *addr,
- uint32_t cap, uint32_t copy_stats);
- QDF_STATUS
- (*get_htt_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
- void *data,
- uint32_t data_len);
- QDF_STATUS
- (*txrx_update_pdev_stats)(struct cdp_soc_t *soc,
- uint8_t pdev_id, void *data,
- uint16_t stats_id);
- QDF_STATUS
- (*txrx_get_peer_stats_param)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- uint8_t *peer_mac,
- enum cdp_peer_stats_type type,
- cdp_peer_stats_param_t *buf);
- QDF_STATUS
- (*txrx_get_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint8_t *peer_mac,
- struct cdp_peer_stats *peer_stats);
- QDF_STATUS
- (*txrx_reset_peer_ald_stats)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- uint8_t *peer_mac);
- QDF_STATUS
- (*txrx_reset_peer_stats)(struct cdp_soc_t *soc,
- uint8_t vdev_id, uint8_t *peer_mac);
- int
- (*txrx_get_vdev_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
- void *buf, bool is_aggregate);
- int
- (*txrx_process_wmi_host_vdev_stats)(ol_txrx_soc_handle soc,
- void *data, uint32_t len,
- uint32_t stats_id);
- int
- (*txrx_get_vdev_extd_stats)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- wmi_host_vdev_extd_stats *buffer);
- QDF_STATUS
- (*txrx_update_vdev_stats)(struct cdp_soc_t *soc,
- uint8_t vdev_id, void *buf,
- uint16_t stats_id);
- int
- (*txrx_get_radio_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
- void *buf);
- QDF_STATUS
- (*txrx_get_pdev_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
- struct cdp_pdev_stats *buf);
- int
- (*txrx_get_ratekbps)(int preamb, int mcs,
- int htflag, int gintval);
- QDF_STATUS
- (*txrx_update_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint8_t *peer_mac, void *stats,
- uint32_t last_tx_rate_mcs,
- uint32_t stats_id);
- };
- struct cdp_wds_ops {
- QDF_STATUS
- (*txrx_set_wds_rx_policy)(struct cdp_soc_t *soc, uint8_t vdev_id,
- u_int32_t val);
- QDF_STATUS
- (*txrx_wds_peer_tx_policy_update)(struct cdp_soc_t *soc,
- uint8_t vdev_id, uint8_t *peer_mac,
- int wds_tx_ucast, int wds_tx_mcast);
- int (*vdev_set_wds)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint32_t val);
- };
- struct cdp_raw_ops {
- int (*txrx_get_nwifi_mode)(struct cdp_soc_t *soc, uint8_t vdev_id);
- QDF_STATUS
- (*rsim_get_astentry)(struct cdp_soc_t *soc, uint8_t vdev_id,
- qdf_nbuf_t *pnbuf, struct cdp_raw_ast *raw_ast);
- };
- #ifdef PEER_FLOW_CONTROL
- struct cdp_pflow_ops {
- uint32_t (*pflow_update_pdev_params)(struct cdp_soc_t *soc,
- uint8_t pdev_id,
- enum _dp_param_t,
- uint32_t, void *);
- };
- #endif /* PEER_FLOW_CONTROL */
- #define LRO_IPV4_SEED_ARR_SZ 5
- #define LRO_IPV6_SEED_ARR_SZ 11
- /**
- * struct cdp_lro_hash_config - set rx_offld(LRO/GRO) init parameters
- * @lro_enable: indicates whether rx_offld is enabled
- * @tcp_flag: If the TCP flags from the packet do not match
- * the values in this field after masking with TCP flags mask
- * below, packet is not rx_offld eligible
- * @tcp_flag_mask: field for comparing the TCP values provided
- * above with the TCP flags field in the received packet
- * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
- * 5-tuple toeplitz hash for ipv4 packets
- * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
- * 5-tuple toeplitz hash for ipv6 packets
- */
- struct cdp_lro_hash_config {
- uint32_t lro_enable;
- uint32_t tcp_flag:9,
- tcp_flag_mask:9;
- uint32_t toeplitz_hash_ipv4[LRO_IPV4_SEED_ARR_SZ];
- uint32_t toeplitz_hash_ipv6[LRO_IPV6_SEED_ARR_SZ];
- };
- struct ol_if_ops {
- void
- (*peer_set_default_routing)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
- uint8_t pdev_id, uint8_t *peer_macaddr,
- uint8_t vdev_id,
- bool hash_based, uint8_t ring_num);
- QDF_STATUS
- (*peer_rx_reorder_queue_setup)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
- uint8_t pdev_id,
- uint8_t vdev_id, uint8_t *peer_mac,
- qdf_dma_addr_t hw_qdesc, int tid,
- uint16_t queue_num,
- uint8_t ba_window_size_valid,
- uint16_t ba_window_size);
- QDF_STATUS
- (*peer_rx_reorder_queue_remove)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
- uint8_t pdev_id,
- uint8_t vdev_id, uint8_t *peer_macaddr,
- uint32_t tid_mask);
- int (*peer_unref_delete)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint8_t pdev_id,
- uint8_t *peer_mac,
- uint8_t *vdev_mac, enum wlan_op_mode opmode);
- bool (*is_hw_dbs_2x2_capable)(struct wlan_objmgr_psoc *psoc);
- int (*peer_add_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
- uint8_t vdev_id,
- uint8_t *peer_macaddr,
- uint16_t peer_id,
- const uint8_t *dest_macaddr,
- uint8_t *next_node_mac,
- uint32_t flags,
- uint8_t type);
- int (*peer_update_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
- uint8_t vdev_id,
- uint8_t *dest_macaddr,
- uint8_t *peer_macaddr,
- uint32_t flags);
- void (*peer_del_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
- uint8_t vdev_id,
- uint8_t *wds_macaddr,
- uint8_t type);
- QDF_STATUS
- (*lro_hash_config)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t pdev_id,
- struct cdp_lro_hash_config *rx_offld_hash);
- void (*update_dp_stats)(void *soc, void *stats, uint16_t id,
- uint8_t type);
- #ifdef FEATURE_NAC_RSSI
- uint8_t (*rx_invalid_peer)(struct cdp_ctrl_objmgr_psoc *soc,
- uint8_t pdev_id, void *msg);
- #else
- uint8_t (*rx_invalid_peer)(uint8_t vdev_id, void *wh);
- #endif
- int (*peer_map_event)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint16_t peer_id, uint16_t hw_peer_id,
- uint8_t vdev_id, uint8_t *peer_mac_addr,
- enum cdp_txrx_ast_entry_type peer_type,
- uint32_t tx_ast_hashidx);
- int (*peer_unmap_event)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint16_t peer_id,
- uint8_t vdev_id);
- int (*get_dp_cfg_param)(struct cdp_ctrl_objmgr_psoc *psoc,
- enum cdp_cfg_param_type param_num);
- void (*rx_mic_error)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint8_t pdev_id,
- struct cdp_rx_mic_err_info *info);
- bool (*rx_frag_tkip_demic)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint8_t vdev_id, uint8_t *peer_mac_addr,
- qdf_nbuf_t nbuf,
- uint16_t hdr_space);
- uint8_t (*freq_to_channel)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint8_t pdev_id, uint16_t freq);
- uint8_t (*freq_to_band)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint8_t pdev_id, uint16_t freq);
- #ifdef ATH_SUPPORT_NAC_RSSI
- int (*config_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint8_t pdev_id,
- u_int8_t vdev_id,
- enum cdp_nac_param_cmd cmd, char *bssid,
- char *client_macaddr, uint8_t chan_num);
- int
- (*config_bssid_in_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint8_t pdev_id, u_int8_t vdev_id,
- enum cdp_nac_param_cmd cmd,
- char *bssid, char *client_mac);
- #endif
- int (*peer_sta_kickout)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint16_t pdev_id, uint8_t *peer_macaddr);
- /**
- * send_delba() - Send delba to peer
- * @psoc: Objmgr soc handle
- * @vdev_id: dp vdev id
- * @peer_macaddr: Peer mac addr
- * @tid: Tid number
- *
- * Return: 0 for success, non-zero for failure
- */
- int (*send_delba)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t vdev_id,
- uint8_t *peer_macaddr, uint8_t tid,
- uint8_t reason_code);
- int
- (*peer_delete_multiple_wds_entries)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint8_t vdev_id,
- uint8_t *dest_macaddr,
- uint8_t *peer_macaddr,
- uint32_t flags);
- int
- (*pdev_update_lmac_n_target_pdev_id)(struct cdp_ctrl_objmgr_psoc *psoc,
- uint8_t *pdev_id,
- uint8_t *lmac_id,
- uint8_t *target_pdev_id);
- bool (*is_roam_inprogress)(uint32_t vdev_id);
- enum QDF_GLOBAL_MODE (*get_con_mode)(void);
- #ifdef QCA_PEER_MULTIQ_SUPPORT
- int (*peer_ast_flowid_map)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle,
- uint16_t peer_id, uint8_t vdev_id, uint8_t *peer_mac_addr);
- #endif
- /* TODO: Add any other control path calls required to OL_IF/WMA layer */
- };
- #ifdef DP_PEER_EXTENDED_API
- /**
- * struct cdp_misc_ops - mcl ops not classified
- * @set_ibss_vdev_heart_beat_timer: Update ibss vdev heart beat timer
- * @set_wmm_param: set wmm parameters
- * @bad_peer_txctl_set_setting: configure bad peer tx limit setting
- * @bad_peer_txctl_update_threshold: configure bad peer tx threshold limit
- * @hl_tdls_flag_reset: reset tdls flag for vdev
- * @tx_non_std: Allow the control-path SW to send data frames
- * @get_vdev_id: get vdev id
- * @set_wisa_mode: set wisa mode for a vdev
- * @txrx_data_stall_cb_register: register data stall callback
- * @txrx_data_stall_cb_deregister: deregister data stall callback
- * @txrx_post_data_stall_event: post data stall event
- * @runtime_suspend: ensure TXRX is ready to runtime suspend
- * @runtime_resume: ensure TXRX is ready to runtime resume
- * @get_opmode: get operation mode of vdev
- * @mark_first_wakeup_packet: set flag to indicate that fw is compatible for
- marking first packet after wow wakeup
- * @update_mac_id: update mac_id for vdev
- * @flush_rx_frames: flush rx frames on the queue
- * @get_intra_bss_fwd_pkts_count: to get the total tx and rx packets that
- has been forwarded from txrx layer
- without going to upper layers
- * @pkt_log_init: handler to initialize packet log
- * @pkt_log_con_service: handler to connect packet log service
- * @get_num_rx_contexts: handler to get number of RX contexts
- * @register_packetdump_cb: register callback for different pktlog
- * @unregister_packetdump_cb: unregister callback for different pktlog
- * @pdev_reset_driver_del_ack: reset driver delayed ack enabled flag
- * @vdev_set_driver_del_ack_enable: set driver delayed ack enabled flag
- *
- * Function pointers for miscellaneous soc/pdev/vdev related operations.
- */
- struct cdp_misc_ops {
- uint16_t (*set_ibss_vdev_heart_beat_timer)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id,
- uint16_t timer_value_sec);
- void (*set_wmm_param)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- struct ol_tx_wmm_param_t wmm_param);
- void (*bad_peer_txctl_set_setting)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id, int enable,
- int period, int txq_limit);
- void (*bad_peer_txctl_update_threshold)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- int level, int tput_thresh,
- int tx_limit);
- void (*hl_tdls_flag_reset)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id, bool flag);
- qdf_nbuf_t (*tx_non_std)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
- enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
- uint16_t (*get_vdev_id)(struct cdp_vdev *vdev);
- uint32_t (*get_tx_ack_stats)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id);
- QDF_STATUS (*set_wisa_mode)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id, bool enable);
- QDF_STATUS (*txrx_data_stall_cb_register)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- data_stall_detect_cb cb);
- QDF_STATUS (*txrx_data_stall_cb_deregister)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- data_stall_detect_cb cb);
- void (*txrx_post_data_stall_event)(
- struct cdp_soc_t *soc_hdl,
- enum data_stall_log_event_indicator indicator,
- enum data_stall_log_event_type data_stall_type,
- uint32_t pdev_id, uint32_t vdev_id_bitmap,
- enum data_stall_log_recovery_type recovery_type);
- QDF_STATUS (*runtime_suspend)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- QDF_STATUS (*runtime_resume)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- int (*get_opmode)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
- void (*mark_first_wakeup_packet)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id, uint8_t value);
- void (*update_mac_id)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
- uint8_t mac_id);
- void (*flush_rx_frames)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- void *peer, bool drop);
- A_STATUS(*get_intra_bss_fwd_pkts_count)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id,
- uint64_t *fwd_tx_packets,
- uint64_t *fwd_rx_packets);
- void (*pkt_log_init)(struct cdp_soc_t *soc_hdl, uint8_t pdev,
- void *scn);
- void (*pkt_log_con_service)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id, void *scn);
- int (*get_num_rx_contexts)(struct cdp_soc_t *soc_hdl);
- void (*register_pktdump_cb)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- ol_txrx_pktdump_cb tx_cb,
- ol_txrx_pktdump_cb rx_cb);
- void (*unregister_pktdump_cb)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- void (*pdev_reset_driver_del_ack)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- void (*vdev_set_driver_del_ack_enable)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id,
- unsigned long rx_packets,
- uint32_t time_in_ms,
- uint32_t high_th,
- uint32_t low_th);
- void (*vdev_set_bundle_require_flag)(uint8_t vdev_id,
- unsigned long tx_bytes,
- uint32_t time_in_ms,
- uint32_t high_th,
- uint32_t low_th);
- void (*pdev_reset_bundle_require_flag)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- QDF_STATUS (*txrx_ext_stats_request)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- struct cdp_txrx_ext_stats *req);
- QDF_STATUS (*request_rx_hw_stats)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id);
- };
- /**
- * struct cdp_ocb_ops - mcl ocb ops
- * @set_ocb_chan_info: set OCB channel info
- * @get_ocb_chan_info: get OCB channel info
- *
- * Function pointers for operations related to OCB.
- */
- struct cdp_ocb_ops {
- void (*set_ocb_chan_info)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
- struct ol_txrx_ocb_set_chan ocb_set_chan);
- struct ol_txrx_ocb_chan_info *(*get_ocb_chan_info)(
- struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
- };
- /**
- * struct cdp_peer_ops - mcl peer related ops
- * @register_peer:
- * @clear_peer:
- * @find_peer_exist
- * @find_peer_exist_on_vdev
- * @find_peer_exist_on_other_vdev
- * @peer_state_update:
- * @get_vdevid:
- * @register_ocb_peer:
- * @peer_get_peer_mac_addr:
- * @get_peer_state:
- * @update_ibss_add_peer_num_of_vdev:
- * @copy_mac_addr_raw:
- * @add_last_real_peer:
- * @is_vdev_restore_last_peer:
- * @update_last_real_peer:
- */
- struct cdp_peer_ops {
- QDF_STATUS (*register_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- struct ol_txrx_desc_type *sta_desc);
- QDF_STATUS (*clear_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- struct qdf_mac_addr peer_addr);
- bool (*find_peer_exist)(struct cdp_soc_t *soc, uint8_t pdev_id,
- uint8_t *peer_addr);
- bool (*find_peer_exist_on_vdev)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint8_t *peer_addr);
- bool (*find_peer_exist_on_other_vdev)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- uint8_t *peer_addr,
- uint16_t max_bssid);
- QDF_STATUS (*peer_state_update)(struct cdp_soc_t *soc,
- uint8_t *peer_addr,
- enum ol_txrx_peer_state state);
- QDF_STATUS (*get_vdevid)(struct cdp_soc_t *soc_hdl, uint8_t *peer_mac,
- uint8_t *vdev_id);
- struct cdp_vdev * (*get_vdev_by_peer_addr)(struct cdp_pdev *pdev,
- struct qdf_mac_addr peer_addr);
- QDF_STATUS (*register_ocb_peer)(uint8_t *mac_addr);
- uint8_t * (*peer_get_peer_mac_addr)(void *peer);
- int (*get_peer_state)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint8_t *peer_mac);
- struct cdp_vdev * (*get_vdev_for_peer)(void *peer);
- int16_t (*update_ibss_add_peer_num_of_vdev)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- int16_t peer_num_delta);
- void (*remove_peers_for_vdev)(struct cdp_vdev *vdev,
- ol_txrx_vdev_peer_remove_cb callback,
- void *callback_context, bool remove_last_peer);
- void (*remove_peers_for_vdev_no_lock)(struct cdp_vdev *vdev,
- ol_txrx_vdev_peer_remove_cb callback,
- void *callback_context);
- void (*copy_mac_addr_raw)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint8_t *bss_addr);
- void (*add_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id,
- uint8_t vdev_id);
- bool (*is_vdev_restore_last_peer)(struct cdp_soc_t *soc,
- uint8_t vdev_id,
- uint8_t *peer_mac);
- void (*update_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id,
- uint8_t vdev_id, bool restore_last_peer);
- void (*peer_detach_force_delete)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id, uint8_t *peer_addr);
- void (*set_tdls_offchan_enabled)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint8_t *peer_mac, bool val);
- void (*set_peer_as_tdls_peer)(struct cdp_soc_t *soc, uint8_t vdev_id,
- uint8_t *peer_mac, bool val);
- };
- /**
- * struct cdp_mob_stats_ops - mcl mob stats ops
- * @clear_stats: handler to clear ol txrx stats
- * @stats: handler to update ol txrx stats
- */
- struct cdp_mob_stats_ops {
- QDF_STATUS(*clear_stats)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id, uint8_t bitmap);
- int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len);
- };
- /**
- * struct cdp_pmf_ops - mcl protected management frame ops
- * @get_pn_info: handler to get pn info from peer
- *
- * Function pointers for pmf related operations.
- */
- struct cdp_pmf_ops {
- void (*get_pn_info)(struct cdp_soc_t *soc, uint8_t *peer_mac,
- uint8_t vdev_id, uint8_t **last_pn_valid,
- uint64_t **last_pn, uint32_t **rmf_pn_replays);
- };
- #endif
- #ifdef DP_FLOW_CTL
- /**
- * struct cdp_cfg_ops - mcl configuration ops
- * @set_cfg_rx_fwd_disabled: set rx_fwd_disabled flag
- * @set_cfg_packet_log_enabled: set is_packet_log_enabled flag
- * @cfg_attach: hardcode the configuration parameters
- * @vdev_rx_set_intrabss_fwd: set disable_intrabss_fwd flag
- * @is_rx_fwd_disabled: get the rx_fwd_disabled flag,
- * 1 enabled, 0 disabled.
- * @tx_set_is_mgmt_over_wmi_enabled: set is_mgmt_over_wmi_enabled flag to
- * indicate that mgmt over wmi is enabled
- * or not,
- * 1 for enabled, 0 for disable
- * @is_high_latency: get device is high or low latency device,
- * 1 high latency bus, 0 low latency bus
- * @set_flow_control_parameters: set flow control parameters
- * @set_flow_steering: set flow_steering_enabled flag
- * @set_ptp_rx_opt_enabled: set is_ptp_rx_opt_enabled flag
- * @set_new_htt_msg_format: set new_htt_msg_format flag
- * @set_peer_unmap_conf_support: set enable_peer_unmap_conf_support flag
- * @get_peer_unmap_conf_support: get enable_peer_unmap_conf_support flag
- * @set_tx_compl_tsf64: set enable_tx_compl_tsf64 flag,
- * 1 enabled, 0 disabled.
- * @get_tx_compl_tsf64: get enable_tx_compl_tsf64 flag,
- * 1 enabled, 0 disabled.
- */
- struct cdp_cfg_ops {
- void (*set_cfg_rx_fwd_disabled)(struct cdp_cfg *cfg_pdev,
- uint8_t disable_rx_fwd);
- void (*set_cfg_packet_log_enabled)(struct cdp_cfg *cfg_pdev,
- uint8_t val);
- struct cdp_cfg * (*cfg_attach)(qdf_device_t osdev, void *cfg_param);
- void (*vdev_rx_set_intrabss_fwd)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id, bool val);
- uint8_t (*is_rx_fwd_disabled)(struct cdp_vdev *vdev);
- void (*tx_set_is_mgmt_over_wmi_enabled)(uint8_t value);
- int (*is_high_latency)(struct cdp_cfg *cfg_pdev);
- void (*set_flow_control_parameters)(struct cdp_cfg *cfg_pdev,
- void *param);
- void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val);
- void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val);
- void (*set_new_htt_msg_format)(uint8_t val);
- void (*set_peer_unmap_conf_support)(bool val);
- bool (*get_peer_unmap_conf_support)(void);
- void (*set_tx_compl_tsf64)(bool val);
- bool (*get_tx_compl_tsf64)(void);
- };
- /**
- * struct cdp_flowctl_ops - mcl flow control
- * @flow_pool_map_handler: handler to map flow_id and pool descriptors
- * @flow_pool_unmap_handler: handler to unmap flow_id and pool descriptors
- * @register_pause_cb: handler to register tx pause callback
- * @set_desc_global_pool_size: handler to set global pool size
- * @dump_flow_pool_info: handler to dump global and flow pool info
- * @tx_desc_thresh_reached: handler to set tx desc threshold
- *
- * Function pointers for operations related to flow control
- */
- struct cdp_flowctl_ops {
- QDF_STATUS (*flow_pool_map_handler)(struct cdp_soc_t *soc,
- uint8_t pdev_id,
- uint8_t vdev_id);
- void (*flow_pool_unmap_handler)(struct cdp_soc_t *soc,
- uint8_t pdev_id,
- uint8_t vdev_id);
- QDF_STATUS (*register_pause_cb)(struct cdp_soc_t *soc,
- tx_pause_callback);
- void (*set_desc_global_pool_size)(uint32_t num_msdu_desc);
- void (*dump_flow_pool_info)(struct cdp_soc_t *soc_hdl);
- bool (*tx_desc_thresh_reached)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id);
- };
- /**
- * struct cdp_lflowctl_ops - mcl legacy flow control ops
- * @register_tx_flow_control: Register tx flow control callback
- * @set_vdev_tx_desc_limit: Set tx descriptor limit for a vdev
- * @set_vdev_os_queue_status: Set vdev queue status
- * @deregister_tx_flow_control_cb: Deregister tx flow control callback
- * @flow_control_cb: Call osif flow control callback
- * @get_tx_resource: Get tx resources and comapre with watermark
- * @ll_set_tx_pause_q_depth: set pause queue depth
- * @vdev_flush: Flush all packets on a particular vdev
- * @vdev_pause: Pause a particular vdev
- * @vdev_unpause: Unpause a particular vdev
- *
- * Function pointers for operations related to flow control
- */
- struct cdp_lflowctl_ops {
- #ifdef QCA_HL_NETDEV_FLOW_CONTROL
- int (*register_tx_flow_control)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- tx_pause_callback flowcontrol);
- int (*set_vdev_tx_desc_limit)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id, uint32_t chan_freq);
- int (*set_vdev_os_queue_status)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id,
- enum netif_action_type action);
- #else
- int (*register_tx_flow_control)(
- struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id,
- ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,
- ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause);
- #endif /* QCA_HL_NETDEV_FLOW_CONTROL */
- int (*deregister_tx_flow_control_cb)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id);
- void (*flow_control_cb)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
- bool tx_resume);
- bool (*get_tx_resource)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- struct qdf_mac_addr peer_addr,
- unsigned int low_watermark,
- unsigned int high_watermark_offset);
- int (*ll_set_tx_pause_q_depth)(struct cdp_soc_t *soc, uint8_t vdev_id,
- int pause_q_depth);
- void (*vdev_flush)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
- void (*vdev_pause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
- uint32_t reason, uint32_t pause_type);
- void (*vdev_unpause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
- uint32_t reason, uint32_t pause_type);
- };
- /**
- * struct cdp_throttle_ops - mcl throttle ops
- * @throttle_init_period: handler to initialize tx throttle time
- * @throttle_set_level: handler to set tx throttle level
- */
- struct cdp_throttle_ops {
- void (*throttle_init_period)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id, int period,
- uint8_t *dutycycle_level);
- void (*throttle_set_level)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id, int level);
- };
- #endif
- #ifdef IPA_OFFLOAD
- /**
- * struct cdp_ipa_ops - mcl ipa data path ops
- * @ipa_get_resource:
- * @ipa_set_doorbell_paddr:
- * @ipa_set_active:
- * @ipa_op_response:
- * @ipa_register_op_cb:
- * @ipa_get_stat:
- * @ipa_tx_data_frame:
- */
- struct cdp_ipa_ops {
- QDF_STATUS (*ipa_get_resource)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- QDF_STATUS (*ipa_set_doorbell_paddr)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- QDF_STATUS (*ipa_set_active)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- bool uc_active, bool is_tx);
- QDF_STATUS (*ipa_op_response)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id, uint8_t *op_msg);
- QDF_STATUS (*ipa_register_op_cb)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- void (*ipa_uc_op_cb_type)
- (uint8_t *op_msg, void *osif_ctxt),
- void *usr_ctxt);
- QDF_STATUS (*ipa_get_stat)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
- qdf_nbuf_t (*ipa_tx_data_frame)(struct cdp_soc_t *soc_hdl,
- uint8_t vdev_id, qdf_nbuf_t skb);
- void (*ipa_set_uc_tx_partition_base)(struct cdp_cfg *pdev,
- uint32_t value);
- #ifdef FEATURE_METERING
- QDF_STATUS (*ipa_uc_get_share_stats)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- uint8_t reset_stats);
- QDF_STATUS (*ipa_uc_set_quota)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id, uint64_t quota_bytes);
- #endif
- QDF_STATUS (*ipa_enable_autonomy)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- QDF_STATUS (*ipa_disable_autonomy)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- #ifdef CONFIG_IPA_WDI_UNIFIED_API
- QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- void *ipa_i2w_cb, void *ipa_w2i_cb,
- void *ipa_wdi_meter_notifier_cb,
- uint32_t ipa_desc_size, void *ipa_priv,
- bool is_rm_enabled, uint32_t *tx_pipe_handle,
- uint32_t *rx_pipe_handle, bool is_smmu_enabled,
- qdf_ipa_sys_connect_params_t *sys_in,
- bool over_gsi);
- #else /* CONFIG_IPA_WDI_UNIFIED_API */
- QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- void *ipa_i2w_cb, void *ipa_w2i_cb,
- void *ipa_wdi_meter_notifier_cb,
- uint32_t ipa_desc_size, void *ipa_priv,
- bool is_rm_enabled, uint32_t *tx_pipe_handle,
- uint32_t *rx_pipe_handle);
- #endif /* CONFIG_IPA_WDI_UNIFIED_API */
- QDF_STATUS (*ipa_cleanup)(uint32_t tx_pipe_handle,
- uint32_t rx_pipe_handle);
- QDF_STATUS (*ipa_setup_iface)(char *ifname, uint8_t *mac_addr,
- qdf_ipa_client_type_t prod_client,
- qdf_ipa_client_type_t cons_client,
- uint8_t session_id, bool is_ipv6_enabled);
- QDF_STATUS (*ipa_cleanup_iface)(char *ifname, bool is_ipv6_enabled);
- QDF_STATUS (*ipa_enable_pipes)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- QDF_STATUS (*ipa_disable_pipes)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- QDF_STATUS (*ipa_set_perf_level)(int client,
- uint32_t max_supported_bw_mbps);
- bool (*ipa_rx_intrabss_fwd)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
- qdf_nbuf_t nbuf, bool *fwd_success);
- };
- #endif
- #ifdef DP_POWER_SAVE
- /**
- * struct cdp_tx_delay_ops - mcl tx delay ops
- * @tx_delay: handler to get tx packet delay
- * @tx_delay_hist: handler to get tx packet delay histogram
- * @tx_packet_count: handler to get tx packet count
- * @tx_set_compute_interval: update compute interval period for TSM stats
- *
- * Function pointer for operations related to tx delay.
- */
- struct cdp_tx_delay_ops {
- void (*tx_delay)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- uint32_t *queue_delay_microsec,
- uint32_t *tx_delay_microsec, int category);
- void (*tx_delay_hist)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- uint16_t *bin_values, int category);
- void (*tx_packet_count)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
- uint16_t *out_packet_count,
- uint16_t *out_packet_loss_count, int category);
- void (*tx_set_compute_interval)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id, uint32_t interval);
- };
- /**
- * struct cdp_bus_ops - mcl bus suspend/resume ops
- * @bus_suspend: handler for bus suspend
- * @bus_resume: handler for bus resume
- * @process_wow_ack_rsp: handler for wow ack response
- */
- struct cdp_bus_ops {
- QDF_STATUS (*bus_suspend)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
- QDF_STATUS (*bus_resume)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
- void (*process_wow_ack_rsp)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
- };
- #endif
- #ifdef RECEIVE_OFFLOAD
- /**
- * struct cdp_rx_offld_ops - mcl host receive offload ops
- * @register_rx_offld_flush_cb:
- * @deregister_rx_offld_flush_cb:
- */
- struct cdp_rx_offld_ops {
- void (*register_rx_offld_flush_cb)(void (rx_offld_flush_cb)(void *));
- void (*deregister_rx_offld_flush_cb)(void);
- };
- #endif
- #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
- /**
- * struct cdp_cfr_ops - host cfr ops
- * @txrx_cfr_filter: Handler to configure host rx monitor status ring
- * @txrx_get_cfr_rcc: Handler to get CFR mode
- * @txrx_set_cfr_rcc: Handler to enable/disable CFR mode
- * @txrx_get_cfr_dbg_stats: Handler to get debug statistics for CFR mode
- * @txrx_clear_cfr_dbg_stats: Handler to clear debug statistics for CFR mode
- */
- struct cdp_cfr_ops {
- void (*txrx_cfr_filter)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- bool enable,
- struct cdp_monitor_filter *filter_val);
- bool (*txrx_get_cfr_rcc)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- void (*txrx_set_cfr_rcc)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- bool enable);
- void (*txrx_get_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id,
- struct cdp_cfr_rcc_stats *buf);
- void (*txrx_clear_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl,
- uint8_t pdev_id);
- };
- #endif
- struct cdp_ops {
- struct cdp_cmn_ops *cmn_drv_ops;
- struct cdp_ctrl_ops *ctrl_ops;
- struct cdp_me_ops *me_ops;
- struct cdp_mon_ops *mon_ops;
- struct cdp_host_stats_ops *host_stats_ops;
- struct cdp_wds_ops *wds_ops;
- struct cdp_raw_ops *raw_ops;
- struct cdp_pflow_ops *pflow_ops;
- #ifdef DP_PEER_EXTENDED_API
- struct cdp_misc_ops *misc_ops;
- struct cdp_peer_ops *peer_ops;
- struct cdp_ocb_ops *ocb_ops;
- struct cdp_mob_stats_ops *mob_stats_ops;
- struct cdp_pmf_ops *pmf_ops;
- #endif
- #ifdef DP_FLOW_CTL
- struct cdp_cfg_ops *cfg_ops;
- struct cdp_flowctl_ops *flowctl_ops;
- struct cdp_lflowctl_ops *l_flowctl_ops;
- struct cdp_throttle_ops *throttle_ops;
- #endif
- #ifdef DP_POWER_SAVE
- struct cdp_bus_ops *bus_ops;
- struct cdp_tx_delay_ops *delay_ops;
- #endif
- #ifdef IPA_OFFLOAD
- struct cdp_ipa_ops *ipa_ops;
- #endif
- #ifdef RECEIVE_OFFLOAD
- struct cdp_rx_offld_ops *rx_offld_ops;
- #endif
- #ifdef WLAN_FEATURE_PKT_CAPTURE
- struct cdp_pktcapture_ops *pktcapture_ops;
- #endif
- #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
- struct cdp_cfr_ops *cfr_ops;
- #endif
- };
- #endif
|