Inject STS_INDEX when it's invalid
Upon SESSION_START_CMD packet HAL checks if STS_INDEX is set by
upper-layer by querying the current UWB session configurations.
If upper-layer didn't set it, or not incremented from resuming
ranging session, HAL injects new STS_INDEX value instead of
upper-layer.
STS_INDEX is set with random values in [0, 2^16), and
LAST_STS_INDEX_USED + 1 for resuming ranging session.
This can be turned off by specifying
OVERRIDE_STS_INDEX_FOR_CCC_SESSION=0 from configuration file.
Bug: 340545411
Test: URSK flow test, regression tests
Change-Id: I0479da40668c6a2ed4d33dfc7b4fd8640cf99a20
Merged-In: I0479da40668c6a2ed4d33dfc7b4fd8640cf99a20
5 files changed