 +		}
 +		break;
 +	case event_reactivate:
++		if (!session->driver.pds.ready)
++			return;
++
 +		ptr = buf;
 +		hdr = (struct qmi_header *)ptr;
 +		hdr->type = QMI_REQUEST;

+	uint8_t value[];
+} __attribute__((__packed__));
+
+#define QMI_REQUEST			0
+#define QMI_INDICATION			4
+

     # check for C11 or better, and __STDC__NO_ATOMICS__ is not defined
     # before looking for stdatomic.h
     if ((config.CheckC11() and
@@ -1684,6 +1694,7 @@ libgpsd_sources = [
     "drivers/driver_nmea0183.c",
     "drivers/driver_nmea2000.c",
     "drivers/driver_oncore.c",
