mwifiex: check next packet length for usb tx aggregation
authorXinming Hu <huxm@marvell.com>
Tue, 23 May 2017 07:12:34 +0000 (07:12 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 31 May 2017 13:54:09 +0000 (16:54 +0300)
The next packet length will be used by interface driver, to check if the
next packet still could be aggregated.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/11n_aggr.c
drivers/net/wireless/marvell/mwifiex/txrx.c
drivers/net/wireless/marvell/mwifiex/wmm.c

index e8ffb26eb912d2b65158a12fb631d389196d0e2f..53e67526f40d5dd524736b06f5ffdf6e0b767525 100644 (file)
@@ -250,15 +250,15 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
                return 0;
        }
 
+       if (skb_src)
+               tx_param.next_pkt_len = skb_src->len + sizeof(struct txpd);
+       else
+               tx_param.next_pkt_len = 0;
+
        if (adapter->iface_type == MWIFIEX_USB) {
                ret = adapter->if_ops.host_to_card(adapter, priv->usb_port,
-                                                  skb_aggr, NULL);
+                                                  skb_aggr, &tx_param);
        } else {
-               if (skb_src)
-                       tx_param.next_pkt_len =
-                                       skb_src->len + sizeof(struct txpd);
-               else
-                       tx_param.next_pkt_len = 0;
 
                ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_DATA,
                                                   skb_aggr, &tx_param);
index 15e92afdd1c872b20bb2b69d863718f98f27612d..d848933466d9b45801ecaf08b9dc67f8acc8a399 100644 (file)
@@ -117,7 +117,7 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
                if (adapter->iface_type == MWIFIEX_USB) {
                        ret = adapter->if_ops.host_to_card(adapter,
                                                           priv->usb_port,
-                                                          skb, NULL);
+                                                          skb, tx_param);
                } else {
                        ret = adapter->if_ops.host_to_card(adapter,
                                                           MWIFIEX_TYPE_DATA,
@@ -185,7 +185,7 @@ static int mwifiex_host_to_card(struct mwifiex_adapter *adapter,
        if (adapter->iface_type == MWIFIEX_USB) {
                ret = adapter->if_ops.host_to_card(adapter,
                                                   priv->usb_port,
-                                                  skb, NULL);
+                                                  skb, tx_param);
        } else {
                ret = adapter->if_ops.host_to_card(adapter,
                                                   MWIFIEX_TYPE_DATA,
index e4ff3b9738505f2077452cf65790cd68bee3652e..75cdd55d10462a2b23a961849624db2c61643256 100644 (file)
@@ -1363,13 +1363,13 @@ mwifiex_send_processed_packet(struct mwifiex_private *priv,
 
        spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, ra_list_flags);
 
+       tx_param.next_pkt_len =
+               ((skb_next) ? skb_next->len +
+                sizeof(struct txpd) : 0);
        if (adapter->iface_type == MWIFIEX_USB) {
                ret = adapter->if_ops.host_to_card(adapter, priv->usb_port,
-                                                  skb, NULL);
+                                                  skb, &tx_param);
        } else {
-               tx_param.next_pkt_len =
-                       ((skb_next) ? skb_next->len +
-                        sizeof(struct txpd) : 0);
                ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_DATA,
                                                   skb, &tx_param);
        }