Did the source code come from the official OpenWrt repos?
Yeah, that's why we said that you can't just migrate your old config files.
After a reset to defaults, what do you see in your /etc/config/wireless file? Did you make modifications to the underlying code that handles wifi or the drivers for your wifi chipset?
Not using Luci is a requirement. That's all I can say.
Regarding the subject of this post, adding the ifname with the value wlan0 in the wifi-device configuration solved the problem.
My overal problem was not solved yet, but I am collecting more information and probably I will need to create other topics. I've made one step forward with your help.