diff mbox series

HE: Correctly parse PPE THR present bit

Message ID 20190620143852.15857-1-shay.bar@celeno.com
State Not Applicable
Headers show
Series HE: Correctly parse PPE THR present bit | expand

Commit Message

Shay Bar June 20, 2019, 2:38 p.m. UTC
Use the correct define to check if the "PPE THR present" bit is set in the phy_cap_info.
Because of this bug, the PPE Thresholds field was absent from the HE capabilities IE.
Verified that after this fix, the PPE Thresholds field is present as it should (if the "PPE THR present" bit is set).

Signed-off-by: shay.bar <shay.bar@celeno.com>
---
 src/ap/ieee802_11_he.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.22.0

Comments

Jouni Malinen June 22, 2019, 5:37 p.m. UTC | #1
On Thu, Jun 20, 2019 at 02:38:59PM +0000, Shay Bar wrote:
> Use the correct define to check if the "PPE THR present" bit is set in the phy_cap_info.
> Because of this bug, the PPE Thresholds field was absent from the HE capabilities IE.
> Verified that after this fix, the PPE Thresholds field is present as it should (if the "PPE THR present" bit is set).

There was a bit earlier contribution with the exact same fix, so I'm
applying that instead:
http://patchwork.ozlabs.org/patch/1114908/
diff mbox series

Patch

diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c
index ba22a174a..d3d3c1db3 100644
--- a/src/ap/ieee802_11_he.c
+++ b/src/ap/ieee802_11_he.c
@@ -23,7 +23,7 @@  static u8 ieee80211_he_ppet_size(u8 ppe_thres_hdr, const u8 *phy_cap_info)
 u8 sz = 0, ru;

 if ((phy_cap_info[HE_PHYCAP_PPE_THRESHOLD_PRESENT_IDX] &
-     HE_PHYCAP_PPE_THRESHOLD_PRESENT_IDX) == 0)
+     HE_PHYCAP_PPE_THRESHOLD_PRESENT) == 0)
 return 0;

 ru = (ppe_thres_hdr >> HE_PPE_THRES_RU_INDEX_BITMASK_SHIFT) &