Re: [PATCH 1/5] nl80211: add HW capabilities parsing support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 14/06/2019 14:10, Sven Eckelmann wrote:
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.

Hi Sven,

no further patches in the pipeline for this feature from me. Feel free to fix/extend the feature

    John


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux