linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] staging: r8188eu: clean up private ioctls
@ 2021-12-26 21:25 Martin Kaiser
  2021-12-26 21:25 ` [PATCH 01/10] staging: r8188eu: remove unused rtw_private_args entries Martin Kaiser
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Clean up the definitions of private ioctls.
(Maybe it would make more sense to remove them completely?)

Martin Kaiser (10):
  staging: r8188eu: remove unused rtw_private_args entries
  staging: r8188eu: remove the private ioctl "get sensitivity"
  staging: r8188eu: remove the private drvext_hdl ioctl
  staging: r8188eu: remove the private ioctl "wps_prob_req_ie"
  staging: r8188eu: remove private ioctls that return -1
  staging: r8188eu: remove the private ioctl "wps_assoc_req_ie"
  staging: r8188eu: remove the private ioctl "tdls_get"
  staging: r8188eu: remove the private ioctl "tdls"
  staging: r8188eu: remove the private "test" ioctl
  staging: r8188eu: remove unused prototype

 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 141 +------------------
 1 file changed, 7 insertions(+), 134 deletions(-)

-- 
2.30.2


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

* [PATCH 01/10] staging: r8188eu: remove unused rtw_private_args entries
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
@ 2021-12-26 21:25 ` Martin Kaiser
  2021-12-26 21:25 ` [PATCH 02/10] staging: r8188eu: remove the private ioctl "get sensitivity" Martin Kaiser
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the entries of the rtw_private_args array that refer to
non-existing private ioctls.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 88e9734b3094..ea8858213771 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -4311,9 +4311,6 @@ static const struct iw_priv_args rtw_private_args[] = {
 	{
 		SIOCIWFIRSTPRIV + 0x2, 0, 0, "driver_ext"
 	},
-	{
-		SIOCIWFIRSTPRIV + 0x3, 0, 0, "mp_ioctl"
-	},
 	{
 		SIOCIWFIRSTPRIV + 0x4,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "apinfo"
@@ -4368,7 +4365,6 @@ static const struct iw_priv_args rtw_private_args[] = {
 		SIOCIWFIRSTPRIV + 0x12,
 		IW_PRIV_TYPE_CHAR | P2P_PRIVATE_IOCTL_SET_LEN, IW_PRIV_TYPE_CHAR | IFNAMSIZ, "p2p_get2"
 	},
-	{SIOCIWFIRSTPRIV + 0x13, IW_PRIV_TYPE_CHAR | 128, 0, "NULL"},
 	{
 		SIOCIWFIRSTPRIV + 0x14,
 		IW_PRIV_TYPE_CHAR  | 64, 0, "tdls"
@@ -4386,9 +4382,6 @@ static const struct iw_priv_args rtw_private_args[] = {
 
 	{SIOCIWFIRSTPRIV + 0x1D, IW_PRIV_TYPE_CHAR | 40, IW_PRIV_TYPE_CHAR | 0x7FF, "test"
 	},
-
-	{SIOCIWFIRSTPRIV + 0x0E, IW_PRIV_TYPE_CHAR | 1024, 0, ""},  /* set */
-	{SIOCIWFIRSTPRIV + 0x0F, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, ""},/* get */
 };
 
 static iw_handler rtw_private_handler[] = {
-- 
2.30.2


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

* [PATCH 02/10] staging: r8188eu: remove the private ioctl "get sensitivity"
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
  2021-12-26 21:25 ` [PATCH 01/10] staging: r8188eu: remove unused rtw_private_args entries Martin Kaiser
@ 2021-12-26 21:25 ` Martin Kaiser
  2021-12-26 21:25 ` [PATCH 03/10] staging: r8188eu: remove the private drvext_hdl ioctl Martin Kaiser
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the private ioctl "get sensitivity", it is mapped to an empty
function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index ea8858213771..bc23754c7f5c 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -2119,13 +2119,6 @@ static int rtw_wx_set_mtk_wps_probe_ie(struct net_device *dev,
 	return 0;
 }
 
-static int rtw_wx_get_sensitivity(struct net_device *dev,
-				struct iw_request_info *info,
-				union iwreq_data *wrqu, char *buf)
-{
-	return 0;
-}
-
 static int rtw_wx_set_mtk_wps_ie(struct net_device *dev,
 				struct iw_request_info *info,
 				union iwreq_data *wrqu, char *extra)
