mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 05/10] staging: rtl8192e: Remove constant variable chnl_plan
Date: Sat, 18 Nov 2023 09:51:34 +0100	[thread overview]
Message-ID: <e46f16227877fe9853c9d15992e7fd27a0ceeae6.1700296319.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1700296319.git.philipp.g.hortmann@gmail.com>

Remove constant variable chnl_plan and replace it with its constant.
Remove equation that limits maximum value of chnl_plan as it is always
false.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 --
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c   | 7 +------
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h   | 1 -
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 44898e0be21c..9b51deba149b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -396,8 +396,6 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
 		break;
 	}
 
-	priv->chnl_plan = COUNTRY_CODE_WORLD_WIDE_13;
-
 	if (priv->eeprom_vid == 0x1186 &&  priv->eeprom_did == 0x3304)
 		priv->rtllib->bSupportRemoteWakeUp = true;
 	else
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 2789f428e4f9..68bd03500267 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -795,13 +795,8 @@ static short _rtl92e_get_channel_map(struct net_device *dev)
 
 	struct r8192_priv *priv = rtllib_priv(dev);
 
-	if (priv->chnl_plan >= COUNTRY_CODE_MAX) {
-		netdev_info(dev,
-			    "rtl819x_init:Error channel plan! Set to default.\n");
-		priv->chnl_plan = COUNTRY_CODE_FCC;
-	}
 	dot11d_init(priv->rtllib);
-	dot11d_channel_map(priv->chnl_plan, priv->rtllib);
+	dot11d_channel_map(COUNTRY_CODE_WORLD_WIDE_13, priv->rtllib);
 	for (i = 1; i <= 11; i++)
 		(priv->rtllib->active_channel_map)[i] = 1;
 	(priv->rtllib->active_channel_map)[12] = 2;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 348df71e122e..addaa1eb39ee 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -310,7 +310,6 @@ struct r8192_priv {
 
 	bool tx_pwr_data_read_from_eeprom;
 
-	u16 chnl_plan;
 	u8 hw_rf_off_action;
 
 	bool rf_change_in_progress;
-- 
2.42.0


  parent reply	other threads:[~2023-11-18  8:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-18  8:50 [PATCH 00/10] staging: rtl8192e: Remove constant variable channel_plan Philipp Hortmann
2023-11-18  8:51 ` [PATCH 01/10] staging: rtl8192e: Remove unused return value of rtl92e_set_channel() Philipp Hortmann
2023-11-18  8:51 ` [PATCH 02/10] staging: rtl8192e: Change parameter "ch" of set_chan() to u8 Philipp Hortmann
2023-11-18  8:51 ` [PATCH 03/10] staging: rtl8192e: Unwind pointer to pointer to rtl92e_set_channel() Philipp Hortmann
2023-11-18  8:51 ` [PATCH 04/10] staging: rtl8192e: Remove equation that results in constant for chnl_plan Philipp Hortmann
2023-11-18  8:51 ` Philipp Hortmann [this message]
2023-11-18  8:51 ` [PATCH 06/10] staging: rtl8192e: Remove unused variable eeprom_chnl_plan Philipp Hortmann
2023-11-18  8:51 ` [PATCH 07/10] staging: rtl8192e: Remove equation to check limits of channel Philipp Hortmann
2023-11-18  8:51 ` [PATCH 08/10] staging: rtl8192e: Remove check if channel_array[channel_plan].len != 0 Philipp Hortmann
2023-11-18  8:52 ` [PATCH 09/10] staging: rtl8192e: Remove switch for a constant in dot11d_channel_map() Philipp Hortmann
2023-11-18  8:52 ` [PATCH 10/10] staging: rtl8192e: Remove constant index from channel_array[] Philipp Hortmann

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=e46f16227877fe9853c9d15992e7fd27a0ceeae6.1700296319.git.philipp.g.hortmann@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --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

all inboxes | Powered by JetHome®