Răsfoiți Sursa

qcacld-3.0: revert back ol_rx_add_mpdu_to_list to macro

Changes done to head pointer in ol_rx_add_mpdu_to_list() is not
returned back to caller as arguments are sent as pass by value

Change-Id: Ie8c98af2ea4e03b0678df243aa0c832165494168
CRs-Fixed: 2046362
Manjunathappa Prakash 8 ani în urmă
părinte
comite
4a7b1dc764
1 a modificat fișierele cu 11 adăugiri și 16 ștergeri
  1. 11 16
      core/dp/txrx/ol_rx_pn.c

+ 11 - 16
core/dp/txrx/ol_rx_pn.c

@@ -36,20 +36,15 @@
 #include <ol_rx.h>              /* ol_rx_deliver */
 
 /* add the MSDUs from this MPDU to the list of good frames */
-/* add the MSDUs from this MPDU to the list of good frames */
-static void ol_rx_add_mpdu_to_list(qdf_nbuf_t head,
-				   qdf_nbuf_t tail,
-				   qdf_nbuf_t mpdu,
-				   qdf_nbuf_t mpdu_tail)
-{
-	do {
-		if (!head)
-			head = mpdu;
-		else
-			qdf_nbuf_set_next(tail, mpdu);
-		tail = mpdu_tail;
-	} while (0);
-}
+#define ADD_MPDU_TO_LIST(head, tail, mpdu, mpdu_tail) do {		\
+		if (!head) {						\
+			head = mpdu;					\
+		} else {						\
+			qdf_nbuf_set_next(tail, mpdu);			\
+		}							\
+		tail = mpdu_tail;					\
+	} while (0)
+
 int ol_rx_pn_cmp24(union htt_rx_pn_t *new_pn,
 		   union htt_rx_pn_t *old_pn, int is_unicast, int opmode)
 {
@@ -132,7 +127,7 @@ ol_rx_pn_check_base(struct ol_txrx_vdev_t *vdev,
 
 		/* Don't check the PN replay for non-encrypted frames */
 		if (!htt_rx_mpdu_is_encrypted(pdev->htt_pdev, rx_desc)) {
-			ol_rx_add_mpdu_to_list(out_list_head, out_list_tail,
+			ADD_MPDU_TO_LIST(out_list_head, out_list_tail,
 					       mpdu, mpdu_tail);
 			mpdu = next_mpdu;
 			continue;
@@ -227,7 +222,7 @@ ol_rx_pn_check_base(struct ol_txrx_vdev_t *vdev,
 					msdu = next_msdu;
 			} while (1);
 		} else {
-			ol_rx_add_mpdu_to_list(out_list_head, out_list_tail,
+			ADD_MPDU_TO_LIST(out_list_head, out_list_tail,
 					       mpdu, mpdu_tail);
 			/*
 			 * Remember the new PN.