Linux driver for ZTE ZXDSL v2 (Unicorn II ADSL Usb) updated again!

Updated to work with Linux kernel >= 3.6.10 by Zbigniew Luszpinski 2013-05-04 – Thanks!

Source code migrated to https://github.com/mariuszs/unicorn-ii-adsl-usb-linux-driver

10 Maj 2013 at 23:16 Dodaj komentarz

Simple Design

  1. Passes its tests
  2. Minimizes duplication
  3. Maximizes clarity
  4. Has fewer elements

4 kwietnia 2013 at 11:41 Dodaj komentarz

Terminator Settings

My private terminator settings 🙂

[global_config]
 focus = system
 dbus = True
 window_state = maximise
[keybindings]
 full_screen = <Ctrl><Shift>F11
[profiles]
 [[default]]
 scrollback_lines = '5000'
 font = "Inconsolata Medium 11" 
 enable_real_transparency = True
 background_type = transparent
 background_darkness = 0.9
 transparent = True
 use_system_font = False
 copy_on_selection = True

7 kwietnia 2012 at 14:09 Dodaj komentarz

Unicorn/ZTE ZXDSL Linux Driver moved to Google Code

All further information about Unicorn/ZTE ZXDSL Linux Driver are moved to Googe Code Project Page.

http://code.google.com/p/unicorn-ii-adsl-usb-linux-driver

21 sierpnia 2011 at 21:49 Dodaj komentarz

Unicorn resurection for 2.6.37 and 2.6.38+ – Crappy modem never die ;)

ZTE ZXDSL v2 driver update for Linux Kernel 2.6.37+ (x86), as usual not tested confirmed to work on Slackware. Compiled fine under Fedora 15 (2.6.38).

mkdir unicorn
cd unicorn
wget http://linnet.cba.pl/attachment.php?aid=5 -O  zxdsl852.tar.gz
tar zxvf zxdsl852.tar.gz
wget http://mariuszs.googlepages.com/zxdslv2-2.6.38.patch -O zxdslv2-2.6.38.patch
patch -p1 < zxdslv2-2.6.38.patch
make
sudo make install

Please confirm if this works for you 😉

Spc confirmed that this works, Thanks!

modinfo unicorn_usb_eth
filename:       /lib/modules/2.6.38-1.fc15.i686.PAE/extra/unicorn_usb_eth.ko
license:        GPL
description:    ATM driver for the ST UNICORN II ADSL modem.
author:         ashutosh.sharma@st.com
alias:          usb:v0483p0138d*dc*dsc*dp*ic*isc*ip*
depends:
vermagic:       2.6.38-1.fc15.i686.PAE SMP mod_unload 686
parm:           if_name:charp
parm:           mac_address:charp
parm:           VPI:int
parm:           VCI:int
parm:           PROTOCOL:charp
parm:           ENCAPS:charp
parm:           ActivationMode:long
parm:           AlternativeSetting:long
parm:           AutoActivation:long
parm:           DownstreamRate:long
parm:           LoopbackMode:long
parm:           MswDebugLevel:long
parm:           RetryTime:long
parm:           DebugLevel:long
parm:           ledScenario:long

31 marca 2011 at 23:00 10 Komentarzy

ZTE ZXDSL v2 driver for Linux Kernel 2.6.31 x86 [Offline Installation]

Many peoples have problem with installation instruction. I tested it on computer with network connection 😉 So, this is offline howto.

Requirements:

