projects
/
debian
/
gnuradio
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
985830f
)
stop sending short ethernet command packets.
author
Eric Blossom
<eb@comsec.com>
Fri, 4 Sep 2009 10:48:15 +0000
(
03:48
-0700)
committer
Eric Blossom
<eb@comsec.com>
Fri, 4 Sep 2009 10:48:15 +0000
(
03:48
-0700)
usrp2/host/lib/usrp2_impl.cc
patch
|
blob
|
history
diff --git
a/usrp2/host/lib/usrp2_impl.cc
b/usrp2/host/lib/usrp2_impl.cc
index d1e85805c981ae94f33fc9b64b6fea39eb2d2568..3d030432429c42d270743697840161552f4db43f 100644
(file)
--- a/
usrp2/host/lib/usrp2_impl.cc
+++ b/
usrp2/host/lib/usrp2_impl.cc
@@
-300,8
+300,19
@@
namespace usrp2 {
bool
- usrp2::impl::transmit_cmd(void *cmd
, size_t len
)
+ usrp2::impl::transmit_cmd(void *cmd
_, size_t len_
)
{
+ const void *cmd = cmd_;
+ int len = len_;
+ unsigned char tmp[64];
+
+ if (len_ < 64){ // pad to minimum ethernet frame size
+ memset(tmp, 0, sizeof(tmp));
+ memcpy(tmp, cmd_, len_);
+ cmd = tmp;
+ len = sizeof(tmp);
+ }
+
return d_eth_buf->tx_frame(cmd, len) == eth_buffer::EB_OK;
}