Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8950c224 authored by Chet Lanctot's avatar Chet Lanctot
Browse files

Revert "cfg80211: Key management offload support for 802.1X LEAP"



This reverts commit 0aead796.

Key management offload (LFR3) cannot be dependent on kernel changes
that have not yet been up-streamed.  Therefore, all kernel support
for key management offload needs to be reverted until the open source
version of kernel support for key management offload is available.

CRs-Fixed: 778119
Change-Id: I8e2c27f84e0b8e3f52ecca9f71b269ec10d47990
Signed-off-by: default avatarChet Lanctot <clanctot@codeaurora.org>
parent 3e7bc1c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2340,7 +2340,7 @@ struct cfg80211_ops {
				    struct cfg80211_chan_def *chandef);

	int	(*key_mgmt_set_pmk)(struct wiphy *wiphy, struct net_device *dev,
				    const u8 *pmk, size_t pmk_len);
				    const u8 *pmk);
};

/*
+0 −2
Original line number Diff line number Diff line
@@ -1570,7 +1570,6 @@ enum nl80211_commands {
 *	derivation used as part of key management offload.
 * @NL80211_ATTR_PMK: The Pairwise Master Key to be used for the
 *	connection.
 * @NL80211_ATTR_PMK_LEN: The length of the PMK.
 *
 * @NL80211_ATTR_MAX: highest attribute number currently defined
 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -1915,7 +1914,6 @@ enum nl80211_attrs {
	NL80211_ATTR_KEY_MGMT_OFFLOAD_SUPPORT,
	NL80211_ATTR_KEY_DERIVE_OFFLOAD_SUPPORT,
	NL80211_ATTR_PMK,
	NL80211_ATTR_PMK_LEN,

	/* add attributes here, update the policy in nl80211.c */

+1 −7
Original line number Diff line number Diff line
@@ -399,7 +399,6 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
	[NL80211_ATTR_KEY_DERIVE_OFFLOAD_SUPPORT] = { .type = NLA_U32 },
	[NL80211_ATTR_PMK] = { .type = NLA_BINARY,
				   .len = NL80211_KEY_LEN_PMK },
	[NL80211_ATTR_PMK_LEN] = { .type = NLA_U32 },
};

/* policy for the key attributes */
@@ -8694,21 +8693,16 @@ static int nl80211_key_mgmt_set_pmk(struct sk_buff *skb, struct genl_info *info)
	struct cfg80211_registered_device *rdev = info->user_ptr[0];
	struct net_device *dev = info->user_ptr[1];
	u8 *pmk;
	size_t pmk_len;

	if (info->attrs[NL80211_ATTR_PMK])
		pmk = nla_data(info->attrs[NL80211_ATTR_PMK]);
	else
		return -EINVAL;
	if (info->attrs[NL80211_ATTR_PMK_LEN])
		pmk_len = nla_get_u32(info->attrs[NL80211_ATTR_PMK_LEN]);
	else
		return -EINVAL;

	if (!rdev->ops->key_mgmt_set_pmk)
		return -EOPNOTSUPP;

	return rdev_key_mgmt_set_pmk(rdev, dev, pmk, pmk_len);
	return rdev_key_mgmt_set_pmk(rdev, dev, pmk);
}

#define NL80211_FLAG_NEED_WIPHY		0x01
+2 −3
Original line number Diff line number Diff line
@@ -954,13 +954,12 @@ rdev_set_ap_chanwidth(struct cfg80211_registered_device *rdev,
}

static inline int rdev_key_mgmt_set_pmk(struct cfg80211_registered_device *rdev,
				   struct net_device *dev, u8 *pmk,
				   size_t pmk_len)
				   struct net_device *dev, u8 *pmk)
{
	int ret;

	trace_rdev_key_mgmt_set_pmk(&rdev->wiphy, dev, pmk);
	ret = rdev->ops->key_mgmt_set_pmk(&rdev->wiphy, dev, pmk, pmk_len);
	ret = rdev->ops->key_mgmt_set_pmk(&rdev->wiphy, dev, pmk);
	trace_rdev_return_int(&rdev->wiphy, ret);

	return ret;