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

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

Change-Id: Iaedc5e7e175d6b8eb905a04178fe9772dc7bb797
CRs-Fixed: 994638
This commit is contained in:
Manjunathappa Prakash 2016-04-01 08:52:06 -07:00 • committed by Gerrit - the friendly Code Review server
commit 3454fd61da
15 changed files with 73 additions and 157 deletions

View file

@ -397,26 +397,6 @@ ol_txrx_peer_keyinstalled_state_update(ol_txrx_peer_handle data_peer,
ol_txrx_peer_handle
ol_txrx_peer_find_by_addr(ol_txrx_pdev_handle pdev, uint8_t *peer_mac_addr);
/**
* @brief Find a txrx peer handle from a peer's local ID
* @details
* The control SW typically uses the txrx peer handle to refer to the peer.
* In unusual circumstances, if it is infeasible for the control SW maintain
* the txrx peer handle but it can maintain a small integer local peer ID,
* this function allows the peer handled to be retrieved, based on the local
* peer ID.
*
* @param pdev - the data physical device object
* @param local_peer_id - the ID txrx assigned locally to the peer in question
* @return handle to the txrx peer object
*/
#if QCA_SUPPORT_TXRX_LOCAL_PEER_ID
ol_txrx_peer_handle
ol_txrx_peer_find_by_local_id(ol_txrx_pdev_handle pdev, uint8_t local_peer_id);
#else
#define ol_txrx_peer_find_by_local_id(pdev, local_peer_id) NULL
#endif
struct ol_txrx_peer_stats_t {
struct {
struct {
@ -468,7 +448,6 @@ 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
#define OL_TXRX_RSSI_INVALID 0xffff
@ -498,67 +477,6 @@ 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 */
#if QCA_SUPPORT_TXRX_LOCAL_PEER_ID
#else
#endif
#ifdef QCA_COMPUTE_TX_DELAY
/**
* @brief updates the compute interval period for TSM stats.
* @details
* @param interval - interval for stats computation
*/
void ol_tx_set_compute_interval(ol_txrx_pdev_handle pdev, uint32_t interval);
/**
* @brief Return the uplink (transmitted) packet count and loss count.
* @details
* This function will be called for getting uplink packet count and
* loss count for given stream (access category) a regular interval.
* This also resets the counters hence, the value returned is packets
* counted in last 5(default) second interval. These counter are
* incremented per access category in ol_tx_completion_handler()
*
* @param category - access category of interest
* @param out_packet_count - number of packets transmitted
* @param out_packet_loss_count - number of packets lost
*/
void
ol_tx_packet_count(ol_txrx_pdev_handle pdev,
uint16_t *out_packet_count,
uint16_t *out_packet_loss_count, int category);
#endif
/**
* @brief Return the average delays for tx frames.
* @details
* Return the average of the total time tx frames spend within the driver
* and the average time tx frames take to be transmitted.
* These averages are computed over a 5 second time interval.
* These averages are computed separately for separate access categories,
* if the QCA_COMPUTE_TX_DELAY_PER_AC flag is set.
*
* @param pdev - the data physical device instance
* @param queue_delay_microsec - average time tx frms spend in the WLAN driver
* @param tx_delay_microsec - average time for frames to be transmitted
* @param category - category (TID) of interest
*/
#ifdef QCA_COMPUTE_TX_DELAY
void
ol_tx_delay(ol_txrx_pdev_handle pdev,
uint32_t *queue_delay_microsec,
uint32_t *tx_delay_microsec, int category);
#else
static inline void
ol_tx_delay(ol_txrx_pdev_handle pdev,
uint32_t *queue_delay_microsec,
uint32_t *tx_delay_microsec, int category)
{
/* no-op version if QCA_COMPUTE_TX_DELAY is not set */
*queue_delay_microsec = *tx_delay_microsec = 0;
}
#endif
/*
* Bins used for reporting delay histogram:
* bin 0: 0 - 10 ms delay
@ -569,77 +487,6 @@ ol_tx_delay(ol_txrx_pdev_handle pdev,
* bin 5: > 160 ms delay
*/
#define QCA_TX_DELAY_HIST_REPORT_BINS 6
/**
* @brief Provide a histogram of tx queuing delays.
* @details
* Return a histogram showing the number of tx frames of the specified
* category for each of the delay levels in the histogram bin spacings
* listed above.
* These histograms are computed over a 5 second time interval.
* These histograms are computed separately for separate access categories,
* if the QCA_COMPUTE_TX_DELAY_PER_AC flag is set.
*
* @param pdev - the data physical device instance
* @param bin_values - an array of QCA_TX_DELAY_HIST_REPORT_BINS elements
* This array gets filled in with the histogram bin counts.
* @param category - category (TID) of interest
*/
#ifdef QCA_COMPUTE_TX_DELAY
void
ol_tx_delay_hist(ol_txrx_pdev_handle pdev, uint16_t *bin_values, int category);
#else
static inline void
ol_tx_delay_hist(ol_txrx_pdev_handle pdev, uint16_t *bin_values, int category)
{
/* no-op version if QCA_COMPUTE_TX_DELAY is not set */
qdf_assert(bin_values);
qdf_mem_zero(bin_values,
QCA_TX_DELAY_HIST_REPORT_BINS * sizeof(*bin_values));
}
#endif
#if defined(QCA_SUPPORT_TX_THROTTLE)
/**
* @brief Set the thermal mitgation throttling level.
* @details
* This function applies only to LL systems. This function is used set the
* tx throttle level used for thermal mitigation
*
* @param pdev - the physics device being throttled
*/
void ol_tx_throttle_set_level(struct ol_txrx_pdev_t *pdev, int level);
#else
static inline void ol_tx_throttle_set_level(struct ol_txrx_pdev_t *pdev,
int level)
{
/* no-op */
}
#endif /* QCA_SUPPORT_TX_THROTTLE */
#if defined(QCA_SUPPORT_TX_THROTTLE)
/**
* @brief Configure the thermal mitgation throttling period.
* @details
* This function applies only to LL systems. This function is used set the
* period over which data will be throttled
*
* @param pdev - the physics device being throttled
*/
void ol_tx_throttle_init_period(struct ol_txrx_pdev_t *pdev, int period);
#else
static inline void ol_tx_throttle_init_period(struct ol_txrx_pdev_t *pdev,
int period)
{
/* no-op */
}
#endif /* QCA_SUPPORT_TX_THROTTLE */
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);
QDF_STATUS ol_txrx_register_ocb_peer(void *cds_ctx, uint8_t *mac_addr,
uint8_t *peer_id);
void ol_txrx_set_ocb_peer(struct ol_txrx_pdev_t *pdev,
struct ol_txrx_peer_t *peer);

View file

@ -35,6 +35,7 @@
#include <qdf_nbuf.h> /* qdf_nbuf_t */
#include "cds_sched.h"
#include "ol_txrx_ctrl_api.h"
#include <cdp_txrx_peer_ops.h>
/**
* struct ol_rx_cached_buf - rx cached buffer

View file

@ -52,6 +52,7 @@
#include <htc_api.h> /* Layering violation, but required for fast path */
#include <htt_internal.h>
#include <htt_types.h> /* htc_endpoint */
#include <cdp_txrx_peer_ops.h>
int ce_send_fast(struct CE_handle *copyeng, qdf_nbuf_t *msdus,
unsigned int num_msdus, unsigned int transfer_id);

View file

@ -30,6 +30,9 @@
#include <ol_cfg.h> /* ol_cfg_addba_retry */
#include <htt.h> /* HTT_TX_EXT_TID_MGMT */
#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 <cdp_txrx_tx_throttle.h>
#include <ol_ctrl_txrx_api.h> /* ol_ctrl_addba_req */
#include <ol_txrx_internal.h> /* TXRX_ASSERT1, etc. */
#include <ol_tx_desc.h> /* ol_tx_desc, ol_tx_desc_frame_list_free */

View file

@ -43,6 +43,8 @@
#include <ol_txrx_htt_api.h> /* htt_tx_status */
#include <ol_ctrl_txrx_api.h>
#include <cdp_txrx_tx_delay.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 */
#ifdef QCA_COMPUTE_TX_DELAY
#endif
@ -651,12 +653,29 @@ ol_tx_inspect_handler(ol_txrx_pdev_handle pdev,
}
#ifdef QCA_COMPUTE_TX_DELAY
/**
* @brief updates the compute interval period for TSM stats.
* @details
* @param interval - interval for stats computation
*/
void ol_tx_set_compute_interval(ol_txrx_pdev_handle pdev, uint32_t interval)
{
pdev->tx_delay.avg_period_ticks = qdf_system_msecs_to_ticks(interval);
}
/**
* @brief Return the uplink (transmitted) packet count and loss count.
* @details
* This function will be called for getting uplink packet count and
* loss count for given stream (access category) a regular interval.
* This also resets the counters hence, the value returned is packets
* counted in last 5(default) second interval. These counter are
* incremented per access category in ol_tx_completion_handler()
*
* @param category - access category of interest
* @param out_packet_count - number of packets transmitted
* @param out_packet_loss_count - number of packets lost
*/
void
ol_tx_packet_count(ol_txrx_pdev_handle pdev,
uint16_t *out_packet_count,

View file

@ -50,6 +50,9 @@
#include <ol_txrx_api.h>
#include <ol_txrx_dbg.h>
#include <cdp_txrx_ocb.h>
#include <ol_txrx_ctrl_api.h>
#include <cdp_txrx_stats.h>
#include <ol_txrx_osif_api.h>
/* header files for our internal definitions */
#include <ol_txrx_internal.h> /* TXRX_ASSERT, etc. */
#include <wdi_event.h> /* WDI events */
@ -67,6 +70,7 @@
#include <cdp_txrx_flow_ctrl_legacy.h>
#include <cdp_txrx_ipa.h>
#include "wma.h"
#include <cdp_txrx_peer_ops.h>
#ifndef REMOVE_PKT_LOG
#include "pktlog_ac.h"
#endif
@ -185,6 +189,19 @@ uint16_t ol_txrx_local_peer_id(ol_txrx_peer_handle peer)
return peer->local_id;
}
/**
* @brief Find a txrx peer handle from a peer's local ID
* @details
* The control SW typically uses the txrx peer handle to refer to the peer.
* In unusual circumstances, if it is infeasible for the control SW maintain
* the txrx peer handle but it can maintain a small integer local peer ID,
* this function allows the peer handled to be retrieved, based on the local
* peer ID.
*
* @param pdev - the data physical device object
* @param local_peer_id - the ID txrx assigned locally to the peer in question
* @return handle to the txrx peer object
*/
ol_txrx_peer_handle
ol_txrx_peer_find_by_local_id(struct ol_txrx_pdev_t *pdev,
uint8_t local_peer_id)
@ -1860,9 +1877,25 @@ ol_txrx_get_ocb_chan_info(ol_txrx_vdev_handle vdev)
return vdev->ocb_channel_info;
}
QDF_STATUS
ol_txrx_peer_state_update(struct ol_txrx_pdev_t *pdev, uint8_t *peer_mac,
enum ol_txrx_peer_state state)
/**
* @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: CDF Status
*/
QDF_STATUS ol_txrx_peer_state_update(struct ol_txrx_pdev_t *pdev,
uint8_t *peer_mac,
enum ol_txrx_peer_state state)
{
struct ol_txrx_peer_t *peer;

View file

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

View file

@ -35,6 +35,7 @@
*/
#include <wlan_hdd_hostapd.h>
#include <cdp_txrx_peer_ops.h>
int hdd_softap_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev);

View file

@ -40,6 +40,7 @@
#include <linux/wireless.h>
#include <linux/semaphore.h>
#include <linux/compat.h>
#include <cdp_txrx_stats.h>
#include <cds_api.h>
#include <cds_sched.h>
#include <linux/etherdevice.h>

View file

@ -48,6 +48,7 @@
#include <linux/ip.h>
#include <wlan_hdd_softap_tx_rx.h>
#include <ol_txrx_osif_api.h>
#include <cdp_txrx_peer_ops.h>
#include "cds_sched.h"

View file

@ -57,6 +57,7 @@
#include "wlan_hdd_stats.h"
#include "qdf_types.h"
#include "qdf_trace.h"
#include <cdp_txrx_peer_ops.h>
#include <net/addrconf.h>
#include <linux/wireless.h>

View file

@ -40,6 +40,7 @@
#include "sch_api.h"
#include "wma_api.h"
#include "ol_txrx.h"
#include <cdp_txrx_peer_ops.h>
/* Structure definitions for WLAN_SET_DOT11P_CHANNEL_SCHED */
#define AIFSN_MIN (2)

View file

@ -40,6 +40,7 @@
#include <wlan_hdd_includes.h>
#include <cds_api.h>
#include <net/arp.h>
#include <cdp_txrx_stats.h>
#include "sir_params.h"
#include "csr_api.h"
#include "csr_inside_api.h"

View file

@ -42,6 +42,8 @@
#include "wmi_unified.h"
#include "wni_cfg.h"
#include "cfg_api.h"
#include "ol_txrx_ctrl_api.h"
#include <cdp_txrx_tx_throttle.h>
#include "wlan_tgt_def_config.h"
#include "qdf_nbuf.h"

View file

@ -43,7 +43,10 @@
#include "wmi_unified.h"
#include "wni_cfg.h"
#include "cfg_api.h"
#include "ol_txrx_ctrl_api.h"
#include <cdp_txrx_tx_delay.h>
#include "wlan_tgt_def_config.h"
#include <cdp_txrx_peer_ops.h>
#include "qdf_nbuf.h"
#include "qdf_types.h"