Return-Path: From: "Gu, Chao Jie" To: Luiz Augusto von Dentz CC: "linux-bluetooth@vger.kernel.org" Subject: RE: [PATCH v4 1/3] shared/att.c: Add signed command outgoing and CSRK function Date: Thu, 9 Oct 2014 04:02:43 +0000 Message-ID: <3D02B219753AD44CBDDDE484323B17741130DD22@SHSMSX104.ccr.corp.intel.com> References: <1412758479-13214-1-git-send-email-chao.jie.gu@intel.com> <1412758479-13214-2-git-send-email-chao.jie.gu@intel.com> In-Reply-To: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: SGkgTHVpeiwNCg0KPiA+IEBAIC03Nyw2ICs3OCwxNiBAQCBzdHJ1Y3QgYnRfYXR0IHsNCj4gPiAg ICAgICAgIGJ0X2F0dF9kZWJ1Z19mdW5jX3QgZGVidWdfY2FsbGJhY2s7DQo+ID4gICAgICAgICBi dF9hdHRfZGVzdHJveV9mdW5jX3QgZGVidWdfZGVzdHJveTsNCj4gPiAgICAgICAgIHZvaWQgKmRl YnVnX2RhdGE7DQo+ID4gKw0KPiA+ICsgICAgICAgc3RydWN0IGJ0X2NyeXB0byAqY3J5cHRvOw0K PiA+ICsNCj4gPiArICAgICAgIGJvb2wgdmFsaWRfbG9jYWxfY3NyazsNCj4gPiArICAgICAgIHVp bnQ4X3QgbG9jYWxfY3Nya1sxNl07DQo+ID4gKyAgICAgICB1aW50MzJfdCBsb2NhbF9zaWduX2Nu dDsNCj4gPiArDQo+ID4gKyAgICAgICBib29sIHZhbGlkX3JlbW90ZV9jc3JrOw0KPiA+ICsgICAg ICAgdWludDhfdCByZW1vdGVfY3Nya1sxNl07DQo+ID4gKyAgICAgICB1aW50MzJfdCByZW1vdGVf c2lnbl9jbnQ7DQo+IA0KPiBNYXliZSBpdCBpcyBiZXR0ZXIgdG8gaGF2ZSBwb2ludGVycyB0byBh IHN0cnVjdHMgc28geW91IGNhbiBmcmVlIHRoZSBkYXRhIG9uY2UgaXQNCj4gYmVjb21lc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ID4gKyAgICAg ICAgICAgICAgIHBkdV9sZW4gKz0gQlRfQVRUX1NJR05BVFVSRV9MRU47DQo+ID4NCj4gPiAgICAg ICAgIGlmIChsZW5ndGggJiYgcGR1KQ0KPiA+ICAgICAgICAgICAgICAgICBwZHVfbGVuICs9IGxl bmd0aDsNCj4gPiBAQCAtMjkzLDE3ICszMTAsMzIgQEAgc3RhdGljIGJvb2wgZW5jb2RlX3BkdShz dHJ1Y3QgYXR0X3NlbmRfb3AgKm9wLCBjb25zdA0KPiB2b2lkICpwZHUsDQo+ID4gICAgICAgICBp ZiAocGR1X2xlbiA+IDEpDQo+ID4gICAgICAgICAgICAgICAgIG1lbWNweShvcC0+cGR1ICsgMSwg cGR1LCBsZW5ndGgpOw0KPiA+DQo+ID4gKyAgICAgICBpZiAob3AtPm9wY29kZSAmIEFUVF9PUF9T SUdORURfTUFTSykgew0KPiA+ICsgICAgICAgICAgICAgICBpZiAoYnRfY3J5cHRvX3NpZ25fYXR0 KGF0dC0+Y3J5cHRvLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBhdHQtPmxvY2FsX2NzcmssDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIG9wLT5wZHUsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDEgKyBsZW5ndGgsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGF0dC0+bG9jYWxfc2lnbl9jbnQsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYoKHVpbnQ4X3QgKikgb3AtPnBkdSlbMSArDQo+IGxlbmd0aF0pKQ0KPiA+ ICsgICAgICAgICAgICAgICAgICAgICAgIGF0dC0+bG9jYWxfc2lnbl9jbnQrKzsNCj4gPiArICAg ICAgICAgICAgICAgZWxzZQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgI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