summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/bus-fixup.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-07-23 15:08:45 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-03 17:24:16 -0700
commitdd070a1694c563bd7ba5239dd3038ff1420cf856 (patch)
tree78e12a2ade7be0e3145b041bbefe108ea434cdce /drivers/misc/mei/bus-fixup.c
parent5b6dca29b416d8992d52d814aa4be5d7fc97799d (diff)
downloadlinux-dd070a1694c563bd7ba5239dd3038ff1420cf856.tar.bz2
mei: bus: blacklist clients by number of connections
Currently we support only clients with single connection and fixed address clients so all other clients are blacklisted Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/bus-fixup.c')
-rw-r--r--drivers/misc/mei/bus-fixup.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c
index 696918a6fa4f..fd6470f42671 100644
--- a/drivers/misc/mei/bus-fixup.c
+++ b/drivers/misc/mei/bus-fixup.c
@@ -33,6 +33,24 @@
#define MEI_UUID_ANY NULL_UUID_LE
/**
+ * number_of_connections - determine whether an client be on the bus
+ * according number of connections
+ * We support only clients:
+ * 1. with single connection
+ * 2. and fixed clients (max_number_of_connections == 0)
+ *
+ * @cldev: me clients device
+ */
+static void number_of_connections(struct mei_cl_device *cldev)
+{
+ dev_dbg(&cldev->dev, "running hook %s on %pUl\n",
+ __func__, mei_me_cl_uuid(cldev->me_cl));
+
+ if (cldev->me_cl->props.max_number_of_connections > 1)
+ cldev->do_match = 0;
+}
+
+/**
* blacklist - blacklist a client from the bus
*
* @cldev: me clients device
@@ -435,6 +453,7 @@ static struct mei_fixup {
const uuid_le uuid;
void (*hook)(struct mei_cl_device *cldev);
} mei_fixups[] = {
+ MEI_FIXUP(MEI_UUID_ANY, number_of_connections),
MEI_FIXUP(MEI_UUID_NFC_INFO, blacklist),
};