wpa_supplicant(hidl): Don't send negative disconnect reason codes
wpa_supplicant's core uses negative reason codes to inform the
control interface that the disconnect was locally generated, this
however does not need to be propagated to the HIDL clients. The
locally_generated bit should be enough to inform the HIDL clients that
the disconnect was generated locally.
Bug: 64521966
Test: Will send for regression tests.
Change-Id: Ie5a2c36003626332c028556e49bd746f2b806986
diff --git a/wpa_supplicant/hidl/1.0/hidl_manager.cpp b/wpa_supplicant/hidl/1.0/hidl_manager.cpp
index 622dcbf..152203c 100644
--- a/wpa_supplicant/hidl/1.0/hidl_manager.cpp
+++ b/wpa_supplicant/hidl/1.0/hidl_manager.cpp
@@ -904,7 +904,7 @@
&ISupplicantStaIfaceCallback::onDisconnected,
std::placeholders::_1, bssid, wpa_s->disconnect_reason < 0,
static_cast<ISupplicantStaIfaceCallback::ReasonCode>(
- wpa_s->disconnect_reason)));
+ abs(wpa_s->disconnect_reason))));
}
/**