linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def
@ 2023-10-06 19:04 Philipp Hortmann
  2023-10-06 19:04 ` [PATCH 01/10] staging: rtl8192e: Remove function _rtl92e_wx_set_force_lps() Philipp Hortmann
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

The Linux kernel authors consider "wireless tools" package deprecated. The
"wireless extension" is also deprecated. Remove private functions of 
"wireless extensions" that can only be accessed by "wireless tools" from
driver.

Tested with rtl8192e (WLL6130-D99) in Mode n (12.5 MB/s)
Transferred this patch over wlan connection of rtl8192e.

Philipp Hortmann (10):
  staging: rtl8192e: Remove function _rtl92e_wx_set_force_lps()
  staging: rtl8192e: Remove function _rtl92e_wx_set_lps_awake_interval()
  staging: rtl8192e: Remove constant variable reg_max_lps_awake_intvl
  staging: rtl8192e: Remove function _rtl92e_wx_adapter_power_status()
  staging: rtl8192e: Remove constant variable ps_force
  staging: rtl8192e: Remove function _rtl92e_wx_set_scan_type()
  staging: rtl8192e: Remove unchanged variable active_scan
  staging: rtl8192e: Remove function _rtl92e_wx_set_debug()
  staging: rtl8192e: Remove unused variable rt_global_debug_component
  staging: rtl8192e: Remove unused file rtllib_debug.h

 drivers/staging/rtl8192e/rtl8192e/rtl_core.c |  11 --
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h |   2 -
 drivers/staging/rtl8192e/rtl8192e/rtl_ps.c   |   3 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c   | 145 -------------------
 drivers/staging/rtl8192e/rtllib.h            |   4 -
 drivers/staging/rtl8192e/rtllib_debug.h      |  49 -------
 drivers/staging/rtl8192e/rtllib_module.c     |   3 -
 drivers/staging/rtl8192e/rtllib_softmac.c    |  11 +-
 8 files changed, 3 insertions(+), 225 deletions(-)
 delete mode 100644 drivers/staging/rtl8192e/rtllib_debug.h

-- 
2.42.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 01/10] staging: rtl8192e: Remove function _rtl92e_wx_set_force_lps()
  2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
@ 2023-10-06 19:04 ` Philipp Hortmann
  2023-10-06 19:04 ` [PATCH 02/10] staging: rtl8192e: Remove function _rtl92e_wx_set_lps_awake_interval() Philipp Hortmann
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function _rtl92e_wx_set_force_lps() as this functionality is not
commonly used and the tool to access it is deprecated.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 922231274f4b..4b2ee1684dac 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -370,7 +370,6 @@ struct r8192_priv {
 
 	u16		tx_counter;
 	u16		rx_ctr;
-	bool		force_lps;
 };
 
 extern const struct ethtool_ops rtl819x_ethtool_ops;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index c367e4fa2af1..a85caabcaf6c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -133,7 +133,7 @@ static int _rtl92e_wx_adapter_power_status(struct net_device *dev,
 
 	mutex_lock(&priv->wx_mutex);
 
-	if (*extra || priv->force_lps) {
+	if (*extra) {
 		priv->ps_force = false;
 		psc->bLeisurePs = true;
 	} else {
@@ -169,22 +169,6 @@ static int _rtl92e_wx_set_lps_awake_interval(struct net_device *dev,
 	return 0;
 }
 
-static int _rtl92e_wx_set_force_lps(struct net_device *dev,
-				    struct iw_request_info *info,
-				    union iwreq_data *wrqu, char *extra)
-{
-	struct r8192_priv *priv = rtllib_priv(dev);
-
-	mutex_lock(&priv->wx_mutex);
-
-	netdev_info(dev,
-		    "%s(): force LPS ! extra is %d (1 is open 0 is close)\n",
-		    __func__, *extra);
-	priv->force_lps = *extra;
-	mutex_unlock(&priv->wx_mutex);
-	return 0;
-}
-
 static int _rtl92e_wx_set_debug(struct net_device *dev,
 				struct iw_request_info *info,
 				union iwreq_data *wrqu, char *extra)
@@ -970,10 +954,6 @@ static const struct iw_priv_args r8192_private_args[] = {
 		SIOCIWFIRSTPRIV + 0xa,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, IW_PRIV_TYPE_NONE,
 		"lps_interv"
-	}, {
-		SIOCIWFIRSTPRIV + 0xb,
-		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, IW_PRIV_TYPE_NONE,
-		"lps_force"
 	}
 
 };
@@ -990,7 +970,6 @@ static iw_handler r8192_private_handler[] = {
 	(iw_handler)NULL,
 	(iw_handler)NULL,
 	(iw_handler)_rtl92e_wx_set_lps_awake_interval,
-	(iw_handler)_rtl92e_wx_set_force_lps,
 };
 
 static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 02/10] staging: rtl8192e: Remove function _rtl92e_wx_set_lps_awake_interval()
  2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
  2023-10-06 19:04 ` [PATCH 01/10] staging: rtl8192e: Remove function _rtl92e_wx_set_force_lps() Philipp Hortmann
