qcacld-3.0: Data path changes to use converged APIs (Part 1)

Change the data path and external modules to use the new
converged common data path APIs.

Change-Id: Ifb48178efd012b6ad9ea6f6d5230d0a809922b1c
CRs-Fixed: 994638
This commit is contained in:
Dhanashri Atre
2016-02-17 13:10:34 -08:00
committed by Vishwajith Upendra
parent 1e11d79646
commit 12a0839cd6
47 changed files with 245 additions and 704 deletions

6
Kbuild
View File

@@ -683,6 +683,11 @@ endif
OL_DIR := core/dp/ol OL_DIR := core/dp/ol
OL_INC := -I$(WLAN_ROOT)/$(OL_DIR)/inc OL_INC := -I$(WLAN_ROOT)/$(OL_DIR)/inc
############ CDP ############
CDP_ROOT_DIR := dp
CDP_INC_DIR := $(CDP_ROOT_DIR)/inc
CDP_INC := -I$(WLAN_COMMON_INC)/$(CDP_INC_DIR)
############ PKTLOG ############ ############ PKTLOG ############
PKTLOG_DIR := core/utils/pktlog PKTLOG_DIR := core/utils/pktlog
PKTLOG_INC := -I$(WLAN_ROOT)/$(PKTLOG_DIR)/include PKTLOG_INC := -I$(WLAN_ROOT)/$(PKTLOG_DIR)/include
@@ -819,6 +824,7 @@ INCS += $(WMA_INC) \
$(FWLOG_INC) \ $(FWLOG_INC) \
$(TXRX_INC) \ $(TXRX_INC) \
$(OL_INC) \ $(OL_INC) \
$(CDP_INC) \
$(PKTLOG_INC) \ $(PKTLOG_INC) \
$(HTT_INC) \ $(HTT_INC) \
$(HTC_INC) \ $(HTC_INC) \

View File

@@ -37,9 +37,6 @@
#include "wmi_unified_api.h" #include "wmi_unified_api.h"
#include "htc_api.h" #include "htc_api.h"
#include "bmi_msg.h" #include "bmi_msg.h"
#include "ol_txrx_api.h"
#include "ol_txrx_ctrl_api.h"
#include "ol_txrx_osif_api.h"
#include "ol_params.h" #include "ol_params.h"
#include <wdi_event_api.h> #include <wdi_event_api.h>

View File

@@ -427,7 +427,7 @@ QDF_STATUS cds_open(void)
} }
gp_cds_context->pdev_txrx_ctx = gp_cds_context->pdev_txrx_ctx =
ol_txrx_pdev_alloc(gp_cds_context->cfg_ctx, ol_txrx_pdev_attach(gp_cds_context->cfg_ctx,
gp_cds_context->htc_ctx, gp_cds_context->htc_ctx,
gp_cds_context->qdf_ctx); gp_cds_context->qdf_ctx);
if (!gp_cds_context->pdev_txrx_ctx) { if (!gp_cds_context->pdev_txrx_ctx) {
@@ -569,7 +569,7 @@ QDF_STATUS cds_pre_enable(v_CONTEXT_t cds_context)
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
if (ol_txrx_pdev_attach(gp_cds_context->pdev_txrx_ctx)) { if (ol_txrx_pdev_post_attach(gp_cds_context->pdev_txrx_ctx)) {
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
"Failed to attach pdev"); "Failed to attach pdev");
htc_stop(gp_cds_context->htc_ctx); htc_stop(gp_cds_context->htc_ctx);
@@ -655,7 +655,7 @@ QDF_STATUS cds_enable(v_CONTEXT_t cds_context)
"%s: SME correctly started", __func__); "%s: SME correctly started", __func__);
if (ol_txrx_pdev_attach_target if (ol_txrx_pdev_attach_target
(p_cds_context->pdev_txrx_ctx) != A_OK) { (p_cds_context->pdev_txrx_ctx)) {
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
"%s: Failed attach target", __func__); "%s: Failed attach target", __func__);
goto err_sme_stop; goto err_sme_stop;

View File

@@ -48,7 +48,6 @@
#include <pktlog_ac_fmt.h> #include <pktlog_ac_fmt.h>
#include <wdi_event.h> #include <wdi_event.h>
#include <ol_htt_tx_api.h> #include <ol_htt_tx_api.h>
#include <ol_txrx_types.h>
#include <ol_txrx_peer_find.h> #include <ol_txrx_peer_find.h>
/*--- target->host HTT message dispatch function ----------------------------*/ /*--- target->host HTT message dispatch function ----------------------------*/

View File

@@ -36,9 +36,6 @@
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <htc_api.h> /* HTC_PACKET */ #include <htc_api.h> /* HTC_PACKET */
#include <ol_ctrl_api.h> /* ol_pdev_handle */
#include <ol_txrx_api.h> /* ol_txrx_pdev_handle */
#define DEBUG_DMA_DONE #define DEBUG_DMA_DONE
#define HTT_TX_MUTEX_TYPE qdf_spinlock_t #define HTT_TX_MUTEX_TYPE qdf_spinlock_t

View File

@@ -29,10 +29,11 @@
#define _OL_CFG__H_ #define _OL_CFG__H_
#include <qdf_types.h> /* uint32_t */ #include <qdf_types.h> /* uint32_t */
#include <ol_ctrl_api.h> /* ol_pdev_handle */ #include <cdp_txrx_cmn.h> /* ol_pdev_handle */
#include <cds_ieee80211_common.h> /* ieee80211_qosframe_htc_addr4 */ #include <cds_ieee80211_common.h> /* ieee80211_qosframe_htc_addr4 */
#include <enet.h> /* LLC_SNAP_HDR_LEN */ #include <enet.h> /* LLC_SNAP_HDR_LEN */
#include "wlan_tgt_def_config.h" #include "wlan_tgt_def_config.h"
#include "ol_txrx_ctrl_api.h" /* txrx_pdev_cfg_param_t */
/** /**
* @brief format of data frames delivered to/from the WLAN driver by/to the OS * @brief format of data frames delivered to/from the WLAN driver by/to the OS

View File

@@ -1,44 +0,0 @@
/*
* Copyright (c) 2011, 2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
*
* 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.
*/
/*
* This file was originally distributed by Qualcomm Atheros, Inc.
* under proprietary terms before Copyright ownership was assigned
* to the Linux Foundation.
*/
/**
* @file ol_ctrl_api.h
* @brief Definitions used in multiple external interfaces to the control SW.
*/
#ifndef _OL_CTRL_API__H_
#define _OL_CTRL_API__H_
struct ol_pdev_t;
typedef struct ol_pdev_t *ol_pdev_handle;
struct ol_vdev_t;
typedef struct ol_vdev_t *ol_vdev_handle;
struct ol_peer_t;
typedef struct ol_peer_t *ol_peer_handle;
#endif /* _OL_CTRL_API__H_ */

View File

@@ -39,9 +39,8 @@
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <athdefs.h> /* A_STATUS */ #include <athdefs.h> /* A_STATUS */
#include <htc_api.h> /* HTC_HANDLE */ #include <htc_api.h> /* HTC_HANDLE */
#include <ol_ctrl_api.h> /* ol_pdev_handle */
#include <ol_txrx_api.h> /* ol_txrx_pdev_handle */
#include "htt.h" /* htt_dbg_stats_type, etc. */ #include "htt.h" /* htt_dbg_stats_type, etc. */
#include <cdp_txrx_cmn.h> /* ol_pdev_handle */
/* TID */ /* TID */
#define OL_HTT_TID_NON_QOS_UNICAST 16 #define OL_HTT_TID_NON_QOS_UNICAST 16

View File

@@ -1,42 +0,0 @@
/*
* Copyright (c) 2012, 2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
*
* 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.
*/
/*
* This file was originally distributed by Qualcomm Atheros, Inc.
* under proprietary terms before Copyright ownership was assigned
* to the Linux Foundation.
*/
/**
* @file ol_osif_api.h
* @brief Definitions used in multiple external interfaces to the txrx SW.
*/
#ifndef _OL_OSIF_API__H_
#define _OL_OSIF_API__H_
/**
* @typedef ol_osif_vdev_handle
* @brief opaque handle for OS shim virtual device object
*/
struct ol_osif_vdev_t;
typedef struct ol_osif_vdev_t *ol_osif_vdev_handle;
#endif /* _OL_OSIF_API__H_ */

View File

@@ -32,27 +32,6 @@
#ifndef _OL_TXRX_API__H_ #ifndef _OL_TXRX_API__H_
#define _OL_TXRX_API__H_ #define _OL_TXRX_API__H_
/**
* @typedef ol_txrx_pdev_handle
* @brief opaque handle for txrx physical device object
*/
struct ol_txrx_pdev_t;
typedef struct ol_txrx_pdev_t *ol_txrx_pdev_handle;
/**
* @typedef ol_txrx_vdev_handle
* @brief opaque handle for txrx virtual device object
*/
struct ol_txrx_vdev_t;
typedef struct ol_txrx_vdev_t *ol_txrx_vdev_handle;
/**
* @typedef ol_txrx_peer_handle
* @brief opaque handle for txrx peer object
*/
struct ol_txrx_peer_t;
typedef struct ol_txrx_peer_t *ol_txrx_peer_handle;
/** /**
* @brief ADDBA negotiation status, used both during requests and confirmations * @brief ADDBA negotiation status, used both during requests and confirmations
*/ */

View File

