Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205639
b: refs/heads/master
c: 5749df1
h: refs/heads/master
i:
  205637: 4ab6673
  205635: 43f22b6
  205631: ac8b4be
v: v3
  • Loading branch information
Jiri Kosina authored and Greg Kroah-Hartman committed Jun 18, 2010
1 parent 76ab69d commit dbb8504
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 525 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41a38d9e632f7c9ec5ad8fc627567d97f4302c4a
refs/heads/master: 5749df14aef6d3fd7146f17e4f0c61526a53766e
12 changes: 0 additions & 12 deletions trunk/drivers/staging/cxt1e1/functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,7 @@ watchdog_func (unsigned long arg)
pr_warning("%s: drvr not available (%x)\n", __func__, drvr_state);
return;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
/* Initialize the tq entry only the first time */
if (wd->init_tq)
{
wd->init_tq = 0;
wd->tq.routine = wd->func;
wd->tq.sync = 0;
wd->tq.data = wd->softc;
}
schedule_task (&wd->tq);
#else
schedule_work (&wd->work);
#endif
mod_timer (&wd->h, jiffies + wd->ticks);
}

Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/staging/cxt1e1/hwprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,9 @@ c4hw_attach_all (void)
error_flag = 0;
prep_hdw_info ();
/*** scan PCI bus for all possible boards */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
while ((pdev = pci_get_device (PCI_VENDOR_ID_CONEXANT,
PCI_DEVICE_ID_CN8474,
pdev)))
#else
while ((pdev = pci_find_device (PCI_VENDOR_ID_CONEXANT,
PCI_DEVICE_ID_CN8474,
pdev)))
#endif
{
if (c4_hdw_init (pdev, found))
found++;
Expand Down
123 changes: 0 additions & 123 deletions trunk/drivers/staging/cxt1e1/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ getuserbychan (int channum)
}


#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#define DEV_TO_PRIV(dev) ( * (struct c4_priv **) ((hdlc_device*)(dev)+1))
#else

char *
get_hdlc_name (hdlc_device * hdlc)
{
Expand All @@ -154,7 +150,6 @@ get_hdlc_name (hdlc_device * hdlc)

return dev->name;
}
#endif


static status_t
Expand All @@ -167,7 +162,6 @@ mkret (int bsd)
}

/***************************************************************************/
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41)
#include <linux/workqueue.h>

/***
Expand Down Expand Up @@ -259,7 +253,6 @@ c4_wq_port_cleanup (mpi_t * pi)
pi->wq_port = 0;
}
}
#endif

/***************************************************************************/

Expand Down Expand Up @@ -291,48 +284,6 @@ void_open (struct net_device * ndev)
}


#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#if !defined(GENERIC_HDLC_VERSION) || (GENERIC_HDLC_VERSION < 4)

/** Linux 2.4.18-19 **/
STATIC int
chan_open (hdlc_device * hdlc)
{
status_t ret;

if ((ret = c4_chan_up (DEV_TO_PRIV (hdlc)->ci, DEV_TO_PRIV (hdlc)->channum)))
return -ret;
MOD_INC_USE_COUNT;
netif_start_queue (hdlc_to_dev (hdlc));
return 0; /* no error = success */
}

#else

/** Linux 2.4.20 and higher **/
STATIC int
chan_open (struct net_device * ndev)
{
hdlc_device *hdlc = dev_to_hdlc (ndev);
status_t ret;

hdlc->proto = IF_PROTO_HDLC;
if ((ret = hdlc_open (hdlc)))
{
pr_info("hdlc_open failure, err %d.\n", ret);
return ret;
}
if ((ret = c4_chan_up (DEV_TO_PRIV (hdlc)->ci, DEV_TO_PRIV (hdlc)->channum)))
return -ret;
MOD_INC_USE_COUNT;
netif_start_queue (hdlc_to_dev (hdlc));
return 0; /* no error = success */
}
#endif

#else

/** Linux 2.6 **/
STATIC int
chan_open (struct net_device * ndev)
{
Expand All @@ -351,39 +302,8 @@ chan_open (struct net_device * ndev)
netif_start_queue (ndev);
return 0; /* no error = success */
}
#endif


#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#if !defined(GENERIC_HDLC_VERSION) || (GENERIC_HDLC_VERSION < 4)

/** Linux 2.4.18-19 **/
STATIC void
chan_close (hdlc_device * hdlc)
{
netif_stop_queue (hdlc_to_dev (hdlc));
musycc_chan_down ((ci_t *) 0, DEV_TO_PRIV (hdlc)->channum);
MOD_DEC_USE_COUNT;
}
#else

