Skip to contentSkip to conversation

Bluetooth: Use HCI_MAX_AD_LENGTH constant instead hardcoded value

PATCH In review Marcel Holtmann 2 participants 2 messages Mar 20, 2015

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Use HCI_MAX_AD_LENGTH constant instead hardcoded value

Using the HCI_MAX_AD_LENGTH for the max advertising data and max scan response data length makes more sense than hardcoding the value.

---
 net/bluetooth/mgmt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/bluetooth/mgmt.c +2 -2
index cee9bc9735af..8c771e79d67d 100644
@@ -6312,8 +6312,8 @@ static int read_adv_features(struct sock *sk, struct hci_dev *hdev,
 	}
 
 	rp->supported_flags = cpu_to_le32(0);
-	rp->max_adv_data_len = 31;
-	rp->max_scan_rsp_len = 31;
+	rp->max_adv_data_len = HCI_MAX_AD_LENGTH;
+	rp->max_scan_rsp_len = HCI_MAX_AD_LENGTH;
 	rp->max_instances = 0;
 	rp->num_instances = 0;
 
Signature · 1 line
2.1.0
#1 lore raw

Hi Marcel,

Quoted 7 lines · Marcel Holtmann

Using the HCI_MAX_AD_LENGTH for the max advertising data and max scan response data length makes more sense than hardcoding the value.

---
 net/bluetooth/mgmt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied bluetooth-next. Thanks.

Johan