Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add capability detection for VHT and HE Beamformee STS #121

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions CAPABILITY_LOGIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ values to determine client capabilities.
- MCS 0-9 if pairs are set to '11'
- c. inspect octet 1 (one of the four vht capability octets)
- if bit zero set to '1', client is SU Beam-formee capable
- d. inspect octet 2 (one of the four vht capability octets)
- d. inspect octect 1 (one of the four vht capability octets)
- add bit 5, 6, 7 to determine VHT Beamformee STS
- e. inspect octet 2 (one of the four vht capability octets)
- if bit zero set to '1', client is MU Beam-formee capable
- e. inspect octet 0 (one of the four vht capability octets)
- f. inspect octet 0 (one of the four vht capability octets)
- if bit zero set to '1', client supports VHT 160 MHz

3. 802.11k: inspect tagged parameter 70 (RM Enabled Capabilities) - RM = radio management
Expand Down Expand Up @@ -91,6 +93,14 @@ values to determine client capabilities.
- h. Buffer Status Report (BSR) support: B19 of HE PHY Capabilities
- Y - supported
- N - not supported
- i. HE SU Beamformer: Bit 31 of HE PHY Capabilities
- 1 - supported
- 0 - not supported
- j. HE SU Beamformee: Bit 32 of HE PHY Capabilities
- 1 - supported
- 0 - not supported
- k. HE Beamformee STS: Bits 36-34 of HE PHY Capabilities
- Add Bits 36-34 to determine HE Beamformee STS

10. 802.11ax spatial reuse: inspect spatial reuse tag number 39 (Spatial Reuse Parameter Set)
- a. is Spatial Reuse Parameter Set tagged parameter present?
Expand Down
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Unreleased (1.0.16)

- Chipset lookup via heuristics
- VHT Beamformee STS Capability
- HE Beamformee STS Capability

Release 1.0.15

Expand Down
2 changes: 2 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
wlanpi-profiler (1.0.16-dev.1) UNRELEASED; urgency=medium

* Chipset lookup via heuristics
* VHT Beamformee STS Capability
* HE Beamformee STS Capability

-- Josh Schmelzle <[email protected]> Sat, 22 Oct 2022 10:12:11 -0400

Expand Down
29 changes: 29 additions & 0 deletions profiler/profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ def analyze_vht_capabilities_ie(dot11_elt_dict) -> List:
dot11ac_mcs = Capability(db_key="dot11ac_mcs", db_value="")
dot11ac_su_bf = Capability(db_key="dot11ac_su_bf", db_value=0)
dot11ac_mu_bf = Capability(db_key="dot11ac_mu_bf", db_value=0)
dot11ac_bf_sts = Capability(db_key="dot11ac_bf_sts", db_value=0)
dot11ac_160_mhz = Capability(db_key="dot11ac_160_mhz", db_value=0)

if VHT_CAPABILITIES_IE_TAG in dot11_elt_dict.keys():
Expand Down Expand Up @@ -638,6 +639,7 @@ def analyze_vht_capabilities_ie(dot11_elt_dict) -> List:
# check for SU & MU beam formee support
mu_octet = dot11_elt_dict[VHT_CAPABILITIES_IE_TAG][2]
su_octet = dot11_elt_dict[VHT_CAPABILITIES_IE_TAG][1]
bf_sts_octet = dot11_elt_dict[VHT_CAPABILITIES_IE_TAG][1]
onesixty = dot11_elt_dict[VHT_CAPABILITIES_IE_TAG][0]

# 160 MHz
Expand All @@ -664,13 +666,24 @@ def analyze_vht_capabilities_ie(dot11_elt_dict) -> List:
else:
dot11ac.value += ", [ ] MU BF"

# BF STS
vht_bf_sts_binary_string = "{0}{1}{2}".format(
int(get_bit(bf_sts_octet, 5)),
int(get_bit(bf_sts_octet, 6)),
int(get_bit(bf_sts_octet, 7)),
)
vht_bf_sts_value = int(vht_bf_sts_binary_string, base=2)
dot11ac_bf_sts.db_value = vht_bf_sts_value
dot11ac.value += f", Beamformee STS={vht_bf_sts_value}"

return [
dot11ac,
dot11ac_nss,
dot11ac_160_mhz,
dot11ac_mcs,
dot11ac_su_bf,
dot11ac_mu_bf,
dot11ac_bf_sts,
]

@staticmethod
Expand Down Expand Up @@ -902,6 +915,9 @@ def analyze_extension_ies(dot11_elt_dict, he_disabled: bool) -> List:
dot11ax_he_su_beamformee = Capability(
db_key="dot11ax_he_su_beamformee", db_value=0
)
dot11ax_he_beamformee_sts = Capability(
db_key="dot11ax_he_beamformee_sts", db_value=0
)
dot11ax_nss = Capability(db_key="dot11ax_nss", db_value=0)
dot11ax_mcs = Capability(db_key="dot11ax_mcs", db_value="")
dot11ax_twt = Capability(db_key="dot11ax_twt", db_value=0)
Expand Down Expand Up @@ -1019,6 +1035,18 @@ def analyze_extension_ies(dot11_elt_dict, he_disabled: bool) -> List:
dot11ax_he_su_beamformee.db_value = 0
dot11ax.value += ", [ ] SU Beamformee"

# BF STS
he_bf_sts_octet = element_data[11]

he_bf_sts_binary_string = "{0}{1}{2}".format(
int(get_bit(he_bf_sts_octet, 2)),
int(get_bit(he_bf_sts_octet, 3)),
int(get_bit(he_bf_sts_octet, 4)),
)
he_bf_sts_value = int(he_bf_sts_binary_string, base=2)
dot11ax_he_beamformee_sts.db_value = he_bf_sts_value
dot11ax.value += f", Beamformee STS={he_bf_sts_value}"

he_er_su_ppdu_octet = element_data[15]
he_er_su_ppdu_octet_binary_string = ""
for bit_position in range(8):
Expand Down Expand Up @@ -1091,6 +1119,7 @@ def analyze_extension_ies(dot11_elt_dict, he_disabled: bool) -> List:
dot11ax_punctured_preamble,
dot11ax_he_su_beamformer,
dot11ax_he_su_beamformee,
dot11ax_he_beamformee_sts,
dot11ax_he_er_su_ppdu,
dot11ax_six_ghz,
dot11ax_160_mhz,
Expand Down