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

Commit 189cf702 authored by Sunil Ravi's avatar Sunil Ravi
Browse files

Inform p2p framework about the channel change event

Added a callback function to indicate that the p2p
operating frequency has been changed.

Bug: 202758240
Test: vts test
Test: Manually triggered channel switch through hostapd command
    and verified the new frequency in logs.
Change-Id: I5814a108c77478cf96bc88f2d8fd8193bd8168be
parent 962deadf
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -50,4 +50,5 @@ interface ISupplicantP2pIfaceCallback {
  oneway void onServiceDiscoveryResponse(in byte[] srcAddress, in char updateIndicator, in byte[] tlvs);
  oneway void onServiceDiscoveryResponse(in byte[] srcAddress, in char updateIndicator, in byte[] tlvs);
  oneway void onStaAuthorized(in byte[] srcAddress, in byte[] p2pDeviceAddress);
  oneway void onStaAuthorized(in byte[] srcAddress, in byte[] p2pDeviceAddress);
  oneway void onStaDeauthorized(in byte[] srcAddress, in byte[] p2pDeviceAddress);
  oneway void onStaDeauthorized(in byte[] srcAddress, in byte[] p2pDeviceAddress);
  oneway void onGroupFrequencyChanged(in String groupIfname, in int frequency);
}
}
+8 −0
Original line number Original line Diff line number Diff line
@@ -205,4 +205,12 @@ interface ISupplicantP2pIfaceCallback {
     * @param p2pDeviceAddress P2P device address.
     * @param p2pDeviceAddress P2P device address.
     */
     */
    oneway void onStaDeauthorized(in byte[] srcAddress, in byte[] p2pDeviceAddress);
    oneway void onStaDeauthorized(in byte[] srcAddress, in byte[] p2pDeviceAddress);

    /**
     * Used to indicate that operating frequency has changed for this P2P group interface.
     *
     * @param groupIfName Interface name of the group. (For ex: p2p-p2p0-1)
     * @param frequency New operating frequency in MHz.
     */
    oneway void onGroupFrequencyChanged(in String groupIfname, in int frequency);
}
}
+4 −0
Original line number Original line Diff line number Diff line
@@ -159,6 +159,10 @@ class SupplicantP2pIfaceCallback : public BnSupplicantP2pIfaceCallback {
        const std::vector<uint8_t>& /* p2pDeviceAddress */) override {
        const std::vector<uint8_t>& /* p2pDeviceAddress */) override {
        return ndk::ScopedAStatus::ok();
        return ndk::ScopedAStatus::ok();
    }
    }
    ::ndk::ScopedAStatus onGroupFrequencyChanged(const std::string& /* groupIfname */,
                                                 int32_t /* frequency */) override {
        return ndk::ScopedAStatus::ok();
    }
};
};


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