This patch fixes the PHY validation logic
Change-Id: I685c7ba5fd070826c8198c9e2cc6ae585615a7af
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
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)