aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/lib/pkt_ctrl.c
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-23 18:09:51 -0800
committerJosh Blum <josh@joshknows.com>2010-12-11 18:43:10 -0800
commit07de916b7646c78d4ad5ba9104d52343e993d198 (patch)
tree405a679edfadec9d98103e8c2d5b9bb531841096 /firmware/microblaze/lib/pkt_ctrl.c
parent95499e2e132b1c619704b6fbc452e661633b3233 (diff)
downloaduhd-07de916b7646c78d4ad5ba9104d52343e993d198.tar.gz
uhd-07de916b7646c78d4ad5ba9104d52343e993d198.tar.bz2
uhd-07de916b7646c78d4ad5ba9104d52343e993d198.zip
packet_router: added sregs for ip addr and ports
the pkt control now programs the inspector with port and ip addr set the eth mac to pass all unicast added easy debug flag to net common
Diffstat (limited to 'firmware/microblaze/lib/pkt_ctrl.c')
-rw-r--r--firmware/microblaze/lib/pkt_ctrl.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/firmware/microblaze/lib/pkt_ctrl.c b/firmware/microblaze/lib/pkt_ctrl.c
index 9870a1f8a..f4b4b7825 100644
--- a/firmware/microblaze/lib/pkt_ctrl.c
+++ b/firmware/microblaze/lib/pkt_ctrl.c
@@ -17,8 +17,6 @@
#include "pkt_ctrl.h"
#include "memory_map.h"
-#include <stdint.h>
-#include <stdbool.h>
#include <nonstdio.h>
static void set_control(uint32_t value, uint32_t mask){
@@ -47,15 +45,11 @@ static bool is_status_bit_set(int bit){
#define MODE_BIT 2
#define CLR_BIT 8
-void pkt_ctrl_register_ip_addr(const struct ip_addr *ip_addr){
- //program in the ip addr
- set_control(0x1 << 4, 0x3 << 4);
- set_control((ip_addr->addr & 0x0000ffff) << 16, 0xffff << 16);
- set_control(0x2 << 4, 0x3 << 4);
- set_control((ip_addr->addr & 0xffff0000) << 0, 0xffff << 16);
-
- //clear cmd
- set_control(0x0, 0x3 << 4);
+void pkt_ctrl_program_inspector(
+ const struct ip_addr *ip_addr, uint16_t dsp_udp_port
+){
+ buffer_pool_ctrl->ip_addr = ip_addr->addr;
+ buffer_pool_ctrl->udp_ports = dsp_udp_port;
}
void pkt_ctrl_set_routing_mode(pkt_ctrl_routing_mode_t mode){