Skip to contentSkip to conversation

staging: pi433: call set_lan_gain for receiver config

PATCH In review Deepak R Varma 2 participants 3 messages Nov 19, 2022 – Nov 22, 2022 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: pi433: call set_lan_gain for receiver config

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.

---
 drivers/staging/pi433/pi433_if.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/staging/pi433/pi433_if.c +3 -0
index d4e06a3929f3..e588a98d7f33 100644
@@ -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

#1 lore raw
Quoted 9 lines · Deepak R Varma

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.

---
 drivers/staging/pi433/pi433_if.c | 3 +++
 1 file changed, 3 insertions(+)

How was this change tested?

thanks,

greg k-h

#2 lore raw
Quoted 6 lines · Greg Kroah-Hartman
Quoted 5 lines · Deepak R Varma

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.

Quoted 6 lines
Quoted 4 lines
---
 drivers/staging/pi433/pi433_if.c | 3 +++
 1 file changed, 3 insertions(+)

How was this change tested?

Hi Greg,
This was compile tested only.

As per your message on the other patch for this driver, I am holding back such patches until I have the ability to test the change with a real device myself.

I most welcome if there is any other feedback on the patches. It will help me consolidate the feedback and react to them in one go.

Thank you,
./drv

Quoted 5 lines

thanks,

greg k-h