From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 01/13] iwlwifi: mvm: consider ieee80211 station max amsdu value
Date: Sat, 12 Oct 2019 19:29:12 +0300 [thread overview]
Message-ID: <20191012192536.0e45e69a388a.I1d63567def2526950608f62c88626ef489e18041@changeid> (raw)
In-Reply-To: <20191012162924.19848-1-luca@coelho.fi>
From: Mordechay Goodstein <mordechay.goodstein@intel.com>
debugfs amsdu_len sets only the max_amsdu_len for ieee80211 station
so take it into consideration while getting max amsdu
Fixes: af2984e9e625 ("iwlwifi: mvm: add a debugfs entry to set a fixed size AMSDU for all TX packets")
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 8 +++++++-
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 7 ++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
index 8f50e2b121bd..098d48153a38 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
@@ -350,7 +350,13 @@ void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm,
u16 size = le32_to_cpu(notif->amsdu_size);
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;
mvmsta->amsdu_enabled = le32_to_cpu(notif->amsdu_enabled);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 8a059da7a1fa..e3b2a2bf3863 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -935,7 +935,12 @@ static int iwl_mvm_tx_tso(struct iwl_mvm *mvm, struct sk_buff *skb,
!(mvmsta->amsdu_enabled & BIT(tid)))
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
--
2.23.0
next prev parent reply other threads:[~2019-10-12 16:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-12 16:29 [PATCH 00/13] iwlwifi: updates intended for v5.5 2019-10-12-2 Luca Coelho
2019-10-12 16:29 ` Luca Coelho [this message]
2019-10-12 16:29 ` [PATCH 02/13] iwlwifi: mvm: add support for new version for D0I3_END_CMD Luca Coelho
2019-10-12 16:29 ` [PATCH 03/13] iwlwifi: mvm: remove leftover rs_remove_sta_debugfs() prototype Luca Coelho
2019-10-12 16:29 ` [PATCH 04/13] iwlwifi: mvm: use the new session protection command Luca Coelho
2019-10-12 16:29 ` [PATCH 05/13] iwlwifi: dbg: prefer struct copy to memcpy() Luca Coelho
2019-10-16 7:11 ` Kalle Valo
2019-10-18 8:19 ` Luca Coelho
2019-10-12 16:29 ` [PATCH 06/13] iwlwifi: mvm: fix old-style declaration Luca Coelho
2019-10-12 16:29 ` [PATCH 07/13] iwlwifi: mvm: add notification for missed VAP Luca Coelho
2019-10-12 16:29 ` [PATCH 08/13] iwlwifi: dbg_ini: add user trigger support Luca Coelho
2019-10-12 16:29 ` [PATCH 09/13] iwlwifi: dbg_ini: use vzalloc to allocate dumping memory regions Luca Coelho
2019-10-12 16:29 ` [PATCH 10/13] iwlwifi: mvm: create function to convert nl80211 band to phy band Luca Coelho
2019-10-12 16:29 ` [PATCH 11/13] iwlwifi: mvm: Invert the condition for OFDM rate Luca Coelho
2019-10-12 16:29 ` [PATCH 12/13] iwlwifi: nvm: create function to convert channel index to nl80211_band Luca Coelho
2019-10-12 16:29 ` [PATCH 13/13] iwlwifi: rx: use new api to get band from rx mpdu Luca Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191012192536.0e45e69a388a.I1d63567def2526950608f62c88626ef489e18041@changeid \
--to=luca@coelho.fi \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).