Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1530953pxj; Wed, 19 May 2021 08:02:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/EWur/UM2Kyn68KHNj5O5bL3n+JsDDrZaTu953nq+3rymiV16RF5o84qY1GJwqdpncuMD X-Received: by 2002:aa7:d718:: with SMTP id t24mr15398826edq.259.1621436543836; Wed, 19 May 2021 08:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621436543; cv=none; d=google.com; s=arc-20160816; b=YvifTs7aiHiwEY/ICyvQuYTbu0dS3zw67Mg2HNG/Kuzq/uoTKc4Csx7whfMF0PXKrQ 4HD6idzEc6o1g5xT6rAypIhyF9Wm/5GmwiDuPo62cXJzJqQL5EbGv0qY/e1RI9i67f2i EHaObaWzefnXNy6nnVU3WRL1o0EQXGvDrBQLGT4gjgn++xlPUXAnrJNpPmlgFIa7+U7A m4uQ0HuI1PjRvN74uyne9QNFJrFSxL69Q7r/pQqG4dAQyqhFZ/fiBY0XL+3dOZlwpRnu Yj/CG9dvkVSLWvl+VyENsGFHZAZfqVqlMLaVLMs/pjXYMQboWayAm0CN4HtBaIpTYhKT SMOw== 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:date:cc:to:from:subject :message-id; bh=8DuMmJmeytwlQryU9BN+D+D+8VTwcK+9Q3L5REluxiQ=; b=dY0uL8mh6lJSjlMqQhaJMZrys+VfS5Uk+TDJkO57APQILigFyzyfEyqQwoCOQcd7fy db0+ZHDxq+wqikCGVmJf2Bh+9UzDusE5boSe24CE0A0Yt+NndZus0YYtyYpq8Deylljf kkz98aytyIiFsg8bc1DkIg8fOp5F/AxgkCeBJtrYAU9MD/AGT1uKyZDva0w1lPAVr0OQ pezi/nsUPkvouHdermy2FpEMpm0I0tZz7udOuQ43t8aGiaGlmRqKyIJ/k979qt89ur0Q Mo3xaYTsyfvsLQ4gm361aXb7dRiYGaDpLLac/TBQ6Kl1Th5Lwn9QyYNgKV7K+OGBrcZz ZpZw== 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 cm11si18386332edb.424.2021.05.19.08.01.49; Wed, 19 May 2021 08:02: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 S1348794AbhERLVK (ORCPT + 99 others); Tue, 18 May 2021 07:21:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348785AbhERLVI (ORCPT ); Tue, 18 May 2021 07:21:08 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7722C061573 for ; Tue, 18 May 2021 04:19:50 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1lixlL-00AmfT-Ge; Tue, 18 May 2021 13:19:47 +0200 Message-ID: Subject: Re: [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag From: Johannes Berg To: Felix Fietkau , Philipp Borgers Cc: linux-wireless@vger.kernel.org Date: Tue, 18 May 2021 13:19:46 +0200 In-Reply-To: References: <20210518110755.43077-1-borgers@mi.fu-berlin.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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); } or so? johannes