Replace set_beacon() driver op with set_ap()
This change is a first step in better supporting different driver architectures for AP mode operations with nl80211. This commit in itself does not add new functionality, but it makes it easier to add new AP mode parameters to address needs of drivers that have more of the MLME/SME in firmware or kernel.
This commit is contained in:
parent
5fb1a23252
commit
19c3b56685
6 changed files with 72 additions and 44 deletions
|
@ -398,6 +398,7 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd)
|
|||
u8 *pos, *tail, *tailpos;
|
||||
u16 capab_info;
|
||||
size_t head_len, tail_len;
|
||||
struct wpa_driver_ap_params params;
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
if ((hapd->conf->p2p & (P2P_ENABLED | P2P_GROUP_OWNER)) == P2P_ENABLED)
|
||||
|
@ -510,11 +511,15 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd)
|
|||
|
||||
tail_len = tailpos > tail ? tailpos - tail : 0;
|
||||
|
||||
if (hostapd_drv_set_beacon(hapd, (u8 *) head, head_len,
|
||||
tail, tail_len, hapd->conf->dtim_period,
|
||||
hapd->iconf->beacon_int))
|
||||
wpa_printf(MSG_ERROR, "Failed to set beacon head/tail or DTIM "
|
||||
"period");
|
||||
os_memset(¶ms, 0, sizeof(params));
|
||||
params.head = (u8 *) head;
|
||||
params.head_len = head_len;
|
||||
params.tail = tail;
|
||||
params.tail_len = tail_len;
|
||||
params.dtim_period = hapd->conf->dtim_period;
|
||||
params.beacon_int = hapd->iconf->beacon_int;
|
||||
if (hostapd_drv_set_ap(hapd, ¶ms))
|
||||
wpa_printf(MSG_ERROR, "Failed to set beacon parameters");
|
||||
|
||||
os_free(tail);
|
||||
os_free(head);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue