Jelajahi Sumber

qcacld-3.0: Properly export ol_tx.c APIs

We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code in ol_tx.c which is generating warnings because
not all public APIs have prototypes defined. Define the missing
prototypes for:
	ol_tx_send_ipa_data_frame()
	ol_tx_non_std()
	ol_txrx_mgmt_tx_cb_set()
	ol_txrx_mgmt_send_ext()

In addition make the following private since they are now only called
internally to ol_tx.c:
	ol_tx_non_std_ll()
	ol_tx_non_std_hl()

Change-Id: I29f334de30ab492f2ef6c422352d11c059e40f1b
CRs-Fixed: 1104125
Jeff Johnson 8 tahun lalu
induk
melakukan
f1ef13a9b4
3 mengubah file dengan 91 tambahan dan 107 penghapusan
  1. 8 75
      core/dp/txrx/ol_tx.c
  2. 83 17
      core/dp/txrx/ol_tx.h
  3. 0 15
      core/dp/txrx/ol_txrx.c

+ 8 - 75
core/dp/txrx/ol_tx.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -181,15 +181,7 @@ qdf_nbuf_t ol_tx_data(void *data_vdev, qdf_nbuf_t skb)
 }
 
 #ifdef IPA_OFFLOAD
-/**
- * ol_tx_send_ipa_data_frame() - send IPA data frame
- * @vdev: vdev
- * @skb: skb
- *
- * Return: skb/ NULL is for success
- */
-qdf_nbuf_t ol_tx_send_ipa_data_frame(void *vdev,
-			qdf_nbuf_t skb)
+qdf_nbuf_t ol_tx_send_ipa_data_frame(void *vdev, qdf_nbuf_t skb)
 {
 	ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
 	qdf_nbuf_t ret;
@@ -1068,7 +1060,7 @@ static inline uint8_t ol_txrx_tx_raw_subtype(enum ol_tx_spec tx_spec)
 	return sub_type;
 }
 
-qdf_nbuf_t
+static qdf_nbuf_t
 ol_tx_non_std_ll(ol_txrx_vdev_handle vdev,
 		 enum ol_tx_spec tx_spec,
 		 qdf_nbuf_t msdu_list)
@@ -1613,7 +1605,7 @@ ol_tx_hl(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 	return ol_tx_hl_base(vdev, OL_TX_SPEC_STD, msdu_list, tx_comp_req);
 }
 
-qdf_nbuf_t
+static qdf_nbuf_t
 ol_tx_non_std_hl(ol_txrx_vdev_handle vdev,
 		 enum ol_tx_spec tx_spec,
 		 qdf_nbuf_t msdu_list)
@@ -1629,28 +1621,6 @@ ol_tx_non_std_hl(ol_txrx_vdev_handle vdev,
 	return ol_tx_hl_base(vdev, tx_spec, msdu_list, tx_comp_req);
 }
 
-/**
- * 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(void *pvdev,
 	      enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list)
@@ -1673,26 +1643,6 @@ ol_txrx_data_tx_cb_set(void *pvdev,
 	pdev->tx_data_callback.ctxt = ctxt;
 }
 
-/**
- * ol_txrx_mgmt_tx_cb_set() - Store a callback for delivery
- * notifications for management frames.
- *
- * @pdev - the data physical device object
- * @type - the type of mgmt frame the callback is used for
- * @download_cb - the callback for notification of delivery to the target
- * @ota_ack_cb - the callback for notification of delivery to the peer
- * @ctxt - context to use with the callback
- *
- * When the txrx SW receives notifications from the target that a tx frame
- * has been delivered to its recipient, it will check if the tx frame
- * is a management frame.  If so, the txrx SW will check the management
- * frame type specified when the frame was submitted for transmission.
- * If there is a callback function registered for the type of managment
- * frame in question, the txrx code will invoke the callback to inform
- * the management + control SW that the mgmt frame was delivered.
- * This function is used by the control SW to store a callback pointer
- * for a given type of management frame.
- */
 void
 ol_txrx_mgmt_tx_cb_set(void *ppdev,
 		       uint8_t type,
@@ -1746,29 +1696,12 @@ void ol_txrx_dump_frag_desc(char *msg, struct ol_tx_desc_t *tx_desc)
 }
 #endif /* HELIUMPLUS_PADDR64 */
 
