Hi Marcel, On Sat, Mar 22, 2014, Marcel Holtmann wrote: > > case LE_SCAN_DISABLE: > > + if (hdev->pending_adv) { > > + struct hci_adv_ind *p = hdev->pending_adv; > > + > > + if (!ADV_CACHE_EMPTY(p)) > > + mgmt_device_found(hdev, &p->bdaddr, LE_LINK, > > + p->bdaddr_type, NULL, > > + p->rssi, 0, 1, p->data, > > + p->len); > > + > > + hdev->pending_adv = NULL; > > + kfree(p); > > + } > > + > > I wonder if this should not all be centralized in the discovery set_state function. I'm fine with all your other suggestions (and have mostly completed implementing them), but since DISCOVERY_STOPPED is set only at the end of inquiry in the case of dual-mode discovery I think it's better to do the sending of the pending device found event here when LE scanning stops. 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