Re: Proposed new channel flag (100kHz)
Johannes Berg <[email protected]> Mon, 26 May 2025 08:54:39 +0200
| Newsgroups | org.netbsd.radiotap |
|---|---|
| Message-ID | <[email protected]> |
Hi! > I would like to propose a new flag for the channel field to allow the > reporting of the frequency in units of 100kHz. >=20 > A flag mask of 0x1000 would mean that the frequency is communicated in > units of 100kHz instead of the current MHz. >=20 > This is important for S1G as the center frequency can be at a 500kHz > offset. For example in IEEE 80211ah channel 1 in the US the center > frequency of 903.5 MHz. This is currently impossible to represent in a > radiotap header. With this new flag the data could instead be > represented as 9035 100kHz. Units of 100kHz were selected as it > provides the accuracy required while not overflowing a u16. >=20 > Please let me know your thoughts on this. That seems questionable? Adding channel flags that will affect the interpretation of existing values is just going to cause a mess where everyone working with this has to identify whether or not they have updated software etc.? Seems a bit messy. We did add some flags with S1G before it seems: https://www.radiotap.org/fields/Channel.html However, I'll note that they're informational, i.e. they didn't really change the interpretation of the value. Not sure why it was even done, we probably should've just phased out the use of those flags instead. Now, it seems perhaps the most natural place to put the frequency could've been the S1G field: https://www.radiotap.org/fields/S1G.html Apparently we didn't? I have no idea why we wouldn't have ... But the good thing is that the S1G field was defined to be generated as a TLV, so where that's done we can simply add a u16 with the 100kHz frequency to it, such as this: diff --git a/fields/S1G.md b/fields/S1G.md index 922c6e54c7dd..bf8cc1325974 100644 --- a/fields/S1G.md +++ b/fields/S1G.md @@ -8,6 +8,7 @@ TLV Type Number =20 Structure : u16 known, u16 data1, u16 data2 +: _u16 frequency [optional]_ =20 Required Alignment : 2 @@ -30,7 +31,8 @@ Wireshark etc. | **`0x0020`** | MCS known | | **`0x0040`** | Color known | | **`0x0080`** | uplink indication known | -| **`0xFF00`** | Reserved | +| **`0x0800`** | frequency field present | +| **`0xFE00`** | Reserved | =20 ## data1 =20 @@ -48,3 +50,9 @@ Wireshark etc. | **`0x0008`** | Uplink indication | | **`0x00F0`** | Reserved | | **`0xFF00`** | RSSI | + +## frequency + +This value can only be present if the S1G field is used as a TLV. In this = case +the `frequency field present` bit shall be set, and this 16-bit value cont= ains +the frequency in units of 100 kHz. So that's a counter-proposal of sorts I guess, what do you think of that? :) johannes