@@ -4323,10 +4316,6 @@ static const struct iw_priv_args rtw_private_args[] = {
 		SIOCIWFIRSTPRIV + 0x6,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wps_start"
 	},
-	{
-		SIOCIWFIRSTPRIV + 0x7,
-		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "get_sensitivity"
-	},
 	{
 		SIOCIWFIRSTPRIV + 0x8,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wps_prob_req_ie"
@@ -4395,7 +4384,7 @@ NULL,					/* 0x03 */
 	rtw_set_pid,			/* 0x05 */
 	rtw_wps_start,			/* 0x06 */
 
-	rtw_wx_get_sensitivity,		/* 0x07 */
+	NULL,				/* 0x07 */
 	rtw_wx_set_mtk_wps_probe_ie,	/* 0x08 */
 	rtw_wx_set_mtk_wps_ie,		/* 0x09 */
 
-- 
2.30.2


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

* [PATCH 03/10] staging: r8188eu: remove the private drvext_hdl ioctl
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
  2021-12-26 21:25 ` [PATCH 01/10] staging: r8188eu: remove unused rtw_private_args entries Martin Kaiser
  2021-12-26 21:25 ` [PATCH 02/10] staging: r8188eu: remove the private ioctl "get sensitivity" Martin Kaiser
@ 2021-12-26 21:25 ` Martin Kaiser
  2021-12-26 21:25 ` [PATCH 04/10] staging: r8188eu: remove the private ioctl "wps_prob_req_ie" Martin Kaiser
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the private drvext_hdl ioctl, it is mapped to an empty function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index bc23754c7f5c..761511bbb0ad 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -2126,16 +2126,6 @@ static int rtw_wx_set_mtk_wps_ie(struct net_device *dev,
 	return 0;
 }
 
-/*
- *	For all data larger than 16 octets, we need to use a
- *	pointer to memory allocated in user space.
- */
-static  int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
-						union iwreq_data *wrqu, char *extra)
-{
-	return 0;
-}
-
 static int rtw_get_ap_info(struct net_device *dev,
 			       struct iw_request_info *info,
 			       union iwreq_data *wrqu, char *extra)
