staging: pi433: fix frequency deviation check
authorPaulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Mon, 3 Jan 2022 22:23:34 +0000 (11:23 +1300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jan 2022 14:00:27 +0000 (15:00 +0100)
commit70d8e20c24a4ef42ee200cc7b7b93a01f0ebaa0e
tree3ce4c54949babba74240eb42bfe72e826b1560e2
parentb33721baccd5d4e6651cd8f619524a316ff22cd3
staging: pi433: fix frequency deviation check

rf69 datasheet states that frequency deviation must exceed 600 Hz but
also that frequency deviation + (bitrate / 2) should be less than equal
to 500 kHz to ensure proper modulation.

This patch validates that both conditions are met so RF intersymbol
interference is less likely to happen due to misconfiguration of the uC

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20220103222334.GA6814@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/pi433/rf69.c