Skip to content

Commit f784ad7

Browse files
authored
Pass grid parameter while calling set_laser_freq (sonic-net#317)
1 parent ed818f8 commit f784ad7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sonic-xcvrd/xcvrd/xcvrd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ def configure_tx_output_power(self, api, lport, tx_power):
12931293
self.log_error("{} configured tx power {} > maximum power {} supported".format(lport, tx_power, max_p))
12941294
return api.set_tx_power(tx_power)
12951295

1296-
def configure_laser_frequency(self, api, lport, freq):
1296+
def configure_laser_frequency(self, api, lport, freq, grid=75):
12971297
_, _, _, lowf, highf = api.get_supported_freq_config()
12981298
if freq < lowf:
12991299
self.log_error("{} configured freq:{} GHz is lower than the supported freq:{} GHz".format(lport, freq, lowf))
@@ -1304,7 +1304,7 @@ def configure_laser_frequency(self, api, lport, freq):
13041304
self.log_error("{} configured freq:{} GHz is NOT in 75GHz grid".format(lport, freq))
13051305
if api.get_tuning_in_progress():
13061306
self.log_error("{} Tuning in progress, channel selection may fail!".format(lport))
1307-
return api.set_laser_freq(freq)
1307+
return api.set_laser_freq(freq, grid)
13081308

13091309
def wait_for_port_config_done(self, namespace):
13101310
# Connect to APPL_DB and subscribe to PORT table notifications

0 commit comments

Comments
 (0)