Commit ee4cce9b authored by Mordechay Goodstein's avatar Mordechay Goodstein Committed by Luca Coelho

iwlwifi: mvm: consider ieee80211 station max amsdu value

debugfs amsdu_len sets only the max_amsdu_len for ieee80211 station
so take it into consideration while getting max amsdu

Fixes: af2984e9 ("iwlwifi: mvm: add a debugfs entry to set a fixed size AMSDU for all TX packets")
Signed-off-by: default avatarMordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent eae7550b
...@@ -350,7 +350,13 @@ void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm, ...@@ -350,7 +350,13 @@ void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm,
u16 size = le32_to_cpu(notif->amsdu_size); u16 size = le32_to_cpu(notif->amsdu_size);
int i; int i;
if (WARN_ON(sta->max_amsdu_len < size)) /*
* In debug sta->max_amsdu_len < size
* so also check with orig_amsdu_len which holds the original
* data before debugfs changed the value
*/
if (WARN_ON(sta->max_amsdu_len < size &&
mvmsta->orig_amsdu_len < size))
goto out; goto out;
mvmsta->amsdu_enabled = le32_to_cpu(notif->amsdu_enabled); mvmsta->amsdu_enabled = le32_to_cpu(notif->amsdu_enabled);
......
...@@ -935,7 +935,12 @@ static int iwl_mvm_tx_tso(struct iwl_mvm *mvm, struct sk_buff *skb, ...@@ -935,7 +935,12 @@ static int iwl_mvm_tx_tso(struct iwl_mvm *mvm, struct sk_buff *skb,
!(mvmsta->amsdu_enabled & BIT(tid))) !(mvmsta->amsdu_enabled & BIT(tid)))
return iwl_mvm_tx_tso_segment(skb, 1, netdev_flags, mpdus_skb); return iwl_mvm_tx_tso_segment(skb, 1, netdev_flags, mpdus_skb);
max_amsdu_len = iwl_mvm_max_amsdu_size(mvm, sta, tid); /*
* Take the min of ieee80211 station and mvm station
*/
max_amsdu_len =
min_t(unsigned int, sta->max_amsdu_len,
iwl_mvm_max_amsdu_size(mvm, sta, tid));
/* /*
* Limit A-MSDU in A-MPDU to 4095 bytes when VHT is not * Limit A-MSDU in A-MPDU to 4095 bytes when VHT is not
......
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