Bug 245920

Summary: [Patch] Add RSSI field to LE scan response
Product: Base System Reporter: Marc Veldman <marc>
Component: wirelessAssignee: Takanori Watanabe <takawata>
Status: Closed FIXED    
Severity: Affects Some People CC: emaste, hselasky, takawata
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 246141    
Attachments:
Description Flags
Add rssi field to ng_hci_le_advreport
none
Correct patch. Add space for rssi to data field. none

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