Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1523902pxj; Wed, 19 May 2021 07:52:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOWV2x4R98TME6m8Jdj5N86F28ZOhSM2CUB+/JzSXJ0jOgcWNLBNRdagVh6onOcj708jic X-Received: by 2002:a05:6402:35c4:: with SMTP id z4mr14740970edc.362.1621435943649; Wed, 19 May 2021 07:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621435943; cv=none; d=google.com; s=arc-20160816; b=X5msp16ChYxYNa4fhTDe7Lr1HhcbPPvrrrNq0ARfUTRfaHItQMdfrLl4ieUlghhnpj vyHt6DVjK+Mhx+zV+ZwEitaXPFzvw7ZgIPQYxfahhGuGm2licJhAvLDiPkXPsOSMC6gh YfuLd6mzPTqpwrr+xiJFMC0qdXmYaDJXXkHms42gWVHjH6BlbAwfGdjWhdQ5Z7G8EMWW k3ON6zMyJnV2oSY9Fl8tKHdRWDxOwv/5MgTb48OZDuWb5o4qk83ZkzHuCDYkRsSZrxeE gF+SUrtwsLiDDTun0zqjIzKo+UCbswsBAKmGtyuiW11KQyig0C9/6cJM6vwD3XgijPUJ 9+uw== 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 :message-id:date:subject:cc:to:from; bh=cP9j9s+3w7uEgK+yBa85Fu8OMnxYrgQg1MfAmOfWgMc=; b=Aah3flDZhDlka2dQ7arbG6JBYmXmStxmAccd59d63xKtdzdIyCDc9NB9ApV6hgSyQw LElpGPWfHHwEFm5VGP7fUjFT4U7tOR55poDpjDMfFiwguY5UduNF+7qgNI3K9lJAue89 OCMg5SIDx90SVbyl4w7AaBW4tNyBBJYUZ56P8lY67WkvxsnQpsYIwXSivWbrywNQB1HA JZf6+yjw7Ufq4bWODiVLGrICfyUyi+dj9YrbX6SrEaQpn8soPid/kB1TzrGDDH78PYhU tuqqBDgn+m0RznQEAp5DEfJ05SsGvsR1kflEgxIVSKZwMOnmdZsS8/H0fEzhQZYLfUln GgZg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si21738893eje.694.2021.05.19.07.51.54; Wed, 19 May 2021 07:52:23 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348173AbhERLJe (ORCPT + 99 others); Tue, 18 May 2021 07:09:34 -0400 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:54849 "EHLO outpost1.zedat.fu-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240967AbhERLJd (ORCPT ); Tue, 18 May 2021 07:09:33 -0400 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.94) with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1lixaA-003til-O2; Tue, 18 May 2021 13:08:14 +0200 Received: from a36t-ffs1.berlin.freifunk.net ([77.87.51.11] helo=mi.fu-berlin.de) by inpost2.zedat.fu-berlin.de (Exim 4.94) with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1lixa9-001ULB-IF; Tue, 18 May 2021 13:08:14 +0200 Received: by mi.fu-berlin.de (sSMTP sendmail emulation); Tue, 18 May 2021 13:08:13 +0200 From: Philipp Borgers To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Philipp Borgers Subject: [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag Date: Tue, 18 May 2021 13:07:54 +0200 Message-Id: <20210518110755.43077-1-borgers@mi.fu-berlin.de> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Original-Sender: borgers@mi.fu-berlin.de X-Originating-IP: 77.87.51.11 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Data Frames with no ack flag set should be handle by the rate controler. Make sure we reach the rate controler by returning early from rate_control_send_low if the frame is a data frame with no ack flag. Signed-off-by: Philipp Borgers --- net/mac80211/rate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 63652c39c8e0..4f5b35a0ea28 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c @@ -391,11 +391,16 @@ static bool rate_control_send_low(struct ieee80211_sta *pubsta, struct ieee80211_tx_rate_control *txrc) { struct ieee80211_tx_info *info = IEEE80211_SKB_CB(txrc->skb); + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) txrc->skb->data; struct ieee80211_supported_band *sband = txrc->sband; struct sta_info *sta; int mcast_rate; bool use_basicrate = false; + if (ieee80211_is_data(hdr->frame_control) && + (info->flags & IEEE80211_TX_CTL_NO_ACK)) + return false; + if (!pubsta || rc_no_data_or_no_ack_use_min(txrc)) { __rate_control_send_low(txrc->hw, sband, pubsta, info, txrc->rate_idx_mask); -- 2.31.1