@@ -4376,7 +4366,7 @@ static const struct iw_priv_args rtw_private_args[] = {
 static iw_handler rtw_private_handler[] = {
 rtw_wx_write32,				/* 0x00 */
 rtw_wx_read32,				/* 0x01 */
-rtw_drvext_hdl,				/* 0x02 */
+	NULL,				/* 0x02 */
 NULL,					/* 0x03 */
 /*  for MM DTV platform */
 	rtw_get_ap_info,		/* 0x04 */
-- 
2.30.2


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

* [PATCH 04/10] staging: r8188eu: remove the private ioctl "wps_prob_req_ie"
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
                   ` (2 preceding siblings ...)
  2021-12-26 21:25 ` [PATCH 03/10] staging: r8188eu: remove the private drvext_hdl ioctl Martin Kaiser
@ 2021-12-26 21:25 ` Martin Kaiser
  2021-12-26 21:25 ` [PATCH 05/10] staging: r8188eu: remove private ioctls that return -1 Martin Kaiser
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the private ioctl "wps_prob_req_ie", it is mapped to
an empty function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 761511bbb0ad..b1f4f5ae71c1 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -2112,13 +2112,6 @@ static int rtw_wx_set_channel_plan(struct net_device *dev,
 	return 0;
 }
 
-static int rtw_wx_set_mtk_wps_probe_ie(struct net_device *dev,
-		struct iw_request_info *a,
-		union iwreq_data *wrqu, char *b)
-{
-	return 0;
-}
-
 static int rtw_wx_set_mtk_wps_ie(struct net_device *dev,
 				struct iw_request_info *info,
 				union iwreq_data *wrqu, char *extra)
@@ -4306,10 +4299,6 @@ static const struct iw_priv_args rtw_private_args[] = {
 		SIOCIWFIRSTPRIV + 0x6,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wps_start"
 	},
-	{
-		SIOCIWFIRSTPRIV + 0x8,
-		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wps_prob_req_ie"
-	},
 	{
 		SIOCIWFIRSTPRIV + 0x9,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wps_assoc_req_ie"
@@ -4375,7 +4364,7 @@ NULL,					/* 0x03 */
 	rtw_wps_start,			/* 0x06 */
 
 	NULL,				/* 0x07 */
-	rtw_wx_set_mtk_wps_probe_ie,	/* 0x08 */
+	NULL,				/* 0x08 */
 	rtw_wx_set_mtk_wps_ie,		/* 0x09 */
 
 /*  Set Channel depend on the country code */
-- 
2.30.2


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

* [PATCH 05/10] staging: r8188eu: remove private ioctls that return -1
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
                   ` (3 preceding siblings ...)
  2021-12-26 21:25 ` [PATCH 04/10] staging: r8188eu: remove the private ioctl "wps_prob_req_ie" Martin Kaiser
@ 2021-12-26 21:25 ` Martin Kaiser
  2021-12-26 21:25 ` [PATCH 06/10] staging: r8188eu: remove the private ioctl "wps_assoc_req_ie" Martin Kaiser
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the private ioctls that are mapped to rtw_wx_priv_null.
rtw_wx_priv_null itself can also be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index b1f4f5ae71c1..db88a78b1c87 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -2090,12 +2090,6 @@ static int rtw_wx_write_rf(struct net_device *dev,
 	return 0;
 }
 
-static int rtw_wx_priv_null(struct net_device *dev, struct iw_request_info *a,
-		 union iwreq_data *wrqu, char *b)
-{
-	return -1;
-}
-
 static int rtw_wx_set_channel_plan(struct net_device *dev,
 			       struct iw_request_info *info,
 			       union iwreq_data *wrqu, char *extra)
@@ -4385,9 +4379,9 @@ NULL,					/* 0x03 */
 	rtw_tdls_get,			/* 0x15 */
 
 	rtw_pm_set,			/* 0x16 */
-	rtw_wx_priv_null,		/* 0x17 */
+	NULL,				/* 0x17 */
 	rtw_rereg_nd_name,		/* 0x18 */
-	rtw_wx_priv_null,		/* 0x19 */
+	NULL,				/* 0x19 */
 
 	NULL,				/* 0x1A */
 	NULL,				/* 0x1B */
-- 
2.30.2


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

* [PATCH 06/10] staging: r8188eu: remove the private ioctl "wps_assoc_req_ie"
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
                   ` (4 preceding siblings ...)
  2021-12-26 21:25 ` [PATCH 05/10] staging: r8188eu: remove private ioctls that return -1 Martin Kaiser
@ 2021-12-26 21:25 ` Martin Kaiser
  2021-12-26 21:25 ` [PATCH 07/10] staging: r8188eu: remove the private ioctl "tdls_get" Martin Kaiser
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the private ioctl "wps_assoc_req_ie", it is mapped to
an empty function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index db88a78b1c87..776b4f5cb77d 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -2106,13 +2106,6 @@ static int rtw_wx_set_channel_plan(struct net_device *dev,
 	return 0;
 }
 
-static int rtw_wx_set_mtk_wps_ie(struct net_device *dev,
-				struct iw_request_info *info,
-				union iwreq_data *wrqu, char *extra)
-{
-	return 0;
-}
-
 static int rtw_get_ap_info(struct net_device *dev,
 			       struct iw_request_info *info,
 			       union iwreq_data *wrqu, char *extra)
@@ -4293,11 +4286,6 @@ static const struct iw_priv_args rtw_private_args[] = {
 		SIOCIWFIRSTPRIV + 0x6,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wps_start"
 	},
-	{
-		SIOCIWFIRSTPRIV + 0x9,
-		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wps_assoc_req_ie"
-	},
-
 	{
 		SIOCIWFIRSTPRIV + 0xA,
 		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "channel_plan"
@@ -4359,7 +4347,7 @@ NULL,					/* 0x03 */
 
 	NULL,				/* 0x07 */
 	NULL,				/* 0x08 */
-	rtw_wx_set_mtk_wps_ie,		/* 0x09 */
+	NULL,				/* 0x09 */
 
 /*  Set Channel depend on the country code */
 	rtw_wx_set_channel_plan,	/* 0x0A */
-- 
2.30.2


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

* [PATCH 07/10] staging: r8188eu: remove the private ioctl "tdls_get"
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
                   ` (5 preceding siblings ...)
  2021-12-26 21:25 ` [PATCH 06/10] staging: r8188eu: remove the private ioctl "wps_assoc_req_ie" Martin Kaiser
@ 2021-12-26 21:25 ` Martin Kaiser
  2021-12-26 21:25 ` [PATCH 08/10] staging: r8188eu: remove the private ioctl "tdls" Martin Kaiser
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the private ioctl "tdls_get", it is mapped to an empty
function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 776b4f5cb77d..47c1662394f3 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -4185,13 +4185,6 @@ static int rtw_tdls(struct net_device *dev,
 	return 0;
 }
 
-static int rtw_tdls_get(struct net_device *dev,
-				struct iw_request_info *info,
-				union iwreq_data *wrqu, char *extra)
-{
-	return 0;
-}
-
 static int rtw_test(
 	struct net_device *dev,
 	struct iw_request_info *info,
@@ -4319,10 +4312,6 @@ static const struct iw_priv_args rtw_private_args[] = {
 		SIOCIWFIRSTPRIV + 0x14,
 		IW_PRIV_TYPE_CHAR  | 64, 0, "tdls"
 	},
-	{
-		SIOCIWFIRSTPRIV + 0x15,
-		IW_PRIV_TYPE_CHAR | P2P_PRIVATE_IOCTL_SET_LEN, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | P2P_PRIVATE_IOCTL_SET_LEN, "tdls_get"
-	},
 	{
 		SIOCIWFIRSTPRIV + 0x16,
 		IW_PRIV_TYPE_CHAR | 64, 0, "pm_set"
@@ -4364,7 +4353,7 @@ NULL,					/* 0x03 */
 
 	NULL,				/* 0x13 */
 	rtw_tdls,			/* 0x14 */
-	rtw_tdls_get,			/* 0x15 */
+	NULL,				/* 0x15 */
 
 	rtw_pm_set,			/* 0x16 */
 	NULL,				/* 0x17 */
-- 
2.30.2


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

* [PATCH 08/10] staging: r8188eu: remove the private ioctl "tdls"
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
                   ` (6 preceding siblings ...)
  2021-12-26 21:25 ` [PATCH 07/10] staging: r8188eu: remove the private ioctl "tdls_get" Martin Kaiser
@ 2021-12-26 21:25 ` Martin Kaiser
  2021-12-26 21:25 ` [PATCH 09/10] staging: r8188eu: remove the private "test" ioctl Martin Kaiser
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the private ioctl "tdls", it is mapped to an empty
function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 47c1662394f3..911f10627551 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -4178,13 +4178,6 @@ static int rtw_pm_set(struct net_device *dev,
 
 extern int wifirate2_ratetbl_inx(unsigned char rate);
 
-static int rtw_tdls(struct net_device *dev,
-		    struct iw_request_info *info,
-		    union iwreq_data *wrqu, char *extra)
-{
-	return 0;
-}
-
 static int rtw_test(
 	struct net_device *dev,
 	struct iw_request_info *info,
@@ -4308,10 +4301,6 @@ static const struct iw_priv_args rtw_private_args[] = {
 		SIOCIWFIRSTPRIV + 0x12,
 		IW_PRIV_TYPE_CHAR | P2P_PRIVATE_IOCTL_SET_LEN, IW_PRIV_TYPE_CHAR | IFNAMSIZ, "p2p_get2"
 	},
-	{
-		SIOCIWFIRSTPRIV + 0x14,
-		IW_PRIV_TYPE_CHAR  | 64, 0, "tdls"
-	},
 	{
 		SIOCIWFIRSTPRIV + 0x16,
 		IW_PRIV_TYPE_CHAR | 64, 0, "pm_set"
@@ -4352,7 +4341,7 @@ NULL,					/* 0x03 */
 	rtw_p2p_get2,			/* 0x12 */
 
 	NULL,				/* 0x13 */
-	rtw_tdls,			/* 0x14 */
+	NULL,				/* 0x14 */
 	NULL,				/* 0x15 */
 
 	rtw_pm_set,			/* 0x16 */
-- 
2.30.2


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

* [PATCH 09/10] staging: r8188eu: remove the private "test" ioctl
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
                   ` (7 preceding siblings ...)
  2021-12-26 21:25 ` [PATCH 08/10] staging: r8188eu: remove the private ioctl "tdls" Martin Kaiser
@ 2021-12-26 21:25 ` Martin Kaiser
  2022-01-06  8:52   ` Dan Carpenter
  2021-12-26 21:25 ` [PATCH 10/10] staging: r8188eu: remove unused prototype Martin Kaiser
  2021-12-28 16:14 ` [PATCH 00/10] staging: r8188eu: clean up private ioctls Greg Kroah-Hartman
  10 siblings, 1 reply; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the private "test" ioctl. It copies data from user space,
this data is not used.

We can now remove a number of NULL entries at the end of the private
ioctl list.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 46 --------------------
 1 file changed, 46 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 911f10627551..c08b60ec1e64 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -4178,43 +4178,6 @@ static int rtw_pm_set(struct net_device *dev,
 
 extern int wifirate2_ratetbl_inx(unsigned char rate);
 
-static int rtw_test(
-	struct net_device *dev,
-	struct iw_request_info *info,
-	union iwreq_data *wrqu, char *extra)
-{
-	u32 len;
-	u8 *pbuf, *pch;
-	char *ptmp;
-	u8 *delim = ",";
-
-	DBG_88E("+%s\n", __func__);
-	len = wrqu->data.length;
-
-	pbuf = kzalloc(len, GFP_KERNEL);
-	if (!pbuf) {
-		DBG_88E("%s: no memory!\n", __func__);
-		return -ENOMEM;
-	}
-
-	if (copy_from_user(pbuf, wrqu->data.pointer, len)) {
-		kfree(pbuf);
-		DBG_88E("%s: copy from user fail!\n", __func__);
-		return -EFAULT;
-	}
-	DBG_88E("%s: string =\"%s\"\n", __func__, pbuf);
-
-	ptmp = (char *)pbuf;
-	pch = strsep(&ptmp, delim);
-	if (!pch || strlen(pch) == 0) {
-		kfree(pbuf);
-		DBG_88E("%s: parameter error(level 1)!\n", __func__);
-		return -EFAULT;
-	}
-	kfree(pbuf);
-	return 0;
-}
-
 static iw_handler rtw_handlers[] = {
 	IW_HANDLER(SIOCGIWNAME, rtw_wx_get_name),
 	IW_HANDLER(SIOCGIWFREQ, rtw_wx_get_freq),
@@ -4307,9 +4270,6 @@ static const struct iw_priv_args rtw_private_args[] = {
 	},
 
 	{SIOCIWFIRSTPRIV + 0x18, IW_PRIV_TYPE_CHAR | IFNAMSIZ, 0, "rereg_nd_name"},
-
-	{SIOCIWFIRSTPRIV + 0x1D, IW_PRIV_TYPE_CHAR | 40, IW_PRIV_TYPE_CHAR | 0x7FF, "test"
-	},
 };
 
 static iw_handler rtw_private_handler[] = {
@@ -4347,12 +4307,6 @@ NULL,					/* 0x03 */
 	rtw_pm_set,			/* 0x16 */
 	NULL,				/* 0x17 */
 	rtw_rereg_nd_name,		/* 0x18 */
-	NULL,				/* 0x19 */
-
-	NULL,				/* 0x1A */
-	NULL,				/* 0x1B */
-	NULL,				/*  0x1C is reserved for hostapd */
-	rtw_test,			/*  0x1D */
 };
 
 static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
-- 
2.30.2


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

* [PATCH 10/10] staging: r8188eu: remove unused prototype
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
                   ` (8 preceding siblings ...)
  2021-12-26 21:25 ` [PATCH 09/10] staging: r8188eu: remove the private "test" ioctl Martin Kaiser
@ 2021-12-26 21:25 ` Martin Kaiser
  2021-12-28 16:14 ` [PATCH 00/10] staging: r8188eu: clean up private ioctls Greg Kroah-Hartman
  10 siblings, 0 replies; 13+ messages in thread
From: Martin Kaiser @ 2021-12-26 21:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the prototype for wifirate2_ratetbl_inx, it is not needed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index c08b60ec1e64..adc03862bc03 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -4176,8 +4176,6 @@ static int rtw_pm_set(struct net_device *dev,
 	return ret;
 }
 
-extern int wifirate2_ratetbl_inx(unsigned char rate);
-
 static iw_handler rtw_handlers[] = {
 	IW_HANDLER(SIOCGIWNAME, rtw_wx_get_name),
 	IW_HANDLER(SIOCGIWFREQ, rtw_wx_get_freq),
-- 
2.30.2


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

* Re: [PATCH 00/10] staging: r8188eu: clean up private ioctls
  2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
                   ` (9 preceding siblings ...)
  2021-12-26 21:25 ` [PATCH 10/10] staging: r8188eu: remove unused prototype Martin Kaiser
@ 2021-12-28 16:14 ` Greg Kroah-Hartman
  10 siblings, 0 replies; 13+ messages in thread
From: Greg Kroah-Hartman @ 2021-12-28 16:14 UTC (permalink / raw)
  To: Martin Kaiser
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel

On Sun, Dec 26, 2021 at 10:25:25PM +0100, Martin Kaiser wrote:
> Clean up the definitions of private ioctls.
> (Maybe it would make more sense to remove them completely?)

If none of them are really "standard", then yes, they should be removed.

At the very least, the correct macros should be used for the remaining
ones.

I'll go queue this up now, thanks!

greg k-h

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

* Re: [PATCH 09/10] staging: r8188eu: remove the private "test" ioctl
  2021-12-26 21:25 ` [PATCH 09/10] staging: r8188eu: remove the private "test" ioctl Martin Kaiser
@ 2022-01-06  8:52   ` Dan Carpenter
  0 siblings, 0 replies; 13+ messages in thread
From: Dan Carpenter @ 2022-01-06  8:52 UTC (permalink / raw)
  To: Martin Kaiser
  Cc: Greg Kroah-Hartman, Larry Finger, Phillip Potter,
	Michael Straube, linux-staging, linux-kernel

On Sun, Dec 26, 2021 at 10:25:34PM +0100, Martin Kaiser wrote:
> Remove the private "test" ioctl. It copies data from user space,
> this data is not used.

It also had some memory corruption bugs because of the lack of NUL
termination.

regards,
dan carpenter


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

end of thread, other threads:[~2022-01-06  8:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-26 21:25 [PATCH 00/10] staging: r8188eu: clean up private ioctls Martin Kaiser
2021-12-26 21:25 ` [PATCH 01/10] staging: r8188eu: remove unused rtw_private_args entries Martin Kaiser
2021-12-26 21:25 ` [PATCH 02/10] staging: r8188eu: remove the private ioctl "get sensitivity" Martin Kaiser
2021-12-26 21:25 ` [PATCH 03/10] staging: r8188eu: remove the private drvext_hdl ioctl Martin Kaiser
2021-12-26 21:25 ` [PATCH 04/10] staging: r8188eu: remove the private ioctl "wps_prob_req_ie" Martin Kaiser
2021-12-26 21:25 ` [PATCH 05/10] staging: r8188eu: remove private ioctls that return -1 Martin Kaiser
2021-12-26 21:25 ` [PATCH 06/10] staging: r8188eu: remove the private ioctl "wps_assoc_req_ie" Martin Kaiser
2021-12-26 21:25 ` [PATCH 07/10] staging: r8188eu: remove the private ioctl "tdls_get" Martin Kaiser
2021-12-26 21:25 ` [PATCH 08/10] staging: r8188eu: remove the private ioctl "tdls" Martin Kaiser
2021-12-26 21:25 ` [PATCH 09/10] staging: r8188eu: remove the private "test" ioctl Martin Kaiser
2022-01-06  8:52   ` Dan Carpenter
2021-12-26 21:25 ` [PATCH 10/10] staging: r8188eu: remove unused prototype Martin Kaiser
2021-12-28 16:14 ` [PATCH 00/10] staging: r8188eu: clean up private ioctls Greg Kroah-Hartman

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