diff mbox series

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

Message ID 20200827223304.16155-16-thomas@adapt-ip.com
State New
Headers show
Series add initial S1G support | expand

Commit Message

Thomas Pedersen Aug. 27, 2020, 10:32 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(+)
diff mbox series

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index dca01d7e6e3e..424fd9b2aeda 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