From: Chris Chiu <chiu@endlessm.com>
To: Tony Chuang <yhchuang@realtek.com>
Cc: Kalle Valo <kvalo@codeaurora.org>,
linux-wireless <linux-wireless@vger.kernel.org>,
Brian Norris <briannorris@chromium.org>
Subject: Re: [PATCH v2 5/6] rtw88: add set_bitrate_mask support
Date: Thu, 17 Oct 2019 18:25:46 +0800 [thread overview]
Message-ID: <CAB4CAwe-9Ne-cSJC45bpggBKCsJ_UDFuFdB3f-wf7+A=qVnKnw@mail.gmail.com> (raw)
In-Reply-To: <20191016123301.2649-6-yhchuang@realtek.com>
On Wed, Oct 16, 2019 at 8:33 PM <yhchuang@realtek.com> wrote:
>
> From: Tzu-En Huang <tehuang@realtek.com>
>
> +
> + band = hal->current_band_type;
> + if (band == RTW_BAND_2G) {
> + band = NL80211_BAND_2GHZ;
> + cfg_mask = mask->control[band].legacy;
> + } else if (band == RTW_BAND_5G) {
> + band = NL80211_BAND_5GHZ;
> + cfg_mask = mask->control[band].legacy << 4;
> + }
> +
> + if (!is_vht_enable) {
> + if (ra_mask & RA_MASK_HT_RATES_1SS)
> + cfg_mask |= mask->control[band].ht_mcs[0] << 12;
> + if (ra_mask & RA_MASK_HT_RATES_2SS)
> + cfg_mask |= mask->control[band].ht_mcs[1] << 20;
> + } else {
> + if (ra_mask & RA_MASK_VHT_RATES_1SS)
> + cfg_mask |= mask->control[band].vht_mcs[0] << 12;
> + if (ra_mask & RA_MASK_VHT_RATES_2SS)
> + cfg_mask |= mask->control[band].vht_mcs[1] << 22;
> + }
> +
> + ra_mask &= cfg_mask;
> +
> + return ra_mask;
> +}
> +
I believe you can replace the 4, 12, 20, 22 with a more descriptive macro.
Chris
> --
> 2.17.1
>
next prev parent reply other threads:[~2019-10-17 10:25 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
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 [this message]
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='CAB4CAwe-9Ne-cSJC45bpggBKCsJ_UDFuFdB3f-wf7+A=qVnKnw@mail.gmail.com' \
--to=chiu@endlessm.com \
--cc=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).