diff options
author | Ilhan FOSSE <ilhan.fosse@qorvo.com> | 2023-03-23 11:23:22 +0100 |
---|---|---|
committer | Victor Liu <victorliu@google.com> | 2023-03-23 22:30:48 +0000 |
commit | e4a6f52ff17e5bd8d79de7f651d12a849cd99531 (patch) | |
tree | 061dbf72bc9f779c3f955a784eb52e117cd4cfeb | |
parent | 21dbee6994483d5d19a114616596c047571b5ef5 (diff) | |
download | uwb-e4a6f52ff17e5bd8d79de7f651d12a849cd99531.tar.gz |
mcps: ensure controlee is not NULL
Bug: 274050605
Change-Id: Ie538a930d1ab7abfefc7bcf1082da7909a0e02a7
Signed-off-by: Clément Viel <clement.viel@qorvo.com>
-rw-r--r-- | mac/fira_session.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mac/fira_session.c b/mac/fira_session.c index e5f2e3a..15f3b20 100644 --- a/mac/fira_session.c +++ b/mac/fira_session.c @@ -1117,6 +1117,15 @@ static bool range_data_notif_update(struct fira_local *local, ri->short_addr); fira_session_set_range_data_ntf_status(session, ri); + if (!controlee) { + /* + * This case can happen in Contention Based mode. + * In this mode, controlees are unknown. Let's notify. + */ + ri->notify = true; + send_report = true; + continue; + } ctlee_status = controlee->range_data_ntf_status; ri->notify = send_ranging_data( config, ri->range_data_ntf_status, |