linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] ath10k: Cleanup calling ath10k_htt_rx_h_unchain
@ 2016-09-27 13:01 Mohammed Shafi Shajakhan
  2016-09-27 13:04 ` Shajakhan, Mohammed Shafi (Mohammed Shafi)
  0 siblings, 1 reply; 2+ messages in thread
From: Mohammed Shafi Shajakhan @ 2016-09-27 13:01 UTC (permalink / raw)
  To: ath10k; +Cc: mohammed, linux-wireless, Mohammed Shafi Shajakhan

From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>

'ath10k_htt_rx_h_unchain' is need to be called only if the return
value from 'ath10k_htt_rx_amsdu_pop' is 1('chained msdu's'), this
change makes it more explicit and avoids doing a skb_peek, fetching
rx descriptor pointer, checking rx msdu decap format for the case of
ret = 0 (unchained msdus). Found this change during code walk through,
not sure if this addresses any issue.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 7ae9349..e51dace 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -1459,8 +1459,7 @@ static int ath10k_unchain_msdu(struct sk_buff_head *amsdu)
 }
 
 static void ath10k_htt_rx_h_unchain(struct ath10k *ar,
-				    struct sk_buff_head *amsdu,
-				    bool chained)
+				    struct sk_buff_head *amsdu)
 {
 	struct sk_buff *first;
 	struct htt_rx_desc *rxd;
@@ -1471,9 +1470,6 @@ static void ath10k_htt_rx_h_unchain(struct ath10k *ar,
 	decap = MS(__le32_to_cpu(rxd->msdu_start.common.info1),
 		   RX_MSDU_START_INFO1_DECAP_FORMAT);
 
-	if (!chained)
-		return;
-
 	/* FIXME: Current unchaining logic can only handle simple case of raw
 	 * msdu chaining. If decapping is other than raw the chaining may be
 	 * more complex and this isn't handled by the current code. Don't even
@@ -1550,7 +1546,11 @@ static int ath10k_htt_rx_handle_amsdu(struct ath10k_htt *htt)
 	}
 
 	ath10k_htt_rx_h_ppdu(ar, &amsdu, rx_status, 0xffff);
-	ath10k_htt_rx_h_unchain(ar, &amsdu, ret > 0);
+
+	/* only for ret = 1 indicates chained msdus */
+	if (ret > 0)
+		ath10k_htt_rx_h_unchain(ar, &amsdu);
+
 	ath10k_htt_rx_h_filter(ar, &amsdu, rx_status);
 	ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status);
 	ath10k_htt_rx_h_deliver(ar, &amsdu, rx_status);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v4] ath10k: Cleanup calling ath10k_htt_rx_h_unchain
  2016-09-27 13:01 [PATCH v4] ath10k: Cleanup calling ath10k_htt_rx_h_unchain Mohammed Shafi Shajakhan
@ 2016-09-27 13:04 ` Shajakhan, Mohammed Shafi (Mohammed Shafi)
  0 siblings, 0 replies; 2+ messages in thread
From: Shajakhan, Mohammed Shafi (Mohammed Shafi) @ 2016-09-27 13:04 UTC (permalink / raw)
  To: ath10k@lists.infradead.org
  Cc: mohammed@codeaurora.org, linux-wireless@vger.kernel.org

apologies please ignore this , wrong patch due to confusing v4 tag=0A=
 =0A=
please review,=0A=
=0A=
[PATCH] ath10k: Cleanup calling ath10k_htt_rx_h_unchain=0A=
=0A=
________________________________________=0A=
From: Shajakhan, Mohammed Shafi (Mohammed Shafi)=0A=
Sent: 27 September 2016 18:31=0A=
To: ath10k@lists.infradead.org=0A=
Cc: mohammed@codeaurora.org; linux-wireless@vger.kernel.org; Shajakhan, Moh=
ammed Shafi (Mohammed Shafi)=0A=
Subject: [PATCH v4] ath10k: Cleanup calling ath10k_htt_rx_h_unchain=0A=
=0A=
From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>=0A=
=0A=
'ath10k_htt_rx_h_unchain' is need to be called only if the return=0A=
value from 'ath10k_htt_rx_amsdu_pop' is 1('chained msdu's'), this=0A=
change makes it more explicit and avoids doing a skb_peek, fetching=0A=
rx descriptor pointer, checking rx msdu decap format for the case of=0A=
ret =3D 0 (unchained msdus). Found this change during code walk through,=0A=
not sure if this addresses any issue.=0A=
=0A=
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>=0A=
---=0A=
 drivers/net/wireless/ath/ath10k/htt_rx.c | 12 ++++++------=0A=
 1 file changed, 6 insertions(+), 6 deletions(-)=0A=
=0A=
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireles=
s/ath/ath10k/htt_rx.c=0A=
index 7ae9349..e51dace 100644=0A=
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c=0A=
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c=0A=
@@ -1459,8 +1459,7 @@ static int ath10k_unchain_msdu(struct sk_buff_head *a=
msdu)=0A=
 }=0A=
=0A=
 static void ath10k_htt_rx_h_unchain(struct ath10k *ar,=0A=
-                                   struct sk_buff_head *amsdu,=0A=
-                                   bool chained)=0A=
+                                   struct sk_buff_head *amsdu)=0A=
 {=0A=
        struct sk_buff *first;=0A=
        struct htt_rx_desc *rxd;=0A=
@@ -1471,9 +1470,6 @@ static void ath10k_htt_rx_h_unchain(struct ath10k *ar=
,=0A=
        decap =3D MS(__le32_to_cpu(rxd->msdu_start.common.info1),=0A=
                   RX_MSDU_START_INFO1_DECAP_FORMAT);=0A=
=0A=
-       if (!chained)=0A=
-               return;=0A=
-=0A=
        /* FIXME: Current unchaining logic can only handle simple case of r=
aw=0A=
         * msdu chaining. If decapping is other than raw the chaining may b=
e=0A=
         * more complex and this isn't handled by the current code. Don't e=
ven=0A=
@@ -1550,7 +1546,11 @@ static int ath10k_htt_rx_handle_amsdu(struct ath10k_=
htt *htt)=0A=
        }=0A=
=0A=
        ath10k_htt_rx_h_ppdu(ar, &amsdu, rx_status, 0xffff);=0A=
-       ath10k_htt_rx_h_unchain(ar, &amsdu, ret > 0);=0A=
+=0A=
+       /* only for ret =3D 1 indicates chained msdus */=0A=
+       if (ret > 0)=0A=
+               ath10k_htt_rx_h_unchain(ar, &amsdu);=0A=
+=0A=
        ath10k_htt_rx_h_filter(ar, &amsdu, rx_status);=0A=
        ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status);=0A=
        ath10k_htt_rx_h_deliver(ar, &amsdu, rx_status);=0A=
--=0A=
1.9.1=0A=
=0A=

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-27 13:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-27 13:01 [PATCH v4] ath10k: Cleanup calling ath10k_htt_rx_h_unchain Mohammed Shafi Shajakhan
2016-09-27 13:04 ` Shajakhan, Mohammed Shafi (Mohammed Shafi)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).