lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d4a2c953-90e9-2ea2-ee18-a4f7bd7dae28@gmail.com>
Date:   Mon, 29 Aug 2022 10:23:01 -0400
From:   "Peter F. Patel-Schneider" <pfpschneider@...il.com>
To:     Bastien Nocera <hadess@...ess.net>, linux-input@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Filipe LaĆ­ns <lains@...eup.net>,
        Nestor Lopez Casado <nlopezcasad@...itech.com>
Subject: Re: [RFC v1 2/2] HID: logitech-hidpp: Remove hard-coded "Sw. Id." for
 HID++ 2.0 commands


On 8/29/22 09:48, Bastien Nocera wrote:
> Some HID++ 2.0 commands had correctly set a non-zero software identifier
> directly as part of their function identifiers, but it's more correct to
> define the function identifier and the software identifier separately
> before combined them when the command is sent.
>
> As this is now done in the previous commit, remove the hard-coded 0x1
> software identifiers in the function definitions.
>
> Signed-off-by: Bastien Nocera <hadess@...ess.net>
> ---
>   drivers/hid/hid-logitech-hidpp.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
> index 02f8c99672c7..46b3e51cb854 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -859,8 +859,8 @@ static int hidpp_unifying_init(struct hidpp_device *hidpp)
>   #define HIDPP_PAGE_ROOT					0x0000
>   #define HIDPP_PAGE_ROOT_IDX				0x00
>   
> -#define CMD_ROOT_GET_FEATURE				0x01
> -#define CMD_ROOT_GET_PROTOCOL_VERSION			0x11
> +#define CMD_ROOT_GET_FEATURE				0x00
> +#define CMD_ROOT_GET_PROTOCOL_VERSION			0x10
>   
>   static int hidpp_root_get_feature(struct hidpp_device *hidpp, u16 feature,
>   	u8 *feature_index, u8 *feature_type)
> @@ -937,9 +937,9 @@ static int hidpp_root_get_protocol_version(struct hidpp_device *hidpp)
>   
>   #define HIDPP_PAGE_GET_DEVICE_NAME_TYPE			0x0005
>   
> -#define CMD_GET_DEVICE_NAME_TYPE_GET_COUNT		0x01
> -#define CMD_GET_DEVICE_NAME_TYPE_GET_DEVICE_NAME	0x11
> -#define CMD_GET_DEVICE_NAME_TYPE_GET_TYPE		0x21
> +#define CMD_GET_DEVICE_NAME_TYPE_GET_COUNT		0x00
> +#define CMD_GET_DEVICE_NAME_TYPE_GET_DEVICE_NAME	0x10
> +#define CMD_GET_DEVICE_NAME_TYPE_GET_TYPE		0x20
>   
>   static int hidpp_devicenametype_get_count(struct hidpp_device *hidpp,
>   	u8 feature_index, u8 *nameLength)
> @@ -1969,8 +1969,8 @@ static int hidpp_touchpad_fw_items_set(struct hidpp_device *hidpp,
>   
>   #define HIDPP_PAGE_TOUCHPAD_RAW_XY			0x6100
>   
> -#define CMD_TOUCHPAD_GET_RAW_INFO			0x01
> -#define CMD_TOUCHPAD_SET_RAW_REPORT_STATE		0x21
> +#define CMD_TOUCHPAD_GET_RAW_INFO			0x00
> +#define CMD_TOUCHPAD_SET_RAW_REPORT_STATE		0x20
>   
>   #define EVENT_TOUCHPAD_RAW_XY				0x00
>   



Looks good to me.


peter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