From: Max Stepanov Date: Sun, 8 Dec 2013 11:31:29 +0000 (+0200) Subject: mac80211: read station mgmt keys via get_key call X-Git-Tag: v3.14-rc1~94^2~3^2^2~186 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31f1f4ec51bd264ba133ff0211b241546ba95c9d;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 0962c77..ac18528 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]);