aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1.h
diff options
context:
space:
mode:
authorDavid Fries <David@Fries.net>2014-01-15 22:29:20 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-07 15:40:17 -0800
commit5dbf5671c73f23c2dd7082c0a14da4e7e902983a (patch)
treefc3de8720f299aa9795aa2123cb670a16dbcc13d /drivers/w1/w1.h
parentconnector: add portid to unicast in addition to broadcasting (diff)
downloadlinux-dev-5dbf5671c73f23c2dd7082c0a14da4e7e902983a.tar.xz
linux-dev-5dbf5671c73f23c2dd7082c0a14da4e7e902983a.zip
w1: reply only to the requester portid
Unicast one wire replies back to the sender portid to avoid multiple programs getting each other's messages, especially as the response can't be uniquely identified with the sequence coming from the requesting program when both programs generate the same id. Continue to broadcast events such as add/remove master/slave devices. Signed-off-by: David Fries <David@Fries.net> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/w1.h')
-rw-r--r--drivers/w1/w1.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h
index a096ef40119e..390a7307fb41 100644
--- a/drivers/w1/w1.h
+++ b/drivers/w1/w1.h
@@ -210,6 +210,11 @@ struct w1_master
struct w1_bus_master *bus_master;
u32 seq;
+ /* port id to send netlink responses to. The value is temporarily
+ * stored here while processing a message, set after locking the
+ * mutex, zero before unlocking the mutex.
+ */
+ u32 portid;
};
/**