Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2041787ybt; Sun, 21 Jun 2020 07:27:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGXy8UlgMsO6UMIGq+j9yRJWNT494ueCr7OGewXNagUrBhrpOBowGZOuVlIZnkIoRoHQCs X-Received: by 2002:a17:906:d043:: with SMTP id bo3mr11474734ejb.409.1592749671763; Sun, 21 Jun 2020 07:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592749671; cv=none; d=google.com; s=arc-20160816; b=h8K5z49XkxWDHqU1fxIkZyPoH7O/yHQ2tnoTUTClRhIuKNR/ddtB1eMUDCSrAojlAx R8/B01d1s3xyXLMBbHElRQCyFZCe52L3cV3HGff5ex3W9rUDgT+dFIBY7G0pheMlVUe5 8PsS0xZ0ll/hLvbXtYy7ze8jXCJJGBr6DYfUHumSEXtPQYiwtWYRIr/9taN1CQZrNwX1 EChSha561P4ycvUJXmwKjNSrybetbI6oOSugNkIkwLaZnvOj4hOd2qRncJG9Knpxqv5Q Mda3V7PmfQNLENYOiJaIJTUpJukNl3xznMPWVWgRHyDlFjdPjhdYcXw1QSc0gdiGXkEs WrGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VWaEvfWqhbKDrU1ebq7xPmGEWJGGF+J23TK3GP6kdHg=; b=CPi0/QiqwG5aTWr5ir/dQ2GVw6n1KMhwH2pGitxpK5FYdoiqprLN54AyP3RkQJMyAx 9U2f2HEEpOFQ0Co8eJPbBl9EcgdVLt0hJaqDF7Ca1U4bYlSbFuDiGh8tUKAj6WMi7gZ4 A9qCk/eyLcfPSmnqHk+Yac6CLTJ7xOJ1rDUMGqmfe5JjFHbmf50X+2SaZ9Akuj4aRVp+ ctUCnvM7XL80R38OglWjS9fBEdjlytTKwgteSd0IfS1mi+bNqEJ5XuTE0uKUu4AopvKe B0WVh6/eNgpcyiPHZrzyMm5VFhHDgPov3EVhZGlYn7YWtvdmdsba9S4fppdqVTNXGAUN 9ydw== 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 n16si947521edb.399.2020.06.21.07.27.10; Sun, 21 Jun 2020 07:27:51 -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 S1730177AbgFUO0N (ORCPT + 99 others); Sun, 21 Jun 2020 10:26:13 -0400 Received: from mail.w1.fi ([212.71.239.96]:37870 "EHLO li674-96.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730171AbgFUO0N (ORCPT ); Sun, 21 Jun 2020 10:26:13 -0400 Received: from localhost (localhost [127.0.0.1]) by li674-96.members.linode.com (Postfix) with ESMTP id 736E011754; Sun, 21 Jun 2020 14:26:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at w1.fi Received: from li674-96.members.linode.com ([127.0.0.1]) by localhost (mail.w1.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HRaT6Bwp_Jve; Sun, 21 Jun 2020 14:26:09 +0000 (UTC) Received: by jm (sSMTP sendmail emulation); Sun, 21 Jun 2020 17:24:26 +0300 Date: Sun, 21 Jun 2020 17:24:26 +0300 From: Jouni Malinen To: Markus Theil Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org Subject: Re: [PATCH v3] nl80211: add control port tx status method Message-ID: <20200621142426.GA27237@w1.fi> References: <20200527160334.19224-1-markus.theil@tu-ilmenau.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200527160334.19224-1-markus.theil@tu-ilmenau.de> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, May 27, 2020 at 06:03:34PM +0200, Markus Theil wrote: > This patch adds the actual code for returning the tx status of control > port frames sent over nl80211. > > NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS is a new command which is used > when returning the tx status. Its availability can be queried by checking > against NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS. > > The ctrl port tx status over nl80211 path re-uses some code from the path > for advertising the tx status over socket control messages, when > SKBTX_WIFI_STATUS is set. > > The tx status can be used in a similar fashion as the mgmt tx status > already allows for. A cookie is included extended ack data of > NL80211_CMD_CONTROL_PORT_FRAME, which can be matched against the cookie > in NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS. The frame content is also > included, as for example hostapd currently uses it to match request and > reply. does the mac80211 part really work correctly? I see NL80211_CMD_FRAME_TX_STATUS events for EAPOL-control-port-TX frames.. > diff --git a/net/mac80211/status.c b/net/mac80211/status.c > @@ -649,10 +649,17 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, > + else if (ieee80211_is_mgmt(hdr->frame_control)) > cfg80211_mgmt_tx_status(&sdata->wdev, cookie, > skb->data, skb->len, > acked, GFP_ATOMIC); I.e., I get this one being called.. > + else > + cfg80211_control_port_tx_status(&sdata->wdev, > + cookie, > + skb->data, > + skb->len, > + acked, > + GFP_ATOMIC); Not this one. And the payload that shows up in user space (NL80211_ATTR_FRAME) has an Ethernet header, not IEEE 802.11 header, which would explain why that ieee80211_is_mgmt() check is not working as expected since hdr is not really pointing to struct ieee80211_hdr.. -- Jouni Malinen PGP id EFC895FA