Merge set_beacon driver_ops into a single one
Clean up driver interface by merging hostapd and wpa_supplicant specific set_beacon driver_ops into a single one. In addition, merge set_beacon_int into to the same operation.
This commit is contained in:
parent
224f7bda79
commit
5d67487244
8 changed files with 28 additions and 125 deletions
|
@ -196,20 +196,12 @@ static int ap_driver_set_freq(void *priv, struct hostapd_freq_params *freq)
|
|||
static int ap_driver_set_beacon(const char *iface, void *priv,
|
||||
const u8 *head, size_t head_len,
|
||||
const u8 *tail, size_t tail_len,
|
||||
int dtim_period)
|
||||
int dtim_period, int beacon_int)
|
||||
{
|
||||
struct ap_driver_data *drv = priv;
|
||||
struct wpa_supplicant *wpa_s = drv->hapd->iface->owner;
|
||||
return wpa_drv_set_beacon(wpa_s, head, head_len, tail, tail_len,
|
||||
dtim_period);
|
||||
}
|
||||
|
||||
|
||||
static int ap_driver_set_beacon_int(void *priv, int value)
|
||||
{
|
||||
struct ap_driver_data *drv = priv;
|
||||
struct wpa_supplicant *wpa_s = drv->hapd->iface->owner;
|
||||
return wpa_drv_set_beacon_int(wpa_s, value);
|
||||
dtim_period, beacon_int);
|
||||
}
|
||||
|
||||
|
||||
|
@ -282,8 +274,7 @@ struct wpa_driver_ops ap_driver_ops =
|
|||
.sta_add = ap_driver_sta_add,
|
||||
.get_inact_sec = ap_driver_get_inact_sec,
|
||||
.set_freq = ap_driver_set_freq,
|
||||
.hapd_set_beacon = ap_driver_set_beacon,
|
||||
.set_beacon_int = ap_driver_set_beacon_int,
|
||||
.set_beacon = ap_driver_set_beacon,
|
||||
.set_cts_protect = ap_driver_set_cts_protect,
|
||||
.set_preamble = ap_driver_set_preamble,
|
||||
.set_short_slot_time = ap_driver_set_short_slot_time,
|
||||
|
|
|
@ -381,20 +381,13 @@ static inline int wpa_drv_set_probe_req_ie(struct wpa_supplicant *wpa_s,
|
|||
static inline int wpa_drv_set_beacon(struct wpa_supplicant *wpa_s,
|
||||
const u8 *head, size_t head_len,
|
||||
const u8 *tail, size_t tail_len,
|
||||
int dtim_period)
|
||||
int dtim_period, int beacon_int)
|
||||
{
|
||||
if (wpa_s->driver->set_beacon)
|
||||
return wpa_s->driver->set_beacon(wpa_s->drv_priv, head,
|
||||
return wpa_s->driver->set_beacon(wpa_s->ifname,
|
||||
wpa_s->drv_priv, head,
|
||||
head_len, tail, tail_len,
|
||||
dtim_period);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline int wpa_drv_set_beacon_int(struct wpa_supplicant *wpa_s,
|
||||
int value)
|
||||
{
|
||||
if (wpa_s->driver->set_beacon_int)
|
||||
return wpa_s->driver->set_beacon_int(wpa_s->drv_priv, value);
|
||||
dtim_period, beacon_int);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue