FreeBSD Bugzilla – Attachment 213603 Details for
Bug 245763
Bluetooth command le_read_supported_status has the wrong name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to rename le_read_supported_status into ..._states
le_read_supported_states.diff (text/plain), 3.57 KB, created by
Marc Veldman
on 2020-04-20 13:30:47 UTC
(
hide
)
Description:
Patch to rename le_read_supported_status into ..._states
Filename:
MIME Type:
Creator:
Marc Veldman
Created:
2020-04-20 13:30:47 UTC
Size:
3.57 KB
patch
obsolete
>Index: sys/netgraph/bluetooth/hci/ng_hci_cmds.c >=================================================================== >--- sys/netgraph/bluetooth/hci/ng_hci_cmds.c (revision 360095) >+++ sys/netgraph/bluetooth/hci/ng_hci_cmds.c (working copy) >@@ -842,7 +842,7 @@ > case NG_HCI_OCF_LE_RAND: > case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_REPLY: > case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY: >- case NG_HCI_OCF_LE_READ_SUPPORTED_STATUS: >+ case NG_HCI_OCF_LE_READ_SUPPORTED_STATES: > case NG_HCI_OCF_LE_RECEIVER_TEST: > case NG_HCI_OCF_LE_TRANSMITTER_TEST: > case NG_HCI_OCF_LE_TEST_END: >@@ -913,7 +913,7 @@ > case NG_HCI_OCF_LE_RAND: > case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_REPLY: > case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY: >- case NG_HCI_OCF_LE_READ_SUPPORTED_STATUS: >+ case NG_HCI_OCF_LE_READ_SUPPORTED_STATES: > case NG_HCI_OCF_LE_RECEIVER_TEST: > case NG_HCI_OCF_LE_TRANSMITTER_TEST: > case NG_HCI_OCF_LE_TEST_END: >Index: sys/netgraph/bluetooth/include/ng_hci.h >=================================================================== >--- sys/netgraph/bluetooth/include/ng_hci.h (revision 360095) >+++ sys/netgraph/bluetooth/include/ng_hci.h (working copy) >@@ -1673,12 +1673,12 @@ > }__attribute__ ((packed)) ng_hci_le_long_term_key_request_negative_reply_rp; > > >-#define NG_HCI_OCF_LE_READ_SUPPORTED_STATUS 0x001c >+#define NG_HCI_OCF_LE_READ_SUPPORTED_STATES 0x001c > /*No command parameter*/ > typedef struct { > u_int8_t status; >- u_int64_t le_status; >-}__attribute__ ((packed)) ng_hci_le_read_supported_status_rp; >+ u_int64_t le_states; >+}__attribute__ ((packed)) ng_hci_le_read_supported_states_rp; > > #define NG_HCI_OCF_LE_RECEIVER_TEST 0x001d > typedef struct{ >Index: usr.sbin/bluetooth/hccontrol/le.c >=================================================================== >--- usr.sbin/bluetooth/hccontrol/le.c (revision 360095) >+++ usr.sbin/bluetooth/hccontrol/le.c (working copy) >@@ -52,7 +52,7 @@ > static int le_set_scan_enable(int s, int argc, char *argv[]); > static int parse_param(int argc, char *argv[], char *buf, int *len); > static int le_set_scan_response(int s, int argc, char *argv[]); >-static int le_read_supported_status(int s, int argc, char *argv[]); >+static int le_read_supported_states(int s, int argc, char *argv[]); > static int le_read_local_supported_features(int s, int argc ,char *argv[]); > static int set_le_event_mask(int s, uint64_t mask); > static int set_event_mask(int s, uint64_t mask); >@@ -259,20 +259,26 @@ > } > > static int >-le_read_supported_status(int s, int argc, char *argv[]) >+le_read_supported_states(int s, int argc, char *argv[]) > { >- ng_hci_le_read_supported_status_rp rp; >- int e; >+ ng_hci_le_read_supported_states_rp rp; > int n = sizeof(rp); > >- e = hci_simple_request(s, NG_HCI_OPCODE( >+ if (hci_simple_request(s, NG_HCI_OPCODE( > NG_HCI_OGF_LE, >- NG_HCI_OCF_LE_READ_SUPPORTED_STATUS), >- (void *)&rp, &n); >+ NG_HCI_OCF_LE_READ_SUPPORTED_STATES), >+ (void *)&rp, &n) == ERROR) >+ return (ERROR); > >- printf("LE_STATUS: %d %d %jx\n", e, rp.status, (uintmax_t)rp.le_status); >+ if (rp.status != 0x00) { >+ fprintf(stdout, "Status: %s [%#02x]\n", >+ hci_status2str(rp.status), rp.status); >+ return (FAILED); >+ } > >- return 0; >+ fprintf(stdout, "LE States: %jx\n", rp.le_states); >+ >+ return (OK); > } > > static int >@@ -347,11 +353,11 @@ > &le_read_local_supported_features, > }, > { >- "le_read_supported_status", >- "le_read_supported_status\n" >+ "le_read_supported_states", >+ "le_read_supported_states\n" > "read supported status" > , >- &le_read_supported_status, >+ &le_read_supported_states, > }, > { > "le_set_scan_response",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 245763
: 213603