Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp936850imm; Fri, 13 Jul 2018 08:45:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdYAiMZvdZoqTUodeVseF6yBEOeQyrdzgMTsEJqd6p5vb5FgrMX2XcCTpRHnFHk+mGWLRoV X-Received: by 2002:a17:902:8308:: with SMTP id bd8-v6mr6955488plb.329.1531496706368; Fri, 13 Jul 2018 08:45:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531496706; cv=none; d=google.com; s=arc-20160816; b=R+Ab4gde3xoBuBksV5k9z1XwLUxmMIFj41DbQSvW4kArKhus0XJlNcmu4+luH2zCr6 WBudOO7qTXKhZULgJ4gTwHnCZtGwdzWBW6MrOdX8Uhw3a0hQYbKhGEreZe/Tr3BrdDYU S12aV47oL9dzT+jLLZr5UkMkd2hhLkBxKoWA2NX64VtZqeg038d6PTgPk3vsaT/WSFih x9ZMJRM1jR3ELtZxa5VOkBmN3SzGmbtTx2a3gAlLYezNlKGiT5Km4jj8JcPKJbDkZ12z anT0V5GBzX5FVhe4IRc0yYTA1UOx8YSoIMnxZF+1peNJONTFwWJ6qOWTS57+oabKKlfW AZTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=5Sb85obBd4bt0fzQ0KDN+O4iIvpMc8ijfQ23LRcK3fg=; b=eJvV/8WnoH4p4IKCeu4aWbpfKutv/wXzKoc8sWpq0YXx7oOy6q3nP0Oi4p/oR6b63c lgsHQ4DukmUUjCube3Q6N6yEg3Ir1oWFCY8CA3M4W9Oxsfs1iSnUsVD62GGLRUxW1VXV hUzl82dRvmJntplt8AB1+kPQyEchsfbKJFGI9SDFg3WmfNkIXyIXb/XIw+llXtG5UnQD JsFCnhd5y029iKQanpxa21Jshz36P4P5R2wQefw0ohkF+2ui5XZgssAeEs5ytvAShX7c cFMmd0yDKk15JVMDLISwOInjo5hPv2iv/7grAUszScyWNjLv476fP/tHERtDYGgoGjfE qK4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x62-v6si27540541pfd.124.2018.07.13.08.44.51; Fri, 13 Jul 2018 08:45:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731427AbeGMP7G (ORCPT + 99 others); Fri, 13 Jul 2018 11:59:06 -0400 Received: from proxima.lasnet.de ([78.47.171.185]:56272 "EHLO proxima.lasnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730149AbeGMP7F (ORCPT ); Fri, 13 Jul 2018 11:59:05 -0400 Received: from [172.20.8.18] (unknown [207.96.227.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan@datenfreihafen.org) by proxima.lasnet.de (Postfix) with ESMTPSA id 0C42BC853E; Fri, 13 Jul 2018 17:43:51 +0200 (CEST) Subject: Re: [PATCH] ieee802154: add rx LQI from userspace To: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= Cc: Romuald Cari , linux-wpan@vger.kernel.org, Alexander Aring , Stefan Schmidt , "David S . Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Cl=c3=a9ment_Peron?= References: <20180607140802.22666-1-peron.clem@gmail.com> From: Stefan Schmidt Message-ID: <858d58d5-be9c-179e-c74c-3b47dee44993@datenfreihafen.org> Date: Fri, 13 Jul 2018 11:43:49 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On 10.07.2018 11:13, Clément Péron wrote: > Hi Alexander, Stefan, > > Thanks for your feedbacks, > > On Mon, 9 Jul 2018 at 10:49, Stefan Schmidt wrote: >> >> Hello Clement. >> >> Finally coming to review the patch. Sorry for the delay. >> >> On 07.06.2018 16:08, Clément Péron wrote: >>> From: Romuald CARI >>> >>> The Link Quality Indication data exposed by drivers could not be accessed from >>> userspace. Since this data is per-datagram received, it makes sense to make it >>> available to userspace application through the ancillary data mechanism in >>> recvmsg rather than through ioctls. This can be activated using the socket >>> option WPAN_WANTLQI under SOL_IEEE802154 protocol. >> >> I can see that it makes the application life a lot easier to have data >> send out and LQI value synced up by using the socket approach instead of >> dealing with socket and ioctl's. I am good with this patch in general. >> >> So you have some public code that uses this approach? I would be >> interesting in the userspace part of yours. A demo would be fine. If the >> network handling part of your application is public anyway that would be >> even better. :-) > > I'm sorry but the userspace code that use this isn't open. Fair enough. > I will check if I can share this part. > Just the idea is to compute an average LQI and when it reach a > threshold we allow the remote to control the device. Yes, I would be happy with a simple example just showing how to use the socket opt and a very basic algo on how this LQI would be used. regards Stefan Schmidt