From 3454fd61da8d7d9ffa748c0359912ab60a61cf7e Mon Sep 17 00:00:00 2001 From: Manjunathappa Prakash Date: Fri, 1 Apr 2016 08:52:06 -0700 Subject: [PATCH] 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 --- core/dp/ol/inc/ol_txrx_ctrl_api.h | 153 --------------------------- core/dp/ol/inc/ol_txrx_osif_api.h | 1 + core/dp/txrx/ol_tx.c | 1 + core/dp/txrx/ol_tx_queue.c | 3 + core/dp/txrx/ol_tx_send.c | 21 +++- core/dp/txrx/ol_txrx.c | 39 ++++++- core/hdd/inc/wlan_hdd_main.h | 1 + core/hdd/inc/wlan_hdd_softap_tx_rx.h | 1 + core/hdd/src/wlan_hdd_hostapd.c | 1 + core/hdd/src/wlan_hdd_ipa.c | 1 + core/hdd/src/wlan_hdd_main.c | 1 + core/hdd/src/wlan_hdd_ocb.c | 1 + core/hdd/src/wlan_hdd_wext.c | 1 + core/wma/src/wma_data.c | 2 + core/wma/src/wma_features.c | 3 + 15 files changed, 73 insertions(+), 157 deletions(-) diff --git a/core/dp/ol/inc/ol_txrx_ctrl_api.h b/core/dp/ol/inc/ol_txrx_ctrl_api.h index 5e426e9265ae..203eb6983526 100644 --- a/core/dp/ol/inc/ol_txrx_ctrl_api.h +++ b/core/dp/ol/inc/ol_txrx_ctrl_api.h @@ -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); diff --git a/core/dp/ol/inc/ol_txrx_osif_api.h b/core/dp/ol/inc/ol_txrx_osif_api.h index 54da414e82b9..007e1c43e290 100644 --- a/core/dp/ol/inc/ol_txrx_osif_api.h +++ b/core/dp/ol/inc/ol_txrx_osif_api.h @@ -35,6 +35,7 @@ #include /* qdf_nbuf_t */ #include "cds_sched.h" #include "ol_txrx_ctrl_api.h" +#include /** * struct ol_rx_cached_buf - rx cached buffer diff --git a/core/dp/txrx/ol_tx.c b/core/dp/txrx/ol_tx.c index 1c9219cd3039..3b324abfd5d8 100644 --- a/core/dp/txrx/ol_tx.c +++ b/core/dp/txrx/ol_tx.c @@ -52,6 +52,7 @@ #include /* Layering violation, but required for fast path */ #include #include /* htc_endpoint */ +#include int ce_send_fast(struct CE_handle *copyeng, qdf_nbuf_t *msdus, unsigned int num_msdus, unsigned int transfer_id); diff --git a/core/dp/txrx/ol_tx_queue.c b/core/dp/txrx/ol_tx_queue.c index 6aa2cd7a306b..b0cfe07763ac 100644 --- a/core/dp/txrx/ol_tx_queue.c +++ b/core/dp/txrx/ol_tx_queue.c @@ -30,6 +30,9 @@ #include /* ol_cfg_addba_retry */ #include /* HTT_TX_EXT_TID_MGMT */ #include /* htt_tx_desc_tid */ +#include /* ol_txrx_vdev_handle */ +#include /* ol_txrx_sync, ol_tx_addba_conf */ +#include #include /* ol_ctrl_addba_req */ #include /* TXRX_ASSERT1, etc. */ #include /* ol_tx_desc, ol_tx_desc_frame_list_free */ diff --git a/core/dp/txrx/ol_tx_send.c b/core/dp/txrx/ol_tx_send.c index cd3cd8868c7f..c09d1091022a 100644 --- a/core/dp/txrx/ol_tx_send.c +++ b/core/dp/txrx/ol_tx_send.c @@ -43,6 +43,8 @@ #include /* htt_tx_status */ #include +#include +#include /* ol_txrx_vdev_t, etc */ #include /* 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, diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index a4a7b66db025..77c48f304270 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -50,6 +50,9 @@ #include #include #include +#include +#include +#include /* header files for our internal definitions */ #include /* TXRX_ASSERT, etc. */ #include /* WDI events */ @@ -67,6 +70,7 @@ #include #include #include "wma.h" +#include #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; diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index bb4e0103552c..0833b9ef8831 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -66,6 +66,7 @@ #include "ol_txrx_ctrl_api.h" #include #include "cdp_txrx_flow_ctrl_legacy.h" +#include /*--------------------------------------------------------------------------- Preprocessor definitions and constants diff --git a/core/hdd/inc/wlan_hdd_softap_tx_rx.h b/core/hdd/inc/wlan_hdd_softap_tx_rx.h index 45312fb316a5..6fdf85a983b9 100644 --- a/core/hdd/inc/wlan_hdd_softap_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_softap_tx_rx.h @@ -35,6 +35,7 @@ */ #include +#include int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev); diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 6a076eeae76d..0bd09531c3f5 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 046921d71abc..215797222035 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -48,6 +48,7 @@ #include #include #include +#include #include "cds_sched.h" diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 7e0835caf793..13b4693e18e9 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -57,6 +57,7 @@ #include "wlan_hdd_stats.h" #include "qdf_types.h" #include "qdf_trace.h" +#include #include #include diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c index f7c240e5fd14..ecfa1d6cf39d 100644 --- a/core/hdd/src/wlan_hdd_ocb.c +++ b/core/hdd/src/wlan_hdd_ocb.c @@ -40,6 +40,7 @@ #include "sch_api.h" #include "wma_api.h" #include "ol_txrx.h" +#include /* Structure definitions for WLAN_SET_DOT11P_CHANNEL_SCHED */ #define AIFSN_MIN (2) diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index f11628c6d006..6ed2c32f2151 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "sir_params.h" #include "csr_api.h" #include "csr_inside_api.h" diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index eaa85c57cd46..22f727255185 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -42,6 +42,8 @@ #include "wmi_unified.h" #include "wni_cfg.h" #include "cfg_api.h" +#include "ol_txrx_ctrl_api.h" +#include #include "wlan_tgt_def_config.h" #include "qdf_nbuf.h" diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index c4477b1a498b..ad74ab301fff 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -43,7 +43,10 @@ #include "wmi_unified.h" #include "wni_cfg.h" #include "cfg_api.h" +#include "ol_txrx_ctrl_api.h" +#include #include "wlan_tgt_def_config.h" +#include #include "qdf_nbuf.h" #include "qdf_types.h"