Re: [PATCH v2 12/22] mac80211: convert S1G beacon to scan results

Johannes Berg
2020-09-18T10:48:45Z

On Mon, 2020-08-31 at 13:55 -0700, Thomas Pedersen wrote:

>
> + if (!elems->parse_error && elems->s1g_capab)
> + bss->s1g = true;

It seems odd to set this only if it's in error - why not always set it
if the band is right?

In fact, why set it at all, since you always know the band?

> + case WLAN_EID_S1G_CAPABILITIES:
> + if (elen == 15)
> + elems->s1g_capab = (void *)pos;
> + else
> + elem_parse_failed = true;
> + break;
> + case WLAN_EID_S1G_OPERATION:
> + if (elen == 6)
> + elems->s1g_oper = (void *)pos;
> + else
> + elem_parse_failed = true;
> + break;
> + case WLAN_EID_S1G_SHORT_BCN_INTERVAL:
> + if (elen == 2)
> + elems->s1g_tsbtt = (void *)pos;
> + else
> + elem_parse_failed = true;
> + break;

Seems like you ought to have some structs/sizeof or defines for the
sizes?

johannes