Skip to contentSkip to conversation

Staging: pi433: Change bit_rate type from u16 to u32

PATCH In review Sumitra Sharma 3 participants 5 messages Mar 11, 2023 – Mar 13, 2023 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: pi433: Change bit_rate type from u16 to u32

Change bit_rate type from u16 to u32 inside struct pi433_tx_cfg to support bit rates up to 300kbps as per the spec.

---
 drivers/staging/pi433/pi433_if.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/pi433/pi433_if.h +1 -1
index 25ee0b77a32c..1f8ffaf02d99 100644
@@ -51,7 +51,7 @@ enum option_on_off {
 #define PI433_TX_CFG_IOCTL_NR	0
 struct pi433_tx_cfg {
 	__u32			frequency;
-	__u16			bit_rate;
+	__u32			bit_rate;
 	__u32			dev_frequency;
 	enum modulation		modulation;
 	enum mod_shaping	mod_shaping;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 2 lines · Sumitra Sharma

Change bit_rate type from u16 to u32 inside struct pi433_tx_cfg to support bit rates up to 300kbps as per the spec.

Is there any mailing list for this file? If so, that should be included.

julia

Quoted 24 lines
---
 drivers/staging/pi433/pi433_if.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/pi433/pi433_if.h +1 -2
index 25ee0b77a32c..1f8ffaf02d99 100644
@@ -51,7 +51,7 @@ enum option_on_off {
 #define PI433_TX_CFG_IOCTL_NR	0
 struct pi433_tx_cfg {
 	__u32			frequency;
-	__u16			bit_rate;
+	__u32			bit_rate;
 	__u32			dev_frequency;
 	enum modulation		modulation;
 	enum mod_shaping	mod_shaping;
--

2.25.1

#2 lore raw

Hi julia,

I forgot to Cc the maintainers of the code of the above patch. I have Cc in this mail. Do let me know if there is a need of recreating the patch.

#3 lore raw
Quoted 4 lines · Sumitra Sharma

Hi julia,

I forgot to Cc the maintainers of the code of the above patch. I have Cc in this mail. Do let me know if there is a need of recreating the patch.

You need to send the patch to all of the relevant people/mailing lists.

julia

#4 lore raw
In reply to Sumitra Sharma
Quoted 2 lines · Sumitra Sharma

Change bit_rate type from u16 to u32 inside struct pi433_tx_cfg to support bit rates up to 300kbps as per the spec.

From this commit log I'm still unclear by how this helps.

Where do the invalid values of bit_rate come from and how did the u16 value get overflowed?

Ira

Quoted 23 lines
---
 drivers/staging/pi433/pi433_if.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/pi433/pi433_if.h +1 -1
index 25ee0b77a32c..1f8ffaf02d99 100644
@@ -51,7 +51,7 @@ enum option_on_off {
 #define PI433_TX_CFG_IOCTL_NR	0
 struct pi433_tx_cfg {
 	__u32			frequency;
-	__u16			bit_rate;
+	__u32			bit_rate;
 	__u32			dev_frequency;
 	enum modulation		modulation;
 	enum mod_shaping	mod_shaping;
Signature · 1 line
2.25.1