diff options
author | Josh Blum <josh@joshknows.com> | 2010-04-12 14:31:46 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-04-12 14:31:46 -0700 |
commit | 24ca9fbd0784c7c53af6ad4f9035e8d43e888290 (patch) | |
tree | c55d3198ecb389054e5990e45190c3c63b2cddf9 /host/lib/usrp/usrp2 | |
parent | e611e610f64b473cdd9d0aa5e40690d7550c3cc0 (diff) | |
download | uhd-24ca9fbd0784c7c53af6ad4f9035e8d43e888290.tar.gz uhd-24ca9fbd0784c7c53af6ad4f9035e8d43e888290.tar.bz2 uhd-24ca9fbd0784c7c53af6ad4f9035e8d43e888290.zip |
store the mtu and hdr len stuff only in the usrp2 impl
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index 19a1ecf0f..62aca49ee 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -104,10 +104,11 @@ size_t usrp2_impl::send( transport::managed_send_buffer::sptr send_buff = _data_transport->get_send_buff(); boost::uint32_t *tx_mem = send_buff->cast<boost::uint32_t *>(); - size_t num_samps = std::min( - asio::buffer_size(buff), - send_buff->size()-vrt::max_header_words32*sizeof(boost::uint32_t) - )/io_type.size; + size_t num_samps = std::min(std::min( + asio::buffer_size(buff)/io_type.size, + size_t(_max_tx_samples_per_packet)), + send_buff->size()/io_type.size + ); //kill the end of burst flag if this is a fragment if (asio::buffer_size(buff)/io_type.size < num_samps) |