Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1664553pxj; Wed, 19 May 2021 10:58:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxduQEMaRMjK90Enje/VDC+ZR9lqQuDL+0F1lEMR8yAZJV82yMW3yUbIZvK4jIN354+qA3Y X-Received: by 2002:a05:6e02:1d90:: with SMTP id h16mr213094ila.59.1621447091560; Wed, 19 May 2021 10:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621447091; cv=none; d=google.com; s=arc-20160816; b=XCFBNccI4dqVbqlf/dg/XaKc1MCAszNR1mR6jpHcxYea8/wqQbfDsMHnr9cQy9HUyO lQurEwgVjOs8M494CXTQs0bJV0FknhWepdHN3rcShMg1Gqi31sSwZhgO6G9e4i1tKHGH YfgFiSBWZSJTwxYLzfiMsmGQ19tTsF+bkeyhy2JtZlMphn7vh9NmGiGO8n0PU4qusdNn mspMTS2MFPGvQTQyt89z/OREiEMNFm722hBxfYA8MGO+hKQyHHY6KNCCWF3gwNv65a45 r8pgRCDdkj4Y/DF0rGpNlQUvy5xkLmGEFpzptc7FmBuJ+aRhgtwH/z8fjhbxGv3vliR5 ytEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=whqA0v/ee6m/c1Tesp+ly9pYJeUOQyDUfupSpC263z8=; b=lXisRVs1lSqVnpFZc5xF+/Fw2h6qEoW+LG55blhaaqTzXKHUX+k8AQIaWElntsEEq3 TJnJ72UP6RqwcsEqrHyCmN6aOrlvf+U3T1TNGyer1/qV8u2yXBvfK2tOlrhd0iewGZXT r+UTF3rPnqnfFsfGc3NbCkn9XZ6ZWdkPpLfihishTC7LW1iVz5BS7oS5SaWD7aGv+Cjn 1kPMsgRBpV+Ap8WyYtZ+VTWfLHWJ8HfHm+aOZFgge1iS46V8IOpIi+s67r6OBFvjaJPl p+bOA2vTxCijb8U2CytPaTtT3d7oPLpCWGKdOjW7KrPphprLIweUMl4wlvkMTeGLTACj mSUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=TLDvNsLG; 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 g19si27904597iow.22.2021.05.19.10.57.56; Wed, 19 May 2021 10:58:11 -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; dkim=fail header.i=@nbd.name header.s=20160729 header.b=TLDvNsLG; 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 S1348549AbhERLbh (ORCPT + 99 others); Tue, 18 May 2021 07:31:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234295AbhERLbg (ORCPT ); Tue, 18 May 2021 07:31:36 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83C19C061573 for ; Tue, 18 May 2021 04:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=whqA0v/ee6m/c1Tesp+ly9pYJeUOQyDUfupSpC263z8=; b=TLDvNsLGRFUJ+IhkZPxZaDZCVh 2tqw7+mrlrhBklrpq2iTd+YA/IN8vknx6NETeK6Z119Il/zTMlqqTJMdbWFfhspjclaR9tLJd5qpu b8pphq+G3nBzgRrBEVAY97DdW0x9ItWiI63Jirw/cMmaCLvqi910Lnc3TA1l8XBhqYvw=; Received: from p54ae9ff2.dip0.t-ipconnect.de ([84.174.159.242] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1lixvV-00083s-6K; Tue, 18 May 2021 13:30:17 +0200 Subject: Re: [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag To: Johannes Berg , Philipp Borgers Cc: linux-wireless@vger.kernel.org References: <20210518110755.43077-1-borgers@mi.fu-berlin.de> From: Felix Fietkau Message-ID: Date: Tue, 18 May 2021 13:30:14 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-05-18 13:19, 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); > } > > > or so? Yes, I think that's a good idea. There will definitely be more places that need this. - Felix