Loading net/bluetooth/mgmt.c +16 −14 Original line number Diff line number Diff line Loading @@ -962,21 +962,14 @@ static u32 get_adv_instance_flags(struct hci_dev *hdev, u8 instance) u32 flags; struct adv_info *adv_instance; if (instance != 0x00) { adv_instance = hci_find_adv_instance(hdev, instance); /* Return 0 when we got an invalid instance identifier. */ if (!adv_instance) return 0; return adv_instance->flags; } /* Instance 0 always manages the "Tx Power" and "Flags" fields */ if (instance == 0x00) { /* Instance 0 always manages the "Tx Power" and "Flags" * fields */ flags = MGMT_ADV_FLAG_TX_POWER | MGMT_ADV_FLAG_MANAGED_FLAGS; /* For instance 0, the HCI_ADVERTISING_CONNECTABLE setting corresponds * to the "connectable" instance flag. /* For instance 0, the HCI_ADVERTISING_CONNECTABLE setting * corresponds to the "connectable" instance flag. */ if (hci_dev_test_flag(hdev, HCI_ADVERTISING_CONNECTABLE)) flags |= MGMT_ADV_FLAG_CONNECTABLE; Loading @@ -984,6 +977,15 @@ static u32 get_adv_instance_flags(struct hci_dev *hdev, u8 instance) return flags; } adv_instance = hci_find_adv_instance(hdev, instance); /* Return 0 when we got an invalid instance identifier. */ if (!adv_instance) return 0; return adv_instance->flags; } static u8 get_adv_instance_scan_rsp_len(struct hci_dev *hdev, u8 instance) { /* Ignore instance 0 and other unsupported instances */ Loading Loading
net/bluetooth/mgmt.c +16 −14 Original line number Diff line number Diff line Loading @@ -962,21 +962,14 @@ static u32 get_adv_instance_flags(struct hci_dev *hdev, u8 instance) u32 flags; struct adv_info *adv_instance; if (instance != 0x00) { adv_instance = hci_find_adv_instance(hdev, instance); /* Return 0 when we got an invalid instance identifier. */ if (!adv_instance) return 0; return adv_instance->flags; } /* Instance 0 always manages the "Tx Power" and "Flags" fields */ if (instance == 0x00) { /* Instance 0 always manages the "Tx Power" and "Flags" * fields */ flags = MGMT_ADV_FLAG_TX_POWER | MGMT_ADV_FLAG_MANAGED_FLAGS; /* For instance 0, the HCI_ADVERTISING_CONNECTABLE setting corresponds * to the "connectable" instance flag. /* For instance 0, the HCI_ADVERTISING_CONNECTABLE setting * corresponds to the "connectable" instance flag. */ if (hci_dev_test_flag(hdev, HCI_ADVERTISING_CONNECTABLE)) flags |= MGMT_ADV_FLAG_CONNECTABLE; Loading @@ -984,6 +977,15 @@ static u32 get_adv_instance_flags(struct hci_dev *hdev, u8 instance) return flags; } adv_instance = hci_find_adv_instance(hdev, instance); /* Return 0 when we got an invalid instance identifier. */ if (!adv_instance) return 0; return adv_instance->flags; } static u8 get_adv_instance_scan_rsp_len(struct hci_dev *hdev, u8 instance) { /* Ignore instance 0 and other unsupported instances */ Loading