All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: <yhchuang@realtek.com>
Cc: <kvalo@codeaurora.org>, <linux-wireless@vger.kernel.org>,
	<pkshih@realtek.com>
Subject: Re: [PATCH v2 3/8] rtw88: 8723d: Add set_channel
Date: Mon, 27 Apr 2020 08:42:41 +0300	[thread overview]
Message-ID: <87sggpiiwe.fsf@tynnyri.adurom.net> (raw)
In-Reply-To: <20200423123022.10176-4-yhchuang@realtek.com> (yhchuang's message of "Thu, 23 Apr 2020 20:30:17 +0800")

<yhchuang@realtek.com> writes:

> From: Ping-Ke Shih <pkshih@realtek.com>
>
> Set MAC/BB/RF register according to specified channel. The function
> rtw_set_channel_mac() is used to set MAC registers, but 8723D only need
> some of them.
>
> For channel 14, we need to set different CCK DFIR values, so restore the
> values when channel 1 to 13 is selected.
>
> Spur calibration is needed in channel 13 and 14, and we do notch if spur
> is over threshold.
>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>

[...]

> --- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
> @@ -287,6 +287,190 @@ static void rtw8723d_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
>  	rtw_rx_fill_rx_status(rtwdev, pkt_stat, hdr, rx_status, phy_status);
>  }
>  
> +static
> +bool rtw8723d_check_spur_ov_thres(struct rtw_dev *rtwdev, u8 channel, u32 thres)
> +{
> +#define DIS_3WIRE	0xccf000c0
> +#define EN_3WIRE	0xccc000c0
> +#define START_PSD	0x400000
> +#define FREQ_CH13	0xFCCD
> +#define FREQ_CH14	0xFF9A

Why this style of adding defines within a function? You use it in
multiple functions in this patch.

The normal upstream style is to have these kind of values defined in a
.h file somewhere.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2020-04-27  5:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 12:30 [PATCH v2 0/8] rtw88: 8723d: add BB related routines yhchuang
2020-04-23 12:30 ` [PATCH v2 1/8] rtw88: 8723d: Add DIG parameter yhchuang
2020-04-23 12:30 ` [PATCH v2 2/8] rtw88: 8723d: Add query_rx_desc yhchuang
2020-04-23 12:30 ` [PATCH v2 3/8] rtw88: 8723d: Add set_channel yhchuang
2020-04-27  5:42   ` Kalle Valo [this message]
2020-04-29  7:13     ` Tony Chuang
2020-04-23 12:30 ` [PATCH v2 4/8] rtw88: handle C2H_CCX_TX_RPT to know if packet TX'ed successfully yhchuang
2020-04-23 12:30 ` [PATCH v2 5/8] rtw88: 8723d: 11N chips don't support LDPC yhchuang
2020-04-23 12:30 ` [PATCH v2 6/8] rtw88: 8723d: Add chip_ops::false_alarm_statistics yhchuang
2020-04-23 12:30 ` [PATCH v2 7/8] rtw88: 8723d: Set IG register for CCK rate yhchuang
2020-04-23 12:30 ` [PATCH v2 8/8] rtw88: 8723d: add interface configurations table yhchuang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sggpiiwe.fsf@tynnyri.adurom.net \
    --to=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=yhchuang@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.