mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Priit Laes <plaes@plaes.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Priit Laes <plaes@plaes.org>
Subject: [PATCH 02/14] staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.27
Date: Sat,  1 Sep 2012 12:05:58 +0300	[thread overview]
Message-ID: <1346490370-32438-3-git-send-email-plaes@plaes.org> (raw)
In-Reply-To: <1346490370-32438-1-git-send-email-plaes@plaes.org>


Signed-off-by: Priit Laes <plaes@plaes.org>
---
 drivers/staging/csr/netdev.c | 42 ------------------------------------------
 1 file changed, 42 deletions(-)

diff --git a/drivers/staging/csr/netdev.c b/drivers/staging/csr/netdev.c
index 7b7d3fd..c44526e 100644
--- a/drivers/staging/csr/netdev.c
+++ b/drivers/staging/csr/netdev.c
@@ -216,9 +216,6 @@ static struct Qdisc_ops uf_qdisc_ops =
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
 #define UF_QDISC_CREATE_DFLT(_dev, _ops, _root)
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
-#define UF_QDISC_CREATE_DFLT(_dev, _ops, _root)         \
-    qdisc_create_dflt(dev, netdev_get_tx_queue(_dev, 0), _ops, _root)
 #else
 #define UF_QDISC_CREATE_DFLT(_dev, _ops, _root)         \
     qdisc_create_dflt(dev, _ops)
