Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2302438iof; Wed, 8 Jun 2022 01:56:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTU685OVJeDr5zbKUsStLXSHGBNVaoCCdRGxixhobp2okALN/cGdefUlnBiotZ4CJ01zFk X-Received: by 2002:a05:6a00:2244:b0:51b:b974:4294 with SMTP id i4-20020a056a00224400b0051bb9744294mr33730386pfu.67.1654678566299; Wed, 08 Jun 2022 01:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654678566; cv=none; d=google.com; s=arc-20160816; b=hPyrm9X0f3a4nD2bKcB1iKzLSZSQ3RAZLp+zHAjGTU9J/Gpuehs1lS9dTHOzVh3nN/ YNCReJ5v3TEuz5NjjZzx3BSHSQBEl2DFMFIZx/7mMWtzw7ghwkbIsUreHF4KGW+rVr0I Xq09kF4gn8YaTjpBUYK6Aso2awP99nukECh+DN5pwBLQZ27/GyW1fgc7C9fC51NQ5fOa yiIFGahlQxskbjrRCoYr1JGZkM8w2rtzHKK7PUxqA7h3nGszGPQvDxe8QFTiA0Cm661v vMH0mBCHNzsabgpFmsPqkfJLGFobcxJcnusv9VFP8JWV04bWxZ7v1f7g+09DLG8jYwM/ SYjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=D13nzIHkK2vVIZ4NewmKCOrObCMp13eekfJbpPt8G/A=; b=0uCHJUDTOV5lfbj4dDTUq1kjj10FDQ5URX1R6dHpXqpmRdXDcTnB5ehiJmSIz6K3Bw M6X7bXlARm2U3zwON72Ju+7tmyd99iGa01ltS77VCxXu7VZzrW5ULHqFSui5iWK+IyZ7 wH9BFCUD+cXTFmKAILvtSAc8eqPGkmAr7ZGCk3MUqKktOypmI/gEMmBKM0KSUx0bz1wn MH/3nyj+NwWfu0pxZBFqQcVxDZrJ7rgS+v0SYVcBqLOn4ATIaunZLypDbmVmDRaorQoz f9s7yE67u9DS75yJnTOX1dlSJLgk05j8+wfM8hJ4jHEqboU26YEDZNDInlJuCCosFFGa tajA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=mOaTKuI2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o9-20020a656a49000000b003fb92ed82aasi37995719pgu.862.2022.06.08.01.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:56:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=mOaTKuI2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E1B843A8FAF; Wed, 8 Jun 2022 01:18:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229819AbiFHIRc (ORCPT + 67 others); Wed, 8 Jun 2022 04:17:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231296AbiFHIQK (ORCPT ); Wed, 8 Jun 2022 04:16:10 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5EE026E936 for ; Wed, 8 Jun 2022 00:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1654674308; x=1686210308; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=D13nzIHkK2vVIZ4NewmKCOrObCMp13eekfJbpPt8G/A=; b=mOaTKuI2rCiCfEHD/AEmWLYC0LgLJaQBLlGESbdfqWw+IhzXvulZn3RH zu2Cic47MZkQiM81dgXsscNj7pHxr1+LCQFcX7YGhltXSmEmZJxE8TKCc DdTzDTn+Xv0XUxSyI4QBwVNSKpiXtbAVfgITORrBS9vAlMpUhK9EkFqEh E=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-02.qualcomm.com with ESMTP; 08 Jun 2022 00:45:07 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 00:45:07 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 8 Jun 2022 00:45:06 -0700 Received: from [10.216.28.56] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 8 Jun 2022 00:45:05 -0700 Message-ID: Date: Wed, 8 Jun 2022 13:15:01 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [RFC v2] cfg80211: Indicate MLO connection info in connect and roam callbacks Content-Language: en-US To: Johannes Berg CC: References: <1654536690-12588-1-git-send-email-quic_vjakkam@quicinc.com> From: Veerendranath Jakkam In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 6/8/2022 1:01 PM, Johannes Berg wrote: > On Mon, 2022-06-06 at 23:01 +0530, Veerendranath Jakkam wrote: > >> + if (cr->status == WLAN_STATUS_SUCCESS) { >> + for_each_valid_link(cr, link) { >> + if (!cr->links[link].bss) >> + break; >> + } >> + >> + WARN_ON_ONCE((!cr->valid_links && link != 1) || >> + (cr->valid_links && >> + link != ARRAY_SIZE(wdev->links))); >> + > I will say I'm not super happy with using the link variable after the > loop, that always feels a bit magic to me, especially if the loop is > hidden like that... > > But I guess I don't see a lot of alternatives here, other than open- > coding it, or keeping track of "how many BSSes do I have". Since we need to WARN even if single BSS is not present I think we can use "bss_not_found" flag? > > Actually, for the MLO case, is this even valid? link[14] could be set, > so you wouldn't break, ending up with link==15? Or am I confused? In MLO case the link value will be always 15 after loop completes if bsses are available for all valid links since the check is only for the valid links so, In above case also when "link==15" the condition fails and WARN will be skipped right. > Anyway, looks good to me. > > johannes