icE1usb: Fix inverted logic for clock timing source

The 'struct dahdi_lineconfig.sync' parameter originates from the
'timing' field of system.conf.  dahdi_cfg passes it via the SPANCONFIG
ioctl into the kernel.

The DAHDI docs say:
> source of the master clock. If you choose 0, the port will never
> be used as a source of timing. This is appropriate when you know the
> far end should always be a slave to you.

So if '0' we should use the local clock, and if > 0, the recovered
remote clock.

Thanks to Christoph Lauter for pointing this out.

Change-Id: If35a5a52c094129c342d0f658f496b488d1826ad
This commit is contained in:
Harald Welte 2022-04-20 09:23:19 +02:00
parent 57dbc69bd7
commit ad31fbd8b4
1 changed files with 2 additions and 2 deletions

View File

@ -691,9 +691,9 @@ static int e1u_d_spanconfig(struct file *file, struct dahdi_span *span,
ieu->cfg.tx.mode = ICE1USB_TX_MODE_TS0;
if (lc->sync > 0)
ieu->cfg.tx.timing = ICE1USB_TX_TIME_SRC_LOCAL;
else
ieu->cfg.tx.timing = ICE1USB_TX_TIME_SRC_REMOTE;
else
ieu->cfg.tx.timing = ICE1USB_TX_TIME_SRC_LOCAL;
/* (re-)set to sane defaults */
ieu->cfg.tx.ext_loopback = ICE1USB_TX_EXT_LOOPBACK_OFF;