Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2054905rwe; Fri, 2 Sep 2022 07:55:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR5wkVwhCU6UxARC37z/xYZX86oOc5oxtpprJjPHqqnunYrDpJGCLmqMhVkbFpUtGN50OWTa X-Received: by 2002:a63:f74c:0:b0:42b:77c2:ce7c with SMTP id f12-20020a63f74c000000b0042b77c2ce7cmr30499757pgk.473.1662130510930; Fri, 02 Sep 2022 07:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662130510; cv=none; d=google.com; s=arc-20160816; b=UQquHUDjnu4hSJQQzm4HO7MaLppOWLJ8haDEFlP6M+aRAUkCrROAQG+p42fwoPrOow Hpa2Q4pEPFr1f2P3GF6lS/PNwdcGtCW7zoSDY20LnhqGpL1/BQNjNIO2NGql5BDsuhGC 7HFLF3wGop2AZVuBpwIcwp2YvDBZQYGtJ+Q9ja54Ioay/mAmxlzMdTRMSXNMDbYQf0Hv 3/HwFsWRT8XPpsSMtJrhBvgPBJXlRIghTR9xMCJiRo4n9kCDFQibyR/hFm0bAm2RCfCk yT7GYoyG4AG8EFucdRlivj/zulKweGfp3h2xFKVuvb3d2VjclKWjdz89ruE3LQCBYbPd eCVQ== 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 :dkim-signature; bh=89XeSP8T3BsfNpJWBy/8NZacz8TzzRo84aSFyOK+BGs=; b=TuivJiNF7MrJSgxoMQ/ewLIf/fA4ecKdni4Z/QOKM3OrXJeLCCvAfk87cDCA13sHH3 6ZQyYNRpVItD1W8IY6UGX5ccWlG0Nu0TLfGNIpxL0534KJWQBLJZYVZSjTpEvIpcHqTF VniraoMHv4Cz+5V9JbyEDhah+AspMbqwkvWcuKMdGFSe9VXpgm9pbJKHbr4VA3gGLXbP SfNCb+0rj4N8dCD/PGX71DzLLK5NrEyOpl/soG0HFcfuE2ISn19ZKN+k9eAAuXq0ZJuy dZBneNjYLe0oBFhVirmXjLqO++JDSEp1o5Oz5xT1addA1ywoRG1BNlWlLf08W9yUZl3g 3FIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=HVDaQDI0; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y128-20020a633286000000b003c64eaa98cbsi2184053pgy.58.2022.09.02.07.55.01; Fri, 02 Sep 2022 07:55:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=HVDaQDI0; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236587AbiIBOvq (ORCPT + 64 others); Fri, 2 Sep 2022 10:51:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236256AbiIBOvH (ORCPT ); Fri, 2 Sep 2022 10:51:07 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E8C02CDE2 for ; Fri, 2 Sep 2022 07:13:11 -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=89XeSP8T3BsfNpJWBy/8NZacz8TzzRo84aSFyOK+BGs=; t=1662127992; x=1663337592; b=HVDaQDI0QtCWLZlgV8f4xgoC4Zc9mI/OyAIpQDVojsKI6Dj Auq5unNFpLwOjDBo0H22IlJEVmcWMI+QscCvukAu2c7E4fi/3V7ocI48gpiVXJrF+oKcQziAN6d9m IU7gRUuuX9DUjspQN/7HFZRleepvz9b5OLI3mUr+5Xr3VvFlqncT+Sx+nOyzOItcziyPIUcN0Y5Lq bR0IfPLWaOjE4sPQobkZVQwBEf6RBiEUSabi/NTvUsgNKcHpgVx3R/pgfgQyl69bEqV8Z2eclIefo pVDa2fkdKrsaakCRzsefoSYiFZNcCWKph/VLLY5bOi0yo7QB/Q7GzlP8mriYGdIA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oU7Py-006Ch3-05; Fri, 02 Sep 2022 16:13:10 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 18/27] wifi: nl80211: add MLD address to assoc BSS entries Date: Fri, 2 Sep 2022 16:12:50 +0200 Message-Id: <20220902161143.b3b872cec2e1.Ib53e526afe083c823df54903ce334002a9c27b64@changeid> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902141259.377789-1-johannes@sipsolutions.net> References: <20220902141259.377789-1-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg Add an MLD address attribute to BSS entries that the interface is currently associated with to help userspace figure out what's going on. Signed-off-by: Johannes Berg --- include/uapi/linux/nl80211.h | 2 ++ net/wireless/nl80211.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 573db20403dc..ac31fbd84402 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -4959,6 +4959,7 @@ enum nl80211_bss_scan_width { * using the nesting index as the antenna number. * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz * @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8). + * @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it. * @__NL80211_BSS_AFTER_LAST: internal * @NL80211_BSS_MAX: highest BSS attribute */ @@ -4985,6 +4986,7 @@ enum nl80211_bss { NL80211_BSS_CHAIN_SIGNAL, NL80211_BSS_FREQUENCY_OFFSET, NL80211_BSS_MLO_LINK_ID, + NL80211_BSS_MLD_ADDR, /* keep last */ __NL80211_BSS_AFTER_LAST, diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index dad88d231d56..8ab4c907e284 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10182,8 +10182,10 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb, (nla_put_u32(msg, NL80211_BSS_STATUS, NL80211_BSS_STATUS_ASSOCIATED) || (wdev->valid_links && - nla_put_u8(msg, NL80211_BSS_MLO_LINK_ID, - link_id)))) + (nla_put_u8(msg, NL80211_BSS_MLO_LINK_ID, + link_id) || + nla_put(msg, NL80211_BSS_MLD_ADDR, ETH_ALEN, + wdev->u.client.connected_addr))))) goto nla_put_failure; } break; -- 2.37.2