diff mbox series

[28/28] mac80211: Don't wake up from PS for offchannel TX

Message ID 20180831083130.15525-29-luca@coelho.fi (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show
Series cfg80211/mac80211 patches from our internal tree 2018-08-31 | expand

Commit Message

Luca Coelho Aug. 31, 2018, 8:31 a.m. UTC
)

From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

Otherwise the offchannel frame might be queued due to
IEEE80211_QUEUE_STOP_REASON_PS and later dropped (in
ieee80211_tx_frags()).  Anyway, it doesn't make much sense to wake up
the device during ROC.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 net/mac80211/tx.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Peter Oh Aug. 31, 2018, 6:21 p.m. UTC | #1
On 08/31/2018 01:31 AM, Luca Coelho wrote:
> )
>
> From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
>
> Otherwise the offchannel frame might be queued due to
> IEEE80211_QUEUE_STOP_REASON_PS and later dropped (in
> ieee80211_tx_frags()).  Anyway, it doesn't make much sense to wake up
> the device during ROC.
>
> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
>
Please write a cover letter that explains what this patch series is 
trying to do.
28 patches are too many to catch the purpose at once.

Thanks,
Peter
Luca Coelho Aug. 31, 2018, 7:02 p.m. UTC | #2
On Fri, 2018-08-31 at 11:21 -0700, Peter Oh wrote:
> 
> On 08/31/2018 01:31 AM, Luca Coelho wrote:
> > )
> > 
> > From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
> > 
> > Otherwise the offchannel frame might be queued due to
> > IEEE80211_QUEUE_STOP_REASON_PS and later dropped (in
> > ieee80211_tx_frags()).  Anyway, it doesn't make much sense to wake
> > up
> > the device during ROC.
> > 
> > Signed-off-by: Andrei Otcheretianski <
> > andrei.otcheretianski@intel.com>
> > Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> > 
> 
> Please write a cover letter that explains what this patch series is 
> trying to do.
> 28 patches are too many to catch the purpose at once.

There's no single thing we are trying to do.  This is from internal
development and I publish them for the mainline.   This is how we have
been working.  I just put them all together for easier tracking, you
can consider every patch as if they were sent out individually.


--
Cheers,
Luca.
diff mbox series

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4efed4ac16eb..4d224a0b7746 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -214,6 +214,7 @@  ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx)
 {
 	struct ieee80211_local *local = tx->local;
 	struct ieee80211_if_managed *ifmgd;
+	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
 
 	/* driver doesn't support power save */
 	if (!ieee80211_hw_check(&local->hw, SUPPORTS_PS))
@@ -242,6 +243,9 @@  ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx)
 	if (tx->sdata->vif.type != NL80211_IFTYPE_STATION)
 		return TX_CONTINUE;
 
+	if (unlikely(info->flags & IEEE80211_TX_INTFL_OFFCHAN_TX_OK))
+		return TX_CONTINUE;
+
 	ifmgd = &tx->sdata->u.mgd;
 
 	/*