[lib][minip] add an arg to the ethernet transmit callback

Already had the registration hook for it, but was never used.
This commit is contained in:
Travis Geiselbrecht
2022-03-19 15:06:57 -07:00
parent fe28bd8a95
commit 6ad3643165
12 changed files with 22 additions and 23 deletions

View File

@@ -169,7 +169,7 @@ static void queue_pkts_in_tx_tbl(void) {
gem.regs->net_ctrl |= NET_CTRL_START_TX;
}
int gem_send_raw_pkt(struct pktbuf *p) {
int gem_send_raw_pkt(void *arg, struct pktbuf *p) {
status_t ret = NO_ERROR;
if (!p || !p->dlen) {
@@ -557,7 +557,7 @@ static int cmd_gem(int argc, const console_cmd_args *argv) {
p->dlen = argv[3].u;
while (iter--) {
memset(p->data, iter, 12);
gem_send_raw_pkt(p);
gem_send_raw_pkt(NULL, p);
}
} else if (strncmp(argv[1].str, "status", sizeof("status")) == 0) {
uint32_t mac_top = gem.regs->spec_addr1_top;

View File

@@ -7,7 +7,7 @@ typedef void (*gem_cb_t)(struct pktbuf *p);
status_t gem_init(uintptr_t regsbase);
void gem_set_callback(gem_cb_t rx);
void gem_set_macaddr(uint8_t mac[6]);
int gem_send_raw_pkt(struct pktbuf *p);
int gem_send_raw_pkt(void *arg, struct pktbuf *p);
void gem_disable(void);