]> 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)
commit284adfaaa2e94bd25b077111e38f89334cd83ddc
tree11d5161ec55310bef6770b168f96187a9dc5966c
parent3b216e9f037021209e5de02fc50fc9684a7f76f2
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