IEEE 802.11s-based infrastructure Wireless Mesh Networks (iWMNs) are envisaged as a promising solution to provide ubiquitous wireless Internet access. The limited network capacity is a problem mainly caused by the medium contention between mesh users and the mesh access points (MAPs), which gets worst when the mesh clients employ the Transmission Control Protocol (TCP). To mitigate this problem, we use wireless network coding (WNC) in the MAPs. The aim of this proposal is to take advantage of the network topology around the MAPs, to alleviate the contention and maximize the use of the network capacity. We evaluate WNC when is used in MAPs. We model the formation of coding opportunities and, using computer simulations, we evaluate the formation of such coding opportunities. The results show that as the users density grows, the coding opportunities increase up to 70%; however, at the same time, the coding delay increments significantly. In order to reduce such delay, we propose to adaptively adjust the time that a packet can wait to catch a coding opportunity in an MAP. We assess the performance of moving-average estimation methods to forecast this adaptive sojourn time. We show that using moving-average estimation methods can significantly decrease the coding delay since they consider the traffic density conditions. A preliminary version of this paper appeared in IEEE AINA 2014, May 13-16, Victoria, Canada [44]. This version includes detailed information about the wireless network coding technique, its operation requirements, examples illustrating the benefits of this novel routing technique, and new simulation results.