summaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/lib/ethernet.c
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-07-26 15:33:30 -0700
committerNick Foster <nick@nerdnetworks.org>2010-07-26 15:33:30 -0700
commitf72ad02f5ec370f45995ecd2b3e8b322e9a7e4dc (patch)
tree069b728b6e44a5db8607a8c5815e3a2d50a114ac /firmware/microblaze/lib/ethernet.c
parentf86c25317b457b280c697fc47905c79bdbbc0c93 (diff)
downloaduhd-f72ad02f5ec370f45995ecd2b3e8b322e9a7e4dc.tar.gz
uhd-f72ad02f5ec370f45995ecd2b3e8b322e9a7e4dc.tar.bz2
uhd-f72ad02f5ec370f45995ecd2b3e8b322e9a7e4dc.zip
New branch with firmware dir from USRP2P branch.
Diffstat (limited to 'firmware/microblaze/lib/ethernet.c')
-rw-r--r--firmware/microblaze/lib/ethernet.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/firmware/microblaze/lib/ethernet.c b/firmware/microblaze/lib/ethernet.c
index 34a3ad7c1..2d7c4d7bd 100644
--- a/firmware/microblaze/lib/ethernet.c
+++ b/firmware/microblaze/lib/ethernet.c
@@ -25,8 +25,7 @@
#include "nonstdio.h"
#include <stdbool.h>
#include "i2c.h"
-#include "usrp2_i2c_addr.h"
-
+#include "usrp2/fw_common.h"
#define VERBOSE 0
@@ -302,7 +301,7 @@ ethernet_mac_addr(void)
return &src_mac_addr;
eth_mac_addr_t tmp;
- bool ok = eeprom_read(I2C_ADDR_MBOARD, MBOARD_MAC_ADDR, &tmp, sizeof(tmp));
+ bool ok = eeprom_read(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_MAC_ADDR, &tmp, sizeof(tmp));
if (!ok || unprogrammed(&tmp, sizeof(tmp))){
// use the default
}
@@ -316,7 +315,7 @@ ethernet_mac_addr(void)
bool
ethernet_set_mac_addr(const eth_mac_addr_t *t)
{
- bool ok = eeprom_write(I2C_ADDR_MBOARD, MBOARD_MAC_ADDR, t, sizeof(eth_mac_addr_t));
+ bool ok = eeprom_write(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_MAC_ADDR, t, sizeof(eth_mac_addr_t));
if (ok){
src_mac_addr = *t;
src_mac_addr_initialized = true;
@@ -344,7 +343,7 @@ const struct ip_addr *get_ip_addr(void)
return &src_ip_addr;
struct ip_addr tmp;
- bool ok = eeprom_read(I2C_ADDR_MBOARD, MBOARD_IP_ADDR, &tmp, sizeof(tmp));
+ bool ok = eeprom_read(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_IP_ADDR, &tmp, sizeof(tmp));
if (!ok || unprogrammed(&tmp, sizeof(tmp))){
// use the default
}
@@ -356,7 +355,7 @@ const struct ip_addr *get_ip_addr(void)
}
bool set_ip_addr(const struct ip_addr *t){
- bool ok = eeprom_write(I2C_ADDR_MBOARD, MBOARD_IP_ADDR, t, sizeof(struct ip_addr));
+ bool ok = eeprom_write(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_IP_ADDR, t, sizeof(struct ip_addr));
if (ok){
src_ip_addr = *t;
src_ip_addr_initialized = true;