diff mbox series

ath11k: reject tx fragmentation configuration

Message ID 1557326764-29931-1-git-send-email-vnaralas@codeaurora.org (mailing list archive)
State Accepted
Commit 39d03a41aa04e1e3f4eabc2dce39e271b52ef72f
Delegated to: Kalle Valo
Headers show
Series ath11k: reject tx fragmentation configuration | expand

Commit Message

Venkateswara Naralasetty May 8, 2019, 2:46 p.m. UTC
Currently no known firmware actually implements frag threshold support.
Moreover it is not possible to rely frame fragmentation to mac80211
because firmware clears the "more fragments" bit in frame control making
it impossible for remote devices to reassemble frames.

Hence implement a dummy callback just to say fragmentation isn't
supported. This effectively prevents mac80211 from doing frame
fragmentation in software.

This fixes Tx becoming broken after setting fragmentation threshold.

Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/mac.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

Comments

Kalle Valo May 13, 2019, 2:50 p.m. UTC | #1
Venkateswara Naralasetty <vnaralas@codeaurora.org> wrote:

> Currently no known firmware actually implements frag threshold support.
> Moreover it is not possible to rely frame fragmentation to mac80211
> because firmware clears the "more fragments" bit in frame control making
> it impossible for remote devices to reassemble frames.
> 
> Hence implement a dummy callback just to say fragmentation isn't
> supported. This effectively prevents mac80211 from doing frame
> fragmentation in software.
> 
> This fixes Tx becoming broken after setting fragmentation threshold.
> 
> Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>

Patch applied to ath.git, thanks.

39d03a41aa04 ath11k: reject tx fragmentation configuration
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index dc2733c..aa805a4 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -4300,10 +4300,17 @@  static int ath11k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
 
 static int ath11k_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
 {
-	struct ath11k *ar = hw->priv;
-	int param_id = WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD;
-
-	return ath11k_set_vdev_param_to_all_vifs(ar, param_id, value);
+	/* Even though there's a WMI vdev param for fragmentation threshold no
+	 * known firmware actually implements it. Moreover it is not possible to
+	 * rely frame fragmentation to mac80211 because firmware clears the
+	 * "more fragments" bit in frame control making it impossible for remote
+	 * devices to reassemble frames.
+	 *
+	 * Hence implement a dummy callback just to say fragmentation isn't
+	 * supported. This effectively prevents mac80211 from doing frame
+	 * fragmentation in software.
+	 */
+	return -EOPNOTSUPP;
 }
 
 static void ath11k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,