linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Praznik <frank.praznik@oh.rr.com>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>,
	Frank Praznik <frank.praznik@oh.rr.com>
Cc: linux-input <linux-input@vger.kernel.org>,
	Jiri Kosina <jkosina@suse.cz>,
	David Herrmann <dh.herrmann@gmail.com>
Subject: Re: [PATCH 0/6] HID: Add a stable method for retrieving the client MAC address of a HID device
Date: Fri, 31 Jan 2014 15:04:47 -0500	[thread overview]
Message-ID: <52EC01DF.6050309@oh.rr.com> (raw)
In-Reply-To: <CAN+gG=EVcVmQ8rr2YtoapfftSHaDeYnSu5rCnuZjL=S-v1xU4Q@mail.gmail.com>

On 1/31/2014 14:10, Benjamin Tissoires wrote:
> Hi Frank,
>
> just a quick review:
>
> On Fri, Jan 31, 2014 at 12:32 PM, Frank Praznik <frank.praznik@oh.rr.com> wrote:
>> Currently there is no reliable way for a device module or hidraw application to
>> retrieve the client MAC address of the associated wireless device.  This series
>> of patches adds a stable way of retrieving this information.
> Well, if I look at the uevent of a Bluetooth mouse I have:
>
> $ cat /sys/devices/pci0000\:00/0000\:00\:14.0/usb3/3-2/3-2\:1.0/bluetooth/hci0/hci0\:43/0005\:046D\:B00D.001F/uevent
> DRIVER=hid-generic
> HID_ID=0005:0000046D:0000B00D
> HID_NAME=Ultrathin Touch Mouse
> HID_PHYS=00:10:60:ea:df:ae
> HID_UNIQ=00:1f:20:96:33:47
> MODALIAS=hid:b0005g0001v0000046Dp0000B00D
>
> I would say that HID_UNIQ is the client MAC address set by hidp, no?
> So you don't need to duplicate the info by adding a new field in
> hid_device.
>
In a patch I recently submitted I was using the UNIQ field for 
retrieving a Bluetooth device MAC address and was warned against it 
because "UNIQ is a way to provide unique identifiers for devices, but 
it's not guaranteed to stay the same".  HIDP happens to store the MAC in 
the UNIQ data, but there is no guarantee that it will always be there.  
With these patches you can be completely sure that the data in 
client_addr is the client device MAC address.

  reply	other threads:[~2014-01-31 20:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31 17:32 [PATCH 0/6] HID: Add a stable method for retrieving the client MAC address of a HID device Frank Praznik
2014-01-31 17:32 ` [PATCH 1/6] HID: Add the client_addr member to the hid_device struct Frank Praznik
2014-01-31 19:12   ` Benjamin Tissoires
2014-01-31 17:32 ` [PATCH 2/6] HID: hidp: Store the device MAC in client_addr Frank Praznik
2014-01-31 17:32 ` [PATCH 3/6] HID: Add support for setting client_addr in uhid Frank Praznik
2014-01-31 19:16   ` Benjamin Tissoires
2014-01-31 17:32 ` [PATCH 4/6] HID: Add the HIDIOCGRAWCLIENTADDR ioctl to hidraw Frank Praznik
2014-01-31 19:19   ` Benjamin Tissoires
2014-01-31 17:32 ` [PATCH 5/6] HID: Add the HIDIOCGRAWCLIENTADDR ioctl to the hidraw documentation Frank Praznik
2014-01-31 19:17   ` Benjamin Tissoires
2014-01-31 17:32 ` [PATCH 6/6] HID: Update the hidraw sample with the usage of HIDIOCGRAWCLIENTADDR Frank Praznik
2014-01-31 19:18   ` Benjamin Tissoires
2014-01-31 19:10 ` [PATCH 0/6] HID: Add a stable method for retrieving the client MAC address of a HID device Benjamin Tissoires
2014-01-31 20:04   ` Frank Praznik [this message]
2014-01-31 20:45     ` Benjamin Tissoires
2014-02-01 16:06       ` Frank Praznik
2014-02-01 16:28         ` Benjamin Tissoires
2014-02-03 16:24           ` David Herrmann
2014-02-03 17:31             ` Frank Praznik
2014-02-03 17:45               ` David Herrmann
2014-02-03 17:57                 ` Dmitry Torokhov
2014-02-03 18:06                   ` David Herrmann
2014-02-03 18:33                     ` Frank Praznik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52EC01DF.6050309@oh.rr.com \
    --to=frank.praznik@oh.rr.com \
    --cc=benjamin.tissoires@gmail.com \
    --cc=dh.herrmann@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).