Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Philipp Borgers <borgers@mi.fu-berlin.de>
Cc: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag
Date: Wed, 19 May 2021 12:48:07 +0200	[thread overview]
Message-ID: <7e00e8dbf43f5bf19ddcaf037653e8a41c9d4fc3.camel@sipsolutions.net> (raw)
In-Reply-To: <YKTsxD+E6MnFzQ5C@mi.fu-berlin.de>

On Wed, 2021-05-19 at 12:47 +0200, Philipp Borgers wrote:
> On Tue, May 18, 2021 at 01:19:46PM +0200, Johannes Berg wrote:
> > On Tue, 2021-05-18 at 13:17 +0200, Felix Fietkau wrote:
> > > 
> > > Frames with IEEE80211_TX_CTL_HW_80211_ENCAP set have no 802.11 header,
> > > so please change the check something like this:
> > > 
> > > 	if ((info->flags & IEEE80211_TX_CTL_NO_ACK) &&
> > > 	    ((info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) ||
> > > 	     ieee80211_is_data(hdr->frame_control)))
> > 
> > Maybe we should consider some kind of inline helper?
> > 
> > static inline bool ieee80211_is_tx_data(struct sk_buff *skb)
> > {
> > 	... *info = ...
> > 	... *hdr = (void *)skb->data;
> > 
> > 	return (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) ||
> >                ieee80211_is_data(hdr->frame_control);
> > }
> 
> A frame with IEEE80211_TX_CTL_HW_80211_ENCAP set is always a data frame?

Yes, other frames can't be HW-encap'ed, nor would it make sense to
offload that.

> Should I put the definition of the function into include/net/mac80211.h?
> 
Seems reasonable, yeah.

johannes



      reply	other threads:[~2021-05-19 10:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 11:07 [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag Philipp Borgers
2021-05-18 11:07 ` [PATCH 2/2] mac80211: refactor rc_no_data_or_no_ack_use_min function Philipp Borgers
2021-05-18 17:37   ` Kalle Valo
2021-05-18 11:17 ` [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag Felix Fietkau
2021-05-18 11:19   ` Johannes Berg
2021-05-18 11:30     ` Felix Fietkau
2021-05-19 10:47     ` Philipp Borgers
2021-05-19 10:48       ` Johannes Berg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e00e8dbf43f5bf19ddcaf037653e8a41c9d4fc3.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=borgers@mi.fu-berlin.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox