On Wed, 2019-06-12 at 21:35 +0200, Sven Eckelmann wrote:
>
> +u8 ieee80211_ie_len_he_cap(struct ieee80211_sub_if_data *sdata)
> +{
> + const struct ieee80211_sta_he_cap *he_cap;
> + struct ieee80211_supported_band *sband;
> + u8 ie_len;
> + u8 n;
> +
> + sband = ieee80211_get_sband(sdata);
> + if (!sband)
> + return 0;
> +
> + he_cap = ieee80211_get_he_mesh_cap(sband);
> + if (!he_cap)
> + return 0;
> +
> + n = ieee80211_he_mcs_nss_size(&he_cap->he_cap_elem);
> + ie_len = 2 + 1 +
> + sizeof(he_cap->he_cap_elem) + n +
> + ieee80211_he_ppe_size(he_cap->ppe_thres[0],
> + he_cap->he_cap_elem.phy_cap_info);
> +
> + return ie_len;
There's no value in the "ie_len" variable here.
johannes