/* Calculated from the receive time of the device's beacon and it's slot number.  */
static ssize_t uwb_dev_BPST_show(struct device *dev, struct device_attribute *attr, char *buf)
/* Calculated from the receive time of the device's beacon and it's slot number.  */
static ssize_t uwb_dev_BPST_show(struct device *dev, struct device_attribute *attr, char *buf)
{
	struct uwb_dev *uwb_dev = to_uwb_dev(dev);
	struct uwb_beca_e *bce;
	struct uwb_beacon_frame *bf;
	u16 bpst;
	bce = uwb_dev->bce;
	mutex_lock(&bce->mutex);
	bf = (struct uwb_beacon_frame *)bce->be->BeaconInfo;
	bpst = bce->be->wBPSTOffset
		- (u16)(bf->Beacon_Slot_Number * UWB_BEACON_SLOT_LENGTH_US);
	mutex_unlock(&bce->mutex);
	return sprintf(buf, "%d\n", bpst);
}