From patchwork Sat Nov 19 17:11:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 23295 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp799819wrr; Sat, 19 Nov 2022 09:15:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf7pz3csX7JEWxSU1JCouZHmHscMmaCqeFd4uiir2uh1nuHufpsv5LlzeXD+S0iP+4cp86/p X-Received: by 2002:a05:6a00:32c7:b0:565:f8bb:96f8 with SMTP id cl7-20020a056a0032c700b00565f8bb96f8mr578446pfb.45.1668878148944; Sat, 19 Nov 2022 09:15:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668878148; cv=none; d=google.com; s=arc-20160816; b=QynHjTpS/rlLIen+eZKGRFGpjdOf0Lr7jGfZF9SqEqyOicQpkYw+BzsMN2J1TKZPN0 TWvwErmBQH4H2BG4fEXWLTNHDW7ZucndLjVLRdfgcriF2V2EFwPk2IzATcynpB63rLqR PvLVlRPKc8uSdLvUzA5hDFO3vDaoa0ZaIXD6KdnzPBcyhpupIx+PEsSPnN4l7JMaNQ0N 1LtEN7W/Uhvpt8FHJAfTkSIJocuGaTD8u9J4tGggwvfwIG81424jBU2FOh1uh8308Otb qh1fcKo0A35Io5eyuadQ/bYbM+FzSJXI//QSuP6iJ3o2x89M+qNmACnJoEvluYHkUP6c B6rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=YCR1kkigxPr8rIMginGfDDotekZbn55xYGn4lYaBaV4=; b=Vjgcjt5UlvdL0TKvlyUKgPakUvW2AmyPTWweK8mHxd9zq3pjo9bGHQ/NeM5EDStg+R EdkAuhtYFGxwXG2Lwt/wAGmAZLAohqh4C0/gy0QBqp9xISJwJK0KP9TqskJd96wXs3XF fx4CcIYM6w4V9nAIfozpte5zVuJmJHIrTBRVMuNk1rCeQGjdVnDRSkmDWch7ArGRQ6pq VMmrbAC9mO/IACM5tjmf30Kjw7lHUlBP/8Ms7z2g9nWLJHrL2i4mt5TRJvTQ4/wTuazI a6akh0qSJqnS5nT05Y+8bg9XZ/H9ck+0V9dsoRoXGL9CvLxNvuq7HAyIoQEJaLSe4Ks3 /zwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=TYkmpQm6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x1-20020a623101000000b00562a956d979si5874507pfx.67.2022.11.19.09.15.36; Sat, 19 Nov 2022 09:15:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=fail header.i=@mailo.com header.s=mailo header.b=TYkmpQm6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234477AbiKSRLe (ORCPT + 99 others); Sat, 19 Nov 2022 12:11:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbiKSRLb (ORCPT ); Sat, 19 Nov 2022 12:11:31 -0500 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 471E9E85 for ; Sat, 19 Nov 2022 09:11:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1668877882; bh=FKEbaY7IyPQFMpBoG5mhguHiFjbHZh8X2ncstYTLPn0=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=TYkmpQm6NGtu87aycupjCmDXfNZKu64JDeqvj2c0vFicANOkhB6byigpTRtd3X/Gr HzUMa+UQyGnMB4XxSLI3V/qyaF6/HQOe6dZyKcuI96ZMoHROBAupfrqTi+ST7JgQKL hzGkKTpmqf0IjSgArjgYvkmgrZ771UfHGfNSyq8Y= Received: by b-2.in.mailobj.net [192.168.90.12] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sat, 19 Nov 2022 18:11:22 +0100 (CET) X-EA-Auth: ni8jdc27RGu78A+owJy87OHmQyFyTnn+3qZB4CS5snT62QN7iRjoo7WeH1t5COwJD/1OxtourPBt3HBrZTRIJeF5UApw/Mpc Date: Sat, 19 Nov 2022 22:41:17 +0530 From: Deepak R Varma To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: drv@mailo.com Subject: [PATCH] staging: pi433: call set_lan_gain for receiver config Message-ID: MIME-Version: 1.0 Content-Disposition: inline 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_NONE,SPF_PASS 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749945573866400008?= X-GMAIL-MSGID: =?utf-8?q?1749945573866400008?= Value for the LNA gain is captured from the user as part of the struct pi433_rx_cfg, however, the corresponding function rf69_set_lna_gain() is never called to set it. Include a call to this function as part of setting up the rx configurations. Signed-off-by: Deepak R Varma --- drivers/staging/pi433/pi433_if.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.34.1 diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index d4e06a3929f3..e588a98d7f33 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -176,6 +176,9 @@ rf69_set_rx_cfg(struct pi433_device *dev, struct pi433_rx_cfg *rx_cfg) if (ret < 0) return ret; ret = rf69_set_antenna_impedance(dev->spi, rx_cfg->antenna_impedance); + if (ret < 0) + return ret; + ret = rf69_set_lna_gain(dev->spi, rx_cfg->lna_gain); if (ret < 0) return ret; ret = rf69_set_rssi_threshold(dev->spi, rx_cfg->rssi_threshold);