From patchwork Wed Oct 5 13:00:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 12999228 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32B57C433F5 for ; Wed, 5 Oct 2022 13:01:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbiJENBW (ORCPT ); Wed, 5 Oct 2022 09:01:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbiJENA6 (ORCPT ); Wed, 5 Oct 2022 09:00:58 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D76BB1EEC4 for ; Wed, 5 Oct 2022 06:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=/fh6SckArTpaG4pii7wCsWBmsY1sWRhhf5oDakDk13s=; t=1664974856; x=1666184456; b=yZnDKpxnirieg02tw04gyCupEgeSX9fV95Mgbmz02t0lSUx XTQ/cL33vpVzrbtZwzDBgXU+ECwQtS8Pv1xW0xAcRU6qUSGKelNMOXRHfGFKRQpQuOxSWPFJdWNd4 4YVgLi1HWLnxVo+hJKEwlAnBoTqXLWkr1N5oAH/mrP9ax4nCyuoK5Cd16DxuSAuuxaMVVfa67FI1Q pNNj3uY/OTysQooL1UtZWb7zZG4RiYgaV+ChEf66SsBCU2kRse+aNp6a+10JUklEzlSqDceQ2h9Tl qTck6LAimGS+CyhPhClJgGCPWijF+n90/EQsL1/w2hXjQ1xbUvbUiAInm58cD52w==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1og418-00G2RL-2j; Wed, 05 Oct 2022 15:00:54 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 17/28] wifi: mac80211: fix AddBA response addressing Date: Wed, 5 Oct 2022 15:00:37 +0200 Message-Id: <20221005145226.83b788b596f2.Id8ee3b435d10b656d4b23bc16419432e5db03049@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221005130048.217341-1-johannes@sipsolutions.net> References: <20221005130048.217341-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg Since this frame is addressed from/to an MLD, it should be built with the correct AP MLD address (in station mode) to be encrypted properly. Signed-off-by: Johannes Berg --- net/mac80211/agg-rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 9414d3bbd65f..eaef88a603e5 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c @@ -242,7 +242,7 @@ static void ieee80211_send_addba_resp(struct sta_info *sta, u8 *da, u16 tid, sdata->vif.type == NL80211_IFTYPE_MESH_POINT) memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); else if (sdata->vif.type == NL80211_IFTYPE_STATION) - memcpy(mgmt->bssid, sdata->deflink.u.mgd.bssid, ETH_ALEN); + memcpy(mgmt->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN); else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) memcpy(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN);