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 {
33 int sec_channel_offset; /* 0 = HT40 disabled, -1 = HT40 enabled,
34 * secondary channel below primary, 1 = HT40
35 * enabled, secondary channel above primary */
38 enum hostapd_driver_if_type {
39 HOSTAPD_IF_VLAN, HOSTAPD_IF_WDS
42 struct wpa_driver_ops {
43 const char *name; /* as appears in the config file */
45 void * (*init)(struct hostapd_data *hapd);
46 void * (*init_bssid)(struct hostapd_data *hapd, const u8 *bssid);
47 void (*deinit)(void *priv);
49 int (*wireless_event_init)(void *priv);
50 void (*wireless_event_deinit)(void *priv);
53 * set_8021x - enable/disable IEEE 802.1X support
54 * @ifname: Interface name (for multi-SSID/VLAN support)
55 * @priv: driver private data
56 * @enabled: 1 = enable, 0 = disable
58 * Returns: 0 on success, -1 on failure
60 * Configure the kernel driver to enable/disable 802.1X support.
61 * This may be an empty function if 802.1X support is always enabled.
63 int (*set_ieee8021x)(const char *ifname, void *priv, int enabled);
66 * set_privacy - enable/disable privacy
67 * @priv: driver private data
68 * @enabled: 1 = privacy enabled, 0 = disabled
70 * Return: 0 on success, -1 on failure
74 int (*set_privacy)(const char *ifname, void *priv, int enabled);
76 int (*set_encryption)(const char *ifname, void *priv, const char *alg,
77 const u8 *addr, int idx,
78 const u8 *key, size_t key_len, int txkey);
79 int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr,
81 int (*get_seqnum_igtk)(const char *ifname, void *priv, const u8 *addr,
83 int (*flush)(void *priv);
84 int (*set_generic_elem)(const char *ifname, void *priv, const u8 *elem,
87 int (*read_sta_data)(void *priv, struct hostap_sta_driver_data *data,
89 int (*send_eapol)(void *priv, const u8 *addr, const u8 *data,
90 size_t data_len, int encrypt, const u8 *own_addr);
91 int (*sta_deauth)(void *priv, const u8 *addr, int reason);
92 int (*sta_disassoc)(void *priv, const u8 *addr, int reason);
93 int (*sta_remove)(void *priv, const u8 *addr);
94 int (*get_ssid)(const char *ifname, void *priv, u8 *buf, int len);
95 int (*set_ssid)(const char *ifname, void *priv, const u8 *buf,
97 int (*set_countermeasures)(void *priv, int enabled);
98 int (*send_mgmt_frame)(void *priv, const void *msg, size_t len,
100 int (*set_assoc_ap)(void *priv, const u8 *addr);
101 /* note: sta_add() is deprecated; use sta_add2() instead */
102 int (*sta_add)(const char *ifname, void *priv, const u8 *addr, u16 aid,
103 u16 capability, u8 *supp_rates, size_t supp_rates_len,
104 int flags, u16 listen_interval);
105 int (*sta_add2)(const char *ifname, void *priv,
106 struct hostapd_sta_add_params *params);
107 int (*get_inact_sec)(void *priv, const u8 *addr);
108 int (*sta_clear_stats)(void *priv, const u8 *addr);
110 /* note: set_freq() is deprecated; use sta_freq() instead */
111 int (*set_freq)(void *priv, int mode, int freq);
112 int (*set_freq2)(void *priv, struct hostapd_freq_params *freq);
113 int (*set_rts)(void *priv, int rts);
114 int (*get_rts)(void *priv, int *rts);
115 int (*set_frag)(void *priv, int frag);
116 int (*get_frag)(void *priv, int *frag);
117 int (*set_retry)(void *priv, int short_retry, int long_retry);
118 int (*get_retry)(void *priv, int *short_retry, int *long_retry);
120 int (*sta_set_flags)(void *priv, const u8 *addr,
121 int total_flags, int flags_or, int flags_and);
122 int (*set_rate_sets)(void *priv, int *supp_rates, int *basic_rates,
124 int (*set_regulatory_domain)(void *priv, unsigned int rd);
125 int (*set_country)(void *priv, const char *country);
126 int (*set_ieee80211d)(void *priv, int enabled);
127 int (*set_beacon)(const char *ifname, void *priv,
128 u8 *head, size_t head_len,
129 u8 *tail, size_t tail_len);
131 /* Configure internal bridge:
132 * 0 = disabled, i.e., client separation is enabled (no bridging of
133 * packets between associated STAs
134 * 1 = enabled, i.e., bridge packets between associated STAs (default)
136 int (*set_internal_bridge)(void *priv, int value);
137 int (*set_beacon_int)(void *priv, int value);
138 int (*set_dtim_period)(const char *ifname, void *priv, int value);
139 /* Configure broadcast SSID mode:
140 * 0 = include SSID in Beacon frames and reply to Probe Request frames
141 * that use broadcast SSID
142 * 1 = hide SSID from Beacon frames and ignore Probe Request frames for
145 int (*set_broadcast_ssid)(void *priv, int value);
146 int (*set_cts_protect)(void *priv, int value);
147 int (*set_key_tx_rx_threshold)(void *priv, int value);
148 int (*set_preamble)(void *priv, int value);
149 int (*set_short_slot_time)(void *priv, int value);
150 int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
151 int cw_max, int burst_time);
152 int (*bss_add)(void *priv, const char *ifname, const u8 *bssid);
153 int (*bss_remove)(void *priv, const char *ifname);
154 int (*valid_bss_mask)(void *priv, const u8 *addr, const u8 *mask);
155 int (*passive_scan)(void *priv, int now, int our_mode_only,
156 int interval, int _listen, int *channel,
158 struct hostapd_hw_modes * (*get_hw_feature_data)(void *priv,
161 int (*if_add)(const char *iface, void *priv,
162 enum hostapd_driver_if_type type, char *ifname,
164 int (*if_update)(void *priv, enum hostapd_driver_if_type type,
165 char *ifname, const u8 *addr);
166 int (*if_remove)(void *priv, enum hostapd_driver_if_type type,
167 const char *ifname, const u8 *addr);
168 int (*set_sta_vlan)(void *priv, const u8 *addr, const char *ifname,
171 * commit - Optional commit changes handler
172 * @priv: driver private data
173 * Returns: 0 on success, -1 on failure
175 * This optional handler function can be registered if the driver
176 * interface implementation needs to commit changes (e.g., by setting
177 * network interface up) at the end of initial configuration. If set,
178 * this handler will be called after initial setup has been completed.
180 int (*commit)(void *priv);
182 int (*send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto,
183 const u8 *data, size_t data_len);
185 int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted,
186 u32 session_timeout);
187 int (*set_radius_acl_expire)(void *priv, const u8 *mac);
189 int (*set_ht_params)(const char *ifname, void *priv,
190 const u8 *ht_capab, size_t ht_capab_len,
191 const u8 *ht_oper, size_t ht_oper_len);
193 int (*set_wps_beacon_ie)(const char *ifname, void *priv,
194 const u8 *ie, size_t len);
195 int (*set_wps_probe_resp_ie)(const char *ifname, void *priv,
196 const u8 *ie, size_t len);
200 hostapd_driver_init(struct hostapd_data *hapd)
202 if (hapd->driver == NULL || hapd->driver->init == NULL)
204 return hapd->driver->init(hapd);
208 hostapd_driver_init_bssid(struct hostapd_data *hapd, const u8 *bssid)
210 if (hapd->driver == NULL || hapd->driver->init_bssid == NULL)
212 return hapd->driver->init_bssid(hapd, bssid);
216 hostapd_driver_deinit(struct hostapd_data *hapd)
218 if (hapd->driver == NULL || hapd->driver->deinit == NULL)
220 hapd->driver->deinit(hapd->drv_priv);
224 hostapd_wireless_event_init(struct hostapd_data *hapd)
226 if (hapd->driver == NULL ||
227 hapd->driver->wireless_event_init == NULL)
229 return hapd->driver->wireless_event_init(hapd->drv_priv);
233 hostapd_wireless_event_deinit(struct hostapd_data *hapd)
235 if (hapd->driver == NULL ||
236 hapd->driver->wireless_event_deinit == NULL)
238 hapd->driver->wireless_event_deinit(hapd->drv_priv);
242 hostapd_set_ieee8021x(const char *ifname, struct hostapd_data *hapd,
245 if (hapd->driver == NULL || hapd->driver->set_ieee8021x == NULL)
247 return hapd->driver->set_ieee8021x(ifname, hapd->drv_priv, enabled);
251 hostapd_set_privacy(struct hostapd_data *hapd, int enabled)
253 if (hapd->driver == NULL || hapd->driver->set_privacy == NULL)
255 return hapd->driver->set_privacy(hapd->conf->iface, hapd->drv_priv,
260 hostapd_set_encryption(const char *ifname, struct hostapd_data *hapd,
261 const char *alg, const u8 *addr, int idx,
262 u8 *key, size_t key_len, int txkey)
264 if (hapd->driver == NULL || hapd->driver->set_encryption == NULL)
266 return hapd->driver->set_encryption(ifname, hapd->drv_priv, alg, addr,
267 idx, key, key_len, txkey);
271 hostapd_get_seqnum(const char *ifname, struct hostapd_data *hapd,
272 const u8 *addr, int idx, u8 *seq)
274 if (hapd->driver == NULL || hapd->driver->get_seqnum == NULL)
276 return hapd->driver->get_seqnum(ifname, hapd->drv_priv, addr, idx,
281 hostapd_get_seqnum_igtk(const char *ifname, struct hostapd_data *hapd,
282 const u8 *addr, int idx, u8 *seq)
284 if (hapd->driver == NULL || hapd->driver->get_seqnum_igtk == NULL)
286 return hapd->driver->get_seqnum_igtk(ifname, hapd->drv_priv, addr, idx,
291 hostapd_flush(struct hostapd_data *hapd)
293 if (hapd->driver == NULL || hapd->driver->flush == NULL)
295 return hapd->driver->flush(hapd->drv_priv);
299 hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
302 if (hapd->driver == NULL || hapd->driver->set_generic_elem == NULL)
304 return hapd->driver->set_generic_elem(hapd->conf->iface,
305 hapd->drv_priv, elem, elem_len);
309 hostapd_read_sta_data(struct hostapd_data *hapd,
310 struct hostap_sta_driver_data *data, const u8 *addr)
312 if (hapd->driver == NULL || hapd->driver->read_sta_data == NULL)
314 return hapd->driver->read_sta_data(hapd->drv_priv, data, addr);
318 hostapd_send_eapol(struct hostapd_data *hapd, const u8 *addr, const u8 *data,
319 size_t data_len, int encrypt)
321 if (hapd->driver == NULL || hapd->driver->send_eapol == NULL)
323 return hapd->driver->send_eapol(hapd->drv_priv, addr, data, data_len,
324 encrypt, hapd->own_addr);
328 hostapd_sta_deauth(struct hostapd_data *hapd, const u8 *addr, int reason)
330 if (hapd->driver == NULL || hapd->driver->sta_deauth == NULL)
332 return hapd->driver->sta_deauth(hapd->drv_priv, addr, reason);
336 hostapd_sta_disassoc(struct hostapd_data *hapd, const u8 *addr, int reason)
338 if (hapd->driver == NULL || hapd->driver->sta_disassoc == NULL)
340 return hapd->driver->sta_disassoc(hapd->drv_priv, addr, reason);
344 hostapd_sta_remove(struct hostapd_data *hapd, const u8 *addr)
346 if (hapd->driver == NULL || hapd->driver->sta_remove == NULL)
348 return hapd->driver->sta_remove(hapd->drv_priv, addr);
352 hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len)
354 if (hapd->driver == NULL || hapd->driver->get_ssid == NULL)
356 return hapd->driver->get_ssid(hapd->conf->iface, hapd->drv_priv, buf,
361 hostapd_set_ssid(struct hostapd_data *hapd, const u8 *buf, size_t len)
363 if (hapd->driver == NULL || hapd->driver->set_ssid == NULL)
365 return hapd->driver->set_ssid(hapd->conf->iface, hapd->drv_priv, buf,
370 hostapd_send_mgmt_frame(struct hostapd_data *hapd, const void *msg, size_t len,
373 if (hapd->driver == NULL || hapd->driver->send_mgmt_frame == NULL)
375 return hapd->driver->send_mgmt_frame(hapd->drv_priv, msg, len, flags);
379 hostapd_set_assoc_ap(struct hostapd_data *hapd, const u8 *addr)
381 if (hapd->driver == NULL || hapd->driver->set_assoc_ap == NULL)
383 return hapd->driver->set_assoc_ap(hapd->drv_priv, addr);
387 hostapd_set_countermeasures(struct hostapd_data *hapd, int enabled)
389 if (hapd->driver == NULL || hapd->driver->set_countermeasures == NULL)
391 return hapd->driver->set_countermeasures(hapd->drv_priv, enabled);
395 hostapd_sta_add(const char *ifname, struct hostapd_data *hapd, const u8 *addr,
396 u16 aid, u16 capability, const u8 *supp_rates,
397 size_t supp_rates_len, int flags, u16 listen_interval,
398 const struct ht_cap_ie *ht_capabilities)
400 if (hapd->driver == NULL)
403 if (hapd->driver->sta_add2) {
404 struct hostapd_sta_add_params params;
405 os_memset(¶ms, 0, sizeof(params));
408 params.capability = capability;
409 params.supp_rates = supp_rates;
410 params.supp_rates_len = supp_rates_len;
411 params.flags = flags;
412 params.listen_interval = listen_interval;
413 params.ht_capabilities = ht_capabilities;
414 return hapd->driver->sta_add2(ifname, hapd->drv_priv, ¶ms);
417 if (hapd->driver->sta_add == NULL)
419 return hapd->driver->sta_add(ifname, hapd->drv_priv, addr, aid,
420 capability, (u8 *) supp_rates,
422 flags, listen_interval);
426 hostapd_get_inact_sec(struct hostapd_data *hapd, const u8 *addr)
428 if (hapd->driver == NULL || hapd->driver->get_inact_sec == NULL)
430 return hapd->driver->get_inact_sec(hapd->drv_priv, addr);
434 hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq,
435 int sec_channel_offset)
437 if (hapd->driver == NULL)
439 if (hapd->driver->set_freq2) {
440 struct hostapd_freq_params data;
441 os_memset(&data, 0, sizeof(data));
444 data.sec_channel_offset = sec_channel_offset;
445 return hapd->driver->set_freq2(hapd->drv_priv, &data);
448 if (hapd->driver->set_freq == NULL)
450 return hapd->driver->set_freq(hapd->drv_priv, mode, freq);
454 hostapd_set_rts(struct hostapd_data *hapd, int rts)
456 if (hapd->driver == NULL || hapd->driver->set_rts == NULL)
458 return hapd->driver->set_rts(hapd->drv_priv, rts);
462 hostapd_get_rts(struct hostapd_data *hapd, int *rts)
464 if (hapd->driver == NULL || hapd->driver->get_rts == NULL)
466 return hapd->driver->get_rts(hapd->drv_priv, rts);
470 hostapd_set_frag(struct hostapd_data *hapd, int frag)
472 if (hapd->driver == NULL || hapd->driver->set_frag == NULL)
474 return hapd->driver->set_frag(hapd->drv_priv, frag);
478 hostapd_get_frag(struct hostapd_data *hapd, int *frag)
480 if (hapd->driver == NULL || hapd->driver->get_frag == NULL)
482 return hapd->driver->get_frag(hapd->drv_priv, frag);
486 hostapd_set_retry(struct hostapd_data *hapd, int short_retry, int long_retry)
488 if (hapd->driver == NULL || hapd->driver->set_retry == NULL)
490 return hapd->driver->set_retry(hapd->drv_priv, short_retry,
495 hostapd_get_retry(struct hostapd_data *hapd, int *short_retry, int *long_retry)
497 if (hapd->driver == NULL || hapd->driver->get_retry == NULL)
499 return hapd->driver->get_retry(hapd->drv_priv, short_retry,
504 hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr,
505 int total_flags, int flags_or, int flags_and)
507 if (hapd->driver == NULL || hapd->driver->sta_set_flags == NULL)
509 return hapd->driver->sta_set_flags(hapd->drv_priv, addr, total_flags,
510 flags_or, flags_and);
514 hostapd_set_rate_sets(struct hostapd_data *hapd, int *supp_rates,
515 int *basic_rates, int mode)
517 if (hapd->driver == NULL || hapd->driver->set_rate_sets == NULL)
519 return hapd->driver->set_rate_sets(hapd->drv_priv, supp_rates,
524 hostapd_set_regulatory_domain(struct hostapd_data *hapd, unsigned int rd)
526 if (hapd->driver == NULL ||
527 hapd->driver->set_regulatory_domain == NULL)
529 return hapd->driver->set_regulatory_domain(hapd->drv_priv, rd);
533 hostapd_set_country(struct hostapd_data *hapd, const char *country)
535 if (hapd->driver == NULL ||
536 hapd->driver->set_country == NULL)
538 return hapd->driver->set_country(hapd->drv_priv, country);
542 hostapd_set_ieee80211d(struct hostapd_data *hapd, int enabled)
544 if (hapd->driver == NULL ||
545 hapd->driver->set_ieee80211d == NULL)
547 return hapd->driver->set_ieee80211d(hapd->drv_priv, enabled);
551 hostapd_sta_clear_stats(struct hostapd_data *hapd, const u8 *addr)
553 if (hapd->driver == NULL || hapd->driver->sta_clear_stats == NULL)
555 return hapd->driver->sta_clear_stats(hapd->drv_priv, addr);
559 hostapd_set_beacon(const char *ifname, struct hostapd_data *hapd,
560 u8 *head, size_t head_len,
561 u8 *tail, size_t tail_len)
563 if (hapd->driver == NULL || hapd->driver->set_beacon == NULL)
565 return hapd->driver->set_beacon(ifname, hapd->drv_priv, head, head_len,
570 hostapd_set_internal_bridge(struct hostapd_data *hapd, int value)
572 if (hapd->driver == NULL || hapd->driver->set_internal_bridge == NULL)
574 return hapd->driver->set_internal_bridge(hapd->drv_priv, value);
578 hostapd_set_beacon_int(struct hostapd_data *hapd, int value)
580 if (hapd->driver == NULL || hapd->driver->set_beacon_int == NULL)
582 return hapd->driver->set_beacon_int(hapd->drv_priv, value);
586 hostapd_set_dtim_period(struct hostapd_data *hapd, int value)
588 if (hapd->driver == NULL || hapd->driver->set_dtim_period == NULL)
590 return hapd->driver->set_dtim_period(hapd->conf->iface, hapd->drv_priv,
595 hostapd_set_broadcast_ssid(struct hostapd_data *hapd, int value)
597 if (hapd->driver == NULL || hapd->driver->set_broadcast_ssid == NULL)
599 return hapd->driver->set_broadcast_ssid(hapd->drv_priv, value);
603 hostapd_set_cts_protect(struct hostapd_data *hapd, int value)
605 if (hapd->driver == NULL || hapd->driver->set_cts_protect == NULL)
607 return hapd->driver->set_cts_protect(hapd->drv_priv, value);
611 hostapd_set_key_tx_rx_threshold(struct hostapd_data *hapd, int value)
613 if (hapd->driver == NULL ||
614 hapd->driver->set_key_tx_rx_threshold == NULL)
616 return hapd->driver->set_key_tx_rx_threshold(hapd->drv_priv, value);
620 hostapd_set_preamble(struct hostapd_data *hapd, int value)
622 if (hapd->driver == NULL || hapd->driver->set_preamble == NULL)
624 return hapd->driver->set_preamble(hapd->drv_priv, value);
628 hostapd_set_short_slot_time(struct hostapd_data *hapd, int value)
630 if (hapd->driver == NULL || hapd->driver->set_short_slot_time == NULL)
632 return hapd->driver->set_short_slot_time(hapd->drv_priv, value);
636 hostapd_set_tx_queue_params(struct hostapd_data *hapd, int queue, int aifs,
637 int cw_min, int cw_max, int burst_time)
639 if (hapd->driver == NULL || hapd->driver->set_tx_queue_params == NULL)
641 return hapd->driver->set_tx_queue_params(hapd->drv_priv, queue, aifs,
642 cw_min, cw_max, burst_time);
646 hostapd_bss_add(struct hostapd_data *hapd, const char *ifname, const u8 *bssid)
648 if (hapd->driver == NULL || hapd->driver->bss_add == NULL)
650 return hapd->driver->bss_add(hapd->drv_priv, ifname, bssid);
654 hostapd_bss_remove(struct hostapd_data *hapd, const char *ifname)
656 if (hapd->driver == NULL || hapd->driver->bss_remove == NULL)
658 return hapd->driver->bss_remove(hapd->drv_priv, ifname);
662 hostapd_valid_bss_mask(struct hostapd_data *hapd, const u8 *addr,
665 if (hapd->driver == NULL || hapd->driver->valid_bss_mask == NULL)
667 return hapd->driver->valid_bss_mask(hapd->drv_priv, addr, mask);
671 hostapd_if_add(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
672 char *ifname, const u8 *addr)
674 if (hapd->driver == NULL || hapd->driver->if_add == NULL)
676 return hapd->driver->if_add(hapd->conf->iface, hapd->drv_priv, type,
681 hostapd_if_update(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
682 char *ifname, const u8 *addr)
684 if (hapd->driver == NULL || hapd->driver->if_update == NULL)
686 return hapd->driver->if_update(hapd->drv_priv, type, ifname, addr);
690 hostapd_if_remove(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
691 char *ifname, const u8 *addr)
693 if (hapd->driver == NULL || hapd->driver->if_remove == NULL)
695 return hapd->driver->if_remove(hapd->drv_priv, type, ifname, addr);
699 hostapd_passive_scan(struct hostapd_data *hapd, int now, int our_mode_only,
700 int interval, int _listen, int *channel,
703 if (hapd->driver == NULL || hapd->driver->passive_scan == NULL)
705 return hapd->driver->passive_scan(hapd->drv_priv, now, our_mode_only,
706 interval, _listen, channel, last_rx);
709 static inline struct hostapd_hw_modes *
710 hostapd_get_hw_feature_data(struct hostapd_data *hapd, u16 *num_modes,
713 if (hapd->driver == NULL || hapd->driver->get_hw_feature_data == NULL)
715 return hapd->driver->get_hw_feature_data(hapd->drv_priv, num_modes,
720 hostapd_set_sta_vlan(const char *ifname, struct hostapd_data *hapd,
721 const u8 *addr, int vlan_id)
723 if (hapd->driver == NULL || hapd->driver->set_sta_vlan == NULL)
725 return hapd->driver->set_sta_vlan(hapd->drv_priv, addr, ifname, vlan_id);
729 hostapd_driver_commit(struct hostapd_data *hapd)
731 if (hapd->driver == NULL || hapd->driver->commit == NULL)
733 return hapd->driver->commit(hapd->drv_priv);
737 hostapd_set_radius_acl_auth(struct hostapd_data *hapd, const u8 *mac,
738 int accepted, u32 session_timeout)
740 if (hapd->driver == NULL || hapd->driver->set_radius_acl_auth == NULL)
742 return hapd->driver->set_radius_acl_auth(hapd->drv_priv, mac, accepted,
747 hostapd_set_radius_acl_expire(struct hostapd_data *hapd, const u8 *mac)
749 if (hapd->driver == NULL ||
750 hapd->driver->set_radius_acl_expire == NULL)
752 return hapd->driver->set_radius_acl_expire(hapd->drv_priv, mac);
755 #ifdef CONFIG_IEEE80211N
757 hostapd_set_ht_params(const char *ifname, struct hostapd_data *hapd,
758 const u8 *ht_capab, size_t ht_capab_len,
759 const u8 *ht_oper, size_t ht_oper_len)
761 if (hapd->driver == NULL || hapd->driver->set_ht_params == NULL ||
762 ht_capab == NULL || ht_oper == NULL)
764 return hapd->driver->set_ht_params(
765 ifname, hapd->drv_priv, ht_capab, ht_capab_len,
766 ht_oper, ht_oper_len);
768 #endif /* CONFIG_IEEE80211N */
771 hostapd_drv_none(struct hostapd_data *hapd)
773 return hapd->driver && os_strcmp(hapd->driver->name, "none") == 0;
777 hostapd_set_wps_beacon_ie(struct hostapd_data *hapd, const u8 *ie, size_t len)
779 if (hapd->driver == NULL || hapd->driver->set_wps_beacon_ie == NULL)
781 return hapd->driver->set_wps_beacon_ie(hapd->conf->iface,
782 hapd->drv_priv, ie, len);
786 hostapd_set_wps_probe_resp_ie(struct hostapd_data *hapd, const u8 *ie,
789 if (hapd->driver == NULL ||
790 hapd->driver->set_wps_probe_resp_ie == NULL)
792 return hapd->driver->set_wps_probe_resp_ie(hapd->conf->iface,
793 hapd->drv_priv, ie, len);
796 #endif /* DRIVER_H */