Hi Marcel, On Tue, Sep 24, 2013, Marcel Holtmann wrote: > > If either one of the HCI_SETUP or HCI_USER_CHANNEL flags is set the > > device is not considered valid for mgmt. By having these checks inside > > the mgmt_valid_hdev function the a couple of places using it can be > > simplified. > > I looked at doing this and decided not to. Reason was that the device > gets removed from mgmt anyway. I'm not sure what significance you think "device gets removed from mgmt" has. All that is is a mgmt event saying that index has been removed. In addition to that we need to ensure that we don't send any more mgmt events for such devices and that we don't include such devices in the response to mgmt_read_index list. These are the two places of the code that my patch simplifies, one is the check for whether to send a "power on" mgmt event and the other the response handling of read_index_list. Johan -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html