aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp
diff options
context:
space:
mode:
authorTrung Tran <trung.tran@ettus.com>2018-07-13 16:00:24 -0700
committerMartin Braun <martin.braun@ettus.com>2018-07-14 11:21:26 -0700
commit606d8fc36de0e1812da66e48f23eb7b840b28ebb (patch)
tree36f8623b0aaa36b13df922596291056941935afb /host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp
parent8a3148eb25cfd26c4449e6e34c3cba1e41ebc500 (diff)
downloaduhd-606d8fc36de0e1812da66e48f23eb7b840b28ebb.tar.gz
uhd-606d8fc36de0e1812da66e48f23eb7b840b28ebb.tar.bz2
uhd-606d8fc36de0e1812da66e48f23eb7b840b28ebb.zip
mg: fix tx power issue
This commit will fix power issues with 2 radios configuration (UHD 3.12+). Removed unused _master boolean. CPLD path are now correct, each radio has its own CPLD object.
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp')
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp
index 365082048..e58e1706e 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp
@@ -25,9 +25,8 @@ double magnesium_radio_ctrl_impl::_set_all_gain(
"freq=" << freq << " Hz, "
"chan=" << chan << ", "
"dir=" << dir);
- const size_t ad9371_chan = _master ? 0 : 1; ;// FIXME: use chan when 2 radios
- const magnesium_cpld_ctrl::chan_sel_t chan_sel =
- _master ? magnesium_cpld_ctrl::CHAN1 : magnesium_cpld_ctrl::CHAN2;
+ const size_t ad9371_chan = chan;
+ auto chan_sel = static_cast<magnesium_cpld_ctrl::chan_sel_t>(chan);
gain_tuple_t gain_tuple = (dir == RX_DIRECTION) ?
get_rx_gain_tuple(gain, _map_freq_to_rx_band(freq)):
get_tx_gain_tuple(gain, _map_freq_to_tx_band(freq));