]> git.baikalelectronics.ru Git - kernel.git/commit
HID: nintendo: ratelimit subcommands and rumble
authorDaniel J. Ogorchock <djogorchock@gmail.com>
Sat, 11 Sep 2021 17:36:38 +0000 (13:36 -0400)
committerJiri Kosina <jkosina@suse.cz>
Wed, 27 Oct 2021 08:05:52 +0000 (10:05 +0200)
commit636509ad749b93ad5af00069661d3fa72dd7e029
tree11d5161ec55310bef6770b168f96187a9dc5966c
parentda8132a94a5aacf9851347ef25c8eb73d73bb44a
HID: nintendo: ratelimit subcommands and rumble

It has been found that sending subcommands and rumble data packets at
too great a rate can result in controller disconnects. This patch limits
the rate of subcommands/rumble to once every 25 milliseconds.

Similar to sending subcommands, it is more reliable to send the rumble
data packets immediately after we've received an input report from the
controller. This results in far fewer bluetooth disconnects for the
controller.

Signed-off-by: Daniel J. Ogorchock <djogorchock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-nintendo.c