hostapd: Fill in phyname automatically
If per-BSS configuration enabling did not provide a phy name, iface->phy was left empty. It can be helpful to set this up automatically, so fill that when initializing the interface. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
5ae6449ca2
commit
2db938e8de
2 changed files with 17 additions and 1 deletions
|
@ -965,6 +965,14 @@ static int setup_interface(struct hostapd_iface *iface)
|
|||
struct hostapd_data *hapd = iface->bss[0];
|
||||
size_t i;
|
||||
|
||||
if (!iface->phy[0]) {
|
||||
const char *phy = hostapd_drv_get_radio_name(hapd);
|
||||
if (phy) {
|
||||
wpa_printf(MSG_DEBUG, "phy: %s", phy);
|
||||
os_strlcpy(iface->phy, phy, sizeof(iface->phy));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure that all BSSes get configured with a pointer to the same
|
||||
* driver interface.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue