Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3061505ioo; Tue, 24 May 2022 12:07:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmWJHtw5RSMCGqRieGgwx3pmFdxD47qp8NFEzDM1vF/eJ+xAbgPkQj7DBVjVQDmq8peMep X-Received: by 2002:a17:906:a10a:b0:6fe:563a:8895 with SMTP id t10-20020a170906a10a00b006fe563a8895mr25031438ejy.80.1653419220754; Tue, 24 May 2022 12:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653419220; cv=none; d=google.com; s=arc-20160816; b=PlPZLheFmhlD45Rzriv3BZbumMQ4NsBso8g1qYPbS6oZCD7HtI4/DTUrfdQ+cHAS8n Hq3aNDmUchtvdEWRVFzCRVfrLI7WDBj6WjcHgIJKvVWtJQdlBGJgRCSPQC+rO+3sFq4e yLmYUZNjCMcfQyXfLYlhKgK1X5dAmDWyeyK4zB6K78BIazKoasz+YbJbaGJc3rj5lrex LwoBgKdcJYuo7XHY6ONgabnN9kooJVY/catwjwbyLR3Su+CR5ecSBf0EcWURw/mSoOew yTP3u8qJBLQyXwTb120XOCovEWCVGKdjIufEff6isdNruj6HCxKi3uFy2ArxZROszcaY PILg== 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=T5zm1O2oEgLCR2clggqyywPvK9Mai5fRqlMto8pnhJU=; b=nd+81wSbsQQj75UTo7wqPCVhGhxvzBvQOEJB7GoUnVHJ6Z5ILleHEnbRzofRqswvKz 5KmHPIBBrkrrFrVwulYh0mS2SV8UrDijBGqtQfxCJDndki2Q4C2DUZn0RM4RXDrnvEVv kIg+G7kXAeNENV6liTkHl34DDHe+oi5TBV+w3lMqrvKd83t3WWDK/RhjjJ27gOJk2xT5 NS/8apII7dveHy2iVnM+L+E8nG8aEJd5/oOPN1JRe4MeQdnUwrXzc7nrB9wd+fLNXRWI FBVRhxIY7sG9hPwl+IuKV2iRPNEiENVMY4LPXGC9EjovSLOu1QXkR/EajZDe/aWHYHPp AfUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=y8qX4uDo; 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=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v11-20020a056402348b00b0042b63157cb6si8783503edc.12.2022.05.24.12.06.43; Tue, 24 May 2022 12:07:00 -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=@quicinc.com header.s=qcdkim header.b=y8qX4uDo; 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=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235115AbiEXRYT (ORCPT + 67 others); Tue, 24 May 2022 13:24:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234115AbiEXRYR (ORCPT ); Tue, 24 May 2022 13:24:17 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 386BB7CDE2 for ; Tue, 24 May 2022 10:24:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1653413056; x=1684949056; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=T5zm1O2oEgLCR2clggqyywPvK9Mai5fRqlMto8pnhJU=; b=y8qX4uDoRel207UTZsMBiUYrYjwq4+sOtSvYXSrf+lcQ1EKhHrpK6lh4 T2tRsZxLmJ/Psckc+mF5fkcvDWBf4Got9LlCDJQWtRBe3QYzl2plXhJJI o0qZNdYSBSo2dFboiJxCZzA4OfOie6znfYlXhPcDNECkyWTCcz9imGqYk 8=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 24 May 2022 10:24:16 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 10:24:15 -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; Tue, 24 May 2022 10:24:15 -0700 Received: from [10.110.85.248] (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; Tue, 24 May 2022 10:24:14 -0700 Message-ID: Date: Tue, 24 May 2022 10:24:13 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [RFC v2 07/96] cl8k: add bf.c Content-Language: en-US To: , CC: Kalle Valo , "David S . Miller" , Jakub Kicinski , Aviad Brikman , Eliav Farber , "Maksym Kokhan" , Oleksandr Savchenko , Shay Bar References: <20220524113502.1094459-1-viktor.barna@celeno.com> <20220524113502.1094459-8-viktor.barna@celeno.com> From: Jeff Johnson In-Reply-To: <20220524113502.1094459-8-viktor.barna@celeno.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 On 5/24/2022 4:33 AM, viktor.barna@celeno.com wrote: [snip] > +void cl_bf_sounding_start(struct cl_hw *cl_hw, enum sounding_type type, struct cl_sta **cl_sta_arr, > + u8 sta_num, struct cl_sounding_info *recovery_elem) > +{ > +#define STA_INDICES_STR_SIZE 64 > + > + /* Send request to start sounding */ > + u8 i, bw = CHNL_BW_MAX; > + char sta_indices_str[STA_INDICES_STR_SIZE] = {0}; > + u8 str_len = 0; > + > + for (i = 0; i < sta_num; i++) { > + struct cl_sta *cl_sta = cl_sta_arr[i]; > + struct cl_bf_sta_db *bf_db = &cl_sta->bf_db; > + > + bw = cl_sta->wrs_sta.assoc_bw; > + bf_db->synced = false; > + bf_db->sounding_start = true; > + bf_db->sounding_indications = 0; > + > + str_len += snprintf(sta_indices_str, STA_INDICES_STR_SIZE - str_len, "%u%s", > + cl_sta->sta_idx, (i == sta_num - 1 ? ", " : "")); note that this may not actually be safe from overflow due to the semantics of the snprintf return value. using scnprintf() is preferred for this usage pattern