Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2974298pxb; Mon, 17 Jan 2022 09:16:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYpfTtbtFAVYHNNXGdhL10vFh26DmcpkOnI7Xe3WQHBEjGiod7uESPoCfksvebQiJqA0XK X-Received: by 2002:a17:90b:1b0e:: with SMTP id nu14mr25804846pjb.39.1642439777051; Mon, 17 Jan 2022 09:16:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642439777; cv=none; d=google.com; s=arc-20160816; b=MzDsFxDnMHtwfSxwXGRrqVVtEoyVqpyJWX7DY/VJ1DpywrnKYUg73o2CasS0yidQbt qlUs8sLyOYTW/hA9L3QWXJu2EPpEQEJE4vEvFPYVe8mwB6dhfzP3ndo4fDGzfEmqVrHu Tu/89/Xm8mRIQtaWkfhU29lZAp3fonU9io5OuL7CBnvmqMdGiqwWsXgQups9Xs+R8ddu KWfJIlctzm7NldxAkxSf8mHaAcDZ/GLXPTV/Cn7T60u9QJtKenr3UbtuCkSFub0VAbwR M0gdVhMC8Ut2TF09LC5P394kO9uO83mYW1WSnV3R5/tMHAWu9EpTWh9Rvo3h3Ef6r7wV uwaA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2OAioSJXHlAHZY/SZ7Hc7IQy8PbqoSxOUbb8bKeiGO8=; b=mVkmb0pbNgOvTxIzqo0S15aRphrUl3zlw2se2LvQN8gQDgwfveRIV5d/vEKAC2Xvkn poTiKITqYkhoTDJHkQxHhxbg8k9kHa0Dl1sK3EaTA04yromEkdSWkxwE574xK9loR78w j3hmdG8zqanB/6PxEpGy2wKVzF7u0bJ4eF8S8gL/+w4pe/ro7O4ez2crYjFU3qbDk8/l 77FVZg5eZYf15XEDTF44kGNz/zRJxEaL/XmIATS1EyX3OwBHHMjWs34jUeUuADLTeTOQ 33QmNA35KwSrP14HfB/I6LZNGWlWwpcuKihOzqWsKxul7wAE44eBnBfw434ILI8x6oaa pqHQ== 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 e9si6546900pgc.154.2022.01.17.09.16.07; Mon, 17 Jan 2022 09:16:17 -0800 (PST) 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 S239587AbiAQL43 (ORCPT + 70 others); Mon, 17 Jan 2022 06:56:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239457AbiAQLzp (ORCPT ); Mon, 17 Jan 2022 06:55:45 -0500 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [IPv6:2001:4b98:dc4:8::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59C37C061749; Mon, 17 Jan 2022 03:55:37 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 7C79F200013; Mon, 17 Jan 2022 11:55:34 +0000 (UTC) From: Miquel Raynal To: Alexander Aring , Stefan Schmidt , linux-wpan@vger.kernel.org Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, David Girault , Romuald Despres , Frederic Blain , Nicolas Schodet , Michael Hennerich , Jakub Kicinski , Varka Bhadram , Xue Liu , Alan Ott , Thomas Petazzoni , Miquel Raynal Subject: [PATCH v3 28/41] net: mac802154: Introduce a synchronous API for MLME commands Date: Mon, 17 Jan 2022 12:54:27 +0100 Message-Id: <20220117115440.60296-29-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220117115440.60296-1-miquel.raynal@bootlin.com> References: <20220117115440.60296-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This is the slow path, we need to wait for each command to be processed before continuing so let's introduce an helper which does the transmission and blocks until it gets notified of its asynchronous completion. This helper is going to be used when introducing scan support. Signed-off-by: Miquel Raynal --- net/mac802154/ieee802154_i.h | 1 + net/mac802154/tx.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h index 37d5438fdb3f..40195e2a6f1e 100644 --- a/net/mac802154/ieee802154_i.h +++ b/net/mac802154/ieee802154_i.h @@ -123,6 +123,7 @@ extern struct ieee802154_mlme_ops mac802154_mlme_wpan; void ieee802154_rx(struct ieee802154_local *local, struct sk_buff *skb); void ieee802154_xmit_sync_worker(struct work_struct *work); void ieee802154_sync_tx(struct ieee802154_local *local); +void ieee802154_mlme_tx(struct ieee802154_local *local, struct sk_buff *skb); netdev_tx_t ieee802154_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev); netdev_tx_t diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c index d1fd2cc67cbe..334843f66ec4 100644 --- a/net/mac802154/tx.c +++ b/net/mac802154/tx.c @@ -123,6 +123,12 @@ void ieee802154_sync_tx(struct ieee802154_local *local) wait_event(local->phy->sync_txq, !atomic_read(&local->phy->ongoing_txs)); } +void ieee802154_mlme_tx(struct ieee802154_local *local, struct sk_buff *skb) +{ + ieee802154_tx(local, skb); + ieee802154_sync_tx(local); +} + netdev_tx_t ieee802154_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { -- 2.27.0