Bug 245920 - [Patch] Add RSSI field to LE scan response
Summary: [Patch] Add RSSI field to LE scan response
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Takanori Watanabe
URL:
Keywords:
Depends on:
Blocks: 246141
  Show dependency treegraph
 
Reported: 2020-04-26 08:24 UTC by Marc Veldman
Modified: 2020-05-09 14:18 UTC (History)
3 users (show)

See Also:


Attachments
Add rssi field to ng_hci_le_advreport (458 bytes, patch)
2020-04-26 08:24 UTC, Marc Veldman
no flags Details | Diff
Correct patch. Add space for rssi to data field. (548 bytes, patch)
2020-05-09 05:16 UTC, Marc Veldman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Veldman 2020-04-26 08:24:39 UTC
Created attachment 213797 [details]
Add rssi field to ng_hci_le_advreport

The ng_hci_le_advreport struct is missing the rssi field.

Bluetooth Core Spec  v5.2 Vol. 4, Part E, Section 7.7.65.2
Comment 1 Takanori Watanabe freebsd_committer freebsd_triage 2020-05-08 14:06:09 UTC
The data member is actually variable length, so adding rssi member to last is not match actual packet format. 
Isn't it better to add one more length to data member and comment that the data contains rssi?
Comment 2 Marc Veldman 2020-05-08 14:39:52 UTC
You are correct.
That is the way to do it. I will update my patch.
Thanks for the review!
Comment 3 Marc Veldman 2020-05-09 05:16:41 UTC
Created attachment 214297 [details]
Correct patch. Add space for rssi to data field.
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-05-09 14:16:36 UTC
A commit references this bug:

Author: takawata
Date: Sat May  9 14:15:44 UTC 2020
New revision: 360846
URL: https://svnweb.freebsd.org/changeset/base/360846

Log:
  Add space for RSSI in data member.
  RSSI is put just after actual data.

  Submitted by: Marc Veldman
  PR: 245920

Changes:
  head/sys/netgraph/bluetooth/include/ng_hci.h