Date: Tue, 21 Apr 2009 16:51:09 -0700 From: Maksim Yevmenkin <maksim.yevmenkin@gmail.com> To: Iain Hibbert <plunky@rya-online.net> Cc: freebsd-bluetooth@freebsd.org Subject: Re: libhci update Message-ID: <bb4a86c70904211651m6127745ao9d4f26c91e428994@mail.gmail.com> In-Reply-To: <1240352254.082638.416.nullmailer@galant.ukfsn.org> References: <E1Lv5La-00058x-HH@smtpbarns01> <bb4a86c70904201053y1a04d76el336432d3e1a23576@mail.gmail.com> <1240311202.361300.1366.nullmailer@galant.ukfsn.org> <bb4a86c70904210959w6de5e808h9f85ee2bb1995dbf@mail.gmail.com> <1240352254.082638.416.nullmailer@galant.ukfsn.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--0016363104f536d91f04681952b1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Tue, Apr 21, 2009 at 3:17 PM, Iain Hibbert <plunky@rya-online.net> wrote: > On Tue, 21 Apr 2009, Maksim Yevmenkin wrote: > >> the revised diff is attached. please review. > > Its all looking good, though some small tuneups still occurring :) thanks for the review. > in bt_devsend() you might also want to check for "plen > UINT8_MAX"? done > for bt_devrecv() should there also be a method for not timing out? I can > see that being used to wait for any packet which could be some time. > (bt_devreq() does not need that I think?) done > In bt_devreq() you used buf[320] is that truly enough? I didn't check that > part of the radio specification dedicated to baseband packet size but the > Broadcom BCM2045B device in my laptop claims to have max_acl_size of 1017.. yes, but we are not dealing with acl packets in bt_devreq() only commands and event that have up to 255 bytes of payload. > Also, I think rlen and rparam can be empty in bt_devreq(), is that > intentional and what does it mean? if someone wants to just send request and does not really care about return parameters. > and finally some language improvements in the manpage below fixed. please see attached revised patch. thanks, max --0016363104f536d91f04681952b1 Content-Type: text/plain; charset=US-ASCII; name="bluetooth.hci.diff.txt" Content-Disposition: attachment; filename="bluetooth.hci.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ftt91jr80 SW5kZXg6IGhjaS5jCj09PT09PT09PT09PT09PT09PT09P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j aV9ub2RlLCAmYmEpKQorCQkJcmV0dXJuICgtMSk7CisJfSBlbHNlIGlmIChidF9kZXYybm9kZShk ZXZuYW1lLCBoYS5oY2lfbm9kZSwKKwkJCQkJc2l6ZW9mKGhhLmhjaV9ub2RlKSkgPT0gTlVMTCkg eworCQllcnJubyA9IEVOWElPOworCQlyZXR1cm4gKC0xKTsKKwl9CisKKwlzID0gc29ja2V0KFBG X0JMVUVUT09USCwgU09DS19SQVcsIEJMVUVUT09USF9QUk9UT19IQ0kpOworCWlmIChzIDwgMCkK KwkJcmV0dXJuICgtMSk7CisKKwlpZiAoYmluZChzLCAoc3RydWN0IHNvY2thZGRyICopICZoYSwg c2l6ZW9mKGhhKSkgPCAwIHx8CisJICAgIGNvbm5lY3QocywgKHN0cnVjdCBzb2NrYWRkciAqKSAm aGEsIHNpemVvZihoYSkpIDwgMCkgeworCQljbG9zZShzKTsKKwkJcmV0dXJuICgtMSk7CisJfQor CisJcmV0dXJuIChzKTsKK30KKworaW50CitidF9kZXZjbG9zZShpbnQgcykKK3sKKwlyZXR1cm4g KGNsb3NlKHMpKTsKK30KKworaW50CitidF9kZXZzZW5kKGludCBzLCB1aW50MTZfdCBvcGNvZGUs IHZvaWQgKnBhcmFtLCBzaXplX3QgcGxlbikKK3sKKwluZ19oY2lfY21kX3BrdF90CWg7CisJc3Ry dWN0IGlvdmVjCQlpdlsyXTsKKwlpbnQJCQlpdm47CisKKwlpZiAoKHBsZW4gPT0gMCAmJiBwYXJh bSAhPSBOVUxMKSB8fAorCSAgICAocGxlbiA+IDAgJiYgcGFyYW0gPT0gTlVMTCkgfHwKKwkgICAg cGxlbiA+IFVJTlQ4X01BWCkgeyAKKwkJZXJybm8gPSBFSU5WQUw7CisJCXJldHVybiAoLTEpOwor CX0KKworCWl2WzBdLmlvdl9iYXNlID0gJmg7CisJaXZbMF0uaW92X2xlbiA9IHNpemVvZihoKTsK Kwlpdm4gPSAxOworCisJaC50eXBlID0gTkdfSENJX0NNRF9QS1Q7CisJaC5vcGNvZGUgPSBodG9s ZTE2KG9wY29kZSk7CisJaWYgKHBsZW4gPiAwKSB7CisJCWgubGVuZ3RoID0gcGxlbjsKKworCQlp dlsxXS5pb3ZfYmFzZSA9IHBhcmFtOworCQlpdlsxXS5pb3ZfbGVuID0gcGxlbjsKKwkJaXZuID0g MjsKKwl9IGVsc2UKKwkJaC5sZW5ndGggPSAwOworCisJd2hpbGUgKHdyaXRldihzLCBpdiwgaXZu KSA8IDApIHsKKwkJaWYgKGVycm5vID09IEVBR0FJTiB8fCBlcnJubyA9PSBFSU5UUikKKwkJCWNv bnRpbnVlOworCisJCXJldHVybiAoLTEpOworCX0KKworCXJldHVybiAoMCk7Cit9CisKK3NzaXpl X3QKK2J0X2RldnJlY3YoaW50IHMsIHZvaWQgKmJ1Ziwgc2l6ZV90IHNpemUsIHRpbWVfdCB0bykK K3sKKwlzc2l6ZV90CW47CisKKwlpZiAoYnVmID09IE5VTEwgfHwgc2l6ZSA9PSAwKSB7CisJCWVy cm5vID0gRUlOVkFMOworCQlyZXR1cm4gKC0xKTsKKwl9CisKKwlpZiAodG8gPj0gMCkgeworCQlm ZF9zZXQJCXJmZDsKKwkJc3RydWN0IHRpbWV2YWwJdHY7CisKKwkJRkRfWkVSTygmcmZkKTsKKwkJ RkRfU0VUKHMsICZyZmQpOworCisJCXR2LnR2X3NlYyA9IHRvOworCQl0di50dl91c2VjID0gMDsK KworCQl3aGlsZSAoKG4gPSBzZWxlY3QocyArIDEsICZyZmQsIE5VTEwsIE5VTEwsICZ0dikpIDwg MCkgeworCQkJaWYgKGVycm5vID09IEVBR0FJTiB8fCBlcnJubyA9PSBFSU5UUikKKwkJCQljb250 aW51ZTsKKworCQkJcmV0dXJuICgtMSk7CisJCX0KKworCQlpZiAobiA9PSAwKSB7CisJCQllcnJu byA9IEVUSU1FRE9VVDsKKwkJCXJldHVybiAoLTEpOworCQl9CisKKwkJYXNzZXJ0KEZEX0lTU0VU KHMsICZyZmQpKTsKKwl9Cis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bHRlcl9ldnRfc2V0KCZuZXcsIE5HX0hDSV9FVkVOVF9DT01NQU5EX1NU QVRVUyk7CisJaWYgKHItPmV2ZW50ICE9IDApCisJCWJ0X2RldmZpbHRlcl9ldnRfc2V0KCZuZXcs IHItPmV2ZW50KTsKKworCWlmIChidF9kZXZmaWx0ZXIocywgJm5ldywgJm9sZCkgPCAwKQorCQly ZXR1cm4gKC0xKTsKKworCWVycm9yID0gMDsKKworCW4gPSBidF9kZXZzZW5kKHMsIHItPm9wY29k ZSwgci0+Y3BhcmFtLCByLT5jbGVuKTsKKwlpZiAobiA8IDApIHsKKwkJZXJyb3IgPSBlcnJubzsK KwkJZ290byBvdXQ7CQorCX0KKworCW9wY29kZSA9IGh0b2xlMTYoci0+b3Bjb2RlKTsKKwl0X2Vu ZCA9IHRpbWUoTlVMTCkgKyB0bzsKKworCWRvIHsKKwkJdG8gPSB0X2VuZCAtIHRpbWUoTlVMTCk7 CisJCWlmICh0byA8IDApCisJCQl0byA9IDA7CisKKwkJbiA9IGJ0X2RldnJlY3YocywgYnVmLCBz aXplb2YoYnVmKSwgdG8pOworCQlpZiAobiA8IDApIHsKKwkJCWVycm9yID0gZXJybm87CisJCQln b3RvIG91dDsKKwkJfQorCisJCWlmIChlLT50eXBlICE9IE5HX0hDSV9FVkVOVF9QS1QpIHsKKwkJ CWVycm9yID0gRUlPOworCQkJZ290byBvdXQ7CisJCX0KKworCQluIC09IHNpemVvZigqZSk7CisK KwkJc3dpdGNoIChlLT5ldmVudCkgeworCQljYXNlIE5HX0hDSV9FVkVOVF9DT01NQU5EX0NPTVBM OgorCQkJaWYgKGNjLT5vcGNvZGUgPT0gb3Bjb2RlKSB7CisJCQkJbiAtPSBzaXplb2YoKmNjKTsK KworCQkJCWlmIChyLT5ybGVuID49IG4pIHsKKwkJCQkJci0+cmxlbiA9IG47CisJCQkJCW1lbWNw eShyLT5ycGFyYW0sIGNjICsgMSwgci0+cmxlbik7CisJCQkJfQorCisJCQkJZ290byBvdXQ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T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gTWFrZWZpbGUJKHJldmlz aW9uIDE5MTM2MykKKysrIE1ha2VmaWxlCSh3b3JraW5nIGNvcHkpCkBAIC0zMyw2ICszMywxOSBA QAogTUxJTktTKz0JYmx1ZXRvb3RoLjMgYnRfZGV2aW5mby4zCiBNTElOS1MrPQlibHVldG9vdGgu MyBidF9kZXZlbnVtLjMKIAorTUxJTktTKz0JYmx1ZXRvb3RoLjMgYnRfZGV2b3Blbi4zCitNTElO S1MrPQlibHVldG9vdGguMyBidF9kZXZjbG9zZS4zCitNTElOS1MrPQlibHVldG9vdGguMyBidF9k ZXZzZW5kLjMKK01MSU5LUys9CWJsdWV0b290aC4zIGJ0X2RldnJlcS4zCitNTElOS1MrPQlibHVl dG9vdGguMyBidF9kZXZmaWx0ZXIuMworTUxJTktTKz0JYmx1ZXRvb3RoLjMgYnRfZGV2ZmlsdGVy X3BrdF9zZXQuMworTUxJTktTKz0JYmx1ZXRvb3RoLjMgYnRfZGV2ZmlsdGVyX3BrdF9jbHIuMwor TUxJTktTKz0JYmx1ZXRvb3RoLjMgYnRfZGV2ZmlsdGVyX3BrdF90c3QuMworTUxJTktTKz0JYmx1 ZXRvb3RoLjMgYnRfZGV2ZmlsdGVyX2V2dF9zZXQuMworTUxJTktTKz0JYmx1ZXRvb3RoLjMgYnRf ZGV2ZmlsdGVyX2V2dF9jbHIuMworTUxJTktTKz0JYmx1ZXRvb3RoLjMgYnRfZGV2ZmlsdGVyX2V2 dF90c3QuMworTUxJTktTKz0JYmx1ZXRvb3RoLjMgYnRfZGV2aW5xdWlyeS4zCisKIE1MSU5LUys9 CWJsdWV0b290aC4zIGJkYWRkcl9zYW1lLjMKIE1MSU5LUys9CWJsdWV0b290aC4zIGJkYWRkcl9h bnkuMwogTUxJTktTKz0JYmx1ZXRvb3RoLjMgYmRhZGRyX2NvcHkuMwo= --0016363104f536d91f04681952b1--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70904211651m6127745ao9d4f26c91e428994>