L2CAP: Discard pending requests on link disconnect
Scenario: A connection request packet is admitted to link tx queue in L2CAP but before it could be transmitted (host busy), ACL link can get disconnected (idle timeout) and the link tx queue is not flushed during link disconnect handling. In such scenario, subsequent connection attempt by host is seen to fail. This is because host is found to send multiple connection requests (one connect request packet from the queue and a new connection request packet per new request). Remote accepts old connection request packet and waits for connection response from host. For next connection request seen by remote, remote responds with 'No PSM' resource error (as it already admitted one connection request and it is in progress). Here when the connection response arrives from remote, host ignores it because it sees packet id mismatch (host had sent old connection request first and later information request/response packets were exchanged. Remote had sent connection response copying stale packet id picked from old connection request). Drop queued packets as part of link disconnection handling. This was already done in BLE transport case and is now being done unconditionally. Fixes: 73050475 Test: back-to-back PAN connect-disconnect iterations amidst ongoing OPP file transfer and AV streaming Change-Id: I42cc7ae90cc1152f1781282698529fe50f0ebf89
Loading
Please register or sign in to comment