summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyush Garg <ayush.garg@samsung.com>2023-09-15 06:51:44 +0530
committerAyush Garg <ayush.garg@samsung.com>2023-09-15 06:51:44 +0530
commit3176e6f6dec29a4753b713592a01ccddbfb828d8 (patch)
treed2831074e5fea5c3f92df29b9328cef2409d16e6
parent9ac17c866a5d03211d8bc62dcd319fdab29fa33a (diff)
downloadbluetooth-3176e6f6dec29a4753b713592a01ccddbfb828d8.tar.gz
bluetooth-3176e6f6dec29a4753b713592a01ccddbfb828d8.tar.bz2
bluetooth-3176e6f6dec29a4753b713592a01ccddbfb828d8.zip
This patch fixes the PHY validation logic Change-Id: I685c7ba5fd070826c8198c9e2cc6ae585615a7af Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
-rw-r--r--src/bluetooth-gatt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c
index ce0acd1..d207708 100644
--- a/src/bluetooth-gatt.c
+++ b/src/bluetooth-gatt.c
@@ -3652,14 +3652,14 @@ static bool __bt_gatt_is_phy_options_valid(int phy_options)
static bool __bt_gatt_is_phy_valid(int phy)
{
- if (phy | BT_LE_2M_PHY_MASK) {
+ if (phy & BT_LE_2M_PHY_MASK) {
bool is_2m_phy_supported = false;
int ret = bt_adapter_le_is_2m_phy_supported(&is_2m_phy_supported);
if (!ret || !is_2m_phy_supported)
return false;
}
- if (phy | BT_LE_CODED_PHY_MASK) {
+ if (phy & BT_LE_CODED_PHY_MASK) {
bool is_coded_phy_supported = false;
int ret = bt_adapter_le_is_coded_phy_supported(&is_coded_phy_supported);
if (!ret || !is_coded_phy_supported)