summaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorMax Stepanov <Max.Stepanov@intel.com>2013-12-08 12:31:29 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-12-16 15:10:18 +0100
commit31f1f4ec51bd264ba133ff0211b241546ba95c9d (patch)
tree8cc83a3bf7695203d1d2aad0c6061742c3be1851 /net/mac80211/cfg.c
parentmac80211: check pairwise key_idx on get_key call (diff)
downloadlinux-31f1f4ec51bd264ba133ff0211b241546ba95c9d.tar.xz
linux-31f1f4ec51bd264ba133ff0211b241546ba95c9d.zip
mac80211: read station mgmt keys via get_key call
Allow to read management keys stored in a station's gtk key array with a get_key function. Signed-off-by: Max Stepanov <Max.Stepanov@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to '')
-rw-r--r--net/mac80211/cfg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 0962c77f013e..ac185286842d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -303,7 +303,8 @@ static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev,
if (pairwise && key_idx < NUM_DEFAULT_KEYS)
key = rcu_dereference(sta->ptk[key_idx]);
- else if (!pairwise && key_idx < NUM_DEFAULT_KEYS)
+ else if (!pairwise &&
+ key_idx < NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS)
key = rcu_dereference(sta->gtk[key_idx]);
} else
key = rcu_dereference(sdata->keys[key_idx]);