diff options
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/x300/x300_impl.cpp | 16 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_impl.hpp | 2 |
2 files changed, 7 insertions, 11 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 399d640c3..c3ebcd5eb 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -712,10 +712,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) //////////////////////////////////////////////////////////////////// // determine routing based on address match //////////////////////////////////////////////////////////////////// - mb.router_dst_here = X300_XB_DST_E0; //some default if eeprom not match - if (mb.xport_path == "nirio") { - mb.router_dst_here = X300_XB_DST_PCI; - } else { + if (mb.xport_path != "nirio") { // Discover ethernet interfaces mb.discover_eth(mb_eeprom, eth_addrs); } @@ -1242,7 +1239,6 @@ x300_impl::both_xports_t x300_impl::make_transport( config.router_addr_there = X300_DEVICE_THERE; config.dst_prefix = prefix; config.router_dst_there = destination; - config.router_dst_here = mb.router_dst_here; // Choose the endpoint based on the destination size_t endpoint = 0; @@ -1305,13 +1301,15 @@ x300_impl::both_xports_t x300_impl::make_transport( fs_path mboard_path = fs_path("/mboards/"+boost::lexical_cast<std::string>(mb_index) / "link_max_rate"); if (mb.loaded_fpga_image.substr(0,2) == "HG") { - if (mb.router_dst_here == X300_XB_DST_E0) { + size_t max_link_rate = 0; + if (config.iface_index == X300_IFACE_ETH0) { eth_data_rec_frame_size = X300_1GE_DATA_FRAME_MAX_SIZE; - _tree->access<double>(mboard_path).set(X300_MAX_RATE_1GIGE); - } else if (mb.router_dst_here == X300_XB_DST_E1) { + max_link_rate += X300_MAX_RATE_1GIGE; + } else if (config.iface_index == X300_IFACE_ETH1) { eth_data_rec_frame_size = X300_10GE_DATA_FRAME_MAX_SIZE; - _tree->access<double>(mboard_path).set(X300_MAX_RATE_10GIGE); + max_link_rate += X300_MAX_RATE_10GIGE; } + _tree->access<double>(mboard_path).set(max_link_rate); } else if (mb.loaded_fpga_image.substr(0,2) == "XG") { eth_data_rec_frame_size = X300_10GE_DATA_FRAME_MAX_SIZE; size_t max_link_rate = X300_MAX_RATE_10GIGE; diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index f7e33ec70..b5bbbe136 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -227,7 +227,6 @@ private: bool initialization_done; uhd::task::sptr claimer_task; std::string xport_path; - int router_dst_here; std::vector<x300_eth_conn_t> eth_conns; @@ -312,7 +311,6 @@ private: boost::uint8_t router_addr_there; boost::uint8_t dst_prefix; //2bits boost::uint8_t router_dst_there; - boost::uint8_t router_dst_here; x300_eth_iface_t iface_index; }; boost::uint32_t allocate_sid(mboard_members_t &mb, const sid_config_t &config); |