Browse Source

AP: Ensure ieee80211n_supported_ht_capab() gets called to check ht caps

ieee80211n_supported_ht_capab is called after ieee80211n_check_40mhz in
function hostapd_check_ht_capab. ieee80211n_check_40mhz can return 1 in
a valid scenario where the initialization is completed in a callback. In
this case ieee80211n_supported_ht_capab is skipped and hostapd does not
check the ht capabilities reported by the driver. Fix this issue making
sure ieee80211n_supported_ht_capab gets called.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Nishant Sarmukadam 14 years ago
parent
commit
1b4d379366
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/ap/hw_features.c

+ 2 - 2
src/ap/hw_features.c

@@ -585,13 +585,13 @@ int hostapd_check_ht_capab(struct hostapd_iface *iface)
 {
 {
 #ifdef CONFIG_IEEE80211N
 #ifdef CONFIG_IEEE80211N
 	int ret;
 	int ret;
+	if (!ieee80211n_supported_ht_capab(iface))
+		return -1;
 	ret = ieee80211n_check_40mhz(iface);
 	ret = ieee80211n_check_40mhz(iface);
 	if (ret)
 	if (ret)
 		return ret;
 		return ret;
 	if (!ieee80211n_allowed_ht40_channel_pair(iface))
 	if (!ieee80211n_allowed_ht40_channel_pair(iface))
 		return -1;
 		return -1;
-	if (!ieee80211n_supported_ht_capab(iface))
-		return -1;
 #endif /* CONFIG_IEEE80211N */
 #endif /* CONFIG_IEEE80211N */
 
 
 	return 0;
 	return 0;