Closed masap closed 8 years ago
@masap do you have any references as to why your changes are needed? Like uminokoe, it (now) compiles on 4.7 here.
Sorry. Prototype modification of cfg80211_scan_done() is not merged to 4.7 yet. The modification will occur on future Linux version. I will drop this patch.
@masap if the function is modified in a future kernel version, please do inform us and/or make another PR :+1:
And only half an hour later I try to compile this driver on my laptop with kernel 4.8.0-rc5 and am 'greeted' with the following:
/home/diederik/dev/drivers/rtl8812AU/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_indicate_scan_done’:
/home/diederik/dev/drivers/rtl8812AU/os_dep/linux/ioctl_cfg80211.c:1995:49: error: incompatible type for argument 2 of ‘cfg80211_scan_done’
cfg80211_scan_done(pwdev_priv->scan_request, aborted);
^
In file included from /home/diederik/dev/drivers/rtl8812AU/include/osdep_service_linux.h:81:0,
from /home/diederik/dev/drivers/rtl8812AU/include/osdep_service.h:41,
from /home/diederik/dev/drivers/rtl8812AU/include/drv_types.h:32,
from /home/diederik/dev/drivers/rtl8812AU/os_dep/linux/ioctl_cfg80211.c:22:
/usr/src/linux-headers-4.8.0-rc5-common/include/net/cfg80211.h:4104:6: note: expected ‘struct cfg80211_scan_info *’ but argument is of type ‘bool {aka _Bool}’
void cfg80211_scan_done(struct cfg80211_scan_request *request,
^
/usr/src/linux-headers-4.8.0-rc5-common/scripts/Makefile.build:294: recipe for target '/home/diederik/dev/drivers/rtl8812AU/os_dep/linux/ioctl_cfg80211.o' failed
make[4]: *** [/home/diederik/dev/drivers/rtl8812AU/os_dep/linux/ioctl_cfg80211.o] Error 1
/usr/src/linux-headers-4.8.0-rc5-common/Makefile:1488: recipe for target '_module_/home/diederik/dev/drivers/rtl8812AU' failed
make[3]: *** [_module_/home/diederik/dev/drivers/rtl8812AU] Error 2
Makefile:150: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.8.0-rc5-amd64'
Makefile:1576: recipe for target 'modules' failed
make: *** [modules] Error 2
LOL :grin:
So, would you be so kind to update your PR and resubmit it?
@diederikdehaas
So, would you be so kind to update your PR and resubmit it?
I modified this PR #33. Though, unfortunately I have already returned the rtl8812au physical device. Could you test this PR ?
@uminokoe
So for kernels 4.7.x, are both formats/versions accepted?
This modification is only for Linux 4.8. The modified code does not work on Linux 4.7. So the modification is surrounded by Linux 4.8 macro.
For kernels 4.7.x, will the patch work?
No. I changed the KERNEL_VERSION(4, 8, 0)
into KERNEL_VERSION(4, 7, 0)
and got this:
CC [M] /home/diederik/dev/drivers/rtl8812AU/os_dep/linux/ioctl_cfg80211.o
/home/diederik/dev/drivers/rtl8812AU/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_indicate_scan_done’:
/home/diederik/dev/drivers/rtl8812AU/os_dep/linux/ioctl_cfg80211.c:2017:28: error: storage size of ‘info’ isn’t known
struct cfg80211_scan_info info;
^
/usr/src/linux-headers-4.7.0-1-common/scripts/Makefile.build:294: recipe for target '/home/diederik/dev/drivers/rtl8812AU/os_dep/linux/ioctl_cfg80211.o' failed
make[4]: *** [/home/diederik/dev/drivers/rtl8812AU/os_dep/linux/ioctl_cfg80211.o] Error 1
/usr/src/linux-headers-4.7.0-1-common/Makefile:1474: recipe for target '_module_/home/diederik/dev/drivers/rtl8812AU' failed
make[3]: *** [_module_/home/diederik/dev/drivers/rtl8812AU] Error 2
Makefile:150: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.7.0-1-amd64'
Makefile:1705: recipe for target 'modules' failed
make: *** [modules] Error 2
@diederikdehaas
No. I changed the KERNEL_VERSION(4, 8, 0) into KERNEL_VERSION(4, 7, 0) and got this:
Could you try my new PR #33 ?
I've already merged it as it compiled against 4.8, whereas without the PR it didn't.
I've just compiled and tested it under 4.8-rc8 (previously 4.8-rc5) and it still works :+1:
This patch fix compilation failure caused by modification of cfg80211_scan_done() prototype.
Signed-off-by: Masashi Honma masashi.honma@gmail.com