diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 6c4947aeeeef..34f29f7c62f8 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -4676,7 +4676,7 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, case ELANTECH_PKT_TRACKPOINT: /* 7 6 5 4 3 2 1 0 (LSB) * ------------------------------------------- - * ipacket[0]: 0 0 SX SY 0 M R L + * ipacket[0]: 0 0 SY SX 0 M R L * ipacket[1]: ~SX 0 0 0 0 0 0 0 * ipacket[2]: ~SY 0 0 0 0 0 0 0 * ipacket[3]: 0 0 ~SY ~SX 0 1 1 0 @@ -4687,9 +4687,9 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, * over 9 bits with SX/SY the relative top bit and * X7..X0 and Y7..Y0 the lower bits. */ - *x = (pb->ipacket[0] & 0x20) ? + *x = (pb->ipacket[0] & MOUSE_PS2_XNEG) ? pb->ipacket[4] - 256 : pb->ipacket[4]; - *y = (pb->ipacket[0] & 0x10) ? + *y = (pb->ipacket[0] & MOUSE_PS2_YNEG) ? pb->ipacket[5] - 256 : pb->ipacket[5]; trackpoint_button =