Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp274991ybg; Mon, 8 Jun 2020 23:39:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUVFER/3S4vwNmMW//TotP/e84Q4OEsamGfoLo38VB81IHswtD8tL42XEkS4Dhbpg3Hpq8 X-Received: by 2002:a17:906:344c:: with SMTP id d12mr22607717ejb.130.1591684781269; Mon, 08 Jun 2020 23:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591684781; cv=none; d=google.com; s=arc-20160816; b=M269sr62EY/5DLB/CxhwbRKbzyMZh61shZ6LTKuGh4LuMUb+wizAJg5Z4RV8c5LAa7 M+NFEQTJKXS4WyEr5BJ/ddAuOsp6TED4Yljxo/jLociKbdNzwAHUkqKjUaTn4D4bW7zK sJj6X1Pw1NqXcv5f0OiGrZZrg6379JApjvIHLmHYpPttFb2ID8Axy39aB+xksPs2G2Ds kjCcEettNpdTFuRPR2F7lSA7nmZmL6nGWFu70AcE4C1g1XtToOiLse6YkrendxWorEWw 9ElLXRSG9+QZHJG2GPrjDO+8OmXkh4Ci7ycD3Xbtk1jTKO/wluV9E7+AAKsFnbJF4JaS WD2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature; bh=reOd9SJWFYGO0ZUe81fiFygXGGIlBmXify7Omrkn6G4=; b=clFJxwMUvPbZNZH80C0Adx8qWsDn8yDl2kc7w68l3qZ+utNMLG2Au+5jKwIle4Odo8 9gVsw+QcKr7fEii1ea8ApiURoRqDKAb3Px2Gne36T14tBqi7jHf6S3VLumjEETT7S3DJ rTCDM9qFAsCLFlC4f72f3bPSz43oXc8y/sF2TnjLxqiD8Q91A8asY3tc5oTAUwaxRuwB h3arE3Jvc4yFgf09/i0Mn7+sB3+b+5POf+mMLwFauKnJD3s4hpyaY5SgbGmJxmYr7PqM ZcjwLx4KP3JRAvlpsQJOA048g+dbruS8KkR/KqtmZmIo4CbQaSf/t1K2GIoXFGiF01MZ Eilw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=YgnNL3Hq; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si10444040edq.195.2020.06.08.23.39.14; Mon, 08 Jun 2020 23:39:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=YgnNL3Hq; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726915AbgFIGhl (ORCPT + 99 others); Tue, 9 Jun 2020 02:37:41 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:42354 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726886AbgFIGhl (ORCPT ); Tue, 9 Jun 2020 02:37:41 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1591684661; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=reOd9SJWFYGO0ZUe81fiFygXGGIlBmXify7Omrkn6G4=; b=YgnNL3Hq8ppJW6iGiuYnckNW2oG2/f0KUHFzU4Rlv66tOPI1iyPHv1OzA/JcqLLgSksD1JYL +JCOLV4CDPvav6na61Cga6BAZLZsimOn+oGeSQCPkognRIJSy1G+h20RbB8BTWwRkzSVwTAz MRO670owXfV28Lv6q4KdBHTBt4Q= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n11.prod.us-east-1.postgun.com with SMTP id 5edf2e33d9f1a4ceef5a4c15 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 09 Jun 2020 06:37:39 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 06AC1C433C6; Tue, 9 Jun 2020 06:37:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id A4CDCC433CA; Tue, 9 Jun 2020 06:37:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A4CDCC433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Pradeep Kumar Chitrapu Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH v5 7/8] ath11k: Send multiple scan_chan_list messages if required References: <20200603001724.12161-1-pradeepc@codeaurora.org> <20200603001724.12161-8-pradeepc@codeaurora.org> Date: Tue, 09 Jun 2020 09:37:35 +0300 In-Reply-To: <20200603001724.12161-8-pradeepc@codeaurora.org> (Pradeep Kumar Chitrapu's message of "Tue, 2 Jun 2020 17:17:23 -0700") Message-ID: <87ftb4zqvk.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Pradeep Kumar Chitrapu writes: > With addition of 6Ghz channels, it is possible that wmi buffer size can > exceed the maximum wmi buffer size. So iterate over the channel list, > and send multiple messages till channel list is empty. > Also mark PSC channel flag for 6GHz channels accordingly. > > Signed-off-by: Pradeep Kumar Chitrapu > --- > drivers/net/wireless/ath/ath11k/wmi.c | 170 ++++++++++++++------------ > drivers/net/wireless/ath/ath11k/wmi.h | 3 + > 2 files changed, 98 insertions(+), 75 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c > index 239a336f55f4..ad3a7b68d308 100644 > --- a/drivers/net/wireless/ath/ath11k/wmi.c > +++ b/drivers/net/wireless/ath/ath11k/wmi.c > @@ -2194,91 +2194,111 @@ int ath11k_wmi_send_scan_chan_list_cmd(struct ath11k *ar, > struct channel_param *tchan_info; > struct wmi_tlv *tlv; > void *ptr; > - int i, ret, len; > + int i, ret = 0, len; > + u16 num_send_chans, num_sends = 0, max_chan_limit = 0; > u32 *reg1, *reg2; > [...] > + ret = ath11k_wmi_cmd_send(wmi, skb, WMI_SCAN_CHAN_LIST_CMDID); > + if (ret) { > + ath11k_warn(ar->ab, "failed to send WMI_SCAN_CHAN_LIST cmd\n"); > + dev_kfree_skb(skb); > + goto end; > + } > + > + num_sends++; > + } > +end: > return ret; > } The end label is useless, I removed that and replaced the goto with 'return ret'. And I replaced the return in the end to 'return 0' which made it possible to not initialise the ret variable. Please check my changes in the pending branch (which I will push shortly). -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches