2 * hostapd - driver interface definition
3 * Copyright (c) 2002-2007, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
18 struct hostapd_sta_add_params {
23 size_t supp_rates_len;
26 const struct ht_cap_ie *ht_capabilities;
29 enum hostapd_driver_if_type {
30 HOSTAPD_IF_VLAN, HOSTAPD_IF_WDS
33 struct wpa_driver_ops {
34 const char *name; /* as appears in the config file */
36 void * (*init)(struct hostapd_data *hapd);
37 void * (*init_bssid)(struct hostapd_data *hapd, const u8 *bssid);
38 void (*deinit)(void *priv);
40 int (*wireless_event_init)(void *priv);
41 void (*wireless_event_deinit)(void *priv);
44 * set_8021x - enable/disable IEEE 802.1X support
45 * @ifname: Interface name (for multi-SSID/VLAN support)
46 * @priv: driver private data
47 * @enabled: 1 = enable, 0 = disable
49 * Returns: 0 on success, -1 on failure
51 * Configure the kernel driver to enable/disable 802.1X support.
52 * This may be an empty function if 802.1X support is always enabled.
54 int (*set_ieee8021x)(const char *ifname, void *priv, int enabled);
57 * set_privacy - enable/disable privacy
58 * @priv: driver private data
59 * @enabled: 1 = privacy enabled, 0 = disabled
61 * Return: 0 on success, -1 on failure
65 int (*set_privacy)(const char *ifname, void *priv, int enabled);
67 int (*set_encryption)(const char *ifname, void *priv, const char *alg,
68 const u8 *addr, int idx,
69 const u8 *key, size_t key_len, int txkey);
70 int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr,
72 int (*get_seqnum_igtk)(const char *ifname, void *priv, const u8 *addr,
74 int (*flush)(void *priv);
75 int (*set_generic_elem)(const char *ifname, void *priv, const u8 *elem,
78 int (*read_sta_data)(void *priv, struct hostap_sta_driver_data *data,
80 int (*send_eapol)(void *priv, const u8 *addr, const u8 *data,
81 size_t data_len, int encrypt, const u8 *own_addr);
82 int (*sta_deauth)(void *priv, const u8 *addr, int reason);
83 int (*sta_disassoc)(void *priv, const u8 *addr, int reason);
84 int (*sta_remove)(void *priv, const u8 *addr);
85 int (*get_ssid)(const char *ifname, void *priv, u8 *buf, int len);
86 int (*set_ssid)(const char *ifname, void *priv, const u8 *buf,
88 int (*set_countermeasures)(void *priv, int enabled);
89 int (*send_mgmt_frame)(void *priv, const void *msg, size_t len,
91 int (*set_assoc_ap)(void *priv, const u8 *addr);
92 /* note: sta_add() is deprecated; use sta_add2() instead */
93 int (*sta_add)(const char *ifname, void *priv, const u8 *addr, u16 aid,
94 u16 capability, u8 *supp_rates, size_t supp_rates_len,
95 int flags, u16 listen_interval);
96 int (*sta_add2)(const char *ifname, void *priv,
97 struct hostapd_sta_add_params *params);
98 int (*get_inact_sec)(void *priv, const u8 *addr);
99 int (*sta_clear_stats)(void *priv, const u8 *addr);
101 int (*set_freq)(void *priv, int mode, int freq);
102 int (*set_rts)(void *priv, int rts);
103 int (*get_rts)(void *priv, int *rts);
104 int (*set_frag)(void *priv, int frag);
105 int (*get_frag)(void *priv, int *frag);
106 int (*set_retry)(void *priv, int short_retry, int long_retry);
107 int (*get_retry)(void *priv, int *short_retry, int *long_retry);
109 int (*sta_set_flags)(void *priv, const u8 *addr,
110 int total_flags, int flags_or, int flags_and);
111 int (*set_rate_sets)(void *priv, int *supp_rates, int *basic_rates,
113 int (*set_channel_flag)(void *priv, int mode, int chan, int flag,
114 unsigned char power_level,
115 unsigned char antenna_max);
116 int (*set_regulatory_domain)(void *priv, unsigned int rd);
117 int (*set_country)(void *priv, const char *country);
118 int (*set_ieee80211d)(void *priv, int enabled);
119 int (*set_beacon)(const char *ifname, void *priv,
120 u8 *head, size_t head_len,
121 u8 *tail, size_t tail_len);
123 /* Configure internal bridge:
124 * 0 = disabled, i.e., client separation is enabled (no bridging of
125 * packets between associated STAs
126 * 1 = enabled, i.e., bridge packets between associated STAs (default)
128 int (*set_internal_bridge)(void *priv, int value);
129 int (*set_beacon_int)(void *priv, int value);
130 int (*set_dtim_period)(const char *ifname, void *priv, int value);
131 /* Configure broadcast SSID mode:
132 * 0 = include SSID in Beacon frames and reply to Probe Request frames
133 * that use broadcast SSID
134 * 1 = hide SSID from Beacon frames and ignore Probe Request frames for
137 int (*set_broadcast_ssid)(void *priv, int value);
138 int (*set_cts_protect)(void *priv, int value);
139 int (*set_key_tx_rx_threshold)(void *priv, int value);
140 int (*set_preamble)(void *priv, int value);
141 int (*set_short_slot_time)(void *priv, int value);
142 int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
143 int cw_max, int burst_time);
144 int (*bss_add)(void *priv, const char *ifname, const u8 *bssid);
145 int (*bss_remove)(void *priv, const char *ifname);
146 int (*valid_bss_mask)(void *priv, const u8 *addr, const u8 *mask);
147 int (*passive_scan)(void *priv, int now, int our_mode_only,
148 int interval, int _listen, int *channel,
150 struct hostapd_hw_modes * (*get_hw_feature_data)(void *priv,
153 int (*if_add)(const char *iface, void *priv,
154 enum hostapd_driver_if_type type, char *ifname,
156 int (*if_update)(void *priv, enum hostapd_driver_if_type type,
157 char *ifname, const u8 *addr);
158 int (*if_remove)(void *priv, enum hostapd_driver_if_type type,
159 const char *ifname, const u8 *addr);
160 int (*set_sta_vlan)(void *priv, const u8 *addr, const char *ifname,
163 * commit - Optional commit changes handler
164 * @priv: driver private data
165 * Returns: 0 on success, -1 on failure
167 * This optional handler function can be registered if the driver
168 * interface implementation needs to commit changes (e.g., by setting
169 * network interface up) at the end of initial configuration. If set,
170 * this handler will be called after initial setup has been completed.
172 int (*commit)(void *priv);
174 int (*send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto,
175 const u8 *data, size_t data_len);
177 int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted,
178 u32 session_timeout);
179 int (*set_radius_acl_expire)(void *priv, const u8 *mac);
181 int (*set_ht_capability)(const char *ifname, void *priv,
182 const u8 *data, size_t data_len);
183 int (*set_ht_operation)(const char *ifname, void *priv,
184 const u8 *data, size_t data_len);
188 hostapd_driver_init(struct hostapd_data *hapd)
190 if (hapd->driver == NULL || hapd->driver->init == NULL)
192 return hapd->driver->init(hapd);
196 hostapd_driver_init_bssid(struct hostapd_data *hapd, const u8 *bssid)
198 if (hapd->driver == NULL || hapd->driver->init_bssid == NULL)
200 return hapd->driver->init_bssid(hapd, bssid);
204 hostapd_driver_deinit(struct hostapd_data *hapd)
206 if (hapd->driver == NULL || hapd->driver->deinit == NULL)
208 hapd->driver->deinit(hapd->drv_priv);
212 hostapd_wireless_event_init(struct hostapd_data *hapd)
214 if (hapd->driver == NULL ||
215 hapd->driver->wireless_event_init == NULL)
217 return hapd->driver->wireless_event_init(hapd->drv_priv);
221 hostapd_wireless_event_deinit(struct hostapd_data *hapd)
223 if (hapd->driver == NULL ||
224 hapd->driver->wireless_event_deinit == NULL)
226 hapd->driver->wireless_event_deinit(hapd->drv_priv);
230 hostapd_set_ieee8021x(const char *ifname, struct hostapd_data *hapd,
233 if (hapd->driver == NULL || hapd->driver->set_ieee8021x == NULL)
235 return hapd->driver->set_ieee8021x(ifname, hapd->drv_priv, enabled);
239 hostapd_set_privacy(struct hostapd_data *hapd, int enabled)
241 if (hapd->driver == NULL || hapd->driver->set_privacy == NULL)
243 return hapd->driver->set_privacy(hapd->conf->iface, hapd->drv_priv,
248 hostapd_set_encryption(const char *ifname, struct hostapd_data *hapd,
249 const char *alg, const u8 *addr, int idx,
250 u8 *key, size_t key_len, int txkey)
252 if (hapd->driver == NULL || hapd->driver->set_encryption == NULL)
254 return hapd->driver->set_encryption(ifname, hapd->drv_priv, alg, addr,
255 idx, key, key_len, txkey);
259 hostapd_get_seqnum(const char *ifname, struct hostapd_data *hapd,
260 const u8 *addr, int idx, u8 *seq)
262 if (hapd->driver == NULL || hapd->driver->get_seqnum == NULL)
264 return hapd->driver->get_seqnum(ifname, hapd->drv_priv, addr, idx,
269 hostapd_get_seqnum_igtk(const char *ifname, struct hostapd_data *hapd,
270 const u8 *addr, int idx, u8 *seq)
272 if (hapd->driver == NULL || hapd->driver->get_seqnum_igtk == NULL)
274 return hapd->driver->get_seqnum_igtk(ifname, hapd->drv_priv, addr, idx,
279 hostapd_flush(struct hostapd_data *hapd)
281 if (hapd->driver == NULL || hapd->driver->flush == NULL)
283 return hapd->driver->flush(hapd->drv_priv);
287 hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
290 if (hapd->driver == NULL || hapd->driver->set_generic_elem == NULL)
292 return hapd->driver->set_generic_elem(hapd->conf->iface,
293 hapd->drv_priv, elem, elem_len);
297 hostapd_read_sta_data(struct hostapd_data *hapd,
298 struct hostap_sta_driver_data *data, const u8 *addr)
300 if (hapd->driver == NULL || hapd->driver->read_sta_data == NULL)
302 return hapd->driver->read_sta_data(hapd->drv_priv, data, addr);
306 hostapd_send_eapol(struct hostapd_data *hapd, const u8 *addr, const u8 *data,
307 size_t data_len, int encrypt)
309 if (hapd->driver == NULL || hapd->driver->send_eapol == NULL)
311 return hapd->driver->send_eapol(hapd->drv_priv, addr, data, data_len,
312 encrypt, hapd->own_addr);
316 hostapd_sta_deauth(struct hostapd_data *hapd, const u8 *addr, int reason)
318 if (hapd->driver == NULL || hapd->driver->sta_deauth == NULL)
320 return hapd->driver->sta_deauth(hapd->drv_priv, addr, reason);
324 hostapd_sta_disassoc(struct hostapd_data *hapd, const u8 *addr, int reason)
326 if (hapd->driver == NULL || hapd->driver->sta_disassoc == NULL)
328 return hapd->driver->sta_disassoc(hapd->drv_priv, addr, reason);
332 hostapd_sta_remove(struct hostapd_data *hapd, const u8 *addr)
334 if (hapd->driver == NULL || hapd->driver->sta_remove == NULL)
336 return hapd->driver->sta_remove(hapd->drv_priv, addr);
340 hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len)
342 if (hapd->driver == NULL || hapd->driver->get_ssid == NULL)
344 return hapd->driver->get_ssid(hapd->conf->iface, hapd->drv_priv, buf,
349 hostapd_set_ssid(struct hostapd_data *hapd, const u8 *buf, size_t len)
351 if (hapd->driver == NULL || hapd->driver->set_ssid == NULL)
353 return hapd->driver->set_ssid(hapd->conf->iface, hapd->drv_priv, buf,
358 hostapd_send_mgmt_frame(struct hostapd_data *hapd, const void *msg, size_t len,
361 if (hapd->driver == NULL || hapd->driver->send_mgmt_frame == NULL)
363 return hapd->driver->send_mgmt_frame(hapd->drv_priv, msg, len, flags);
367 hostapd_set_assoc_ap(struct hostapd_data *hapd, const u8 *addr)
369 if (hapd->driver == NULL || hapd->driver->set_assoc_ap == NULL)
371 return hapd->driver->set_assoc_ap(hapd->drv_priv, addr);
375 hostapd_set_countermeasures(struct hostapd_data *hapd, int enabled)
377 if (hapd->driver == NULL || hapd->driver->set_countermeasures == NULL)
379 return hapd->driver->set_countermeasures(hapd->drv_priv, enabled);
383 hostapd_sta_add(const char *ifname, struct hostapd_data *hapd, const u8 *addr,
384 u16 aid, u16 capability, const u8 *supp_rates,
385 size_t supp_rates_len, int flags, u16 listen_interval,
386 const struct ht_cap_ie *ht_capabilities)
388 if (hapd->driver == NULL)
391 if (hapd->driver->sta_add2) {
392 struct hostapd_sta_add_params params;
393 os_memset(¶ms, 0, sizeof(params));
396 params.capability = capability;
397 params.supp_rates = supp_rates;
398 params.supp_rates_len = supp_rates_len;
399 params.flags = flags;
400 params.listen_interval = listen_interval;
401 params.ht_capabilities = ht_capabilities;
402 return hapd->driver->sta_add2(ifname, hapd->drv_priv, ¶ms);
405 if (hapd->driver->sta_add == NULL)
407 return hapd->driver->sta_add(ifname, hapd->drv_priv, addr, aid,
408 capability, (u8 *) supp_rates,
410 flags, listen_interval);
414 hostapd_get_inact_sec(struct hostapd_data *hapd, const u8 *addr)
416 if (hapd->driver == NULL || hapd->driver->get_inact_sec == NULL)
418 return hapd->driver->get_inact_sec(hapd->drv_priv, addr);
422 hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq)
424 if (hapd->driver == NULL || hapd->driver->set_freq == NULL)
426 return hapd->driver->set_freq(hapd->drv_priv, mode, freq);
430 hostapd_set_rts(struct hostapd_data *hapd, int rts)
432 if (hapd->driver == NULL || hapd->driver->set_rts == NULL)
434 return hapd->driver->set_rts(hapd->drv_priv, rts);
438 hostapd_get_rts(struct hostapd_data *hapd, int *rts)
440 if (hapd->driver == NULL || hapd->driver->get_rts == NULL)
442 return hapd->driver->get_rts(hapd->drv_priv, rts);
446 hostapd_set_frag(struct hostapd_data *hapd, int frag)
448 if (hapd->driver == NULL || hapd->driver->set_frag == NULL)
450 return hapd->driver->set_frag(hapd->drv_priv, frag);
454 hostapd_get_frag(struct hostapd_data *hapd, int *frag)
456 if (hapd->driver == NULL || hapd->driver->get_frag == NULL)
458 return hapd->driver->get_frag(hapd->drv_priv, frag);
462 hostapd_set_retry(struct hostapd_data *hapd, int short_retry, int long_retry)
464 if (hapd->driver == NULL || hapd->driver->set_retry == NULL)
466 return hapd->driver->set_retry(hapd->drv_priv, short_retry,
471 hostapd_get_retry(struct hostapd_data *hapd, int *short_retry, int *long_retry)
473 if (hapd->driver == NULL || hapd->driver->get_retry == NULL)
475 return hapd->driver->get_retry(hapd->drv_priv, short_retry,
480 hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr,
481 int total_flags, int flags_or, int flags_and)
483 if (hapd->driver == NULL || hapd->driver->sta_set_flags == NULL)
485 return hapd->driver->sta_set_flags(hapd->drv_priv, addr, total_flags,
486 flags_or, flags_and);
490 hostapd_set_rate_sets(struct hostapd_data *hapd, int *supp_rates,
491 int *basic_rates, int mode)
493 if (hapd->driver == NULL || hapd->driver->set_rate_sets == NULL)
495 return hapd->driver->set_rate_sets(hapd->drv_priv, supp_rates,
500 hostapd_set_channel_flag(struct hostapd_data *hapd, int mode, int chan,
501 int flag, unsigned char power_level,
502 unsigned char antenna_max)
504 if (hapd->driver == NULL || hapd->driver->set_channel_flag == NULL)
506 return hapd->driver->set_channel_flag(hapd->drv_priv, mode, chan, flag,
507 power_level, antenna_max);
511 hostapd_set_regulatory_domain(struct hostapd_data *hapd, unsigned int rd)
513 if (hapd->driver == NULL ||
514 hapd->driver->set_regulatory_domain == NULL)
516 return hapd->driver->set_regulatory_domain(hapd->drv_priv, rd);
520 hostapd_set_country(struct hostapd_data *hapd, const char *country)
522 if (hapd->driver == NULL ||
523 hapd->driver->set_country == NULL)
525 return hapd->driver->set_country(hapd->drv_priv, country);
529 hostapd_set_ieee80211d(struct hostapd_data *hapd, int enabled)
531 if (hapd->driver == NULL ||
532 hapd->driver->set_ieee80211d == NULL)
534 return hapd->driver->set_ieee80211d(hapd->drv_priv, enabled);
538 hostapd_sta_clear_stats(struct hostapd_data *hapd, const u8 *addr)
540 if (hapd->driver == NULL || hapd->driver->sta_clear_stats == NULL)
542 return hapd->driver->sta_clear_stats(hapd->drv_priv, addr);
546 hostapd_set_beacon(const char *ifname, struct hostapd_data *hapd,
547 u8 *head, size_t head_len,
548 u8 *tail, size_t tail_len)
550 if (hapd->driver == NULL || hapd->driver->set_beacon == NULL)
552 return hapd->driver->set_beacon(ifname, hapd->drv_priv, head, head_len,
557 hostapd_set_internal_bridge(struct hostapd_data *hapd, int value)
559 if (hapd->driver == NULL || hapd->driver->set_internal_bridge == NULL)
561 return hapd->driver->set_internal_bridge(hapd->drv_priv, value);
565 hostapd_set_beacon_int(struct hostapd_data *hapd, int value)
567 if (hapd->driver == NULL || hapd->driver->set_beacon_int == NULL)
569 return hapd->driver->set_beacon_int(hapd->drv_priv, value);
573 hostapd_set_dtim_period(struct hostapd_data *hapd, int value)
575 if (hapd->driver == NULL || hapd->driver->set_dtim_period == NULL)
577 return hapd->driver->set_dtim_period(hapd->conf->iface, hapd->drv_priv,
582 hostapd_set_broadcast_ssid(struct hostapd_data *hapd, int value)
584 if (hapd->driver == NULL || hapd->driver->set_broadcast_ssid == NULL)
586 return hapd->driver->set_broadcast_ssid(hapd->drv_priv, value);
590 hostapd_set_cts_protect(struct hostapd_data *hapd, int value)
592 if (hapd->driver == NULL || hapd->driver->set_cts_protect == NULL)
594 return hapd->driver->set_cts_protect(hapd->drv_priv, value);
598 hostapd_set_key_tx_rx_threshold(struct hostapd_data *hapd, int value)
600 if (hapd->driver == NULL ||
601 hapd->driver->set_key_tx_rx_threshold == NULL)
603 return hapd->driver->set_key_tx_rx_threshold(hapd->drv_priv, value);
607 hostapd_set_preamble(struct hostapd_data *hapd, int value)
609 if (hapd->driver == NULL || hapd->driver->set_preamble == NULL)
611 return hapd->driver->set_preamble(hapd->drv_priv, value);
615 hostapd_set_short_slot_time(struct hostapd_data *hapd, int value)
617 if (hapd->driver == NULL || hapd->driver->set_short_slot_time == NULL)
619 return hapd->driver->set_short_slot_time(hapd->drv_priv, value);
623 hostapd_set_tx_queue_params(struct hostapd_data *hapd, int queue, int aifs,
624 int cw_min, int cw_max, int burst_time)
626 if (hapd->driver == NULL || hapd->driver->set_tx_queue_params == NULL)
628 return hapd->driver->set_tx_queue_params(hapd->drv_priv, queue, aifs,
629 cw_min, cw_max, burst_time);
633 hostapd_bss_add(struct hostapd_data *hapd, const char *ifname, const u8 *bssid)
635 if (hapd->driver == NULL || hapd->driver->bss_add == NULL)
637 return hapd->driver->bss_add(hapd->drv_priv, ifname, bssid);
641 hostapd_bss_remove(struct hostapd_data *hapd, const char *ifname)
643 if (hapd->driver == NULL || hapd->driver->bss_remove == NULL)
645 return hapd->driver->bss_remove(hapd->drv_priv, ifname);
649 hostapd_valid_bss_mask(struct hostapd_data *hapd, const u8 *addr,
652 if (hapd->driver == NULL || hapd->driver->valid_bss_mask == NULL)
654 return hapd->driver->valid_bss_mask(hapd->drv_priv, addr, mask);
658 hostapd_if_add(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
659 char *ifname, const u8 *addr)
661 if (hapd->driver == NULL || hapd->driver->if_add == NULL)
663 return hapd->driver->if_add(hapd->conf->iface, hapd->drv_priv, type,
668 hostapd_if_update(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
669 char *ifname, const u8 *addr)
671 if (hapd->driver == NULL || hapd->driver->if_update == NULL)
673 return hapd->driver->if_update(hapd->drv_priv, type, ifname, addr);
677 hostapd_if_remove(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
678 char *ifname, const u8 *addr)
680 if (hapd->driver == NULL || hapd->driver->if_remove == NULL)
682 return hapd->driver->if_remove(hapd->drv_priv, type, ifname, addr);
686 hostapd_passive_scan(struct hostapd_data *hapd, int now, int our_mode_only,
687 int interval, int _listen, int *channel,
690 if (hapd->driver == NULL || hapd->driver->passive_scan == NULL)
692 return hapd->driver->passive_scan(hapd->drv_priv, now, our_mode_only,
693 interval, _listen, channel, last_rx);
696 static inline struct hostapd_hw_modes *
697 hostapd_get_hw_feature_data(struct hostapd_data *hapd, u16 *num_modes,
700 if (hapd->driver == NULL || hapd->driver->get_hw_feature_data == NULL)
702 return hapd->driver->get_hw_feature_data(hapd->drv_priv, num_modes,
707 hostapd_set_sta_vlan(const char *ifname, struct hostapd_data *hapd,
708 const u8 *addr, int vlan_id)
710 if (hapd->driver == NULL || hapd->driver->set_sta_vlan == NULL)
712 return hapd->driver->set_sta_vlan(hapd->drv_priv, addr, ifname, vlan_id);
716 hostapd_driver_commit(struct hostapd_data *hapd)
718 if (hapd->driver == NULL || hapd->driver->commit == NULL)
720 return hapd->driver->commit(hapd->drv_priv);
724 hostapd_set_radius_acl_auth(struct hostapd_data *hapd, const u8 *mac,
725 int accepted, u32 session_timeout)
727 if (hapd->driver == NULL || hapd->driver->set_radius_acl_auth == NULL)
729 return hapd->driver->set_radius_acl_auth(hapd->drv_priv, mac, accepted,
734 hostapd_set_radius_acl_expire(struct hostapd_data *hapd, const u8 *mac)
736 if (hapd->driver == NULL ||
737 hapd->driver->set_radius_acl_expire == NULL)
739 return hapd->driver->set_radius_acl_expire(hapd->drv_priv, mac);
742 #ifdef CONFIG_IEEE80211N
744 hostapd_set_ht_capability(const char *ifname, struct hostapd_data *hapd,
745 const struct ieee80211_ht_capability *ht_cap)
747 if (hapd->driver == NULL || hapd->driver->set_ht_capability == NULL ||
750 return hapd->driver->set_ht_capability(
751 ifname, hapd->drv_priv, (const u8 *) ht_cap,
752 sizeof(struct ieee80211_ht_capability));
756 hostapd_set_ht_operation(const char *ifname, struct hostapd_data *hapd,
757 const struct ieee80211_ht_operation *ht_operation)
759 if (hapd->driver == NULL || hapd->driver->set_ht_operation == NULL ||
760 ht_operation == NULL)
762 return hapd->driver->set_ht_operation(
763 ifname, hapd->drv_priv, (const u8 *) ht_operation,
764 sizeof(struct ieee80211_ht_operation));
766 #endif /* CONFIG_IEEE80211N */
768 #endif /* DRIVER_H */