Linux wireless drivers development
 help / color / mirror / Atom feed
* [RFC] NFC: Add num of targets to TARGETS_FOUND event
@ 2011-12-08 17:13 Elias, Ilan
  2011-12-12 10:59 ` Samuel Ortiz
  0 siblings, 1 reply; 3+ messages in thread
From: Elias, Ilan @ 2011-12-08 17:13 UTC (permalink / raw)
  To: lauro.venancio@openbossa.org, samuel@sortiz.org,
	aloisio.almeida@openbossa.org
  Cc: linux-wireless@vger.kernel.org

Hi Lauro, Aloisio, Samuel, all,

It seems that when targets are found (via NFC_EVENT_TARGETS_FOUND), there is no way to know (in user space) how many targets were found in advance.

I suggest we add a new attribute NFC_ATTR_NUM_TARGETS_FOUND to the event NFC_EVENT_TARGETS_FOUND.
Otherwise, the user would have to wait until a timeut expires in order to decide that no more targets will arrive.
Please note that the knowledge of how many targets were found can be found in the variable dev->n_targets.

I'll appreciate your comments on this issue.
If you agree, I'll send out a patch for this.

Thanks & BR,
Ilan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] NFC: Add num of targets to TARGETS_FOUND event
  2011-12-08 17:13 [RFC] NFC: Add num of targets to TARGETS_FOUND event Elias, Ilan
@ 2011-12-12 10:59 ` Samuel Ortiz
  2011-12-12 16:40   ` Elias, Ilan
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Ortiz @ 2011-12-12 10:59 UTC (permalink / raw)
  To: Elias, Ilan
  Cc: lauro.venancio@openbossa.org, aloisio.almeida@openbossa.org,
	linux-wireless@vger.kernel.org

Hi Ilan,

On Thu, 2011-12-08 at 17:13 +0000, Elias, Ilan wrote:
> I suggest we add a new attribute NFC_ATTR_NUM_TARGETS_FOUND to the event NFC_EVENT_TARGETS_FOUND.
> Otherwise, the user would have to wait until a timeut expires in order to decide that no more targets will arrive.
You mean a timeout from NFC_CMD_GET_TARGET ? You could guess the number
of targets from the dumped message size, couldn't you ?

Cheers,
Samuel.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [RFC] NFC: Add num of targets to TARGETS_FOUND event
  2011-12-12 10:59 ` Samuel Ortiz
@ 2011-12-12 16:40   ` Elias, Ilan
  0 siblings, 0 replies; 3+ messages in thread
From: Elias, Ilan @ 2011-12-12 16:40 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: lauro.venancio@openbossa.org, aloisio.almeida@openbossa.org,
	linux-wireless@vger.kernel.org

Hi Samuel, 

> > I suggest we add a new attribute NFC_ATTR_NUM_TARGETS_FOUND 
> to the event NFC_EVENT_TARGETS_FOUND.
> > Otherwise, the user would have to wait until a timeut 
> expires in order to decide that no more targets will arrive.
> You mean a timeout from NFC_CMD_GET_TARGET ? You could guess 
> the number
> of targets from the dumped message size, couldn't you ?
As you said (in the NFC IRC room), the last dump message should be marked with NLMSG_DONE.
I'll check it out.

Thanks & BR,
Ilan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-12 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08 17:13 [RFC] NFC: Add num of targets to TARGETS_FOUND event Elias, Ilan
2011-12-12 10:59 ` Samuel Ortiz
2011-12-12 16:40   ` Elias, Ilan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox