From 9e45d6e88ee670d7133d768f5a0db1cd8ff998e4 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Thu, 17 Sep 2020 17:27:41 +0800 Subject: [PATCH] nuttx/wireless: add wireless event member length helper Signed-off-by: chao.an --- include/nuttx/wireless/wireless.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/nuttx/wireless/wireless.h b/include/nuttx/wireless/wireless.h index 9893b04521..e43241e89d 100644 --- a/include/nuttx/wireless/wireless.h +++ b/include/nuttx/wireless/wireless.h @@ -572,4 +572,11 @@ struct iw_scan_req struct iw_freq channel_list[IW_MAX_FREQUENCIES]; }; +/* + * A Wireless Event. Contains basically the same data as the ioctl... + */ + +#define IW_EV_LEN(field) \ + (offsetof(struct iw_event, u) + sizeof(((union iwreq_data *)0)->field)) + #endif /* __INCLUDE_NUTTX_WIRELESS_WIRELESS_H */