qcacld-4.0: Data path changes to use converged APIs (Part 4)

Changes in the data path to use the converged MCL specific APIs.

Change-Id: Ib6ae1917a9678dcd735b81e3aa83d086406ac404
CRs-Fixed: 994638
This commit is contained in:
Dhanashri Atre 2016-03-01 17:28:03 -08:00
commit b08959a747
29 changed files with 249 additions and 650 deletions

View file

@ -64,6 +64,7 @@
#include "cds_utils.h"
#include "cds_reg_service.h"
#include "wlan_hdd_ipa.h"
#include "cdp_txrx_flow_ctrl_legacy.h"
#define CDS_MAX_FEATURE_SET 8
static struct cds_conc_connection_info
@ -2645,7 +2646,7 @@ bool cds_is_connection_in_progress(void)
for (sta_id = 0; sta_id < WLAN_MAX_STA_COUNT;
sta_id++) {
if (!((adapter->aStaInfo[sta_id].isUsed)
&& (ol_txrx_peer_state_conn ==
&& (OL_TXRX_PEER_STATE_CONN ==
adapter->aStaInfo[sta_id].tlSTAState)))
continue;

View file

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

View file

@ -152,18 +152,6 @@ int ol_cfg_rx_pn_check(ol_pdev_handle pdev);
*/
int ol_cfg_rx_fwd_check(ol_pdev_handle pdev);
/**
* @brief set rx fwd disable/enable.
* @details
* Choose whether to forward rx frames to tx (where applicable) within the
* WLAN driver, or to leave all forwarding up to the operating system.
* currently only intra-bss fwd is supported.
*
* @param pdev - handle to the physical device
* @param disable_rx_fwd 1 -> no rx->tx forward -> rx->tx forward
*/
void ol_set_cfg_rx_fwd_disabled(ol_pdev_handle pdev, uint8_t disalbe_rx_fwd);
/**
* @brief Check whether rx forwarding is enabled or disabled.
* @details
@ -456,11 +444,6 @@ static inline int ol_tx_cfg_max_tx_queue_depth_ll(ol_pdev_handle pdev)
return 1500;
}
/**
* @brief Set packet log config in HTT config based on CFG ini configuration
*/
void ol_set_cfg_packet_log_enabled(ol_pdev_handle pdev, uint8_t val);
/**
* @brief Get packet log config from HTT config
*/

View file

@ -60,33 +60,4 @@ enum ol_sec_type {
ol_sec_type_types
};
/**
* @enum ol_tx_spec
* @brief indicate what non-standard transmission actions to apply
* @details
* Indicate one or more of the following:
* - The tx frame already has a complete 802.11 header.
* Thus, skip 802.3/native-WiFi to 802.11 header encapsulation and
* A-MSDU aggregation.
* - The tx frame should not be aggregated (A-MPDU or A-MSDU)
* - The tx frame is already encrypted - don't attempt encryption.
* - The tx frame is a segment of a TCP jumbo frame.
* - This tx frame should not be unmapped and freed by the txrx layer
* after transmission, but instead given to a registered tx completion
* callback.
* More than one of these specification can apply, though typically
* only a single specification is applied to a tx frame.
* A compound specification can be created, as a bit-OR of these
* specifications.
*/
enum ol_tx_spec {
ol_tx_spec_std = 0x0, /* do regular processing */
ol_tx_spec_raw = 0x1, /* skip encap + A-MSDU aggr */
ol_tx_spec_no_aggr = 0x2, /* skip encap + all aggr */
ol_tx_spec_no_encrypt = 0x4, /* skip encap + encrypt */
ol_tx_spec_tso = 0x8, /* TCP segmented */
ol_tx_spec_nwifi_no_encrypt = 0x10, /* skip encrypt for nwifi */
ol_tx_spec_no_free = 0x20, /* give to cb rather than free */
};
#endif /* _OL_TXRX_API__H_ */

View file

@ -59,54 +59,6 @@
#define OL_TXQ_PAUSE_REASON_VDEV_STOP (1 << 3)
#define OL_TXQ_PAUSE_REASON_THERMAL_MITIGATION (1 << 4)
/**
* enum netif_action_type - Type of actions on netif queues
* @WLAN_STOP_ALL_NETIF_QUEUE: stop all netif queues
* @WLAN_START_ALL_NETIF_QUEUE: start all netif queues
* @WLAN_WAKE_ALL_NETIF_QUEUE: wake all netif queues
* @WLAN_STOP_ALL_NETIF_QUEUE_N_CARRIER: stop all queues and off carrier
* @WLAN_START_ALL_NETIF_QUEUE_N_CARRIER: start all queues and on carrier
* @WLAN_NETIF_TX_DISABLE: disable tx
* @WLAN_NETIF_TX_DISABLE_N_CARRIER: disable tx and off carrier
* @WLAN_NETIF_CARRIER_ON: on carrier
* @WLAN_NETIF_CARRIER_OFF: off carrier
*/
enum netif_action_type {
WLAN_STOP_ALL_NETIF_QUEUE,
WLAN_START_ALL_NETIF_QUEUE,
WLAN_WAKE_ALL_NETIF_QUEUE,
WLAN_STOP_ALL_NETIF_QUEUE_N_CARRIER,
WLAN_START_ALL_NETIF_QUEUE_N_CARRIER,
WLAN_NETIF_TX_DISABLE,
WLAN_NETIF_TX_DISABLE_N_CARRIER,
WLAN_NETIF_CARRIER_ON,
WLAN_NETIF_CARRIER_OFF,
WLAN_NETIF_ACTION_TYPE_MAX,
};
/**
* enum netif_reason_type - reason for netif queue action
* @WLAN_CONTROL_PATH: action from control path
* @WLAN_DATA_FLOW_CONTROL: because of flow control
* @WLAN_FW_PAUSE: because of firmware pause
* @WLAN_TX_ABORT: because of tx abort
* @WLAN_VDEV_STOP: because of vdev stop
* @WLAN_PEER_UNAUTHORISED: because of peer is unauthorised
* @WLAN_THERMAL_MITIGATION: because of thermal mitigation
*/
enum netif_reason_type {
WLAN_CONTROL_PATH,
WLAN_DATA_FLOW_CONTROL,
WLAN_FW_PAUSE,
WLAN_TX_ABORT,
WLAN_VDEV_STOP,
WLAN_PEER_UNAUTHORISED,
WLAN_THERMAL_MITIGATION,
WLAN_REASON_TYPE_MAX,
};
/* command options for dumpStats*/
#define WLAN_HDD_STATS 0
#define WLAN_TXRX_STATS 1
@ -279,66 +231,6 @@ struct ol_tx_wmm_param_t {
*/
#define ol_txrx_tx_release(peer, tid_mask, max_frms) /* no-op */
/**
* @brief Suspend all tx data for the specified virtual device.
* @details
* This function applies primarily to HL systems, but also applies to
* LL systems that use per-vdev tx queues for MCC or thermal throttling.
* As an example, this function could be used when a single-channel physical
* device supports multiple channels by jumping back and forth between the
* channels in a time-shared manner. As the device is switched from channel
* A to channel B, the virtual devices that operate on channel A will be
* paused.
*
* @param data_vdev - the virtual device being paused
* @param reason - the reason for which vdev queue is getting paused
*/
#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || defined(QCA_LL_TX_FLOW_CONTROL_V2)
void ol_txrx_vdev_pause(ol_txrx_vdev_handle vdev, uint32_t reason);
#else
static inline
void ol_txrx_vdev_pause(ol_txrx_vdev_handle vdev, uint32_t reason)
{
return;
}
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
/**
* @brief Drop all tx data for the specified virtual device.
* @details
* This function applies primarily to HL systems, but also applies to
* LL systems that use per-vdev tx queues for MCC or thermal throttling.
* This function would typically be used by the ctrl SW after it parks
* a STA vdev and then resumes it, but to a new AP. In this case, though
* the same vdev can be used, any old tx frames queued inside it would be
* stale, and would need to be discarded.
*
* @param data_vdev - the virtual device being flushed
*/
#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL)
void ol_txrx_vdev_flush(ol_txrx_vdev_handle data_vdev);
#else
#define ol_txrx_vdev_flush(data_vdev) /* no-op */
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
/**
* @brief Resume tx for the specified virtual device.
* @details
* This function applies primarily to HL systems, but also applies to
* LL systems that use per-vdev tx queues for MCC or thermal throttling.
*
* @param data_vdev - the virtual device being unpaused
* @param reason - the reason for which vdev queue is getting unpaused
*/
#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || defined(QCA_LL_TX_FLOW_CONTROL_V2)
void ol_txrx_vdev_unpause(ol_txrx_vdev_handle data_vdev, uint32_t reason);
#else
static inline
void ol_txrx_vdev_unpause(ol_txrx_vdev_handle data_vdev, uint32_t reason)
{
return;
}
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
/**
* @brief Suspend all tx data per thermal event/timer for the
@ -433,47 +325,12 @@ void
ol_txrx_data_tx_cb_set(ol_txrx_vdev_handle data_vdev,
ol_txrx_data_tx_cb callback, void *ctxt);
/**
* @brief Allow the control-path SW to send data frames.
* @details
* Generally, all tx data frames come from the OS shim into the txrx layer.
* However, there are rare cases such as TDLS messaging where the UMAC
* control-path SW creates tx data frames.
* This UMAC SW can call this function to provide the tx data frames to
* the txrx layer.
* The UMAC SW can request a callback for these data frames after their
* transmission completes, by using the ol_txrx_data_tx_cb_set function
* to register a tx completion callback, and by specifying
* ol_tx_spec_no_free as the tx_spec arg when giving the frames to
* ol_tx_non_std.
* The MSDUs need to have the appropriate L2 header type (802.3 vs. 802.11),
* as specified by ol_cfg_frame_type().
*
* @param data_vdev - which vdev should transmit the tx data frames
* @param tx_spec - what non-standard handling to apply to the tx data frames
* @param msdu_list - NULL-terminated list of tx MSDUs
*/
qdf_nbuf_t
ol_tx_non_std(ol_txrx_vdev_handle data_vdev,
enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
#ifdef FEATURE_RUNTIME_PM
QDF_STATUS ol_txrx_runtime_suspend(ol_txrx_pdev_handle txrx_pdev);
QDF_STATUS ol_txrx_runtime_resume(ol_txrx_pdev_handle txrx_pdev);
#endif
QDF_STATUS ol_txrx_bus_suspend(void);
QDF_STATUS ol_txrx_bus_resume(void);
QDF_STATUS ol_txrx_wait_for_pending_tx(int timeout);
/**
* @brief Get the number of pending transmit frames that are awaiting completion.
* @details
* Mainly used in clean up path to make sure all buffers have been free'ed
*
* @param pdev - the data physical device object
* @return - count of pending frames
*/
int ol_txrx_get_tx_pending(ol_txrx_pdev_handle pdev);
QDF_STATUS ol_txrx_wait_for_pending_tx(int timeout);
/**
* @brief Discard all tx frames that are pending in txrx.
@ -512,33 +369,6 @@ void ol_txrx_set_safemode(ol_txrx_vdev_handle vdev, uint32_t val);
*/
void ol_txrx_set_drop_unenc(ol_txrx_vdev_handle vdev, uint32_t val);
enum ol_txrx_peer_state {
ol_txrx_peer_state_invalid,
ol_txrx_peer_state_disc, /* initial state */
ol_txrx_peer_state_conn, /* authentication in progress */
ol_txrx_peer_state_auth, /* authentication successful */
};
/**
* @brief specify the peer's authentication state
* @details
* Specify the peer's authentication state (none, connected, authenticated)
* to allow the data SW to determine whether to filter out invalid data frames.
* (In the "connected" state, where security is enabled, but authentication
* has not completed, tx and rx data frames other than EAPOL or WAPI should
* be discarded.)
* This function is only relevant for systems in which the tx and rx filtering
* are done in the host rather than in the target.
*
* @param data_peer - which peer has changed its state
* @param state - the new state of the peer
*
* Return: QDF Status
*/
QDF_STATUS
ol_txrx_peer_state_update(ol_txrx_pdev_handle pdev, uint8_t *peer_addr,
enum ol_txrx_peer_state state);
void
ol_txrx_peer_keyinstalled_state_update(ol_txrx_peer_handle data_peer,
uint8_t val);
@ -633,63 +463,12 @@ ol_txrx_peer_stats_copy(ol_txrx_pdev_handle pdev,
#define ol_txrx_peer_stats_copy(pdev, peer, stats) A_ERROR /* failure */
#endif /* QCA_ENABLE_OL_TXRX_PEER_STATS */
/* Config parameters for txrx_pdev */
struct txrx_pdev_cfg_param_t {
uint8_t is_full_reorder_offload;
/* IPA Micro controller data path offload enable flag */
uint8_t is_uc_offload_enabled;
/* IPA Micro controller data path offload TX buffer count */
uint32_t uc_tx_buffer_count;
/* IPA Micro controller data path offload TX buffer size */
uint32_t uc_tx_buffer_size;
/* IPA Micro controller data path offload RX indication ring count */
uint32_t uc_rx_indication_ring_count;
/* IPA Micro controller data path offload TX partition base */
uint32_t uc_tx_partition_base;
/* IP, TCP and UDP checksum offload */
bool ip_tcp_udp_checksum_offload;
/* Rx processing in thread from TXRX */
bool enable_rxthread;
/* CE classification enabled through INI */
bool ce_classify_enabled;
#ifdef QCA_LL_TX_FLOW_CONTROL_V2
/* Threshold to stop queue in percentage */
uint32_t tx_flow_stop_queue_th;
/* Start queue offset in percentage */
uint32_t tx_flow_start_queue_offset;
#endif
};
/**
* @brief Setup configuration parameters
* @details
* Allocation configuration context that will be used across data path
*
* @param osdev - OS handle needed as an argument for some OS primitives
* @return the control device object
*/
ol_pdev_handle ol_pdev_cfg_attach(qdf_device_t osdev,
struct txrx_pdev_cfg_param_t cfg_param);
QDF_STATUS ol_txrx_get_vdevid(struct ol_txrx_peer_t *peer, uint8_t *vdev_id);
void *ol_txrx_get_vdev_by_sta_id(uint8_t sta_id);
#define OL_TXRX_INVALID_LOCAL_PEER_ID 0xffff
#ifdef QCA_SUPPORT_TXRX_LOCAL_PEER_ID
uint16_t ol_txrx_local_peer_id(ol_txrx_peer_handle peer);
ol_txrx_peer_handle ol_txrx_find_peer_by_addr(ol_txrx_pdev_handle pdev,
uint8_t *peer_addr,
uint8_t *peer_id);
ol_txrx_peer_handle
ol_txrx_find_peer_by_addr_and_vdev(ol_txrx_pdev_handle pdev,
ol_txrx_vdev_handle vdev,
uint8_t *peer_addr, uint8_t *peer_id);
#else
#define ol_txrx_local_peer_id(peer) OL_TXRX_INVALID_LOCAL_PEER_ID
#define ol_txrx_find_peer_by_addr(pdev, peer_addr, peer_id) NULL
#define ol_txrx_find_peer_by_addr_and_vdev(pdev, vdev, peer_addr, peer_id) NULL
#endif
#define OL_TXRX_RSSI_INVALID 0xffff
/**
@ -718,11 +497,8 @@ int16_t ol_txrx_peer_rssi(ol_txrx_peer_handle peer);
#define ol_txrx_peer_rssi(peer) OL_TXRX_RSSI_INVALID
#endif /* QCA_SUPPORT_PEER_DATA_RX_RSSI */
#define OL_TXRX_INVALID_LOCAL_PEER_ID 0xffff
#if QCA_SUPPORT_TXRX_LOCAL_PEER_ID
uint16_t ol_txrx_local_peer_id(ol_txrx_peer_handle peer);
#else
#define ol_txrx_local_peer_id(peer) OL_TXRX_INVALID_LOCAL_PEER_ID
#endif
#ifdef QCA_COMPUTE_TX_DELAY
@ -857,168 +633,6 @@ static inline void ol_tx_throttle_init_period(struct ol_txrx_pdev_t *pdev,
}
#endif /* QCA_SUPPORT_TX_THROTTLE */
void ol_vdev_rx_set_intrabss_fwd(ol_txrx_vdev_handle vdev, bool val);
#ifdef IPA_OFFLOAD
void
ol_txrx_ipa_uc_get_resource(ol_txrx_pdev_handle pdev,
qdf_dma_addr_t *ce_sr_base_paddr,
uint32_t *ce_sr_ring_size,
qdf_dma_addr_t *ce_reg_paddr,
qdf_dma_addr_t *tx_comp_ring_base_paddr,
uint32_t *tx_comp_ring_size,
uint32_t *tx_num_alloc_buffer,
qdf_dma_addr_t *rx_rdy_ring_base_paddr,
uint32_t *rx_rdy_ring_size,
qdf_dma_addr_t *rx_proc_done_idx_paddr,
void **rx_proc_done_idx_vaddr,
qdf_dma_addr_t *rx2_rdy_ring_base_paddr,
uint32_t *rx2_rdy_ring_size,
qdf_dma_addr_t *rx2_proc_done_idx_paddr,
void **rx2_proc_done_idx_vaddr);
void
ol_txrx_ipa_uc_set_doorbell_paddr(ol_txrx_pdev_handle pdev,
qdf_dma_addr_t ipa_tx_uc_doorbell_paddr,
qdf_dma_addr_t ipa_rx_uc_doorbell_paddr);
void
ol_txrx_ipa_uc_set_active(ol_txrx_pdev_handle pdev, bool uc_active, bool is_tx);
void ol_txrx_ipa_uc_op_response(ol_txrx_pdev_handle pdev, uint8_t *op_msg);
void ol_txrx_ipa_uc_register_op_cb(ol_txrx_pdev_handle pdev,
void (*ipa_uc_op_cb_type)(uint8_t *op_msg,
void *osif_ctxt),
void *osif_dev);
void ol_txrx_ipa_uc_get_stat(ol_txrx_pdev_handle pdev);
#else
/**
* ol_txrx_ipa_uc_get_resource() - Client request resource information
* @pdev: handle to the HTT instance
* @ce_sr_base_paddr: copy engine source ring base physical address
* @ce_sr_ring_size: copy engine source ring size
* @ce_reg_paddr: copy engine register physical address
* @tx_comp_ring_base_paddr: tx comp ring base physical address
* @tx_comp_ring_size: tx comp ring size
* @tx_num_alloc_buffer: number of allocated tx buffer
* @rx_rdy_ring_base_paddr: rx ready ring base physical address
* @rx_rdy_ring_size: rx ready ring size
* @rx_proc_done_idx_paddr: rx process done index physical address
* @rx_proc_done_idx_vaddr: rx process done index virtual address
* @rx2_rdy_ring_base_paddr: rx done ring base physical address
* @rx2_rdy_ring_size: rx done ring size
* @rx2_proc_done_idx_paddr: rx done index physical address
* @rx2_proc_done_idx_vaddr: rx done index virtual address
*
* OL client will reuqest IPA UC related resource information
* Resource information will be distributted to IPA module
* All of the required resources should be pre-allocated
*
* Return: none
*/
static inline void
ol_txrx_ipa_uc_get_resource(ol_txrx_pdev_handle pdev,
qdf_dma_addr_t *ce_sr_base_paddr,
uint32_t *ce_sr_ring_size,
qdf_dma_addr_t *ce_reg_paddr,
qdf_dma_addr_t *tx_comp_ring_base_paddr,
uint32_t *tx_comp_ring_size,
uint32_t *tx_num_alloc_buffer,
qdf_dma_addr_t *rx_rdy_ring_base_paddr,
uint32_t *rx_rdy_ring_size,
qdf_dma_addr_t *rx_proc_done_idx_paddr,
void **rx_proc_done_idx_vaddr,
qdf_dma_addr_t *rx2_rdy_ring_base_paddr,
uint32_t *rx2_rdy_ring_size,
qdf_dma_addr_t *rx2_proc_done_idx_paddr,
void **rx2_proc_done_idx_vaddr)
{
return;
}
/**
* ol_txrx_ipa_uc_set_doorbell_paddr() - Client set IPA UC doorbell register
* @pdev: handle to the HTT instance
* @ipa_uc_tx_doorbell_paddr: tx comp doorbell physical address
* @ipa_uc_rx_doorbell_paddr: rx ready doorbell physical address
*
* IPA UC let know doorbell register physical address
* WLAN firmware will use this physical address to notify IPA UC
*
* Return: none
*/
static inline void
ol_txrx_ipa_uc_set_doorbell_paddr(ol_txrx_pdev_handle pdev,
qdf_dma_addr_t ipa_tx_uc_doorbell_paddr,
qdf_dma_addr_t ipa_rx_uc_doorbell_paddr)
{
return;
}
/**
* ol_txrx_ipa_uc_set_active() - Client notify IPA UC data path active or not
* @pdev: handle to the HTT instance
* @ipa_uc_tx_doorbell_paddr: tx comp doorbell physical address
* @ipa_uc_rx_doorbell_paddr: rx ready doorbell physical address
*
* IPA UC let know doorbell register physical address
* WLAN firmware will use this physical address to notify IPA UC
*
* Return: none
*/
static inline void
ol_txrx_ipa_uc_set_active(ol_txrx_pdev_handle pdev,
bool uc_active, bool is_tx)
{
return;
}
/**
* ol_txrx_ipa_uc_op_response() - Handle OP command response from firmware
* @pdev: handle to the HTT instance
* @op_msg: op response message from firmware
*
* Return: none
*/
static inline void
ol_txrx_ipa_uc_op_response(ol_txrx_pdev_handle pdev, uint8_t *op_msg)
{
return;
}
/**
* ol_txrx_ipa_uc_register_op_cb() - Register OP handler function
* @pdev: handle to the HTT instance
* @op_cb: handler function pointer
* @osif_dev: register client context
*
* Return: none
*/
static inline void
ol_txrx_ipa_uc_register_op_cb(ol_txrx_pdev_handle pdev,
void (*ipa_uc_op_cb_type)(uint8_t *op_msg,
void *osif_ctxt),
void *osif_dev)
{
return;
}
/**
* ol_txrx_ipa_uc_get_stat() - Get firmware wdi status
* @pdev: handle to the HTT instance
*
* Return: none
*/
static inline void ol_txrx_ipa_uc_get_stat(ol_txrx_pdev_handle pdev)
{
return;
}
#endif /* IPA_OFFLOAD */
void ol_txrx_display_stats(uint16_t bitmap);
void ol_txrx_clear_stats(uint16_t bitmap);
int ol_txrx_stats(uint8_t vdev_id, char *buffer, unsigned buf_len);
@ -1056,7 +670,6 @@ void ol_tx_flow_pool_unmap_handler(uint8_t flow_id, uint8_t flow_type,
struct ol_tx_flow_pool_t *ol_tx_create_flow_pool(uint8_t flow_pool_id,
uint16_t flow_pool_size);
int ol_tx_delete_flow_pool(struct ol_tx_flow_pool_t *pool);
void ol_tx_set_desc_global_pool_size(uint32_t num_msdu_desc);
#else
static inline void ol_tx_register_flow_control(struct ol_txrx_pdev_t *pdev)
@ -1094,10 +707,6 @@ static inline int ol_tx_delete_flow_pool(struct ol_tx_flow_pool_t *pool)
{
return 0;
}
static inline void ol_tx_set_desc_global_pool_size(uint32_t num_msdu_desc)
{
return;
}
#endif
#endif /* _OL_TXRX_CTRL_API__H_ */

View file

@ -48,57 +48,10 @@ struct ol_rx_cached_buf {
struct txrx_rx_metainfo;
/**
* struct ol_txrx_desc_type - txrx descriptor type
* @sta_id: sta id
* @is_qos_enabled: is station qos enabled
* @is_wapi_supported: is station wapi supported
*/
struct ol_txrx_desc_type {
uint8_t sta_id;
uint8_t is_qos_enabled;
uint8_t is_wapi_supported;
};
typedef QDF_STATUS (*ol_rx_callback_fp)(void *p_cds_gctx,
qdf_nbuf_t pDataBuff,
uint8_t ucSTAId);
typedef void (*ol_tx_pause_callback_fp)(uint8_t vdev_id,
enum netif_action_type action,
enum netif_reason_type reason);
#ifdef QCA_LL_TX_FLOW_CONTROL_V2
QDF_STATUS ol_txrx_register_pause_cb(ol_tx_pause_callback_fp pause_cb);
#else
static inline
QDF_STATUS ol_txrx_register_pause_cb(ol_tx_pause_callback_fp pause_cb)
{
return QDF_STATUS_SUCCESS;
}
#endif
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
int ol_txrx_register_tx_flow_control (uint8_t vdev_id,
ol_txrx_tx_flow_control_fp flowControl,
void *osif_fc_ctx);
int ol_txrx_deregister_tx_flow_control_cb(uint8_t vdev_id);
void ol_txrx_flow_control_cb(ol_txrx_vdev_handle vdev,
bool tx_resume);
bool
ol_txrx_get_tx_resource(uint8_t sta_id,
unsigned int low_watermark,
unsigned int high_watermark_offset);
int
ol_txrx_ll_set_tx_pause_q_depth(uint8_t vdev_id, int pause_q_depth);
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
/**
* @brief Divide a jumbo TCP frame into smaller segments.
* @details
@ -130,28 +83,10 @@ qdf_nbuf_t ol_txrx_osif_tso_segment(ol_txrx_vdev_handle txrx_vdev,
qdf_nbuf_t ol_tx_data(ol_txrx_vdev_handle data_vdev, qdf_nbuf_t skb);
#ifdef IPA_OFFLOAD
qdf_nbuf_t ol_tx_send_ipa_data_frame(void *vdev,
qdf_nbuf_t skb);
#endif
QDF_STATUS ol_txrx_register_peer
(struct ol_txrx_desc_type *sta_desc);
QDF_STATUS ol_txrx_clear_peer(uint8_t sta_id);
QDF_STATUS ol_txrx_change_peer_state(uint8_t sta_id,
enum ol_txrx_peer_state sta_state,
bool roam_synch_in_progress);
void ol_rx_data_process(struct ol_txrx_peer_t *peer,
qdf_nbuf_t rx_buf_list);
void ol_txrx_flush_rx_frames(struct ol_txrx_peer_t *peer,
bool drop);
#if defined(FEATURE_LRO)
void ol_register_lro_flush_cb(void (handler)(void *), void *data);
void ol_deregister_lro_flush_cb(void);
#endif
#endif /* _OL_TXRX_OSIF_API__H_ */

View file

@ -27,6 +27,7 @@
#include <ol_cfg.h>
#include <ol_if_athvar.h>
#include <cdp_txrx_cfg.h>
unsigned int vow_config = 0;
@ -75,6 +76,16 @@ uint8_t ol_defrag_timeout_check(void)
* Many of these should actually be determined dynamically instead.
*/
/**
* ol_pdev_cfg_attach - setup configuration parameters
*
*@osdev - OS handle needed as an argument for some OS primitives
*@cfg_param - configuration parameters
*
* Allocation configuration context that will be used across data path
*
* Return: the control device object
*/
ol_pdev_handle ol_pdev_cfg_attach(qdf_device_t osdev,
struct txrx_pdev_cfg_param_t cfg_param)
{
@ -156,12 +167,30 @@ int ol_cfg_rx_fwd_check(ol_pdev_handle pdev)
return cfg->pn_rx_fwd_check;
}
/**
* ol_set_cfg_rx_fwd_disabled - set rx fwd disable/enable
*
* @pdev - handle to the physical device
* @disable_rx_fwd 1 -> no rx->tx forward -> rx->tx forward
*
* Choose whether to forward rx frames to tx (where applicable) within the
* WLAN driver, or to leave all forwarding up to the operating system.
* Currently only intra-bss fwd is supported.
*
*/
void ol_set_cfg_rx_fwd_disabled(ol_pdev_handle pdev, uint8_t disable_rx_fwd)
{
struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)pdev;
cfg->rx_fwd_disabled = disable_rx_fwd;
}
/**
* ol_set_cfg_packet_log_enabled - Set packet log config in HTT
* config based on CFG ini configuration
*
* @pdev - handle to the physical device
* @val - 0 - disable, 1 - enable
*/
void ol_set_cfg_packet_log_enabled(ol_pdev_handle pdev, uint8_t val)
{
struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)pdev;

View file

@ -996,18 +996,18 @@ static inline int ol_txrx_tx_is_raw(enum ol_tx_spec tx_spec)
{
return
tx_spec &
(ol_tx_spec_raw | ol_tx_spec_no_aggr | ol_tx_spec_no_encrypt);
(OL_TX_SPEC_RAW | OL_TX_SPEC_NO_AGGR | OL_TX_SPEC_NO_ENCRYPT);
}
static inline uint8_t ol_txrx_tx_raw_subtype(enum ol_tx_spec tx_spec)
{
uint8_t sub_type = 0x1; /* 802.11 MAC header present */
if (tx_spec & ol_tx_spec_no_aggr)
if (tx_spec & OL_TX_SPEC_NO_AGGR)
sub_type |= 0x1 << HTT_TX_MSDU_DESC_RAW_SUBTYPE_NO_AGGR_S;
if (tx_spec & ol_tx_spec_no_encrypt)
if (tx_spec & OL_TX_SPEC_NO_ENCRYPT)
sub_type |= 0x1 << HTT_TX_MSDU_DESC_RAW_SUBTYPE_NO_ENCRYPT_S;
if (tx_spec & ol_tx_spec_nwifi_no_encrypt)
if (tx_spec & OL_TX_SPEC_NWIFI_NO_ENCRYPT)
sub_type |= 0x1 << HTT_TX_MSDU_DESC_RAW_SUBTYPE_NO_ENCRYPT_S;
return sub_type;
}
@ -1046,12 +1046,12 @@ ol_tx_non_std_ll(ol_txrx_vdev_handle vdev,
*/
next = qdf_nbuf_next(msdu);
if (tx_spec != ol_tx_spec_std) {
if (tx_spec & ol_tx_spec_no_free) {
tx_desc->pkt_type = ol_tx_frm_no_free;
} else if (tx_spec & ol_tx_spec_tso) {
tx_desc->pkt_type = ol_tx_frm_tso;
} else if (tx_spec & ol_tx_spec_nwifi_no_encrypt) {
if (tx_spec != OL_TX_SPEC_STD) {
if (tx_spec & OL_TX_SPEC_NO_FREE) {
tx_desc->pkt_type = OL_TX_SPEC_NO_FREE;
} else if (tx_spec & OL_TX_SPEC_TSO) {
tx_desc->pkt_type = OL_TX_SPEC_TSO;
} else if (tx_spec & OL_TX_SPEC_NWIFI_NO_ENCRYPT) {
uint8_t sub_type =
ol_txrx_tx_raw_subtype(tx_spec);
htt_tx_desc_type(htt_pdev, tx_desc->htt_tx_desc,
@ -1135,6 +1135,28 @@ bool parse_ocb_tx_header(qdf_nbuf_t msdu,
return true;
}
/**
* ol_tx_non_std - Allow the control-path SW to send data frames
*
* @data_vdev - which vdev should transmit the tx data frames
* @tx_spec - what non-standard handling to apply to the tx data frames
* @msdu_list - NULL-terminated list of tx MSDUs
*
* Generally, all tx data frames come from the OS shim into the txrx layer.
* However, there are rare cases such as TDLS messaging where the UMAC
* control-path SW creates tx data frames.
* This UMAC SW can call this function to provide the tx data frames to
* the txrx layer.
* The UMAC SW can request a callback for these data frames after their
* transmission completes, by using the ol_txrx_data_tx_cb_set function
* to register a tx completion callback, and by specifying
* ol_tx_spec_no_free as the tx_spec arg when giving the frames to
* ol_tx_non_std.
* The MSDUs need to have the appropriate L2 header type (802.3 vs. 802.11),
* as specified by ol_cfg_frame_type().
*
* Return: null - success, skb - failure
*/
qdf_nbuf_t
ol_tx_non_std(ol_txrx_vdev_handle vdev,
enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list)

View file

@ -35,6 +35,7 @@
#include <qdf_nbuf.h> /* qdf_nbuf_t */
#include <qdf_lock.h>
#include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t, etc. */
#include <cdp_txrx_misc.h> /* ol_tx_spec */
qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list);
#ifdef WLAN_FEATURE_FASTPATH

View file

@ -37,9 +37,26 @@
#include <ol_tx_queue.h>
#include <ol_txrx_dbg.h> /* ENABLE_TX_QUEUE_LOG */
#include <qdf_types.h> /* bool */
#include "cdp_txrx_flow_ctrl_legacy.h"
#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL)
/**
* ol_txrx_vdev_pause- Suspend all tx data for the specified virtual device
*
* @data_vdev - the virtual device being paused
* @reason - the reason for which vdev queue is getting paused
*
* This function applies primarily to HL systems, but also
* applies to LL systems that use per-vdev tx queues for MCC or
* thermal throttling. As an example, this function could be
* used when a single-channel physical device supports multiple
* channels by jumping back and forth between the channels in a
* time-shared manner. As the device is switched from channel A
* to channel B, the virtual devices that operate on channel A
* will be paused.
*
*/
void ol_txrx_vdev_pause(ol_txrx_vdev_handle vdev, uint32_t reason)
{
/* TO DO: log the queue pause */
@ -57,6 +74,16 @@ void ol_txrx_vdev_pause(ol_txrx_vdev_handle vdev, uint32_t reason)
TX_SCHED_DEBUG_PRINT("Leave %s\n", __func__);
}
/**
* ol_txrx_vdev_unpause - Resume tx for the specified virtual device
*
* @data_vdev - the virtual device being unpaused
* @reason - the reason for which vdev queue is getting unpaused
*
* This function applies primarily to HL systems, but also applies to
* LL systems that use per-vdev tx queues for MCC or thermal throttling.
*
*/
void ol_txrx_vdev_unpause(ol_txrx_vdev_handle vdev, uint32_t reason)
{
/* TO DO: log the queue unpause */
@ -82,6 +109,19 @@ void ol_txrx_vdev_unpause(ol_txrx_vdev_handle vdev, uint32_t reason)
TX_SCHED_DEBUG_PRINT("Leave %s\n", __func__);
}
/**
* ol_txrx_vdev_flush - Drop all tx data for the specified virtual device
*
* @data_vdev - the virtual device being flushed
*
* This function applies primarily to HL systems, but also applies to
* LL systems that use per-vdev tx queues for MCC or thermal throttling.
* This function would typically be used by the ctrl SW after it parks
* a STA vdev and then resumes it, but to a new AP. In this case, though
* the same vdev can be used, any old tx frames queued inside it would be
* stale, and would need to be discarded.
*
*/
void ol_txrx_vdev_flush(ol_txrx_vdev_handle vdev)
{
qdf_spin_lock_bh(&vdev->ll_pause.mutex);
@ -102,7 +142,11 @@ void ol_txrx_vdev_flush(ol_txrx_vdev_handle vdev)
vdev->ll_pause.txq.depth = 0;
qdf_spin_unlock_bh(&vdev->ll_pause.mutex);
}
#else /* defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) */
void ol_txrx_vdev_flush(ol_txrx_vdev_handle data_vdev)
{
return;
}
#endif /* defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) */
#ifdef QCA_LL_TX_FLOW_CONTROL_V2

View file

@ -63,6 +63,8 @@
#include <ol_tx_desc.h> /* ol_tx_desc_frame_free */
#include <ol_tx_queue.h>
#include <ol_txrx.h>
#include <cdp_txrx_flow_ctrl_legacy.h>
#include <cdp_txrx_ipa.h>
#include "wma.h"
#ifndef REMOVE_PKT_LOG
#include "pktlog_ac.h"
@ -1369,7 +1371,7 @@ void ol_txrx_flush_rx_frames(struct ol_txrx_peer_t *peer,
qdf_spin_lock_bh(&peer->peer_info_lock);
if (peer->state >= ol_txrx_peer_state_conn)
if (peer->state >= OL_TXRX_PEER_STATE_CONN)
data_rx = peer->vdev->rx;
else
drop = true;
@ -1542,9 +1544,9 @@ ol_txrx_peer_attach(ol_txrx_vdev_handle vdev, uint8_t *peer_mac_addr)
* or else to the "conn" state. For non-open mode, the peer will
* progress to "auth" state once the authentication completes.
*/
peer->state = ol_txrx_peer_state_invalid;
peer->state = OL_TXRX_PEER_STATE_INVALID;
ol_txrx_peer_state_update(pdev, peer->mac_addr.raw,
ol_txrx_peer_state_disc);
OL_TXRX_PEER_STATE_DISC);
#ifdef QCA_SUPPORT_PEER_DATA_RX_RSSI
peer->rssi_dbm = HTT_RSSI_INVALID;
@ -1620,14 +1622,14 @@ ol_txrx_peer_state_update(struct ol_txrx_pdev_t *pdev, uint8_t *peer_mac,
TXRX_PRINT(TXRX_PRINT_LEVEL_INFO2, "%s: change from %d to %d\n",
__func__, peer->state, state);
peer->tx_filter = (state == ol_txrx_peer_state_auth)
peer->tx_filter = (state == OL_TXRX_PEER_STATE_AUTH)
? ol_tx_filter_pass_thru
: ((state == ol_txrx_peer_state_conn)
: ((state == OL_TXRX_PEER_STATE_CONN)
? ol_tx_filter_non_auth
: ol_tx_filter_discard);
if (peer->vdev->pdev->cfg.host_addba) {
if (state == ol_txrx_peer_state_auth) {
if (state == OL_TXRX_PEER_STATE_AUTH) {
int tid;
/*
* Pause all regular (non-extended) TID tx queues until
@ -2103,6 +2105,15 @@ QDF_STATUS ol_txrx_bus_resume(void)
return QDF_STATUS_SUCCESS;
}
/**
* ol_txrx_get_tx_pending - Get the number of pending transmit
* frames that are awaiting completion.
*
* @pdev - the data physical device object
* Mainly used in clean up path to make sure all buffers have been freed
*
* Return: count of pending frames
*/
int ol_txrx_get_tx_pending(ol_txrx_pdev_handle pdev_handle)
{
struct ol_txrx_pdev_t *pdev = (ol_txrx_pdev_handle) pdev_handle;
@ -2908,34 +2919,23 @@ inline void ol_txrx_flow_control_cb(ol_txrx_vdev_handle vdev,
*/
void
ol_txrx_ipa_uc_get_resource(ol_txrx_pdev_handle pdev,
qdf_dma_addr_t *ce_sr_base_paddr,
uint32_t *ce_sr_ring_size,
qdf_dma_addr_t *ce_reg_paddr,
qdf_dma_addr_t *tx_comp_ring_base_paddr,
uint32_t *tx_comp_ring_size,
uint32_t *tx_num_alloc_buffer,
qdf_dma_addr_t *rx_rdy_ring_base_paddr,
uint32_t *rx_rdy_ring_size,
qdf_dma_addr_t *rx_proc_done_idx_paddr,
void **rx_proc_done_idx_vaddr,
qdf_dma_addr_t *rx2_rdy_ring_base_paddr,
uint32_t *rx2_rdy_ring_size,
qdf_dma_addr_t *rx2_proc_done_idx2_paddr,
void **rx2_proc_done_idx2_vaddr)
struct ol_txrx_ipa_resources *ipa_res)
{
htt_ipa_uc_get_resource(pdev->htt_pdev,
ce_sr_base_paddr,
ce_sr_ring_size,
ce_reg_paddr,
tx_comp_ring_base_paddr,
tx_comp_ring_size,
tx_num_alloc_buffer,
rx_rdy_ring_base_paddr,
rx_rdy_ring_size, rx_proc_done_idx_paddr,
rx_proc_done_idx_vaddr,
rx2_rdy_ring_base_paddr,
rx2_rdy_ring_size, rx2_proc_done_idx2_paddr,
rx2_proc_done_idx2_vaddr);
&ipa_res->ce_sr_base_paddr,
&ipa_res->ce_sr_ring_size,
&ipa_res->ce_reg_paddr,
&ipa_res->tx_comp_ring_base_paddr,
&ipa_res->tx_comp_ring_size,
&ipa_res->tx_num_alloc_buffer,
&ipa_res->rx_rdy_ring_base_paddr,
&ipa_res->rx_rdy_ring_size,
&ipa_res->rx_proc_done_idx_paddr,
&ipa_res->rx_proc_done_idx_vaddr,
&ipa_res->rx2_rdy_ring_base_paddr,
&ipa_res->rx2_rdy_ring_size,
&ipa_res->rx2_proc_done_idx_paddr,
&ipa_res->rx2_proc_done_idx_vaddr);
}
/**
@ -3154,7 +3154,7 @@ static void ol_rx_data_cb(struct ol_txrx_peer_t *peer,
goto free_buf;
qdf_spin_lock_bh(&peer->peer_info_lock);
if (qdf_unlikely(!(peer->state >= ol_txrx_peer_state_conn))) {
if (qdf_unlikely(!(peer->state >= OL_TXRX_PEER_STATE_CONN))) {
qdf_spin_unlock_bh(&peer->peer_info_lock);
goto free_buf;
}
@ -3218,7 +3218,7 @@ void ol_rx_data_process(struct ol_txrx_peer_t *peer,
qdf_assert(peer->vdev);
qdf_spin_lock_bh(&peer->peer_info_lock);
if (peer->state >= ol_txrx_peer_state_conn)
if (peer->state >= OL_TXRX_PEER_STATE_CONN)
data_rx = peer->vdev->rx;
qdf_spin_unlock_bh(&peer->peer_info_lock);
@ -3323,7 +3323,7 @@ QDF_STATUS ol_txrx_register_peer(struct ol_txrx_desc_type *sta_desc)
return QDF_STATUS_E_FAULT;
qdf_spin_lock_bh(&peer->peer_info_lock);
peer->state = ol_txrx_peer_state_conn;
peer->state = OL_TXRX_PEER_STATE_CONN;
qdf_spin_unlock_bh(&peer->peer_info_lock);
param.qos_capable = sta_desc->is_qos_enabled;
@ -3382,7 +3382,7 @@ QDF_STATUS ol_txrx_clear_peer(uint8_t sta_id)
qdf_spin_lock_bh(&peer->peer_info_lock);
peer->vdev->rx = NULL;
peer->state = ol_txrx_peer_state_disc;
peer->state = OL_TXRX_PEER_STATE_DISC;
qdf_spin_unlock_bh(&peer->peer_info_lock);
return QDF_STATUS_SUCCESS;
@ -3426,7 +3426,7 @@ QDF_STATUS ol_txrx_register_ocb_peer(void *cds_ctx, uint8_t *mac_addr,
/* Set peer state to connected */
ol_txrx_peer_state_update(pdev, peer->mac_addr.raw,
ol_txrx_peer_state_auth);
OL_TXRX_PEER_STATE_AUTH);
return QDF_STATUS_SUCCESS;
}

View file

@ -49,6 +49,8 @@
#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 */
#include "cdp_txrx_flow_ctrl_v2.h"
#include "cdp_txrx_peer_ops.h"
/*
* The target may allocate multiple IDs for a peer.

View file

@ -38,6 +38,7 @@
#include <sme_api.h>
#include <wlan_defs.h>
#include "ol_txrx_ctrl_api.h"
#include "cdp_txrx_peer_ops.h"
/* Preprocessor Definitions and Constants */
#ifdef FEATURE_WLAN_TDLS

View file

@ -65,6 +65,7 @@
#include "ol_txrx_osif_api.h"
#include "ol_txrx_ctrl_api.h"
#include <wlan_hdd_lro.h>
#include "cdp_txrx_flow_ctrl_legacy.h"
/*---------------------------------------------------------------------------
Preprocessor definitions and constants

View file

@ -39,6 +39,7 @@
#include <cds_api.h>
#include <linux/skbuff.h>
#include "ol_txrx_osif_api.h"
#include "cdp_txrx_flow_ctrl_legacy.h"
#define HDD_ETHERTYPE_802_1_X 0x888E
#define HDD_ETHERTYPE_802_1_X_FRAME_OFFSET 12

View file

@ -56,6 +56,8 @@
#include "ol_txrx_ctrl_api.h"
#include "ol_txrx_types.h"
#include "ol_txrx.h"
#include "cdp_txrx_flow_ctrl_legacy.h"
#include "cdp_txrx_peer_ops.h"
/* These are needed to recognize WPA and RSN suite types */
#define HDD_WPA_OUI_SIZE 4
@ -1216,7 +1218,7 @@ QDF_STATUS hdd_change_peer_state(hdd_adapter_t *pAdapter,
return QDF_STATUS_SUCCESS;
#endif
if (sta_state == ol_txrx_peer_state_auth) {
if (sta_state == OL_TXRX_PEER_STATE_AUTH) {
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
/* make sure event is reset */
INIT_COMPLETION(pAdapter->sta_authorized_event);
@ -1317,7 +1319,7 @@ static QDF_STATUS hdd_roam_register_sta(hdd_adapter_t *pAdapter,
*/
qdf_status =
hdd_change_peer_state(pAdapter, staDesc.sta_id,
ol_txrx_peer_state_auth,
OL_TXRX_PEER_STATE_AUTH,
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
pRoamInfo->roamSynchInProgress
#else
@ -1332,7 +1334,7 @@ static QDF_STATUS hdd_roam_register_sta(hdd_adapter_t *pAdapter,
pHddStaCtx->conn_info.staId[0]);
qdf_status =
hdd_change_peer_state(pAdapter, staDesc.sta_id,
ol_txrx_peer_state_conn,
OL_TXRX_PEER_STATE_CONN,
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
pRoamInfo->roamSynchInProgress
#else
@ -1529,7 +1531,7 @@ static int hdd_change_sta_state_authenticated(hdd_adapter_t *adapter,
*/
ret = hdd_change_peer_state(adapter,
hddstactx->conn_info.staId[0],
ol_txrx_peer_state_auth,
OL_TXRX_PEER_STATE_AUTH,
hdd_is_roam_sync_in_progress(roaminfo));
hdd_conn_set_authenticated(adapter, true);
if ((WLAN_HDD_INFRA_STATION == adapter->device_mode) ||
@ -2120,7 +2122,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
qdf_status =
hdd_change_peer_state(pAdapter,
pHddStaCtx->conn_info.staId[0],
ol_txrx_peer_state_conn,
OL_TXRX_PEER_STATE_CONN,
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
pRoamInfo->roamSynchInProgress
#else
@ -2135,7 +2137,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
qdf_status =
hdd_change_peer_state(pAdapter,
pHddStaCtx->conn_info.staId[0],
ol_txrx_peer_state_auth,
OL_TXRX_PEER_STATE_AUTH,
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
pRoamInfo->roamSynchInProgress
#else

View file

@ -6335,7 +6335,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy,
status =
hdd_softap_change_sta_state(pAdapter,
&STAMacAddress,
ol_txrx_peer_state_auth);
OL_TXRX_PEER_STATE_AUTH);
if (status != QDF_STATUS_SUCCESS) {
hddLog(QDF_TRACE_LEVEL_INFO,

View file

@ -53,6 +53,7 @@
#include "cds_concurrency.h"
#include "qwlan_version.h"
#include "bmi.h"
#include "cdp_txrx_bus.h"
#ifdef MODULE
#define WLAN_MODULE_NAME module_name(THIS_MODULE)

View file

@ -54,6 +54,8 @@
#include "wma.h"
#include "wma_api.h"
#include "cdp_txrx_ipa.h"
#define HDD_IPA_DESC_BUFFER_RATIO 4
#define HDD_IPA_IPV4_NAME_EXT "_ipv4"
#define HDD_IPA_IPV6_NAME_EXT "_ipv6"
@ -441,29 +443,7 @@ struct hdd_ipa_priv {
qdf_mc_timer_t rt_debug_fill_timer;
qdf_mutex_t rt_debug_lock;
qdf_mutex_t ipa_lock;
/* CE resources */
qdf_dma_addr_t ce_sr_base_paddr;
uint32_t ce_sr_ring_size;
qdf_dma_addr_t ce_reg_paddr;
/* WLAN TX:IPA->WLAN */
qdf_dma_addr_t tx_comp_ring_base_paddr;
uint32_t tx_comp_ring_size;
uint32_t tx_num_alloc_buffer;
/* WLAN RX:WLAN->IPA */
qdf_dma_addr_t rx_rdy_ring_base_paddr;
uint32_t rx_rdy_ring_size;
qdf_dma_addr_t rx_proc_done_idx_paddr;
void *rx_proc_done_idx_vaddr;
/* WLAN RX2:WLAN->IPA */
qdf_dma_addr_t rx2_rdy_ring_base_paddr;
uint32_t rx2_rdy_ring_size;
qdf_dma_addr_t rx2_proc_done_idx_paddr;
void *rx2_proc_done_idx_vaddr;
struct ol_txrx_ipa_resources ipa_resource;
/* IPA UC doorbell registers paddr */
qdf_dma_addr_t tx_comp_doorbell_paddr;
qdf_dma_addr_t rx_ready_doorbell_paddr;
@ -531,13 +511,18 @@ uint32_t wlan_hdd_stub_addr_to_priv(void *ptr)
/* Temporary macro to make a build without IPA V2 */
#ifdef IPA_V2
#define HDD_IPA_WDI2_SET(pipe_in, ipa_ctxt) \
do { \
pipe_in.u.ul.rdy_ring_rp_va = ipa_ctxt->rx_proc_done_idx_vaddr; \
pipe_in.u.ul.rdy_comp_ring_base_pa = ipa_ctxt->rx2_rdy_ring_base_paddr;\
pipe_in.u.ul.rdy_comp_ring_size = ipa_ctxt->rx2_rdy_ring_size; \
pipe_in.u.ul.rdy_comp_ring_wp_pa = ipa_ctxt->rx2_proc_done_idx_paddr; \
pipe_in.u.ul.rdy_comp_ring_wp_va = ipa_ctxt->rx2_proc_done_idx_vaddr; \
#define HDD_IPA_WDI2_SET(pipe_in, ipa_ctxt) \
do { \
pipe_in.u.ul.rdy_ring_rp_va = \
ipa_ctxt->ipa_resource.rx_proc_done_idx_vaddr; \
pipe_in.u.ul.rdy_comp_ring_base_pa = \
ipa_ctxt->ipa_resource.rx2_rdy_ring_base_paddr;\
pipe_in.u.ul.rdy_comp_ring_size = \
ipa_ctxt->ipa_resource.rx2_rdy_ring_size; \
pipe_in.u.ul.rdy_comp_ring_wp_pa = \
ipa_ctxt->ipa_resource.rx2_proc_done_idx_paddr; \
pipe_in.u.ul.rdy_comp_ring_wp_va = \
ipa_ctxt->ipa_resource.rx2_proc_done_idx_vaddr; \
} while (0)
#else
/* Do nothing */
@ -1420,25 +1405,25 @@ static void hdd_ipa_uc_op_cb(struct op_msg_type *op_msg, void *usr_ctxt)
if ((HDD_IPA_UC_OPCODE_STATS == msg->op_code) &&
(HDD_IPA_UC_STAT_REASON_DEBUG == hdd_ipa->stat_req_reason)) {
struct ol_txrx_ipa_resources *res = &hdd_ipa->ipa_resource;
/* STATs from host */
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
"==== IPA_UC WLAN_HOST CE ====\n"
"CE RING BASE: 0x%llx\n"
"CE RING SIZE: %d\n"
"CE REG ADDR : 0x%llx",
(unsigned long long)hdd_ipa->ce_sr_base_paddr,
hdd_ipa->ce_sr_ring_size,
(unsigned long long)hdd_ipa->ce_reg_paddr);
(unsigned long long)res->ce_sr_base_paddr,
res->ce_sr_ring_size,
(unsigned long long)res->ce_reg_paddr);
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
"==== IPA_UC WLAN_HOST TX ====\n"
"COMP RING BASE: 0x%llx\n"
"COMP RING SIZE: %d\n"
"NUM ALLOC BUF: %d\n"
"COMP RING DBELL : 0x%llx",
(unsigned long long)hdd_ipa->tx_comp_ring_base_paddr,
hdd_ipa->tx_comp_ring_size,
hdd_ipa->tx_num_alloc_buffer,
(unsigned long long)res->tx_comp_ring_base_paddr,
res->tx_comp_ring_size,
res->tx_num_alloc_buffer,
(unsigned long long)hdd_ipa->tx_comp_doorbell_paddr);
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
"==== IPA_UC WLAN_HOST RX ====\n"
@ -1449,10 +1434,11 @@ static void hdd_ipa_uc_op_cb(struct op_msg_type *op_msg, void *usr_ctxt)
"NUM EXCP PKT : %llu\n"
"NUM TX BCMC : %llu\n"
"NUM TX BCMC ERR : %llu",
(unsigned long long)hdd_ipa->rx_rdy_ring_base_paddr,
hdd_ipa->rx_rdy_ring_size,
(unsigned long long)res->rx_rdy_ring_base_paddr,
res->rx_rdy_ring_size,
(unsigned long long)hdd_ipa->rx_ready_doorbell_paddr,
(unsigned long long)hdd_ipa->rx_proc_done_idx_paddr,
(unsigned long long)hdd_ipa->ipa_resource.
rx_proc_done_idx_paddr,
hdd_ipa->stats.num_rx_excep,
hdd_ipa->stats.num_tx_bcmc,
(unsigned long long)hdd_ipa->stats.num_tx_bcmc_err);
@ -1811,13 +1797,18 @@ static QDF_STATUS hdd_ipa_uc_ol_init(hdd_context_t *hdd_ctx)
pipe_in.sys.keep_ipa_awake = true;
}
pipe_in.u.dl.comp_ring_base_pa = ipa_ctxt->tx_comp_ring_base_paddr;
pipe_in.u.dl.comp_ring_base_pa =
ipa_ctxt->ipa_resource.tx_comp_ring_base_paddr;
pipe_in.u.dl.comp_ring_size =
ipa_ctxt->tx_comp_ring_size * sizeof(qdf_dma_addr_t);
pipe_in.u.dl.ce_ring_base_pa = ipa_ctxt->ce_sr_base_paddr;
pipe_in.u.dl.ce_door_bell_pa = ipa_ctxt->ce_reg_paddr;
pipe_in.u.dl.ce_ring_size = ipa_ctxt->ce_sr_ring_size;
pipe_in.u.dl.num_tx_buffers = ipa_ctxt->tx_num_alloc_buffer;
ipa_ctxt->ipa_resource.tx_comp_ring_size *
sizeof(qdf_dma_addr_t);
pipe_in.u.dl.ce_ring_base_pa =
ipa_ctxt->ipa_resource.ce_sr_base_paddr;
pipe_in.u.dl.ce_door_bell_pa = ipa_ctxt->ipa_resource.ce_reg_paddr;
pipe_in.u.dl.ce_ring_size =
ipa_ctxt->ipa_resource.ce_sr_ring_size;
pipe_in.u.dl.num_tx_buffers =
ipa_ctxt->ipa_resource.tx_num_alloc_buffer;
/* Connect WDI IPA PIPE */
ipa_connect_wdi_pipe(&pipe_in, &pipe_out);
@ -1852,9 +1843,12 @@ static QDF_STATUS hdd_ipa_uc_ol_init(hdd_context_t *hdd_ctx)
pipe_in.sys.keep_ipa_awake = true;
}
pipe_in.u.ul.rdy_ring_base_pa = ipa_ctxt->rx_rdy_ring_base_paddr;
pipe_in.u.ul.rdy_ring_size = ipa_ctxt->rx_rdy_ring_size;
pipe_in.u.ul.rdy_ring_rp_pa = ipa_ctxt->rx_proc_done_idx_paddr;
pipe_in.u.ul.rdy_ring_base_pa =
ipa_ctxt->ipa_resource.rx_rdy_ring_base_paddr;
pipe_in.u.ul.rdy_ring_size =
ipa_ctxt->ipa_resource.rx_rdy_ring_size;
pipe_in.u.ul.rdy_ring_rp_pa =
ipa_ctxt->ipa_resource.rx_proc_done_idx_paddr;
HDD_IPA_WDI2_SET(pipe_in, ipa_ctxt);
ipa_connect_wdi_pipe(&pipe_in, &pipe_out);
ipa_ctxt->rx_ready_doorbell_paddr = pipe_out.uc_door_bell_pa;
@ -4027,24 +4021,11 @@ QDF_STATUS hdd_ipa_init(hdd_context_t *hdd_ctx)
hdd_ipa->hdd_ctx = hdd_ctx;
hdd_ipa->num_iface = 0;
ol_txrx_ipa_uc_get_resource(cds_get_context(QDF_MODULE_ID_TXRX),
&hdd_ipa->ce_sr_base_paddr,
&hdd_ipa->ce_sr_ring_size,
&hdd_ipa->ce_reg_paddr,
&hdd_ipa->tx_comp_ring_base_paddr,
&hdd_ipa->tx_comp_ring_size,
&hdd_ipa->tx_num_alloc_buffer,
&hdd_ipa->rx_rdy_ring_base_paddr,
&hdd_ipa->rx_rdy_ring_size,
&hdd_ipa->rx_proc_done_idx_paddr,
&hdd_ipa->rx_proc_done_idx_vaddr,
&hdd_ipa->rx2_rdy_ring_base_paddr,
&hdd_ipa->rx2_rdy_ring_size,
&hdd_ipa->rx2_proc_done_idx_paddr,
&hdd_ipa->rx2_proc_done_idx_vaddr);
if ((0 == hdd_ipa->ce_sr_base_paddr) ||
(0 == hdd_ipa->tx_comp_ring_base_paddr) ||
(0 == hdd_ipa->rx_rdy_ring_base_paddr) ||
(0 == hdd_ipa->rx2_rdy_ring_base_paddr)) {
&hdd_ipa->ipa_resource);
if ((0 == hdd_ipa->ipa_resource.ce_sr_base_paddr) ||
(0 == hdd_ipa->ipa_resource.tx_comp_ring_base_paddr) ||
(0 == hdd_ipa->ipa_resource.rx_rdy_ring_base_paddr) ||
(0 == hdd_ipa->ipa_resource.rx2_rdy_ring_base_paddr)) {
HDD_IPA_LOG(QDF_TRACE_LEVEL_FATAL,
"IPA UC resource alloc fail");
goto fail_get_resource;

View file

@ -40,6 +40,7 @@
#include <wma_api.h>
#include <ol_txrx_types.h>
#include <ol_cfg.h>
#include <cdp_txrx_lro.h>
#include <linux/inet_lro.h>
#include <linux/list.h>
@ -504,7 +505,6 @@ int hdd_lro_enable(hdd_context_t *hdd_ctx,
hdd_adapter_t *adapter)
{
struct hdd_lro_s *hdd_lro;
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
size_t lro_mgr_sz, desc_arr_sz, desc_pool_sz, hash_table_sz;
uint8_t *lro_mem_ptr;
@ -557,7 +557,7 @@ int hdd_lro_enable(hdd_context_t *hdd_ctx,
hdd_lro_desc_info_init(hdd_lro);
hdd_lro->lro_mgr->dev = adapter->dev;
if (ol_cfg_is_rx_thread_enabled(pdev->ctrl_pdev))
if (hdd_ctx->config->enableRxThread)
hdd_lro->lro_mgr->features = LRO_F_NI;
if (hdd_napi_enabled(HDD_NAPI_ANY))

View file

@ -89,6 +89,7 @@
#include "cds_regdomain.h"
#include "wlan_hdd_ocb.h"
#include "cdp_txrx_flow_ctrl_v2.h"
extern int hdd_hostapd_stop(struct net_device *dev);
#endif /* FEATURE_WLAN_CH_AVOID */

View file

@ -69,6 +69,7 @@
#include "hif.h"
#include "sme_power_save_api.h"
#include "cds_concurrency.h"
#include "cdp_txrx_flow_ctrl_v2.h"
/* Preprocessor definitions and constants */
#define HDD_SSR_BRING_UP_TIME 30000

View file

@ -39,6 +39,7 @@
#include <cds_sched.h>
#include <wlan_hdd_napi.h>
#include <ol_txrx.h>
#include <cdp_txrx_peer_ops.h>
#ifdef IPA_OFFLOAD
#include <wlan_hdd_ipa.h>
@ -241,15 +242,15 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
goto drop_pkt;
}
if ((ol_txrx_peer_state_conn !=
if ((OL_TXRX_PEER_STATE_CONN !=
pAdapter->aStaInfo[STAId].tlSTAState)
&& (ol_txrx_peer_state_auth !=
&& (OL_TXRX_PEER_STATE_AUTH !=
pAdapter->aStaInfo[STAId].tlSTAState)) {
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA,
QDF_TRACE_LEVEL_WARN,
"%s: Station not connected yet", __func__);
goto drop_pkt;
} else if (ol_txrx_peer_state_conn ==
} else if (OL_TXRX_PEER_STATE_CONN ==
pAdapter->aStaInfo[STAId].tlSTAState) {
if (ntohs(skb->protocol) != HDD_ETHERTYPE_802_1_X) {
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA,
@ -739,9 +740,9 @@ QDF_STATUS hdd_softap_register_sta(hdd_adapter_t *pAdapter,
* transition TL directly to 'Authenticated' state.
*/
qdf_status = hdd_change_peer_state(pAdapter, staDesc.sta_id,
ol_txrx_peer_state_auth, false);
OL_TXRX_PEER_STATE_AUTH, false);
pAdapter->aStaInfo[staId].tlSTAState = ol_txrx_peer_state_auth;
pAdapter->aStaInfo[staId].tlSTAState = OL_TXRX_PEER_STATE_AUTH;
pAdapter->sessionCtx.ap.uIsAuthenticated = true;
} else {
@ -750,8 +751,8 @@ QDF_STATUS hdd_softap_register_sta(hdd_adapter_t *pAdapter,
pAdapter->aStaInfo[staId].ucSTAId);
qdf_status = hdd_change_peer_state(pAdapter, staDesc.sta_id,
ol_txrx_peer_state_conn, false);
pAdapter->aStaInfo[staId].tlSTAState = ol_txrx_peer_state_conn;
OL_TXRX_PEER_STATE_CONN, false);
pAdapter->aStaInfo[staId].tlSTAState = OL_TXRX_PEER_STATE_CONN;
pAdapter->sessionCtx.ap.uIsAuthenticated = false;
@ -899,7 +900,7 @@ QDF_STATUS hdd_softap_change_sta_state(hdd_adapter_t *pAdapter,
if (QDF_STATUS_SUCCESS == qdf_status) {
pAdapter->aStaInfo[ucSTAId].tlSTAState =
ol_txrx_peer_state_auth;
OL_TXRX_PEER_STATE_AUTH;
}
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_INFO,

View file

@ -52,9 +52,10 @@
#include <wlan_hdd_ipa.h>
#include "wlan_hdd_ocb.h"
#include "wlan_hdd_lro.h"
#include "cdp_txrx_peer_ops.h"
#ifdef FEATURE_WLAN_DIAG_SUPPORT
#define HDD_EAPOL_ETHER_TYPE (0x888E)
#define HDD_EAPOL_ETHER_TYPE_OFFSET (12)
@ -490,7 +491,7 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE)));
/* Check if station is connected */
if (ol_txrx_peer_state_conn ==
if (OL_TXRX_PEER_STATE_CONN ==
pAdapter->aStaInfo[STAId].tlSTAState) {
QDF_TRACE(QDF_MODULE_ID_HDD_DATA,
QDF_TRACE_LEVEL_WARN,

View file

@ -83,6 +83,7 @@
#include "wlan_hdd_conc_ut.h"
#include "wlan_hdd_ocb.h"
#include "wlan_hdd_napi.h"
#include "cdp_txrx_flow_ctrl_legacy.h"
#ifdef QCA_PKT_PROTO_TRACE
#include "cds_packet.h"

View file

@ -65,6 +65,9 @@
#include "dfs.h"
#include "wma_internal.h"
#include "cdp_txrx_flow_ctrl_legacy.h"
#include "cdp_txrx_cmn.h"
#include "cdp_txrx_misc.h"
typedef struct {
int32_t rate;
@ -2429,7 +2432,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
wma_handle->last_umac_data_nbuf = skb;
/* Send the Data frame to TxRx in Non Standard Path */
ret = ol_tx_non_std(txrx_vdev, ol_tx_spec_no_free, skb);
ret = ol_tx_non_std(txrx_vdev, OL_TX_SPEC_NO_FREE, skb);
if (ret) {
WMA_LOGE("TxRx Rejected. Fail to do Tx");

View file

@ -62,12 +62,13 @@
#include "dbglog_host.h"
/* FIXME: Inclusion of .c looks odd but this is how it is in internal codebase */
#include "csr_api.h"
#include "ol_fw.h"
#include "dfs.h"
#include "wma_internal.h"
#include "wma_ocb.h"
#include "cdp_txrx_cfg.h"
#include "cdp_txrx_flow_ctrl_legacy.h"
/**
* wma_find_vdev_by_addr() - find vdev_id from mac address
@ -3260,7 +3261,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
WMA_LOGD("%s: Update peer(%pM) state into auth",
__func__, add_bss->bssId);
ol_txrx_peer_state_update(pdev, add_bss->bssId,
ol_txrx_peer_state_auth);
OL_TXRX_PEER_STATE_AUTH);
} else {
#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || defined(QCA_LL_TX_FLOW_CONTROL_V2)
ol_txrx_vdev_handle vdev;
@ -3268,7 +3269,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
WMA_LOGD("%s: Update peer(%pM) state into conn",
__func__, add_bss->bssId);
ol_txrx_peer_state_update(pdev, add_bss->bssId,
ol_txrx_peer_state_conn);
OL_TXRX_PEER_STATE_CONN);
#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || defined(QCA_LL_TX_FLOW_CONTROL_V2)
peer = ol_txrx_find_peer_by_addr(pdev, add_bss->bssId,
&peer_id);
@ -3433,7 +3434,7 @@ void wma_add_bss(tp_wma_handle wma, tpAddBssParams params)
*/
static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
{
enum ol_txrx_peer_state state = ol_txrx_peer_state_conn;
enum ol_txrx_peer_state state = OL_TXRX_PEER_STATE_CONN;
ol_txrx_pdev_handle pdev;
ol_txrx_vdev_handle vdev;
ol_txrx_peer_handle peer;
@ -3813,7 +3814,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
peer = ol_txrx_find_peer_by_addr(pdev, params->bssId, &params->staIdx);
if (params->nonRoamReassoc) {
ol_txrx_peer_state_update(pdev, params->bssId,
ol_txrx_peer_state_auth);
OL_TXRX_PEER_STATE_AUTH);
qdf_atomic_set(&iface->bss_status, WMA_BSS_STATUS_STARTED);
iface->aid = params->assocId;
goto out;
@ -3825,7 +3826,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
status = QDF_STATUS_E_FAILURE;
goto out;
}
if (peer != NULL && peer->state == ol_txrx_peer_state_disc) {
if (peer != NULL && peer->state == OL_TXRX_PEER_STATE_DISC) {
/*
* This is the case for reassociation.
* peer state update and peer_assoc is required since it
@ -3837,12 +3838,12 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
WMA_LOGD("%s: Update peer(%pM) state into auth",
__func__, params->bssId);
ol_txrx_peer_state_update(pdev, params->bssId,
ol_txrx_peer_state_auth);
OL_TXRX_PEER_STATE_AUTH);
} else {
WMA_LOGD("%s: Update peer(%pM) state into conn",
__func__, params->bssId);
ol_txrx_peer_state_update(pdev, params->bssId,
ol_txrx_peer_state_conn);
OL_TXRX_PEER_STATE_CONN);
}
if (wma_is_roam_synch_in_progress(wma, params->smesessionId)) {
@ -3852,7 +3853,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
* skipping this operation, we are just executing the
* following which are useful for LFR3.0.*/
ol_txrx_peer_state_update(pdev, params->bssId,
ol_txrx_peer_state_auth);
OL_TXRX_PEER_STATE_AUTH);
qdf_atomic_set(&iface->bss_status,
WMA_BSS_STATUS_STARTED);
iface->aid = params->assocId;

View file

@ -71,6 +71,10 @@
#include "wma_ocb.h"
#include "cds_concurrency.h"
#include "cdp_txrx_cfg.h"
#include "cdp_txrx_flow_ctrl_legacy.h"
#include "cdp_txrx_flow_ctrl_v2.h"
#include "cdp_txrx_ipa.h"
#define WMA_LOG_COMPLETION_TIMER 10000 /* 10 seconds */

View file

@ -66,6 +66,7 @@
#include "dfs.h"
#include "wma_internal.h"
#include "cds_concurrency.h"
#include "cdp_txrx_flow_ctrl_legacy.h"
/**
* wma_send_bcn_buf_ll() - prepare and send beacon buffer to fw for LL
@ -952,7 +953,7 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
if (params->wpa_rsn >> 1)
cmd->peer_flags |= WMI_PEER_NEED_GTK_2_WAY;
ol_txrx_peer_state_update(pdev, params->bssId, ol_txrx_peer_state_auth);
ol_txrx_peer_state_update(pdev, params->bssId, OL_TXRX_PEER_STATE_AUTH);
#ifdef FEATURE_WLAN_WAPI
if (params->encryptType == eSIR_ED_WPI) {