developer | 2bf53a9 | 2022-06-06 12:08:58 +0800 | [diff] [blame^] | 1 | diff --git a/src/bm/src/bm_events.c b/src/bm/src/bm_events.c |
| 2 | index 19bcd47..dfdf33c 100644 |
| 3 | --- a/src/bm/src/bm_events.c |
| 4 | +++ b/src/bm/src/bm_events.c |
| 5 | @@ -315,14 +315,14 @@ bm_events_handle_event(bsal_event_t *event) |
| 6 | } |
| 7 | |
| 8 | /* This one managed by cloud */ |
| 9 | - if (abs(stats->probe.last_snr - event->data.probe_req.rssi) < client->preq_snr_thr) { |
| 10 | + if (abs((int32_t)(stats->probe.last_snr - event->data.probe_req.rssi)) < client->preq_snr_thr) { |
| 11 | LOGD("[%s] %s: %s skip preq report (%d %d)", bandstr, ifname, client->mac_addr, |
| 12 | stats->probe.last_snr, event->data.probe_req.rssi); |
| 13 | break; |
| 14 | } |
| 15 | |
| 16 | /* This is short time probe report filtering/limitation */ |
| 17 | - if (abs(stats->probe.last_snr - event->data.probe_req.rssi) <= BM_CLIENT_PREQ_SNR_TH && |
| 18 | + if (abs((int32_t)(stats->probe.last_snr - event->data.probe_req.rssi)) <= BM_CLIENT_PREQ_SNR_TH && |
| 19 | (now - last_probe) < BM_CLIENT_PREQ_TIME_TH) { |
| 20 | LOGD("[%s] %s: %s skip preq report (%d %d) short time", bandstr, ifname, client->mac_addr, |
| 21 | stats->probe.last_snr, event->data.probe_req.rssi); |
| 22 | @@ -790,7 +790,7 @@ bm_events_handle_rssi_xing(bm_client_t *client, bsal_event_t *event) |
| 23 | { |
| 24 | if (event->data.rssi_change.low_xing == client->xing_low && |
| 25 | event->data.rssi_change.high_xing == client->xing_high && |
| 26 | - (abs(event->data.rssi_change.rssi - client->xing_snr) <= BM_CLIENT_SNR_XING_DIFF)) { |
| 27 | + (abs((int32_t)(event->data.rssi_change.rssi - client->xing_snr)) <= BM_CLIENT_SNR_XING_DIFF)) { |
| 28 | LOGT("%s same xing skip (%d, %d) snr %d old %d", client->mac_addr, client->xing_low, client->xing_high, |
| 29 | event->data.rssi_change.rssi, client->xing_snr); |
| 30 | return; |