Diff between 263d6f7da564f5bf6c89a2beb3cc0b950252f059 and ea242fbf860284c13cf17f46c9731b148da4a6ac
Changed Files
| File | Additions | Deletions | Status |
| src/advertising.c | +7 | -0 | modified |
Full Patch
diff --git a/src/advertising.c b/src/advertising.c
index b9d923d..5d373e0 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -884,6 +884,13 @@ static int get_adv_flags(struct btd_adv_client *client)
flags |= client->flags;
+ /* Detect if the length is bigger that legacy and secondary is not set
+ * then force it to be set to ensure the kernel uses EA.
+ */
+ if (bt_ad_length(client->data) > BT_AD_MAX_DATA_LEN &&
+ !(flags & MGMT_ADV_FLAG_SEC_MASK))
+ flags |= MGMT_ADV_FLAG_SEC_1M;
+
return flags;
}