Commit 2c11ab90 authored by Cathy Luo's avatar Cathy Luo Committed by Kalle Valo

mwifiex: fix a bug in Rx multiport aggregation logic

It's been observed Rx aggregated packets are always followed
by a single Rx packet. This patch improves our logic to add
that extra packet in next aggregation.
Signed-off-by: default avatarCathy Luo <cluo@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 52f119dd
...@@ -1133,6 +1133,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter, ...@@ -1133,6 +1133,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
s32 f_do_rx_aggr = 0; s32 f_do_rx_aggr = 0;
s32 f_do_rx_cur = 0; s32 f_do_rx_cur = 0;
s32 f_aggr_cur = 0; s32 f_aggr_cur = 0;
s32 f_post_aggr_cur = 0;
struct sk_buff *skb_deaggr; struct sk_buff *skb_deaggr;
u32 pind; u32 pind;
u32 pkt_len, pkt_type, mport; u32 pkt_len, pkt_type, mport;
...@@ -1169,7 +1170,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter, ...@@ -1169,7 +1170,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
} else { } else {
/* No room in Aggr buf, do rx aggr now */ /* No room in Aggr buf, do rx aggr now */
f_do_rx_aggr = 1; f_do_rx_aggr = 1;
f_do_rx_cur = 1; f_post_aggr_cur = 1;
} }
} else { } else {
/* Rx aggr not in progress */ /* Rx aggr not in progress */
...@@ -1280,9 +1281,13 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter, ...@@ -1280,9 +1281,13 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
mwifiex_decode_rx_packet(adapter, skb, pkt_type); mwifiex_decode_rx_packet(adapter, skb, pkt_type);
} }
if (f_post_aggr_cur) {
dev_dbg(adapter->dev, "info: current packet aggregation\n");
/* Curr pkt can be aggregated */
mp_rx_aggr_setup(card, skb, port);
}
return 0; return 0;
error: error:
if (MP_RX_AGGR_IN_PROGRESS(card)) { if (MP_RX_AGGR_IN_PROGRESS(card)) {
/* Multiport-aggregation transfer failed - cleanup */ /* Multiport-aggregation transfer failed - cleanup */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment