When the network module was first introduced in the esp8266 port in
ee3fec3167 there was only one interface (STA)
and, to save flash, the WLAN object was aliased to the network module,
which had just static methods for WLAN operations. This was subsequently
changed in 9e8396accb when the AP interface
was introduced, and the WLAN object became a true class.
But, network.WLAN remained a function that returned either the STA or AP
object and was never upgraded to the type itself. This scheme was then
copied over to the esp32 port when it was first introduced.
This commit changes network.WLAN from a function to a reference to the WLAN
type. This makes it consistent with other ports and network objects, and
allows accessing constants of network.WLAN without creating an instance.
Signed-off-by: Damien George <damien@micropython.org>