Explorar el Código

qcacld-3.0: fix compile error in cdp_fc_get_tx_resource API

cdp_fc_get_tx_resource API is being called without passing
pdev handle, which mis-matches the prototype. Adding a fix
to include right arguments to passed, also removing static
from function ol_txrx_get_vdev_by_peer_addr to expose scope
outside the file, to fix compile errors.

Change-Id: I8089aa5df3a127b85236e69f8a84de7ebd09ec3f
CRs-Fixed: 2545857
Vevek Venkatesan hace 5 años
padre
commit
b8e96629e3
Se han modificado 3 ficheros con 36 adiciones y 3 borrados
  1. 21 3
      core/dp/txrx/ol_txrx.c
  2. 14 0
      core/dp/txrx/ol_txrx.h
  3. 1 0
      core/hdd/src/wlan_hdd_tx_rx.c

+ 21 - 3
core/dp/txrx/ol_txrx.c

@@ -204,7 +204,7 @@ static QDF_STATUS ol_txrx_get_vdevid(void *ppeer, uint8_t *vdev_id)
 	return QDF_STATUS_SUCCESS;
 }
 
-static struct cdp_vdev *
+ol_txrx_vdev_handle
 ol_txrx_get_vdev_by_peer_addr(struct cdp_pdev *ppdev,
 			      struct qdf_mac_addr peer_addr)
 {
@@ -234,7 +234,25 @@ ol_txrx_get_vdev_by_peer_addr(struct cdp_pdev *ppdev,
 	vdev = peer->vdev;
 	ol_txrx_peer_release_ref(peer, PEER_DEBUG_ID_OL_INTERNAL);
 
-	return (struct cdp_vdev *)vdev;
+	return vdev;
+}
+
+/**
+ * ol_txrx_wrapper_get_vdev_by_peer_addr() - Get vdev handle by peer mac address
+ * @ppdev - data path device instance
+ * @peer_addr - peer mac address
+ *
+ * Get virtual interface handle by local peer mac address
+ *
+ * Return: Virtual interface instance handle
+ *         NULL in case cannot find
+ */
+static struct cdp_vdev *
+ol_txrx_wrapper_get_vdev_by_peer_addr(struct cdp_pdev *ppdev,
+				      struct qdf_mac_addr peer_addr)
+{
+	return (struct cdp_vdev *)ol_txrx_get_vdev_by_peer_addr(ppdev,
+								peer_addr);
 }
 
 /**
@@ -5786,7 +5804,7 @@ static struct cdp_peer_ops ol_ops_peer = {
 	.peer_find_by_local_id = ol_txrx_wrapper_peer_find_by_local_id,
 	.peer_state_update = ol_txrx_wrapper_peer_state_update,
 	.get_vdevid = ol_txrx_get_vdevid,
-	.get_vdev_by_peer_addr = ol_txrx_get_vdev_by_peer_addr,
+	.get_vdev_by_peer_addr = ol_txrx_wrapper_get_vdev_by_peer_addr,
 	.register_ocb_peer = ol_txrx_register_ocb_peer,
 	.peer_get_peer_mac_addr = ol_txrx_peer_get_peer_mac_addr,
 	.get_peer_state = ol_txrx_get_peer_state,

+ 14 - 0
core/dp/txrx/ol_txrx.h

@@ -161,6 +161,20 @@ struct cdp_vdev *ol_txrx_get_vdev_from_vdev_id(uint8_t vdev_id);
  */
 struct cdp_vdev *ol_txrx_get_mon_vdev_from_pdev(struct cdp_pdev *ppdev);
 
+/**
+ * ol_txrx_get_vdev_by_peer_addr() - Get vdev handle by peer mac address
+ * @ppdev - data path device instance
+ * @peer_addr - peer mac address
+ *
+ * Get virtual interface handle by local peer mac address
+ *
+ * Return: Virtual interface instance handle
+ *         NULL in case cannot find
+ */
+ol_txrx_vdev_handle
+ol_txrx_get_vdev_by_peer_addr(struct cdp_pdev *ppdev,
+			      struct qdf_mac_addr peer_addr);
+
 void *ol_txrx_find_peer_by_addr(struct cdp_pdev *pdev,
 				uint8_t *peer_addr,
 				uint8_t *peer_id);

+ 1 - 0
core/hdd/src/wlan_hdd_tx_rx.c

@@ -356,6 +356,7 @@ void hdd_get_tx_resource(struct hdd_adapter *adapter,
 {
 	if (false ==
 	    cdp_fc_get_tx_resource(cds_get_context(QDF_MODULE_ID_SOC),
+				   cds_get_context(QDF_MODULE_ID_TXRX),
 				   *mac_addr,
 				   adapter->tx_flow_low_watermark,
 				   adapter->tx_flow_hi_watermark_offset)) {