Message ID | 20231006131327.16806-6-pkshih@realtek.com |
---|---|
State | Superseded |
Headers | show |
Series | wifi: rtw89: handle EHT rate | expand |
On Fri, 2023-10-06 at 21:13 +0800, Ping-Ke Shih wrote: > https://www.radiotap.org/fields/U-SIG.html defines bandwidth field but > no enumerators there, so reference to the values defined by wireshark [1]. > > [1] https://github.com/wireshark/wireshark/blob/master/epan/dissectors/packet-ieee80211-radiotap.c#L2466 > Well. The entries here should be coming from the spec, see Table 36-28 "U-SIG field of an EHT MU PPDU" in 802.11be (D3.0) (or 36-31, it's the same since it's U-SIG-1 common part). So maybe we should define them in ieee80211.h? But at the very least I think the patch description (and perhaps comments in the code) should reference that, rather than wireshark sources :) johannes
On Mon, 2023-10-09 at 17:48 +0200, Johannes Berg wrote: > > On Fri, 2023-10-06 at 21:13 +0800, Ping-Ke Shih wrote: > > https://www.radiotap.org/fields/U-SIG.html defines bandwidth field but > > no enumerators there, so reference to the values defined by wireshark [1]. > > > > [1] > > https://github.com/wireshark/wireshark/blob/master/epan/dissectors/packet-ieee80211-radiotap.c#L2466 > > > > Well. The entries here should be coming from the spec, see Table 36-28 > "U-SIG field of an EHT MU PPDU" in 802.11be (D3.0) (or 36-31, it's the > same since it's U-SIG-1 common part). > > So maybe we should define them in ieee80211.h? > > But at the very least I think the patch description (and perhaps > comments in the code) should reference that, rather than wireshark > sources :) > Thanks. That should be from 802.11be definitely, and I feel these entries in drivers are only used by radiotap (mostly hardware should handle that field), so I decide to keep them in ieee80211_radiotap.h, and only modify commit message. Ping-Ke
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index 2338f8d2a8b3..925bac726a92 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h @@ -539,6 +539,12 @@ enum ieee80211_radiotap_eht_usig_common { IEEE80211_RADIOTAP_EHT_USIG_COMMON_VALIDATE_BITS_OK = 0x00000080, IEEE80211_RADIOTAP_EHT_USIG_COMMON_PHY_VER = 0x00007000, IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW = 0x00038000, + IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_20MHZ = 0, + IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_40MHZ = 1, + IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_80MHZ = 2, + IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_160MHZ = 3, + IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_320MHZ_1 = 4, + IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_320MHZ_2 = 5, IEEE80211_RADIOTAP_EHT_USIG_COMMON_UL_DL = 0x00040000, IEEE80211_RADIOTAP_EHT_USIG_COMMON_BSS_COLOR = 0x01f80000, IEEE80211_RADIOTAP_EHT_USIG_COMMON_TXOP = 0xfe000000,
https://www.radiotap.org/fields/U-SIG.html defines bandwidth field but no enumerators there, so reference to the values defined by wireshark [1]. [1] https://github.com/wireshark/wireshark/blob/master/epan/dissectors/packet-ieee80211-radiotap.c#L2466 Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> --- include/net/ieee80211_radiotap.h | 6 ++++++ 1 file changed, 6 insertions(+)