diff options
author | Josh Blum <josh@joshknows.com> | 2010-12-22 19:11:45 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-12-22 19:11:45 -0800 |
commit | 71fc99d006f2347a356c5339905593f64ff902ec (patch) | |
tree | 36c141adca7a2e5cf2f84660b5a2e3543f1dfaba /firmware/microblaze/lib/net_common.c | |
parent | 434ee07c4ba1ce9faee8ecf3a309042ca424cbda (diff) | |
download | uhd-71fc99d006f2347a356c5339905593f64ff902ec.tar.gz uhd-71fc99d006f2347a356c5339905593f64ff902ec.tar.bz2 uhd-71fc99d006f2347a356c5339905593f64ff902ec.zip |
usrp2: got fw working on usrp2+nseries (crosses fingers)
The abort issue seemed to be cause by the listeners table not being initialized.
Also gave the pic handler the initialization works to be consistent but not needed as it was static initialized.
And finally, doubly set the packet router handshake ctrl before entering the claim calls (seemed to fix the lockup, perhaps a bad init state?)
Diffstat (limited to 'firmware/microblaze/lib/net_common.c')
-rw-r--r-- | firmware/microblaze/lib/net_common.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/microblaze/lib/net_common.c b/firmware/microblaze/lib/net_common.c index a34ca615b..c1ca280d9 100644 --- a/firmware/microblaze/lib/net_common.c +++ b/firmware/microblaze/lib/net_common.c @@ -64,6 +64,12 @@ struct listener_entry { static struct listener_entry listeners[MAX_UDP_LISTENERS]; +void init_udp_listeners(void){ + for (int i = 0; i < MAX_UDP_LISTENERS; i++){ + listeners[i].rcvr = NULL; + } +} + static struct listener_entry * find_listener_by_port(unsigned short port) { @@ -78,7 +84,7 @@ static struct listener_entry * find_free_listener(void) { for (int i = 0; i < MAX_UDP_LISTENERS; i++){ - if (listeners[i].rcvr == 0) + if (listeners[i].rcvr == NULL) return &listeners[i]; } abort(); |