diff options
author | Xinming Hu <huxm@marvell.com> | 2015-06-03 14:29:38 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-06-08 11:41:52 +0300 |
commit | 442f6f9b49c88482b82790eee23fa330e1faf9f6 (patch) | |
tree | 63f52ca5724ce30758b00c2513bce738cafd5575 /drivers/net/wireless/mwifiex/txrx.c | |
parent | 7ee38bf4edeac83833cd25b26cda98ff7588359f (diff) | |
download | linux-442f6f9b49c88482b82790eee23fa330e1faf9f6.tar.xz |
mwifiex: maintain station statistic in uap mode
This patch maintain statistic information for the stations associated
to the mwifiex micro AP, include tx/rx bytes/packets, signal strength,
tx bitrate.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/txrx.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/txrx.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c index 28dcc84a34d2..c4c7d8d9e544 100644 --- a/drivers/net/wireless/mwifiex/txrx.c +++ b/drivers/net/wireless/mwifiex/txrx.c @@ -88,13 +88,22 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb, struct mwifiex_adapter *adapter = priv->adapter; u8 *head_ptr; struct txpd *local_tx_pd = NULL; + struct mwifiex_sta_node *dest_node; + struct ethhdr *hdr = (void *)skb->data; hroom = (adapter->iface_type == MWIFIEX_USB) ? 0 : INTF_HEADER_LEN; - if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP) + if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP) { + dest_node = mwifiex_get_sta_entry(priv, hdr->h_dest); + if (dest_node) { + dest_node->stats.tx_bytes += skb->len; + dest_node->stats.tx_packets++; + } + head_ptr = mwifiex_process_uap_txpd(priv, skb); - else + } else { head_ptr = mwifiex_process_sta_txpd(priv, skb); + } if ((adapter->data_sent || adapter->tx_lock_flag) && head_ptr) { skb_queue_tail(&adapter->tx_data_q, skb); |