From 9f76d1fc6a7f5f5caf8b2728a6423ccf3da4b125 Mon Sep 17 00:00:00 2001
From: Matthew Crymble <matthew.crymble@ni.com>
Date: Fri, 24 May 2019 13:43:28 -0500
Subject: X300: fixed get_mtu for pcie

Signed-off-by: Matthew Crymble <matthew.crymble@ni.com>
---
 host/lib/usrp/x300/x300_impl.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'host')

diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index b9b4a06f9..f6eda34ff 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -1993,7 +1993,10 @@ x300_impl::frame_size_t x300_impl::determine_max_frame_size(
     return frame_size;
 }
 
-size_t x300_impl::get_mtu(const size_t /*mb_index*/, const uhd::direction_t dir) {
+size_t x300_impl::get_mtu(const size_t mb_index, const uhd::direction_t dir) {
+    if (_mb[mb_index].xport_path == "nirio") {
+        return (dir == RX_DIRECTION ? x300::PCIE_RX_DATA_FRAME_SIZE : x300::PCIE_TX_DATA_FRAME_SIZE);
+    }
     return (dir == RX_DIRECTION) ? _max_frame_sizes.recv_frame_size :
             _max_frame_sizes.send_frame_size;
 }
-- 
cgit v1.2.3