driver_nl80211: Fix initial iftype change
authorJouni Malinen <jouni.malinen@atheros.com>
Tue, 24 Mar 2009 18:50:40 +0000 (20:50 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 24 Mar 2009 18:50:40 +0000 (20:50 +0200)
commita87c9d9609c0585bb667e67f01589e4adf88c5d9
treeaf157a76d0b248e71e42ed627e5be4cc7689db5c
parent36b15723ca3966b5d9f14477e26d0351ba469ceb
driver_nl80211: Fix initial iftype change

Need to set drv->ifindex before calling set_mode(). In addition, set the
mode before setting the interface up to avoid having to set it down
again.

Add more useful error message on mode changes.
src/drivers/driver_nl80211.c