Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6e01733 authored by Michael Sun's avatar Michael Sun
Browse files

Revert "floss: hid: reply to get_report callback"

This reverts commit f764fb3d.

Linux uhid now handles the reply to get_report. Redundant reply cause
other issues.

Bug: 294785152
Test: HP910, Magic Trackpad connects
Tag: #floss

Change-Id: I0418b0f2ecaa8591a400692d446b58168abec058
parent e64840da
Loading
Loading
Loading
Loading
+1 −8
Original line number Original line Diff line number Diff line
@@ -2809,20 +2809,13 @@ impl BtifHHCallbacks for Bluetooth {
        );
        );
    }
    }


    fn get_report(
    fn get_report(&mut self, address: RawAddress, status: BthhStatus, _data: Vec<u8>, size: i32) {
        &mut self,
        mut address: RawAddress,
        status: BthhStatus,
        mut data: Vec<u8>,
        size: i32,
    ) {
        debug!(
        debug!(
            "Hid host got report: Address({}) Status({:?}) Report Size({:?})",
            "Hid host got report: Address({}) Status({:?}) Report Size({:?})",
            DisplayAddress(&address),
            DisplayAddress(&address),
            status,
            status,
            size
            size
        );
        );
        self.hh.as_ref().unwrap().get_report_reply(&mut address, status, &mut data, size as u16);
    }
    }


    fn handshake(&mut self, address: RawAddress, status: BthhStatus) {
    fn handshake(&mut self, address: RawAddress, status: BthhStatus) {
+0 −19
Original line number Original line Diff line number Diff line
@@ -306,25 +306,6 @@ impl HidHost {
        ))
        ))
    }
    }


    #[profile_enabled_or(BtStatus::NotReady)]
    pub fn get_report_reply(
        &self,
        addr: &mut RawAddress,
        status: BthhStatus,
        report: &mut [u8],
        size: u16,
    ) -> BtStatus {
        let addr_ptr = LTCheckedPtrMut::from_ref(addr);
        BtStatus::from(ccall!(
            self,
            get_report_reply,
            addr_ptr.into(),
            status as bindings::bthh_status_t,
            report.as_mut_ptr() as *mut std::os::raw::c_char,
            size
        ))
    }

    #[profile_enabled_or(BtStatus::NotReady)]
    #[profile_enabled_or(BtStatus::NotReady)]
    pub fn set_report(
    pub fn set_report(
        &self,
        &self,