-/**
- * ol_txrx_mgmt_send_ext() - Transmit a management frame
- *
- * @vdev - virtual device transmitting the frame
- * @tx_mgmt_frm - management frame to transmit
- * @type - the type of managment frame (determines what callback to use)
- * @use_6mbps - specify whether management frame to transmit should
- * use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P)
- * @chanfreq - channel to transmit the frame on
- *
- * Send the specified management frame from the specified virtual device.
- * The type is used for determining whether to invoke a callback to inform
- * the sender that the tx mgmt frame was delivered, and if so, which
- * callback to use.
- *
- * Return: 0 - the frame is accepted for transmission
- *         1 - the frame was not accepted
- */
 int
-ol_txrx_mgmt_send_ext(ol_txrx_vdev_handle vdev,
-		  qdf_nbuf_t tx_mgmt_frm,
-		  uint8_t type, uint8_t use_6mbps, uint16_t chanfreq)
+ol_txrx_mgmt_send_ext(void *pvdev,
+		      qdf_nbuf_t tx_mgmt_frm,
+		      uint8_t type, uint8_t use_6mbps, uint16_t chanfreq)
 {
+	ol_txrx_vdev_handle vdev = pvdev;
 	struct ol_txrx_pdev_t *pdev = vdev->pdev;
 	struct ol_tx_desc_t *tx_desc;
 	struct ol_txrx_msdu_info_t tx_msdu_info;

+ 83 - 17
core/dp/txrx/ol_tx.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -39,6 +39,17 @@
 
 #include <ol_txrx_types.h>      /* ol_tx_desc_t, ol_txrx_msdu_info_t */
 
+#ifdef IPA_OFFLOAD
+/**
+ * ol_tx_send_ipa_data_frame() - send IPA data frame
+ * @vdev: vdev
+ * @skb: skb
+ *
+ * Return: skb/ NULL is for success
+ */
+qdf_nbuf_t ol_tx_send_ipa_data_frame(void *vdev, qdf_nbuf_t skb);
+#endif
+
 qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list);
 qdf_nbuf_t ol_tx_ll_wrapper(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list);
 #ifdef WLAN_FEATURE_FASTPATH
@@ -75,36 +86,91 @@ void ol_tx_pdev_ll_pause_queue_send_all(struct ol_txrx_pdev_t *pdev)
 #endif
 
 /**
- * ol_tx_non_std_hl() - send non std tx frame.
- * @vdev: the virtual device sending the data
- * @tx_spec: indicate what non-standard transmission actions to apply
+ * ol_tx_hl() - transmit tx frames for a HL system.
+ * @vdev: the virtual device transmit the data
  * @msdu_list: the tx frames to send
  *
  * Return: NULL if all MSDUs are accepted
  */
 qdf_nbuf_t
