You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/06/03 05:04:14 UTC
[incubator-nuttx] branch master updated (9be3848491 -> f66b17091c)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
from 9be3848491 Add driver for WIZnet W5500 Ethernet controller
new 61ee155752 wireless: add Wireless statistics
new f66b17091c netpacket/sockaddr_ll: complete the members of sockaddr_ll
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
include/netpacket/packet.h | 10 +++++++---
include/nuttx/wireless/wireless.h | 41 ++++++++++++++++++++++++++++++++++++++-
2 files changed, 47 insertions(+), 4 deletions(-)
[incubator-nuttx] 01/02: wireless: add Wireless statistics
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 61ee15575265a55a4fa21a5615247b3ac7203497
Author: chao.an <an...@xiaomi.com>
AuthorDate: Thu Jun 2 15:19:31 2022 +0800
wireless: add Wireless statistics
Signed-off-by: chao.an <an...@xiaomi.com>
---
include/nuttx/wireless/wireless.h | 41 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/include/nuttx/wireless/wireless.h b/include/nuttx/wireless/wireless.h
index ed4f5297dd..66628a39e2 100644
--- a/include/nuttx/wireless/wireless.h
+++ b/include/nuttx/wireless/wireless.h
@@ -401,7 +401,6 @@
/* TODO:
*
- * - Add types for statistics (struct iw_statistics and related)
* - Add struct iw_range for use with IOCTL commands that need exchange mode data
* that could not fit in iwreq.
* - Private IOCTL data support (struct iw_priv_arg)
@@ -459,6 +458,31 @@ struct iw_quality
uint8_t updated; /* Flags to know if updated */
};
+/* Packet discarded in the wireless adapter due to
+ * "wireless" specific problems...
+ * Note : the list of counter and statistics in net_device_stats
+ * is already pretty exhaustive, and you should use that first.
+ * This is only additional stats...
+ */
+
+struct iw_discarded
+{
+ uint32_t nwid; /* Rx : Wrong nwid/essid */
+ uint32_t code; /* Rx : Unable to code/decode (WEP) */
+ uint32_t fragment; /* Rx : Can't perform MAC reassembly */
+ uint32_t retries; /* Tx : Max MAC retries num reached */
+ uint32_t misc; /* Others cases */
+};
+
+/* Packet/Time period missed in the wireless adapter due to
+ * "wireless" specific problems...
+ */
+
+struct iw_missed
+{
+ uint32_t beacon; /* Missed beacons/superframe */
+};
+
/* This union defines the data payload of an ioctl, and is used in struct iwreq
* below.
*/
@@ -580,6 +604,21 @@ struct iw_scan_req
struct iw_freq channel_list[IW_MAX_FREQUENCIES];
};
+/* Wireless statistics */
+
+struct iw_statistics
+{
+ uint16_t status; /* Status
+ * - device dependent for now
+ */
+
+ struct iw_quality qual; /* Quality of the link
+ * (instant/mean/max)
+ */
+ struct iw_discarded discard; /* Packet discarded counts */
+ struct iw_missed miss; /* Packet missed counts */
+};
+
/* A Wireless Event. Contains basically the same data as the ioctl...
*/
[incubator-nuttx] 02/02: netpacket/sockaddr_ll: complete the members of sockaddr_ll
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit f66b17091cea133613c08637ad8dca738cc0db36
Author: chao.an <an...@xiaomi.com>
AuthorDate: Thu Jun 2 15:21:16 2022 +0800
netpacket/sockaddr_ll: complete the members of sockaddr_ll
Signed-off-by: chao.an <an...@xiaomi.com>
---
include/netpacket/packet.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/netpacket/packet.h b/include/netpacket/packet.h
index 0dd1947363..3c3f19c6a0 100644
--- a/include/netpacket/packet.h
+++ b/include/netpacket/packet.h
@@ -34,9 +34,13 @@
struct sockaddr_ll
{
- uint16_t sll_family;
- uint16_t sll_protocol;
- int16_t sll_ifindex;
+ unsigned short sll_family;
+ unsigned short sll_protocol;
+ int sll_ifindex;
+ unsigned short sll_hatype;
+ unsigned char sll_pkttype;
+ unsigned char sll_halen;
+ unsigned char sll_addr[8];
};
#endif /* __INCLUDE_NETPACKET_PACKET_H */