mirror of https://github.com/ARMmbed/mbed-os.git
Adding valid frequency check for RXParamSetup cmd
We must check for a valid value of a frequency being sent by the network server.pull/7191/head
parent
ffb0698ce7
commit
27290bb12f
|
@ -1034,6 +1034,10 @@ uint8_t LoRaPHY::accept_rx_param_setup_req(rx_param_setup_req_t* params)
|
||||||
{
|
{
|
||||||
uint8_t status = 0x07;
|
uint8_t status = 0x07;
|
||||||
|
|
||||||
|
if (lookup_band_for_frequency(params->frequency) < 0) {
|
||||||
|
status &= 0xFE;
|
||||||
|
}
|
||||||
|
|
||||||
// Verify radio frequency
|
// Verify radio frequency
|
||||||
if (_radio->check_rf_frequency(params->frequency) == false) {
|
if (_radio->check_rf_frequency(params->frequency) == false) {
|
||||||
status &= 0xFE; // Channel frequency KO
|
status &= 0xFE; // Channel frequency KO
|
||||||
|
|
Loading…
Reference in New Issue