TP-LINK TL-WN725N ubuntu13.04 驱动问题解决

linux

新的一些硬件驱动往往第一时间不在 Linux 上面发布, 这也是 Linux 推广到普通人群的一个主要问题之一.

这不, 最近刚解决一个驱动问题, 也发现别人都遇到过, 发在上面以期帮助大家少走弯路.

关键词: 8188eu, kernel 3.8.0

先声明一点, 有些问题看似相同, 但可能有本质差别, 此文解决的环境如下:

TP-LINK TL-WN725N 在 unbuntu 13.04 中的驱动安装问题. 本质问题是 realtek 8188eu 无线驱动在 linux kernel 3.8.0 中的安装问题.

OK, 开始,

第一步, 先查问题, lsusb 查到硬件id为 0bda:8179, 再到google之, 知道是 8188eu 的驱动.

第二步, 下载驱动, 正常搜索 realtek官网, 可以找到, 但一看, nnd, 是2.6内核的, 3.0以上是不可用的.

继续找, 发现这里: https://github.com/Red54/linux-shumeipai2/tree/sunxi-3.0/drivers/net/wireless/rtl8188eu 这个已经支持3.x. 好, 使用

git clone --depth 1 xxx_url

下载之.

第三步, 编译安装, 驱动的编译安装也很简单, 无非就是

    make
    make install
    depmod -a
    modprobe xxx

但是, 这里才出现问题的关键, 8188eu 在 3.5.x 内核以下版本都没有问题, 3.5.x 以上就出问题了:

    error: implicit declaration of function ‘daemonize’ [-Werror=implicit-function-declaration]

这个问题是由于 3.5.x 以上内核去掉了 daemonize 这个函数, 导致无法顺利编译( 当然这是查了N多资料, 搜索了对应的头文件 ),

解决方法很简单, 删掉它就可以了:

    diff --git a/include/osdep_service.h b/include/osdep_service.h
    index ed2dae5..e9acb0d 100755
    --- a/include/osdep_service.h
    +++ b/include/osdep_service.h
    @@ -1403,7 +1403,7 @@ static __inline void thread_enter(char *name);
    static __inline void thread_enter(char *name)
    {
    #ifdef PLATFORM_LINUX
    -       daemonize("%s", name);
    +       //daemonize("%s", name);
            allow_signal(SIGTERM);
    #endif
    #ifdef PLATFORM_FREEBSD

好了, 重新编译, 安装即可.

因为本篇不是新手解决问题的方法, 只写了思路和关键步骤, 这里有一个参考内容, 步骤写的很全, 中间加上我这里的修改就可以了, 你可以参考下: http://peppermintos.net/viewtopic.php?f=8&t=5619

如果有问题, 也可私信我.

发表于 2013.06.19


z • 2014-07-25 08:26

我最后还是在树莓派的官方博客里找到了有个叫MrEngman的雷锋把几乎所有树莓派的版本的8188eu的驱动都编译好的ko放到网上供大家下载,然后问题就解决了,不过还是不知道他怎么实现的。
另外楼主创业做啥呢?

李亚飞( 博主 ) • 2014-07-25 02:27

@z
@Kevin

这里是 3.8 内核的解决方法,看你们的描述是3.12内核的变更导致的其它错误,最好去找找有没有兼容新内核的驱动,如果还是没有,就只能自己动手去改代码了。

Kevin • 2014-07-25 01:05

我遇到了和楼上一样的问题 求解。。。 那几个函数貌似全部都变了。楼主的系统版本是多少额

z • 2014-07-24 15:50

我3.12.22+的树莓派下编译8188eu的驱动,结果你提到的错误,按照你的修改以后还有错误:
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:326:9: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:337:21: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:368:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:374:7: error: dereferencing pointer to incomplete type
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:376:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:382:7: error: dereferencing pointer to incomplete type
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:385:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:393:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:401:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:409:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:416:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:423:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:430:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:437:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:444:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:451:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:458:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:465:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:472:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:479:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:486:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:493:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:500:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:509:9: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:516:9: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:526:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:544:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:552:8: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/pi/wifi/2driver/rpi-rtl8188eu/os_dep/linux/os_intfs.c:558:7: error: dereferencing pointer to incomplete type

求大牛解!