See lines 32 and 33 in /etc/init.d/webif
[ -z "$device_name" ] && [ -f "/proc/diag/model" ] && device_name=$(cat "/proc/diag/model")
[ -z "$device_name" ] && [ -f "/proc/sys/dev/wifi0/dev_name" ] && device_name=$(cat "/proc/sys/dev/wifi0/dev_name")
The above code will grab the model name if it is set by openwrt. In the case of the nanostation line 33 would have the model name.