wireless: add Wireless statistics
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
9be3848491
commit
61ee155752
@ -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...
|
||||
*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user