nl80211: Remove NL80211_CMD_SET_MGMT_EXTRA_IE

The functionality that NL80211_CMD_SET_MGMT_EXTRA_IE provided can now
be achieved with cleaner design by adding IE(s) into
NL80211_CMD_TRIGGER_SCAN, NL80211_CMD_AUTHENTICATE,
NL80211_CMD_ASSOCIATE, NL80211_CMD_DEAUTHENTICATE, and
NL80211_CMD_DISASSOCIATE.

Since this is a very recently added command and there are no known (or
known planned) applications using NL80211_CMD_SET_MGMT_EXTRA_IE and
taken into account how much extra complexity it adds to the IE
processing we have now (and need to add in the future to fix IE order
in couple of frames), it looks like the best option is to just remove
the implementation of this command for now. The enum values themselves
are left to avoid changing the nl80211 command or attribute numbers.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Jouni Malinen
2009-03-20 21:21:16 +02:00
committed by John W. Linville
parent feeb444549
commit 65fc73ac4a
8 changed files with 14 additions and 240 deletions

View File

@@ -269,7 +269,6 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
CMD(add_mpath, NEW_MPATH);
CMD(set_mesh_params, SET_MESH_PARAMS);
CMD(change_bss, SET_BSS);
CMD(set_mgmt_extra_ie, SET_MGMT_EXTRA_IE);
CMD(auth, AUTHENTICATE);
CMD(assoc, ASSOCIATE);
CMD(deauth, DEAUTHENTICATE);
@@ -2355,46 +2354,6 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
return -EINVAL;
}
static int nl80211_set_mgmt_extra_ie(struct sk_buff *skb,
struct genl_info *info)
{
struct cfg80211_registered_device *drv;
int err;
struct net_device *dev;
struct mgmt_extra_ie_params params;
memset(&params, 0, sizeof(params));
if (!info->attrs[NL80211_ATTR_MGMT_SUBTYPE])
return -EINVAL;
params.subtype = nla_get_u8(info->attrs[NL80211_ATTR_MGMT_SUBTYPE]);
if (params.subtype > 15)
return -EINVAL; /* FC Subtype field is 4 bits (0..15) */
if (info->attrs[NL80211_ATTR_IE]) {
params.ies = nla_data(info->attrs[NL80211_ATTR_IE]);
params.ies_len = nla_len(info->attrs[NL80211_ATTR_IE]);
}
rtnl_lock();
err = get_drv_dev_by_info_ifindex(info->attrs, &drv, &dev);
if (err)
goto out_rtnl;
if (drv->ops->set_mgmt_extra_ie)
err = drv->ops->set_mgmt_extra_ie(&drv->wiphy, dev, &params);
else
err = -EOPNOTSUPP;
cfg80211_put_dev(drv);
dev_put(dev);
out_rtnl:
rtnl_unlock();
return err;
}
static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *drv;
@@ -3043,12 +3002,6 @@ static struct genl_ops nl80211_ops[] = {
.policy = nl80211_policy,
.flags = GENL_ADMIN_PERM,
},
{
.cmd = NL80211_CMD_SET_MGMT_EXTRA_IE,
.doit = nl80211_set_mgmt_extra_ie,
.policy = nl80211_policy,
.flags = GENL_ADMIN_PERM,
},
{
.cmd = NL80211_CMD_TRIGGER_SCAN,
.doit = nl80211_trigger_scan,