GFRM200: Drop ADV_IND undirected advertisements

GFRM200 v72/v17 firmware sends connectable undirected advertising (ADV_IND)
when it is unpaired. These packets can reach BlueZ stack and cause BlueZ to
initiate connection to GFRM200. At the same time, GFRM200 sends its BLE
address over IR, which also triggers BlueZ to pair and bond with GFRM200.
Effectively, there is a race between these two paths, which causes random
pairing and bonding failures.

We need to drop these ADV_IND messages from GFRM200, so that IR pairing and
bonding is the only thing that happens in BlueZ when GFRM200 is in this state.

When GFRM200 is properly paired, it sends connectable directed advertising
(ADV_DIRECT_IND) to BlueZ. Those messages are still processed as before.

I have unit-tested this on Camaro. GFRM200 unpair + re-pair flow is now fixed.

Change-Id: I5f5aa4e8c2a8f91cafd056bc9f40e3fee168e205
1 file changed