open_esplibs libnet80211: source code for sdk_ieee80211_deliver_data. (#277)
This commit is contained in:
parent
b39df7f91e
commit
f10c6ed4ce
1 changed files with 20 additions and 0 deletions
|
@ -7,5 +7,25 @@
|
||||||
#if OPEN_LIBNET80211_INPUT
|
#if OPEN_LIBNET80211_INPUT
|
||||||
// The contents of this file are only built if OPEN_LIBNET80211_INPUT is set to true
|
// The contents of this file are only built if OPEN_LIBNET80211_INPUT is set to true
|
||||||
|
|
||||||
|
#include "esplibs/libpp.h"
|
||||||
|
|
||||||
|
void IRAM sdk_ieee80211_deliver_data(struct sdk_g_ic_netif_info *netif_info, struct esf_buf *esf_buf) {
|
||||||
|
struct netif *netif = netif_info->netif;
|
||||||
|
|
||||||
|
if (netif->flags & NETIF_FLAG_LINK_UP) {
|
||||||
|
uint16_t length = esf_buf->length;
|
||||||
|
struct pbuf *pbuf = pbuf_alloc(PBUF_RAW, length, PBUF_REF);
|
||||||
|
pbuf->payload = esf_buf->pbuf2->payload;
|
||||||
|
esf_buf->pbuf1 = pbuf;
|
||||||
|
pbuf->eb = (void *)esf_buf;
|
||||||
|
ethernetif_input(netif, pbuf);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (esf_buf)
|
||||||
|
sdk_ppRecycleRxPkt(esf_buf);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* OPEN_LIBNET80211_INPUT */
|
#endif /* OPEN_LIBNET80211_INPUT */
|
||||||
|
|
Loading…
Reference in a new issue