clock: Calculate frequency offset even without any delay estimation.
If the "free_running" option is set, the "no adjust" calculates and prints an estimation of the phase and frequency offsets to the remote master. Because the phase estimate requires a delay measurement, this calculation is not performed without having the delay estimate first. However, a typical transparent clock application will want to use the frequency offset to correct the residence times to match the master's frequency. This patch adds a call to the "no adjust" routine even if no valid delay measurement has been made. Signed-off-by: Richard Cochran <richardcochran@gmail.com>
This commit is contained in:
		
							parent
							
								
									51b540875f
								
							
						
					
					
						commit
						eb8507a45a
					
				
							
								
								
									
										6
									
								
								clock.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								clock.c
									
									
									
									
									
								
							@ -1599,7 +1599,11 @@ enum servo_state clock_synchronize(struct clock *c, tmv_t ingress, tmv_t origin)
 | 
				
			|||||||
	tsproc_down_ts(c->tsproc, origin, ingress);
 | 
						tsproc_down_ts(c->tsproc, origin, ingress);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (tsproc_update_offset(c->tsproc, &c->master_offset, &weight)) {
 | 
						if (tsproc_update_offset(c->tsproc, &c->master_offset, &weight)) {
 | 
				
			||||||
		return state;
 | 
							if (c->free_running) {
 | 
				
			||||||
 | 
								return clock_no_adjust(c, ingress, origin);
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								return state;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (clock_utc_correct(c, ingress)) {
 | 
						if (clock_utc_correct(c, ingress)) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user