summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMax Stepanov <Max.Stepanov@intel.com>2013-12-08 13:31:29 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-12-16 15:10:18 +0100
commit31f1f4ec51bd264ba133ff0211b241546ba95c9d (patch)
tree8cc83a3bf7695203d1d2aad0c6061742c3be1851 /net
parent354e159d8c9970969873d66a789d3ac4528c44ff (diff)
downloadlinux-31f1f4ec51bd264ba133ff0211b241546ba95c9d.tar.gz
linux-31f1f4ec51bd264ba133ff0211b241546ba95c9d.tar.bz2
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 'net')
-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]);