Parcourir la source

Allow driver wrappers to indicate whether HT info is known

This is needed to be able to figure out whether the driver is known
not to support HT.
Jouni Malinen il y a 13 ans
Parent
commit
e3b473eb4e
2 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 4 0
      src/drivers/driver.h
  2. 1 0
      src/drivers/driver_nl80211.c

+ 4 - 0
src/drivers/driver.h

@@ -60,6 +60,8 @@ struct hostapd_channel_data {
 	u8 max_tx_power;
 };
 
+#define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN BIT(0)
+
 /**
  * struct hostapd_hw_modes - Supported hardware mode information
  */
@@ -103,6 +105,8 @@ struct hostapd_hw_modes {
 	 * a_mpdu_params - A-MPDU (IEEE 802.11n) parameters
 	 */
 	u8 a_mpdu_params;
+
+	unsigned int flags; /* HOSTAPD_MODE_FLAG_* */
 };
 
 

+ 1 - 0
src/drivers/driver_nl80211.c

@@ -3657,6 +3657,7 @@ static int phy_info_handler(struct nl_msg *msg, void *arg)
 
 		mode = &phy_info->modes[*(phy_info->num_modes)];
 		memset(mode, 0, sizeof(*mode));
+		mode->flags = HOSTAPD_MODE_FLAG_HT_INFO_KNOWN;
 		*(phy_info->num_modes) += 1;
 
 		nla_parse(tb_band, NL80211_BAND_ATTR_MAX, nla_data(nl_band),