Download this files when you are ONLINE (on other computer, by GPRS connection etc)

  • Old driver (steryzxdsl.tar), from page http://linnet.cba.pl/attachment.php?aid=5
  • Patch (zxdslv2-2.6.31.diff), from page http://mariuszs.googlepages.com/zxdslv2-2.6.31.diff
  • Put this files in unicorn directory

    Compilation:

    cd unicorn
    tar zxvf steryzxdsl.tar.gz
    patch src/unicorn_ethdrv.c < zxdslv2-2.6.31.diff
    make
    sudo make install

    25 lutego 2010 at 17:57 2 Komentarze

    ZTE ZXDSL v2 driver update for Linux Kernel 2.6.31 – 2.6.35 x86

    This is patch for ZTE ZXDSL 852 v2 ADSL modem USB Driver
    Driver version: USB-ADL-7-2.0-0.2.0.11.

    Requirements (Ubuntu)

    Package build-essential is required.

    Run

    # sudo apt-cdrom add

    from command line (terminal) if you are offline. This require installation CD-ROM inserted into drive.

    Installation

    # sudo apt-get install build-essential

    Howto

    mkdir unicorn
    cd unicorn
    wget http://linnet.cba.pl/attachment.php?aid=5 -O  zxdsl852.tar.gz
    tar zxvf zxdsl852.tar.gz
    wget http://mariuszs.googlepages.com/zxdslv2-2.6.31.diff -O zxdslv2-2.6.31.diff
    patch src/unicorn_ethdrv.c < zxdslv2-2.6.31.diff
    make
    sudo make install

    Explanation

    • The priv field has been removed from struct net_device; drivers should use netdev_priv() instead.
    • The owner field of struct proc_dir_entry has been removed, causing lots of changes throughout the tree.
    • Most of the callback functions/methods associated with the net_device structure have been moved out of that structure and into the new struct net_device_ops. In-tree drivers have been converted to the new API.

    Code

    cat zxdslv2-2.6.31.diff

    --- ../oryg/src/unicorn_ethdrv.c	2008-10-02 14:10:27.000000000 +0200
    +++ src/unicorn_ethdrv.c	2009-11-30 19:20:37.733581549 +0100
    @@ -3,6 +3,9 @@
       The chipset consists of the ADSL DMT transceiver ST70138 and the
       ST20174 Analog Front End (AFE).
       This file contains the ethernet interface and SAR routines.
    +
    +  Updated to work with Linux kernel >= 2.6.31 by
    +  Mariusz Smykuła 2009-11-30
     */
     #include
     #include
    @@ -961,7 +964,7 @@
    
     static int unicorn_eth_send(struct sk_buff *skb, struct net_device *eth_dev)
     {
    -	struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *) eth_dev->priv;
    +	struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *) netdev_priv(eth_dev);
     	struct atm_ext_skb_data *skb_data;
      	int status;
    
    @@ -1082,7 +1085,7 @@
    
     static int unicorn_eth_open(struct net_device *eth_dev)
     {
    -	struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)eth_dev->priv;
    +	struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)netdev_priv(eth_dev);
    
     	DBG(ATM_D,"vpi=%d,vci=%d\n",drv->vpi,drv->vci);
    
    @@ -1100,12 +1103,12 @@
     	// Install the proc_read function in /proc/net/atm/
     #ifndef CONFIG_ATM
     	atm_proc_root = proc_mkdir("net/atm",NULL);
    -	if (atm_proc_root) atm_proc_root->owner=THIS_MODULE;
    +	//if (atm_proc_root) atm_proc_root->owner=THIS_MODULE;
     #endif
     	if (atm_proc_root) {
     		drv->proc_dir_entry = create_proc_read_entry("UNICORN:0",0,atm_proc_root,unicorn_eth_proc_read,drv);
     		if (drv->proc_dir_entry) {
    -			drv->proc_dir_entry->owner = THIS_MODULE;
    +			//drv->proc_dir_entry->owner = THIS_MODULE;
     		} else {
     			DBG(ATM_D,"no proc entry installed\n");
     		}
    @@ -1126,7 +1129,7 @@
     static int
     unicorn_eth_close(struct net_device *eth_dev)
     {
    -	struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)eth_dev->priv;
    +	struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)netdev_priv(eth_dev);
    
     	DBG(ATM_D,"\n");
    
    @@ -1153,7 +1156,7 @@
    
     static struct net_device_stats *unicorn_eth_stats(struct net_device *eth_dev)
     {
    -	struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)eth_dev->priv;
    +	struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)netdev_priv(eth_dev);
     	return &drv->eth_stats;
     }
    
    @@ -1305,7 +1308,7 @@
    
     static int unicorn_eth_ioctl(struct net_device *eth_dev, struct ifreq *rq, int cmd)
     {
    -	struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)eth_dev->priv;
    +	struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)netdev_priv(eth_dev);
     	T_MswCtrl ctrl;
     	void *user_buffer;
     	int err = -ENOTTY;
    @@ -1376,6 +1379,18 @@
     #endif
     #endif
    
    +
    +static const struct net_device_ops unicorn_netdev_ops = {
    +       	.ndo_open               = unicorn_eth_open,
    +       	.ndo_stop               = unicorn_eth_close,
    +	.ndo_do_ioctl		= unicorn_eth_ioctl,
    +       	.ndo_change_mtu         = unicorn_eth_change_mtu,
    +       	.ndo_start_xmit         = unicorn_eth_send,
    +      	.ndo_get_stats 		= unicorn_eth_stats,
    +	.ndo_set_multicast_list = unicorn_eth_set_multicast,
    +	.ndo_tx_timeout        	= unicorn_eth_tx_timeout
    +};
    +
     int unicorn_eth_init(void)
     {
     	struct net_device *eth_dev;
    @@ -1391,11 +1406,11 @@
     	}
    
     	eth_dev = alloc_etherdev(sizeof(struct unicorn_ethdrv));
    -	if (!eth_dev || !eth_dev->priv) {
    +	if (!eth_dev || !netdev_priv(eth_dev)) {
     		DBG(ATM_D,"no memory for drv data\n");
     		return -ENOMEM;
     	}
    -	unicorn_ethdrv = drv = eth_dev->priv;
    +	unicorn_ethdrv = drv = netdev_priv(eth_dev);
     	memset(drv, 0, sizeof(struct unicorn_ethdrv));
     #if 	(LINUX_VERSION_CODE open               = unicorn_eth_open;
    -	eth_dev->stop               = unicorn_eth_close;
    -	eth_dev->do_ioctl           = unicorn_eth_ioctl;
    -	eth_dev->change_mtu         = unicorn_eth_change_mtu;
    -	eth_dev->hard_start_xmit    = unicorn_eth_send;
    -	eth_dev->get_stats          = unicorn_eth_stats;
    -	eth_dev->set_multicast_list = unicorn_eth_set_multicast;
    -	eth_dev->tx_timeout         = unicorn_eth_tx_timeout;
    +	eth_dev->netdev_ops = &unicorn_netdev_ops;
    +
     	eth_dev->watchdog_timeo     = HZ*5;
    
     	return 0;

    Results

    # modinfo unicorn_usb_eth
    filename:       /lib/modules/2.6.31-15-generic/extra/unicorn_usb_eth.ko
    license:        GPL
    description:    ATM driver for the ST UNICORN II ADSL modem.
    author:         ashutosh.sharma@st.com
    alias:          usb:v0483p0138d*dc*dsc*dp*ic*isc*ip*
    depends:
    vermagic:       2.6.31-15-generic SMP mod_unload modversions 586
    parm:           if_name:charp
    parm:           mac_address:charp
    parm:           VPI:int
    parm:           VCI:int
    parm:           PROTOCOL:charp
    parm:           ENCAPS:charp
    parm:           ActivationMode:long
    parm:           AlternativeSetting:long
    parm:           AutoActivation:long
    parm:           DownstreamRate:long
    parm:           LoopbackMode:long
    parm:           MswDebugLevel:long
    parm:           RetryTime:long
    parm:           DebugLevel:long
    parm:           ledScenario:long

    Source

    Download: zxdslv2-2.6.31.diff

    References

    API changes in the 2.6 kernel series

    2 grudnia 2009 at 20:57 18 Komentarzy


    Kategorie

  • Blogroll

  • Feeds