linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Chuang <yhchuang@realtek.com>
To: Brian Norris <briannorris@chromium.org>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH v2 1/6] rtw88: use macro to check the current band
Date: Thu, 7 Nov 2019 03:35:20 +0000	[thread overview]
Message-ID: <F7CD281DE3E379468C6D07993EA72F84D191E2D2@RTITMBSVM04.realtek.com.tw> (raw)
In-Reply-To: <CA+ASDXMg5hKuXUxsdAuig0_t0TNJL10ZcaZ-iQ79tVKPNjzMXg@mail.gmail.com>

> Subject: Re: [PATCH v2 1/6] rtw88: use macro to check the current band
> 
> A little late on this...
> 
> On Wed, Oct 16, 2019 at 7:39 PM Tony Chuang <yhchuang@realtek.com>
> wrote:
> > From: Brian Norris
> > > On Wed, Oct 16, 2019 at 5:33 AM <yhchuang@realtek.com> wrote:
> > > > index 4759d6a0ca6e..492a2bfc0d5a 100644
> > > > --- a/drivers/net/wireless/realtek/rtw88/main.h
> > > > +++ b/drivers/net/wireless/realtek/rtw88/main.h
> > > > @@ -58,6 +58,19 @@ struct rtw_hci {
> > > >         u8 bulkout_num;
> > > >  };
> > > >
> > > > +#define IS_CH_5G_BAND_1(channel) ((channel) >= 36 && (channel <=
> 48))
> > > > +#define IS_CH_5G_BAND_2(channel) ((channel) >= 52 && (channel <=
> 64))
> > > > +#define IS_CH_5G_BAND_3(channel) ((channel) >= 100 && (channel <=
> > > 144))
> > > > +#define IS_CH_5G_BAND_4(channel) ((channel) >= 149 && (channel <=
> > > 177))
> > >
> > > There are channels between 48 and 52, 64 and 100, and 144 and 149.
> > > What are you doing with those?
> >
> > These devices are not supporting those channels you mentioned.
> > So I hope if some unsupported channels are used, they should hit the
> > "else" case, or throw such a warn.
> 
> Maybe that argument makes sense on its own, but see below:
> 
> > > > +#define IS_CH_5G_BAND_MID(channel) \
> > > > +       (IS_CH_5G_BAND_2(channel) || IS_CH_5G_BAND_3(channel))
> > > > +
> > > > +#define IS_CH_2G_BAND(channel) ((channel) <= 14)
> > > > +#define IS_CH_5G_BAND(channel) \
> > > > +       (IS_CH_5G_BAND_1(channel) || IS_CH_5G_BAND_2(channel)
> || \
> > > > +        IS_CH_5G_BAND_3(channel) ||
> IS_CH_5G_BAND_4(channel))
> > >
> > > Given the above (you have major holes in 5G_BAND{1,2,3,4}), this macro
> > > seems like a regression.
> 
> I still think it's a terrible idea to write an intentionally
> misleading macro named "IS 5G BAND" that returns false for 5G
> channels. It just gives you a nice way to stub your toe if you ever
> have chips that do support these channels.
> 

You're probably right, but I really don't think those 802.11ac devices are
going to support these channels, unless rtw88 is going to add support
for 802.11ax devices. And I'll take care of it when it comes.

At least the current 802.11ac devices such as 8821C/8822B/8822C do
not support it.

Yan-Hsuan


  reply	other threads:[~2019-11-07  3:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 12:32 [PATCH v2 0/6] rtw88: minor throughput improvement yhchuang
2019-10-16 12:32 ` [PATCH v2 1/6] rtw88: use macro to check the current band yhchuang
2019-10-16 17:10   ` Brian Norris
2019-10-17  2:39     ` Tony Chuang
2019-11-06 20:53       ` Brian Norris
2019-11-07  3:35         ` Tony Chuang [this message]
2019-10-16 12:32 ` [PATCH v2 2/6] rtw88: add power tracking support yhchuang
2019-10-17 10:32   ` Chris Chiu
2019-10-16 12:32 ` [PATCH v2 3/6] rtw88: Enable 802.11ac beamformee support yhchuang
2019-10-16 17:06   ` Brian Norris
2019-10-17  2:43     ` Tony Chuang
2019-10-16 12:32 ` [PATCH v2 4/6] rtw88: update regulatory settings implementaion yhchuang
2019-10-16 16:53   ` Brian Norris
2019-10-17  2:55     ` Tony Chuang
2019-10-17  3:17       ` Brian Norris
2019-10-19 11:14         ` Kalle Valo
2019-10-16 12:33 ` [PATCH v2 5/6] rtw88: add set_bitrate_mask support yhchuang
2019-10-17 10:25   ` Chris Chiu
2019-10-19 11:18     ` Kalle Valo
2019-10-16 12:33 ` [PATCH v2 6/6] rtw88: add phy_info debugfs to show Tx/Rx physical status yhchuang
2019-10-18  7:02   ` Chris Chiu

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=F7CD281DE3E379468C6D07993EA72F84D191E2D2@RTITMBSVM04.realtek.com.tw \
    --to=yhchuang@realtek.com \
    --cc=briannorris@chromium.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).