Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2218162ybi; Thu, 20 Jun 2019 11:03:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqysYAKAHtOlefsu3ZL5wo5owrsM4DweWCzikaKQC2qilz469Pqlbc8j1Hs8jwON1nfhJCD+ X-Received: by 2002:a62:3445:: with SMTP id b66mr12422669pfa.246.1561053832464; Thu, 20 Jun 2019 11:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561053832; cv=none; d=google.com; s=arc-20160816; b=f0pPq88Cj70tqu7vSUgEG4botQs0VswSWOYHxLem5+fpr6HiAO4CYgPmPKkZuwZn9N v88gcfchZC5pGJ3dwdtuqOxU1mJOXCK/0s0sHG45JoF6o7f0WsFOtgNgCXE8weqcge05 76giyAAU40y42cF8WVJvpxCvBNxBQMz5oKUEUDmCrHplaSr55PHpRb96ovH8yyWc9i85 mSp+wVW1PyfUEewomyl3b9SpgwZALLDIKAPi7xk+4TqK9FPijRZ0RRWX4k5zc+7O+Ssb NBI0/6zjcmLGSNlAIpLfqEoDc1IndYuaC2BfySnTFsavsj0FepYKveDMBNtpA3uERn4x zApQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=3F7i2+L5Aal+d90JuoIUoMjJA3P3dP1FO350//C9dlY=; b=mQNmtjY4R59ceeYLJK9zMriaqMbkKl3VTNDI7BgP7Se7VGSIjK3bcAaAvrsAefvqDG Csldp6vmsyR3ZyCrV5lB/qeJ9gmI2ZwWy+3/YPeKF8wEgCihfmrVMKmkv18By1MjmiQy XhDef66D87H0Yg97vNSId5CXmszU8H4ADZtPZ29VlS1qhZeKMzgLmrh2aGmx8gbLmJNN HIZXvkbgXHJUNo4QWZbb0mza7+DZ9rrO1JcH3GiqMrrto1QYJ6l8zegVtn8FzpJocUfg dbxH87aHVFgDlSw5VeAp8bx9ZWkxARenz3hpQH9J+hRJHg3PIUe2jz5/y//LxNj7unER RN4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si362904pju.48.2019.06.20.11.03.21; Thu, 20 Jun 2019 11:03:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727487AbfFTSCp (ORCPT + 99 others); Thu, 20 Jun 2019 14:02:45 -0400 Received: from mga01.intel.com ([192.55.52.88]:43435 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726996AbfFTSCo (ORCPT ); Thu, 20 Jun 2019 14:02:44 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2019 11:02:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,397,1557212400"; d="scan'208";a="335576222" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by orsmga005.jf.intel.com with ESMTP; 20 Jun 2019 11:02:29 -0700 Received: from orsmsx115.amr.corp.intel.com (10.22.240.11) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Jun 2019 11:02:29 -0700 Received: from orsmsx103.amr.corp.intel.com ([169.254.5.135]) by ORSMSX115.amr.corp.intel.com ([169.254.4.13]) with mapi id 14.03.0439.000; Thu, 20 Jun 2019 11:02:29 -0700 From: "Gix, Brian" To: "michal.lowas-rzechonek@silvair.com" , "linux-bluetooth@vger.kernel.org" CC: "Stotland, Inga" Subject: Re: [PATCH BlueZ 1/1] mesh: Move HCI handling to mesh-io-generic Thread-Topic: [PATCH BlueZ 1/1] mesh: Move HCI handling to mesh-io-generic Thread-Index: AQHVJcjDD6YNUyw2LEWkDp7JLm+F+6alTmkA Date: Thu, 20 Jun 2019 18:02:28 +0000 Message-ID: <1561053746.4417.14.camel@intel.com> References: <20190618112655.19963-1-michal.lowas-rzechonek@silvair.com> <20190618112655.19963-2-michal.lowas-rzechonek@silvair.com> In-Reply-To: <20190618112655.19963-2-michal.lowas-rzechonek@silvair.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.184.211] Content-Type: text/plain; charset="utf-8" Content-ID: <073B965F19878B469C4DEB9FF685CFF5@intel.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org SGkgTWljaGHFgiwgSSBsaWtlIHdoZXJlIHlvdSBhcmUgZ29pbmcgd2l0aCB0aGlzLg0KDQpPbiBU dWUsIDIwMTktMDYtMTggYXQgMTM6MjYgKzAyMDAsIE1pY2hhxYIgTG93YXMtUnplY2hvbmVrIHdy b3RlOg0KPiBUaGlzIHBhdGNoIHNlcGFyYXRlcyAnbWVzaCcgbW9kdWxlIGZyb20gJ21lc2hfaW8n LCBwYXJ0aWN1bGFybHkNCj4gcmVnYXJkaW5nIGNvbmZpZ3VyYXRpb24gYW5kIGluaXRpY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