linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Tony Chuang <yhchuang@realtek.com>
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: Wed, 16 Oct 2019 10:10:10 -0700	[thread overview]
Message-ID: <CA+ASDXNmMiW_FaqCKowzZW6fnBhA+JXcGBJOEToBA47EShu35A@mail.gmail.com> (raw)
In-Reply-To: <20191016123301.2649-2-yhchuang@realtek.com>

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?

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

Brian

  reply	other threads:[~2019-10-16 17:10 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 [this message]
2019-10-17  2:39     ` Tony Chuang
2019-11-06 20:53       ` Brian Norris
2019-11-07  3:35         ` Tony Chuang
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=CA+ASDXNmMiW_FaqCKowzZW6fnBhA+JXcGBJOEToBA47EShu35A@mail.gmail.com \
    --to=briannorris@chromium.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --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 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).