diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2008-11-25 14:57:34 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2008-11-25 14:57:34 +0200 |
commit | ffbcf648ed1d9cb1deb08d15ffa6960341829348 (patch) | |
tree | aca58890b173ed4f7e85084cb729b1faa6ddc67e /hostapd/driver.h | |
parent | 3e0cb2c5033ece81ca013ab46e16e8e4816e5531 (diff) | |
download | external_wpa_supplicant_8_ti-ffbcf648ed1d9cb1deb08d15ffa6960341829348.zip external_wpa_supplicant_8_ti-ffbcf648ed1d9cb1deb08d15ffa6960341829348.tar.gz external_wpa_supplicant_8_ti-ffbcf648ed1d9cb1deb08d15ffa6960341829348.tar.bz2 |
Change HT parameter configuration to use a single driver ops function
It is better to pass both HT Capabilities and HT Operation IEs in the
same function call since it may be easier for the driver wrappers to
handle the changes without having to wait for the other IE in the
wrapper code.
Diffstat (limited to 'hostapd/driver.h')
-rw-r--r-- | hostapd/driver.h | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/hostapd/driver.h b/hostapd/driver.h index 47d0e76..723275f 100644 --- a/hostapd/driver.h +++ b/hostapd/driver.h @@ -176,10 +176,9 @@ struct wpa_driver_ops { u32 session_timeout); int (*set_radius_acl_expire)(void *priv, const u8 *mac); - int (*set_ht_capability)(const char *ifname, void *priv, - const u8 *data, size_t data_len); - int (*set_ht_operation)(const char *ifname, void *priv, - const u8 *data, size_t data_len); + int (*set_ht_params)(const char *ifname, void *priv, + const u8 *ht_capab, size_t ht_capab_len, + const u8 *ht_oper, size_t ht_oper_len); int (*set_wps_beacon_ie)(const char *ifname, void *priv, const u8 *ie, size_t len); @@ -733,27 +732,16 @@ hostapd_set_radius_acl_expire(struct hostapd_data *hapd, const u8 *mac) #ifdef CONFIG_IEEE80211N static inline int -hostapd_set_ht_capability(const char *ifname, struct hostapd_data *hapd, - const u8 *ht_cap) +hostapd_set_ht_params(const char *ifname, struct hostapd_data *hapd, + const u8 *ht_capab, size_t ht_capab_len, + const u8 *ht_oper, size_t ht_oper_len) { - if (hapd->driver == NULL || hapd->driver->set_ht_capability == NULL || - ht_cap == NULL) + if (hapd->driver == NULL || hapd->driver->set_ht_params == NULL || + ht_capab == NULL || ht_oper == NULL) return 0; - return hapd->driver->set_ht_capability( - ifname, hapd->drv_priv, ht_cap, - sizeof(struct ieee80211_ht_capability)); -} - -static inline int -hostapd_set_ht_operation(const char *ifname, struct hostapd_data *hapd, - const u8 *ht_operation) -{ - if (hapd->driver == NULL || hapd->driver->set_ht_operation == NULL || - ht_operation == NULL) - return 0; - return hapd->driver->set_ht_operation( - ifname, hapd->drv_priv, ht_operation, - sizeof(struct ieee80211_ht_operation)); + return hapd->driver->set_ht_params( + ifname, hapd->drv_priv, ht_capab, ht_capab_len, + ht_oper, ht_oper_len); } #endif /* CONFIG_IEEE80211N */ |