On Tuesday, 16 April 2019 14:33:57 CEST John Crispin wrote: > Add code to parse the iftype element when reading the band info. This is > required to find out about the HE capabilities of an AP. > > Signed-off-by: Shashidhar Lakkavalli <slakkavalli@xxxxxxxxx> > Signed-off-by: John Crispin <john@xxxxxxxxxxx> > --- [...] > +static int phy_info_iftype(struct hostapd_hw_modes *mode, struct nlattr *nl_iftype) > +{ > + struct nlattr *tb_band_iftypes[NL80211_BAND_IFTYPE_ATTR_MAX + 1]; > + struct he_capabilities *he_capab = &mode->he_capab; > + struct nlattr *tb_iftypes[NL80211_IFTYPE_MAX + 1]; > + int len; > + > + nla_parse(tb_band_iftypes, NL80211_BAND_IFTYPE_ATTR_MAX, nla_data(nl_iftype), > + nla_len(nl_iftype), NULL); > + > + if (!tb_band_iftypes[NL80211_BAND_IFTYPE_ATTR_IFTYPES]) > + return NL_STOP; > + > + if (nla_parse_nested(tb_iftypes, NL80211_IFTYPE_MAX, tb_band_iftypes[NL80211_BAND_IFTYPE_ATTR_IFTYPES], NULL)) > + return NL_STOP; > + > + if (!nla_get_flag(tb_iftypes[NL80211_IFTYPE_AP])) > + return NL_OK; This looks wrong - or at least too limited. nl80211 exports this information not only for AP but for all other iftypes. So for all other iftypes than AP (which hostapd+wpa_supplicant supports) the extracted information most likely is incorrect. Seems like we need to extend this. I was first trying to extend get_hw_feature_data to accept a opmode but it turns out that wpa_supplicant doesn't have a concept of opmode for an interface - only for ssid. So we need to change this parsing function to actually get the he_capab for all iftypes and not only for APs. Since the code for the he_capab (just checked 1b90aae9299f0a8618001b38882317787a690485..HEAD) came from you: Do you have patches in the pipeline which modify the he_capab? Because these might also need further adjustments. Kind regards, Sven
Attachment:
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap