This paper describes a dynamic service differentiation scheme based on access category (AC)'s traffic flow for QoS provisioning in the IEEE 802.11 wireless local area network (WLAN). The proposed scheme adjusts contention window sizes by considering the contributions of each traffic instead of each node on the network contention rate. There have been research efforts to improve IEEE 802.11 EDCF. However, these approaches have some limitations in that they do not consider that how much each AC traffic affects the packet collision rate. We propose a novel scheme based on traffic flow named T-EDCF. The difference between T-EDCF and existing schemes is that the former considers traffic categories ' effects on the throughput, jitter, and delay of a node. When there are a lot of flow and nodes in WLAN, T-EDCF outperforms other schemes proposed for enhancing the IEEE 802.11e.