The original version of the IEEE 802.11 standard is not able to provide the required Quality of Service (QoS) for real-time applications. The IEEE 802.11e amendment was developed to overcome this situation, introducing the Enhanced Distributed Channel Access (EDCA) as a new channel access method. This method makes it possible to prioritize the different types of traffic through a group of Medium Access Control (MAC) parameters. The most important role of these MAC parameters is played by the Arbitration Inter-Frame Space Number (AIFSN). Although the AIFSN can be modified during a transmission, the commercial Access Points (APs) only use the combination defined in the standard. Therefore, we propose a new adaptation scheme for network traffic priorities involving the construction of a J48 decision tree classifier with the main goal of enhancing the voice and video communications. This classifier calculates a new set of AIFSN values by taking into account the current network conditions, maintaining the interoperability with the legacy Distributed Coordination Function (DCF) applications. The results show that our proposal improves upon the voice+video performance results obtained by the AIFSN standard values by up to 20%. Furthermore, this scheme is fully compatible with the commercial network cards available on the market.