Kompilera drivrutin för Realtek 8192CU och 8188CU under linux

Hade en massa problem att hitta info om detta så jag skriver en liten minnesanteckning här om det.

Hi,

I stumbled across this forum when trying to install the driver for my EDUP EP-N8508 (USB) on a dual-core AMD64.

stock kernel
Linux cerberus 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
from Natty.

drivers
RTL8192CU_8188CUS_8188CE-VAU_linux_v2.0.1324.20110126
from http://www.realtek.com.tw/downloads/…oads=true#2742

Unfortunately no compilation out of the box. So I changed:

1. in: os_dep/osdep_service.c (line 305)
replace “init_MUTEX(pmutex)” with “sema_init(pmutex,1)”

2. in: os_dep/linux/usb_intf.c (line 917)
comment (or delete) the line
//pdvobjpriv->pusbdev->autosuspend_delay = 0 * HZ;//15 * HZ; idle-delay time

(error: ‘struct usb_device’ has no member named ‘autosuspend_delay’)

then the driver compiles and loads with
insmod ./8192cu.ko

(make install works too, now the module is automatically loaded upon boot)

I am not sure if this will break something (setting a non-existent variable to 0 shouldn’t have a big influence…)
Maybe edup or the kernel maintainers can fix this (and actually get the drivers into the stock kernel).

thanks for your help,
Stefan

PS: you could get rid of two warnings if you also change in hal/rtl8192c/usb/rtl8192c_cmd.c
replace “%d” with “%lu” in lines 2045 and 2124

DBG_871X(“Set RSVD page location to Fw Len(%d).\n”,sizeof(RsvdPageLoc));
printk(“%s H2C len(%d)\n”,__FUNCTION__,sizeof(JoinBssRptParm));
(warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’)

still one to go:
os_dep/linux/ioctl_linux.c:478:1: warning: the frame size of 1072 bytes is larger than 1024 bytes


2 thoughts on “Kompilera drivrutin för Realtek 8192CU och 8188CU under linux”

  1. Hi

    Replace

    pdvobjpriv->pusbdev->autosuspend_delay = 0 * HZ;//15 * HZ; idle-delay time

    by

    pm_runtime_set_autosuspend_delay(&pdvobjpriv->pusbdev->dev, 0 * HZ);

    And it should compile without errors

  2. Thankyou for your reply.

    But sorry, no this doesnt work either.
    I have got the driver to work, but if I have the internal wifi-card activated I get a kernel panic when I insert the 8192-card.

    Any other ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *