AnsweredAssumed Answered

Broadcom bluetooth driver bcm_dhd 1363 error in imx8 kernel 4.9.51

Question asked by Nabeel Syed on Jul 10, 2018
Latest reply on Jul 12, 2018 by igorpadykov

HI

, I am using imx8 based board from compulab

CL-SOM-iMX8 | NXP i.MX 8 | System-on-Module | Computer-on-Module | CompuLab 

Its using 4.9.51 kernel which i got from source.codeaurora.org/external/imx/linux-imx -b imx_4.9.51_imx8mq

Then I applied real time path from preempt_RT website which was patch-4.9.47-rt37.patch and thats the closest one i found with 4.9.51 kernel.

The patch is applied Ok but after that when I do make it complains about broadcom driver (Wifi + Bluetooth) .

here is the error message

============================================================================

CC [M] drivers/gpu/drm/nouveau/nvkm/engine/ce/gk104.o
drivers/net/wireless/bcmdhd_1363/dhd_pno.c: In function ‘_dhd_pno_get_for_batch’:
drivers/net/wireless/bcmdhd_1363/dhd_pno.c:3045:23: error: passing argument 1 of ‘waitqueue_active’ from incompatible pointer type [-Werror=incompatible-pointer-types]
if (waitqueue_active(&_pno_state->get_batch_done.wait))
^
In file included from ./include/linux/uprobes.h:30:0,
from ./include/linux/mm_types.h:13,
from ./include/linux/sched.h:27,
from ./arch/arm64/include/asm/compat.h:25,
from ./arch/arm64/include/asm/stat.h:23,
from ./include/linux/stat.h:5,
from ./include/linux/module.h:10,
from drivers/net/wireless/bcmdhd_1363/include/linuxver.h:55,
from drivers/net/wireless/bcmdhd_1363/include/linux_osl.h:250,
from drivers/net/wireless/bcmdhd_1363/include/osl.h:49,
from drivers/net/wireless/bcmdhd_1363/dhd_pno.c:37:
./include/linux/wait.h:136:19: note: expected ‘wait_queue_head_t * {aka struct __wait_queue_head *}’ but argument is of type ‘struct swait_queue_head *’
static inline int waitqueue_active(wait_queue_head_t *q)
^~~~~~~~~~~~~~~~
drivers/net/wireless/bcmdhd_1363/dhd_pno.c: In function ‘dhd_pno_event_handler’:
drivers/net/wireless/bcmdhd_1363/dhd_pno.c:3801:25: error: passing argument 1 of ‘waitqueue_active’ from incompatible pointer type [-Werror=incompatible-pointer-types]
if (!waitqueue_active(&_pno_state->get_batch_done.wait)) {
^
In file included from ./include/linux/uprobes.h:30:0,
from ./include/linux/mm_types.h:13,
from ./include/linux/sched.h:27,
from ./arch/arm64/include/asm/compat.h:25,
from ./arch/arm64/include/asm/stat.h:23,
from ./include/linux/stat.h:5,
from ./include/linux/module.h:10,
from drivers/net/wireless/bcmdhd_1363/include/linuxver.h:55,
from drivers/net/wireless/bcmdhd_1363/include/linux_osl.h:250,
from drivers/net/wireless/bcmdhd_1363/include/osl.h:49,
from drivers/net/wireless/bcmdhd_1363/dhd_pno.c:37:
./include/linux/wait.h:136:19: note: expected ‘wait_queue_head_t * {aka struct __wait_queue_head *}’ but argument is of type ‘struct swait_queue_head *’
static inline int waitqueue_active(wait_queue_head_t *q)
^~~~~~~~~~~~~~~~
CC drivers/net/ethernet/intel/igbvf/mbx.o
CC [M] drivers/gpu/drm/nouveau/nvkm/engine/ce/gm107.o
CC [M] drivers/net/usb/asix_devices.o
CC drivers/net/ethernet/intel/igbvf/ethtool.o
CC [M] drivers/gpu/drm/nouveau/nvkm/engine/ce/gm200.o
cc1: some warnings being treated as errors
make[4]: *** [drivers/net/wireless/bcmdhd_1363/dhd_pno.o] Error 1
make[3]: *** [drivers/net/wireless/bcmdhd_1363] Error 2
make[2]: *** [drivers/net/wireless] Error 2

Please advise how this error can be fixed

Many thanks

Outcomes