Re: [PATCH wireless-next 17/35] wifi: mm81x: add mmrc.h

From: Johannes Berg

Date: Fri Mar 06 2026 - 04:09:40 EST


On Fri, 2026-02-27 at 15:10 +1100, Lachlan Hodges wrote:
>
> +#define BIT_COUNT(_x) (hweight_long(_x))

Is that really worth having?

> +/* Used to spehify supported features when initialising a STA */
> +#define MMRC_MASK(x) (1u << (x))

typo, but is that even better than BIT()?

> +struct mmrc_sta_capabilities {
> + u8 max_rates : 3;
> + u8 max_retries : 3;
> + u8 bandwidth : 5;
> + u8 spatial_streams : 4;
> + u16 rates : 11;
> + u8 guard : 2;
> + u8 sta_flags : 4;
> + u8 sgi_per_bw : 5;

I think this packs better if you use a bigger type?

johannes