Skip to content

Commit

Permalink
Enable MRP in WiFi-PAF commissioning (project-chip#35500)
Browse files Browse the repository at this point in the history
* Enable MRP in WiFi-PAF commissioning

Signed-off-by: Lo,Chin-Ran <[email protected]>

* Restyled by clang-format

---------

Signed-off-by: Lo,Chin-Ran <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
crlonxp and restyled-commits authored Oct 7, 2024
1 parent 45a68f8 commit 386816b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/transport/SecureSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ class SecureSession : public Session, public ReferenceCounted<SecureSession, Sec

bool IsCommissioningSession() const override;

bool AllowsMRP() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kUdp; }
bool AllowsMRP() const override
{
return ((GetPeerAddress().GetTransportType() == Transport::Type::kUdp) ||
(GetPeerAddress().GetTransportType() == Transport::Type::kWiFiPAF));
}

bool AllowsLargePayload() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kTcp; }

Expand Down
6 changes: 5 additions & 1 deletion src/transport/UnauthenticatedSessionTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ class UnauthenticatedSession : public Session, public ReferenceCounted<Unauthent
return Access::SubjectDescriptor(); // return an empty ISD for unauthenticated session.
}

bool AllowsMRP() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kUdp; }
bool AllowsMRP() const override
{
return ((GetPeerAddress().GetTransportType() == Transport::Type::kUdp) ||
(GetPeerAddress().GetTransportType() == Transport::Type::kWiFiPAF));
}

bool AllowsLargePayload() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kTcp; }

Expand Down

0 comments on commit 386816b

Please sign in to comment.