You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/05/07 18:51:40 UTC

[GitHub] wes3 closed pull request #1073: net/lora: Fix issue with radio stop receiving

wes3 closed pull request #1073: net/lora: Fix issue with radio stop receiving
URL: https://github.com/apache/mynewt-core/pull/1073
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/net/lora/node/src/mac/LoRaMac.c b/net/lora/node/src/mac/LoRaMac.c
index 1dd390bf8..d2e32533a 100644
--- a/net/lora/node/src/mac/LoRaMac.c
+++ b/net/lora/node/src/mac/LoRaMac.c
@@ -724,7 +724,8 @@ lora_mac_unconfirmed_tx_done(struct lora_pkt_info *txi, int stop_tx)
      */
 
     /* Unconfirmed frames get repeated N times. */
-    if ((g_lora_mac_data.nb_rep_cntr >= LoRaMacParams.ChannelsNbRep) ||
+    if (stop_tx ||
+        (g_lora_mac_data.nb_rep_cntr >= LoRaMacParams.ChannelsNbRep) ||
         (ScheduleTx() != LORAMAC_STATUS_OK)) {
         txi->txdinfo.retries = g_lora_mac_data.nb_rep_cntr;
         g_lora_mac_data.nb_rep_cntr = 0;
@@ -1226,7 +1227,15 @@ lora_mac_process_radio_rx(struct os_event *ev)
                      * 1 will make sure no more retransmissions occur.
                      */
                     lora_mac_tx_service_done(1);
-                    goto chk_send_indicate;
+
+                    /*
+                     * This check is so that we do not attempt to end
+                     * the transmit service in the process rx done case.
+                     */
+                    if ((LoRaMacDeviceClass == CLASS_A) &&
+                        (entry_rx_slot == RX_SLOT_WIN_2)) {
+                        goto chk_send_indicate;
+                    }
                 }
             }
             break;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services