Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1303079ybt; Thu, 25 Jun 2020 02:49:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw95irGT2TBUCwwF7eiRP2L2lVqL2QStPkT+Mps2T1LX9gT16cv9h4WCQGRu4BV90MwX1jP X-Received: by 2002:a17:906:3d41:: with SMTP id q1mr29596472ejf.12.1593078585907; Thu, 25 Jun 2020 02:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593078585; cv=none; d=google.com; s=arc-20160816; b=WIZZo8c6UX1YHrdDcaVaq5iybLWdkFBKpfpsiYv08Bdx+FeEswoqVOz/qVkn+er3tV F9hMTrD3SZKiiEJ2nj4BvM/D4N3kq6xTJY1U5RoANQJCCpEKkv/0AiI0vr602SxPCbGd xUBhHp4eoKFRL4jqEBOkDjhn7K1zO+IEQ+qBKqRN+iUYAOlwkcERLMZl2v0ROdw6pT6b 1Z4h0HKm6ei31+Ojdxb2/CLWnzSvUCJTw/kKhXeLVLfIpX0y4lZUsG79TDu5XoB3d3tP 2yjveOx9jbB4/zMYKfNhLF4FBPCJR7AOYKU33mTtSq7FS9+mR2EO/WO1pWHzDpTddJFW Nmkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=Ww33miX3EZ3iGXfsqDbVB5c//CTNGOMovHmUBVs5i6Q=; b=QMP2XyUTIQXlWH3pPmDCN2BhEXDwZEnve/ffasiseYLFUMc3rWIYTtkUHdA1mvpNrk ZIbi2rqqVbrMiAXcyi2sV61AvubU6U5zXydHBTcnoT7TIE0x+PDx7PXrr5XEk/hlnr1u 4RpvTS4pCV8370vYAbQ5+FtP3sZjHxvqOOYx/3b9hzueT3fQxH4jIrELXD9tEHsIxepx xHMq+qPItKqQtvoiv2TGwa8rxCV7SfxDLBvnB47r/0UTYiQowMdtalfDc85/wGLi3a1X 4dTRhi2K9D8pJ/dNymR3Z/MpZe1IRB4H+raeRXfHJbGPluzNJzy2B7400H04cR7IFdoO kYrg== 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 hh5si14461070ejb.264.2020.06.25.02.49.21; Thu, 25 Jun 2020 02:49:45 -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 S2390431AbgFYIte (ORCPT + 99 others); Thu, 25 Jun 2020 04:49:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390216AbgFYItd (ORCPT ); Thu, 25 Jun 2020 04:49:33 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79990C061573 for ; Thu, 25 Jun 2020 01:49:33 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1joNZb-00Bmcf-Id; Thu, 25 Jun 2020 10:49:31 +0200 Message-ID: Subject: Re: [PATCH v4] mac80211: fix control port tx status check From: Johannes Berg To: Markus Theil Cc: linux-wireless@vger.kernel.org, j@w1.fi, kernel test robot Date: Thu, 25 Jun 2020 10:49:26 +0200 In-Reply-To: <20200625084831.5094-1-markus.theil@tu-ilmenau.de> References: <20200625084831.5094-1-markus.theil@tu-ilmenau.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.3 (3.36.3-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 2020-06-25 at 10:48 +0200, Markus Theil wrote: > The initial control port tx status patch assumed, that > we have IEEE 802.11 frames, but actually ethernet frames > are stored in the ack skb. Fix this by checking for the > correct ethertype and skb protocol 802.3. > > Also allow tx status reports for ETH_P_PREAUTH, as preauth > frames can also be send over the nl80211 control port. > > Fixes: a7528198add8 ("mac80211: support control port TX status reporting") > Reported-by: kernel test robot > Reported-by: Jouni Malinen > Signed-off-by: Markus Theil > --- > v4: add cast, reported by Intel kernel test robot > v3: also check for ETH_P_PREAUTH > v2: use __be16, as suggested by Johannes Berg > net/mac80211/status.c | 22 +++++++++++++++------- > 1 file changed, 15 insertions(+), 7 deletions(-) > > diff --git a/net/mac80211/status.c b/net/mac80211/status.c > index 7b1bacac39c6..d6edd3acda0a 100644 > --- a/net/mac80211/status.c > +++ b/net/mac80211/status.c > @@ -639,11 +639,23 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, > u64 cookie = IEEE80211_SKB_CB(skb)->ack.cookie; > struct ieee80211_sub_if_data *sdata; > struct ieee80211_hdr *hdr = (void *)skb->data; > + __be16 ethertype = (__be16)0xffff; If anything, that should've been "cpu_to_be16(0xffff)" but I was just applying this and changing it to 0 instead (which sparse knows about). johannes