@@ -37,11 +37,9 @@
#include <qdf_types.h> /* qdf_device_t */ #include <qdf_types.h> /* qdf_device_t */
#include <htc_api.h> /* HTC_HANDLE */ #include <htc_api.h> /* HTC_HANDLE */
#include <ol_osif_api.h> /* ol_osif_vdev_handle */ #include <ol_txrx_api.h> /* ol_sec_type */
#include <ol_txrx_api.h> /* ol_txrx_pdev_handle, etc. */
#include <ol_ctrl_api.h> /* ol_pdev_handle, ol_vdev_handle */
#include <wlan_defs.h> /* MAX_SPATIAL_STREAM */ #include <wlan_defs.h> /* MAX_SPATIAL_STREAM */
#include <cdp_txrx_cmn.h> /* ol_pdev_handle, ol_vdev_handle, etc */
#define OL_ATH_TX_DRAIN_WAIT_DELAY 50 #define OL_ATH_TX_DRAIN_WAIT_DELAY 50
@@ -55,25 +53,6 @@
to soft-AP itself */ to soft-AP itself */
#define WLAN_RX_SAP_SELF_STA_ID (WLAN_MAX_STA_COUNT + 2) #define WLAN_RX_SAP_SELF_STA_ID (WLAN_MAX_STA_COUNT + 2)
/**
* enum wlan_op_mode - Virtual device operation mode
*
* @wlan_op_mode_unknown: Unknown mode
* @wlan_op_mode_ap: AP mode
* @wlan_op_mode_ibss: IBSS mode
* @wlan_op_mode_sta: STA (client) mode
* @wlan_op_mode_monitor: Monitor mode
* @wlan_op_mode_ocb: OCB mode
*/
enum wlan_op_mode {
wlan_op_mode_unknown,
wlan_op_mode_ap,
wlan_op_mode_ibss,
wlan_op_mode_sta,
wlan_op_mode_monitor,
wlan_op_mode_ocb,
};
#define OL_TXQ_PAUSE_REASON_FW (1 << 0) #define OL_TXQ_PAUSE_REASON_FW (1 << 0)
#define OL_TXQ_PAUSE_REASON_PEER_UNAUTHORIZED (1 << 1) #define OL_TXQ_PAUSE_REASON_PEER_UNAUTHORIZED (1 << 1)
#define OL_TXQ_PAUSE_REASON_TX_ABORT (1 << 2) #define OL_TXQ_PAUSE_REASON_TX_ABORT (1 << 2)
@@ -137,10 +116,6 @@ enum netif_reason_type {
#define WLAN_DUMP_TX_FLOW_POOL_INFO 5 #define WLAN_DUMP_TX_FLOW_POOL_INFO 5
#define WLAN_TXRX_DESC_STATS 6 #define WLAN_TXRX_DESC_STATS 6
ol_txrx_pdev_handle
ol_txrx_pdev_alloc(ol_pdev_handle ctrl_pdev,
HTC_HANDLE htc_pdev, qdf_device_t osdev);
/** /**
* @brief Set up the data SW subsystem. * @brief Set up the data SW subsystem.
* @details * @details
@@ -163,59 +138,7 @@ ol_txrx_pdev_alloc(ol_pdev_handle ctrl_pdev,
* @return 0 for success or error code * @return 0 for success or error code
*/ */
int int
ol_txrx_pdev_attach(ol_txrx_pdev_handle pdev); ol_txrx_pdev_post_attach(ol_txrx_pdev_handle pdev);
/**
* @brief Do final steps of data SW setup that send messages to the target.
* @details
* The majority of the data SW setup are done by the pdev_attach function,
* but this function completes the data SW setup by sending datapath
* configuration messages to the target.
*
* @param data_pdev - the physical device being initialized
*/
A_STATUS ol_txrx_pdev_attach_target(ol_txrx_pdev_handle data_pdev);
/**
* @brief Allocate and initialize the data object for a new virtual device.
* @param data_pdev - the physical device the virtual device belongs to
* @param vdev_mac_addr - the MAC address of the virtual device
* @param vdev_id - the ID used to identify the virtual device to the target
* @param op_mode - whether this virtual device is operating as an AP,
* an IBSS, or a STA
* @return
* success: handle to new data vdev object, -OR-
* failure: NULL
*/
ol_txrx_vdev_handle
ol_txrx_vdev_attach(ol_txrx_pdev_handle data_pdev,
uint8_t *vdev_mac_addr,
uint8_t vdev_id, enum wlan_op_mode op_mode);
/**
* @brief Allocate and set up references for a data peer object.
* @details
* When an association with a peer starts, the host's control SW
* uses this function to inform the host data SW.
* The host data SW allocates its own peer object, and stores a
* reference to the control peer object within the data peer object.
* The host data SW also stores a reference to the virtual device
* that the peer is associated with. This virtual device handle is
* used when the data SW delivers rx data frames to the OS shim layer.
* The host data SW returns a handle to the new peer data object,
* so a reference within the control peer object can be set to the
* data peer object.
*
* @param data_pdev - data physical device object that will indirectly
* own the data_peer object
* @param data_vdev - data virtual device object that will directly
* own the data_peer object
* @param peer_mac_addr - MAC address of the new peer
* @return handle to new data peer object, or NULL if the attach fails
*/
ol_txrx_peer_handle
ol_txrx_peer_attach(ol_txrx_pdev_handle data_pdev,
ol_txrx_vdev_handle data_vdev, uint8_t *peer_mac_addr);
/** /**
* @brief Parameter type to be input to ol_txrx_peer_update * @brief Parameter type to be input to ol_txrx_peer_update
@@ -486,61 +409,8 @@ void ol_txrx_pdev_unpause(struct ol_txrx_pdev_t *pdev, uint32_t reason)
*/ */
void ol_txrx_tx_sync(ol_txrx_pdev_handle data_pdev, uint8_t sync_cnt); void ol_txrx_tx_sync(ol_txrx_pdev_handle data_pdev, uint8_t sync_cnt);
/**
* @brief Delete a peer's data object.
* @details
* When the host's control SW disassociates a peer, it calls this
* function to delete the peer's data object.
* The reference stored in the control peer object to the data peer
* object (set up by a call to ol_peer_store()) is provided.
*
* @param data_peer - the object to delete
*/
void ol_txrx_peer_detach(ol_txrx_peer_handle data_peer);
typedef void (*ol_txrx_vdev_delete_cb)(void *context); typedef void (*ol_txrx_vdev_delete_cb)(void *context);
/**
* @brief Deallocate the specified data virtual device object.
* @details
* All peers associated with the virtual device need to be deleted
* (ol_txrx_peer_detach) before the virtual device itself is deleted.
* However, for the peers to be fully deleted, the peer deletion has to
* percolate through the target data FW and back up to the host data SW.
* Thus, even though the host control SW may have issued a peer_detach
* call for each of the vdev's peers, the peer objects may still be
* allocated, pending removal of all references to them by the target FW.
* In this case, though the vdev_detach function call will still return
* immediately, the vdev itself won't actually be deleted, until the
* deletions of all its peers complete.
* The caller can provide a callback function pointer to be notified when
* the vdev deletion actually happens - whether it's directly within the
* vdev_detach call, or if it's deferred until all in-progress peer
* deletions have completed.
*
* @param data_vdev - data object for the virtual device in question
* @param callback - function to call (if non-NULL) once the vdev has
* been wholly deleted
* @param callback_context - context to provide in the callback
*/
void
ol_txrx_vdev_detach(ol_txrx_vdev_handle data_vdev,
ol_txrx_vdev_delete_cb callback, void *callback_context);
/**
* @brief Delete the data SW state.
* @details
* This function is used when the WLAN driver is being removed to
* remove the host data component within the driver.
* All virtual devices within the physical device need to be deleted
* (ol_txrx_vdev_detach) before the physical device itself is deleted.
*
* @param data_pdev - the data physical device object being removed
* @param force - delete the pdev (and its vdevs and peers) even if there
* are outstanding references by the target to the vdevs and peers
* within the pdev
*/
void ol_txrx_pdev_detach(ol_txrx_pdev_handle data_pdev, int force);
typedef void typedef void
(*ol_txrx_data_tx_cb)(void *ctxt, qdf_nbuf_t tx_frm, int had_error); (*ol_txrx_data_tx_cb)(void *ctxt, qdf_nbuf_t tx_frm, int had_error);
@@ -587,93 +457,6 @@ qdf_nbuf_t
ol_tx_non_std(ol_txrx_vdev_handle data_vdev, ol_tx_non_std(ol_txrx_vdev_handle data_vdev,
enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list); enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
typedef void
(*ol_txrx_mgmt_tx_cb)(void *ctxt, qdf_nbuf_t tx_mgmt_frm, int had_error);
/**
* @brief Store a callback for delivery notifications for management frames.
* @details
* When the txrx SW receives notifications from the target that a tx frame
* has been delivered to its recipient, it will check if the tx frame
* is a management frame. If so, the txrx SW will check the management
* frame type specified when the frame was submitted for transmission.
* If there is a callback function registered for the type of managment
* frame in question, the txrx code will invoke the callback to inform
* the management + control SW that the mgmt frame was delivered.
* This function is used by the control SW to store a callback pointer
* for a given type of management frame.
*
* @param pdev - the data physical device object
* @param type - the type of mgmt frame the callback is used for
* @param download_cb - the callback for notification of delivery to the target
* @param ota_ack_cb - the callback for notification of delivery to the peer
* @param ctxt - context to use with the callback
*/
void
ol_txrx_mgmt_tx_cb_set(ol_txrx_pdev_handle pdev,
uint8_t type,
ol_txrx_mgmt_tx_cb download_cb,
ol_txrx_mgmt_tx_cb ota_ack_cb, void *ctxt);
/**
* @brief Transmit a management frame.
* @details
* Send the specified management frame from the specified virtual device.
* The type is used for determining whether to invoke a callback to inform
* the sender that the tx mgmt frame was delivered, and if so, which
* callback to use.
*
* @param vdev - virtual device transmitting the frame
* @param tx_mgmt_frm - management frame to transmit
* @param type - the type of managment frame (determines what callback to use)
* @param use_6mbps - specify whether management frame to transmit should use 6 Mbps
* rather than 1 Mbps min rate(for 5GHz band or P2P)
* @return
* 0 -> the frame is accepted for transmission, -OR-
* 1 -> the frame was not accepted
*/
int
ol_txrx_mgmt_send(ol_txrx_vdev_handle vdev,
qdf_nbuf_t tx_mgmt_frm,
uint8_t type, uint8_t use_6mbps, uint16_t chanfreq);
/**
* @brief Setup the monitor mode vap (vdev) for this pdev
* @details
* When a non-NULL vdev handle is registered as the monitor mode vdev, all
* packets received by the system are delivered to the OS stack on this
* interface in 802.11 MPDU format. Only a single monitor mode interface
* can be up at any timer. When the vdev handle is set to NULL the monitor
* mode delivery is stopped. This handle may either be a unique vdev
* object that only receives monitor mode packets OR a point to a a vdev
* object that also receives non-monitor traffic. In the second case the
* OS stack is responsible for delivering the two streams using approprate
* OS APIs
*
* @param pdev - the data physical device object
* @param vdev - the data virtual device object to deliver monitor mode
* packets on
* @return
* 0 -> the monitor mode vap was sucessfully setup
* -1 -> Unable to setup monitor mode
*/
int
ol_txrx_set_monitor_mode_vap(ol_txrx_pdev_handle pdev,
ol_txrx_vdev_handle vdev);
/**
* @brief Setup the current operating channel of the device
* @details
* Mainly used when populating monitor mode status that requires the
* current operating channel
*
* @param pdev - the data physical device object
* @param chan_mhz - the channel frequency (mhz)
* packets on
* @return - void
*/
void ol_txrx_set_curchan(ol_txrx_pdev_handle pdev, uint32_t chan_mhz);
#ifdef FEATURE_RUNTIME_PM #ifdef FEATURE_RUNTIME_PM
QDF_STATUS ol_txrx_runtime_suspend(ol_txrx_pdev_handle txrx_pdev); QDF_STATUS ol_txrx_runtime_suspend(ol_txrx_pdev_handle txrx_pdev);
QDF_STATUS ol_txrx_runtime_resume(ol_txrx_pdev_handle txrx_pdev); QDF_STATUS ol_txrx_runtime_resume(ol_txrx_pdev_handle txrx_pdev);
@@ -717,22 +500,6 @@ void ol_txrx_discard_tx_pending(ol_txrx_pdev_handle pdev);
*/ */
void ol_txrx_set_safemode(ol_txrx_vdev_handle vdev, uint32_t val); void ol_txrx_set_safemode(ol_txrx_vdev_handle vdev, uint32_t val);
/**
* @brief set the privacy filter
* @details
* Rx related. Set the privacy filters. When rx packets, check
* the ether type, filter type and packet type
* to decide whether discard these packets.
*
* @param vdev - the data virtual device object
* @param filter - filters to be set
* @param num - the number of filters
* @return - void
*/
void
ol_txrx_set_privacy_filters(ol_txrx_vdev_handle vdev,
void *filter, uint32_t num);
/** /**
* @brief configure the drop unencrypted frame flag * @brief configure the drop unencrypted frame flag
* @details * @details

View File

@@ -37,70 +37,10 @@
#include <htt.h> /* htt_dbg_stats_type */ #include <htt.h> /* htt_dbg_stats_type */
#include <ol_txrx_stats.h> /* ol_txrx_stats */ #include <ol_txrx_stats.h> /* ol_txrx_stats */
typedef void (*ol_txrx_stats_callback)(void *ctxt,
enum htt_dbg_stats_type type,
uint8_t *buf, int bytes);
struct ol_txrx_stats_req {
uint32_t stats_type_upload_mask; /* which stats to upload */
uint32_t stats_type_reset_mask; /* which stats to reset */
/* stats will be printed if either print element is set */
struct {
int verbose; /* verbose stats printout */
int concise; /* concise stats printout (takes precedence) */
} print; /* print uploaded stats */
/* stats notify callback will be invoked if fp is non-NULL */
struct {
ol_txrx_stats_callback fp;
void *ctxt;
} callback;
/* stats will be copied into the specified buffer if buf is non-NULL */
struct {
uint8_t *buf;
int byte_limit; /* don't copy more than this */
} copy;
/*
* If blocking is true, the caller will take the specified semaphore
* to wait for the stats to be uploaded, and the driver will release
* the semaphore when the stats are done being uploaded.
*/
struct {
int blocking;
qdf_semaphore_t *sem_ptr;
} wait;
};
#ifndef TXRX_DEBUG_LEVEL #ifndef TXRX_DEBUG_LEVEL
#define TXRX_DEBUG_LEVEL 0 /* no debug info */ #define TXRX_DEBUG_LEVEL 0 /* no debug info */
#endif #endif
#ifndef ATH_PERF_PWR_OFFLOAD /*---------------------------------------------*/
#define ol_txrx_debug(vdev, debug_specs) 0
#define ol_txrx_fw_stats_cfg(vdev, type, val) 0
#define ol_txrx_fw_stats_get(vdev, req, response_expected) 0
#define ol_txrx_aggr_cfg(vdev, max_subfrms_ampdu, max_subfrms_amsdu) 0
#else /*---------------------------------------------------------------------*/
#include <ol_txrx_api.h> /* ol_txrx_pdev_handle, etc. */
int ol_txrx_debug(ol_txrx_vdev_handle vdev, int debug_specs);
void ol_txrx_fw_stats_cfg(ol_txrx_vdev_handle vdev,
uint8_t cfg_stats_type, uint32_t cfg_val);
int ol_txrx_fw_stats_get(ol_txrx_vdev_handle vdev,
struct ol_txrx_stats_req *req,
bool response_expected);
int ol_txrx_aggr_cfg(ol_txrx_vdev_handle vdev,
int max_subfrms_ampdu, int max_subfrms_amsdu);
enum { enum {
TXRX_DBG_MASK_OBJS = 0x01, TXRX_DBG_MASK_OBJS = 0x01,
TXRX_DBG_MASK_STATS = 0x02, TXRX_DBG_MASK_STATS = 0x02,
@@ -119,8 +59,6 @@ enum {
/* uncomment this for verbose txrx printouts (may impact performance) */ /* uncomment this for verbose txrx printouts (may impact performance) */
/* #define TXRX_PRINT_VERBOSE_ENABLE 1 */ /* #define TXRX_PRINT_VERBOSE_ENABLE 1 */
void ol_txrx_print_level_set(unsigned level);
/*--- txrx object (pdev, vdev, peer) display debug functions ---*/ /*--- txrx object (pdev, vdev, peer) display debug functions ---*/
#if TXRX_DEBUG_LEVEL > 5 #if TXRX_DEBUG_LEVEL > 5
@@ -198,7 +136,6 @@ void ol_rx_pn_trace_display(ol_txrx_pdev_handle pdev, int just_once);
#define ol_tx_queue_log_display(pdev) #define ol_tx_queue_log_display(pdev)
#endif /* ATH_PERF_PWR_OFFLOAD */
/*----------------------------------------*/ /*----------------------------------------*/
#endif /* _OL_TXRX_DBG__H_ */ #endif /* _OL_TXRX_DBG__H_ */

View File

@@ -36,7 +36,7 @@
#include <athdefs.h> /* A_STATUS */ #include <athdefs.h> /* A_STATUS */
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <ol_txrx_api.h> /* ol_txrx_pdev_handle */ #include <cdp_txrx_cmn.h> /* ol_txrx_pdev_handle */
static inline uint16_t *ol_tx_msdu_id_storage(qdf_nbuf_t msdu) static inline uint16_t *ol_tx_msdu_id_storage(qdf_nbuf_t msdu)
{ {

View File

@@ -33,11 +33,8 @@
#define _OL_TXRX_OSIF_API__H_ #define _OL_TXRX_OSIF_API__H_
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <ol_osif_api.h> /* ol_osif_vdev_handle */
#include <ol_txrx_api.h> /* ol_txrx_pdev_handle, etc. */
#include <ol_txrx_ctrl_api.h>
#include "cds_sched.h" #include "cds_sched.h"
#include "ol_txrx_ctrl_api.h"
/** /**
* struct ol_rx_cached_buf - rx cached buffer * struct ol_rx_cached_buf - rx cached buffer
@@ -49,54 +46,8 @@ struct ol_rx_cached_buf {
qdf_nbuf_t buf; qdf_nbuf_t buf;
}; };
/**
* @typedef ol_txrx_rx_fp
* @brief receive function to hand batches of data frames from txrx to OS shim
*/
typedef void (*ol_txrx_rx_fp)(void *osif_dev, qdf_nbuf_t msdus);
/**
* @typedef ol_txrx_tx_fp
* @brief top-level transmit function
*/
typedef qdf_nbuf_t (*ol_txrx_tx_fp)(ol_txrx_vdev_handle data_vdev,
qdf_nbuf_t msdu_list);
/**
* @typedef ol_txrx_tx_non_std_fp
* @brief top-level transmit function for non-standard tx frames
* @details
* This function pointer provides an alternative to the ol_txrx_tx_fp
* to support non-standard transmits. In particular, this function
* supports transmission of:
* 1. "Raw" frames
* These raw frames already have an 802.11 header; the usual
* 802.11 header encapsulation by the driver does not apply.
* 2. TSO segments
* During tx completion, the txrx layer needs to reclaim the buffer
* that holds the ethernet/IP/TCP header created for the TSO segment.
* Thus, these tx frames need to be marked as TSO, to show that they
* need this special handling during tx completion.
*
* @param data_vdev - which virtual device should transmit the frame
* @param tx_spec - what non-standard operations to apply to the tx frame
* @param msdu_list - tx frame(s), in a null-terminated list
*/
typedef qdf_nbuf_t (*ol_txrx_tx_non_std_fp)(ol_txrx_vdev_handle data_vdev,
enum ol_tx_spec tx_spec,
qdf_nbuf_t msdu_list);
struct txrx_rx_metainfo; struct txrx_rx_metainfo;
/**
* @typedef ol_txrx_tx_fc_fp
* @brief tx flow control notification function from txrx to OS shim
* @param osif_dev - the virtual device's OS shim object
* @param tx_resume - tx os q should be resumed or not
*/
typedef void (*ol_txrx_tx_flow_control_fp)(void *osif_dev,
bool tx_resume);
/** /**
* struct ol_txrx_desc_type - txrx descriptor type * struct ol_txrx_desc_type - txrx descriptor type
* @sta_id: sta id * @sta_id: sta id
@@ -148,83 +99,6 @@ int
ol_txrx_ll_set_tx_pause_q_depth(uint8_t vdev_id, int pause_q_depth); ol_txrx_ll_set_tx_pause_q_depth(uint8_t vdev_id, int pause_q_depth);
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */ #endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
/**
* @typedef ol_txrx_rx_fp
* @brief receive function to hand batches of data frames from txrx to OS shim
*/
struct ol_txrx_osif_ops {
/* tx function pointers - specified by txrx, stored by OS shim */
struct {
ol_txrx_tx_fp std;
ol_txrx_tx_non_std_fp non_std;
ol_txrx_tx_flow_control_fp flow_control_cb;
} tx;
/* rx function pointers - specified by OS shim, stored by txrx */
struct {
ol_txrx_rx_fp std;
} rx;
};
/**
* @brief Link a vdev's data object with the matching OS shim vdev object.
* @details
* The data object for a virtual device is created by the function
* ol_txrx_vdev_attach. However, rather than fully linking the
* data vdev object with the vdev objects from the other subsystems
* that the data vdev object interacts with, the txrx_vdev_attach
* function focuses primarily on creating the data vdev object.
* After the creation of both the data vdev object and the OS shim
* vdev object, this txrx_osif_vdev_attach function is used to connect
* the two vdev objects, so the data SW can use the OS shim vdev handle
* when passing rx data received by a vdev up to the OS shim.
*
* @param txrx_vdev - the virtual device's data object
* @param osif_vdev - the virtual device's OS shim object
* @param txrx_ops - (pointers to) the functions used for tx and rx data xfer
* There are two portions of these txrx operations.
* The rx portion is filled in by OSIF SW before calling
* ol_txrx_osif_vdev_register; inside the ol_txrx_osif_vdev_register
* the txrx SW stores a copy of these rx function pointers, to use
* as it delivers rx data frames to the OSIF SW.
* The tx portion is filled in by the txrx SW inside
* ol_txrx_osif_vdev_register; when the function call returns,
* the OSIF SW stores a copy of these tx functions to use as it
* delivers tx data frames to the txrx SW.
* The rx function pointer inputs consist of the following:
* rx: the OS shim rx function to deliver rx data frames to.
* This can have different values for different virtual devices,
* e.g. so one virtual device's OS shim directly hands rx frames to
* the OS, but another virtual device's OS shim filters out P2P
* messages before sending the rx frames to the OS.
* The netbufs delivered to the osif_rx function are in the format
* specified by the OS to use for tx and rx frames (either 802.3 or
* native WiFi).
* rx_mon: the OS shim rx monitor function to deliver monitor data to
* Though in practice, it is probable that the same function will
* be used for delivering rx monitor data for all virtual devices,
* in theory each different virtual device can have a different
* OS shim function for accepting rx monitor data.
* The netbufs delivered to the osif_rx_mon function are in 802.11
* format. Each netbuf holds a 802.11 MPDU, not an 802.11 MSDU.
* Depending on compile-time configuration, each netbuf may also
* have a monitor-mode encapsulation header such as a radiotap
* header added before the MPDU contents.
* The tx function pointer outputs consist of the following:
* tx: the tx function pointer for standard data frames
* This function pointer is set by the txrx SW to perform
* host-side transmit operations based on whether a HL or LL
* host/target interface is in use.
* tx_non_std: the tx function pointer for non-standard data frames,
* such as TSO frames, explicitly-prioritized frames, or "raw"
* frames which skip some of the tx operations, such as 802.11
* MAC header encapsulation.
*/
void
ol_txrx_osif_vdev_register(ol_txrx_vdev_handle txrx_vdev,
void *osif_vdev, struct ol_txrx_osif_ops *txrx_ops);
/** /**
* @brief Divide a jumbo TCP frame into smaller segments. * @brief Divide a jumbo TCP frame into smaller segments.
* @details * @details

View File

@@ -36,8 +36,7 @@
#include <osdep.h> /* uint8_t */ #include <osdep.h> /* uint8_t */
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <ol_ctrl_api.h> /* ol_vdev_handle */ #include <cdp_txrx_cmn.h> /* ol_txrx_pdev_handle */
#include <ol_txrx_api.h> /* ol_txrx_peer_handle, etc. */
#include <ol_txrx_types.h> /* OL_TXRX_MAC_ADDR_LEN */ #include <ol_txrx_types.h> /* OL_TXRX_MAC_ADDR_LEN */
#include <cds_ieee80211_common.h> /* ieee80211_frame */ #include <cds_ieee80211_common.h> /* ieee80211_frame */
@@ -140,34 +139,7 @@ ol_rx_notify(ol_pdev_handle pdev,
uint32_t tsf32, uint32_t tsf32,
enum ol_rx_notify_type notify_type, qdf_nbuf_t rx_frame); enum ol_rx_notify_type notify_type, qdf_nbuf_t rx_frame);
/**
* @brief Indicate when a paused STA has tx data available.
* @details
* Indicate to the control SW when a paused peer that previously
* has all its peer-TID queues empty gets a MSDU to transmit.
* Conversely, indicate when a paused peer that had data in one or more of
* its peer-TID queues has all queued data removed (e.g. due to a U-APSD
* triggered transmission), but is still paused.
* It is up to the control SW to determine whether the peer is paused due to
* being in power-save sleep, or some other reason, and thus whether it is
* necessary to set the TIM in beacons to notify a sleeping STA that it has
* data.
* The data SW will also issue this ol_tx_paused_peer_data call when an
* unpaused peer that currently has tx data in one or more of its
* peer-TID queues becomes paused.
* The data SW will not issue this ol_tx_paused_peer_data call when a
* peer with data in one or more of its peer-TID queues becomes unpaused.
*
* @param peer - the paused peer
* @param has_tx_data -
* 1 -> a paused peer that previously had no tx data now does, -OR-
* 0 -> a paused peer that previously had tx data now doesnt
*/
void ol_tx_paused_peer_data(ol_peer_handle peer, int has_tx_data);
#define ol_ctrl_addba_req(pdev, peer_mac_addr, tid) ol_addba_req_reject #define ol_ctrl_addba_req(pdev, peer_mac_addr, tid) ol_addba_req_reject
#define ol_ctrl_rx_addba_complete(pdev, peer_mac_addr, tid, failed) /* no-op */ #define ol_ctrl_rx_addba_complete(pdev, peer_mac_addr, tid, failed) /* no-op */
void ol_txrx_set_peer_authorized_event(struct ol_txrx_vdev_t *vdev);
#endif /* _OL_CTRL_TXRX_API__H_ */ #endif /* _OL_CTRL_TXRX_API__H_ */

View File

@@ -32,13 +32,11 @@
/* external API header files */ /* external API header files */
#include <ol_ctrl_txrx_api.h> /* ol_rx_notify */ #include <ol_ctrl_txrx_api.h> /* ol_rx_notify */
#include <ol_htt_api.h> /* htt_pdev_handle */
#include <ol_txrx_api.h> /* ol_txrx_pdev_handle */ #include <ol_txrx_api.h> /* ol_txrx_pdev_handle */
#include <ol_txrx_htt_api.h> /* ol_rx_indication_handler */ #include <ol_txrx_htt_api.h> /* ol_rx_indication_handler */
#include <ol_htt_rx_api.h> /* htt_rx_peer_id, etc. */ #include <ol_htt_rx_api.h> /* htt_rx_peer_id, etc. */
/* internal API header files */ /* internal API header files */
#include <ol_txrx_types.h> /* ol_txrx_vdev_t, etc. */
#include <ol_txrx_peer_find.h> /* ol_txrx_peer_find_by_id */ #include <ol_txrx_peer_find.h> /* ol_txrx_peer_find_by_id */
#include <ol_rx_reorder.h> /* ol_rx_reorder_store, etc. */ #include <ol_rx_reorder.h> /* ol_rx_reorder_store, etc. */
#include <ol_rx_reorder_timeout.h> /* OL_RX_REORDER_TIMEOUT_UPDATE */ #include <ol_rx_reorder_timeout.h> /* OL_RX_REORDER_TIMEOUT_UPDATE */
@@ -58,7 +56,6 @@
#include <ipv4.h> /* IPv4 header defs */ #include <ipv4.h> /* IPv4 header defs */
#include <ipv6_defs.h> /* IPv6 header defs */ #include <ipv6_defs.h> /* IPv6 header defs */
#include <ol_vowext_dbg_defs.h> #include <ol_vowext_dbg_defs.h>
#include <ol_txrx_osif_api.h>
#include <wma.h> #include <wma.h>
#ifdef HTT_RX_RESTORE #ifdef HTT_RX_RESTORE

View File

@@ -29,7 +29,8 @@
#define _OL_RX__H_ #define _OL_RX__H_
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <ol_txrx_types.h> /* ol_txrx_vdev_t, etc. */ #include <ol_htt_api.h> /* htt_pdev_handle */
#include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t */
void void
ol_rx_deliver(struct ol_txrx_vdev_t *vdev, ol_rx_deliver(struct ol_txrx_vdev_t *vdev,

View File

@@ -53,7 +53,6 @@
#include <ol_txrx_api.h> #include <ol_txrx_api.h>
#include <ol_txrx_htt_api.h> #include <ol_txrx_htt_api.h>
#include <ol_htt_rx_api.h> #include <ol_htt_rx_api.h>
#include <ol_txrx_types.h>
#include <ol_rx_reorder.h> #include <ol_rx_reorder.h>
#include <ol_rx_pn.h> #include <ol_rx_pn.h>
#include <ol_rx_fwd.h> #include <ol_rx_fwd.h>

View File

@@ -35,7 +35,6 @@
#include <cds_ieee80211_common.h> /* ieee80211_frame, etc. */ #include <cds_ieee80211_common.h> /* ieee80211_frame, etc. */
/* internal header files */ /* internal header files */
#include <ol_txrx_types.h> /* ol_txrx_dev_t, etc. */
#include <ol_rx_fwd.h> /* our own defs */ #include <ol_rx_fwd.h> /* our own defs */
#include <ol_rx.h> /* ol_rx_deliver */ #include <ol_rx.h> /* ol_rx_deliver */
#include <ol_txrx_internal.h> /* TXRX_ASSERT1 */ #include <ol_txrx_internal.h> /* TXRX_ASSERT1 */

View File

@@ -31,7 +31,6 @@
#include <ol_ctrl_txrx_api.h> /* ol_rx_err */ #include <ol_ctrl_txrx_api.h> /* ol_rx_err */
#include <ol_txrx_internal.h> /* ol_rx_mpdu_list_next */ #include <ol_txrx_internal.h> /* ol_rx_mpdu_list_next */
#include <ol_txrx_types.h> /* ol_txrx_vdev_t, etc. */
#include <ol_rx_pn.h> /* our own defs */ #include <ol_rx_pn.h> /* our own defs */
#include <ol_rx_fwd.h> /* ol_rx_fwd_check */ #include <ol_rx_fwd.h> /* ol_rx_fwd_check */
#include <ol_rx.h> /* ol_rx_deliver */ #include <ol_rx.h> /* ol_rx_deliver */

View File

@@ -32,7 +32,6 @@
#include <qdf_time.h> #include <qdf_time.h>
/* datapath internal interfaces */ /* datapath internal interfaces */
#include <ol_txrx_types.h> /* ol_txrx_pdev_t, etc. */
#include <ol_txrx_internal.h> /* TXRX_ASSERT, etc. */ #include <ol_txrx_internal.h> /* TXRX_ASSERT, etc. */
#include <ol_rx_reorder.h> /* ol_rx_reorder_flush, etc. */ #include <ol_rx_reorder.h> /* ol_rx_reorder_flush, etc. */

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2014-2016 The Linux Foundation. All rights reserved. * Copyright (c) 2012, 2014, 2016 The Linux Foundation. All rights reserved.
* *
* Previously licensed under the ISC license by Qualcomm Atheros, Inc. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
* *
@@ -28,8 +28,7 @@
#ifndef _OL_RX_REORDER_TIMEOUT__H_ #ifndef _OL_RX_REORDER_TIMEOUT__H_
#define _OL_RX_REORDER_TIMEOUT__H_ #define _OL_RX_REORDER_TIMEOUT__H_
#include <ol_txrx_types.h> /* ol_txrx_pdev_t, etc. */ #include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t, etc. */
#ifdef QCA_SUPPORT_OL_RX_REORDER_TIMEOUT #ifdef QCA_SUPPORT_OL_RX_REORDER_TIMEOUT
void ol_rx_reorder_timeout_init(struct ol_txrx_pdev_t *pdev); void ol_rx_reorder_timeout_init(struct ol_txrx_pdev_t *pdev);

View File

@@ -33,12 +33,9 @@
/* APIs for other modules */ /* APIs for other modules */
#include <htt.h> /* HTT_TX_EXT_TID_MGMT */ #include <htt.h> /* HTT_TX_EXT_TID_MGMT */
#include <ol_htt_tx_api.h> /* htt_tx_desc_tid */ #include <ol_htt_tx_api.h> /* htt_tx_desc_tid */
#include <ol_txrx_api.h> /* ol_txrx_vdev_handle */
#include <ol_txrx_ctrl_api.h> /* ol_txrx_sync */
/* internal header files relevant for all systems */ /* internal header files relevant for all systems */
#include <ol_txrx_internal.h> /* TXRX_ASSERT1 */ #include <ol_txrx_internal.h> /* TXRX_ASSERT1 */
#include <ol_txrx_types.h> /* pdev stats */
#include <ol_tx_desc.h> /* ol_tx_desc */ #include <ol_tx_desc.h> /* ol_tx_desc */
#include <ol_tx_send.h> /* ol_tx_send */ #include <ol_tx_send.h> /* ol_tx_send */
#include <ol_txrx.h> #include <ol_txrx.h>
@@ -1178,6 +1175,26 @@ ol_txrx_data_tx_cb_set(ol_txrx_vdev_handle vdev,
pdev->tx_data_callback.ctxt = ctxt; pdev->tx_data_callback.ctxt = ctxt;
} }
/**
* ol_txrx_mgmt_tx_cb_set() - Store a callback for delivery
* notifications for management frames.
*
* @pdev - the data physical device object
* @type - the type of mgmt frame the callback is used for
* @download_cb - the callback for notification of delivery to the target
* @ota_ack_cb - the callback for notification of delivery to the peer
* @ctxt - context to use with the callback
*
* When the txrx SW receives notifications from the target that a tx frame
* has been delivered to its recipient, it will check if the tx frame
* is a management frame. If so, the txrx SW will check the management
* frame type specified when the frame was submitted for transmission.
* If there is a callback function registered for the type of managment
* frame in question, the txrx code will invoke the callback to inform
* the management + control SW that the mgmt frame was delivered.
* This function is used by the control SW to store a callback pointer
* for a given type of management frame.
*/
void void
ol_txrx_mgmt_tx_cb_set(ol_txrx_pdev_handle pdev, ol_txrx_mgmt_tx_cb_set(ol_txrx_pdev_handle pdev,
uint8_t type, uint8_t type,
@@ -1229,8 +1246,26 @@ void dump_frag_desc(char *msg, struct ol_tx_desc_t *tx_desc)
} }
#endif /* HELIUMPLUS_PADDR64 */ #endif /* HELIUMPLUS_PADDR64 */
/**
* ol_txrx_mgmt_send_ext() - Transmit a management frame
*
* @vdev - virtual device transmitting the frame
* @tx_mgmt_frm - management frame to transmit
* @type - the type of managment frame (determines what callback to use)
* @use_6mbps - specify whether management frame to transmit should
* use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P)
* @chanfreq - channel to transmit the frame on
*
* Send the specified management frame from the specified virtual device.
* The type is used for determining whether to invoke a callback to inform
* the sender that the tx mgmt frame was delivered, and if so, which
* callback to use.
*
* Return: 0 - the frame is accepted for transmission
* 1 - the frame was not accepted
*/
int int
ol_txrx_mgmt_send(ol_txrx_vdev_handle vdev, ol_txrx_mgmt_send_ext(ol_txrx_vdev_handle vdev,
qdf_nbuf_t tx_mgmt_frm, qdf_nbuf_t tx_mgmt_frm,
uint8_t type, uint8_t use_6mbps, uint16_t chanfreq) uint8_t type, uint8_t use_6mbps, uint16_t chanfreq)
{ {

View File

@@ -34,9 +34,7 @@
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <qdf_lock.h> #include <qdf_lock.h>
#include <ol_txrx_api.h> /* ol_txrx_vdev_handle */ #include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t, etc. */
#include <ol_txrx_types.h> /* ol_tx_desc_t, ol_txrx_msdu_info_t */
qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list); qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list);
#ifdef WLAN_FEATURE_FASTPATH #ifdef WLAN_FEATURE_FASTPATH

View File

@@ -35,7 +35,6 @@
#include <ol_htt_tx_api.h> /* htt_tx_desc_id */ #include <ol_htt_tx_api.h> /* htt_tx_desc_id */
#include <ol_txrx_types.h> /* ol_txrx_pdev_t */
#include <ol_tx_desc.h> #include <ol_tx_desc.h>
#include <ol_txrx_internal.h> #include <ol_txrx_internal.h>
#ifdef QCA_SUPPORT_SW_TXRX_ENCAP #ifdef QCA_SUPPORT_SW_TXRX_ENCAP

View File

@@ -34,7 +34,7 @@
#include <cds_queue.h> /* TAILQ_HEAD */ #include <cds_queue.h> /* TAILQ_HEAD */
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <ol_txrx_types.h> /* ol_tx_desc_t */ #include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t, etc. */
#include <ol_txrx_internal.h> /*TXRX_ASSERT2 */ #include <ol_txrx_internal.h> /*TXRX_ASSERT2 */
struct ol_tx_desc_t * struct ol_tx_desc_t *

View File

@@ -30,11 +30,8 @@
#include <ol_cfg.h> /* ol_cfg_addba_retry */ #include <ol_cfg.h> /* ol_cfg_addba_retry */
#include <htt.h> /* HTT_TX_EXT_TID_MGMT */ #include <htt.h> /* HTT_TX_EXT_TID_MGMT */
#include <ol_htt_tx_api.h> /* htt_tx_desc_tid */ #include <ol_htt_tx_api.h> /* htt_tx_desc_tid */
#include <ol_txrx_api.h> /* ol_txrx_vdev_handle */
#include <ol_txrx_ctrl_api.h> /* ol_txrx_sync, ol_tx_addba_conf */
#include <ol_ctrl_txrx_api.h> /* ol_ctrl_addba_req */ #include <ol_ctrl_txrx_api.h> /* ol_ctrl_addba_req */
#include <ol_txrx_internal.h> /* TXRX_ASSERT1, etc. */ #include <ol_txrx_internal.h> /* TXRX_ASSERT1, etc. */
#include <ol_txrx_types.h> /* pdev stats */
#include <ol_tx_desc.h> /* ol_tx_desc, ol_tx_desc_frame_list_free */ #include <ol_tx_desc.h> /* ol_tx_desc, ol_tx_desc_frame_list_free */
#include <ol_tx.h> /* ol_tx_vdev_ll_pause_queue_send */ #include <ol_tx.h> /* ol_tx_vdev_ll_pause_queue_send */
#include <ol_tx_queue.h> #include <ol_tx_queue.h>

View File

@@ -33,7 +33,7 @@
#define _OL_TX_QUEUE__H_ #define _OL_TX_QUEUE__H_
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <ol_txrx_types.h> /* ol_txrx_vdev_t, etc. */ #include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t, etc. */
#include <qdf_types.h> /* bool */ #include <qdf_types.h> /* bool */
/*--- function prototypes for optional queue log feature --------------------*/ /*--- function prototypes for optional queue log feature --------------------*/

View File

@@ -43,7 +43,6 @@
#include <ol_txrx_htt_api.h> /* htt_tx_status */ #include <ol_txrx_htt_api.h> /* htt_tx_status */
#include <ol_ctrl_txrx_api.h> #include <ol_ctrl_txrx_api.h>
#include <ol_txrx_types.h> /* ol_txrx_vdev_t, etc */
#include <ol_tx_desc.h> /* ol_tx_desc_find, ol_tx_desc_frame_free */ #include <ol_tx_desc.h> /* ol_tx_desc_find, ol_tx_desc_frame_free */
#ifdef QCA_COMPUTE_TX_DELAY #ifdef QCA_COMPUTE_TX_DELAY
#endif #endif

View File

@@ -33,7 +33,7 @@
#define _OL_TX_SEND__H_ #define _OL_TX_SEND__H_
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <ol_txrx_types.h> /* ol_tx_send_t */ #include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t, etc. */
/** /**
* @flush the ol tx when surprise remove. * @flush the ol tx when surprise remove.

View File

@@ -46,19 +46,12 @@
#include <ol_htt_api.h> #include <ol_htt_api.h>
#include <ol_htt_tx_api.h> #include <ol_htt_tx_api.h>
/* header files for OS shim API */
#include <ol_osif_api.h>
/* header files for our own APIs */ /* header files for our own APIs */
#include <ol_txrx_api.h> #include <ol_txrx_api.h>
#include <ol_txrx_dbg.h> #include <ol_txrx_dbg.h>
#include <ol_txrx_ctrl_api.h>
#include <ol_txrx_osif_api.h>
/* header files for our internal definitions */ /* header files for our internal definitions */
#include <ol_txrx_internal.h> /* TXRX_ASSERT, etc. */ #include <ol_txrx_internal.h> /* TXRX_ASSERT, etc. */
#include <wdi_event.h> /* WDI events */ #include <wdi_event.h> /* WDI events */
#include <ol_txrx_types.h> /* ol_txrx_pdev_t, etc. */
#include <ol_ctrl_txrx_api.h>
#include <ol_tx.h> /* ol_tx_ll */ #include <ol_tx.h> /* ol_tx_ll */
#include <ol_rx.h> /* ol_rx_deliver */ #include <ol_rx.h> /* ol_rx_deliver */
#include <ol_txrx_peer_find.h> /* ol_txrx_peer_find_attach, etc. */ #include <ol_txrx_peer_find.h> /* ol_txrx_peer_find_attach, etc. */
@@ -389,7 +382,7 @@ uint32_t ol_tx_get_total_free_desc(struct ol_txrx_pdev_t *pdev)
#endif #endif
/** /**
* ol_txrx_pdev_alloc() - allocate txrx pdev * ol_txrx_pdev_attach() - allocate txrx pdev
* @ctrl_pdev: cfg pdev * @ctrl_pdev: cfg pdev
* @htc_pdev: HTC pdev * @htc_pdev: HTC pdev
* @osdev: os dev * @osdev: os dev
@@ -398,7 +391,7 @@ uint32_t ol_tx_get_total_free_desc(struct ol_txrx_pdev_t *pdev)
* NULL for failure * NULL for failure
*/ */
ol_txrx_pdev_handle ol_txrx_pdev_handle
ol_txrx_pdev_alloc(ol_pdev_handle ctrl_pdev, ol_txrx_pdev_attach(ol_pdev_handle ctrl_pdev,
HTC_HANDLE htc_pdev, qdf_device_t osdev) HTC_HANDLE htc_pdev, qdf_device_t osdev)
{ {
struct ol_txrx_pdev_t *pdev; struct ol_txrx_pdev_t *pdev;
@@ -488,13 +481,13 @@ void htt_pktlogmod_exit(ol_txrx_pdev_handle handle, void *sc) { }
#endif #endif
/** /**
* ol_txrx_pdev_attach() - attach txrx pdev * ol_txrx_pdev_post_attach() - attach txrx pdev
* @pdev: txrx pdev * @pdev: txrx pdev
* *
* Return: 0 for success * Return: 0 for success
*/ */
int int
ol_txrx_pdev_attach(ol_txrx_pdev_handle pdev) ol_txrx_pdev_post_attach(ol_txrx_pdev_handle pdev)
{ {
uint16_t i; uint16_t i;
uint16_t fail_idx = 0; uint16_t fail_idx = 0;
@@ -953,11 +946,36 @@ ol_attach_fail:
return ret; /* fail */ return ret; /* fail */
} }
/**
* ol_txrx_pdev_attach_target() - send target configuration
*
* @pdev - the physical device being initialized
*
* The majority of the data SW setup are done by the pdev_attach
* functions, but this function completes the data SW setup by
* sending datapath configuration messages to the target.
*
* Return: 0 - success 1 - failure
*/
A_STATUS ol_txrx_pdev_attach_target(ol_txrx_pdev_handle pdev) A_STATUS ol_txrx_pdev_attach_target(ol_txrx_pdev_handle pdev)
{ {
return htt_attach_target(pdev->htt_pdev); return htt_attach_target(pdev->htt_pdev) == A_OK ? 0:1;
} }
/**
* ol_txrx_pdev_detach() - delete the data SW state
*
* @pdev - the data physical device object being removed
* @force - delete the pdev (and its vdevs and peers) even if
* there are outstanding references by the target to the vdevs
* and peers within the pdev
*
* This function is used when the WLAN driver is being removed to
* remove the host data component within the driver.
* All virtual devices within the physical device need to be deleted
* (ol_txrx_vdev_detach) before the physical device itself is deleted.
*
*/
void ol_txrx_pdev_detach(ol_txrx_pdev_handle pdev, int force) void ol_txrx_pdev_detach(ol_txrx_pdev_handle pdev, int force)
{ {
int i; int i;
@@ -1068,6 +1086,18 @@ void ol_txrx_pdev_detach(ol_txrx_pdev_handle pdev, int force)
#endif #endif
} }
/**
* ol_txrx_vdev_attach - Allocate and initialize the data object
* for a new virtual device.
*
* @data_pdev - the physical device the virtual device belongs to
* @vdev_mac_addr - the MAC address of the virtual device
* @vdev_id - the ID used to identify the virtual device to the target
* @op_mode - whether this virtual device is operating as an AP,
* an IBSS, or a STA
*
* Return: success: handle to new data vdev object, failure: NULL
*/
ol_txrx_vdev_handle ol_txrx_vdev_handle
ol_txrx_vdev_attach(ol_txrx_pdev_handle pdev, ol_txrx_vdev_attach(ol_txrx_pdev_handle pdev,
uint8_t *vdev_mac_addr, uint8_t *vdev_mac_addr,
@@ -1143,15 +1173,43 @@ ol_txrx_vdev_attach(ol_txrx_pdev_handle pdev,
return vdev; return vdev;
} }
void ol_txrx_osif_vdev_register(ol_txrx_vdev_handle vdev, /**
*ol_txrx_vdev_register - Link a vdev's data object with the
* matching OS shim vdev object.
*
* @txrx_vdev: the virtual device's data object
* @osif_vdev: the virtual device's OS shim object
* @txrx_ops: (pointers to)functions used for tx and rx data xfer
*
* The data object for a virtual device is created by the
* function ol_txrx_vdev_attach. However, rather than fully
* linking the data vdev object with the vdev objects from the
* other subsystems that the data vdev object interacts with,
* the txrx_vdev_attach function focuses primarily on creating
* the data vdev object. After the creation of both the data
* vdev object and the OS shim vdev object, this
* txrx_osif_vdev_attach function is used to connect the two
* vdev objects, so the data SW can use the OS shim vdev handle
* when passing rx data received by a vdev up to the OS shim.
*/
void ol_txrx_vdev_register(ol_txrx_vdev_handle vdev,
void *osif_vdev, void *osif_vdev,
struct ol_txrx_osif_ops *txrx_ops) struct ol_txrx_ops *txrx_ops)
{ {
vdev->osif_dev = osif_vdev; vdev->osif_dev = osif_vdev;
txrx_ops->tx.std = vdev->tx = OL_TX_LL; txrx_ops->tx.tx = vdev->tx = OL_TX_LL;
txrx_ops->tx.non_std = ol_tx_non_std_ll;
} }
/**
* ol_txrx_set_curchan - Setup the current operating channel of
* the device
* @pdev - the data physical device object
* @chan_mhz - the channel frequency (mhz) packets on
*
* Mainly used when populating monitor mode status that requires
* the current operating channel
*
*/
void ol_txrx_set_curchan(ol_txrx_pdev_handle pdev, uint32_t chan_mhz) void ol_txrx_set_curchan(ol_txrx_pdev_handle pdev, uint32_t chan_mhz)
{ {
return; return;
@@ -1162,6 +1220,16 @@ void ol_txrx_set_safemode(ol_txrx_vdev_handle vdev, uint32_t val)
vdev->safemode = val; vdev->safemode = val;
} }
/**
* ol_txrx_set_privacy_filters - set the privacy filter
* @vdev - the data virtual device object
* @filter - filters to be set
* @num - the number of filters
*
* Rx related. Set the privacy filters. When rx packets, check
* the ether type, filter type and packet type to decide whether
* discard these packets.
*/
void void
ol_txrx_set_privacy_filters(ol_txrx_vdev_handle vdev, ol_txrx_set_privacy_filters(ol_txrx_vdev_handle vdev,
void *filters, uint32_t num) void *filters, uint32_t num)
@@ -1176,6 +1244,29 @@ void ol_txrx_set_drop_unenc(ol_txrx_vdev_handle vdev, uint32_t val)
vdev->drop_unenc = val; vdev->drop_unenc = val;
} }
/**
* ol_txrx_vdev_detach - Deallocate the specified data virtual
* device object.
* @data_vdev: data object for the virtual device in question
* @callback: function to call (if non-NULL) once the vdev has
* been wholly deleted
* @callback_context: context to provide in the callback
*
* All peers associated with the virtual device need to be deleted
* (ol_txrx_peer_detach) before the virtual device itself is deleted.
* However, for the peers to be fully deleted, the peer deletion has to
* percolate through the target data FW and back up to the host data SW.
* Thus, even though the host control SW may have issued a peer_detach
* call for each of the vdev's peers, the peer objects may still be
* allocated, pending removal of all references to them by the target FW.
* In this case, though the vdev_detach function call will still return
* immediately, the vdev itself won't actually be deleted, until the
* deletions of all its peers complete.
* The caller can provide a callback function pointer to be notified when
* the vdev deletion actually happens - whether it's directly within the
* vdev_detach call, or if it's deferred until all in-progress peer
* deletions have completed.
*/
void void
ol_txrx_vdev_detach(ol_txrx_vdev_handle vdev, ol_txrx_vdev_detach(ol_txrx_vdev_handle vdev,
ol_txrx_vdev_delete_cb callback, void *context) ol_txrx_vdev_delete_cb callback, void *context)
@@ -1303,9 +1394,31 @@ void ol_txrx_flush_rx_frames(struct ol_txrx_peer_t *peer,
qdf_atomic_dec(&peer->flush_in_progress); qdf_atomic_dec(&peer->flush_in_progress);
} }
/**
* ol_txrx_peer_attach - Allocate and set up references for a
* data peer object.
* @data_pdev: data physical device object that will indirectly
* own the data_peer object
* @data_vdev - data virtual device object that will directly
* own the data_peer object
* @peer_mac_addr - MAC address of the new peer
*
* When an association with a peer starts, the host's control SW
* uses this function to inform the host data SW.
* The host data SW allocates its own peer object, and stores a
* reference to the control peer object within the data peer object.
* The host data SW also stores a reference to the virtual device
* that the peer is associated with. This virtual device handle is
* used when the data SW delivers rx data frames to the OS shim layer.
* The host data SW returns a handle to the new peer data object,
* so a reference within the control peer object can be set to the
* data peer object.
*
* Return: handle to new data peer object, or NULL if the attach
* fails
*/
ol_txrx_peer_handle ol_txrx_peer_handle
ol_txrx_peer_attach(ol_txrx_pdev_handle pdev, ol_txrx_peer_attach(ol_txrx_vdev_handle vdev, uint8_t *peer_mac_addr)
ol_txrx_vdev_handle vdev, uint8_t *peer_mac_addr)
{ {
struct ol_txrx_peer_t *peer; struct ol_txrx_peer_t *peer;
struct ol_txrx_peer_t *temp_peer; struct ol_txrx_peer_t *temp_peer;
@@ -1313,12 +1426,15 @@ ol_txrx_peer_attach(ol_txrx_pdev_handle pdev,
int differs; int differs;
bool wait_on_deletion = false; bool wait_on_deletion = false;
unsigned long rc; unsigned long rc;
struct ol_txrx_pdev_t *pdev;
/* preconditions */ /* preconditions */
TXRX_ASSERT2(pdev);
TXRX_ASSERT2(vdev); TXRX_ASSERT2(vdev);
TXRX_ASSERT2(peer_mac_addr); TXRX_ASSERT2(peer_mac_addr);
pdev = vdev->pdev;
TXRX_ASSERT2(pdev);
qdf_spin_lock_bh(&pdev->peer_ref_mutex); qdf_spin_lock_bh(&pdev->peer_ref_mutex);
/* check for duplicate exsisting peer */ /* check for duplicate exsisting peer */
TAILQ_FOREACH(temp_peer, &vdev->peer_list, peer_list_elem) { TAILQ_FOREACH(temp_peer, &vdev->peer_list, peer_list_elem) {
@@ -1798,6 +1914,16 @@ void ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer)
} }
} }
/**
* ol_txrx_peer_detach - Delete a peer's data object.
* @data_peer - the object to delete
*
* When the host's control SW disassociates a peer, it calls
* this function to delete the peer's data object. The reference
* stored in the control peer object to the data peer
* object (set up by a call to ol_peer_store()) is provided.
*
*/
void ol_txrx_peer_detach(ol_txrx_peer_handle peer) void ol_txrx_peer_detach(ol_txrx_peer_handle peer)
{ {
struct ol_txrx_vdev_t *vdev = peer->vdev; struct ol_txrx_vdev_t *vdev = peer->vdev;
@@ -2036,7 +2162,6 @@ struct ol_txrx_stats_req_internal *ol_txrx_u64_to_stats_ptr(uint64_t cookie)
return (struct ol_txrx_stats_req_internal *)((size_t) cookie); return (struct ol_txrx_stats_req_internal *)((size_t) cookie);
} }
#ifdef ATH_PERF_PWR_OFFLOAD
void void
ol_txrx_fw_stats_cfg(ol_txrx_vdev_handle vdev, ol_txrx_fw_stats_cfg(ol_txrx_vdev_handle vdev,
uint8_t cfg_stats_type, uint32_t cfg_val) uint8_t cfg_stats_type, uint32_t cfg_val)
@@ -2095,7 +2220,7 @@ ol_txrx_fw_stats_get(ol_txrx_vdev_handle vdev, struct ol_txrx_stats_req *req,
return A_OK; return A_OK;
} }
#endif
void void
ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev,
uint64_t cookie, uint8_t *stats_info_list) uint64_t cookie, uint8_t *stats_info_list)
@@ -3479,3 +3604,26 @@ void ol_deregister_lro_flush_cb(void)
pdev->lro_info.lro_data = NULL; pdev->lro_info.lro_data = NULL;
} }
#endif /* FEATURE_LRO */ #endif /* FEATURE_LRO */
/**
* ol_txrx_get_vdev_from_vdev_id() - get vdev from vdev_id
* @vdev_id: vdev_id
*
* Return: vdev handle
* NULL if not found.
*/
ol_txrx_vdev_handle ol_txrx_get_vdev_from_vdev_id(uint8_t vdev_id)
{
ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
ol_txrx_vdev_handle vdev = NULL;
if (qdf_unlikely(!pdev))
return NULL;
TAILQ_FOREACH(vdev, &pdev->vdev_list, vdev_list_elem) {
if (vdev->vdev_id == vdev_id)
break;
}
return vdev;
}

View File

@@ -29,8 +29,7 @@
#define _OL_TXRX__H_ #define _OL_TXRX__H_
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <ol_txrx_types.h> /* ol_txrx_vdev_t, etc. */ #include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t, etc. */
#include <ol_ctrl_api.h> /* ol_pdev_handle */
#include "cds_sched.h" #include "cds_sched.h"
void ol_txrx_peer_unref_delete(struct ol_txrx_peer_t *peer); void ol_txrx_peer_unref_delete(struct ol_txrx_peer_t *peer);
@@ -39,28 +38,6 @@ void ol_txrx_peer_unref_delete(struct ol_txrx_peer_t *peer);
#define OL_TX_AVG_FRM_BYTES 1000 #define OL_TX_AVG_FRM_BYTES 1000
#endif #endif
/** ol_txrx_vdev_handle ol_txrx_get_vdev_from_vdev_id(uint8_t vdev_id);
* ol_txrx_get_vdev_from_vdev_id() - get vdev from vdev_id
* @vdev_id: vdev_id
*
* Return: vdev handle
* NULL if not found.
*/
static inline ol_txrx_vdev_handle ol_txrx_get_vdev_from_vdev_id(uint8_t vdev_id)
{
ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
ol_txrx_vdev_handle vdev = NULL;
if (qdf_unlikely(!pdev)) {
return NULL;
}
TAILQ_FOREACH(vdev, &pdev->vdev_list, vdev_list_elem) {
if (vdev->vdev_id == vdev_id)
break;
}
return vdev;
}
#endif /* _OL_TXRX__H_ */ #endif /* _OL_TXRX__H_ */

View File

@@ -39,7 +39,6 @@
#include <cds_ieee80211_common.h> /* ieee80211_frame */ #include <cds_ieee80211_common.h> /* ieee80211_frame */
#include <net.h> /* struct llc, struct ether_header, etc. */ #include <net.h> /* struct llc, struct ether_header, etc. */
#include <ol_txrx_internal.h> /* TXRX_ASSERT1 */ #include <ol_txrx_internal.h> /* TXRX_ASSERT1 */
#include <ol_txrx_types.h> /* struct ol_txrx_vdev_t, ol_txrx_pdev_t,etc. */
#include <ol_txrx_encap.h> /* struct ol_rx_decap_info_t */ #include <ol_txrx_encap.h> /* struct ol_rx_decap_info_t */
#define OL_TX_COPY_NATIVE_WIFI_HEADER(wh, msdu, hdsize, localbuf) \ #define OL_TX_COPY_NATIVE_WIFI_HEADER(wh, msdu, hdsize, localbuf) \

View File

@@ -36,7 +36,7 @@
#include <qdf_nbuf.h> /* qdf_nbuf_t */ #include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <cds_ieee80211_common.h> /* ieee80211_qosframe_htc_addr4 */ #include <cds_ieee80211_common.h> /* ieee80211_qosframe_htc_addr4 */
#include <ol_txrx_types.h> /* ol_tx_desc_t, ol_txrx_msdu_info_t */ #include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t, etc. */
/** /**
* @brief Encap outgoing frm from OS dependent format to Target * @brief Encap outgoing frm from OS dependent format to Target

View File

@@ -33,15 +33,12 @@
/* APIs for other modules */ /* APIs for other modules */
#include <htt.h> /* HTT_TX_EXT_TID_MGMT */ #include <htt.h> /* HTT_TX_EXT_TID_MGMT */
#include <ol_htt_tx_api.h> /* htt_tx_desc_tid */ #include <ol_htt_tx_api.h> /* htt_tx_desc_tid */
#include <ol_txrx_api.h> /* ol_txrx_vdev_handle */
#include <ol_txrx_ctrl_api.h> /* ol_txrx_sync */
/* internal header files relevant for all systems */ /* internal header files relevant for all systems */
#include <ol_txrx_internal.h> /* TXRX_ASSERT1 */ #include <ol_txrx_internal.h> /* TXRX_ASSERT1 */
#include <ol_txrx_types.h> /* pdev stats */
#include <ol_tx_desc.h> /* ol_tx_desc */ #include <ol_tx_desc.h> /* ol_tx_desc */
#include <ol_tx_send.h> /* ol_tx_send */ #include <ol_tx_send.h> /* ol_tx_send */
#include <ol_txrx.h> #include <ol_txrx.h> /* ol_txrx_get_vdev_from_vdev_id */
/* internal header files relevant only for HL systems */ /* internal header files relevant only for HL systems */
#include <ol_tx_queue.h> /* ol_tx_enqueue */ #include <ol_tx_queue.h> /* ol_tx_enqueue */

View File

@@ -33,7 +33,7 @@
#define _OL_TXRX_PEER_FIND__H_ #define _OL_TXRX_PEER_FIND__H_
#include <htt.h> /* HTT_INVALID_PEER */ #include <htt.h> /* HTT_INVALID_PEER */
#include <ol_txrx_types.h> /* ol_txrx_pdev_t, etc. */ #include <cdp_txrx_cmn.h> /* ol_txrx_pdev_t, etc. */
#include <ol_txrx_internal.h> /* TXRX_ASSERT */ #include <ol_txrx_internal.h> /* TXRX_ASSERT */
int ol_txrx_peer_find_attach(struct ol_txrx_pdev_t *pdev); int ol_txrx_peer_find_attach(struct ol_txrx_pdev_t *pdev);

View File

@@ -47,6 +47,8 @@
#include "ol_txrx_htt_api.h" #include "ol_txrx_htt_api.h"
#include "ol_htt_tx_api.h" #include "ol_htt_tx_api.h"
#include "ol_htt_rx_api.h" #include "ol_htt_rx_api.h"
#include "ol_txrx_ctrl_api.h" /* WLAN_MAX_STA_COUNT */
#include "ol_txrx_osif_api.h" /* ol_rx_callback_fp */
/* /*
* The target may allocate multiple IDs for a peer. * The target may allocate multiple IDs for a peer.
@@ -87,15 +89,6 @@ struct ol_txrx_pdev_t;
struct ol_txrx_vdev_t; struct ol_txrx_vdev_t;
struct ol_txrx_peer_t; struct ol_txrx_peer_t;
struct ol_pdev_t;
typedef struct ol_pdev_t *ol_pdev_handle;
struct ol_vdev_t;
typedef struct ol_vdev_t *ol_vdev_handle;
struct ol_peer_t;
typedef struct ol_peer_t *ol_peer_handle;
/* rx filter related */ /* rx filter related */
#define MAX_PRIVACY_FILTERS 4 /* max privacy filters */ #define MAX_PRIVACY_FILTERS 4 /* max privacy filters */

View File

@@ -110,18 +110,6 @@ QDF_STATUS wlan_register_mgmt_client(void *pdev_txrx,
QDF_STATUS (*rx_mgmt)(void *g_cdsctx, QDF_STATUS (*rx_mgmt)(void *g_cdsctx,
void *buf)); void *buf));
typedef void (*ol_txrx_vdev_delete_cb)(void *context);
/**
* @typedef ol_txrx_tx_fp
* @brief top-level transmit function
*/
typedef qdf_nbuf_t
(*ol_txrx_tx_fp)(struct ol_txrx_vdev_t *vdev, qdf_nbuf_t msdu_list);
typedef void
(*ol_txrx_mgmt_tx_cb)(void *ctxt, qdf_nbuf_t tx_mgmt_frm, int had_error);
/* If RSSI realm is changed, send notification to Clients, SME, HDD */ /* If RSSI realm is changed, send notification to Clients, SME, HDD */
typedef QDF_STATUS (*wlan_txrx_rssi_cross_thresh)(void *adapter, u8 rssi, typedef QDF_STATUS (*wlan_txrx_rssi_cross_thresh)(void *adapter, u8 rssi,
void *usr_ctx, void *usr_ctx,

View File

@@ -40,7 +40,6 @@
#include "cfg_api.h" #include "cfg_api.h"
#include "qdf_status.h" #include "qdf_status.h"
#include "cds_sched.h" #include "cds_sched.h"
#include "ol_txrx_api.h"
#include "sir_mac_prot_def.h" #include "sir_mac_prot_def.h"
#include "wma_types.h" #include "wma_types.h"
#include "ol_txrx_types.h" #include "ol_txrx_types.h"
@@ -48,6 +47,7 @@
#include "utils_api.h" #include "utils_api.h"
#include "lim_types.h" #include "lim_types.h"
#include "wmi_unified_api.h" #include "wmi_unified_api.h"
#include "cdp_txrx_cmn.h"
/* Platform specific configuration for max. no. of fragments */ /* Platform specific configuration for max. no. of fragments */
#define QCA_OL_11AC_TX_MAX_FRAGS 2 #define QCA_OL_11AC_TX_MAX_FRAGS 2

View File

@@ -42,14 +42,11 @@
#include "wmi_unified.h" #include "wmi_unified.h"
#include "wni_cfg.h" #include "wni_cfg.h"
#include "cfg_api.h" #include "cfg_api.h"
#include "ol_txrx_ctrl_api.h"
#include "wlan_tgt_def_config.h" #include "wlan_tgt_def_config.h"
#include "qdf_nbuf.h" #include "qdf_nbuf.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "ol_txrx_api.h"
#include "qdf_mem.h" #include "qdf_mem.h"
#include "ol_txrx_types.h"
#include "ol_txrx_peer_find.h" #include "ol_txrx_peer_find.h"
#include "wma_types.h" #include "wma_types.h"
@@ -2561,8 +2558,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
wmi_desc_put(wma_handle, mgmt_param.wmi_desc); wmi_desc_put(wma_handle, mgmt_param.wmi_desc);
} else { } else {
/* Hand over the Tx Mgmt frame to TxRx */ /* Hand over the Tx Mgmt frame to TxRx */
status = ol_txrx_mgmt_send(txrx_vdev, tx_frame, tx_frm_index, status = ol_txrx_mgmt_send_ext(txrx_vdev, tx_frame,
use_6mbps, chanfreq); tx_frm_index, use_6mbps, chanfreq);
} }
/* /*

View File

@@ -42,14 +42,11 @@
#include "wmi_unified.h" #include "wmi_unified.h"
#include "wni_cfg.h" #include "wni_cfg.h"
#include "cfg_api.h" #include "cfg_api.h"
#include "ol_txrx_ctrl_api.h"
#include "wlan_tgt_def_config.h" #include "wlan_tgt_def_config.h"
#include "qdf_nbuf.h" #include "qdf_nbuf.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "ol_txrx_api.h"
#include "qdf_mem.h" #include "qdf_mem.h"
#include "ol_txrx_types.h"
#include "ol_txrx_peer_find.h" #include "ol_txrx_peer_find.h"
#include "wma_types.h" #include "wma_types.h"
@@ -1079,7 +1076,7 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, ol_txrx_pdev_handle pdev,
wma->interfaces[vdev_id].peer_count - 1); wma->interfaces[vdev_id].peer_count - 1);
goto err; goto err;
} }
peer = ol_txrx_peer_attach(pdev, vdev, peer_addr); peer = ol_txrx_peer_attach(vdev, peer_addr);
if (!peer) { if (!peer) {
WMA_LOGE("%s : Unable to attach peer %pM", __func__, peer_addr); WMA_LOGE("%s : Unable to attach peer %pM", __func__, peer_addr);
goto err; goto err;

View File

@@ -43,14 +43,11 @@
#include "wmi_unified.h" #include "wmi_unified.h"
#include "wni_cfg.h" #include "wni_cfg.h"
#include "cfg_api.h" #include "cfg_api.h"
#include "ol_txrx_ctrl_api.h"
#include "wlan_tgt_def_config.h" #include "wlan_tgt_def_config.h"
#include "qdf_nbuf.h" #include "qdf_nbuf.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "ol_txrx_api.h"
#include "qdf_mem.h" #include "qdf_mem.h"
#include "ol_txrx_types.h"
#include "ol_txrx_peer_find.h" #include "ol_txrx_peer_find.h"
#include "wma_types.h" #include "wma_types.h"

View File

@@ -44,14 +44,11 @@
#include "wmi_unified.h" #include "wmi_unified.h"
#include "wni_cfg.h" #include "wni_cfg.h"
#include "cfg_api.h" #include "cfg_api.h"
#include "ol_txrx_ctrl_api.h"
#include "wlan_tgt_def_config.h" #include "wlan_tgt_def_config.h"
#include "qdf_nbuf.h" #include "qdf_nbuf.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "ol_txrx_api.h"
#include "qdf_mem.h" #include "qdf_mem.h"
#include "ol_txrx_types.h"
#include "ol_txrx_peer_find.h" #include "ol_txrx_peer_find.h"
#include "wma_types.h" #include "wma_types.h"

View File

@@ -43,14 +43,11 @@
#include "wmi_unified.h" #include "wmi_unified.h"
#include "wni_cfg.h" #include "wni_cfg.h"
#include "cfg_api.h" #include "cfg_api.h"
#include "ol_txrx_ctrl_api.h"
#include "wlan_tgt_def_config.h" #include "wlan_tgt_def_config.h"
#include "qdf_nbuf.h" #include "qdf_nbuf.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "ol_txrx_api.h"
#include "qdf_mem.h" #include "qdf_mem.h"
#include "ol_txrx_types.h"
#include "ol_txrx_peer_find.h" #include "ol_txrx_peer_find.h"
#include "wma_types.h" #include "wma_types.h"

View File

@@ -42,14 +42,11 @@
#include "wmi_unified.h" #include "wmi_unified.h"
#include "wni_cfg.h" #include "wni_cfg.h"
#include "cfg_api.h" #include "cfg_api.h"
#include "ol_txrx_ctrl_api.h"
#include "wlan_tgt_def_config.h" #include "wlan_tgt_def_config.h"
#include "qdf_nbuf.h" #include "qdf_nbuf.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "ol_txrx_api.h"
#include "qdf_mem.h" #include "qdf_mem.h"
#include "ol_txrx_types.h"
#include "ol_txrx_peer_find.h" #include "ol_txrx_peer_find.h"
#include "wma_types.h" #include "wma_types.h"

View File

@@ -43,14 +43,11 @@
#include "wmi_unified.h" #include "wmi_unified.h"
#include "wni_cfg.h" #include "wni_cfg.h"
#include "cfg_api.h" #include "cfg_api.h"
#include "ol_txrx_ctrl_api.h"
#include "wlan_tgt_def_config.h" #include "wlan_tgt_def_config.h"
#include "qdf_nbuf.h" #include "qdf_nbuf.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "ol_txrx_api.h"
#include "qdf_mem.h" #include "qdf_mem.h"
#include "ol_txrx_types.h"
#include "ol_txrx_peer_find.h" #include "ol_txrx_peer_find.h"
#include "wma_types.h" #include "wma_types.h"

View File

@@ -42,14 +42,11 @@
#include "wmi_unified.h" #include "wmi_unified.h"
#include "wni_cfg.h" #include "wni_cfg.h"
#include "cfg_api.h" #include "cfg_api.h"
#include "ol_txrx_ctrl_api.h"
#include "wlan_tgt_def_config.h" #include "wlan_tgt_def_config.h"
#include "qdf_nbuf.h" #include "qdf_nbuf.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "ol_txrx_api.h"
#include "qdf_mem.h" #include "qdf_mem.h"
#include "ol_txrx_types.h"
#include "ol_txrx_peer_find.h" #include "ol_txrx_peer_find.h"
#include "wma_types.h" #include "wma_types.h"