From: Kalle Valo <kvalo@codeaurora.org>
To: <pkshih@realtek.com>
Cc: <tony0620emma@gmail.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 01/11] rtw88: coex: update TDMA settings for different beacon interval
Date: Wed, 11 Nov 2020 10:34:09 +0200 [thread overview]
Message-ID: <875z6ccmwu.fsf@codeaurora.org> (raw)
In-Reply-To: <20201111022108.9834-2-pkshih@realtek.com> (pkshih@realtek.com's message of "Wed, 11 Nov 2020 10:20:58 +0800")
<pkshih@realtek.com> writes:
> From: Ching-Te Ku <ku920601@realtek.com>
>
> Add considering for different WLAN beacon interval in coexistence
> mechanism.
> Because the WLAN beacon period may be not 100 ms, so it's necessary
> to consider any beacon period and set timer according to the interval.
>
> Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
[...]
> + } else if (tbtt_interval < 80 && tbtt_interval > 0) {
> + para[1] = (100 / tbtt_interval);
> +
> + if (100 % tbtt_interval != 0)
> + para[1] = para[1] + 1;
> +
> + para[1] = para[1] & 0x3f;
> + } else if (tbtt_interval >= 180) {
> + para[1] = (tbtt_interval / 100);
> +
> + if (tbtt_interval % 100 <= 80)
> + para[1] = para[1] - 1;
> +
> + para[1] = para[1] & 0x3f;
> + para[1] = para[1] | 0x80;
Magic numbers 0x3f and 0x80, GENMASK() & FIELD_PREP() is the modern way
to handle bitmasks like these. And there's also the operator '|='
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2020-11-11 8:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 2:20 [PATCH 00/11] rtw88: coex: fix and update settings to enhance coex performance pkshih
2020-11-11 2:20 ` [PATCH 01/11] rtw88: coex: update TDMA settings for different beacon interval pkshih
2020-11-11 8:34 ` Kalle Valo [this message]
2020-11-12 2:23 ` Pkshih
2020-11-11 2:20 ` [PATCH 02/11] rtw88: coex: remove unnecessary feature/function pkshih
2020-11-11 8:35 ` Kalle Valo
2020-11-12 2:25 ` Pkshih
2020-11-11 2:21 ` [PATCH 03/11] rtw88: coex: add write scoreboard action when WLAN in critical procedure pkshih
2020-11-11 2:21 ` [PATCH 04/11] rtw88: coex: Add force flag for coexistence table function pkshih
2020-11-11 2:21 ` [PATCH 05/11] rtw88: coex: add the mechanism for RF4CE pkshih
2020-11-11 2:21 ` [PATCH 06/11] rtw88: coex: update the TDMA parameter when leave LPS pkshih
2020-11-11 2:21 ` [PATCH 07/11] rtw88: coex: Change antenna setting to enhance free-run performance pkshih
2020-11-11 2:21 ` [PATCH 08/11] rtw88: coex: fix BT performance drop during initial/power-on step pkshih
2020-11-11 8:37 ` Kalle Valo
2020-11-12 2:24 ` Pkshih
2020-11-11 2:21 ` [PATCH 09/11] rtw88: coex: remove write scan bit to scoreboard in scan and connect notify pkshih
2020-11-11 2:21 ` [PATCH 10/11] rtw88: coex: remove unnecessary WLAN slot extend pkshih
2020-11-11 2:21 ` [PATCH 11/11] rtw88: coex: change the decode method from firmware pkshih
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=875z6ccmwu.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=tony0620emma@gmail.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).