Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp852017ybz; Wed, 22 Apr 2020 09:05:44 -0700 (PDT) X-Google-Smtp-Source: APiQypJW6RouCgHpc11NoJ0G+XNPkW50Oqg2SC8aPaM8Pps4jKmscUnUqgu3uSBchtslNlInkiAf X-Received: by 2002:a05:6402:16d5:: with SMTP id r21mr24976627edx.150.1587571544313; Wed, 22 Apr 2020 09:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587571544; cv=none; d=google.com; s=arc-20160816; b=w7e9owIct9clZQMZRBEsPXScWDLZ7gLLH2PhP0h+H/VaULmX115FWREUsa0ExasfMj FpS81dBOM01Q6kdoCGZYXKVMVJ2rdP5c8wUyLwYnGdp11Rs33Hs5CXztURSUAoknczij hmvYcD2Dzde0yJXJ4hkGYNhM6k5B45gDXde0xb7lb5NmTTnLUGls+LjlDng9V+dicZIm h/YG/NjIFJVxIMz94IiYQdwKbbS6xqFm8gHiOpCOi4DSQgS6Nw7JELTPmp99Wp/3cu7X 9QPZ+qSqNu+VSsAI3a9FC8BN9wI88n0OymbB2gSmet9zpQ1gU7XMIZp/OwXl05OIJA3b Rm5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=fVVBF58LBsdR8a+3tYtpeEThNzzcC0Iu35QnBfZRRD8=; b=Otb7TheqeA+UGMDCd7x/O82urFNUUSmf9IwQz6zTztIVrnCK271A7EZlnqhFeLlo9m ULoXq/NI3pHulCDip+lKubeaxqlnSlbDzlIBY+PZDRkM3oKmjJNB+H0N29XzKo/0hx7H YJZ7UZixxAdnF4ExDQfSiYXrRc40mpdZeTdrpuRCwC40+yry2w9IS7FQAfladSi5ZRMG U8dYeEROC0S71LgdZ97m5ujnrdGwMNv8j5JsL8vPpiTQyDbjwW7NZ2k3IWMffwQjNnnS rkRi4E0Pjm3qlb+I+DldpDip8FtsJiK/nCovJtvKQ71utfN+OTwOhH523F58GXDVbBIC 4WMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=rnoecyFj; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c90si3761966edd.306.2020.04.22.09.05.09; Wed, 22 Apr 2020 09:05:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=rnoecyFj; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726868AbgDVQEo (ORCPT + 99 others); Wed, 22 Apr 2020 12:04:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726823AbgDVQEm (ORCPT ); Wed, 22 Apr 2020 12:04:42 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20AD6C03C1A9 for ; Wed, 22 Apr 2020 09:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=fVVBF58LBsdR8a+3tYtpeEThNzzcC0Iu35QnBfZRRD8=; b=rnoecyFjZHqWLZN9eJNWT526ST pKJEuCF88hpkIqj6cNne/oPxZ31uIBQXJ0dFbroB7Nw6BX3he+zW3jtOk4g1nRNYoWtb5aOrtyPaE rs/7jOltpdzgwOGV0MUM5wD1HyygG7cEXPLbmB4UMemHO9SoDmMFFJOMzfUtldFSWrsw=; Received: from p54ae965b.dip0.t-ipconnect.de ([84.174.150.91] helo=maeck.lan) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jRHrb-00054o-5F for linux-wireless@vger.kernel.org; Wed, 22 Apr 2020 18:04:39 +0200 Received: by maeck.lan (Postfix, from userid 501) id 9ED7C841962C; Wed, 22 Apr 2020 18:04:38 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 4/9] mt76: mt7615: never use an 802.11b CF-End rate on 5GHz Date: Wed, 22 Apr 2020 18:04:32 +0200 Message-Id: <20200422160437.99466-4-nbd@nbd.name> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200422160437.99466-1-nbd@nbd.name> References: <20200422160437.99466-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Sometimes mt7615_mac_set_timing gets called while the slot time is still configured to 20. Ensure that in this case it always uses the OFDM CFend rate. Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index 396f11e1bbf6..63c7acfd4cc2 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -117,8 +117,9 @@ void mt7615_mac_set_timing(struct mt7615_phy *phy) u32 ofdm = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, 60) | FIELD_PREP(MT_TIMEOUT_VAL_CCA, 24); int sifs, offset; + bool is_5ghz = phy->mt76->chandef.chan->band == NL80211_BAND_5GHZ; - if (phy->mt76->chandef.chan->band == NL80211_BAND_5GHZ) + if (is_5ghz) sifs = 16; else sifs = 10; @@ -151,7 +152,7 @@ void mt7615_mac_set_timing(struct mt7615_phy *phy) FIELD_PREP(MT_IFS_SIFS, sifs) | FIELD_PREP(MT_IFS_SLOT, phy->slottime)); - if (phy->slottime < 20) + if (phy->slottime < 20 || is_5ghz) val = MT7615_CFEND_RATE_DEFAULT; else val = MT7615_CFEND_RATE_11B; -- 2.24.0