staging: rtl8192e: Remove undefined function hard_start_xmit
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sat, 13 May 2023 18:09:09 +0000 (20:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 May 2023 09:11:12 +0000 (10:11 +0100)
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>
Link: https://lore.kernel.org/r/603a143ba506ca031d7bd70a844b9f080872d601.1683960684.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_tx.c

index cc4247e..7be02cf 100644 (file)
@@ -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
index 54119fb..c3f1910 100644 (file)
@@ -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);
                }
        }