Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1908885pxv; Fri, 16 Jul 2021 22:06:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1bhovv3yXP75qV+/BmiL2JLOw8acWPwv1n46PaIzOLEefRaWZiJrPgppYiIEedRDpnGzY X-Received: by 2002:a05:6402:d4c:: with SMTP id ec12mr19865296edb.246.1626498406719; Fri, 16 Jul 2021 22:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626498406; cv=none; d=google.com; s=arc-20160816; b=Rp5lpq6Lf7+LDYgTCax3sR3UJxdemPPXDWojr2LGXg/7uIHj8KufOlQGPD75Z4PYOM WiabpFI+ms30Tx9lh/y+aUhAMtajwpLhilOzY7jazyoPGiEYgVauBfg8WKn0YMjd6NV9 Fvqvemi6zSF6Yr4zSMCAa7hlivdm2Z0IKoRIKUSg44YvkauoC4arpY8T7vjCD6tANZLW UVZzoSjkubPD5ebsQ/6oNDhiDPNmLYNiz9xNT3lXJbGd3pISKjBonQXK4+A6Qlxu5Nrv NaraZ2f7voTFeomrcC2T4qIgMGb2sF0elfS6YdTimT4QyKx2sw/Lc0jckjw34T9wxMkw z5kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=biOBE1N4a3NkYO9NCfCkxPZij8GgO6vQ70L9pPM6Qe8=; b=NGg8mze2cO50JjuzNfn1C78mGOLIRsi4eZxP74EsiMVAqvb3oMVDlzYSDKIS83oXel eznsH6bJbf2Tz4yAWYBsFQfC8GBmKPqoTbq4SSgAz0FNDDZ4rNU7jZV7maOAfNYVeu5V P1VzWJIfwSlb9gyImnh2Sr1A4vPPQOsvy3FV/ZxVBFdZ1cbnhnOeqW/obLUPcNmgDBBc 69NivCGn0hmMGzHgJQ8gRF3inxcbksiEa40JroW69o3Dc5gcseNOLTdy488J0DIEKU0M n0vEuRbVJot3vZbkokbA99tKa9K1TkM71irewtdofC40kBI7du80/1lWj3KyCR6J3qND v4EA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x3si14855113edq.87.2021.07.16.22.06.14; Fri, 16 Jul 2021 22:06:46 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229998AbhGQFIy (ORCPT + 99 others); Sat, 17 Jul 2021 01:08:54 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:57584 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229778AbhGQFIy (ORCPT ); Sat, 17 Jul 2021 01:08:54 -0400 X-UUID: a9e856aee7ed4097a738b911c1719cb7-20210717 X-UUID: a9e856aee7ed4097a738b911c1719cb7-20210717 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 791011969; Sat, 17 Jul 2021 13:05:54 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 17 Jul 2021 13:05:53 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 17 Jul 2021 13:05:53 +0800 From: Ryder Lee To: Felix Fietkau CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , Sean Wang , , , Ryder Lee Subject: [PATCH 2/2] mt76: mt7921: send EAPOL frames at lowest rate Date: Sat, 17 Jul 2021 13:05:49 +0800 Message-ID: <089a52032471c2f058e0837582b21f6e9b039fba.1626498075.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The firmware rate control may choose the high rate for EAPOL frames, so checking IEEE80211_TX_CTL_USE_MINRATE to use the lowest TX rate. Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c index 7fe2e3a50428..eb0d98c8d5d8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c @@ -702,7 +702,8 @@ mt7921_mac_write_txwi_80211(struct mt7921_dev *dev, __le32 *txwi, txwi[3] &= ~cpu_to_le32(MT_TXD3_PROTECT_FRAME); } - if (!ieee80211_is_data(fc) || multicast) + if (!ieee80211_is_data(fc) || multicast || + info->flags & IEEE80211_TX_CTL_USE_MINRATE) val |= MT_TXD2_FIX_RATE; txwi[2] |= cpu_to_le32(val); -- 2.18.0