[PATCH] hostapd: Ensure ieee80211n_supported_ht_capab gets called to check ht caps during init
Nishant Sarmukadam
nishants
Mon Jan 31 19:39:24 PST 2011
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 at marvell.com>
---
src/ap/hw_features.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index 133ed74..0895162 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -585,13 +585,13 @@ int hostapd_check_ht_capab(struct hostapd_iface
*iface)
{
#ifdef CONFIG_IEEE80211N
int ret;
+ if (!ieee80211n_supported_ht_capab(iface))
+ return -1;
ret = ieee80211n_check_40mhz(iface);
if (ret)
return ret;
if (!ieee80211n_allowed_ht40_channel_pair(iface))
return -1;
- if (!ieee80211n_supported_ht_capab(iface))
- return -1;
#endif /* CONFIG_IEEE80211N */
return 0;
--
1.7.0.1
More information about the Hostap
mailing list