Browse Source

qca-wifi: Modified return type not to break existing feature handling

At present, there is not check while calling multipass processing
and hence no packet gets dropped.
Adding check will drop packet in case of returning return type as
false. Hence modified return type as true so that no packet gets
dropped and existing flow doesn't break.

Change-Id: I49089f155b1b78adb533ca23f3b0f3cad9543135
CRs-Fixed: 2599782
Ankit Kumar 5 năm trước cách đây
mục cha
commit
38e0f2b90b
1 tập tin đã thay đổi với 9 bổ sung4 xóa
  1. 9 4
      dp/wifi3.0/dp_txrx_wds.c

+ 9 - 4
dp/wifi3.0/dp_txrx_wds.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2020 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
@@ -596,7 +596,12 @@ bool dp_tx_multipass_process(struct dp_soc *soc, struct dp_vdev *vdev,
  * @nbuf: skb
  * @tid: traffic priority
  *
- * Return: bool: true if tag is inserted else false
+ * Return: bool: true in case of success else false
+ * Success is considered if:
+ *  i. If frame doesn't come from special peer and do not need multipass processing.
+ *  ii. Successfully processed multipass processing.
+ * Failure is considered if:
+ *  i. If frame needs to be dropped.
  */
 bool dp_rx_multipass_process(struct dp_peer *peer, qdf_nbuf_t nbuf, uint8_t tid)
 {
@@ -604,10 +609,10 @@ bool dp_rx_multipass_process(struct dp_peer *peer, qdf_nbuf_t nbuf, uint8_t tid)
 	struct vlan_ethhdr vethhdr;
 
 	if (qdf_unlikely(!peer->vlan_id))
-	       return false;
+	       return true;
 
 	if (qdf_unlikely(qdf_nbuf_headroom(nbuf) < ETHERTYPE_VLAN_LEN))
-		return false;
+		return true;
 
 	/*
 	 * Form the VLAN header and insert in nbuf