Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nexmon compiles for 4.9 but 4.14 is the current kernel #274

Open
WiredLife opened this issue Jan 15, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@WiredLife
Copy link

commented Jan 15, 2019

BUILDING DRIVER for kernel 4.9 brcmfmac_4.9.y-nexmon/brcmfmac.ko (details: log/driver.log)
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c: In function ‘brcmf_vif_change_validate’:
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:433:49: warning: passing argument 2 of ‘cfg80211_check_combinations’ makes pointer from integer without a cast [-Wint-conversion]
ret = cfg80211_check_combinations(cfg->wiphy, 1, 0, iftype_num);
^
In file included from /root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:23:0:
./include/net/cfg80211.h:6040:5: note: expected ‘struct iface_combination_params *’ but argument is of type ‘int’
int cfg80211_check_combinations(struct wiphy *wiphy,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:433:9: error: too many arguments to function ‘cfg80211_check_combinations’
ret = cfg80211_check_combinations(cfg->wiphy, 1, 0, iftype_num);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:23:0:
./include/net/cfg80211.h:6040:5: note: declared here
int cfg80211_check_combinations(struct wiphy *wiphy,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c: In function ‘brcmf_vif_add_validate’:
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:513:49: warning: passing argument 2 of ‘cfg80211_check_combinations’ makes pointer from integer without a cast [-Wint-conversion]
return cfg80211_check_combinations(cfg->wiphy, 1, 0, iftype_num);
^
In file included from /root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:23:0:
./include/net/cfg80211.h:6040:5: note: expected ‘struct iface_combination_params *’ but argument is of type ‘int’
int cfg80211_check_combinations(struct wiphy *wiphy,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:513:9: error: too many arguments to function ‘cfg80211_check_combinations’
return cfg80211_check_combinations(cfg->wiphy, 1, 0, iftype_num);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:23:0:
./include/net/cfg80211.h:6040:5: note: declared here
int cfg80211_check_combinations(struct wiphy *wiphy,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c: In function ‘brcmf_notify_escan_complete’:
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:940:4: error: too few arguments to function ‘cfg80211_sched_scan_results’
cfg80211_sched_scan_results(cfg_to_wiphy(cfg));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:23:0:
./include/net/cfg80211.h:4611:6: note: declared here
void cfg80211_sched_scan_results(struct wiphy *wiphy, u64 reqid);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c: In function ‘brcmf_notify_sched_scan_results’:
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:3510:2: error: too few arguments to function ‘cfg80211_sched_scan_stopped’
cfg80211_sched_scan_stopped(wiphy);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:23:0:
./include/net/cfg80211.h:4623:6: note: declared here
void cfg80211_sched_scan_stopped(struct wiphy *wiphy, u64 reqid);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c: At top level:
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:5385:22: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.add_virtual_intf = brcmf_cfg80211_add_iface,
^~~~~~~~~~~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:5385:22: note: (near initialization for ‘brcmf_cfg80211_ops.add_virtual_intf’)
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:5387:25: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.change_virtual_intf = brcmf_cfg80211_change_iface,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:5387:25: note: (near initialization for ‘brcmf_cfg80211_ops.change_virtual_intf’)
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:5415:21: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.sched_scan_stop = brcmf_cfg80211_sched_scan_stop,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:5415:21: note: (near initialization for ‘brcmf_cfg80211_ops.sched_scan_stop’)
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c: In function ‘brcmf_bss_roaming_done’:
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:5653:24: error: passing argument 2 of ‘cfg80211_roamed’ from incompatible pointer type [-Werror=incompatible-pointer-types]
cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid,
^~~~~~~~~~~~~~
In file included from /root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:23:0:
./include/net/cfg80211.h:5479:6: note: expected ‘struct cfg80211_roam_info *’ but argument is of type ‘struct ieee80211_channel *’
void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
^~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:5653:40: warning: passing argument 3 of ‘cfg80211_roamed’ makes integer from pointer without a cast [-Wint-conversion]
cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid,
^
In file included from /root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:23:0:
./include/net/cfg80211.h:5479:6: note: expected ‘gfp_t {aka unsigned int}’ but argument is of type ‘u8 * {aka unsigned char *}’
void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
^~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:5653:2: error: too many arguments to function ‘cfg80211_roamed’
cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid,
^~~~~~~~~~~~~~~
In file included from /root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:23:0:
./include/net/cfg80211.h:5479:6: note: declared here
void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
^~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c: In function ‘brcmf_wiphy_pno_params’:
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:6640:18: error: ‘WIPHY_FLAG_SUPPORTS_SCHED_SCAN’ undeclared (first use in this function)
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.c:6640:18: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
make[2]: *** [/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon/cfg80211.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [module/root/nexmon/patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.9.y-nexmon] Error 2
Makefile:45: recipe for target 'brcmfmac.ko' failed
make: *** [brcmfmac.ko] Error 2

root@blueberry:~/nexmon/patches/bcm43455c0/7_45_154/nexmon# uname -r
4.14.92-v7+

The problem is in the Makefile
ifeq ($(findstring 4.9,$(shell uname -r)),4.9)
there must be a dot after 4.9!
ifeq ($(findstring 4.9.,$(shell uname -r)),4.9.)

else ifeq ($(findstring 4.14,$(shell uname -r)),4.14)
and there must be a dot after 4.14!
else ifeq ($(findstring 4.14.,$(shell uname -r)),4.14.)

quick solution:
sed -i -e 's/ifeq ($(findstring 4.9,$(shell uname -r)),4.9)/ifeq ($(findstring 4.9.,$(shell uname -r)),4.9.)/g' Makefile
sed -i -e 's/else ifeq ($(findstring 4.14,$(shell uname -r)),4.14)/else ifeq ($(findstring 4.14.,$(shell uname -r)),4.14.)/g' Makefile

@kruzda

This comment has been minimized.

Copy link

commented Mar 2, 2019

When using kernel version 4.14.98 the script detects kernel version 4.9 since the string "4.14.98" indeed contains the substring "4.9".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.