@ 2023-10-06 19:04 ` Philipp Hortmann
  2023-10-06 19:04 ` [PATCH 03/10] staging: rtl8192e: Remove constant variable reg_max_lps_awake_intvl Philipp Hortmann
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function _rtl92e_wx_set_lps_awake_interval() as this functionality
is not commonly used and the tool to access it is deprecated.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 27 ----------------------
 1 file changed, 27 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index a85caabcaf6c..35f25c60dfb9 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -150,25 +150,6 @@ static int _rtl92e_wx_adapter_power_status(struct net_device *dev,
 	return 0;
 }
 
-static int _rtl92e_wx_set_lps_awake_interval(struct net_device *dev,
-					     struct iw_request_info *info,
-					     union iwreq_data *wrqu,
-					     char *extra)
-{
-	struct r8192_priv *priv = rtllib_priv(dev);
-	struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
-					(&priv->rtllib->pwr_save_ctrl);
-
-	mutex_lock(&priv->wx_mutex);
-
-	netdev_info(dev, "%s(): set lps awake interval ! extra is %d\n",
-		    __func__, *extra);
-
-	psc->reg_max_lps_awake_intvl = *extra;
-	mutex_unlock(&priv->wx_mutex);
-	return 0;
-}
-
 static int _rtl92e_wx_set_debug(struct net_device *dev,
 				struct iw_request_info *info,
 				union iwreq_data *wrqu, char *extra)
@@ -950,10 +931,6 @@ static const struct iw_priv_args r8192_private_args[] = {
 		SIOCIWFIRSTPRIV + 0x6,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, IW_PRIV_TYPE_NONE,
 		"set_power"
-	}, {
-		SIOCIWFIRSTPRIV + 0xa,
-		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, IW_PRIV_TYPE_NONE,
-		"lps_interv"
 	}
 
 };
@@ -966,10 +943,6 @@ static iw_handler r8192_private_handler[] = {
 	(iw_handler)NULL,
 	(iw_handler)NULL,
 	(iw_handler)_rtl92e_wx_adapter_power_status,
-	(iw_handler)NULL,
-	(iw_handler)NULL,
-	(iw_handler)NULL,
-	(iw_handler)_rtl92e_wx_set_lps_awake_interval,
 };
 
 static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 03/10] staging: rtl8192e: Remove constant variable reg_max_lps_awake_intvl
  2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
  2023-10-06 19:04 ` [PATCH 01/10] staging: rtl8192e: Remove function _rtl92e_wx_set_force_lps() Philipp Hortmann
  2023-10-06 19:04 ` [PATCH 02/10] staging: rtl8192e: Remove function _rtl92e_wx_set_lps_awake_interval() Philipp Hortmann
@ 2023-10-06 19:04 ` Philipp Hortmann
  2023-10-06 19:05 ` [PATCH 04/10] staging: rtl8192e: Remove function _rtl92e_wx_adapter_power_status() Philipp Hortmann
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove constant variable reg_max_lps_awake_intvl as this value is just
written to MaxPeriod. Function _rtl92e_init_priv_constant() is then empty
and can be removed as well.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 10 ----------
 drivers/staging/rtl8192e/rtllib.h            |  1 -
 drivers/staging/rtl8192e/rtllib_softmac.c    |  8 +-------
 3 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index f46cb152930a..7db01d68000a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -712,15 +712,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
 	priv->rtllib->ScanOperationBackupHandler = rtl92e_scan_op_backup;
 }
 
