移植MT7620A+MT7610E驱动到Openwrt trunk(Linux Kernel 3.14.18)--(1)

移植MT7620A+MT7610E驱动到Openwrt trunk(Linux Kernel 3.14.18)

1. MT7620

修改trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620a/mt7620/rt2880/os/linux/rt_linux.c :1201行

将:

pOSFSInfo->fsuid = current_fsuid();
pOSFSInfo->fsgid = current_fsgid();

修改为

pOSFSInfo->fsuid = *(int *)&current_fsuid();
pOSFSInfo->fsgid = *(int *)&current_fsgid();

2. MT7610E

7610E驱动要修改的地方有2处

2.1.修改trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620a/mt7610e…/os/linux/rt_linux.c :899行

将:

pOSFSInfo->fsuid = current_fsuid();
pOSFSInfo->fsgid = current_fsgid();

修改为:

pOSFSInfo->fsuid = *(int *)&current_fsuid();
pOSFSInfo->fsgid = *(int *)&current_fsgid();

2.2. 修改trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620a/mt7610e…/os/linux/pci_main_dev.c

在#include区域后面增加如下代码:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
#define __devexit
#define __devinit
#define __devinitdata
#endif

修改如下代码:

#if LINUX_VERSION_CODE >= 0x20412
    remove:     __devexit_p(rt2860_remove_one),
#else
    remove:     __devexit(rt2860_remove_one),
#endif

修改为:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
    remove:     rt2860_remove_one,
#else
#if LINUX_VERSION_CODE >= 0x20412
    remove:     __devexit_p(rt2860_remove_one),
#else
    remove:     __devexit(rt2860_remove_one),
#endif
#endif

重新编译make V=99

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值