@@ -2338,8 +2335,6 @@ uf_resume_data_plane(unifi_priv_t *priv, int queue,
         if (netif_running(priv->netdev[interfaceTag])) {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
             netif_tx_schedule_all(priv->netdev[interfaceTag]);
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
-            netif_schedule_queue(netdev_get_tx_queue(priv->netdev[interfaceTag], 0));
 #else
             netif_schedule(priv->netdev[interfaceTag]);
 #endif /* LINUX_VERSION_CODE */
@@ -3199,25 +3194,11 @@ void uf_net_get_name(struct net_device *dev, char *name, int len)
 int uf_install_qdisc(struct net_device *dev)
 {
     struct Qdisc *qdisc;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
     struct netdev_queue *queue0;
-#endif /* LINUX_VERSION_CODE */
 
 
     func_enter();
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-    /*
-     * check that there is no qdisc currently attached to device
-     * this ensures that we will be the root qdisc. (I can't find a better
-     * way to test this explicitly)
-     */
-    if (dev->qdisc_sleeping != &noop_qdisc) {
-        func_exit_r(-EFAULT);
-        return -EINVAL;
-    }
-#endif /* LINUX_VERSION_CODE */
-
     qdisc = UF_QDISC_CREATE_DFLT(dev, &uf_qdisc_ops, TC_H_ROOT);
     if (!qdisc) {
         unifi_error(NULL, "%s: qdisc installation failed\n", dev->name);
@@ -3230,7 +3211,6 @@ int uf_install_qdisc(struct net_device *dev)
     qdisc->handle = 0x80020000;
     qdisc->flags = 0x0;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
     queue0 = netdev_get_tx_queue(dev, 0);
     if (queue0 == NULL) {
         unifi_error(NULL, "%s: netdev_get_tx_queue returned no queue\n",
@@ -3240,12 +3220,6 @@ int uf_install_qdisc(struct net_device *dev)
     }
     queue0->qdisc = qdisc;
     queue0->qdisc_sleeping = qdisc;
-#else
-    qdisc_lock_tree(dev);
-    list_add_tail(&qdisc->list, &dev->qdisc_list);
-    dev->qdisc_sleeping = qdisc;
-    qdisc_unlock_tree(dev);
-#endif /* LINUX_VERSION_CODE */
 
     func_exit_r(0);
     return 0;
@@ -3254,11 +3228,7 @@ int uf_install_qdisc(struct net_device *dev)
 
 static int uf_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
     netInterface_priv_t *interfacePriv = (netInterface_priv_t *)netdev_priv(qd->dev_queue->dev);
-#else
-    netInterface_priv_t *interfacePriv = (netInterface_priv_t *)netdev_priv(qd->dev);
-#endif /* LINUX_VERSION_CODE */
     unifi_priv_t *priv = interfacePriv->privPtr;
     struct uf_sched_data *q = qdisc_priv(qd);
     struct uf_tx_packet_data *pkt_data = (struct uf_tx_packet_data *) skb->cb;
@@ -3305,11 +3275,7 @@ static int uf_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
 
 static int uf_qdiscop_requeue(struct sk_buff *skb, struct Qdisc* qd)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
     netInterface_priv_t *interfacePriv = (netInterface_priv_t*)netdev_priv(qd->dev_queue->dev);
-#else
-    netInterface_priv_t *interfacePriv = (netInterface_priv_t*)netdev_priv(qd->dev);
-#endif /* LINUX_VERSION_CODE */
     unifi_priv_t *priv = interfacePriv->privPtr;
     struct uf_sched_data *q = qdisc_priv(qd);
     struct uf_tx_packet_data *pkt_data = (struct uf_tx_packet_data *) skb->cb;
@@ -3339,11 +3305,7 @@ static int uf_qdiscop_requeue(struct sk_buff *skb, struct Qdisc* qd)
 
 static struct sk_buff *uf_qdiscop_dequeue(struct Qdisc* qd)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
     netInterface_priv_t *interfacePriv = (netInterface_priv_t *)netdev_priv(qd->dev_queue->dev);
-#else
-    netInterface_priv_t *interfacePriv = (netInterface_priv_t *)netdev_priv(qd->dev);
-#endif /* LINUX_VERSION_CODE */
     unifi_priv_t *priv = interfacePriv->privPtr;
     struct uf_sched_data *q = qdisc_priv(qd);
     struct sk_buff *skb;
@@ -3478,11 +3440,7 @@ static int uf_qdiscop_tune(struct Qdisc *qd, struct nlattr *opt)
 /* called during initial creation of qdisc on device */
 static int uf_qdiscop_init(struct Qdisc *qd, struct nlattr *opt)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
     struct net_device *dev = qd->dev_queue->dev;
-#else
-    struct net_device *dev = qd->dev;
-#endif /* LINUX_VERSION_CODE */
     netInterface_priv_t *interfacePriv = (netInterface_priv_t *)netdev_priv(dev);
     unifi_priv_t *priv = interfacePriv->privPtr;
     struct uf_sched_data *q = qdisc_priv(qd);
-- 
1.7.12


  parent reply	other threads:[~2012-09-01  9:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-01  9:05 [PATCH 00/14] staging: csr: Remove kernel version checks Priit Laes
2012-09-01  9:05 ` [PATCH 01/14] staging: csr: netdev.c: Clean up KERNEL_VERSION checks: <=2.6.25 Priit Laes
2012-09-01  9:05 ` Priit Laes [this message]
2012-09-01  9:05 ` [PATCH 03/14] staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.28 Priit Laes
2012-09-01  9:06 ` [PATCH 04/14] staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.29 Priit Laes
2012-09-01  9:06 ` [PATCH 05/14] staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.32 Priit Laes
2012-09-01  9:06 ` [PATCH 06/14] staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.34 Priit Laes
2012-09-01  9:06 ` [PATCH 07/14] staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.37 Priit Laes
2012-09-01  9:06 ` [PATCH 08/14] staging: csr: remove unused define ALLOW_Q_PAUSE Priit Laes
2012-09-01  9:06 ` [PATCH 09/14] staging: csr: Drop unused UNIFI_NET_NAME configuration option Priit Laes
2012-09-01  9:06 ` [PATCH 10/14] staging: csr: drv.c: Remove KERNEL_VERSION checks and associated defines Priit Laes
2012-09-01  9:06 ` [PATCH 11/14] staging: csr: unifi_wext.h: Remove KERNEL_VERSION checks Priit Laes
2012-09-01  9:06 ` [PATCH 12/14] staging: csr: unifi_priv.h: " Priit Laes
2012-09-01  9:06 ` [PATCH 13/14] staging: csr: Remove unneeded UF_NETIF_TX_* macros Priit Laes
2012-09-01  9:06 ` [PATCH 14/14] staging: csr: Remove all leftover kernel version checks \o/ Priit Laes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346490370-32438-3-git-send-email-plaes@plaes.org \
    --to=plaes@plaes.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®