Please ignore this one ... I'll send the right P2P fix. Ilan. > -----Original Message----- > From: Peer, Ilan <ilan.peer@xxxxxxxxx> > Sent: Tuesday, May 10, 2022 16:38 > To: hostap@xxxxxxxxxxxxxxxxxxx > Cc: Peer, Ilan <ilan.peer@xxxxxxxxx> > Subject: [PATCH] [BUGFIX] EHT: Relax the EHT MCS/NSS length checking > > In practice if HE_PHYCAP_CHANNEL_WIDTH_SET_40MHZ_IN_2G is set then > we can stop the MCS/NSS length calculation, but continue parsing to also > handle cases that stations accidentally set it also on 5GHz or 6GHz band. > > type=bugfix > ticket=jira:WIFI-131519 > fixes=I4dfaad7e9f971acd9397a5460b95faa751269a6d > > Change-Id: I969cab55d670415564d6c6c3a253d3ce466cd136 > Signed-off-by: Ilan Peer <ilan.peer@xxxxxxxxx> > --- > src/ap/ieee802_11_eht.c | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c index > 32660e2d92..df26980a42 100644 > --- a/src/ap/ieee802_11_eht.c > +++ b/src/ap/ieee802_11_eht.c > @@ -56,13 +56,15 @@ static u8 ieee80211_eht_mcs_size(u8 he_phy_cap0, > u8 eht_phy_cap0, u8 *mcs_set) { > u8 count = 0, mcs = 0; > > - if (he_phy_cap0 & > HE_PHYCAP_CHANNEL_WIDTH_SET_40MHZ_IN_2G) { > - count = 3; > - mcs |= BIT(1); > - goto out; > - } > - > - if (he_phy_cap0 & > HE_PHYCAP_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G) { > + /* > + * In practice if HE_PHYCAP_CHANNEL_WIDTH_SET_40MHZ_IN_2G is > set then we > + * can stop the MCS/NSS length calculation, but continue parsing to > also > + * handle the cases that a station accidentally set it also on 5GHz or > + * 6GHz band. > + */ > + if (he_phy_cap0 & > + (HE_PHYCAP_CHANNEL_WIDTH_SET_40MHZ_IN_2G | > + HE_PHYCAP_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G)) { > mcs |= BIT(1); > count += 3; > } > @@ -82,7 +84,6 @@ static u8 ieee80211_eht_mcs_size(u8 he_phy_cap0, u8 > eht_phy_cap0, u8 *mcs_set) > mcs = BIT(0); > } > > -out: > if (mcs_set) > *mcs_set = mcs; > > -- > 2.25.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap