Transmission opportunity and contention window are two important parameters in media access in IEEE 802. 11e-based networks. and determine how to access the channel, as well as the length of time the channel is used. In these networks, each wireless station determines its media access probability by adjusting its contention window size. After winning in the contention, with respect to the duration of its transmission opportunity, transmits its data packets without re-contention. In multi hop networks, because of long distances between the source nodes and the destination nodes, the middle nodes are used to relay the data. Therefore, the middle nodes, in their transmission and receiving range, see more nodes as neighboring nodes, which makes it possible to increase traffic intensity and higher collision rates than other nodes. In this paper, the length of the queue, data arrival rate and the amount media access delay are exploited in order to a dynamic setting of the transmission opportunity and contention window to reduce the rate of packet loss and end to end delay. Simulation results show the proposed method improves media access and reduce the amount of packet loss and delay.