linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop
@ 2023-05-13 18:08 Philipp Hortmann
  2023-05-13 18:08 ` [PATCH 1/9] staging: rtl8192e: Remove undefined function data_hard_stop Philipp Hortmann
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-13 18:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove functions that are declared but not defined.

Tested with rtl8192e (WLL6130-D99)
Transferred this patch over wlan connection of rtl8192e

Philipp Hortmann (9):
  staging: rtl8192e: Remove undefined function data_hard_stop
  staging: rtl8192e: Remove undefined function data_hard_resume
  staging: rtl8192e: Remove functions rtllib_start_hw_scan and stop
  staging: rtl8192e: Remove undefined function reset_port
  staging: rtl8192e: Remove undefined function hard_start_xmit
  staging: rtl8192e: Remove undefined function set_security
  staging: rtl8192e: Remove undefined function SetFwCmdHandler
  staging: rtl8192e: Remove undefined function
    UpdateBeaconInterruptHandler
  staging: rtl8192e: Remove undefined function LedControlHandler

 .../staging/rtl8192e/rtl8192e/r8192E_dev.c    |  4 --
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c  | 29 ---------
 drivers/staging/rtl8192e/rtl8192e/rtl_ps.c    | 13 +---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c    |  4 --
 drivers/staging/rtl8192e/rtllib.h             | 29 ---------
 drivers/staging/rtl8192e/rtllib_softmac.c     | 60 ++-----------------
 drivers/staging/rtl8192e/rtllib_softmac_wx.c  | 13 +---
 drivers/staging/rtl8192e/rtllib_tx.c          |  8 +--
 drivers/staging/rtl8192e/rtllib_wx.c          | 25 --------
 9 files changed, 9 insertions(+), 176 deletions(-)

-- 
2.40.1


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

* [PATCH 1/9] staging: rtl8192e: Remove undefined function data_hard_stop
  2023-05-13 18:08 [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop Philipp Hortmann
@ 2023-05-13 18:08 ` Philipp Hortmann
  2023-05-13 18:08 ` [PATCH 2/9] staging: rtl8192e: Remove undefined function data_hard_resume Philipp Hortmann
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-13 18:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function data_hard_stop as it is not defined.

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

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index d5f5ea5615fc..b356cde80f84 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1682,12 +1682,6 @@ struct rtllib_device {
 	void (*softmac_data_hard_start_xmit)(struct sk_buff *skb,
 			       struct net_device *dev, int rate);
 
-	/* stops the HW queue for DATA frames. Useful to avoid
-	 * waste time to TX data frame when we are reassociating
-	 * This function can sleep.
-	 */
-	void (*data_hard_stop)(struct net_device *dev);
-
 	/* OK this is complementing to data_poll_hard_stop */
 	void (*data_hard_resume)(struct net_device *dev);
 
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 1ca77cdbafa3..65eecbc94b93 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1575,9 +1575,6 @@ static void rtllib_associate_procedure_wq(void *data)
 	ieee->rtllib_ips_leave(ieee->dev);
 	mutex_lock(&ieee->wx_mutex);
 
-	if (ieee->data_hard_stop)
-		ieee->data_hard_stop(ieee->dev);
-
 	rtllib_stop_scan(ieee);
 	HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
 	if (ieee->rf_power_state == rf_off) {
@@ -2734,8 +2731,6 @@ void rtllib_disassociate(struct rtllib_device *ieee)
 	if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)
 		rtllib_reset_queue(ieee);
 
-	if (ieee->data_hard_stop)
-		ieee->data_hard_stop(ieee->dev);
 	if (IS_DOT11D_ENABLE(ieee))
 		dot11d_reset(ieee);
 	ieee->state = RTLLIB_NOLINK;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index 1f2fa711e60b..d7166d6772df 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -345,9 +345,6 @@ void rtllib_wx_sync_scan_wq(void *data)
 	rtllib_sta_ps_send_null_frame(ieee, 1);
 
 	rtllib_stop_all_queues(ieee);
-
-	if (ieee->data_hard_stop)
-		ieee->data_hard_stop(ieee->dev);
 	rtllib_stop_send_beacons(ieee);
 	ieee->state = RTLLIB_LINKED_SCANNING;
 	ieee->link_change(ieee->dev);
-- 
2.40.1


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

* [PATCH 2/9] staging: rtl8192e: Remove undefined function data_hard_resume
  2023-05-13 18:08 [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop Philipp Hortmann
  2023-05-13 18:08 ` [PATCH 1/9] staging: rtl8192e: Remove undefined function data_hard_stop Philipp Hortmann
