|
@@ -885,6 +885,7 @@ static int nl80211_key_allowed(struct wireless_dev *wdev)
|
|
return -ENOLINK;
|
|
return -ENOLINK;
|
|
break;
|
|
break;
|
|
case NL80211_IFTYPE_UNSPECIFIED:
|
|
case NL80211_IFTYPE_UNSPECIFIED:
|
|
|
|
+ case NL80211_IFTYPE_OCB:
|
|
case NL80211_IFTYPE_MONITOR:
|
|
case NL80211_IFTYPE_MONITOR:
|
|
case NL80211_IFTYPE_P2P_DEVICE:
|
|
case NL80211_IFTYPE_P2P_DEVICE:
|
|
case NL80211_IFTYPE_WDS:
|
|
case NL80211_IFTYPE_WDS:
|
|
@@ -8275,6 +8276,28 @@ static int nl80211_set_cqm(struct sk_buff *skb, struct genl_info *info)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int nl80211_join_ocb(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];
|
|
|
|
+ struct ocb_setup setup = {};
|
|
|
|
+ int err;
|
|
|
|
+
|
|
|
|
+ err = nl80211_parse_chandef(rdev, info, &setup.chandef);
|
|
|
|
+ if (err)
|
|
|
|
+ return err;
|
|
|
|
+
|
|
|
|
+ return cfg80211_join_ocb(rdev, dev, &setup);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static int nl80211_leave_ocb(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];
|
|
|
|
+
|
|
|
|
+ return cfg80211_leave_ocb(rdev, dev);
|
|
|
|
+}
|
|
|
|
+
|
|
static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
|
|
static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
|
|
{
|
|
{
|
|
struct cfg80211_registered_device *rdev = info->user_ptr[0];
|
|
struct cfg80211_registered_device *rdev = info->user_ptr[0];
|
|
@@ -10218,6 +10241,22 @@ static const struct genl_ops nl80211_ops[] = {
|
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
|
NL80211_FLAG_NEED_RTNL,
|
|
NL80211_FLAG_NEED_RTNL,
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ .cmd = NL80211_CMD_JOIN_OCB,
|
|
|
|
+ .doit = nl80211_join_ocb,
|
|
|
|
+ .policy = nl80211_policy,
|
|
|
|
+ .flags = GENL_ADMIN_PERM,
|
|
|
|
+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
|
|
|
+ NL80211_FLAG_NEED_RTNL,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .cmd = NL80211_CMD_LEAVE_OCB,
|
|
|
|
+ .doit = nl80211_leave_ocb,
|
|
|
|
+ .policy = nl80211_policy,
|
|
|
|
+ .flags = GENL_ADMIN_PERM,
|
|
|
|
+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
|
|
|
+ NL80211_FLAG_NEED_RTNL,
|
|
|
|
+ },
|
|
#ifdef CONFIG_PM
|
|
#ifdef CONFIG_PM
|
|
{
|
|
{
|
|
.cmd = NL80211_CMD_GET_WOWLAN,
|
|
.cmd = NL80211_CMD_GET_WOWLAN,
|