diff options
author | Ujjal Roy <royujjal@gmail.com> | 2013-12-03 02:17:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-12-09 15:35:30 -0500 |
commit | f7b598532f3dccfb7b57f57b1163a0e1b3bc50cf (patch) | |
tree | 47e5e3c99722b2564ceec138077ffdb52f844948 /drivers/net | |
parent | a1ed484960066c413712cd9c4d50a350cf67eba3 (diff) |
mwifiex: update statistics for bridged packets on AP interface
The bridged packets are updated to statistics on both TX and RX
paths. Also fix a typo in the comment.
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mwifiex/uap_txrx.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/uap_txrx.c b/drivers/net/wireless/mwifiex/uap_txrx.c index 6c0a31a8df91..3c74eb254927 100644 --- a/drivers/net/wireless/mwifiex/uap_txrx.c +++ b/drivers/net/wireless/mwifiex/uap_txrx.c | |||
@@ -147,7 +147,7 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv, | |||
147 | hdr_chop = (u8 *)&rx_pkt_hdr->eth803_hdr - (u8 *)uap_rx_pd; | 147 | hdr_chop = (u8 *)&rx_pkt_hdr->eth803_hdr - (u8 *)uap_rx_pd; |
148 | } | 148 | } |
149 | 149 | ||
150 | /* Chop off the leading header bytes so the it points | 150 | /* Chop off the leading header bytes so that it points |
151 | * to the start of either the reconstructed EthII frame | 151 | * to the start of either the reconstructed EthII frame |
152 | * or the 802.2/llc/snap frame. | 152 | * or the 802.2/llc/snap frame. |
153 | */ | 153 | */ |
@@ -179,6 +179,19 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv, | |||
179 | tx_info->bss_type = priv->bss_type; | 179 | tx_info->bss_type = priv->bss_type; |
180 | tx_info->flags |= MWIFIEX_BUF_FLAG_BRIDGED_PKT; | 180 | tx_info->flags |= MWIFIEX_BUF_FLAG_BRIDGED_PKT; |
181 | 181 | ||
182 | if (is_unicast_ether_addr(rx_pkt_hdr->eth803_hdr.h_dest)) { | ||
183 | /* Update bridge packet statistics as the | ||
184 | * packet is not going to kernel/upper layer. | ||
185 | */ | ||
186 | priv->stats.rx_bytes += skb->len; | ||
187 | priv->stats.rx_packets++; | ||
188 | |||
189 | /* Sending bridge packet to TX queue, so save the packet | ||
190 | * length in TXCB to update statistics in TX complete. | ||
191 | */ | ||
192 | tx_info->pkt_len = skb->len; | ||
193 | } | ||
194 | |||
182 | do_gettimeofday(&tv); | 195 | do_gettimeofday(&tv); |
183 | skb->tstamp = timeval_to_ktime(tv); | 196 | skb->tstamp = timeval_to_ktime(tv); |
184 | mwifiex_wmm_add_buf_txqueue(priv, skb); | 197 | mwifiex_wmm_add_buf_txqueue(priv, skb); |