diff mbox series

[v2,15/22] mac80211: don't calculate duration for S1G

Message ID 20200831205600.21058-16-thomas@adapt-ip.com (mailing list archive)
State Superseded
Delegated to: Johannes Berg
Headers show
Series add support for S1G association | expand

Commit Message

Thomas Pedersen Aug. 31, 2020, 8:55 p.m. UTC
For now just skip the duration calculation for frames
transmitted on the S1G band and avoid a warning.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
---
 net/mac80211/tx.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Johannes Berg Sept. 18, 2020, 10:52 a.m. UTC | #1
On Mon, 2020-08-31 at 13:55 -0700, Thomas Pedersen wrote:
> For now just skip the duration calculation for frames
> transmitted on the S1G band and avoid a warning.
> 
> Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
> ---
>  net/mac80211/tx.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index d2136007e2eb..bef19616c5f0 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -82,6 +82,10 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,
>  
>  	erp = txrate->flags & IEEE80211_RATE_ERP_G;
>  
> +	/* TODO */
> +	if (sband->band == NL80211_BAND_S1GHZ)
> +		return 0;


I'm not even sure I'd leave a TODO there ... just say

	/* device is expected to do this */

or so?

johannes
Johannes Berg Sept. 18, 2020, 10:55 a.m. UTC | #2
Oops, sorry. I just realized I've been replying to v2, while *looking*
at v3 in patchwork ...

I'll continue on v3, but this seems mostly the same.

johannes
Thomas Pedersen Sept. 21, 2020, 6:03 a.m. UTC | #3
On 2020-09-18 03:52, Johannes Berg wrote:
> On Mon, 2020-08-31 at 13:55 -0700, Thomas Pedersen wrote:
>> For now just skip the duration calculation for frames
>> transmitted on the S1G band and avoid a warning.
>> 
>> Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
>> ---
>>  net/mac80211/tx.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>> 
>> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
>> index d2136007e2eb..bef19616c5f0 100644
>> --- a/net/mac80211/tx.c
>> +++ b/net/mac80211/tx.c
>> @@ -82,6 +82,10 @@ static __le16 ieee80211_duration(struct 
>> ieee80211_tx_data *tx,
>> 
>>  	erp = txrate->flags & IEEE80211_RATE_ERP_G;
>> 
>> +	/* TODO */
>> +	if (sband->band == NL80211_BAND_S1GHZ)
>> +		return 0;
> 
> 
> I'm not even sure I'd leave a TODO there ... just say
> 
> 	/* device is expected to do this */

Eventually it would be nice if mac80211 could calculate duration for 
S1G? Do you know why it doesn't for HT/VHT?
Johannes Berg Sept. 21, 2020, 6:51 a.m. UTC | #4
On Sun, 2020-09-20 at 23:03 -0700, Thomas Pedersen wrote:
> 
> > I'm not even sure I'd leave a TODO there ... just say
> > 
> > 	/* device is expected to do this */
> 
> Eventually it would be nice if mac80211 could calculate duration for 
> S1G? Do you know why it doesn't for HT/VHT?

I'm not sure it matters. It almost doesn't even matter for legacy
(CCK/OFDM) because devices practically always do it anyway?

And for HT/VHT it's just quite a bit more complicated, so we never
bothered, since it wasn't necessary.

It couldn't even really be done since there are A-MPDUs and other things
happening at a lower layer.

johannes
diff mbox series

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index d2136007e2eb..bef19616c5f0 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -82,6 +82,10 @@  static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,
 
 	erp = txrate->flags & IEEE80211_RATE_ERP_G;
 
+	/* TODO */
+	if (sband->band == NL80211_BAND_S1GHZ)
+		return 0;
+
 	/*
 	 * data and mgmt (except PS Poll):
 	 * - during CFP: 32768