Explorar o código

qcacld-3.0: Properly export ol_tx_queue.c APIs

We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code in ol_tx_queue.c which is generating warnings
because not all public APIs have prototypes defined. Define the
missing prototypes for:
	ol_txrx_vdev_flush()
	ol_txrx_vdev_pause()
	ol_txrx_vdev_unpause()
	ol_tx_throttle_set_level()
	ol_tx_throttle_init_period()

In addition make the following private since they are now only called
internally to ol_tx_queue.c:
	ol_tx_pdev_peer_bal_timer()
	ol_tx_queue_log_alloc()
	ol_tx_queue_display()

Change-Id: I4a3d767c650eefc39c3bf51ce102c8b5de391ec5
CRs-Fixed: 1104127
Jeff Johnson %!s(int64=8) %!d(string=hai) anos
pai
achega
b13a501758
Modificáronse 3 ficheiros con 24 adicións e 21 borrados
  1. 7 7
      core/dp/txrx/ol_tx_queue.c
  2. 15 2
      core/dp/txrx/ol_tx_queue.h
  3. 2 12
      core/dp/txrx/ol_txrx.c

+ 7 - 7
core/dp/txrx/ol_tx_queue.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -852,7 +852,7 @@ ol_txrx_bad_peer_txctl_update_threshold(void *ppdev,
  *
  * Return: None
  */
-void
+static void
 ol_tx_pdev_peer_bal_timer(void *context)
 {
 	int i;
@@ -1186,7 +1186,7 @@ ol_tx_queue_log_oldest_update(struct ol_txrx_pdev_t *pdev, int offset)
  *
  * Return: log element
  */
-void*
+static void *
 ol_tx_queue_log_alloc(
 	struct ol_txrx_pdev_t *pdev,
 	u_int8_t type /* ol_tx_log_entry_type */,
@@ -1626,7 +1626,7 @@ ol_tx_queue_log_clear(struct ol_txrx_pdev_t *pdev)
  *
  * Return: None
  */
-void
+static void
 ol_tx_queue_display(struct ol_tx_frms_queue_t *txq, int indent)
 {
 	char *state;
@@ -1870,8 +1870,8 @@ void ol_txrx_vdev_unpause(void *pvdev, uint32_t reason)
 			netif_reason);
 
 }
-#endif
-#endif
+#endif /* ifndef CONFIG_ICNSS */
+#endif /* ifdef QCA_LL_TX_FLOW_CONTROL_V2 */
 
 #if defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(CONFIG_HL_SUPPORT)
 
@@ -2325,6 +2325,6 @@ u_int32_t ol_tx_get_max_tx_groups_supported(struct ol_txrx_pdev_t *pdev)
 		return 0;
 #endif
 }
-#endif
+#endif /* FEATURE_HL_GROUP_CREDIT_FLOW_CONTROL */
 
 /*--- End of LL tx throttle queue code ---------------------------------------*/

+ 15 - 2
core/dp/txrx/ol_tx_queue.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -241,6 +241,15 @@ ol_tx_queue_discard(
 }
 #endif /* defined(CONFIG_HL_SUPPORT) */
 
+void ol_txrx_vdev_flush(void *pvdev);
+
+#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || \
+   (defined(QCA_LL_TX_FLOW_CONTROL_V2) && !defined(CONFIG_ICNSS)) || \
+   defined(CONFIG_HL_SUPPORT)
+void ol_txrx_vdev_pause(void *pvdev, uint32_t reason);
+void ol_txrx_vdev_unpause(void *pvdev, uint32_t reason);
+#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
+
 #if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
 
 void
@@ -442,13 +451,17 @@ ol_tx_queues_display(struct ol_txrx_pdev_t *pdev)
 #define ol_tx_queue_decs_reinit(peer, peer_id)  /* no-op */
 
 #ifdef QCA_SUPPORT_TX_THROTTLE
+void ol_tx_throttle_set_level(void *ppdev, int level);
+void ol_tx_throttle_init_period(void *ppdev, int period,
+				uint8_t *dutycycle_level);
+
 /**
  * @brief - initialize the throttle context
  * @param pdev - the physical device object, which stores the txqs
  */
 void ol_tx_throttle_init(struct ol_txrx_pdev_t *pdev);
 #else
-#define ol_tx_throttle_init(pdev)       /*no op */
+static inline void ol_tx_throttle_init(struct ol_txrx_pdev_t *pdev) {}
 #endif
 
 #ifdef FEATURE_HL_GROUP_CREDIT_FLOW_CONTROL

+ 2 - 12
core/dp/txrx/ol_txrx.c

@@ -100,18 +100,6 @@ int ol_txrx_get_tx_pending(void *pdev_handle);
 extern void
 ol_txrx_set_wmm_param(void *data_pdev,
 		      struct ol_tx_wmm_param_t wmm_param);
-extern void ol_tx_throttle_init_period(void *ppdev, int period,
-				uint8_t *dutycycle_level);
-
-extern void ol_tx_throttle_set_level(void *ppdev, int level);
-
-#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
-extern void ol_txrx_flow_control_cb(void *vdev,
-				    bool tx_resume);
-extern void ol_txrx_vdev_flush(void *pvdev);
-extern void ol_txrx_vdev_pause(void *pvdev, uint32_t reason);
-extern void ol_txrx_vdev_unpause(void *pvdev, uint32_t reason);
-#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
 
 extern void ol_txrx_get_pn_info(void *ppeer, uint8_t **last_pn_valid,
 		    uint64_t **last_pn, uint32_t **rmf_pn_replays);
@@ -5200,8 +5188,10 @@ static struct cdp_ocb_ops ol_ops_ocb = {
 };
 
 static struct cdp_throttle_ops ol_ops_throttle = {
+#ifdef QCA_SUPPORT_TX_THROTTLE
 	.throttle_init_period = ol_tx_throttle_init_period,
 	.throttle_set_level = ol_tx_throttle_set_level
+#endif /* QCA_SUPPORT_TX_THROTTLE */
 };
 
 static struct cdp_mob_stats_ops ol_ops_mob_stats = {