-static void _rtl92e_init_priv_constant(struct net_device *dev)
-{
-	struct r8192_priv *priv = rtllib_priv(dev);
-	struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
-					&priv->rtllib->pwr_save_ctrl;
-
-	psc->reg_max_lps_awake_intvl = 5;
-}
-
 static void _rtl92e_init_priv_variable(struct net_device *dev)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
@@ -838,7 +829,6 @@ static short _rtl92e_init(struct net_device *dev)
 	memset(&priv->stats, 0, sizeof(struct rt_stats));
 
 	_rtl92e_init_priv_handler(dev);
-	_rtl92e_init_priv_constant(dev);
 	_rtl92e_init_priv_variable(dev);
 	_rtl92e_init_priv_lock(priv);
 	_rtl92e_init_priv_task(dev);
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 6d54c03f5680..307bcbb7fbb6 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1079,7 +1079,6 @@ struct rt_pwr_save_ctrl {
 
 	bool				bLeisurePs;
 	u8				LpsIdleCount;
-	u8				reg_max_lps_awake_intvl;
 	u8				LPSAwakeIntvl;
 
 	u32				CurPsLevel;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 206f8e05d5d0..f84133744bc3 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1588,16 +1588,10 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
 		if (ieee->bAwakePktSent) {
 			psc->LPSAwakeIntvl = 1;
 		} else {
-			u8 MaxPeriod = 1;
+			u8 MaxPeriod = 5;
 
 			if (psc->LPSAwakeIntvl == 0)
 				psc->LPSAwakeIntvl = 1;
-			if (psc->reg_max_lps_awake_intvl == 0)
-				MaxPeriod = 1;
-			else if (psc->reg_max_lps_awake_intvl == 0xFF)
-				MaxPeriod = ieee->current_network.dtim_period;
-			else
-				MaxPeriod = psc->reg_max_lps_awake_intvl;
 			psc->LPSAwakeIntvl = (psc->LPSAwakeIntvl >=
 					       MaxPeriod) ? MaxPeriod :
 					       (psc->LPSAwakeIntvl + 1);
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 04/10] staging: rtl8192e: Remove function _rtl92e_wx_adapter_power_status()
  2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
                   ` (2 preceding siblings ...)
  2023-10-06 19:04 ` [PATCH 03/10] staging: rtl8192e: Remove constant variable reg_max_lps_awake_intvl Philipp Hortmann
@ 2023-10-06 19:05 ` Philipp Hortmann
  2023-10-06 19:05 ` [PATCH 05/10] staging: rtl8192e: Remove constant variable ps_force Philipp Hortmann
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function _rtl92e_wx_adapter_power_status() as this functionality
is not commonly used and the tool to access it is deprecated.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 37 ----------------------
 1 file changed, 37 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 35f25c60dfb9..27309df925ba 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -122,34 +122,6 @@ static int _rtl92e_wx_get_power(struct net_device *dev,
 	return rtllib_wx_get_power(priv->rtllib, info, wrqu, extra);
 }
 
-static int _rtl92e_wx_adapter_power_status(struct net_device *dev,
-					   struct iw_request_info *info,
-					   union iwreq_data *wrqu, char *extra)
-{
-	struct r8192_priv *priv = rtllib_priv(dev);
-	struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
-					(&priv->rtllib->pwr_save_ctrl);
-	struct rtllib_device *ieee = priv->rtllib;
-
-	mutex_lock(&priv->wx_mutex);
-
-	if (*extra) {
-		priv->ps_force = false;
-		psc->bLeisurePs = true;
-	} else {
-		if (priv->rtllib->link_state == MAC80211_LINKED)
-			rtl92e_leisure_ps_leave(dev);
-
-		priv->ps_force = true;
-		psc->bLeisurePs = false;
-		ieee->ps = *extra;
-	}
-
-	mutex_unlock(&priv->wx_mutex);
-
-	return 0;
-}
-
 static int _rtl92e_wx_set_debug(struct net_device *dev,
 				struct iw_request_info *info,
 				union iwreq_data *wrqu, char *extra)
@@ -927,10 +899,6 @@ static const struct iw_priv_args r8192_private_args[] = {
 	}, {
 		SIOCIWFIRSTPRIV + 0x1,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "activescan"
-	}, {
-		SIOCIWFIRSTPRIV + 0x6,
-		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, IW_PRIV_TYPE_NONE,
-		"set_power"
 	}
 
 };
