linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Aiuto <fabioaiuto83@gmail.com>
To: gregkh@linuxfoundation.org
Cc: hdegoede@redhat.com, Larry.Finger@lwfinger.net,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH v3 04/17] staging: rtl8723bs: rename enum items related to channel bonding
Date: Tue, 22 Jun 2021 15:09:48 +0200	[thread overview]
Message-ID: <a4172419996bdcaf96f0d9b5438b3b2372ff69b7.1624367071.git.fabioaiuto83@gmail.com> (raw)
In-Reply-To: <cover.1624367071.git.fabioaiuto83@gmail.com>

since rtl8723bs card allows only 20Mhz and 40Mhz channels,
rename enum items related to channel bonding accordingly to
the only composite channel bandwidth allowed in 2.4Ghz
(i.e. 40Mhz) in a HT context (since VHT isn't supported)

Example:

VHT_DATA_SC_20_LOWER_OF_80MHZ ->
	HT_DATA_SC_LOWER_OF_40MHZ

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 10 +++++-----
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c   |  4 ++--
 drivers/staging/rtl8723bs/include/rtw_rf.h        |  6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 3ecd034342ec..059d3050acc6 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -2530,18 +2530,18 @@ u8 SCMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)
 
 	if (pHalData->CurrentChannelBW == CHANNEL_WIDTH_40) {
 		if (pattrib->bwmode == CHANNEL_WIDTH_40) {
-			SCSettingOfDesc = VHT_DATA_SC_DONOT_CARE;
+			SCSettingOfDesc = HT_DATA_SC_DONOT_CARE;
 		} else if (pattrib->bwmode == CHANNEL_WIDTH_20) {
 			if (pHalData->nCur40MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_UPPER) {
-				SCSettingOfDesc = VHT_DATA_SC_20_UPPER_OF_80MHZ;
+				SCSettingOfDesc = HT_DATA_SC_20_UPPER_OF_40MHZ;
 			} else if (pHalData->nCur40MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_LOWER) {
-				SCSettingOfDesc = VHT_DATA_SC_20_LOWER_OF_80MHZ;
+				SCSettingOfDesc = HT_DATA_SC_20_LOWER_OF_40MHZ;
 			} else {
-				SCSettingOfDesc = VHT_DATA_SC_DONOT_CARE;
+				SCSettingOfDesc = HT_DATA_SC_DONOT_CARE;
 			}
 		}
 	} else {
-		SCSettingOfDesc = VHT_DATA_SC_DONOT_CARE;
+		SCSettingOfDesc = HT_DATA_SC_DONOT_CARE;
 	}
 
 	return SCSettingOfDesc;
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
index 275460865719..23435dcc5537 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
@@ -621,9 +621,9 @@ static u8 phy_GetSecondaryChnl_8723B(struct adapter *Adapter)
 
 	if (pHalData->CurrentChannelBW == CHANNEL_WIDTH_40) {
 		if (pHalData->nCur40MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_UPPER)
-			SCSettingOf20 = VHT_DATA_SC_20_UPPER_OF_80MHZ;
+			SCSettingOf20 = HT_DATA_SC_20_UPPER_OF_40MHZ;
 		else if (pHalData->nCur40MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_LOWER)
-			SCSettingOf20 = VHT_DATA_SC_20_LOWER_OF_80MHZ;
+			SCSettingOf20 = HT_DATA_SC_20_LOWER_OF_40MHZ;
 	}
 
 	return  (SCSettingOf40 << 4) | SCSettingOf20;
diff --git a/drivers/staging/rtl8723bs/include/rtw_rf.h b/drivers/staging/rtl8723bs/include/rtw_rf.h
index 550471637315..48ff15a38bb0 100644
--- a/drivers/staging/rtl8723bs/include/rtw_rf.h
+++ b/drivers/staging/rtl8723bs/include/rtw_rf.h
@@ -95,9 +95,9 @@ enum extchnl_offset {
 };
 
 enum {
-	VHT_DATA_SC_DONOT_CARE = 0,
-	VHT_DATA_SC_20_UPPER_OF_80MHZ = 1,
-	VHT_DATA_SC_20_LOWER_OF_80MHZ = 2,
+	HT_DATA_SC_DONOT_CARE = 0,
+	HT_DATA_SC_20_UPPER_OF_40MHZ = 1,
+	HT_DATA_SC_20_LOWER_OF_40MHZ = 2,
 };
 
 /* 2007/11/15 MH Define different RF type. */
-- 
2.20.1


  parent reply	other threads:[~2021-06-22 13:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 13:09 [PATCH v3 00/17] staging: rtl8723bs: remove 5Ghz code Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 01/17] staging: rtl8723bs: remove all 5Ghz network types Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 02/17] staging: rtl8723bs: remove code related to unsupported channel bandwidth Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 03/17] staging: rtl8723bs: remove unused enum items related to channel bonding Fabio Aiuto
2021-06-22 13:09 ` Fabio Aiuto [this message]
2021-06-22 13:09 ` [PATCH v3 05/17] staging: rtl8723bs: remove 5Ghz field in struct registry_priv Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 06/17] staging: rtl8723bs: remove struct rt_channel_plan_5g Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 07/17] staging: rtl8723bs: remove all branchings between 2.4Ghz and 5Ghz band types Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 08/17] staging: rtl8723bs: beautify prototypes in include/hal_com_phycfg.h Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 09/17] staging: rtl8723bs: remove 5Ghz code related to channel plan definition Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 10/17] staging: rtl8723bs: remove some unused 5Ghz macro definitions Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 11/17] staging: rtl8723bs: remove 5Ghz code related to RF power calibration Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 12/17] staging: rtl8723bs: remove VHT dead code Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 13/17] staging: rtl8723bs: remove unused ODM_CMNINFO_BOARD_TYPE enum item Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 14/17] staging: rtl8723bs: fix macro value for 2.4Ghz only device Fabio Aiuto
2021-06-22 13:09 ` [PATCH v3 15/17] staging: rtl8723bs: remove obsolete 5Ghz comments Fabio Aiuto
2021-06-22 13:10 ` [PATCH v3 16/17] staging: rtl8723bs: fix check allowing 5Ghz settings Fabio Aiuto
2021-06-22 13:10 ` [PATCH v3 17/17] staging: rtl8723bs: remove item from TODO list Fabio Aiuto
2021-06-22 13:19 ` [PATCH v3 00/17] staging: rtl8723bs: remove 5Ghz code Hans de Goede
2021-06-22 13:22   ` Fabio Aiuto

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=a4172419996bdcaf96f0d9b5438b3b2372ff69b7.1624367071.git.fabioaiuto83@gmail.com \
    --to=fabioaiuto83@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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).