The data link layer provides node - to - node data transfer -- a link between two directly connected nodes. It detects and possibly corrects errors that may occur in the physical layer. It defines the protocol to establish and terminate a connection between two physically connected devices. It also defines the protocol for flow control between them.
which layer of the osi model is responsible for end-to-end data transmission and error recovery
The data link layer