aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNishant Sarmukadam <nishants@marvell.com>2011-02-01 14:04:59 (GMT)
committerJouni Malinen <j@w1.fi>2011-02-01 14:04:59 (GMT)
commit1b4d3793662a974147290dbca5ec09d5b3c032e1 (patch)
tree863c2392f85a84f6bd37518933735d1536334fab /src
parentd2da22494884b8aacf5897bb6a1813278d46b6bc (diff)
downloadhostap-1b4d3793662a974147290dbca5ec09d5b3c032e1.zip
hostap-1b4d3793662a974147290dbca5ec09d5b3c032e1.tar.gz
hostap-1b4d3793662a974147290dbca5ec09d5b3c032e1.tar.bz2
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>
Diffstat (limited to 'src')
-rw-r--r--src/ap/hw_features.c4
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;