All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Chuang <yhchuang@realtek.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Pkshih <pkshih@realtek.com>
Subject: RE: [PATCH v2 3/8] rtw88: 8723d: Add set_channel
Date: Wed, 29 Apr 2020 07:13:21 +0000	[thread overview]
Message-ID: <1238dd4f76f04646b0321de9ff1ef4e1@realtek.com> (raw)
In-Reply-To: <87sggpiiwe.fsf@tynnyri.adurom.net>

Kalle Valo <kvalo@codeaurora.org> writes:

> <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.
> 

Thought they are used just for the function, but yes, should put them
into rtw8723d.h or something like that :)

Yen-Hsuan

  reply	other threads:[~2020-04-29  7:13 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
2020-04-29  7:13     ` Tony Chuang [this message]
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=1238dd4f76f04646b0321de9ff1ef4e1@realtek.com \
    --to=yhchuang@realtek.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@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.