@ 2023-05-13 18:08 ` Philipp Hortmann
  2023-05-13 18:08 ` [PATCH 3/9] staging: rtl8192e: Remove functions rtllib_start_hw_scan and stop Philipp Hortmann
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-13 18:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function data_hard_resume as it is not defined.

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

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index b356cde80f84..9b49a15de889 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1682,9 +1682,6 @@ struct rtllib_device {
 	void (*softmac_data_hard_start_xmit)(struct sk_buff *skb,
 			       struct net_device *dev, int rate);
 
-	/* OK this is complementing to data_poll_hard_stop */
-	void (*data_hard_resume)(struct net_device *dev);
-
 	/* ask to the driver to retune the radio.
 	 * This function can sleep. the driver should ensure
 	 * the radio has been switched before return.
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 65eecbc94b93..fe36a52b4c91 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1546,10 +1546,6 @@ static void rtllib_associate_complete_wq(void *data)
 		netdev_info(ieee->dev, "silent reset associate\n");
 		ieee->is_silent_reset = false;
 	}
-
-	if (ieee->data_hard_resume)
-		ieee->data_hard_resume(ieee->dev);
-
 }
 
 static void rtllib_sta_send_associnfo(struct rtllib_device *ieee)
@@ -2534,22 +2530,14 @@ static void rtllib_start_master_bss(struct rtllib_device *ieee)
 	ieee->state = RTLLIB_LINKED;
 	ieee->link_change(ieee->dev);
 	notify_wx_assoc_event(ieee);
-
-	if (ieee->data_hard_resume)
-		ieee->data_hard_resume(ieee->dev);
-
 	netif_carrier_on(ieee->dev);
 }
 
 static void rtllib_start_monitor_mode(struct rtllib_device *ieee)
 {
 	/* reset hardware status */
-	if (ieee->raw_tx) {
-		if (ieee->data_hard_resume)
-			ieee->data_hard_resume(ieee->dev);
-
+	if (ieee->raw_tx)
 		netif_carrier_on(ieee->dev);
-	}
 }
 
 static void rtllib_start_ibss_wq(void *data)
@@ -2674,10 +2662,6 @@ static void rtllib_start_ibss_wq(void *data)
 	rtllib_start_send_beacons(ieee);
 
 	notify_wx_assoc_event(ieee);
-
-	if (ieee->data_hard_resume)
-		ieee->data_hard_resume(ieee->dev);
-
 	netif_carrier_on(ieee->dev);
 
 	mutex_unlock(&ieee->wx_mutex);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index d7166d6772df..371864f0087f 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -389,10 +389,6 @@ void rtllib_wx_sync_scan_wq(void *data)
 		ieee->link_detect_info.NumRecvBcnInPeriod = 1;
 		ieee->link_detect_info.NumRecvDataInPeriod = 1;
 	}
-
-	if (ieee->data_hard_resume)
-		ieee->data_hard_resume(ieee->dev);
-
 	if (ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER)
 		rtllib_start_send_beacons(ieee);
 
