An Algorithm for Dynamic Priority Assignment in 802.11e WLAN MAC Protocols