staging: pi433: validate max bit_rate based on modulation used
authorPaulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Tue, 18 Jan 2022 23:05:55 +0000 (12:05 +1300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jan 2022 15:33:55 +0000 (16:33 +0100)
commitca532a56ada46c206ea4a7f87ce34b38c274e57a
tree68815279bd6228b9c2c13c99bfe36e8f5c0eda2a
parent14dbdad1f1a142f2c5d5dde6f671c18ac6763e30
staging: pi433: validate max bit_rate based on modulation used

Max bit rate is dependent on which modulation is used. Previous
validation routine only took into consideration min bit rate which can
lead a misconfiguration of the rf69 chip causing the packets not to be
sent/read.

This patch enhances that input check in set_bit_rate to account for
modulation values and their respective max bit rate

Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20220118230555.GA4961@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/pi433/TODO
drivers/staging/pi433/rf69.c