hw_features.h revision 87fd279308af3f806848c8f2ab65ef18c6ac4c30
18d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/*
28d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * hostapd / Hardware feature query and different modes
38d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Copyright 2002-2003, Instant802 Networks, Inc.
48d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Copyright 2005-2006, Devicescape Software, Inc.
58d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt *
68d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This program is free software; you can redistribute it and/or modify
78d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * it under the terms of the GNU General Public License version 2 as
88d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * published by the Free Software Foundation.
98d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt *
108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Alternatively, this software may be distributed under the terms of BSD
118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * license.
128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt *
138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * See README and COPYING for more details.
148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */
158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifndef HW_FEATURES_H
178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define HW_FEATURES_H
188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifdef NEED_AP_MLME
208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			      size_t num_hw_features);
228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint hostapd_get_hw_features(struct hostapd_iface *iface);
238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint hostapd_select_hw_mode(struct hostapd_iface *iface);
248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtconst char * hostapd_hw_mode_txt(int mode);
258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint hostapd_check_ht_capab(struct hostapd_iface *iface);
288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint hostapd_prepare_rates(struct hostapd_data *hapd,
298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			  struct hostapd_hw_modes *mode);
308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#else /* NEED_AP_MLME */
318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline void
328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidthostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			 size_t num_hw_features)
348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{
358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}
368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline int hostapd_get_hw_features(struct hostapd_iface *iface)
388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{
398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	return -1;
408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}
418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{
4487fd279308af3f806848c8f2ab65ef18c6ac4c30Jouni Malinen	return -100;
458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}
468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline const char * hostapd_hw_mode_txt(int mode)
488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{
498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	return NULL;
508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}
518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{
548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	return -1;
558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}
568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{
598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	return 0;
608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}
618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline int hostapd_prepare_rates(struct hostapd_data *hapd,
638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt					struct hostapd_hw_modes *mode)
648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{
658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	return 0;
668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}
678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif /* NEED_AP_MLME */
698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif /* HW_FEATURES_H */
71