ftp://152.104.238.194/cn/nic/rtl ... 9sc/r1000_v1.04.tgz
在 r1000_v1.04/src/r1000_n.c
必須將
MODULE_PARM (speed, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM (duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM (autoneg, "1-" __MODULE_STRING(MAX_UNITS) "i");
修改為
MODULE_PARM_DESC (speed, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM_DESC (duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM_DESC (autoneg, "1-" __MODULE_STRING(MAX_UNITS) "i");
否則你會有以下的 Compile Error
/root/tmp/t/r1000_v1.04/src/r1000_n.c:51: error: syntax error before string constant
/root/tmp/t/r1000_v1.04/src/r1000_n.c:51: warning: type defaults to ‘int’ in declaration of ‘MODULE_PARM’
/root/tmp/t/r1000_v1.04/src/r1000_n.c:51: warning: function declaration isn’t a prototype
/root/tmp/t/r1000_v1.04/src/r1000_n.c:51: warning: data definition has no type or storage class
/root/tmp/t/r1000_v1.04/src/r1000_n.c:52: error: syntax error before string constant
/root/tmp/t/r1000_v1.04/src/r1000_n.c:52: warning: type defaults to ‘int’ in declaration of ‘MODULE_PARM’
/root/tmp/t/r1000_v1.04/src/r1000_n.c:52: warning: function declaration isn’t a prototype
/root/tmp/t/r1000_v1.04/src/r1000_n.c:52: warning: data definition has no type or storage class
/root/tmp/t/r1000_v1.04/src/r1000_n.c:53: error: syntax error before string constant
/root/tmp/t/r1000_v1.04/src/r1000_n.c:53: warning: type defaults to ‘int’ in declaration of ‘MODULE_PARM’
/root/tmp/t/r1000_v1.04/src/r1000_n.c:53: warning: function declaration isn’t a prototype
/root/tmp/t/r1000_v1.04/src/r1000_n.c:53: warning: data definition has no type or storage class
目前尚未知道解決與否以前的 v1.02-v1.03 的 bug (傳送達某程度的資料, kernel module 會掛了, 必須人手 unload module, reload module, reload network 才可解決問題).
我會下星期一作測試.