Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a849613 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by John W. Linville
Browse files

iwlagn: update rate scaling with BA notifications



In the current code, the rate scaling isn't fed with
statistics from the BA notifications.

This is since my patch:

	iwlagn: reclaim the packets in transport layer

Fix that.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1895b36b
Loading
Loading
Loading
Loading
+9 −4
Original line number Original line Diff line number Diff line
@@ -342,6 +342,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)


	iwl_update_stats(priv, true, fc, len);
	iwl_update_stats(priv, true, fc, len);


	memset(&info->status, 0, sizeof(info->status));

	info->driver_data[0] = ctx;
	info->driver_data[0] = ctx;
	info->driver_data[1] = dev_cmd;
	info->driver_data[1] = dev_cmd;


@@ -580,6 +582,9 @@ static void iwl_rx_reply_tx_agg(struct iwl_priv *priv,
		IWL_DEBUG_COEX(priv, "receive reply tx w/ bt_kill\n");
		IWL_DEBUG_COEX(priv, "receive reply tx w/ bt_kill\n");
	}
	}


	if (tx_resp->frame_count == 1)
		return;

	/* Construct bit-map of pending frames within Tx window */
	/* Construct bit-map of pending frames within Tx window */
	for (i = 0; i < tx_resp->frame_count; i++) {
	for (i = 0; i < tx_resp->frame_count; i++) {
		u16 fstatus = le16_to_cpu(frame_status[i].status);
		u16 fstatus = le16_to_cpu(frame_status[i].status);
@@ -938,7 +943,10 @@ int iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
		else
		else
			WARN_ON_ONCE(1);
			WARN_ON_ONCE(1);


		if (freed == 0) {
		info = IEEE80211_SKB_CB(skb);
		kmem_cache_free(priv->tx_cmd_pool, (info->driver_data[1]));

		if (freed == 1) {
			/* this is the first skb we deliver in this batch */
			/* this is the first skb we deliver in this batch */
			/* put the rate scaling data there */
			/* put the rate scaling data there */
			info = IEEE80211_SKB_CB(skb);
			info = IEEE80211_SKB_CB(skb);
@@ -951,9 +959,6 @@ int iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
						    info);
						    info);
		}
		}


		info = IEEE80211_SKB_CB(skb);
		kmem_cache_free(priv->tx_cmd_pool, (info->driver_data[1]));

		ieee80211_tx_status_irqsafe(priv->hw, skb);
		ieee80211_tx_status_irqsafe(priv->hw, skb);
	}
	}