[PATCH BlueZ 19/25] lib: Maximum value to advertising and scan response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Create a constant to define the maximum lenght for advertising and scan
response data format.
---
 lib/hci.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/hci.h b/lib/hci.h
index 56c9316..bce6b41 100644
--- a/lib/hci.h
+++ b/lib/hci.h
@@ -1505,17 +1505,19 @@ typedef struct {
 } __attribute__ ((packed)) le_read_advertising_channel_tx_power_rp;
 #define LE_READ_ADVERTISING_CHANNEL_TX_POWER_RP_SIZE 2
 
+#define HCI_LE_MAX_ADV_DATA_LENGTH		31
+
 #define OCF_LE_SET_ADVERTISING_DATA		0x0008
 typedef struct {
 	uint8_t		length;
-	uint8_t		data[31];
+	uint8_t		data[HCI_LE_MAX_ADV_DATA_LENGTH];
 } __attribute__ ((packed)) le_set_advertising_data_cp;
 #define LE_SET_ADVERTISING_DATA_CP_SIZE 32
 
 #define OCF_LE_SET_SCAN_RESPONSE_DATA		0x0009
 typedef struct {
 	uint8_t		length;
-	uint8_t		data[31];
+	uint8_t		data[HCI_LE_MAX_ADV_DATA_LENGTH];
 } __attribute__ ((packed)) le_set_scan_response_data_cp;
 #define LE_SET_SCAN_RESPONSE_DATA_CP_SIZE 32
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux