2016-03-14 23:21:33

by Marty Faltesek

[permalink] [raw]
Subject: [PATCH] mwifiex: bridged packets cause wmm_tx_pending counter to go negative

When a packet is queued from the bridge, wmm_tx_pending is not
incremented, but when the packet is dequeued the counter is decremented.

---
drivers/net/wireless/marvell/mwifiex/uap_txrx.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/uap_txrx.c b/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
index 52f7981..193a809 100644
--- a/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
+++ b/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
@@ -102,6 +102,7 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv,
int hdr_chop;
struct ethhdr *p_ethhdr;
struct mwifiex_sta_node *src_node;
+ int index;

uap_rx_pd = (struct uap_rxpd *)(skb->data);
rx_pkt_hdr = (void *)uap_rx_pd + le16_to_cpu(uap_rx_pd->rx_pkt_offset);
@@ -208,6 +209,9 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv,
}

__net_timestamp(skb);
+
+ index = mwifiex_1d_to_wmm_queue[skb->priority];
+ atomic_inc(&priv->wmm_tx_pending[index]);
mwifiex_wmm_add_buf_txqueue(priv, skb);
atomic_inc(&adapter->tx_pending);
atomic_inc(&adapter->pending_bridged_pkts);
--
2.7.0.rc3.207.g0ac5344



2016-03-18 08:50:19

by Amitkumar Karwar

[permalink] [raw]
Subject: RE: [PATCH] mwifiex: bridged packets cause wmm_tx_pending counter to go negative

> From: Marty Faltesek [mailto:[email protected]]
> Sent: Tuesday, March 15, 2016 4:51 AM
> To: Amitkumar Karwar
> Cc: [email protected]
> Subject: [PATCH] mwifiex: bridged packets cause wmm_tx_pending counter
> to go negative
>
> When a packet is queued from the bridge, wmm_tx_pending is not
> incremented, but when the packet is dequeued the counter is decremented.
>
> ---
> drivers/net/wireless/marvell/mwifiex/uap_txrx.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
> b/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
> index 52f7981..193a809 100644
> --- a/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
> +++ b/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
> @@ -102,6 +102,7 @@ static void mwifiex_uap_queue_bridged_pkt(struct
> mwifiex_private *priv,
> int hdr_chop;
> struct ethhdr *p_ethhdr;
> struct mwifiex_sta_node *src_node;
> + int index;
>
> uap_rx_pd = (struct uap_rxpd *)(skb->data);
> rx_pkt_hdr = (void *)uap_rx_pd + le16_to_cpu(uap_rx_pd-
> >rx_pkt_offset);
> @@ -208,6 +209,9 @@ static void mwifiex_uap_queue_bridged_pkt(struct
> mwifiex_private *priv,
> }
>
> __net_timestamp(skb);
> +
> + index = mwifiex_1d_to_wmm_queue[skb->priority];
> + atomic_inc(&priv->wmm_tx_pending[index]);
> mwifiex_wmm_add_buf_txqueue(priv, skb);
> atomic_inc(&adapter->tx_pending);
> atomic_inc(&adapter->pending_bridged_pkts);
> --
> 2.7.0.rc3.207.g0ac5344

Looks fine.

Acked-by: Amitkumar Karwar <[email protected]>

Regards,
Amitkumar

2016-04-06 18:26:46

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] mwifiex: bridged packets cause wmm_tx_pending counter to go negative

Marty Faltesek <[email protected]> writes:

> When a packet is queued from the bridge, wmm_tx_pending is not
> incremented, but when the packet is dequeued the counter is decremented.

Signed-off-by line is missing, please resend.

--
Kalle Valo