Replying myself, I can say very latest KSDK (*1) contains code related to this issue in its bluetooth stack 1.2.6:
ble_controller_task_config.h
/* Scan FIFO lockup detection interval in milliseconds. If no advertising frame
is reported over this period of time, then the scan FIFO is flushed and the scan
is restarted. This value needs to be increased if:
- few advertisers or
- few frames reported after frame filtering using the white list or
- scan window is much smaller than the scan interval
*/
#ifndef mScanFifoLockupCheckIntervalMilliSeconds_c
#define mScanFifoLockupCheckIntervalMilliSeconds_c 2500
#endif
ble_controller_task.c
/* Scan FIFO lockup detection interval in milliseconds. */
uint32_t gScanFifoLockupCheckIntervalMilliSeconds = mScanFifoLockupCheckIntervalMilliSeconds_c;
lib_ble_kw41z_controller.a(ll_scanner.o)
Uses uint32_t gScanFifoLockupCheckIntervalMilliSeconds external symbol
(*1) By very-latest KSDK, I mean KSDK 2.2.0 from September 2018. Release date is very important because I downloaded an older KSDK 2.2.0 last mid-July which actually embeds bluetooth stack 1.2.5 without this fix. it looks like KSDK is getting updated without having it numbering increased.
I tested this workaround on a four-hour BLE scan with Linux BlueZ, without any issue where I previously had issues within an hour.