Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3320756pxf; Mon, 15 Mar 2021 07:05:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJTngwEBG9oFff3yGCZy/Yb5LaB/9NvuxH9m3N5gs0xRgSFDmxBLYP0e/UPdB03k/xZZiT X-Received: by 2002:aa7:c450:: with SMTP id n16mr29218288edr.16.1615817149093; Mon, 15 Mar 2021 07:05:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817149; cv=none; d=google.com; s=arc-20160816; b=uds3WaZuWsSuaGu8gcIwaqe376+1nzzrvi3AH2v6y9DacZTOygqb2IGPBv3lNX66b0 FAG4JUeE2Hi1fjek/ksNouu8b/I5noAjyCd3/SqaXVIftgw1/YwjUaqT7p3y2CdGTPTN Tf6n5/u/oFd9jmmitqK2g4fjgbgJcdIOOy/g6AnveDtFgJVPj1DgZwrSDCg32+Tk4hT3 ouGLsL0cjQ2zwheiqVeyEChkr+hLOYzynnuuJgsSprSIcu22clggzPRTnyO/t55vYye9 kifPVHQWuHc37V2jV0QckaH4pCEbnU8eYzTuse1CHFLF4cZxQy4sPmXo5qNkZXLHBzui bxnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pfvyIV1Mat3zJiWEHEkxK24aY+v5nMFCgOum+HtuM8U=; b=j3ElCnsABhOlCB7UCNutdOjMolNFlxt2bzW0yDQZK2qdbBuLx3An0wmlfOfFlNjd9a hjkSPnwxc3sbC4b9g7TV/IthR0bhMVsyczpT98KbKHTUxFVYb/lu8kouo6l7s1qm0QPs VHPUm546CgORX4mflAoWh+k2AbjN5U3HXTmMGF8058JlwhT+l0iyumHCOvD2xDIhNOAy Svx38ufcpORW7OXbeqvn4Y0qMCfqq4JJEUK3A1P4Jux2h+FVa044RjDGTt1tVX62ywVA 6IChjcTZELwsxp1yxAkOFLCYI1hT1WM85Coz02LLj7Upf3mPoT8aWzJuGqZ2AHoDPxwi 4TkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fNFcuLOE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec6si11480410ejb.738.2021.03.15.07.05.25; Mon, 15 Mar 2021 07:05:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fNFcuLOE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231571AbhCOOBJ (ORCPT + 99 others); Mon, 15 Mar 2021 10:01:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:33286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231939AbhCON4a (ORCPT ); Mon, 15 Mar 2021 09:56:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 058F564EF0; Mon, 15 Mar 2021 13:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816590; bh=YgK7z5OuoTYfHFxczuQxZsrqwMpzCQi6HapODk0JIQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fNFcuLOE5PJW1vo2wAQIWXZ0OrAww25MTD6pLf8NnIT3ydU9Fj3Un0S+2HhcJR6W8 TB8MpZgBl9odqCFOtnxYKXUhlU1xRBv2THTk5dSMV6QG/0S3AhTjSuM8b3P2eouraX YEbZaHBTFq2fFARaDfAFR+W3PRiU1lc1nhL/jxxg= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Kennedy , Felix Fietkau , Kalle Valo Subject: [PATCH 5.11 008/306] ath9k: fix transmitting to stations in dynamic SMPS mode Date: Mon, 15 Mar 2021 14:51:11 +0100 Message-Id: <20210315135507.902352415@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Felix Fietkau commit 3b9ea7206d7e1fdd7419cbd10badd3b2c80d04b4 upstream. When transmitting to a receiver in dynamic SMPS mode, all transmissions that use multiple spatial streams need to be sent using CTS-to-self or RTS/CTS to give the receiver's extra chains some time to wake up. This fixes the tx rate getting stuck at <= MCS7 for some clients, especially Intel ones, which make aggressive use of SMPS. Cc: stable@vger.kernel.org Reported-by: Martin Kennedy Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210214184911.96702-1-nbd@nbd.name Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath9k/ath9k.h | 3 ++- drivers/net/wireless/ath/ath9k/xmit.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h @@ -177,7 +177,8 @@ struct ath_frame_info { s8 txq; u8 keyix; u8 rtscts_rate; - u8 retries : 7; + u8 retries : 6; + u8 dyn_smps : 1; u8 baw_tracked : 1; u8 tx_power; enum ath9k_key_type keytype:2; --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -1271,6 +1271,11 @@ static void ath_buf_set_rate(struct ath_ is_40, is_sgi, is_sp); if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC)) info->rates[i].RateFlags |= ATH9K_RATESERIES_STBC; + if (rix >= 8 && fi->dyn_smps) { + info->rates[i].RateFlags |= + ATH9K_RATESERIES_RTS_CTS; + info->flags |= ATH9K_TXDESC_CTSENA; + } info->txpower[i] = ath_get_rate_txpower(sc, bf, rix, is_40, false); @@ -2114,6 +2119,7 @@ static void setup_frame_info(struct ieee fi->keyix = an->ps_key; else fi->keyix = ATH9K_TXKEYIX_INVALID; + fi->dyn_smps = sta && sta->smps_mode == IEEE80211_SMPS_DYNAMIC; fi->keytype = keytype; fi->framelen = framelen; fi->tx_power = txpower;