From: Ivan Safonov <insafonov@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org
Subject: Re: [PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range is set in Hal_ReadTxPowerInfo88E
Date: Tue, 13 Oct 2015 22:32:45 +0700 [thread overview]
Message-ID: <561D241D.5070600@gmail.com> (raw)
In-Reply-To: <20151013034723.GB6292@kroah.com>
On 10/13/2015 10:47 AM, Greg Kroah-Hartman wrote:
> On Sat, Oct 10, 2015 at 01:27:00PM +0700, Ivan Safonov wrote:
>> Correct channels range is 1..14 (numbering from 1) but not 0..13.
> Have you tested this?
I have not tested it.
> Why?
>From condition
if (chnl <= 14) {
bIn24G = true;
it shows that the highest number of channels at a frequency of 2.4 GHz
is 14.
And first comment tells us that only 2 channels has the numbers <3,
which means that the numbering starts from 1:
static u8 Hal_GetChnlGroup88E(u8 chnl, u8 *pGroup)
{
u8 bIn24G = true;
if (chnl <= 14) {
bIn24G = true;
if (chnl < 3) /* Channel 1-2 */
*pGroup = 0;
else if (chnl < 6) /* Channel 3-5 */
*pGroup = 1;
else if (chnl < 9) /* Channel 6-8 */
*pGroup = 2;
else if (chnl < 12) /* Channel 9-11 */
*pGroup = 3;
else if (chnl < 14) /* Channel 12-13 */
*pGroup = 4;
else if (chnl == 14) /* Channel 14 */
*pGroup = 5;
} else {
... // 5 GHz groups
Hal_ReadTxPowerInfo88E function raises questions in this location(->):
if (bIn24G) {
pHalData->Index24G_CCK_Base[rfPath][ch] =
pwrInfo24G.IndexCCK_Base[rfPath][group];
-> if (ch == 14)
-> pHalData->Index24G_BW40_Base[rfPath][ch] =
pwrInfo24G.IndexBW40_Base[rfPath][4];
-> else
-> pHalData->Index24G_BW40_Base[rfPath][ch] =
pwrInfo24G.IndexBW40_Base[rfPath][group];
}
If channel range is 0..(CHANNEL_MAX_NUMBER - 1) code is dead
(CHANNEL_MAX_NUMBER = 14):
But if channel range is 1..14 will the right to remove branching if (ch
== 14) in Hal_ReadTxPowerInfo88E, changing Hal_GetChnlGroup88E so that
when chnl == 14 itreturned 4?
prev parent reply other threads:[~2015-10-13 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-10 6:27 [PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range is set in Hal_ReadTxPowerInfo88E Ivan Safonov
2015-10-13 3:47 ` Greg Kroah-Hartman
2015-10-13 15:32 ` Ivan Safonov [this message]
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=561D241D.5070600@gmail.com \
--to=insafonov@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@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 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.