summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libloragw/src/loragw_lbt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libloragw/src/loragw_lbt.c b/libloragw/src/loragw_lbt.c
index a9a858f..aa694fa 100644
--- a/libloragw/src/loragw_lbt.c
+++ b/libloragw/src/loragw_lbt.c
@@ -348,7 +348,9 @@ int lbt_is_channel_free(struct lgw_pkt_tx_s * pkt_data, uint16_t tx_start_delay,
// if ((delta_time <= (tx_max_time - 2048)) && (lbt_time != 0)) {
// delta time check did not allow 400 ms packets, change to simple check against packet duration
// Japan STD regulations allow 400ms packet duration from start of tx
- if ((packet_duration <= (tx_max_time)) && (lbt_time != 0)) {
+ if (tx_max_time <= 400000 && (packet_duration <= (tx_max_time)) && (lbt_time != 0)) {
+ *tx_allowed = true;
+ } else if (tx_max_time > 400000 && (delta_time <= (tx_max_time - 2048)) && (lbt_time != 0)) {
*tx_allowed = true;
} else {
DEBUG_MSG("ERROR: TX request rejected (LBT)\n");