On Mon, 2024-09-30 at 11:11 -0700, Dylan Eskew wrote: > Prevent needing to reparse the ie buffer by passing > the ieee80211_elems struct containing the alias ie > pointers. > I think I see why you'd want the previous and this patch, and it's OK for certain elements (such as the VHT capability or HE capability where you'd need it), but in general it can't work this way. We could either make the parsing even more generic to be able to deal with elements occurring multiple times, or, perhaps more plausibly, have a context with only what we need (VHT capability seen here, HE capability for EHT, ...) filled by a pre-parsing step, and then pass that context around. In practice for HE/EHT we could also just pass a context around and say it's an error if e.g. the EHT capabilities element is in the list _before_ the HE capabilities element, since by spec that's not supposed to happen. So we could just have the HE capabilities parsing fill the context with the necessary information about HE (and set a validity flag) and then check that it was already found when we get to EHT later. However, that doesn't work for the case with capabilities/VHT ... where the parsing of the capabilities element is actually referencing the VHT element _later_ in the frame. johannes