[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:
@@ -320,7 +320,7 @@ static int eth_rx_worker(void *arg) {
|
||||
|
||||
#if WITH_LIB_MINIP
|
||||
|
||||
status_t stm32_eth_send_minip_pkt(pktbuf_t *p) {
|
||||
status_t stm32_eth_send_minip_pkt(void *arg, pktbuf_t *p) {
|
||||
LTRACEF("p %p, dlen %zu, eof %u\n", p, p->dlen, p->flags & PKTBUF_FLAG_EOF);
|
||||
|
||||
DEBUG_ASSERT(p && p->dlen);
|
||||
|
||||
@@ -20,5 +20,5 @@ typedef enum {
|
||||
struct pktbuf;
|
||||
|
||||
status_t eth_init(const uint8_t *mac_addr, eth_phy_itf eth_phy);
|
||||
status_t stm32_eth_send_minip_pkt(struct pktbuf *p);
|
||||
status_t stm32_eth_send_minip_pkt(void *arg, struct pktbuf *p);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user