Skip to content
  • Hans de Goede's avatar
    HID: logitech-dj: add logi_dj_recv_queue_unknown_work helper · b6aeedde
    Hans de Goede authored
    
    
    Add a logi_dj_recv_queue_unknown_work helper and implement query
    rate-limiting inside this helper.
    
    The motivations behind this are:
    
    1) We need to queue workitems for reports with no place to forward them
    from more places with the upcoming non-unifying receiver support, hence
    the addition of the helper function.
    
    2) When we've missed a pairing info report (or there is a race between
    the report and input-events) and the input report is e.g. from a mouse
    being moved, we will get a lot of these before we've finished (re-)
    querying and enumerating the devices, hence the rate-limiting.
    
    Note this also removes the:
    
    if (!djrcv_dev->paired_dj_devices[hidpp_report->device_index])
    
    check previously guarding the sending of an unknown workitem, the caller
    of logi_dj_recv_queue_notification already does this check before calling
    logi_dj_recv_queue_notification.
    
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
    b6aeedde