Bluetooth: drivers/h4: Add support for discarding certain events
Bluetooth: drivers/h4: Add support for discarding certain events

If we are low on RX buffers and receive an LE Advertising Report or a
BR/EDR Inquiry response we should just discard this. If we don't
discard the event we increase the risk of deadlock where the RX
interrupt is enabled but bt_recv() is doing a synchronous HCI command
sending, i.e. waiting for a cmd_status/cmd_complete (which will never
come since the RX interrupt is disabled).

Change-Id: I6266625c9790d68bcf8e8718c8c36f127946c4c6
Signed-off-by: Johan Hedberg <628991c7b0a19c384f9b99c21ec330ce952bb838@intel.com>

holtmann/zephyr,galak/zephyr,punitvara/zephyr,galak/zephyr,tidyjiang8/zephyr-doc,aceofall/zephyr-iotos,runchip/zephyr-cc3220,rsalveti/zephyr,bigdinotech/zephyr,sharronliu/zephyr,mbolivar/zephyr,holtmann/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,runchip/zephyr-cc3220,zephyrproject-rtos/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,nashif/zephyr,fractalclone/zephyr-riscv,aceofall/zephyr-iotos,galak/zephyr,runchip/zephyr-cc3200,rsalveti/zephyr,zephyriot/zephyr,bigdinotech/zephyr,ldts/zephyr,runchip/zephyr-cc3200,mbolivar/zephyr,ldts/zephyr,sharronliu/zephyr,bigdinotech/zephyr,fbsder/zephyr,finikorg/zephyr,holtmann/zephyr,tidyjiang8/zephyr-doc,bboozzoo/zephyr,Vudentz/zephyr,galak/zephyr,bboozzoo/zephyr,zephyriot/zephyr,runchip/zephyr-cc3220,GiulianoFranchetto/zephyr,erwango/zephyr,Vudentz/zephyr,Vudentz/zephyr,runchip/zephyr-cc3200,fbsder/zephyr,runchip/zephyr-cc3220,fractalclone/zephyr-riscv,kraj/zephyr,finikorg/zephyr,nashif/zephyr,punitvara/zephyr,finikorg/zephyr,aceofall/zephyr-iotos,ldts/zephyr,ldts/zephyr,zephyrproject-rtos/zephyr,runchip/zephyr-cc3200,zephyriot/zephyr,kraj/zephyr,bboozzoo/zephyr,punitvara/zephyr,rsalveti/zephyr,finikorg/zephyr,fbsder/zephyr,finikorg/zephyr,bboozzoo/zephyr,erwango/zephyr,bigdinotech/zephyr,tidyjiang8/zephyr-doc,aceofall/zephyr-iotos,runchip/zephyr-cc3220,erwango/zephyr,punitvara/zephyr,pklazy/zephyr,GiulianoFranchetto/zephyr,runchip/zephyr-cc3200,explora26/zephyr,tidyjiang8/zephyr-doc,aceofall/zephyr-iotos,fractalclone/zephyr-riscv,Vudentz/zephyr,zephyrproject-rtos/zephyr,tidyjiang8/zephyr-doc,fbsder/zephyr,holtmann/zephyr,sharronliu/zephyr,rsalveti/zephyr,zephyriot/zephyr,zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr,kraj/zephyr,kraj/zephyr,bigdinotech/zephyr,nashif/zephyr,explora26/zephyr,fbsder/zephyr,kraj/zephyr,fractalclone/zephyr-riscv,holtmann/zephyr,Vudentz/zephyr,punitvara/zephyr,Vudentz/zephyr,rsalveti/zephyr,pklazy/zephyr,ldts/zephyr,sharronliu/zephyr,erwango/zephyr,GiulianoFranchetto/zephyr,erwango/zephyr,mbolivar/zephyr,sharronliu/zephyr,explora26/zephyr,pklazy/zephyr,explora26/zephyr,mbolivar/zephyr,pklazy/zephyr,pklazy/zephyr,bboozzoo/zephyr,explora26/zephyr,zephyriot/zephyr,fractalclone/zephyr-riscv,mbolivar/zephyr,nashif/zephyr