summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-08-11 16:54:53 -0700
committerJosh Blum <josh@joshknows.com>2011-08-11 16:54:53 -0700
commit3a2aeef7e080e27b8744c520908eff4173a86e30 (patch)
tree16999f1583765cee32e72e6d00b4607413f04b96 /host
parent30735e6f0b8b204dda590df604e1e68741df33cb (diff)
downloaduhd-3a2aeef7e080e27b8744c520908eff4173a86e30.tar.gz
uhd-3a2aeef7e080e27b8744c520908eff4173a86e30.tar.bz2
uhd-3a2aeef7e080e27b8744c520908eff4173a86e30.zip
usrp2: always resize socket send buffer to size of SRAM (we will never commit more)
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 774f91d28..168beccbf 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -284,10 +284,9 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
#endif
}
if (not device_addr.has_key("send_buff_size")){
- #if defined(UHD_PLATFORM_WIN32)
- //a large send buff is ok to have on windows
- device_addr["send_buff_size"] = "50e6";
- #endif
+ //The buffer should be the size of the SRAM on the device,
+ //because we will never commit more than the SRAM can hold.
+ device_addr["send_buff_size"] = boost::lexical_cast<std::string>(USRP2_SRAM_BYTES);
}
device_addrs_t device_args = separate_device_addr(device_addr);