Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7ed5ae3 authored by Jimmy Chen's avatar Jimmy Chen
Browse files

wifi: new state change HAL callback with current used key management mask

Bug: 230766005
Test: atest vts
Change-Id: I9a9d85df53fe615f89a448f8ece16c6cbfbf6dee
parent 3039046f
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -63,4 +63,5 @@ interface ISupplicantStaIfaceCallback {
  oneway void onWpsEventSuccess();
  oneway void onWpsEventSuccess();
  oneway void onQosPolicyReset();
  oneway void onQosPolicyReset();
  oneway void onQosPolicyRequest(in int qosPolicyRequestId, in android.hardware.wifi.supplicant.QosPolicyData[] qosPolicyData);
  oneway void onQosPolicyRequest(in int qosPolicyRequestId, in android.hardware.wifi.supplicant.QosPolicyData[] qosPolicyData);
  oneway void onStateChangedWithAkm(in android.hardware.wifi.supplicant.StaIfaceCallbackState newState, in byte[] bssid, in int id, in byte[] ssid, in boolean filsHlpSent, in android.hardware.wifi.supplicant.KeyMgmtMask keyMgmtMask);
}
}
+26 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ import android.hardware.wifi.supplicant.DppEventType;
import android.hardware.wifi.supplicant.DppFailureCode;
import android.hardware.wifi.supplicant.DppFailureCode;
import android.hardware.wifi.supplicant.DppProgressCode;
import android.hardware.wifi.supplicant.DppProgressCode;
import android.hardware.wifi.supplicant.Hs20AnqpData;
import android.hardware.wifi.supplicant.Hs20AnqpData;
import android.hardware.wifi.supplicant.KeyMgmtMask;
import android.hardware.wifi.supplicant.OsuMethod;
import android.hardware.wifi.supplicant.OsuMethod;
import android.hardware.wifi.supplicant.QosPolicyData;
import android.hardware.wifi.supplicant.QosPolicyData;
import android.hardware.wifi.supplicant.StaIfaceCallbackState;
import android.hardware.wifi.supplicant.StaIfaceCallbackState;
@@ -252,6 +253,8 @@ oneway interface ISupplicantStaIfaceCallback {
     * event is triggered by a particular network, the |SupplicantNetworkId|,
     * event is triggered by a particular network, the |SupplicantNetworkId|,
     * |ssid|, |bssid| parameters must indicate the parameters of the network/AP
     * |ssid|, |bssid| parameters must indicate the parameters of the network/AP
     * which caused this state transition.
     * which caused this state transition.
     * <p>
     * This callback is deprecated from AIDL v2, newer HAL should call onStateChangedWithAkm().
     *
     *
     * @param newState New State of the interface. This must be one of the |State|
     * @param newState New State of the interface. This must be one of the |State|
     *        values above.
     *        values above.
@@ -303,4 +306,27 @@ oneway interface ISupplicantStaIfaceCallback {
     * @param qosPolicyData QoS policies info requested by the AP.
     * @param qosPolicyData QoS policies info requested by the AP.
     */
     */
    void onQosPolicyRequest(in int qosPolicyRequestId, in QosPolicyData[] qosPolicyData);
    void onQosPolicyRequest(in int qosPolicyRequestId, in QosPolicyData[] qosPolicyData);

    /**
     * Used to indicate a state change event on this particular iface. If this
     * event is triggered by a particular network, the |id|,
     * |ssid|, |bssid| parameters must indicate the parameters of the network/AP
     * which caused this state transition.
     *
     * @param newState New State of the interface. This must be one of the
     *        |StaIfaceCallbackState| values above.
     * @param bssid BSSID of the corresponding AP which caused this state
     *        change event. This must be zero'ed if this event is not
     *        specific to a particular network.
     * @param id ID of the corresponding network which caused this
     *        state change event. This must be invalid (-1) if this
     *        event is not specific to a particular network.
     * @param ssid SSID of the corresponding network which caused this state
     *        change event. This must be empty if this event is not specific
     *        to a particular network.
     * @param filsHlpSent Whether FILS HLP IEs were included in this association.
     * @param keyMgmtMask current used key mgmt mask.
     */
    void onStateChangedWithAkm(in StaIfaceCallbackState newState, in byte[] bssid, in int id,
            in byte[] ssid, in boolean filsHlpSent, in KeyMgmtMask keyMgmtMask);
}
}
+7 −0
Original line number Original line Diff line number Diff line
@@ -206,6 +206,13 @@ class SupplicantStaIfaceCallback : public BnSupplicantStaIfaceCallback {
                                      QosPolicyData /* qosPolicyData */>&) override {
                                      QosPolicyData /* qosPolicyData */>&) override {
        return ndk::ScopedAStatus::ok();
        return ndk::ScopedAStatus::ok();
    }
    }
    ::ndk::ScopedAStatus onStateChangedWithAkm(
            ::aidl::android::hardware::wifi::supplicant::StaIfaceCallbackState /* newState */,
            const std::vector<uint8_t>& /* bssid */, int32_t /* id */,
            const std::vector<uint8_t>& /* ssid */, bool /* filsHlpSent */,
            ::aidl::android::hardware::wifi::supplicant::KeyMgmtMask /* keyMgmtMask*/) override {
        return ndk::ScopedAStatus::ok();
    }
};
};


class SupplicantStaIfaceAidlTest : public testing::TestWithParam<std::string> {
class SupplicantStaIfaceAidlTest : public testing::TestWithParam<std::string> {