Re: [PATCH wireless-next v2 03/11] wifi: brcmsmac: look up OFDM rates in rate.c

From: Arend van Spriel

Date: Thu Dec 03 2026 - 04:15:17 EST


On Fri, 27 Nov 2026 14:11:33 +0800, Ragul Balaji <ragulbaby@xxxxxxxxx> wrote:
> Move the OFDM rate table next to its only user, ofdm_phy2mac_rate(),
> which leaves rate.c independent of the PHY code. No functional change.
>
> Signed-off-by: Ragul Balaji <ragulbaby@xxxxxxxxx>
> Signed-off-by: Ho Jie Feng <hjf3108@xxxxxxxxx>
> ---
> .../broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 17 -----------------
> .../broadcom/brcm80211/brcmsmac/phy/phy_hal.h | 2 --
> .../broadcom/brcm80211/brcmsmac/rate.c | 19 +++++++++++++++++++
> .../broadcom/brcm80211/brcmsmac/rate.h | 7 -------
> 4 files changed, 19 insertions(+), 26 deletions(-)

[...]

> @@ -266,6 +266,25 @@ const struct brcms_c_rateset cck_rates = {
> 0x00, 0x00, 0x00, 0x00, 0x00}
> };
>
> +static const u8 ofdm_rate_lookup[] = {
> +
> + BRCM_RATE_48M,
> + BRCM_RATE_24M,
> + BRCM_RATE_12M,
> + BRCM_RATE_6M,
> + BRCM_RATE_54M,
> + BRCM_RATE_36M,
> + BRCM_RATE_18M,
> + BRCM_RATE_9M
> +};
> +
> +/* Convert encoded rate value in plcp header to numerical rates in 500 KHz
> + * increments */
> +static inline u8 ofdm_phy2mac_rate(u8 rlpt)
> +{
> + return ofdm_rate_lookup[rlpt & 0x7];
> +}
> +
> /* check if rateset is valid.
> * if check_brate is true, rateset without a basic rate is considered NOT valid.
> */

Now that this helper lives in a C file, please drop the explicit
inline and let the compiler decide. This resolves the reported
wifibot source_inline failure.

When fixed you may add my acknowledgement in v3.

Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>

Regards,
Arend