summaryrefslogtreecommitdiff
path: root/drivers/staging/csr
diff options
context:
space:
mode:
authorPriit Laes <plaes@plaes.org>2012-09-01 09:05:58 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-04 21:30:15 (GMT)
commit58abe64fcfb2bc7b8d22792a6bf889e8d1d7ccb3 (patch)
treebaf02b27229bc6de55a0b72bb2517f7f572464b2 /drivers/staging/csr
parent0505c63d3a70fd7ac3eabf2851e6415042faa098 (diff)
downloadlinux-fsl-qoriq-58abe64fcfb2bc7b8d22792a6bf889e8d1d7ccb3.tar.xz
staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.27
Signed-off-by: Priit Laes <plaes@plaes.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/csr')
-rw-r--r--drivers/staging/csr/netdev.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/drivers/staging/csr/netdev.c b/drivers/staging/csr/netdev.c
index 1d06241..c8f6d8e 100644
--- a/drivers/staging/csr/netdev.c
+++ b/drivers/staging/csr/netdev.c
@@ -215,9 +215,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)
@@ -2337,8 +2334,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 */
@@ -3198,25 +3193,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);
@@ -3229,7 +3210,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",
@@ -3239,12 +3219,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;
@@ -3253,11 +3227,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;
@@ -3304,11 +3274,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;
@@ -3338,11 +3304,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;
@@ -3477,11 +3439,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);