#define UDI_VERSION 0x101
#define UDI_PHYSIO_VERSION 0x101
+#define UDI_PCI_VERSION 0x101
#define UDI_NIC_VERSION 0x101
#include <udi.h>
#include <udi_physio.h>
+#include <udi_pci.h>
#include <udi_nic.h>
#include "ne2000_hw.h"
(attr)->attr_type = UDI_ATTR_STRING; \
(attr)->attr_length = (len); \
udi_strncpy_rtrim((char *)(attr)->attr_value, (val), (len))
-#define NE2K_SET_ATTR_STRFMT(attr, name, maxlen, fmt, v...) \
+#define NE2K_SET_ATTR_STRFMT(attr, name, maxlen, fmt, ...) \
udi_strcpy((attr)->attr_name, (name)); \
(attr)->attr_type = UDI_ATTR_STRING; \
- (attr)->attr_length = udi_snprintf((char *)(attr)->attr_value, (maxlen), (fmt) ,## v )
+ (attr)->attr_length = udi_snprintf((char *)(attr)->attr_value, (maxlen), (fmt) ,## __VA_ARGS__ )
+
+extern udi_usage_ind_op_t ne2k_usage_ind;
+extern udi_enumerate_req_op_t ne2k_enumerate_req;
+extern udi_devmgmt_req_op_t ne2k_devmgmt_req;
+extern udi_final_cleanup_req_op_t ne2k_final_cleanup_req;
extern udi_channel_event_ind_op_t ne2k_bus_dev_channel_event_ind;
extern udi_bus_bind_ack_op_t ne2k_bus_dev_bus_bind_ack;
case UDI_ENUMERATE_NEXT:
udi_enumerate_ack(cb, UDI_ENUMERATE_DONE, 0);
break;
+ default:
+ udi_assert(!"invalid enumeration_level");
+ break;
}
}
void ne2k_devmgmt_req(udi_mgmt_cb_t *cb, udi_ubit8_t mgmt_op, udi_ubit8_t parent_ID)
udi_bus_bind_req( bus_bind_cb );
// continue at ne2k_bus_dev_bus_bind_ack
return; }
+ default:
+ udi_assert(!"invalid channel event");
+ break;
}
}
void ne2k_bus_dev_bus_bind_ack(udi_bus_bind_cb_t *cb,
cb->max_perfect_multicast = 0;
cb->max_total_multicast = 0;
cb->mac_addr_len = 6;
- memcpy(cb->mac_addr, rdata->macaddr, 6);
+ udi_memcpy(cb->mac_addr, rdata->macaddr, 6);
udi_nsr_bind_ack( cb, UDI_OK );
// = = = =
}
rdata->rx_next_cb = rx_cb->chain;
rx_cb->chain = NULL;
udi_debug_printf("ne2k_intr__rx_ok: Initialising buffer\n");
- udi_buf_write(ne2k_rx__buf_allocated, UDI_GCB(rx_cb), NULL, 1520, rx_cb->rx_buf, 0, 0, NULL);
+ udi_buf_write(ne2k_rx__buf_allocated, UDI_GCB(rx_cb), NULL, 1520, rx_cb->rx_buf, 0, 0, UDI_NULL_BUF_PATH);
}
else
{