open_esplibs libnet80211: source code for sdk_ieee80211_getmgtframe.
This commit is contained in:
parent
0dadda86de
commit
63a47f7b6f
1 changed files with 17 additions and 0 deletions
|
@ -7,4 +7,21 @@
|
||||||
#if OPEN_LIBNET80211_ETS
|
#if OPEN_LIBNET80211_ETS
|
||||||
// The contents of this file are only built if OPEN_LIBNET80211_ETS is set to true
|
// The contents of this file are only built if OPEN_LIBNET80211_ETS is set to true
|
||||||
|
|
||||||
|
#include "esplibs/libnet80211.h"
|
||||||
|
#include "esplibs/libpp.h"
|
||||||
|
|
||||||
|
struct esf_buf IRAM *sdk_ieee80211_getmgtframe(void **arg0, uint32_t arg1, uint32_t arg2) {
|
||||||
|
uint32_t len = (arg1 + arg2 + 3) & 0xfffffffc;
|
||||||
|
if (len >= 256) return NULL;
|
||||||
|
|
||||||
|
struct esf_buf *esf_buf = sdk_esf_buf_alloc(NULL, len < 65 ? 5 : 4);
|
||||||
|
if (esf_buf) {
|
||||||
|
struct pbuf *pbuf = esf_buf->pbuf2;
|
||||||
|
void *payload = pbuf->payload;
|
||||||
|
*arg0 = payload + arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return esf_buf;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* OPEN_LIBNET80211_ETS */
|
#endif /* OPEN_LIBNET80211_ETS */
|
||||||
|
|
Loading…
Reference in a new issue