qcacld-3.0: Fix -Wmissing-prototypes in TXRX
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code that is generating warnings. Fix all warnings
in core/dp/txrx.
Change-Id: Ib6ad0a6414456e2b4c6b881b94d716843cdf24cc
CRs-Fixed: 1091496
diff --git a/core/dp/txrx/ol_rx.c b/core/dp/txrx/ol_rx.c
index 6fc3784..20f96cb 100644
--- a/core/dp/txrx/ol_rx.c
+++ b/core/dp/txrx/ol_rx.c
@@ -46,6 +46,7 @@
#ifdef QCA_SUPPORT_SW_TXRX_ENCAP
#include <ol_txrx_encap.h> /* ol_rx_decap_info_t, etc */
#endif
+#include <ol_rx.h>
/* FIX THIS: txrx should not include private header files of other modules */
#include <htt_types.h>
@@ -272,9 +273,9 @@
#define ol_rx_mpdu_rssi_update(peer, rx_mpdu_desc) /* no-op */
#endif /* QCA_SUPPORT_PEER_DATA_RX_RSSI */
-void discard_msdus(htt_pdev_handle htt_pdev,
- qdf_nbuf_t head_msdu,
- qdf_nbuf_t tail_msdu)
+static void discard_msdus(htt_pdev_handle htt_pdev,
+ qdf_nbuf_t head_msdu,
+ qdf_nbuf_t tail_msdu)
{
while (1) {
qdf_nbuf_t next;
@@ -292,9 +293,9 @@
return;
}
-void chain_msdus(htt_pdev_handle htt_pdev,
- qdf_nbuf_t head_msdu,
- qdf_nbuf_t tail_msdu)
+static void chain_msdus(htt_pdev_handle htt_pdev,
+ qdf_nbuf_t head_msdu,
+ qdf_nbuf_t tail_msdu)
{
while (1) {
qdf_nbuf_t next;
@@ -309,16 +310,15 @@
return;
}
-void process_reorder(ol_txrx_pdev_handle pdev,
- void *rx_mpdu_desc,
- uint8_t tid,
- struct ol_txrx_peer_t *peer,
- qdf_nbuf_t head_msdu,
- qdf_nbuf_t tail_msdu,
- int num_mpdu_ranges,
- int num_pdus,
- bool rx_ind_release
- )
+static void process_reorder(ol_txrx_pdev_handle pdev,
+ void *rx_mpdu_desc,
+ uint8_t tid,
+ struct ol_txrx_peer_t *peer,
+ qdf_nbuf_t head_msdu,
+ qdf_nbuf_t tail_msdu,
+ int num_mpdu_ranges,
+ int num_pdus,
+ bool rx_ind_release)
{
htt_pdev_handle htt_pdev = pdev->htt_pdev;
enum htt_rx_status mpdu_status;
@@ -808,7 +808,7 @@
* by sniffing the IGMP frame.
*/
#define SIZEOF_80211_HDR (sizeof(struct ieee80211_frame))
-void
+static void
ol_rx_inspect(struct ol_txrx_vdev_t *vdev,
struct ol_txrx_peer_t *peer,
unsigned tid, qdf_nbuf_t msdu, void *rx_desc)
@@ -934,7 +934,7 @@
/**
* @brief Check the first msdu to decide whether the a-msdu should be accepted.
*/
-bool
+static bool
ol_rx_filter(struct ol_txrx_vdev_t *vdev,
struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu, void *rx_desc)
{
diff --git a/core/dp/txrx/ol_tx.c b/core/dp/txrx/ol_tx.c
index 68e4544..d2bf87b 100644
--- a/core/dp/txrx/ol_tx.c
+++ b/core/dp/txrx/ol_tx.c
@@ -56,6 +56,7 @@
#include <htt_internal.h>
#include <htt_types.h> /* htc_endpoint */
#include <cdp_txrx_peer_ops.h>
+#include <cdp_txrx_ipa.h>
int ce_send_fast(struct CE_handle *copyeng, qdf_nbuf_t msdu,
unsigned int transfer_id, uint32_t download_len);
@@ -1160,8 +1161,8 @@
* Return: true if ocb parsing is successful
*/
#define OCB_HEADER_VERSION 1
-bool parse_ocb_tx_header(qdf_nbuf_t msdu,
- struct ocb_tx_ctrl_hdr_t *tx_ctrl)
+static bool parse_ocb_tx_header(qdf_nbuf_t msdu,
+ struct ocb_tx_ctrl_hdr_t *tx_ctrl)
{
struct ether_header *eth_hdr_p;
struct ocb_tx_ctrl_hdr_t *tx_ctrl_hdr;
@@ -1837,11 +1838,6 @@
return 0; /* accepted the tx mgmt frame */
}
-void ol_txrx_sync(ol_txrx_pdev_handle pdev, uint8_t sync_cnt)
-{
- htt_h2t_sync_msg(pdev->htt_pdev, sync_cnt);
-}
-
qdf_nbuf_t ol_tx_reinject(struct ol_txrx_vdev_t *vdev,
qdf_nbuf_t msdu, uint16_t peer_id)
{
diff --git a/core/dp/txrx/ol_tx_desc.c b/core/dp/txrx/ol_tx_desc.c
index 8905383..11490c0 100644
--- a/core/dp/txrx/ol_tx_desc.c
+++ b/core/dp/txrx/ol_tx_desc.c
@@ -408,7 +408,7 @@
*
* Return: extension header type
*/
-enum extension_header_type
+static enum extension_header_type
ol_tx_get_wisa_ext_hdr_type(qdf_nbuf_t netbuf)
{
uint8_t *buf = qdf_nbuf_data(netbuf);
diff --git a/core/dp/txrx/ol_tx_queue.c b/core/dp/txrx/ol_tx_queue.c
index 23ffc20..b9b36cb 100644
--- a/core/dp/txrx/ol_tx_queue.c
+++ b/core/dp/txrx/ol_tx_queue.c
@@ -1787,6 +1787,7 @@
#endif
#ifdef QCA_LL_TX_FLOW_CONTROL_V2
+#ifndef CONFIG_ICNSS
/**
* ol_txrx_map_to_netif_reason_type() - map to netif_reason_type
@@ -1794,7 +1795,7 @@
*
* Return: netif_reason_type
*/
-enum netif_reason_type
+static enum netif_reason_type
ol_txrx_map_to_netif_reason_type(uint32_t reason)
{
switch (reason) {
@@ -1816,7 +1817,6 @@
}
}
-#ifndef CONFIG_ICNSS
/**
* ol_txrx_vdev_pause() - pause vdev network queues
* @vdev: vdev handle
@@ -1966,7 +1966,7 @@
}
#endif
-void ol_tx_pdev_throttle_phase_timer(void *context)
+static void ol_tx_pdev_throttle_phase_timer(void *context)
{
struct ol_txrx_pdev_t *pdev = (struct ol_txrx_pdev_t *)context;
int ms;
@@ -2015,7 +2015,7 @@
}
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
-void ol_tx_pdev_throttle_tx_timer(void *context)
+static void ol_tx_pdev_throttle_tx_timer(void *context)
{
struct ol_txrx_pdev_t *pdev = (struct ol_txrx_pdev_t *)context;
ol_tx_pdev_ll_pause_queue_send_all(pdev);
diff --git a/core/dp/txrx/ol_tx_send.c b/core/dp/txrx/ol_tx_send.c
index 58b40c9..8451a2f 100644
--- a/core/dp/txrx/ol_tx_send.c
+++ b/core/dp/txrx/ol_tx_send.c
@@ -52,6 +52,7 @@
#include <ol_txrx_internal.h> /* OL_TX_DESC_NO_REFS, etc. */
#include <ol_osif_txrx_api.h>
#include <ol_tx.h> /* ol_tx_reinject */
+#include <ol_tx_send.h>
#include <ol_cfg.h> /* ol_cfg_is_high_latency */
#include <ol_tx_sched.h>
@@ -941,7 +942,7 @@
pdev->packet_loss_count[category] = 0;
}
-uint32_t ol_tx_delay_avg(uint64_t sum, uint32_t num)
+static uint32_t ol_tx_delay_avg(uint64_t sum, uint32_t num)
{
uint32_t sum32;
int shift = 0;
diff --git a/core/dp/txrx/ol_tx_send.h b/core/dp/txrx/ol_tx_send.h
index 460fe71..fe95f9b 100644
--- a/core/dp/txrx/ol_tx_send.h
+++ b/core/dp/txrx/ol_tx_send.h
@@ -74,7 +74,7 @@
* @param num_msdus - Total msdus chained in msdu_list
*/
-int
+void
ol_tx_send_batch(struct ol_txrx_pdev_t *pdev,
qdf_nbuf_t msdu_list, int num_msdus);
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c
index fef7777..e31e051 100644
--- a/core/dp/txrx/ol_txrx.c
+++ b/core/dp/txrx/ol_txrx.c
@@ -72,7 +72,10 @@
#include <ol_txrx.h>
#include <ol_txrx_types.h>
#include <cdp_txrx_flow_ctrl_legacy.h>
+#include <cdp_txrx_bus.h>
#include <cdp_txrx_ipa.h>
+#include <cdp_txrx_lro.h>
+#include <cdp_txrx_pmf.h>
#include "wma.h"
#include "hif.h"
#include <cdp_txrx_peer_ops.h>
@@ -1140,7 +1143,7 @@
*
* Return: void
*/
-void htt_pktlogmod_exit(struct ol_txrx_pdev_t *handle, void *scn)
+static void htt_pktlogmod_exit(struct ol_txrx_pdev_t *handle, void *scn)
{
if (scn && cds_get_conparam() != QDF_GLOBAL_FTM_MODE &&
!QDF_IS_EPPING_ENABLED(cds_get_conparam()) &&
@@ -1151,7 +1154,7 @@
}
#else
void htt_pkt_log_init(void *handle, void *ol_sc) { }
-void htt_pktlogmod_exit(ol_txrx_pdev_handle handle, void *sc) { }
+static void htt_pktlogmod_exit(ol_txrx_pdev_handle handle, void *sc) { }
#endif
/**
@@ -3708,7 +3711,7 @@
#endif /* TXRX_DEBUG_LEVEL */
#if defined(FEATURE_TSO) && defined(FEATURE_TSO_DEBUG)
-void ol_txrx_stats_display_tso(ol_txrx_pdev_handle pdev)
+static void ol_txrx_stats_display_tso(ol_txrx_pdev_handle pdev)
{
int msdu_idx;
int seg_idx;
@@ -3777,7 +3780,7 @@
}
}
#else
-void ol_txrx_stats_display_tso(ol_txrx_pdev_handle pdev)
+static void ol_txrx_stats_display_tso(ol_txrx_pdev_handle pdev)
{
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
"TSO is not supported\n");
@@ -4734,9 +4737,9 @@
*
* Return: none
*/
-void ol_txrx_lro_flush_handler(void *context,
- void *rxpkt,
- uint16_t staid)
+static void ol_txrx_lro_flush_handler(void *context,
+ void *rxpkt,
+ uint16_t staid)
{
ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
@@ -4763,7 +4766,7 @@
*
* Return: none
*/
-void ol_txrx_lro_flush(void *data)
+static void ol_txrx_lro_flush(void *data)
{
p_cds_sched_context sched_ctx = get_cds_sched_ctxt();
struct cds_ol_rx_pkt *pkt;
diff --git a/core/dp/txrx/ol_txrx_flow_control.c b/core/dp/txrx/ol_txrx_flow_control.c
index f654a97..aeae672 100644
--- a/core/dp/txrx/ol_txrx_flow_control.c
+++ b/core/dp/txrx/ol_txrx_flow_control.c
@@ -289,7 +289,7 @@
*
* Return: 0 for sucess
*/
-int
+static int
ol_tx_distribute_descs_to_deficient_pools(struct ol_tx_flow_pool_t *src_pool)
{
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
@@ -518,7 +518,7 @@
*
* Return: flow_pool ptr / NULL if not found
*/
-struct ol_tx_flow_pool_t *ol_tx_get_flow_pool(uint8_t flow_pool_id)
+static struct ol_tx_flow_pool_t *ol_tx_get_flow_pool(uint8_t flow_pool_id)
{
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
struct ol_tx_flow_pool_t *pool = NULL;
@@ -557,8 +557,8 @@
*
* Return: none
*/
-void ol_tx_flow_pool_vdev_map(struct ol_tx_flow_pool_t *pool,
- uint8_t vdev_id)
+static void ol_tx_flow_pool_vdev_map(struct ol_tx_flow_pool_t *pool,
+ uint8_t vdev_id)
{
ol_txrx_vdev_handle vdev;
@@ -585,8 +585,8 @@
*
* Return: none
*/
-void ol_tx_flow_pool_vdev_unmap(struct ol_tx_flow_pool_t *pool,
- uint8_t vdev_id)
+static void ol_tx_flow_pool_vdev_unmap(struct ol_tx_flow_pool_t *pool,
+ uint8_t vdev_id)
{
ol_txrx_vdev_handle vdev;