Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp852013ybz; Wed, 22 Apr 2020 09:05:44 -0700 (PDT) X-Google-Smtp-Source: APiQypKSaYYJYcXxKDqfzduV+ecylhyVhzSWi+yWL/Q9Riu/uP4HRy/N76dkjD6daMliyK2mBIFW X-Received: by 2002:a17:906:31da:: with SMTP id f26mr20097498ejf.308.1587571544264; 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=o7y6IQiPzozEInxMwYugL9o8+bY13QWup7aWm9N6qpkngrJsr7zG2WBpr6+NJkJy+S vDClKdVFCmtT4YqxZXhaPaYRI2Q4nQvg0Uva3S/mR+8JiRn0Lbb4eUJD/7HunYpZmc32 UH2t6Q+P8PZs10+Ob1cp/plkq8FF08DMSge2NP4G9fT1wYzMDkRSvo6myTugpnyWn75Q t7UliYMrUgrIekWB9iyJrPunSPdWi4UjxmhMpCWSwPVHWp0D/y5WlRO9Nv0R9YLPsE1S bbbBcIuQXNYdRO+OsHcHZCEtnzIM3URCQyb+qRn4gYPD4U5+MxxNyh1uEwXx6p/MGpry PuGA== 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=1ycAbR2Pvs+JyTWeJ6ogIB87xV5giRRUC/7HdZc4DNE=; b=A/hfimmznvBbuHkITb1jQulLG/IH2A09A6/7w29Y2kr2d/zT+LRDvEwcHzAK9UWzvR sdU3cZwGAI41pxc/S69RMIMACh14Oyv8a9YBCQtAyQuSoJz950WKRqDfO0F+LBcwvju4 gNv/uM7aOy3pylZQnRImvVR9e7M1XbC4H/rnKx5FYGEEm7aOcpJoue1sz23kC394oJfW GqJrVWbAgw9EPrXQH8mh0fV9Y7cJzXX1I0DL91/UD0mKKIpuPaX9kiE2KpM3vOlwHndh P6q7ijnMWlphCGWBRko9sQnh+Kbvobw5gei2htCc3AhRgNdLHryAGCtctJn91m5UVka7 besQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=eeSyUZei; 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 j19si3393178edp.118.2020.04.22.09.05.04; 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=eeSyUZei; 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 S1726872AbgDVQEp (ORCPT + 99 others); Wed, 22 Apr 2020 12:04:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726849AbgDVQEn (ORCPT ); Wed, 22 Apr 2020 12:04:43 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4856BC08E859 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=1ycAbR2Pvs+JyTWeJ6ogIB87xV5giRRUC/7HdZc4DNE=; b=eeSyUZeihb10iJG3VTxMWnFMj+ MLX0TvQRSsgXru/LX5il0wnefM2sFIx9p03DMn/nIw32MeTLaW/EBZ8oLj2o1MU0Wax+NcvBXGXIs 2p0DRwPgCWewZli+5twB2D6k3FtZXh1tB/TG3eIFz+iI6OOJ364f5ckjzJQrNl50kqGY=; 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-000556-Ut for linux-wireless@vger.kernel.org; Wed, 22 Apr 2020 18:04:40 +0200 Received: by maeck.lan (Postfix, from userid 501) id 9F92C841962E; Wed, 22 Apr 2020 18:04:38 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 5/9] mt76: mt7603: never use an 802.11b CF-End rate on 5GHz Date: Wed, 22 Apr 2020 18:04:33 +0200 Message-Id: <20200422160437.99466-5-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/mt7603/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c index 73c6a3ff399c..d34828715e1c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c @@ -51,10 +51,11 @@ void mt7603_mac_set_timing(struct mt7603_dev *dev) int offset = 3 * dev->coverage_class; u32 reg_offset = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, offset) | FIELD_PREP(MT_TIMEOUT_VAL_CCA, offset); + bool is_5ghz = dev->mphy.chandef.chan->band == NL80211_BAND_5GHZ; int sifs; u32 val; - if (dev->mphy.chandef.chan->band == NL80211_BAND_5GHZ) + if (is_5ghz) sifs = 16; else sifs = 10; @@ -71,7 +72,7 @@ void mt7603_mac_set_timing(struct mt7603_dev *dev) FIELD_PREP(MT_IFS_SIFS, sifs) | FIELD_PREP(MT_IFS_SLOT, dev->slottime)); - if (dev->slottime < 20) + if (dev->slottime < 20 || is_5ghz) val = MT7603_CFEND_RATE_DEFAULT; else val = MT7603_CFEND_RATE_11B; -- 2.24.0