aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2021-02-06 14:34:19 -0800
committerAaron Rossetto <aaron.rossetto@ni.com>2021-02-11 07:16:48 -0600
commit13f1dc28f162c74cc0eac6673d3c12d5195238d1 (patch)
tree84ebc1d923efe5d6d61e035e7d17c2f236d29fb8 /host/lib/usrp/x300
parent910db73c9aa9446479f00a4e90521a213568bffa (diff)
downloaduhd-13f1dc28f162c74cc0eac6673d3c12d5195238d1.tar.gz
uhd-13f1dc28f162c74cc0eac6673d3c12d5195238d1.tar.bz2
uhd-13f1dc28f162c74cc0eac6673d3c12d5195238d1.zip
mpmd: Skip find if "resource" key is specified
MPM devices were being discovered when trying to locate PCIe connected devices. Adding filter to exclude them if the "resource" key is specified in the device address arguments. Replaces "lib: disable non pcie types in find with resource" to reduce impact to older devices and remove API change. Signed-off-by: michael-west <michael.west@ettus.com>
Diffstat (limited to 'host/lib/usrp/x300')
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 663b951a1..fa8425fac 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -100,9 +100,7 @@ device_addrs_t x300_find(const device_addr_t& hint_)
return reply_addrs;
}
- bool has_resource_key = hint.has_key_with_prefix("resource");
-
- if (!has_resource_key) {
+ if (!hint.has_key("resource")) {
// otherwise, no address was specified, send a broadcast on each interface
for (const transport::if_addrs_t& if_addrs : transport::get_if_addrs()) {
// avoid the loopback device
@@ -137,7 +135,7 @@ device_addrs_t x300_find(const device_addr_t& hint_)
}
}
- device_addrs_t pcie_addrs = pcie_manager::find(hint, has_resource_key);
+ device_addrs_t pcie_addrs = pcie_manager::find(hint, hint.has_key("resource"));
if (not pcie_addrs.empty()) {
addrs.insert(addrs.end(), pcie_addrs.begin(), pcie_addrs.end());
}