Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2616187pxb; Sun, 17 Oct 2021 20:36:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoXuz1eTdjHzrrzVBhIbd1vw944l9cPTfNNVL5jeSdm+1ME6SIzBu5DRREAZyKmBCySk0u X-Received: by 2002:a63:ed13:: with SMTP id d19mr21099928pgi.430.1634528209561; Sun, 17 Oct 2021 20:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528209; cv=none; d=google.com; s=arc-20160816; b=JRIXJRA19aRSwAdlONatq1oTqsVOvY9tvC0JpnhXuQP0Udn6AK/Ptc10zs6OoGrsEF 1B9DqExkJSgyO9SXH9V+s7zQbmPA+TyD+76zXnZ1rQUHQFBM1kPHudpbtPZNYqWaHV+e RbxGVKAuYhS/goIpj6AYe9HQXX7JTLaHZy2D5w5cbOWqHa01NH/Wzicr5mKWpvJ+umlF lEyO5P03BHzvPCS/c5mpnXW70UJfalvH/h+/seYBU9BX5zEO2XLBLe8W0wc8EwXfG1qn oJgIAf2hZnzswLPJBe3OeiQxfgqTKkTgbEsnQpX/qFNa8SiFhsNhRagvgKhwxzd3Qe/l Wa8g== 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=LewGZRvf6HHSdwFsbJCZwaldQb6aB9SILI3N7gr3P+s=; b=yDLpJutYwn9z04QDUho3hcZoeYFgHsnCFhd/qjULdmFdxkA7b/RlbJdundZHo4lH8Y LHiRsVoznB3p9fHfjy9bZuqmfiZIatQhTO5JH35E1LOvu2iDsh1ffKxw04E7JLx/5P4y xWI0VO+bCUJWFHdLS1LYDj72pfLhmaGU9SQiouldV6M+OPlKTlC13YnyFR84ZMOSW3wR PLslJvwT0PG0cXwxDnGcO8swbIPRuTkZkS+Ew4ajvmpnpH2uf7hYC4P5tHyKyj+Br6gj xAaXweX20COTySulOoKVpsZjkWbYBocA7lNPSNfZFyXMhTfLNFcKS7qNFeyBlscFLTXA CYhg== 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 f10si10171347pjp.94.2021.10.17.20.36.41; Sun, 17 Oct 2021 20:36:49 -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 S238615AbhJPPfS (ORCPT + 63 others); Sat, 16 Oct 2021 11:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237608AbhJPPfN (ORCPT ); Sat, 16 Oct 2021 11:35:13 -0400 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050::465:201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F753C061766; Sat, 16 Oct 2021 08:33:05 -0700 (PDT) Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:105:465:1:3:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4HWnG76Z2CzQjVH; Sat, 16 Oct 2021 17:33:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= To: Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= , Tsuchiya Yuto , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Maximilian Luz , Andy Shevchenko , Bjorn Helgaas , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH v3 4/5] mwifiex: Send DELBA requests according to spec Date: Sat, 16 Oct 2021 17:32:43 +0200 Message-Id: <20211016153244.24353-5-verdre@v0yd.nl> In-Reply-To: <20211016153244.24353-1-verdre@v0yd.nl> References: <20211016153244.24353-1-verdre@v0yd.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 28EBD26C Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org While looking at on-air packets using Wireshark, I noticed we're never setting the initiator bit when sending DELBA requests to the AP: While we set the bit on our del_ba_param_set bitmask, we forget to actually copy that bitmask over to the command struct, which means we never actually set the initiator bit. Fix that and copy the bitmask over to the host_cmd_ds_11n_delba command struct. Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Jonas Dreßler --- drivers/net/wireless/marvell/mwifiex/11n.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/11n.c b/drivers/net/wireless/marvell/mwifiex/11n.c index b0695432b26a..9ff2058bcd7e 100644 --- a/drivers/net/wireless/marvell/mwifiex/11n.c +++ b/drivers/net/wireless/marvell/mwifiex/11n.c @@ -657,14 +657,15 @@ int mwifiex_send_delba(struct mwifiex_private *priv, int tid, u8 *peer_mac, uint16_t del_ba_param_set; memset(&delba, 0, sizeof(delba)); - delba.del_ba_param_set = cpu_to_le16(tid << DELBA_TID_POS); - del_ba_param_set = le16_to_cpu(delba.del_ba_param_set); + del_ba_param_set = tid << DELBA_TID_POS; + if (initiator) del_ba_param_set |= IEEE80211_DELBA_PARAM_INITIATOR_MASK; else del_ba_param_set &= ~IEEE80211_DELBA_PARAM_INITIATOR_MASK; + delba.del_ba_param_set = cpu_to_le16(del_ba_param_set); memcpy(&delba.peer_mac_addr, peer_mac, ETH_ALEN); /* We don't wait for the response of this command */ -- 2.31.1