All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deepak R Varma <drv@mailo.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	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
Date: Sat, 19 Nov 2022 22:41:17 +0530	[thread overview]
Message-ID: <Y3kONX7KhQ1GX9QW@qemulion> (raw)

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 <drv@mailo.com>
---
 drivers/staging/pi433/pi433_if.c | 3 +++
 1 file changed, 3 insertions(+)

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);
--
2.34.1




             reply	other threads:[~2022-11-19 17:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-19 17:11 Deepak R Varma [this message]
2022-11-22 12:08 ` [PATCH] staging: pi433: call set_lan_gain for receiver config Greg Kroah-Hartman
2022-11-22 12:29   ` Deepak R Varma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y3kONX7KhQ1GX9QW@qemulion \
    --to=drv@mailo.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.