OpenWrt Forum Archive

Topic: wifi_* or wl_* ?

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

my "nvram show" gives wl_* instead of wifi_*, would this affect the init.d script ? I believe that this is in general not used(as it is bridged to the lan interface). Just FYI.

Oh, I have a V2 with 2.02 firmware.

EDIT: I have briefly gone through wlconf.c in the source and am pretty sure it is wl_*, so I would suggest that  the FAQ been revised, as well as the init script. Since the actual interface is read from /proc/net/wireless, it doesn't really matter but can be confusing as there is an "ifup wifi".

Wrong.

We have a set of variables that include *_ifname that are used to control the generic network settings (ip, netmask, gateway .. etc). The lan_* variables control the settings for the lan interfaces and the wan_* variables control the wan interface.

The default is to brige the wireless interface with the lan, but what happens if you don't want the wireless on the same subnet as the lan? Obviously you have to remove it from the lan group, but where do you put it? This prompted a wifi group of variables to be created. The wifi group acts just like any other interface group and is parsed by the S40network script. (The networking scripts can parse anything that matches the pattern of {name}_ifname, {name}_proto shown by the lan and wan variables)

Why did we create a new set of variables instead of simply using wl_* or wl0_* ?

The wl varaibles are parsed by wlconf and store settings specific to the lowlevel wireless layer (ssid, channel, wep key .. etc)

wl_* is the default settings for the wireless
wl0_* is the settings for the first (only) wireless interface

If a wl0_* variable doesn't exist, it will be created using the matching wl0_* variable. In other words, the wl_* variables are pretty much useless.

So, although we could have created more wl0_* variables and had a wl0 group in S40network, we decided it was best to reserve wl0* for the lowlevel wireless settings and create another set of variables for the generic network configuration.

thanks. That clear things up. So wifi_* is a openwrt thing and not a wrt54G thing.

The discussion might have continued from here.