-ol_tx_non_std_hl(ol_txrx_vdev_handle data_vdev,
-		 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
+ol_tx_hl(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list);
 
 /**
- * ol_tx_hl() - transmit tx frames for a HL system.
- * @vdev: the virtual device transmit the data
- * @msdu_list: the tx frames to send
+ * 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
  *
- * Return: NULL if all MSDUs are accepted
+ * 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_hl(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list);
+ol_tx_non_std(void *pvdev,
+	      enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
 
-qdf_nbuf_t
-ol_tx_non_std_ll(ol_txrx_vdev_handle data_vdev,
-		 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
+void ol_txrx_mgmt_tx_complete(void *ctxt, qdf_nbuf_t netbuf, int err);
 
-qdf_nbuf_t
-ol_tx_reinject(struct ol_txrx_vdev_t *vdev, qdf_nbuf_t msdu, uint16_t peer_id);
+/**
+ * ol_txrx_mgmt_tx_cb_set() - Store a callback for delivery
+ *	notifications for management frames.
+ * @ppdev: the data physical device object
+ * @type: the type of mgmt frame the callback is used for
+ * @download_cb: the callback for notification of delivery to the target
+ * @ota_ack_cb: the callback for notification of delivery to the peer
+ * @ctxt: context to use with the callback
+ *
+ * When the txrx SW receives notifications from the target that a tx frame
+ * has been delivered to its recipient, it will check if the tx frame
+ * is a management frame.  If so, the txrx SW will check the management
+ * frame type specified when the frame was submitted for transmission.
+ * If there is a callback function registered for the type of managment
+ * frame in question, the txrx code will invoke the callback to inform
+ * the management + control SW that the mgmt frame was delivered.
+ * This function is used by the control SW to store a callback pointer
+ * for a given type of management frame.
+ */
+void
+ol_txrx_mgmt_tx_cb_set(void *ppdev,
+		       uint8_t type,
+		       ol_txrx_mgmt_tx_cb download_cb,
+		       ol_txrx_mgmt_tx_cb ota_ack_cb, void *ctxt);
 
-void ol_txrx_mgmt_tx_complete(void *ctxt, qdf_nbuf_t netbuf, int err);
+/**
+ * ol_txrx_mgmt_send_ext() - Transmit a management frame
+ * @pvdev: virtual device transmitting the frame
+ * @tx_mgmt_frm: management frame to transmit
+ * @type: the type of managment frame (determines what callback to use)
+ * @use_6mbps: specify whether management frame to transmit should
+ *	use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P)
+ * @chanfreq: channel to transmit the frame on
+ *
+ * Send the specified management frame from the specified virtual device.
+ * The type is used for determining whether to invoke a callback to inform
+ * the sender that the tx mgmt frame was delivered, and if so, which
+ * callback to use.
+ *
+ * Return: 0 - the frame is accepted for transmission
+ *         1 - the frame was not accepted
+ */
+int
+ol_txrx_mgmt_send_ext(void *pvdev,
+		      qdf_nbuf_t tx_mgmt_frm,
+		      uint8_t type, uint8_t use_6mbps, uint16_t chanfreq);
 
+qdf_nbuf_t
+ol_tx_reinject(struct ol_txrx_vdev_t *vdev, qdf_nbuf_t msdu, uint16_t peer_id);
 
 #if defined(FEATURE_TSO)
 void ol_tso_seg_list_init(struct ol_txrx_pdev_t *pdev, uint32_t num_seg);

+ 0 - 15
core/dp/txrx/ol_txrx.c

@@ -100,22 +100,11 @@ 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 qdf_nbuf_t
-ol_tx_non_std(void *pvdev,
-	      enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
 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);
 
-extern qdf_nbuf_t ol_tx_send_ipa_data_frame(void *vdev,
-			qdf_nbuf_t skb);
-
-extern void ol_txrx_mgmt_tx_cb_set(void *ppdev,
-		       uint8_t type,
-		       ol_txrx_mgmt_tx_cb download_cb,
-		       ol_txrx_mgmt_tx_cb ota_ack_cb, void *ctxt);
-
 #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
 extern void ol_txrx_flow_control_cb(void *vdev,
 				    bool tx_resume);
@@ -127,10 +116,6 @@ extern void ol_txrx_vdev_unpause(void *pvdev, uint32_t reason);
 extern void ol_txrx_get_pn_info(void *ppeer, uint8_t **last_pn_valid,
 		    uint64_t **last_pn, uint32_t **rmf_pn_replays);
 
-extern int ol_txrx_mgmt_send_ext(void *vdev,
-		qdf_nbuf_t tx_mgmt_frm, uint8_t type, uint8_t use_6mbps,
-		uint16_t chanfreq);
-
 #ifdef CONFIG_HL_SUPPORT
 
 /**