From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
martin@kaiser.cx, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org,
Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 1/4] staging: r8188eu: remove 5GHz code from Hal_GetChnlGroup88E()
Date: Fri, 13 Aug 2021 09:31:06 +0200 [thread overview]
Message-ID: <20210813073109.25609-2-straube.linux@gmail.com> (raw)
In-Reply-To: <20210813073109.25609-1-straube.linux@gmail.com>
Remove 5GHz code from Hal_GetChnlGroup88E().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
.../staging/r8188eu/hal/rtl8188e_hal_init.c | 62 +++++--------------
1 file changed, 14 insertions(+), 48 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index f0560c15387c..634a0a022727 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -2062,54 +2062,20 @@ static void Hal_ReadPowerValueFromPROM_8188E(struct txpowerinfo24g *pwrInfo24G,
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 {
- bIn24G = false;
-
- if (chnl <= 40)
- *pGroup = 0;
- else if (chnl <= 48)
- *pGroup = 1;
- else if (chnl <= 56)
- *pGroup = 2;
- else if (chnl <= 64)
- *pGroup = 3;
- else if (chnl <= 104)
- *pGroup = 4;
- else if (chnl <= 112)
- *pGroup = 5;
- else if (chnl <= 120)
- *pGroup = 5;
- else if (chnl <= 128)
- *pGroup = 6;
- else if (chnl <= 136)
- *pGroup = 7;
- else if (chnl <= 144)
- *pGroup = 8;
- else if (chnl <= 153)
- *pGroup = 9;
- else if (chnl <= 161)
- *pGroup = 10;
- else if (chnl <= 177)
- *pGroup = 11;
- }
- return bIn24G;
+ 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;
+
+ return true;
}
void Hal_ReadPowerSavingMode88E(struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail)
--
2.32.0
next prev parent reply other threads:[~2021-08-13 7:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 7:31 [PATCH 0/4] staging: r8188eu: refactor Hal_GetChnlGroup88E() Michael Straube
2021-08-13 7:31 ` Michael Straube [this message]
2021-08-13 16:27 ` [PATCH 1/4] staging: r8188eu: remove 5GHz code from Hal_GetChnlGroup88E() Fabio M. De Francesco
2021-08-13 18:25 ` Michael Straube
2021-08-14 17:11 ` Phillip Potter
2021-08-13 7:31 ` [PATCH 2/4] staging: r8188eu: convert return type of Hal_GetChnlGroup88E() to void Michael Straube
2021-08-14 17:12 ` Phillip Potter
2021-08-13 7:31 ` [PATCH 3/4] staging: r8188eu: rename parameter of Hal_GetChnlGroup88E() Michael Straube
2021-08-14 17:12 ` Phillip Potter
2021-08-13 7:31 ` [PATCH 4/4] staging: r8188eu: rename Hal_GetChnlGroup88E() Michael Straube
2021-08-14 17:13 ` Phillip Potter
2021-08-13 9:44 ` [PATCH 0/4] staging: r8188eu: refactor Hal_GetChnlGroup88E() Martin Kaiser
2021-08-14 6:30 ` Michael Straube
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=20210813073109.25609-2-straube.linux@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=martin@kaiser.cx \
--cc=phil@philpotter.co.uk \
/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.