Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1789350rdh; Tue, 26 Sep 2023 03:47:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEro30B1qsCGiisGH+U27g+0PB2tb4iZiNmCkrXUEFLacPLZh92YfuJnrHAnIiLW9EcliLe X-Received: by 2002:a05:6902:506:b0:d81:89e9:9f4c with SMTP id x6-20020a056902050600b00d8189e99f4cmr7435790ybs.39.1695725264671; Tue, 26 Sep 2023 03:47:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695725264; cv=none; d=google.com; s=arc-20160816; b=c6YUdcnrsI1Vci8toi01Wg5rlMuqxZC7lZq079DBpsur84/tRVupD//2iltGU06UTv WpjztkqXMVNoc79TmQEUj75U3ANJ+HdY2SKUWes4eSugMX2MQ5RFos4EdhDzJuA+6yWk FcA9+kAB1a/fat3S2K1Wmx1ofO/QwPXeMROfJTf+VWO5hceiQN1nTJA+DVMYye9cl1IH bIpKdPHJgYhWseQRhzvoh8j3Opckm6nIC2OHTphHj4tk5gbbjTyTJFvU/R/Pmnt+Nt+x WsaSjEveU4cTXqlxniEn6YprOLEb3BcTpojm0fwmuGN+pkbWQ4jFxtWDtpqPHen74LdF tqmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=cKtdQqDRUJj7y/VLgZzxcJrmVo/eQVJf4ZnkNLE6taM=; fh=Fd1rX1JQq/WeA4BN1MPyGpzynjJFUxqfBCuIwAdMLqU=; b=0KiUq+j9e6EEPm2oypIEu6b7w9zP4+LyY+uvHIwNdhHK+i7g895LAPx/SVy0aLZj0a Oad85h9W52/GFmtQamdw/Id8Iqg0l3mwZf2EtrQnykBFn1IIEI/W6bkK/nSxEZCSmQTa k4uI9GJFi9VQslxqc+MGlF5sleeTG1igPjh9CER2YXZWMoDRQW3QjoHPArILOSwvMr9n arE260D7RytDyR0iqn4T9ryPEhCuhcqq5i6PEyGzbD9Dov6wEOpBaYYAXBy61CAs3auH pv+b/9EqAk4SOZRT8RsM3lynFVdPPxQ7cQpRtBHQf7bcumWlXbvUpRli8pxE7C+exE/P AfoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=lZAke8xH; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id h184-20020a6383c1000000b005774d2f4abasi1577706pge.876.2023.09.26.03.47.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 03:47:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=lZAke8xH; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BB869807C658; Tue, 26 Sep 2023 02:45:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234215AbjIZJpu (ORCPT + 56 others); Tue, 26 Sep 2023 05:45:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234133AbjIZJpt (ORCPT ); Tue, 26 Sep 2023 05:45:49 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64E6FBE for ; Tue, 26 Sep 2023 02:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=cKtdQqDRUJj7y/VLgZzxcJrmVo/eQVJf4ZnkNLE6taM=; t=1695721542; x=1696931142; b=lZAke8xHmlH8AdciDVEhtzCd2nvkYAAnhCctv5NlTNHrZ2y 0Upg/k7Ix6vDBDiVcEEavcG9XgN3tP/WblFu0Or24QDPpG4mMxQBLkwpZOIYxaoIo7r2Ain/C3v5M 7Pd3GXMGmUspHHdlz9OmrvT2c/U6v92hbsy3+Inz5KYMlyrMCQfUxY/eq3p6aQlI2x/ZOhb+/Wgpy Z/X4mEkjbff3rvthk9M2ddNBbKV/ECIvOsqn5dwyB0ELugHbiTVfHc1HQilfprXt/wOjyiIyjNWWi 0EjOju0ePZm4S9Ok56hKskFe4XXP4cCfDe1MoH1DJVoSWeD7qAG8MYoFNd6MWszg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1ql4dN-005Rpq-16; Tue, 26 Sep 2023 11:45:37 +0200 Message-ID: <4dac29f3844309fb62afe6acd4c4ebd379b0a194.camel@sipsolutions.net> Subject: Re: [PATCH 1/3] wifi: mac80211: add support to allow driver to generate local link address for station From: Johannes Berg To: Wen Gong , ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Date: Tue, 26 Sep 2023 11:45:36 +0200 In-Reply-To: References: <20230906103458.24092-1-quic_wgong@quicinc.com> <20230906103458.24092-2-quic_wgong@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 02:45:54 -0700 (PDT) On Fri, 2023-09-15 at 16:11 +0800, Wen Gong wrote: > On 9/13/2023 4:55 PM, Johannes Berg wrote: > > On Wed, 2023-09-06 at 06:34 -0400, Wen Gong wrote: > [...] > > Maybe after all this explanation, all we need is a flag "reuse MLD > > address for assoc link"? >=20 > yes. It is similar as I said before here: >=20 > https://lore.kernel.org/linux-wireless/b9c6d022-12c3-a696-c4b9-cb14a6d30a= 45@quicinc.com/ >=20 > >=20 > >=20 > > > + ret =3D drv_generate_link_addr(sdata->local, sdata, > > > + link_id, link->conf->addr); > > > + if (ret) > > > + eth_random_addr(link->conf->addr); > > should probably refactor this into a separate function though. > OK. > >=20 > > I'm also not sure how the driver even knows that a link it's being aske= d > > to get the address for *is* the assoc link? Do you want to rely on that > > being the first address handed out? > Current I used (vif->valid_links=3D=3D0) check for assoc link. When > drv_generate_link_addr() called for the assoc link, vif->valid_links > is 0, and it is not 0 for other links. That seems a bit questionable? Well then again, what do you want for AP mode? Anyway you can still distinguish, and if we later need to change an internal API that's not the end of the world either ... So OK, I guess we can live with this, just would like to see it wrapped up into a single function. johannes