/** Linux 2.4.20 and higher **/
STATIC int
chan_close (struct net_device * ndev)
{
hdlc_device *hdlc = dev_to_hdlc (ndev);

netif_stop_queue (hdlc_to_dev (hdlc));
musycc_chan_down ((ci_t *) 0, DEV_TO_PRIV (hdlc)->channum);
hdlc_close (hdlc);
MOD_DEC_USE_COUNT;
return 0;
}
#endif

#else

/** Linux 2.6 **/
STATIC int
chan_close (struct net_device * ndev)
{
Expand All @@ -396,7 +316,6 @@ chan_close (struct net_device * ndev)
module_put (THIS_MODULE);
return 0;
}
#endif


#if !defined(GENERIC_HDLC_VERSION) || (GENERIC_HDLC_VERSION < 4)
Expand Down Expand Up @@ -435,11 +354,7 @@ chan_dev_ioctl (struct net_device * dev, struct ifreq * ifr, int cmd)


STATIC int
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
chan_attach_noop (hdlc_device * hdlc, unsigned short foo_1, unsigned short foo_2)
#else
chan_attach_noop (struct net_device * ndev, unsigned short foo_1, unsigned short foo_2)
#endif
{
return 0; /* our driver has nothing to do here, show's
* over, go home */
Expand All @@ -455,16 +370,12 @@ chan_get_stats (struct net_device * ndev)
struct sbecom_chan_stats *stats;
int channum;

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
channum = DEV_TO_PRIV (ndev)->channum;
#else
{
struct c4_priv *priv;

priv = (struct c4_priv *) dev_to_hdlc (ndev)->priv;
channum = priv->channum;
}
#endif

ch = c4_find_chan (channum);
if (ch == NULL)
Expand Down Expand Up @@ -527,13 +438,9 @@ c4_linux_xmit (struct sk_buff * skb, struct net_device * ndev)
const struct c4_priv *priv;
int rval;

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
priv = DEV_TO_PRIV (ndev);
#else
hdlc_device *hdlc = dev_to_hdlc (ndev);

priv = hdlc->priv;
#endif

rval = musycc_start_xmit (priv->ci, priv->channum, skb);
return -rval;
Expand Down Expand Up @@ -823,18 +730,10 @@ do_create_chan (struct net_device * ndev, void *data)
ret = mkret (c4_new_chan (ci, cp.port, cp.channum, dev));
if (ret)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
rtnl_unlock (); /* needed due to Ioctl calling sequence */
V7 (unregister_hdlc_device) (dev_to_hdlc (dev));
rtnl_lock (); /* needed due to Ioctl calling sequence */
OS_kfree (DEV_TO_PRIV (dev));
OS_kfree (dev);
#else
rtnl_unlock (); /* needed due to Ioctl calling sequence */
unregister_hdlc_device (dev);
rtnl_lock (); /* needed due to Ioctl calling sequence */
free_netdev (dev);
#endif
}
return ret;
}
Expand Down Expand Up @@ -883,11 +782,7 @@ do_deluser (struct net_device * ndev, int lockit)
const struct c4_priv *priv;
int channum;

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
priv = DEV_TO_PRIV (ndev);
#else
priv = (struct c4_priv *) dev_to_hdlc (ndev)->priv;
#endif
ci = priv->ci;
channum = priv->channum;

Expand All @@ -897,22 +792,12 @@ do_deluser (struct net_device * ndev, int lockit)
ch->user = 0; /* will be freed, below */
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
if (lockit)
rtnl_unlock (); /* needed if Ioctl calling sequence */
V7 (unregister_hdlc_device) (dev_to_hdlc (ndev));
if (lockit)
rtnl_lock (); /* needed if Ioctl calling sequence */
OS_kfree (DEV_TO_PRIV (ndev));
OS_kfree (ndev);
#else
if (lockit)
rtnl_unlock (); /* needed if Ioctl calling sequence */
unregister_hdlc_device (ndev);
if (lockit)
rtnl_lock (); /* needed if Ioctl calling sequence */
free_netdev (ndev);
#endif
return 0;
}

Expand Down Expand Up @@ -1339,14 +1224,6 @@ c4_mod_remove (void)
module_init (c4_mod_init);
module_exit (c4_mod_remove);

#ifndef SBE_INCLUDE_SYMBOLS
#ifndef CONFIG_SBE_WANC24_NCOMM
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
EXPORT_NO_SYMBOLS;
#endif
#endif
#endif

MODULE_AUTHOR ("SBE Technical Services <support@sbei.com>");
MODULE_DESCRIPTION ("wanPCI-CxT1E1 Generic HDLC WAN Driver module");
#ifdef MODULE_LICENSE
Expand Down
Loading

0 comments on commit dbb8504

Please sign in to comment.