linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mac80211: Invoke TX LED in more code paths
@ 2017-05-27 21:59 Bjorn Andersson
  2017-05-30  7:18 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Andersson @ 2017-05-27 21:59 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg, David S. Miller
  Cc: open list:MAC80211, open list:NETWORKING [GENERAL],
	open list, linux-arm-msm

ieee80211_tx_status() is only one of the possible ways a driver can
report a handled packet, some drivers call this for every packet while
others calls it rarely or never.

In order to invoke the TX LED in the non-status reporting cases this
patch pushes the call to ieee80211_led_tx() into
ieee80211_report_used_skb(), which is shared between the various code
paths.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 net/mac80211/status.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index be47ac5cd8c8..a9fa6ee57e8f 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -546,6 +546,8 @@ static void ieee80211_report_used_skb(struct ieee80211_local *local,
 		skb->wifi_acked_valid = 1;
 		skb->wifi_acked = acked;
 	}
+
+	ieee80211_led_tx(local);
 }
 
 /*
@@ -823,8 +825,6 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw,
 		}
 	}
 
-	ieee80211_led_tx(local);
-
 	/* SNMP counters
 	 * Fragments are passed to low-level drivers as separate skbs, so these
 	 * are actually fragments, not frames. Update frame counters only for
-- 
2.12.0

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

* Re: [PATCH v2] mac80211: Invoke TX LED in more code paths
  2017-05-27 21:59 [PATCH v2] mac80211: Invoke TX LED in more code paths Bjorn Andersson
@ 2017-05-30  7:18 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2017-05-30  7:18 UTC (permalink / raw)
  To: Bjorn Andersson, Kalle Valo, David S. Miller
  Cc: open list:MAC80211, open list:NETWORKING [GENERAL],
	open list, linux-arm-msm

On Sat, 2017-05-27 at 14:59 -0700, Bjorn Andersson wrote:
> ieee80211_tx_status() is only one of the possible ways a driver can
> report a handled packet, some drivers call this for every packet
> while
> others calls it rarely or never.
> 
> In order to invoke the TX LED in the non-status reporting cases this
> patch pushes the call to ieee80211_led_tx() into
> ieee80211_report_used_skb(), which is shared between the various code
> paths.

Applied.

johannes

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

end of thread, other threads:[~2017-05-30  7:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-27 21:59 [PATCH v2] mac80211: Invoke TX LED in more code paths Bjorn Andersson
2017-05-30  7:18 ` Johannes Berg

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).