From patchwork Wed May 8 14:46:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkateswara Naralasetty X-Patchwork-Id: 10935861 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 763B615A6 for ; Wed, 8 May 2019 14:46:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65AB42844B for ; Wed, 8 May 2019 14:46:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A19928485; Wed, 8 May 2019 14:46:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 042D92844B for ; Wed, 8 May 2019 14:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=NQtXQNDF2/xS1UKcxPkzNIndkfUciI59yrZwfPf9jLo=; b=kAz RchYK1avIbTPbGqi4DzQOLps4XsKQEv59Fxiq/kIB45KitxNZVqWfsEHH0FmrGJ+M495H0Fa2/D6Q Ky/5AQ88uDs17hTOOg0dyXWlHHXapXJsvxEkVAv/ZyC0FhbN8epEgO9k9768GYTR1+oKGAgHw11O3 luACIG7D+3b3oZgLuCnR1tgD5QsRrzpgsyhZxwq25koQe3KYnev8F182T9j6/eymXyjD+hRxZGqtB JW8iIeIz/PjY8mt3pe4FZv8yv/S+MsaiGehZLUosr3GsR6GJ0cOSwyFaFDuKViL4CUp1xM8elKbD6 LdAqWw8IrJ7QxqxmnOKI79bx3GIapcA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hONpk-0007fA-Lu; Wed, 08 May 2019 14:46:12 +0000 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hONph-0007dh-RX for ath11k@lists.infradead.org; Wed, 08 May 2019 14:46:11 +0000 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 08 May 2019 20:16:06 +0530 X-IronPort-AV: E=McAfee;i="5900,7806,9250"; a="8583298" Received: from vnaralas-linux.qualcomm.com ([10.201.26.231]) by ironmsg02-blr.qualcomm.com with ESMTP; 08 May 2019 20:16:07 +0530 Received: by vnaralas-linux.qualcomm.com (Postfix, from userid 443942) id 7CA031A1D; Wed, 8 May 2019 20:16:05 +0530 (IST) From: Venkateswara Naralasetty To: ath11k@lists.infradead.org Subject: [PATCH] ath11k: reject tx fragmentation configuration Date: Wed, 8 May 2019 20:16:04 +0530 Message-Id: <1557326764-29931-1-git-send-email-vnaralas@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190508_074610_364199_271DC1FA X-CRM114-Status: UNSURE ( 7.39 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Venkateswara Naralasetty MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/net/wireless/ath/ath11k/mac.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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,