ソースを参照

qcacld-3.0: Fix cdp api cdp_tx_desc_thresh_reached

The CDP api cdp_tx_desc_thresh_reached should return true
if the available data path tx desc reaches threshold. But
this api returns wrong value in case of helium targets. Fix
this by returning correct value.

Change-Id: I571841ab1e4a4b24242fadc21bd13a85ef8da781
CRs-Fixed: 2378898
Sravan Kumar Kairam 6 年 前
コミット
8433f90213
2 ファイル変更15 行追加3 行削除
  1. 2 2
      core/dp/txrx/ol_txrx.c
  2. 13 1
      core/dp/txrx/ol_txrx.h

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

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -5556,7 +5556,7 @@ static struct cdp_flowctl_ops ol_ops_flowctl = {
 	.register_pause_cb = ol_txrx_register_pause_cb,
 	.set_desc_global_pool_size = ol_tx_set_desc_global_pool_size,
 	.dump_flow_pool_info = ol_tx_dump_flow_pool_info,
-	.tx_desc_thresh_reached = ol_txrx_fwd_desc_thresh_check,
+	.tx_desc_thresh_reached = ol_tx_desc_thresh_reached,
 #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
 };
 

+ 13 - 1
core/dp/txrx/ol_txrx.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -315,6 +315,18 @@ QDF_STATUS ol_txrx_register_pause_cb(struct cdp_soc_t *soc,
  *         false; not enough descriptors, drop the packet
  */
 bool ol_txrx_fwd_desc_thresh_check(struct cdp_vdev *vdev);
+
+/**
+ * ol_tx_desc_thresh_reached() - is tx desc threshold reached
+ * @vdev: vdev handle
+ *
+ * Return: true if tx desc available reached threshold or false otherwise
+ */
+static inline bool ol_tx_desc_thresh_reached(struct cdp_vdev *vdev)
+{
+	return !(ol_txrx_fwd_desc_thresh_check(vdev));
+}
+
 #else
 /**
  * ol_tx_get_total_free_desc() - get total free descriptors