From 7b7b4449a975566c161e7eaeddb9be953292dc84 Mon Sep 17 00:00:00 2001 From: Luciano Coelho Date: Sun, 18 Jan 2015 20:44:11 -0500 Subject: [PATCH] nl80211: Fix reading of the extended capabilities mask We were copying the NL80211_ATTR_EXT_CAPA attribute into the extended_capa_mask element, which is incorrect. Use NL80211_ATTR_EXT_CAPA_MASK instead. Signed-off-by: Luciano Coelho --- src/drivers/driver_nl80211_capa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index 5c71603c9..6e52bdef2 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -520,11 +520,11 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg) nla_len(tb[NL80211_ATTR_EXT_CAPA]); } drv->extended_capa_mask = - os_malloc(nla_len(tb[NL80211_ATTR_EXT_CAPA])); + os_malloc(nla_len(tb[NL80211_ATTR_EXT_CAPA_MASK])); if (drv->extended_capa_mask) { os_memcpy(drv->extended_capa_mask, - nla_data(tb[NL80211_ATTR_EXT_CAPA]), - nla_len(tb[NL80211_ATTR_EXT_CAPA])); + nla_data(tb[NL80211_ATTR_EXT_CAPA_MASK]), + nla_len(tb[NL80211_ATTR_EXT_CAPA_MASK])); } else { os_free(drv->extended_capa); drv->extended_capa = NULL;