2 * hostapd - driver interface definition
3 * Copyright (c) 2002-2007, Jouni Malinen <j@w1.fi>
4 * Copyright (c) 2007-2008, Intel Corporation
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * Alternatively, this software may be distributed under the terms of BSD
13 * See README and COPYING for more details.
19 struct hostapd_sta_add_params {
24 size_t supp_rates_len;
27 const struct ht_cap_ie *ht_capabilities;
30 enum hostapd_driver_if_type {
31 HOSTAPD_IF_VLAN, HOSTAPD_IF_WDS
34 struct wpa_driver_ops {
35 const char *name; /* as appears in the config file */
37 void * (*init)(struct hostapd_data *hapd);
38 void * (*init_bssid)(struct hostapd_data *hapd, const u8 *bssid);
39 void (*deinit)(void *priv);
41 int (*wireless_event_init)(void *priv);
42 void (*wireless_event_deinit)(void *priv);
45 * set_8021x - enable/disable IEEE 802.1X support
46 * @ifname: Interface name (for multi-SSID/VLAN support)
47 * @priv: driver private data
48 * @enabled: 1 = enable, 0 = disable
50 * Returns: 0 on success, -1 on failure
52 * Configure the kernel driver to enable/disable 802.1X support.
53 * This may be an empty function if 802.1X support is always enabled.
55 int (*set_ieee8021x)(const char *ifname, void *priv, int enabled);
58 * set_privacy - enable/disable privacy
59 * @priv: driver private data
60 * @enabled: 1 = privacy enabled, 0 = disabled
62 * Return: 0 on success, -1 on failure
66 int (*set_privacy)(const char *ifname, void *priv, int enabled);
68 int (*set_encryption)(const char *ifname, void *priv, const char *alg,
69 const u8 *addr, int idx,
70 const u8 *key, size_t key_len, int txkey);
71 int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr,
73 int (*get_seqnum_igtk)(const char *ifname, void *priv, const u8 *addr,
75 int (*flush)(void *priv);
76 int (*set_generic_elem)(const char *ifname, void *priv, const u8 *elem,
79 int (*read_sta_data)(void *priv, struct hostap_sta_driver_data *data,
81 int (*send_eapol)(void *priv, const u8 *addr, const u8 *data,
82 size_t data_len, int encrypt, const u8 *own_addr);
83 int (*sta_deauth)(void *priv, const u8 *addr, int reason);
84 int (*sta_disassoc)(void *priv, const u8 *addr, int reason);
85 int (*sta_remove)(void *priv, const u8 *addr);
86 int (*get_ssid)(const char *ifname, void *priv, u8 *buf, int len);
87 int (*set_ssid)(const char *ifname, void *priv, const u8 *buf,
89 int (*set_countermeasures)(void *priv, int enabled);
90 int (*send_mgmt_frame)(void *priv, const void *msg, size_t len,
92 int (*set_assoc_ap)(void *priv, const u8 *addr);
93 /* note: sta_add() is deprecated; use sta_add2() instead */
94 int (*sta_add)(const char *ifname, void *priv, const u8 *addr, u16 aid,
95 u16 capability, u8 *supp_rates, size_t supp_rates_len,
96 int flags, u16 listen_interval);
97 int (*sta_add2)(const char *ifname, void *priv,
98 struct hostapd_sta_add_params *params);
99 int (*get_inact_sec)(void *priv, const u8 *addr);
100 int (*sta_clear_stats)(void *priv, const u8 *addr);
102 int (*set_freq)(void *priv, int mode, int freq);
103 int (*set_rts)(void *priv, int rts);
104 int (*get_rts)(void *priv, int *rts);
105 int (*set_frag)(void *priv, int frag);
106 int (*get_frag)(void *priv, int *frag);
107 int (*set_retry)(void *priv, int short_retry, int long_retry);
108 int (*get_retry)(void *priv, int *short_retry, int *long_retry);
110 int (*sta_set_flags)(void *priv, const u8 *addr,
111 int total_flags, int flags_or, int flags_and);
112 int (*set_rate_sets)(void *priv, int *supp_rates, int *basic_rates,
114 int (*set_regulatory_domain)(void *priv, unsigned int rd);
115 int (*set_country)(void *priv, const char *country);
116 int (*set_ieee80211d)(void *priv, int enabled);
117 int (*set_beacon)(const char *ifname, void *priv,
118 u8 *head, size_t head_len,
119 u8 *tail, size_t tail_len);
121 /* Configure internal bridge:
122 * 0 = disabled, i.e., client separation is enabled (no bridging of
123 * packets between associated STAs
124 * 1 = enabled, i.e., bridge packets between associated STAs (default)
126 int (*set_internal_bridge)(void *priv, int value);
127 int (*set_beacon_int)(void *priv, int value);
128 int (*set_dtim_period)(const char *ifname, void *priv, int value);
129 /* Configure broadcast SSID mode:
130 * 0 = include SSID in Beacon frames and reply to Probe Request frames
131 * that use broadcast SSID
132 * 1 = hide SSID from Beacon frames and ignore Probe Request frames for
135 int (*set_broadcast_ssid)(void *priv, int value);
136 int (*set_cts_protect)(void *priv, int value);
137 int (*set_key_tx_rx_threshold)(void *priv, int value);
138 int (*set_preamble)(void *priv, int value);
139 int (*set_short_slot_time)(void *priv, int value);
140 int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
141 int cw_max, int burst_time);
142 int (*bss_add)(void *priv, const char *ifname, const u8 *bssid);
143 int (*bss_remove)(void *priv, const char *ifname);
144 int (*valid_bss_mask)(void *priv, const u8 *addr, const u8 *mask);
145 int (*passive_scan)(void *priv, int now, int our_mode_only,
146 int interval, int _listen, int *channel,
148 struct hostapd_hw_modes * (*get_hw_feature_data)(void *priv,
151 int (*if_add)(const char *iface, void *priv,
152 enum hostapd_driver_if_type type, char *ifname,
154 int (*if_update)(void *priv, enum hostapd_driver_if_type type,
155 char *ifname, const u8 *addr);
156 int (*if_remove)(void *priv, enum hostapd_driver_if_type type,
157 const char *ifname, const u8 *addr);
158 int (*set_sta_vlan)(void *priv, const u8 *addr, const char *ifname,
161 * commit - Optional commit changes handler
162 * @priv: driver private data
163 * Returns: 0 on success, -1 on failure
165 * This optional handler function can be registered if the driver
166 * interface implementation needs to commit changes (e.g., by setting
167 * network interface up) at the end of initial configuration. If set,
168 * this handler will be called after initial setup has been completed.
170 int (*commit)(void *priv);
172 int (*send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto,
173 const u8 *data, size_t data_len);
175 int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted,
176 u32 session_timeout);
177 int (*set_radius_acl_expire)(void *priv, const u8 *mac);
179 int (*set_ht_capability)(const char *ifname, void *priv,
180 const u8 *data, size_t data_len);
181 int (*set_ht_operation)(const char *ifname, void *priv,
182 const u8 *data, size_t data_len);
184 int (*set_wps_beacon_ie)(const char *ifname, void *priv,
185 const u8 *ie, size_t len);
186 int (*set_wps_probe_resp_ie)(const char *ifname, void *priv,
187 const u8 *ie, size_t len);
191 hostapd_driver_init(struct hostapd_data *hapd)
193 if (hapd->driver == NULL || hapd->driver->init == NULL)
195 return hapd->driver->init(hapd);
199 hostapd_driver_init_bssid(struct hostapd_data *hapd, const u8 *bssid)
201 if (hapd->driver == NULL || hapd->driver->init_bssid == NULL)
203 return hapd->driver->init_bssid(hapd, bssid);
207 hostapd_driver_deinit(struct hostapd_data *hapd)
209 if (hapd->driver == NULL || hapd->driver->deinit == NULL)
211 hapd->driver->deinit(hapd->drv_priv);
215 hostapd_wireless_event_init(struct hostapd_data *hapd)
217 if (hapd->driver == NULL ||
218 hapd->driver->wireless_event_init == NULL)
220 return hapd->driver->wireless_event_init(hapd->drv_priv);
224 hostapd_wireless_event_deinit(struct hostapd_data *hapd)
226 if (hapd->driver == NULL ||
227 hapd->driver->wireless_event_deinit == NULL)
229 hapd->driver->wireless_event_deinit(hapd->drv_priv);
233 hostapd_set_ieee8021x(const char *ifname, struct hostapd_data *hapd,
236 if (hapd->driver == NULL || hapd->driver->set_ieee8021x == NULL)
238 return hapd->driver->set_ieee8021x(ifname, hapd->drv_priv, enabled);
242 hostapd_set_privacy(struct hostapd_data *hapd, int enabled)
244 if (hapd->driver == NULL || hapd->driver->set_privacy == NULL)
246 return hapd->driver->set_privacy(hapd->conf->iface, hapd->drv_priv,
251 hostapd_set_encryption(const char *ifname, struct hostapd_data *hapd,
252 const char *alg, const u8 *addr, int idx,
253 u8 *key, size_t key_len, int txkey)
255 if (hapd->driver == NULL || hapd->driver->set_encryption == NULL)
257 return hapd->driver->set_encryption(ifname, hapd->drv_priv, alg, addr,
258 idx, key, key_len, txkey);
262 hostapd_get_seqnum(const char *ifname, struct hostapd_data *hapd,
263 const u8 *addr, int idx, u8 *seq)
265 if (hapd->driver == NULL || hapd->driver->get_seqnum == NULL)
267 return hapd->driver->get_seqnum(ifname, hapd->drv_priv, addr, idx,
272 hostapd_get_seqnum_igtk(const char *ifname, struct hostapd_data *hapd,
273 const u8 *addr, int idx, u8 *seq)
275 if (hapd->driver == NULL || hapd->driver->get_seqnum_igtk == NULL)
277 return hapd->driver->get_seqnum_igtk(ifname, hapd->drv_priv, addr, idx,
282 hostapd_flush(struct hostapd_data *hapd)
284 if (hapd->driver == NULL || hapd->driver->flush == NULL)
286 return hapd->driver->flush(hapd->drv_priv);
290 hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
293 if (hapd->driver == NULL || hapd->driver->set_generic_elem == NULL)
295 return hapd->driver->set_generic_elem(hapd->conf->iface,
296 hapd->drv_priv, elem, elem_len);
300 hostapd_read_sta_data(struct hostapd_data *hapd,
301 struct hostap_sta_driver_data *data, const u8 *addr)
303 if (hapd->driver == NULL || hapd->driver->read_sta_data == NULL)
305 return hapd->driver->read_sta_data(hapd->drv_priv, data, addr);
309 hostapd_send_eapol(struct hostapd_data *hapd, const u8 *addr, const u8 *data,
310 size_t data_len, int encrypt)
312 if (hapd->driver == NULL || hapd->driver->send_eapol == NULL)
314 return hapd->driver->send_eapol(hapd->drv_priv, addr, data, data_len,
315 encrypt, hapd->own_addr);
319 hostapd_sta_deauth(struct hostapd_data *hapd, const u8 *addr, int reason)
321 if (hapd->driver == NULL || hapd->driver->sta_deauth == NULL)
323 return hapd->driver->sta_deauth(hapd->drv_priv, addr, reason);
327 hostapd_sta_disassoc(struct hostapd_data *hapd, const u8 *addr, int reason)
329 if (hapd->driver == NULL || hapd->driver->sta_disassoc == NULL)
331 return hapd->driver->sta_disassoc(hapd->drv_priv, addr, reason);
335 hostapd_sta_remove(struct hostapd_data *hapd, const u8 *addr)
337 if (hapd->driver == NULL || hapd->driver->sta_remove == NULL)
339 return hapd->driver->sta_remove(hapd->drv_priv, addr);
343 hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len)
345 if (hapd->driver == NULL || hapd->driver->get_ssid == NULL)
347 return hapd->driver->get_ssid(hapd->conf->iface, hapd->drv_priv, buf,
352 hostapd_set_ssid(struct hostapd_data *hapd, const u8 *buf, size_t len)
354 if (hapd->driver == NULL || hapd->driver->set_ssid == NULL)
356 return hapd->driver->set_ssid(hapd->conf->iface, hapd->drv_priv, buf,
361 hostapd_send_mgmt_frame(struct hostapd_data *hapd, const void *msg, size_t len,
364 if (hapd->driver == NULL || hapd->driver->send_mgmt_frame == NULL)
366 return hapd->driver->send_mgmt_frame(hapd->drv_priv, msg, len, flags);
370 hostapd_set_assoc_ap(struct hostapd_data *hapd, const u8 *addr)
372 if (hapd->driver == NULL || hapd->driver->set_assoc_ap == NULL)
374 return hapd->driver->set_assoc_ap(hapd->drv_priv, addr);
378 hostapd_set_countermeasures(struct hostapd_data *hapd, int enabled)
380 if (hapd->driver == NULL || hapd->driver->set_countermeasures == NULL)
382 return hapd->driver->set_countermeasures(hapd->drv_priv, enabled);
386 hostapd_sta_add(const char *ifname, struct hostapd_data *hapd, const u8 *addr,
387 u16 aid, u16 capability, const u8 *supp_rates,
388 size_t supp_rates_len, int flags, u16 listen_interval,
389 const struct ht_cap_ie *ht_capabilities)
391 if (hapd->driver == NULL)
394 if (hapd->driver->sta_add2) {
395 struct hostapd_sta_add_params params;
396 os_memset(¶ms, 0, sizeof(params));
399 params.capability = capability;
400 params.supp_rates = supp_rates;
401 params.supp_rates_len = supp_rates_len;
402 params.flags = flags;
403 params.listen_interval = listen_interval;
404 params.ht_capabilities = ht_capabilities;
405 return hapd->driver->sta_add2(ifname, hapd->drv_priv, ¶ms);
408 if (hapd->driver->sta_add == NULL)
410 return hapd->driver->sta_add(ifname, hapd->drv_priv, addr, aid,
411 capability, (u8 *) supp_rates,
413 flags, listen_interval);
417 hostapd_get_inact_sec(struct hostapd_data *hapd, const u8 *addr)
419 if (hapd->driver == NULL || hapd->driver->get_inact_sec == NULL)
421 return hapd->driver->get_inact_sec(hapd->drv_priv, addr);
425 hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq)
427 if (hapd->driver == NULL || hapd->driver->set_freq == NULL)
429 return hapd->driver->set_freq(hapd->drv_priv, mode, freq);
433 hostapd_set_rts(struct hostapd_data *hapd, int rts)
435 if (hapd->driver == NULL || hapd->driver->set_rts == NULL)
437 return hapd->driver->set_rts(hapd->drv_priv, rts);
441 hostapd_get_rts(struct hostapd_data *hapd, int *rts)
443 if (hapd->driver == NULL || hapd->driver->get_rts == NULL)
445 return hapd->driver->get_rts(hapd->drv_priv, rts);
449 hostapd_set_frag(struct hostapd_data *hapd, int frag)
451 if (hapd->driver == NULL || hapd->driver->set_frag == NULL)
453 return hapd->driver->set_frag(hapd->drv_priv, frag);
457 hostapd_get_frag(struct hostapd_data *hapd, int *frag)
459 if (hapd->driver == NULL || hapd->driver->get_frag == NULL)
461 return hapd->driver->get_frag(hapd->drv_priv, frag);
465 hostapd_set_retry(struct hostapd_data *hapd, int short_retry, int long_retry)
467 if (hapd->driver == NULL || hapd->driver->set_retry == NULL)
469 return hapd->driver->set_retry(hapd->drv_priv, short_retry,
474 hostapd_get_retry(struct hostapd_data *hapd, int *short_retry, int *long_retry)
476 if (hapd->driver == NULL || hapd->driver->get_retry == NULL)
478 return hapd->driver->get_retry(hapd->drv_priv, short_retry,
483 hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr,
484 int total_flags, int flags_or, int flags_and)
486 if (hapd->driver == NULL || hapd->driver->sta_set_flags == NULL)
488 return hapd->driver->sta_set_flags(hapd->drv_priv, addr, total_flags,
489 flags_or, flags_and);
493 hostapd_set_rate_sets(struct hostapd_data *hapd, int *supp_rates,
494 int *basic_rates, int mode)
496 if (hapd->driver == NULL || hapd->driver->set_rate_sets == NULL)
498 return hapd->driver->set_rate_sets(hapd->drv_priv, supp_rates,
503 hostapd_set_regulatory_domain(struct hostapd_data *hapd, unsigned int rd)
505 if (hapd->driver == NULL ||
506 hapd->driver->set_regulatory_domain == NULL)
508 return hapd->driver->set_regulatory_domain(hapd->drv_priv, rd);
512 hostapd_set_country(struct hostapd_data *hapd, const char *country)
514 if (hapd->driver == NULL ||
515 hapd->driver->set_country == NULL)
517 return hapd->driver->set_country(hapd->drv_priv, country);
521 hostapd_set_ieee80211d(struct hostapd_data *hapd, int enabled)
523 if (hapd->driver == NULL ||
524 hapd->driver->set_ieee80211d == NULL)
526 return hapd->driver->set_ieee80211d(hapd->drv_priv, enabled);
530 hostapd_sta_clear_stats(struct hostapd_data *hapd, const u8 *addr)
532 if (hapd->driver == NULL || hapd->driver->sta_clear_stats == NULL)
534 return hapd->driver->sta_clear_stats(hapd->drv_priv, addr);
538 hostapd_set_beacon(const char *ifname, struct hostapd_data *hapd,
539 u8 *head, size_t head_len,
540 u8 *tail, size_t tail_len)
542 if (hapd->driver == NULL || hapd->driver->set_beacon == NULL)
544 return hapd->driver->set_beacon(ifname, hapd->drv_priv, head, head_len,
549 hostapd_set_internal_bridge(struct hostapd_data *hapd, int value)
551 if (hapd->driver == NULL || hapd->driver->set_internal_bridge == NULL)
553 return hapd->driver->set_internal_bridge(hapd->drv_priv, value);
557 hostapd_set_beacon_int(struct hostapd_data *hapd, int value)
559 if (hapd->driver == NULL || hapd->driver->set_beacon_int == NULL)
561 return hapd->driver->set_beacon_int(hapd->drv_priv, value);
565 hostapd_set_dtim_period(struct hostapd_data *hapd, int value)
567 if (hapd->driver == NULL || hapd->driver->set_dtim_period == NULL)
569 return hapd->driver->set_dtim_period(hapd->conf->iface, hapd->drv_priv,
574 hostapd_set_broadcast_ssid(struct hostapd_data *hapd, int value)
576 if (hapd->driver == NULL || hapd->driver->set_broadcast_ssid == NULL)
578 return hapd->driver->set_broadcast_ssid(hapd->drv_priv, value);
582 hostapd_set_cts_protect(struct hostapd_data *hapd, int value)
584 if (hapd->driver == NULL || hapd->driver->set_cts_protect == NULL)
586 return hapd->driver->set_cts_protect(hapd->drv_priv, value);
590 hostapd_set_key_tx_rx_threshold(struct hostapd_data *hapd, int value)
592 if (hapd->driver == NULL ||
593 hapd->driver->set_key_tx_rx_threshold == NULL)
595 return hapd->driver->set_key_tx_rx_threshold(hapd->drv_priv, value);
599 hostapd_set_preamble(struct hostapd_data *hapd, int value)
601 if (hapd->driver == NULL || hapd->driver->set_preamble == NULL)
603 return hapd->driver->set_preamble(hapd->drv_priv, value);
607 hostapd_set_short_slot_time(struct hostapd_data *hapd, int value)
609 if (hapd->driver == NULL || hapd->driver->set_short_slot_time == NULL)
611 return hapd->driver->set_short_slot_time(hapd->drv_priv, value);
615 hostapd_set_tx_queue_params(struct hostapd_data *hapd, int queue, int aifs,
616 int cw_min, int cw_max, int burst_time)
618 if (hapd->driver == NULL || hapd->driver->set_tx_queue_params == NULL)
620 return hapd->driver->set_tx_queue_params(hapd->drv_priv, queue, aifs,
621 cw_min, cw_max, burst_time);
625 hostapd_bss_add(struct hostapd_data *hapd, const char *ifname, const u8 *bssid)
627 if (hapd->driver == NULL || hapd->driver->bss_add == NULL)
629 return hapd->driver->bss_add(hapd->drv_priv, ifname, bssid);
633 hostapd_bss_remove(struct hostapd_data *hapd, const char *ifname)
635 if (hapd->driver == NULL || hapd->driver->bss_remove == NULL)
637 return hapd->driver->bss_remove(hapd->drv_priv, ifname);
641 hostapd_valid_bss_mask(struct hostapd_data *hapd, const u8 *addr,
644 if (hapd->driver == NULL || hapd->driver->valid_bss_mask == NULL)
646 return hapd->driver->valid_bss_mask(hapd->drv_priv, addr, mask);
650 hostapd_if_add(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
651 char *ifname, const u8 *addr)
653 if (hapd->driver == NULL || hapd->driver->if_add == NULL)
655 return hapd->driver->if_add(hapd->conf->iface, hapd->drv_priv, type,
660 hostapd_if_update(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
661 char *ifname, const u8 *addr)
663 if (hapd->driver == NULL || hapd->driver->if_update == NULL)
665 return hapd->driver->if_update(hapd->drv_priv, type, ifname, addr);
669 hostapd_if_remove(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
670 char *ifname, const u8 *addr)
672 if (hapd->driver == NULL || hapd->driver->if_remove == NULL)
674 return hapd->driver->if_remove(hapd->drv_priv, type, ifname, addr);
678 hostapd_passive_scan(struct hostapd_data *hapd, int now, int our_mode_only,
679 int interval, int _listen, int *channel,
682 if (hapd->driver == NULL || hapd->driver->passive_scan == NULL)
684 return hapd->driver->passive_scan(hapd->drv_priv, now, our_mode_only,
685 interval, _listen, channel, last_rx);
688 static inline struct hostapd_hw_modes *
689 hostapd_get_hw_feature_data(struct hostapd_data *hapd, u16 *num_modes,
692 if (hapd->driver == NULL || hapd->driver->get_hw_feature_data == NULL)
694 return hapd->driver->get_hw_feature_data(hapd->drv_priv, num_modes,
699 hostapd_set_sta_vlan(const char *ifname, struct hostapd_data *hapd,
700 const u8 *addr, int vlan_id)
702 if (hapd->driver == NULL || hapd->driver->set_sta_vlan == NULL)
704 return hapd->driver->set_sta_vlan(hapd->drv_priv, addr, ifname, vlan_id);
708 hostapd_driver_commit(struct hostapd_data *hapd)
710 if (hapd->driver == NULL || hapd->driver->commit == NULL)
712 return hapd->driver->commit(hapd->drv_priv);
716 hostapd_set_radius_acl_auth(struct hostapd_data *hapd, const u8 *mac,
717 int accepted, u32 session_timeout)
719 if (hapd->driver == NULL || hapd->driver->set_radius_acl_auth == NULL)
721 return hapd->driver->set_radius_acl_auth(hapd->drv_priv, mac, accepted,
726 hostapd_set_radius_acl_expire(struct hostapd_data *hapd, const u8 *mac)
728 if (hapd->driver == NULL ||
729 hapd->driver->set_radius_acl_expire == NULL)
731 return hapd->driver->set_radius_acl_expire(hapd->drv_priv, mac);
734 #ifdef CONFIG_IEEE80211N
736 hostapd_set_ht_capability(const char *ifname, struct hostapd_data *hapd,
739 if (hapd->driver == NULL || hapd->driver->set_ht_capability == NULL ||
742 return hapd->driver->set_ht_capability(
743 ifname, hapd->drv_priv, ht_cap,
744 sizeof(struct ieee80211_ht_capability));
748 hostapd_set_ht_operation(const char *ifname, struct hostapd_data *hapd,
749 const u8 *ht_operation)
751 if (hapd->driver == NULL || hapd->driver->set_ht_operation == NULL ||
752 ht_operation == NULL)
754 return hapd->driver->set_ht_operation(
755 ifname, hapd->drv_priv, ht_operation,
756 sizeof(struct ieee80211_ht_operation));
758 #endif /* CONFIG_IEEE80211N */
761 hostapd_drv_none(struct hostapd_data *hapd)
763 return hapd->driver && os_strcmp(hapd->driver->name, "none") == 0;
767 hostapd_set_wps_beacon_ie(struct hostapd_data *hapd, const u8 *ie, size_t len)
769 if (hapd->driver == NULL || hapd->driver->set_wps_beacon_ie == NULL)
771 return hapd->driver->set_wps_beacon_ie(hapd->conf->iface,
772 hapd->drv_priv, ie, len);
776 hostapd_set_wps_probe_resp_ie(struct hostapd_data *hapd, const u8 *ie,
779 if (hapd->driver == NULL ||
780 hapd->driver->set_wps_probe_resp_ie == NULL)
782 return hapd->driver->set_wps_probe_resp_ie(hapd->conf->iface,
783 hapd->drv_priv, ie, len);
786 #endif /* DRIVER_H */