Re: [PATCH 2/5] brcmfmac: Use common CORDIC_FLOAT macro from lib

From: Arend van Spriel
Date: Mon Nov 05 2018 - 04:13:56 EST


On 11/5/2018 10:05 AM, Kalle Valo wrote:
Priit Laes <plaes@xxxxxxxxx> writes:

Now that cordic library has the CORDIC_FLOAT macro, use that

Signed-off-by: Priit Laes <plaes@xxxxxxxxx>
---
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 4 ++--
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c | 4 ++--

The driver is "brcmsmac" (note the 's', not 'f'), you should fix the
title accordingly.

--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
@@ -3447,8 +3447,8 @@ wlc_lcnphy_start_tx_tone(struct brcms_phy *pi, s32 f_kHz, u16 max_val,

theta += rot;

- i_samp = (u16) (FLOAT(tone_samp.i * max_val) & 0x3ff);
- q_samp = (u16) (FLOAT(tone_samp.q * max_val) & 0x3ff);
+ i_samp = (u16)(CORDIC_FLOAT(tone_samp.i * max_val) & 0x3ff);
+ q_samp = (u16)(CORDIC_FLOAT(tone_samp.q * max_val) & 0x3ff);

I haven't seen the patch 1 yet, but just from seeing this patch I don't
get what's the benefit.

The FLOAT macro was defined in brcmsmac (see patch 3). It is now moved to the cordic library simply because it is more closely related to that.

Regards,
Arend