diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2015-07-23 08:08:45 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-03 20:24:16 -0400 |
commit | dd070a1694c563bd7ba5239dd3038ff1420cf856 (patch) | |
tree | 78e12a2ade7be0e3145b041bbefe108ea434cdce | |
parent | 5b6dca29b416d8992d52d814aa4be5d7fc97799d (diff) |
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>
-rw-r--r-- | drivers/misc/mei/bus-fixup.c | 19 |
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 @@ | |||
33 | #define MEI_UUID_ANY NULL_UUID_LE | 33 | #define MEI_UUID_ANY NULL_UUID_LE |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * number_of_connections - determine whether an client be on the bus | ||
37 | * according number of connections | ||
38 | * We support only clients: | ||
39 | * 1. with single connection | ||
40 | * 2. and fixed clients (max_number_of_connections == 0) | ||
41 | * | ||
42 | * @cldev: me clients device | ||
43 | */ | ||
44 | static void number_of_connections(struct mei_cl_device *cldev) | ||
45 | { | ||
46 | dev_dbg(&cldev->dev, "running hook %s on %pUl\n", | ||
47 | __func__, mei_me_cl_uuid(cldev->me_cl)); | ||
48 | |||
49 | if (cldev->me_cl->props.max_number_of_connections > 1) | ||
50 | cldev->do_match = 0; | ||
51 | } | ||
52 | |||
53 | /** | ||
36 | * blacklist - blacklist a client from the bus | 54 | * blacklist - blacklist a client from the bus |
37 | * | 55 | * |
38 | * @cldev: me clients device | 56 | * @cldev: me clients device |
@@ -435,6 +453,7 @@ static struct mei_fixup { | |||
435 | const uuid_le uuid; | 453 | const uuid_le uuid; |
436 | void (*hook)(struct mei_cl_device *cldev); | 454 | void (*hook)(struct mei_cl_device *cldev); |
437 | } mei_fixups[] = { | 455 | } mei_fixups[] = { |
456 | MEI_FIXUP(MEI_UUID_ANY, number_of_connections), | ||
438 | MEI_FIXUP(MEI_UUID_NFC_INFO, blacklist), | 457 | MEI_FIXUP(MEI_UUID_NFC_INFO, blacklist), |
439 | }; | 458 | }; |
440 | 459 | ||