mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Revert "Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH"
This reverts commit99f30e12e5which is commitdb08722fc7upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: I8de43981e4a64a6484e85d0e2f3ad77f0dd11f23 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -82,7 +82,7 @@ struct discovery_state {
|
|||||||
u8 last_adv_addr_type;
|
u8 last_adv_addr_type;
|
||||||
s8 last_adv_rssi;
|
s8 last_adv_rssi;
|
||||||
u32 last_adv_flags;
|
u32 last_adv_flags;
|
||||||
u8 last_adv_data[HCI_MAX_EXT_AD_LENGTH];
|
u8 last_adv_data[HCI_MAX_AD_LENGTH];
|
||||||
u8 last_adv_data_len;
|
u8 last_adv_data_len;
|
||||||
bool report_invalid_rssi;
|
bool report_invalid_rssi;
|
||||||
bool result_filtering;
|
bool result_filtering;
|
||||||
@@ -294,7 +294,7 @@ struct adv_pattern {
|
|||||||
__u8 ad_type;
|
__u8 ad_type;
|
||||||
__u8 offset;
|
__u8 offset;
|
||||||
__u8 length;
|
__u8 length;
|
||||||
__u8 value[HCI_MAX_EXT_AD_LENGTH];
|
__u8 value[HCI_MAX_AD_LENGTH];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct adv_rssi_thresholds {
|
struct adv_rssi_thresholds {
|
||||||
@@ -733,7 +733,7 @@ struct hci_conn {
|
|||||||
__u16 le_conn_interval;
|
__u16 le_conn_interval;
|
||||||
__u16 le_conn_latency;
|
__u16 le_conn_latency;
|
||||||
__u16 le_supv_timeout;
|
__u16 le_supv_timeout;
|
||||||
__u8 le_adv_data[HCI_MAX_EXT_AD_LENGTH];
|
__u8 le_adv_data[HCI_MAX_AD_LENGTH];
|
||||||
__u8 le_adv_data_len;
|
__u8 le_adv_data_len;
|
||||||
__u8 le_per_adv_data[HCI_MAX_PER_AD_LENGTH];
|
__u8 le_per_adv_data[HCI_MAX_PER_AD_LENGTH];
|
||||||
__u8 le_per_adv_data_len;
|
__u8 le_per_adv_data_len;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
|
|||||||
size_t complete_len;
|
size_t complete_len;
|
||||||
|
|
||||||
/* no space left for name (+ NULL + type + len) */
|
/* no space left for name (+ NULL + type + len) */
|
||||||
if ((max_adv_len(hdev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
|
if ((HCI_MAX_AD_LENGTH - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
|
||||||
return ad_len;
|
return ad_len;
|
||||||
|
|
||||||
/* use complete name if present and fits */
|
/* use complete name if present and fits */
|
||||||
|
|||||||
@@ -5378,9 +5378,9 @@ static u8 parse_adv_monitor_pattern(struct adv_monitor *m, u8 pattern_count,
|
|||||||
for (i = 0; i < pattern_count; i++) {
|
for (i = 0; i < pattern_count; i++) {
|
||||||
offset = patterns[i].offset;
|
offset = patterns[i].offset;
|
||||||
length = patterns[i].length;
|
length = patterns[i].length;
|
||||||
if (offset >= HCI_MAX_EXT_AD_LENGTH ||
|
if (offset >= HCI_MAX_AD_LENGTH ||
|
||||||
length > HCI_MAX_EXT_AD_LENGTH ||
|
length > HCI_MAX_AD_LENGTH ||
|
||||||
(offset + length) > HCI_MAX_EXT_AD_LENGTH)
|
(offset + length) > HCI_MAX_AD_LENGTH)
|
||||||
return MGMT_STATUS_INVALID_PARAMS;
|
return MGMT_STATUS_INVALID_PARAMS;
|
||||||
|
|
||||||
p = kmalloc(sizeof(*p), GFP_KERNEL);
|
p = kmalloc(sizeof(*p), GFP_KERNEL);
|
||||||
|
|||||||
Reference in New Issue
Block a user