@@ -938,11 +906,6 @@ static const struct iw_priv_args r8192_private_args[] = {
 static iw_handler r8192_private_handler[] = {
 	(iw_handler)_rtl92e_wx_set_debug,   /*SIOCIWSECONDPRIV*/
 	(iw_handler)_rtl92e_wx_set_scan_type,
-	(iw_handler)NULL,
-	(iw_handler)NULL,
-	(iw_handler)NULL,
-	(iw_handler)NULL,
-	(iw_handler)_rtl92e_wx_adapter_power_status,
 };
 
 static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 05/10] staging: rtl8192e: Remove constant variable ps_force
  2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
                   ` (3 preceding siblings ...)
  2023-10-06 19:05 ` [PATCH 04/10] staging: rtl8192e: Remove function _rtl92e_wx_adapter_power_status() Philipp Hortmann
@ 2023-10-06 19:05 ` Philipp Hortmann
  2023-10-06 19:05 ` [PATCH 06/10] staging: rtl8192e: Remove function _rtl92e_wx_set_scan_type() Philipp Hortmann
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove constant variable ps_force as its value is always 0. The equation
results accordingly. Remove dead code.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 4b2ee1684dac..d4e998cfbefc 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -263,7 +263,6 @@ struct r8192_priv {
 	short	promisc;
 
 	short	chan;
-	bool ps_force;
 
 	u32 irq_mask[2];
 
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
index a4da11627199..44a9fe831849 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
@@ -181,8 +181,7 @@ static bool _rtl92e_ps_set_mode(struct net_device *dev, u8 rtPsMode)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 
-	if (!priv->ps_force)
-		priv->rtllib->ps = rtPsMode;
+	priv->rtllib->ps = rtPsMode;
 	if (priv->rtllib->sta_sleep != LPS_IS_WAKE &&
 	    rtPsMode == RTLLIB_PS_DISABLED) {
 		unsigned long flags;
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 06/10] staging: rtl8192e: Remove function _rtl92e_wx_set_scan_type()
  2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
                   ` (4 preceding siblings ...)
  2023-10-06 19:05 ` [PATCH 05/10] staging: rtl8192e: Remove constant variable ps_force Philipp Hortmann
@ 2023-10-06 19:05 ` Philipp Hortmann
  2023-10-06 19:05 ` [PATCH 07/10] staging: rtl8192e: Remove unchanged variable active_scan Philipp Hortmann
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function _rtl92e_wx_set_scan_type() as this functionality is not
commonly used and the tool to access it is deprecated.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 27309df925ba..d4d8d66df82c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -627,22 +627,6 @@ static int _rtl92e_wx_set_enc(struct net_device *dev,
 	return ret;
 }
 
-static int _rtl92e_wx_set_scan_type(struct net_device *dev,
-				    struct iw_request_info *aa,
-				    union iwreq_data *wrqu, char *p)
-{
-	struct r8192_priv *priv = rtllib_priv(dev);
-	int *parms = (int *)p;
-	int mode = parms[0];
-
-	if (priv->hw_radio_off)
-		return 0;
-
-	priv->rtllib->active_scan = mode;
-
-	return 1;
-}
-
 #define R8192_MAX_RETRY 255
 static int _rtl92e_wx_set_retry(struct net_device *dev,
 				struct iw_request_info *info,
@@ -896,16 +880,12 @@ static const struct iw_priv_args r8192_private_args[] = {
 	{
 		SIOCIWFIRSTPRIV + 0x0,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "set_debugflag"
-	}, {
-		SIOCIWFIRSTPRIV + 0x1,
-		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "activescan"
 	}
 
 };
 
 static iw_handler r8192_private_handler[] = {
 	(iw_handler)_rtl92e_wx_set_debug,   /*SIOCIWSECONDPRIV*/
-	(iw_handler)_rtl92e_wx_set_scan_type,
 };
 
 static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 07/10] staging: rtl8192e: Remove unchanged variable active_scan
  2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
                   ` (5 preceding siblings ...)
  2023-10-06 19:05 ` [PATCH 06/10] staging: rtl8192e: Remove function _rtl92e_wx_set_scan_type() Philipp Hortmann
@ 2023-10-06 19:05 ` Philipp Hortmann
  2023-10-06 19:05 ` [PATCH 08/10] staging: rtl8192e: Remove function _rtl92e_wx_set_debug() Philipp Hortmann
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove variable active_scan as its value is set to 1 at initialization.
No further writes to active_scan are done. The equation results
accordingly. Remove dead code.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 7db01d68000a..ba35ae4a21fa 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -755,7 +755,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
 
 	priv->rtllib->current_network.beacon_interval = DEFAULT_BEACONINTERVAL;
 	priv->rtllib->iw_mode = IW_MODE_INFRA;
-	priv->rtllib->active_scan = 1;
 	priv->rtllib->be_scan_inprogress = false;
 
 	priv->rtllib->fts = DEFAULT_FRAG_THRESHOLD;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 307bcbb7fbb6..2f968c3c0229 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1332,8 +1332,6 @@ struct rtllib_device {
 	int rate;       /* current rate */
 	int basic_rate;
 
-	short active_scan;
-
 	/* this contains flags for selectively enable softmac support */
 	u16 softmac_features;
 
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index f84133744bc3..ff98b41c94e0 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -419,8 +419,7 @@ static void rtllib_send_probe(struct rtllib_device *ieee)
 
 static void rtllib_send_probe_requests(struct rtllib_device *ieee)
 {
-	if (ieee->active_scan && (ieee->softmac_features &
-	    IEEE_SOFTMAC_PROBERQ)) {
+	if (ieee->softmac_features & IEEE_SOFTMAC_PROBERQ) {
 		rtllib_send_probe(ieee);
 		rtllib_send_probe(ieee);
 	}
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 08/10] staging: rtl8192e: Remove function _rtl92e_wx_set_debug()
  2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
                   ` (6 preceding siblings ...)
  2023-10-06 19:05 ` [PATCH 07/10] staging: rtl8192e: Remove unchanged variable active_scan Philipp Hortmann
@ 2023-10-06 19:05 ` Philipp Hortmann
  2023-10-06 19:05 ` [PATCH 09/10] staging: rtl8192e: Remove unused variable rt_global_debug_component Philipp Hortmann
  2023-10-06 19:05 ` [PATCH 10/10] staging: rtl8192e: Remove unused file rtllib_debug.h Philipp Hortmann
  9 siblings, 0 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function _rtl92e_wx_set_debug() as this functionality is not
commonly used and the tool to access it is deprecated.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 40 ----------------------
 1 file changed, 40 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index d4d8d66df82c..ec8e7d5fe634 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -122,25 +122,6 @@ static int _rtl92e_wx_get_power(struct net_device *dev,
 	return rtllib_wx_get_power(priv->rtllib, info, wrqu, extra);
 }
 
-static int _rtl92e_wx_set_debug(struct net_device *dev,
-				struct iw_request_info *info,
-				union iwreq_data *wrqu, char *extra)
-{
-	struct r8192_priv *priv = rtllib_priv(dev);
-	u8 c = *extra;
-
-	if (priv->hw_radio_off)
-		return 0;
-
-	netdev_info(dev, "=====>%s(), *extra:%x, debugflag:%x\n", __func__,
-		    *extra, rt_global_debug_component);
-	if (c > 0)
-		rt_global_debug_component |= (1 << c);
-	else
-		rt_global_debug_component &= BIT31;
-	return 0;
-}
-
 static int _rtl92e_wx_set_mode(struct net_device *dev,
 			       struct iw_request_info *a,
 			       union iwreq_data *wrqu, char *b)
@@ -872,22 +853,6 @@ static iw_handler r8192_wx_handlers[] = {
 	[IW_IOCTL(SIOCSIWENCODEEXT)] = _rtl92e_wx_set_encode_ext,
 };
 
-/* the following rule need to be following,
- * Odd : get (world access),
- * even : set (root access)
- */
-static const struct iw_priv_args r8192_private_args[] = {
-	{
-		SIOCIWFIRSTPRIV + 0x0,
-		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "set_debugflag"
-	}
-
-};
-
-static iw_handler r8192_private_handler[] = {
-	(iw_handler)_rtl92e_wx_set_debug,   /*SIOCIWSECONDPRIV*/
-};
-
 static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
@@ -919,10 +884,5 @@ static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)
 const struct iw_handler_def r8192_wx_handlers_def = {
 	.standard = r8192_wx_handlers,
 	.num_standard = ARRAY_SIZE(r8192_wx_handlers),
-	.private = r8192_private_handler,
-	.num_private = ARRAY_SIZE(r8192_private_handler),
-	.num_private_args = sizeof(r8192_private_args) /
-			    sizeof(struct iw_priv_args),
 	.get_wireless_stats = _rtl92e_get_wireless_stats,
-	.private_args = (struct iw_priv_args *)r8192_private_args,
 };
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 09/10] staging: rtl8192e: Remove unused variable rt_global_debug_component
  2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
                   ` (7 preceding siblings ...)
  2023-10-06 19:05 ` [PATCH 08/10] staging: rtl8192e: Remove function _rtl92e_wx_set_debug() Philipp Hortmann
@ 2023-10-06 19:05 ` Philipp Hortmann
  2023-10-06 19:05 ` [PATCH 10/10] staging: rtl8192e: Remove unused file rtllib_debug.h Philipp Hortmann
  9 siblings, 0 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove unused variable rt_global_debug_component.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtllib_debug.h  | 2 --
 drivers/staging/rtl8192e/rtllib_module.c | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_debug.h b/drivers/staging/rtl8192e/rtllib_debug.h
index f6b23defe225..06adfebd7c89 100644
--- a/drivers/staging/rtl8192e/rtllib_debug.h
+++ b/drivers/staging/rtl8192e/rtllib_debug.h
@@ -14,8 +14,6 @@
 #define DRV_NAME "rtllib_92e"
 #endif
 
-extern u32 rt_global_debug_component;
-
 /* These are the defines for rt_global_debug_component */
 enum RTL_DEBUG {
 	COMP_TRACE		= BIT(0),
diff --git a/drivers/staging/rtl8192e/rtllib_module.c b/drivers/staging/rtl8192e/rtllib_module.c
index 195d8aa88138..f280c9e94958 100644
--- a/drivers/staging/rtl8192e/rtllib_module.c
+++ b/drivers/staging/rtl8192e/rtllib_module.c
@@ -34,9 +34,6 @@
 #include <net/arp.h>
 #include "rtllib.h"
 
-u32 rt_global_debug_component = COMP_ERR;
-EXPORT_SYMBOL(rt_global_debug_component);
-
 static inline int rtllib_networks_allocate(struct rtllib_device *ieee)
 {
 	if (ieee->networks)
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 10/10] staging: rtl8192e: Remove unused file rtllib_debug.h
  2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
                   ` (8 preceding siblings ...)
  2023-10-06 19:05 ` [PATCH 09/10] staging: rtl8192e: Remove unused variable rt_global_debug_component Philipp Hortmann
@ 2023-10-06 19:05 ` Philipp Hortmann
  9 siblings, 0 replies; 11+ messages in thread
From: Philipp Hortmann @ 2023-10-06 19:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove #define DRV_NAME "rtllib_92e" as it is already set. Remove enum
RTL_DEBUG as it is unused. Remove #include <linux/bits.h> as it is unused.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtllib.h       |  1 -
 drivers/staging/rtl8192e/rtllib_debug.h | 47 -------------------------
 2 files changed, 48 deletions(-)
 delete mode 100644 drivers/staging/rtl8192e/rtllib_debug.h

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 2f968c3c0229..b12a39ecdd9d 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -31,7 +31,6 @@
 #include <linux/delay.h>
 #include <linux/wireless.h>
 
-#include "rtllib_debug.h"
 #include "rtl819x_HT.h"
 #include "rtl819x_BA.h"
 #include "rtl819x_TS.h"
diff --git a/drivers/staging/rtl8192e/rtllib_debug.h b/drivers/staging/rtl8192e/rtllib_debug.h
deleted file mode 100644
index 06adfebd7c89..000000000000
--- a/drivers/staging/rtl8192e/rtllib_debug.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
- *
- * Contact Information: wlanfae <wlanfae@realtek.com>
- */
-#ifndef _RTL_DEBUG_H
-#define _RTL_DEBUG_H
-
-#include <linux/bits.h>
-
-/* Allow files to override DRV_NAME */
-#ifndef DRV_NAME
-#define DRV_NAME "rtllib_92e"
-#endif
-
-/* These are the defines for rt_global_debug_component */
-enum RTL_DEBUG {
-	COMP_TRACE		= BIT(0),
-	COMP_DBG		= BIT(1),
-	COMP_INIT		= BIT(2),
-	COMP_RECV		= BIT(3),
-	COMP_POWER		= BIT(6),
-	COMP_SWBW		= BIT(8),
-	COMP_SEC		= BIT(9),
-	COMP_LPS		= BIT(10),
-	COMP_QOS		= BIT(11),
-	COMP_RATE		= BIT(12),
-	COMP_RXDESC		= BIT(13),
-	COMP_PHY		= BIT(14),
-	COMP_DIG		= BIT(15),
-	COMP_TXAGC		= BIT(16),
-	COMP_HALDM		= BIT(17),
-	COMP_POWER_TRACKING	= BIT(18),
-	COMP_CH			= BIT(19),
-	COMP_RF			= BIT(20),
-	COMP_FIRMWARE		= BIT(21),
-	COMP_RESET		= BIT(23),
-	COMP_CMDPKT		= BIT(24),
-	COMP_SCAN		= BIT(25),
-	COMP_PS			= BIT(26),
-	COMP_DOWN		= BIT(27),
-	COMP_INTR		= BIT(28),
-	COMP_ERR		= BIT(31)
-};
-
-#endif
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-10-06 19:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
2023-10-06 19:04 ` [PATCH 01/10] staging: rtl8192e: Remove function _rtl92e_wx_set_force_lps() Philipp Hortmann
2023-10-06 19:04 ` [PATCH 02/10] staging: rtl8192e: Remove function _rtl92e_wx_set_lps_awake_interval() Philipp Hortmann
2023-10-06 19:04 ` [PATCH 03/10] staging: rtl8192e: Remove constant variable reg_max_lps_awake_intvl Philipp Hortmann
2023-10-06 19:05 ` [PATCH 04/10] staging: rtl8192e: Remove function _rtl92e_wx_adapter_power_status() Philipp Hortmann
2023-10-06 19:05 ` [PATCH 05/10] staging: rtl8192e: Remove constant variable ps_force Philipp Hortmann
2023-10-06 19:05 ` [PATCH 06/10] staging: rtl8192e: Remove function _rtl92e_wx_set_scan_type() Philipp Hortmann
2023-10-06 19:05 ` [PATCH 07/10] staging: rtl8192e: Remove unchanged variable active_scan Philipp Hortmann
2023-10-06 19:05 ` [PATCH 08/10] staging: rtl8192e: Remove function _rtl92e_wx_set_debug() Philipp Hortmann
2023-10-06 19:05 ` [PATCH 09/10] staging: rtl8192e: Remove unused variable rt_global_debug_component Philipp Hortmann
2023-10-06 19:05 ` [PATCH 10/10] staging: rtl8192e: Remove unused file rtllib_debug.h Philipp Hortmann

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).