Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1727756pxj; Wed, 19 May 2021 12:27:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFtqhCgdKFSLVgs9KIKFKQo6KYs6RXlfgtziXgv6hn6f7Y72IIYBg+4uKwdsSt4xVgYMN6 X-Received: by 2002:a6b:5015:: with SMTP id e21mr1242857iob.104.1621452445880; Wed, 19 May 2021 12:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452445; cv=none; d=google.com; s=arc-20160816; b=ItExWZieT1mdoT8Ol0Zp2F8zh/X1V5jpENUFEYctBH7ozVGGGouaMEbLWwpA3XFCM4 Hu1/fkVV+ii/5THPq61KiXtK11rQqIP4iT3Cf+GUQV6U6xYSzLtNyNmr53hEV0h8w5E7 dZLopsDqvVKl/kjNAbsmpYGyDQrMTfATuIjgAoNQfLPhBKTrC5xqsTdBqc2gqs7NOwYp vy77bCto9UR+4K2RAqeUiKLumtJGdR/iiG07/+xIk+bUnsaLhRfrk3z2yO7M4weVTiXX X87wQttw1WU4toKTGFDcv6Bd9o7duh2k0oX3gkmcodTNv11P8/U0HiNFb/XfCpEu+MEK UOMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VifHi5EbnuQyQVSPSs3vEK+EM18oGYxNFlE7L3uW494=; b=eerLq8R1cbEcDI+wyrTCqYgH/BXig9tH00HtbVZ31Gjerxmo+xQN3ScPSRbiw9V5+2 GDWna3uKoYMIZjGLQe2LBLvV70+9DotdBVz8o0l3CUFFV3AOSi6o87s+wRHo5RxwPiFi PT6zGpiDr91alQ2Q4O1lBajCpfHhHAeyNvLHR0s4iaKtxxoGOv8jt5Qz8ZlseCGHS9bh bN90VwylKaiZDtBv3P8JtCwde4OF7yWzIZsNK9VGvBWSsWhjLsaMN6+q7TKSNPoAAfaL /KANyIdHuGQE5ATOWc7NWD+lEzPiZRpqnfZ/FEQZ+Bc+l4Il/IiGbfizf2gQpyWZlsAd bwsw== 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 b11si66970jat.37.2021.05.19.12.27.12; Wed, 19 May 2021 12:27:25 -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 S240016AbhESKsz convert rfc822-to-8bit (ORCPT + 99 others); Wed, 19 May 2021 06:48:55 -0400 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:42449 "EHLO outpost1.zedat.fu-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240370AbhESKsz (ORCPT ); Wed, 19 May 2021 06:48:55 -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 1ljJjh-003bUM-MD; Wed, 19 May 2021 12:47:33 +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 1ljJjg-000CI0-G8; Wed, 19 May 2021 12:47:33 +0200 Received: by mi.fu-berlin.de (sSMTP sendmail emulation); Wed, 19 May 2021 12:47:32 +0200 Date: Wed, 19 May 2021 12:47:32 +0200 From: Philipp Borgers To: Johannes Berg Cc: Felix Fietkau , linux-wireless@vger.kernel.org Subject: Re: [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag Message-ID: References: <20210518110755.43077-1-borgers@mi.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: 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 On Tue, May 18, 2021 at 01:19:46PM +0200, Johannes Berg wrote: > On Tue, 2021-05-18 at 13:17 +0200, Felix Fietkau wrote: > > > > Frames with IEEE80211_TX_CTL_HW_80211_ENCAP set have no 802.11 header, > > so please change the check something like this: > > > > if ((info->flags & IEEE80211_TX_CTL_NO_ACK) && > > ((info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) || > > ieee80211_is_data(hdr->frame_control))) > > Maybe we should consider some kind of inline helper? > > static inline bool ieee80211_is_tx_data(struct sk_buff *skb) > { > ... *info = ... > ... *hdr = (void *)skb->data; > > return (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) || > ieee80211_is_data(hdr->frame_control); > } A frame with IEEE80211_TX_CTL_HW_80211_ENCAP set is always a data frame? Should I put the definition of the function into include/net/mac80211.h?