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 struct hostapd_freq_params {
34 int sec_channel_offset; /* 0 = HT40 disabled, -1 = HT40 enabled,
35 * secondary channel below primary, 1 = HT40
36 * enabled, secondary channel above primary */
39 enum hostapd_driver_if_type {
40 HOSTAPD_IF_VLAN, HOSTAPD_IF_WDS
43 struct wpa_driver_ops {
44 const char *name; /* as appears in the config file */
46 void * (*init)(struct hostapd_data *hapd);
47 void * (*init_bssid)(struct hostapd_data *hapd, const u8 *bssid);
48 void (*deinit)(void *priv);
50 int (*wireless_event_init)(void *priv);
51 void (*wireless_event_deinit)(void *priv);
54 * set_8021x - enable/disable IEEE 802.1X support
55 * @ifname: Interface name (for multi-SSID/VLAN support)
56 * @priv: driver private data
57 * @enabled: 1 = enable, 0 = disable
59 * Returns: 0 on success, -1 on failure
61 * Configure the kernel driver to enable/disable 802.1X support.
62 * This may be an empty function if 802.1X support is always enabled.
64 int (*set_ieee8021x)(const char *ifname, void *priv, int enabled);
67 * set_privacy - enable/disable privacy
68 * @priv: driver private data
69 * @enabled: 1 = privacy enabled, 0 = disabled
71 * Return: 0 on success, -1 on failure
75 int (*set_privacy)(const char *ifname, void *priv, int enabled);
77 int (*set_encryption)(const char *ifname, void *priv, const char *alg,
78 const u8 *addr, int idx,
79 const u8 *key, size_t key_len, int txkey);
80 int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr,
82 int (*get_seqnum_igtk)(const char *ifname, void *priv, const u8 *addr,
84 int (*flush)(void *priv);
85 int (*set_generic_elem)(const char *ifname, void *priv, const u8 *elem,
88 int (*read_sta_data)(void *priv, struct hostap_sta_driver_data *data,
90 int (*send_eapol)(void *priv, const u8 *addr, const u8 *data,
91 size_t data_len, int encrypt, const u8 *own_addr);
92 int (*sta_deauth)(void *priv, const u8 *addr, int reason);
93 int (*sta_disassoc)(void *priv, const u8 *addr, int reason);
94 int (*sta_remove)(void *priv, const u8 *addr);
95 int (*get_ssid)(const char *ifname, void *priv, u8 *buf, int len);
96 int (*set_ssid)(const char *ifname, void *priv, const u8 *buf,
98 int (*set_countermeasures)(void *priv, int enabled);
99 int (*send_mgmt_frame)(void *priv, const void *msg, size_t len,
101 int (*set_assoc_ap)(void *priv, const u8 *addr);
102 /* note: sta_add() is deprecated; use sta_add2() instead */
103 int (*sta_add)(const char *ifname, void *priv, const u8 *addr, u16 aid,
104 u16 capability, u8 *supp_rates, size_t supp_rates_len,
105 int flags, u16 listen_interval);
106 int (*sta_add2)(const char *ifname, void *priv,
107 struct hostapd_sta_add_params *params);
108 int (*get_inact_sec)(void *priv, const u8 *addr);
109 int (*sta_clear_stats)(void *priv, const u8 *addr);
111 /* note: set_freq() is deprecated; use set_freq2() instead */
112 int (*set_freq)(void *priv, int mode, int freq);
113 int (*set_freq2)(void *priv, struct hostapd_freq_params *freq);
114 int (*set_rts)(void *priv, int rts);
115 int (*get_rts)(void *priv, int *rts);
116 int (*set_frag)(void *priv, int frag);
117 int (*get_frag)(void *priv, int *frag);
118 int (*set_retry)(void *priv, int short_retry, int long_retry);
119 int (*get_retry)(void *priv, int *short_retry, int *long_retry);
121 int (*sta_set_flags)(void *priv, const u8 *addr,
122 int total_flags, int flags_or, int flags_and);
123 int (*set_rate_sets)(void *priv, int *supp_rates, int *basic_rates,
125 int (*set_regulatory_domain)(void *priv, unsigned int rd);
126 int (*set_country)(void *priv, const char *country);
127 int (*set_ieee80211d)(void *priv, int enabled);
128 int (*set_beacon)(const char *ifname, void *priv,
129 u8 *head, size_t head_len,
130 u8 *tail, size_t tail_len);
132 /* Configure internal bridge:
133 * 0 = disabled, i.e., client separation is enabled (no bridging of
134 * packets between associated STAs
135 * 1 = enabled, i.e., bridge packets between associated STAs (default)
137 int (*set_internal_bridge)(void *priv, int value);
138 int (*set_beacon_int)(void *priv, int value);
139 int (*set_dtim_period)(const char *ifname, void *priv, int value);
140 /* Configure broadcast SSID mode:
141 * 0 = include SSID in Beacon frames and reply to Probe Request frames
142 * that use broadcast SSID
143 * 1 = hide SSID from Beacon frames and ignore Probe Request frames for
146 int (*set_broadcast_ssid)(void *priv, int value);
147 int (*set_cts_protect)(void *priv, int value);
148 int (*set_key_tx_rx_threshold)(void *priv, int value);
149 int (*set_preamble)(void *priv, int value);
150 int (*set_short_slot_time)(void *priv, int value);
151 int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
152 int cw_max, int burst_time);
153 int (*bss_add)(void *priv, const char *ifname, const u8 *bssid);
154 int (*bss_remove)(void *priv, const char *ifname);
155 int (*valid_bss_mask)(void *priv, const u8 *addr, const u8 *mask);
156 int (*passive_scan)(void *priv, int now, int our_mode_only,
157 int interval, int _listen, int *channel,
159 struct hostapd_hw_modes * (*get_hw_feature_data)(void *priv,
162 int (*if_add)(const char *iface, void *priv,
163 enum hostapd_driver_if_type type, char *ifname,
165 int (*if_update)(void *priv, enum hostapd_driver_if_type type,
166 char *ifname, const u8 *addr);
167 int (*if_remove)(void *priv, enum hostapd_driver_if_type type,
168 const char *ifname, const u8 *addr);
169 int (*set_sta_vlan)(void *priv, const u8 *addr, const char *ifname,
172 * commit - Optional commit changes handler
173 * @priv: driver private data
174 * Returns: 0 on success, -1 on failure
176 * This optional handler function can be registered if the driver
177 * interface implementation needs to commit changes (e.g., by setting
178 * network interface up) at the end of initial configuration. If set,
179 * this handler will be called after initial setup has been completed.
181 int (*commit)(void *priv);
183 int (*send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto,
184 const u8 *data, size_t data_len);
186 int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted,
187 u32 session_timeout);
188 int (*set_radius_acl_expire)(void *priv, const u8 *mac);
190 int (*set_ht_params)(const char *ifname, void *priv,
191 const u8 *ht_capab, size_t ht_capab_len,
192 const u8 *ht_oper, size_t ht_oper_len);
194 int (*set_wps_beacon_ie)(const char *ifname, void *priv,
195 const u8 *ie, size_t len);
196 int (*set_wps_probe_resp_ie)(const char *ifname, void *priv,
197 const u8 *ie, size_t len);
201 hostapd_driver_init(struct hostapd_data *hapd)
203 if (hapd->driver == NULL || hapd->driver->init == NULL)
205 return hapd->driver->init(hapd);
209 hostapd_driver_init_bssid(struct hostapd_data *hapd, const u8 *bssid)
211 if (hapd->driver == NULL || hapd->driver->init_bssid == NULL)
213 return hapd->driver->init_bssid(hapd, bssid);
217 hostapd_driver_deinit(struct hostapd_data *hapd)
219 if (hapd->driver == NULL || hapd->driver->deinit == NULL)
221 hapd->driver->deinit(hapd->drv_priv);
225 hostapd_wireless_event_init(struct hostapd_data *hapd)
227 if (hapd->driver == NULL ||
228 hapd->driver->wireless_event_init == NULL)
230 return hapd->driver->wireless_event_init(hapd->drv_priv);
234 hostapd_wireless_event_deinit(struct hostapd_data *hapd)
236 if (hapd->driver == NULL ||
237 hapd->driver->wireless_event_deinit == NULL)
239 hapd->driver->wireless_event_deinit(hapd->drv_priv);
243 hostapd_set_ieee8021x(const char *ifname, struct hostapd_data *hapd,
246 if (hapd->driver == NULL || hapd->driver->set_ieee8021x == NULL)
248 return hapd->driver->set_ieee8021x(ifname, hapd->drv_priv, enabled);
252 hostapd_set_privacy(struct hostapd_data *hapd, int enabled)
254 if (hapd->driver == NULL || hapd->driver->set_privacy == NULL)
256 return hapd->driver->set_privacy(hapd->conf->iface, hapd->drv_priv,
261 hostapd_set_encryption(const char *ifname, struct hostapd_data *hapd,
262 const char *alg, const u8 *addr, int idx,
263 u8 *key, size_t key_len, int txkey)
265 if (hapd->driver == NULL || hapd->driver->set_encryption == NULL)
267 return hapd->driver->set_encryption(ifname, hapd->drv_priv, alg, addr,
268 idx, key, key_len, txkey);
272 hostapd_get_seqnum(const char *ifname, struct hostapd_data *hapd,
273 const u8 *addr, int idx, u8 *seq)
275 if (hapd->driver == NULL || hapd->driver->get_seqnum == NULL)
277 return hapd->driver->get_seqnum(ifname, hapd->drv_priv, addr, idx,
282 hostapd_get_seqnum_igtk(const char *ifname, struct hostapd_data *hapd,
283 const u8 *addr, int idx, u8 *seq)
285 if (hapd->driver == NULL || hapd->driver->get_seqnum_igtk == NULL)
287 return hapd->driver->get_seqnum_igtk(ifname, hapd->drv_priv, addr, idx,
292 hostapd_flush(struct hostapd_data *hapd)
294 if (hapd->driver == NULL || hapd->driver->flush == NULL)
296 return hapd->driver->flush(hapd->drv_priv);
300 hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
303 if (hapd->driver == NULL || hapd->driver->set_generic_elem == NULL)
305 return hapd->driver->set_generic_elem(hapd->conf->iface,
306 hapd->drv_priv, elem, elem_len);
310 hostapd_read_sta_data(struct hostapd_data *hapd,
311 struct hostap_sta_driver_data *data, const u8 *addr)
313 if (hapd->driver == NULL || hapd->driver->read_sta_data == NULL)
315 return hapd->driver->read_sta_data(hapd->drv_priv, data, addr);
319 hostapd_send_eapol(struct hostapd_data *hapd, const u8 *addr, const u8 *data,
320 size_t data_len, int encrypt)
322 if (hapd->driver == NULL || hapd->driver->send_eapol == NULL)
324 return hapd->driver->send_eapol(hapd->drv_priv, addr, data, data_len,
325 encrypt, hapd->own_addr);
329 hostapd_sta_deauth(struct hostapd_data *hapd, const u8 *addr, int reason)
331 if (hapd->driver == NULL || hapd->driver->sta_deauth == NULL)
333 return hapd->driver->sta_deauth(hapd->drv_priv, addr, reason);
337 hostapd_sta_disassoc(struct hostapd_data *hapd, const u8 *addr, int reason)
339 if (hapd->driver == NULL || hapd->driver->sta_disassoc == NULL)
341 return hapd->driver->sta_disassoc(hapd->drv_priv, addr, reason);
345 hostapd_sta_remove(struct hostapd_data *hapd, const u8 *addr)
347 if (hapd->driver == NULL || hapd->driver->sta_remove == NULL)
349 return hapd->driver->sta_remove(hapd->drv_priv, addr);
353 hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len)
355 if (hapd->driver == NULL || hapd->driver->get_ssid == NULL)
357 return hapd->driver->get_ssid(hapd->conf->iface, hapd->drv_priv, buf,
362 hostapd_set_ssid(struct hostapd_data *hapd, const u8 *buf, size_t len)
364 if (hapd->driver == NULL || hapd->driver->set_ssid == NULL)
366 return hapd->driver->set_ssid(hapd->conf->iface, hapd->drv_priv, buf,
371 hostapd_send_mgmt_frame(struct hostapd_data *hapd, const void *msg, size_t len,
374 if (hapd->driver == NULL || hapd->driver->send_mgmt_frame == NULL)
376 return hapd->driver->send_mgmt_frame(hapd->drv_priv, msg, len, flags);
380 hostapd_set_assoc_ap(struct hostapd_data *hapd, const u8 *addr)
382 if (hapd->driver == NULL || hapd->driver->set_assoc_ap == NULL)
384 return hapd->driver->set_assoc_ap(hapd->drv_priv, addr);
388 hostapd_set_countermeasures(struct hostapd_data *hapd, int enabled)
390 if (hapd->driver == NULL || hapd->driver->set_countermeasures == NULL)
392 return hapd->driver->set_countermeasures(hapd->drv_priv, enabled);
396 hostapd_sta_add(const char *ifname, struct hostapd_data *hapd, const u8 *addr,
397 u16 aid, u16 capability, const u8 *supp_rates,
398 size_t supp_rates_len, int flags, u16 listen_interval,
399 const struct ht_cap_ie *ht_capabilities)
401 if (hapd->driver == NULL)
404 if (hapd->driver->sta_add2) {
405 struct hostapd_sta_add_params params;
406 os_memset(¶ms, 0, sizeof(params));
409 params.capability = capability;
410 params.supp_rates = supp_rates;
411 params.supp_rates_len = supp_rates_len;
412 params.flags = flags;
413 params.listen_interval = listen_interval;
414 params.ht_capabilities = ht_capabilities;
415 return hapd->driver->sta_add2(ifname, hapd->drv_priv, ¶ms);
418 if (hapd->driver->sta_add == NULL)
420 return hapd->driver->sta_add(ifname, hapd->drv_priv, addr, aid,
421 capability, (u8 *) supp_rates,
423 flags, listen_interval);
427 hostapd_get_inact_sec(struct hostapd_data *hapd, const u8 *addr)
429 if (hapd->driver == NULL || hapd->driver->get_inact_sec == NULL)
431 return hapd->driver->get_inact_sec(hapd->drv_priv, addr);
435 hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq, int ht_enabled,
436 int sec_channel_offset)
438 if (hapd->driver == NULL)
440 if (hapd->driver->set_freq2) {
441 struct hostapd_freq_params data;
442 os_memset(&data, 0, sizeof(data));
445 data.ht_enabled = ht_enabled;
446 data.sec_channel_offset = sec_channel_offset;
447 return hapd->driver->set_freq2(hapd->drv_priv, &data);
450 if (hapd->driver->set_freq == NULL)
452 return hapd->driver->set_freq(hapd->drv_priv, mode, freq);
456 hostapd_set_rts(struct hostapd_data *hapd, int rts)
458 if (hapd->driver == NULL || hapd->driver->set_rts == NULL)
460 return hapd->driver->set_rts(hapd->drv_priv, rts);
464 hostapd_get_rts(struct hostapd_data *hapd, int *rts)
466 if (hapd->driver == NULL || hapd->driver->get_rts == NULL)
468 return hapd->driver->get_rts(hapd->drv_priv, rts);
472 hostapd_set_frag(struct hostapd_data *hapd, int frag)
474 if (hapd->driver == NULL || hapd->driver->set_frag == NULL)
476 return hapd->driver->set_frag(hapd->drv_priv, frag);
480 hostapd_get_frag(struct hostapd_data *hapd, int *frag)
482 if (hapd->driver == NULL || hapd->driver->get_frag == NULL)
484 return hapd->driver->get_frag(hapd->drv_priv, frag);
488 hostapd_set_retry(struct hostapd_data *hapd, int short_retry, int long_retry)
490 if (hapd->driver == NULL || hapd->driver->set_retry == NULL)
492 return hapd->driver->set_retry(hapd->drv_priv, short_retry,
497 hostapd_get_retry(struct hostapd_data *hapd, int *short_retry, int *long_retry)
499 if (hapd->driver == NULL || hapd->driver->get_retry == NULL)
501 return hapd->driver->get_retry(hapd->drv_priv, short_retry,
506 hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr,
507 int total_flags, int flags_or, int flags_and)
509 if (hapd->driver == NULL || hapd->driver->sta_set_flags == NULL)
511 return hapd->driver->sta_set_flags(hapd->drv_priv, addr, total_flags,
512 flags_or, flags_and);
516 hostapd_set_rate_sets(struct hostapd_data *hapd, int *supp_rates,
517 int *basic_rates, int mode)
519 if (hapd->driver == NULL || hapd->driver->set_rate_sets == NULL)
521 return hapd->driver->set_rate_sets(hapd->drv_priv, supp_rates,
526 hostapd_set_regulatory_domain(struct hostapd_data *hapd, unsigned int rd)
528 if (hapd->driver == NULL ||
529 hapd->driver->set_regulatory_domain == NULL)
531 return hapd->driver->set_regulatory_domain(hapd->drv_priv, rd);
535 hostapd_set_country(struct hostapd_data *hapd, const char *country)
537 if (hapd->driver == NULL ||
538 hapd->driver->set_country == NULL)
540 return hapd->driver->set_country(hapd->drv_priv, country);
544 hostapd_set_ieee80211d(struct hostapd_data *hapd, int enabled)
546 if (hapd->driver == NULL ||
547 hapd->driver->set_ieee80211d == NULL)
549 return hapd->driver->set_ieee80211d(hapd->drv_priv, enabled);
553 hostapd_sta_clear_stats(struct hostapd_data *hapd, const u8 *addr)
555 if (hapd->driver == NULL || hapd->driver->sta_clear_stats == NULL)
557 return hapd->driver->sta_clear_stats(hapd->drv_priv, addr);
561 hostapd_set_beacon(const char *ifname, struct hostapd_data *hapd,
562 u8 *head, size_t head_len,
563 u8 *tail, size_t tail_len)
565 if (hapd->driver == NULL || hapd->driver->set_beacon == NULL)
567 return hapd->driver->set_beacon(ifname, hapd->drv_priv, head, head_len,
572 hostapd_set_internal_bridge(struct hostapd_data *hapd, int value)
574 if (hapd->driver == NULL || hapd->driver->set_internal_bridge == NULL)
576 return hapd->driver->set_internal_bridge(hapd->drv_priv, value);
580 hostapd_set_beacon_int(struct hostapd_data *hapd, int value)
582 if (hapd->driver == NULL || hapd->driver->set_beacon_int == NULL)
584 return hapd->driver->set_beacon_int(hapd->drv_priv, value);
588 hostapd_set_dtim_period(struct hostapd_data *hapd, int value)
590 if (hapd->driver == NULL || hapd->driver->set_dtim_period == NULL)
592 return hapd->driver->set_dtim_period(hapd->conf->iface, hapd->drv_priv,
597 hostapd_set_broadcast_ssid(struct hostapd_data *hapd, int value)
599 if (hapd->driver == NULL || hapd->driver->set_broadcast_ssid == NULL)
601 return hapd->driver->set_broadcast_ssid(hapd->drv_priv, value);
605 hostapd_set_cts_protect(struct hostapd_data *hapd, int value)
607 if (hapd->driver == NULL || hapd->driver->set_cts_protect == NULL)
609 return hapd->driver->set_cts_protect(hapd->drv_priv, value);
613 hostapd_set_key_tx_rx_threshold(struct hostapd_data *hapd, int value)
615 if (hapd->driver == NULL ||
616 hapd->driver->set_key_tx_rx_threshold == NULL)
618 return hapd->driver->set_key_tx_rx_threshold(hapd->drv_priv, value);
622 hostapd_set_preamble(struct hostapd_data *hapd, int value)
624 if (hapd->driver == NULL || hapd->driver->set_preamble == NULL)
626 return hapd->driver->set_preamble(hapd->drv_priv, value);
630 hostapd_set_short_slot_time(struct hostapd_data *hapd, int value)
632 if (hapd->driver == NULL || hapd->driver->set_short_slot_time == NULL)
634 return hapd->driver->set_short_slot_time(hapd->drv_priv, value);
638 hostapd_set_tx_queue_params(struct hostapd_data *hapd, int queue, int aifs,
639 int cw_min, int cw_max, int burst_time)
641 if (hapd->driver == NULL || hapd->driver->set_tx_queue_params == NULL)
643 return hapd->driver->set_tx_queue_params(hapd->drv_priv, queue, aifs,
644 cw_min, cw_max, burst_time);
648 hostapd_bss_add(struct hostapd_data *hapd, const char *ifname, const u8 *bssid)
650 if (hapd->driver == NULL || hapd->driver->bss_add == NULL)
652 return hapd->driver->bss_add(hapd->drv_priv, ifname, bssid);
656 hostapd_bss_remove(struct hostapd_data *hapd, const char *ifname)
658 if (hapd->driver == NULL || hapd->driver->bss_remove == NULL)
660 return hapd->driver->bss_remove(hapd->drv_priv, ifname);
664 hostapd_valid_bss_mask(struct hostapd_data *hapd, const u8 *addr,
667 if (hapd->driver == NULL || hapd->driver->valid_bss_mask == NULL)
669 return hapd->driver->valid_bss_mask(hapd->drv_priv, addr, mask);
673 hostapd_if_add(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
674 char *ifname, const u8 *addr)
676 if (hapd->driver == NULL || hapd->driver->if_add == NULL)
678 return hapd->driver->if_add(hapd->conf->iface, hapd->drv_priv, type,
683 hostapd_if_update(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
684 char *ifname, const u8 *addr)
686 if (hapd->driver == NULL || hapd->driver->if_update == NULL)
688 return hapd->driver->if_update(hapd->drv_priv, type, ifname, addr);
692 hostapd_if_remove(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
693 char *ifname, const u8 *addr)
695 if (hapd->driver == NULL || hapd->driver->if_remove == NULL)
697 return hapd->driver->if_remove(hapd->drv_priv, type, ifname, addr);
701 hostapd_passive_scan(struct hostapd_data *hapd, int now, int our_mode_only,
702 int interval, int _listen, int *channel,
705 if (hapd->driver == NULL || hapd->driver->passive_scan == NULL)
707 return hapd->driver->passive_scan(hapd->drv_priv, now, our_mode_only,
708 interval, _listen, channel, last_rx);
711 static inline struct hostapd_hw_modes *
712 hostapd_get_hw_feature_data(struct hostapd_data *hapd, u16 *num_modes,
715 if (hapd->driver == NULL || hapd->driver->get_hw_feature_data == NULL)
717 return hapd->driver->get_hw_feature_data(hapd->drv_priv, num_modes,
722 hostapd_set_sta_vlan(const char *ifname, struct hostapd_data *hapd,
723 const u8 *addr, int vlan_id)
725 if (hapd->driver == NULL || hapd->driver->set_sta_vlan == NULL)
727 return hapd->driver->set_sta_vlan(hapd->drv_priv, addr, ifname, vlan_id);
731 hostapd_driver_commit(struct hostapd_data *hapd)
733 if (hapd->driver == NULL || hapd->driver->commit == NULL)
735 return hapd->driver->commit(hapd->drv_priv);
739 hostapd_set_radius_acl_auth(struct hostapd_data *hapd, const u8 *mac,
740 int accepted, u32 session_timeout)
742 if (hapd->driver == NULL || hapd->driver->set_radius_acl_auth == NULL)
744 return hapd->driver->set_radius_acl_auth(hapd->drv_priv, mac, accepted,
749 hostapd_set_radius_acl_expire(struct hostapd_data *hapd, const u8 *mac)
751 if (hapd->driver == NULL ||
752 hapd->driver->set_radius_acl_expire == NULL)
754 return hapd->driver->set_radius_acl_expire(hapd->drv_priv, mac);
757 #ifdef CONFIG_IEEE80211N
759 hostapd_set_ht_params(const char *ifname, struct hostapd_data *hapd,
760 const u8 *ht_capab, size_t ht_capab_len,
761 const u8 *ht_oper, size_t ht_oper_len)
763 if (hapd->driver == NULL || hapd->driver->set_ht_params == NULL ||
764 ht_capab == NULL || ht_oper == NULL)
766 return hapd->driver->set_ht_params(
767 ifname, hapd->drv_priv, ht_capab, ht_capab_len,
768 ht_oper, ht_oper_len);
770 #endif /* CONFIG_IEEE80211N */
773 hostapd_drv_none(struct hostapd_data *hapd)
775 return hapd->driver && os_strcmp(hapd->driver->name, "none") == 0;
779 hostapd_set_wps_beacon_ie(struct hostapd_data *hapd, const u8 *ie, size_t len)
781 if (hapd->driver == NULL || hapd->driver->set_wps_beacon_ie == NULL)
783 return hapd->driver->set_wps_beacon_ie(hapd->conf->iface,
784 hapd->drv_priv, ie, len);
788 hostapd_set_wps_probe_resp_ie(struct hostapd_data *hapd, const u8 *ie,
791 if (hapd->driver == NULL ||
792 hapd->driver->set_wps_probe_resp_ie == NULL)
794 return hapd->driver->set_wps_probe_resp_ie(hapd->conf->iface,
795 hapd->drv_priv, ie, len);
798 #endif /* DRIVER_H */