@@ -505,12 +501,8 @@ int rtllib_wx_set_rawtx(struct rtllib_device *ieee,
 		    ieee->raw_tx ? "enabled" : "disabled");
 
 	if (ieee->iw_mode == IW_MODE_MONITOR) {
-		if (prev == 0 && ieee->raw_tx) {
-			if (ieee->data_hard_resume)
-				ieee->data_hard_resume(ieee->dev);
-
+		if (prev == 0 && ieee->raw_tx)
 			netif_carrier_on(ieee->dev);
-		}
 
 		if (prev && ieee->raw_tx == 1)
 			netif_carrier_off(ieee->dev);
-- 
2.40.1


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

* [PATCH 3/9] staging: rtl8192e: Remove functions rtllib_start_hw_scan and stop
  2023-05-13 18:08 [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop Philipp Hortmann
  2023-05-13 18:08 ` [PATCH 1/9] staging: rtl8192e: Remove undefined function data_hard_stop Philipp Hortmann
  2023-05-13 18:08 ` [PATCH 2/9] staging: rtl8192e: Remove undefined function data_hard_resume Philipp Hortmann
@ 2023-05-13 18:08 ` Philipp Hortmann
  2023-05-13 18:09 ` [PATCH 4/9] staging: rtl8192e: Remove undefined function reset_port Philipp Hortmann
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-13 18:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove functions rtllib_start_hw_scan and rtllib_stop_hw_scan as they are
not defined.

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

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 9b49a15de889..aac71fda4541 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1688,9 +1688,6 @@ struct rtllib_device {
 	 */
 	void (*set_chan)(struct net_device *dev, short ch);
 
-	void (*rtllib_start_hw_scan)(struct net_device *dev);
-	void (*rtllib_stop_hw_scan)(struct net_device *dev);
-
 	/* indicate the driver that the link state is changed
 	 * for example it may indicate the card is associated now.
 	 * Driver might be interested in this to apply RX filter
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index fe36a52b4c91..bb28414b88bc 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -691,23 +691,15 @@ static void rtllib_softmac_stop_scan(struct rtllib_device *ieee)
 
 void rtllib_stop_scan(struct rtllib_device *ieee)
 {
-	if (ieee->softmac_features & IEEE_SOFTMAC_SCAN) {
+	if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
 		rtllib_softmac_stop_scan(ieee);
-	} else {
-		if (ieee->rtllib_stop_hw_scan)
-			ieee->rtllib_stop_hw_scan(ieee->dev);
-	}
 }
 EXPORT_SYMBOL(rtllib_stop_scan);
 
 void rtllib_stop_scan_syncro(struct rtllib_device *ieee)
 {
-	if (ieee->softmac_features & IEEE_SOFTMAC_SCAN) {
+	if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
 		ieee->sync_scan_hurryup = 1;
-	} else {
-		if (ieee->rtllib_stop_hw_scan)
-			ieee->rtllib_stop_hw_scan(ieee->dev);
-	}
 }
 EXPORT_SYMBOL(rtllib_stop_scan_syncro);
 
@@ -739,9 +731,6 @@ static void rtllib_start_scan(struct rtllib_device *ieee)
 			ieee->scanning_continue = 1;
 			schedule_delayed_work(&ieee->softmac_scan_wq, 0);
 		}
-	} else {
-		if (ieee->rtllib_start_hw_scan)
-			ieee->rtllib_start_hw_scan(ieee->dev);
 	}
 }
 
@@ -753,12 +742,8 @@ void rtllib_start_scan_syncro(struct rtllib_device *ieee, u8 is_mesh)
 			RESET_CIE_WATCHDOG(ieee);
 	}
 	ieee->sync_scan_hurryup = 0;
-	if (ieee->softmac_features & IEEE_SOFTMAC_SCAN) {
+	if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
 		rtllib_softmac_scan_syncro(ieee, is_mesh);
-	} else {
-		if (ieee->rtllib_start_hw_scan)
-			ieee->rtllib_start_hw_scan(ieee->dev);
-	}
 }
 EXPORT_SYMBOL(rtllib_start_scan_syncro);
 
-- 
2.40.1


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

* [PATCH 4/9] staging: rtl8192e: Remove undefined function reset_port
  2023-05-13 18:08 [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop Philipp Hortmann
                   ` (2 preceding siblings ...)
  2023-05-13 18:08 ` [PATCH 3/9] staging: rtl8192e: Remove functions rtllib_start_hw_scan and stop Philipp Hortmann
@ 2023-05-13 18:09 ` Philipp Hortmann
  2023-05-13 18:09 ` [PATCH 5/9] staging: rtl8192e: Remove undefined function hard_start_xmit Philipp Hortmann
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-13 18:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function reset_port as it is not defined.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtllib.h    |  2 --
 drivers/staging/rtl8192e/rtllib_wx.c | 19 -------------------
 2 files changed, 21 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index aac71fda4541..cc4247ebea6b 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1661,8 +1661,6 @@ struct rtllib_device {
 	int (*hard_start_xmit)(struct rtllib_txb *txb,
 			       struct net_device *dev);
 
-	int (*reset_port)(struct net_device *dev);
-
 	/* Softmac-generated frames (management) are TXed via this
 	 * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
 	 * not set. As some cards may have different HW queues that
diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
index d6691f3c7c70..1876ff75c31c 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -420,18 +420,6 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
 	if (ieee->set_security)
 		ieee->set_security(dev, &sec);
 
-	/* Do not reset port if card is in Managed mode since resetting will
-	 * generate new IEEE 802.11 authentication which may end up in looping
-	 * with IEEE 802.1X.  If your hardware requires a reset after WEP
-	 * configuration (for example... Prism2), implement the reset_port in
-	 * the callbacks structures used to initialize the 802.11 stack.
-	 */
-	if (ieee->reset_on_keychange &&
-	    ieee->iw_mode != IW_MODE_INFRA &&
-	    ieee->reset_port && ieee->reset_port(dev)) {
-		netdev_dbg(dev, "%s: reset_port failed\n", dev->name);
-		return -EINVAL;
-	}
 	return 0;
 }
 EXPORT_SYMBOL(rtllib_wx_set_encode);
@@ -625,13 +613,6 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
 done:
 	if (ieee->set_security)
 		ieee->set_security(ieee->dev, &sec);
-
-	if (ieee->reset_on_keychange &&
-	    ieee->iw_mode != IW_MODE_INFRA &&
-	    ieee->reset_port && ieee->reset_port(dev)) {
-		netdev_dbg(ieee->dev, "Port reset failed\n");
-		return -EINVAL;
-	}
 	return ret;
 }
 EXPORT_SYMBOL(rtllib_wx_set_encode_ext);
-- 
2.40.1


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

* [PATCH 5/9] staging: rtl8192e: Remove undefined function hard_start_xmit
  2023-05-13 18:08 [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop Philipp Hortmann
                   ` (3 preceding siblings ...)
  2023-05-13 18:09 ` [PATCH 4/9] staging: rtl8192e: Remove undefined function reset_port Philipp Hortmann
@ 2023-05-13 18:09 ` Philipp Hortmann
  2023-05-13 18:09 ` [PATCH 6/9] staging: rtl8192e: Remove undefined function set_security Philipp Hortmann
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-13 18:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function hard_start_xmit as it is not defined. Equation
!ieee->hard_start_xmit always evaluates to true. When
(*ieee->hard_start_xmit)(txb, dev) == 0 is called the my computer is
freezing.

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

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index cc4247ebea6b..7be02cfe56fe 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1654,13 +1654,6 @@ struct rtllib_device {
 	void (*set_security)(struct net_device *dev,
 			     struct rtllib_security *sec);
 
-	/* Used to TX data frame by using txb structs.
-	 * this is not used if in the softmac_features
-	 * is set the flag IEEE_SOFTMAC_TX_QUEUE
-	 */
-	int (*hard_start_xmit)(struct rtllib_txb *txb,
-			       struct net_device *dev);
-
 	/* Softmac-generated frames (management) are TXed via this
 	 * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
 	 * not set. As some cards may have different HW queues that
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 54119fba8a57..c3f1910d9f58 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -572,8 +572,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
 	/* If there is no driver handler to take the TXB, don't bother
 	 * creating it...
 	 */
-	if ((!ieee->hard_start_xmit && !(ieee->softmac_features &
-	   IEEE_SOFTMAC_TX_QUEUE)) ||
+	if (!(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE) ||
 	   ((!ieee->softmac_data_hard_start_xmit &&
 	   (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) {
 		netdev_warn(ieee->dev, "No xmit handler.\n");
@@ -938,11 +937,6 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
 			dev->stats.tx_bytes += le16_to_cpu(txb->payload_size);
 			rtllib_softmac_xmit(txb, ieee);
 		} else {
-			if ((*ieee->hard_start_xmit)(txb, dev) == 0) {
-				stats->tx_packets++;
-				stats->tx_bytes += le16_to_cpu(txb->payload_size);
-				return 0;
-			}
 			rtllib_txb_free(txb);
 		}
 	}
-- 
2.40.1


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

* [PATCH 6/9] staging: rtl8192e: Remove undefined function set_security
  2023-05-13 18:08 [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop Philipp Hortmann
                   ` (4 preceding siblings ...)
  2023-05-13 18:09 ` [PATCH 5/9] staging: rtl8192e: Remove undefined function hard_start_xmit Philipp Hortmann
@ 2023-05-13 18:09 ` Philipp Hortmann
  2023-05-13 18:09 ` [PATCH 7/9] staging: rtl8192e: Remove undefined function SetFwCmdHandler Philipp Hortmann
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-13 18:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function set_security as it is not defined.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtllib.h    | 2 --
 drivers/staging/rtl8192e/rtllib_wx.c | 6 ------
 2 files changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 7be02cfe56fe..cc1ce106678c 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1651,8 +1651,6 @@ struct rtllib_device {
 	};
 
 	/* Callback functions */
-	void (*set_security)(struct net_device *dev,
-			     struct rtllib_security *sec);
 
 	/* Softmac-generated frames (management) are TXed via this
 	 * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
index 1876ff75c31c..82b537da8b21 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -416,10 +416,6 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
 	 */
 	sec.flags |= SEC_LEVEL;
 	sec.level = SEC_LEVEL_1; /* 40 and 104 bit WEP */
-
-	if (ieee->set_security)
-		ieee->set_security(dev, &sec);
-
 	return 0;
 }
 EXPORT_SYMBOL(rtllib_wx_set_encode);
@@ -611,8 +607,6 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
 			sec.flags &= ~SEC_LEVEL;
 	}
 done:
-	if (ieee->set_security)
-		ieee->set_security(ieee->dev, &sec);
 	return ret;
 }
 EXPORT_SYMBOL(rtllib_wx_set_encode_ext);
-- 
2.40.1


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

* [PATCH 7/9] staging: rtl8192e: Remove undefined function SetFwCmdHandler
  2023-05-13 18:08 [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop Philipp Hortmann
                   ` (5 preceding siblings ...)
  2023-05-13 18:09 ` [PATCH 6/9] staging: rtl8192e: Remove undefined function set_security Philipp Hortmann
@ 2023-05-13 18:09 ` Philipp Hortmann
  2023-05-13 18:09 ` [PATCH 8/9] staging: rtl8192e: Remove undefined function UpdateBeaconInterruptHandler Philipp Hortmann
  2023-05-13 18:09 ` [PATCH 9/9] staging: rtl8192e: Remove undefined function LedControlHandler Philipp Hortmann
  8 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-13 18:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function SetFwCmdHandler as it is not defined.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index b58a30d68f2f..3f8a58e32930 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -734,7 +734,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
 
 	priv->rtllib->SetHwRegHandler = rtl92e_set_reg;
 	priv->rtllib->AllowAllDestAddrHandler = rtl92e_set_monitor_mode;
-	priv->rtllib->SetFwCmdHandler = NULL;
 	priv->rtllib->InitialGainHandler = rtl92e_init_gain;
 	priv->rtllib->rtllib_ips_leave_wq = rtl92e_rtllib_ips_leave_wq;
 	priv->rtllib->rtllib_ips_leave = rtl92e_rtllib_ips_leave;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
index 5a1cd22f5e25..54a21c14cc75 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
@@ -217,12 +217,8 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
 	if (psc->bLeisurePs) {
 		if (psc->LpsIdleCount >= RT_CHECK_FOR_HANG_PERIOD) {
 
-			if (priv->rtllib->ps == RTLLIB_PS_DISABLED) {
-				if (priv->rtllib->SetFwCmdHandler)
-					priv->rtllib->SetFwCmdHandler(dev, FW_CMD_LPS_ENTER);
-				_rtl92e_ps_set_mode(dev, RTLLIB_PS_MBCAST |
-							 RTLLIB_PS_UNICAST);
-			}
+			if (priv->rtllib->ps == RTLLIB_PS_DISABLED)
+				_rtl92e_ps_set_mode(dev, RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST);
 		} else
 			psc->LpsIdleCount++;
 	}
@@ -235,10 +231,7 @@ void rtl92e_leisure_ps_leave(struct net_device *dev)
 					&priv->rtllib->pwr_save_ctrl;
 
 	if (psc->bLeisurePs) {
-		if (priv->rtllib->ps != RTLLIB_PS_DISABLED) {
+		if (priv->rtllib->ps != RTLLIB_PS_DISABLED)
 			_rtl92e_ps_set_mode(dev, RTLLIB_PS_DISABLED);
-			if (priv->rtllib->SetFwCmdHandler)
-				priv->rtllib->SetFwCmdHandler(dev, FW_CMD_LPS_LEAVE);
-		}
 	}
 }
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index cc1ce106678c..6c1f56324bd6 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1714,8 +1714,6 @@ struct rtllib_device {
 	bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev);
 	u8   (*rtllib_ap_sec_type)(struct rtllib_device *ieee);
 	void (*InitialGainHandler)(struct net_device *dev, u8 Operation);
-	bool (*SetFwCmdHandler)(struct net_device *dev,
-				enum fw_cmd_io_type FwCmdIO);
 	void (*UpdateBeaconInterruptHandler)(struct net_device *dev,
 					     bool start);
 	void (*ScanOperationBackupHandler)(struct net_device *dev,
-- 
2.40.1


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

* [PATCH 8/9] staging: rtl8192e: Remove undefined function UpdateBeaconInterruptHandler
  2023-05-13 18:08 [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop Philipp Hortmann
                   ` (6 preceding siblings ...)
  2023-05-13 18:09 ` [PATCH 7/9] staging: rtl8192e: Remove undefined function SetFwCmdHandler Philipp Hortmann
@ 2023-05-13 18:09 ` Philipp Hortmann
  2023-05-13 18:09 ` [PATCH 9/9] staging: rtl8192e: Remove undefined function LedControlHandler Philipp Hortmann
  8 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-13 18:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function UpdateBeaconInterruptHandler as it is not defined.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 3f8a58e32930..5fdee7b54f24 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -739,8 +739,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
 	priv->rtllib->rtllib_ips_leave = rtl92e_rtllib_ips_leave;
 
 	priv->rtllib->LedControlHandler = NULL;
-	priv->rtllib->UpdateBeaconInterruptHandler = NULL;
-
 	priv->rtllib->ScanOperationBackupHandler = rtl92e_scan_op_backup;
 }
 
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 6c1f56324bd6..8bafee31e50c 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1714,8 +1714,6 @@ struct rtllib_device {
 	bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev);
 	u8   (*rtllib_ap_sec_type)(struct rtllib_device *ieee);
 	void (*InitialGainHandler)(struct net_device *dev, u8 Operation);
-	void (*UpdateBeaconInterruptHandler)(struct net_device *dev,
-					     bool start);
 	void (*ScanOperationBackupHandler)(struct net_device *dev,
 					   u8 Operation);
 	void (*LedControlHandler)(struct net_device *dev,
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index bb28414b88bc..1fe0675033cb 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2882,9 +2882,6 @@ void rtllib_start_protocol(struct rtllib_device *ieee)
 		ieee->last_packet_time[i] = 0;
 	}
 
-	if (ieee->UpdateBeaconInterruptHandler)
-		ieee->UpdateBeaconInterruptHandler(ieee->dev, false);
-
 	ieee->wmm_acm = 0;
 	/* if the user set the MAC of the ad-hoc cell and then
 	 * switch to managed mode, shall we  make sure that association
@@ -2894,9 +2891,6 @@ void rtllib_start_protocol(struct rtllib_device *ieee)
 	if (ieee->iw_mode == IW_MODE_INFRA) {
 		rtllib_start_bss(ieee);
 	} else if (ieee->iw_mode == IW_MODE_ADHOC) {
-		if (ieee->UpdateBeaconInterruptHandler)
-			ieee->UpdateBeaconInterruptHandler(ieee->dev, true);
-
 		rtllib_start_ibss(ieee);
 
 	} else if (ieee->iw_mode == IW_MODE_MASTER) {
-- 
2.40.1


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

* [PATCH 9/9] staging: rtl8192e: Remove undefined function LedControlHandler
  2023-05-13 18:08 [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop Philipp Hortmann
                   ` (7 preceding siblings ...)
  2023-05-13 18:09 ` [PATCH 8/9] staging: rtl8192e: Remove undefined function UpdateBeaconInterruptHandler Philipp Hortmann
@ 2023-05-13 18:09 ` Philipp Hortmann
  2023-05-28  6:38   ` staging: rtl8192e: Replace drivers rtllib_crypt_ccmp_... with lib80211_crypt_ Philipp Hortmann
  8 siblings, 1 reply; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-13 18:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function LedControlHandler as it is not defined. Remove resulting
unused local variables bLedBlinking, type, fc and LedAction.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 .../staging/rtl8192e/rtl8192e/r8192E_dev.c    |  4 ---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c  | 26 -------------------
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c    |  4 ---
 drivers/staging/rtl8192e/rtllib.h             |  2 --
 drivers/staging/rtl8192e/rtllib_softmac.c     | 10 -------
 5 files changed, 46 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index c612e31d1a84..d9d056d18fa3 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -46,7 +46,6 @@ static void _rtl92e_update_msr(struct net_device *dev)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 	u8 msr;
-	enum led_ctl_mode LedAction = LED_CTL_NO_LINK;
 
 	msr  = rtl92e_readb(dev, MSR);
 	msr &= ~MSR_LINK_MASK;
@@ -55,7 +54,6 @@ static void _rtl92e_update_msr(struct net_device *dev)
 	case IW_MODE_INFRA:
 		if (priv->rtllib->state == RTLLIB_LINKED)
 			msr |= MSR_LINK_MANAGED;
-		LedAction = LED_CTL_LINK;
 		break;
 	case IW_MODE_ADHOC:
 		if (priv->rtllib->state == RTLLIB_LINKED)
@@ -70,8 +68,6 @@ static void _rtl92e_update_msr(struct net_device *dev)
 	}
 
 	rtl92e_writeb(dev, MSR, msr);
-	if (priv->rtllib->LedControlHandler)
-		priv->rtllib->LedControlHandler(dev, LedAction);
 }
 
 void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 5fdee7b54f24..17b70dde7eeb 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -737,8 +737,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
 	priv->rtllib->InitialGainHandler = rtl92e_init_gain;
 	priv->rtllib->rtllib_ips_leave_wq = rtl92e_rtllib_ips_leave_wq;
 	priv->rtllib->rtllib_ips_leave = rtl92e_rtllib_ips_leave;
-
-	priv->rtllib->LedControlHandler = NULL;
 	priv->rtllib->ScanOperationBackupHandler = rtl92e_scan_op_backup;
 }
 
@@ -1272,10 +1270,6 @@ static void _rtl92e_watchdog_wq_cb(void *data)
 			ieee->is_roaming = true;
 			ieee->is_set_key = false;
 			ieee->link_change(dev);
-			if (ieee->LedControlHandler)
-				ieee->LedControlHandler(ieee->dev,
-							LED_CTL_START_TO_LINK);
-
 			notify_wx_assoc_event(ieee);
 
 			if (!(ieee->rtllib_ap_sec_type(ieee) &
@@ -1506,7 +1500,6 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
 				    MAX_DEV_ADDR_SIZE);
 	struct tx_desc *pdesc = NULL;
 	struct rtllib_hdr_1addr *header = NULL;
-	u16 fc = 0, type = 0;
 	u8 *pda_addr = NULL;
 	int   idx;
 	u32 fwinfo_size = 0;
@@ -1522,8 +1515,6 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
 	fwinfo_size = sizeof(struct tx_fwinfo_8190pci);
 
 	header = (struct rtllib_hdr_1addr *)(((u8 *)skb->data) + fwinfo_size);
-	fc = le16_to_cpu(header->frame_ctl);
-	type = WLAN_FC_GET_TYPE(fc);
 	pda_addr = header->addr1;
 
 	if (!is_broadcast_ether_addr(pda_addr) && !is_multicast_ether_addr(pda_addr))
@@ -1545,11 +1536,6 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
 		spin_unlock_irqrestore(&priv->irq_th_lock, flags);
 		return skb->len;
 	}
-
-	if (type == RTLLIB_FTYPE_DATA) {
-		if (priv->rtllib->LedControlHandler)
-			priv->rtllib->LedControlHandler(dev, LED_CTL_TX);
-	}
 	rtl92e_fill_tx_desc(dev, pdesc, tcb_desc, skb);
 	__skb_queue_tail(&ring->queue, skb);
 	pdesc->OWN = 1;
@@ -1776,8 +1762,6 @@ static void _rtl92e_rx_normal(struct net_device *dev)
 	struct r8192_priv *priv = rtllib_priv(dev);
 	struct rtllib_hdr_1addr *rtllib_hdr = NULL;
 	bool unicast_packet = false;
-	bool bLedBlinking = true;
-	u16 fc = 0, type = 0;
 	u32 skb_len = 0;
 	int rx_queue_idx = RX_MPDU_QUEUE;
 
@@ -1821,16 +1805,6 @@ static void _rtl92e_rx_normal(struct net_device *dev)
 			/* unicast packet */
 			unicast_packet = true;
 		}
-		fc = le16_to_cpu(rtllib_hdr->frame_ctl);
-		type = WLAN_FC_GET_TYPE(fc);
-		if (type == RTLLIB_FTYPE_MGMT)
-			bLedBlinking = false;
-
-		if (bLedBlinking)
-			if (priv->rtllib->LedControlHandler)
-				priv->rtllib->LedControlHandler(dev,
-							LED_CTL_RX);
-
 		skb_len = skb->len;
 
 		if (!rtllib_rx(priv->rtllib, skb, &stats)) {
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 0bb657fda06c..8b656980ee25 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -421,10 +421,6 @@ static int _rtl92e_wx_set_scan(struct net_device *dev,
 			mutex_unlock(&priv->rtllib->ips_mutex);
 		}
 		rtllib_stop_scan(priv->rtllib);
-		if (priv->rtllib->LedControlHandler)
-			priv->rtllib->LedControlHandler(dev,
-							 LED_CTL_SITE_SURVEY);
-
 		if (priv->rtllib->rf_power_state != rf_off) {
 			priv->rtllib->actscanning = true;
 
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 8bafee31e50c..4aa5ce9f7792 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1716,8 +1716,6 @@ struct rtllib_device {
 	void (*InitialGainHandler)(struct net_device *dev, u8 Operation);
 	void (*ScanOperationBackupHandler)(struct net_device *dev,
 					   u8 Operation);
-	void (*LedControlHandler)(struct net_device *dev,
-				  enum led_ctl_mode LedAction);
 	void (*SetHwRegHandler)(struct net_device *dev, u8 variable, u8 *val);
 
 	void (*AllowAllDestAddrHandler)(struct net_device *dev,
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 1fe0675033cb..18885cda60f6 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1680,9 +1680,6 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
 								 false;
 
 				ieee->state = RTLLIB_ASSOCIATING;
-				if (ieee->LedControlHandler != NULL)
-					ieee->LedControlHandler(ieee->dev,
-							 LED_CTL_START_TO_LINK);
 				schedule_delayed_work(
 					   &ieee->associate_procedure_wq, 0);
 			} else {
@@ -2343,10 +2340,6 @@ rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb)
 		ieee->link_detect_info.bBusyTraffic = false;
 		rtllib_disassociate(ieee);
 		RemovePeerTS(ieee, header->addr2);
-		if (ieee->LedControlHandler != NULL)
-			ieee->LedControlHandler(ieee->dev,
-						LED_CTL_START_TO_LINK);
-
 		if (!(ieee->rtllib_ap_sec_type(ieee) &
 		    (SEC_ALG_CCMP|SEC_ALG_TKIP)))
 			schedule_delayed_work(
@@ -2641,9 +2634,6 @@ static void rtllib_start_ibss_wq(void *data)
 	ieee->link_change(ieee->dev);
 
 	HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
-	if (ieee->LedControlHandler != NULL)
-		ieee->LedControlHandler(ieee->dev, LED_CTL_LINK);
-
 	rtllib_start_send_beacons(ieee);
 
 	notify_wx_assoc_event(ieee);
-- 
2.40.1


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

* staging: rtl8192e: Replace drivers rtllib_crypt_ccmp_... with lib80211_crypt_...
  2023-05-13 18:09 ` [PATCH 9/9] staging: rtl8192e: Remove undefined function LedControlHandler Philipp Hortmann
@ 2023-05-28  6:38   ` Philipp Hortmann
  2023-05-28 18:37     ` Larry Finger
  0 siblings, 1 reply; 12+ messages in thread
From: Philipp Hortmann @ 2023-05-28  6:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Larry.Finger

Hi,

it is possible to remove three modules from the staging area by replacing:
rtllib_crypt_ccmp with lib80211_crypt_ccmp
rtllib_crypt_tkip with lib80211_crypt_tkip
rtllib_crypt_wep with lib80211_crypt_wep

The following issues arise:
- rtl8192e needs to be switched to software encryption or
   lib80211_crypt_... needs to be extended with hardware encryption.
- Performance is dropping on my computer from 12,5MB/s to 1,5MB/s when
   switching to software encryption.(it does not really change if I use
   rtllib_crypt_ccmp or lib80211_crypt_ccmp)
- Fix: rtllib_rx_decrypt: decrypt frame error that occure sometimes on
   lib80211_crypt_ccmp

Below the changes on the driver that made use of lib80211_crypt_... 
possible.

So the questions are:
Is it worth the effort or is this going in the wrong direction?
Does it help the kernel community or is it just creating more effort?
Why does LIB80211 not support hardware encryption? Or does it?

Thanks for your support.

Bye Philipp

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 17b70dde7eeb..ef0fa05ff510 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -22,7 +22,7 @@

  #include "rtl_pm.h"

-int hwwep = 1;
+int hwwep = 0;
  static char *ifname = "wlan%d";

  static struct pci_device_id rtl8192_pci_id_tbl[] = {
diff --git a/drivers/staging/rtl8192e/rtllib_wx.c 
b/drivers/staging/rtl8192e/rtllib_wx.c
index 82b537da8b21..0db6e32b5494 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -522,16 +522,16 @@ int rtllib_wx_set_encode_ext(struct rtllib_device 
*ieee,
         sec.enabled = 1;
         switch (ext->alg) {
         case IW_ENCODE_ALG_WEP:
-               alg = "R-WEP";
-               module = "rtllib_crypt_wep";
+               alg = "WEP";
+               module = "lib80211_crypt_wep";
                 break;
         case IW_ENCODE_ALG_TKIP:
-               alg = "R-TKIP";
-               module = "rtllib_crypt_tkip";
+               alg = "TKIP";
+               module = "lib80211_crypt_tkip";
                 break;
         case IW_ENCODE_ALG_CCMP:
-               alg = "R-CCMP";
-               module = "rtllib_crypt_ccmp";
+               alg = "CCMP";
+               module = "lib80211_crypt_ccmp";
                 break;
         default:
                 netdev_dbg(ieee->dev, "Unknown crypto alg %d\n", ext->alg);


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

* Re: staging: rtl8192e: Replace drivers rtllib_crypt_ccmp_... with lib80211_crypt_...
  2023-05-28  6:38   ` staging: rtl8192e: Replace drivers rtllib_crypt_ccmp_... with lib80211_crypt_ Philipp Hortmann
@ 2023-05-28 18:37     ` Larry Finger
  0 siblings, 0 replies; 12+ messages in thread
From: Larry Finger @ 2023-05-28 18:37 UTC (permalink / raw)
  To: Philipp Hortmann, Greg Kroah-Hartman, linux-staging, linux-kernel

On 5/28/23 01:38, Philipp Hortmann wrote:
> Hi,
> 
> it is possible to remove three modules from the staging area by replacing:
> rtllib_crypt_ccmp with lib80211_crypt_ccmp
> rtllib_crypt_tkip with lib80211_crypt_tkip
> rtllib_crypt_wep with lib80211_crypt_wep
> 
> The following issues arise:
> - rtl8192e needs to be switched to software encryption or
>    lib80211_crypt_... needs to be extended with hardware encryption.
> - Performance is dropping on my computer from 12,5MB/s to 1,5MB/s when
>    switching to software encryption.(it does not really change if I use
>    rtllib_crypt_ccmp or lib80211_crypt_ccmp)
> - Fix: rtllib_rx_decrypt: decrypt frame error that occure sometimes on
>    lib80211_crypt_ccmp
> 
> Below the changes on the driver that made use of lib80211_crypt_... possible.
> 
> So the questions are:
> Is it worth the effort or is this going in the wrong direction?
> Does it help the kernel community or is it just creating more effort?
> Why does LIB80211 not support hardware encryption? Or does it?

I do not know why LIB80211 does not support hardware encryption, but the 
performance hit you report is not acceptable!

Larry



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

end of thread, other threads:[~2023-05-28 18:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-13 18:08 [PATCH 0/9] staging: rtl8192e: Remove undefined functions like data_hard_stop Philipp Hortmann
2023-05-13 18:08 ` [PATCH 1/9] staging: rtl8192e: Remove undefined function data_hard_stop Philipp Hortmann
2023-05-13 18:08 ` [PATCH 2/9] staging: rtl8192e: Remove undefined function data_hard_resume Philipp Hortmann
2023-05-13 18:08 ` [PATCH 3/9] staging: rtl8192e: Remove functions rtllib_start_hw_scan and stop Philipp Hortmann
2023-05-13 18:09 ` [PATCH 4/9] staging: rtl8192e: Remove undefined function reset_port Philipp Hortmann
2023-05-13 18:09 ` [PATCH 5/9] staging: rtl8192e: Remove undefined function hard_start_xmit Philipp Hortmann
2023-05-13 18:09 ` [PATCH 6/9] staging: rtl8192e: Remove undefined function set_security Philipp Hortmann
2023-05-13 18:09 ` [PATCH 7/9] staging: rtl8192e: Remove undefined function SetFwCmdHandler Philipp Hortmann
2023-05-13 18:09 ` [PATCH 8/9] staging: rtl8192e: Remove undefined function UpdateBeaconInterruptHandler Philipp Hortmann
2023-05-13 18:09 ` [PATCH 9/9] staging: rtl8192e: Remove undefined function LedControlHandler Philipp Hortmann
2023-05-28  6:38   ` staging: rtl8192e: Replace drivers rtllib_crypt_ccmp_... with lib80211_crypt_ Philipp Hortmann
2023-05-28 18:37     ` Larry Finger

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