mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 15:20:41 +00:00
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>
This commit is contained in:
parent
5b6dca29b4
commit
dd070a1694
1 changed files with 19 additions and 0 deletions
|
@ -32,6 +32,24 @@
|
||||||
|
|
||||||
#define MEI_UUID_ANY NULL_UUID_LE
|
#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
|
* blacklist - blacklist a client from the bus
|
||||||
*
|
*
|
||||||
|
@ -435,6 +453,7 @@ static struct mei_fixup {
|
||||||
const uuid_le uuid;
|
const uuid_le uuid;
|
||||||
void (*hook)(struct mei_cl_device *cldev);
|
void (*hook)(struct mei_cl_device *cldev);
|
||||||
} mei_fixups[] = {
|
} mei_fixups[] = {
|
||||||
|
MEI_FIXUP(MEI_UUID_ANY, number_of_connections),
|
||||||
MEI_FIXUP(MEI_UUID_NFC_INFO, blacklist),
|
MEI_FIXUP(MEI_UUID_NFC_INFO, blacklist),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue