It sounds like either your kernel or the driver for the wireless interface will only support the newer
cfg80211 configuration interface used by the
iw tool, not the older
wireless-extensions interface used by
Does your kernel configuration enable the
CONFIG_WIRELESS_EXT option, and/or the
CONFIG_CFG80211_WEXT option? The latter option will enable a compatibility layer that will allow old userspace programs like
iwconfig to access the configuration of newer-style drivers.
Note that when you use
ip link set wlan0 up or
ifconfig wlan0 up you'll be setting the administrative state of the interface, or basically the state the interface will want to be in. The
/sys/class/net/wlan0/operstate tells you about the operational state of the interface, i.e. what state the interface has actually managed to achieve.
For a wired interface, the operational state changes to
up basically reflects the state of the link LED of the interface: when the interface detects the link pulses from the other end (and successfully negotiates the connection speed and other parameters, if applicable), the link LED will light, and the operational state will change to
A wireless interface has no cable to plug in, so the equivalent task is associating with a wireless network (and completing any necessary authentication, if applicable). So you should first configure the wireless interface with a network with an ESSID and any necessary network passwords or authentication keys. If the wireless interface is out of range of the wireless AP or the authentication settings are not correct, the wireless interface won't be able to actually transfer packets - and that's what the operational state "down" means.