Recognize IW_AUTH_CIPHER_GROUP_MGMT and IW_AUTH_MFP
authorPavel Roskin <proski@gnu.org>
Wed, 13 Nov 2013 22:45:24 +0000 (17:45 -0500)
committerPavel Roskin <proski@gnu.org>
Wed, 13 Nov 2013 22:45:24 +0000 (17:45 -0500)
Don't complain if the userspace just wants to disable them.

net80211/ieee80211_wireless.c

index f2a84a89ee9a361839e1f8ca113902273060afb1..fc0b372f56178521e6ba40e1f2dedcab0b23c126 100644 (file)
@@ -4761,6 +4761,40 @@ siwauth_privacy_invoked(struct net_device *dev,
        return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
 }
 
+#ifdef IW_AUTH_CIPHER_GROUP_MGMT
+static int
+siwauth_cipher_group_mgmt(struct net_device *dev,
+       struct iw_request_info *info, struct iw_param *erq, char *buf)
+{
+       int arg = erq->value;
+
+       if (arg == IW_AUTH_CIPHER_NONE)
+               return 0;
+
+       printk(KERN_WARNING "%s: group management frame encryption not "
+              "supported, arg = %d\n", dev->name, arg);
+
+       return -EOPNOTSUPP;
+}
+#endif
+
+#ifdef IW_AUTH_MFP
+static int
+siwauth_mfp(struct net_device *dev,
+       struct iw_request_info *info, struct iw_param *erq, char *buf)
+{
+       int arg = erq->value;
+
+       if (arg == IW_AUTH_MFP_DISABLED)
+               return 0;
+
+       printk(KERN_WARNING "%s: management frame protection not supported, "
+              "arg = %d\n", dev->name, arg);
+
+       return -EOPNOTSUPP;
+}
+#endif
+
 /* 
  * If this function is invoked it means someone is using the wireless extensions
  * API instead of the private madwifi ioctls.  That's fine.  We translate their
@@ -4811,6 +4845,16 @@ ieee80211_ioctl_siwauth(struct net_device *dev,
        case IW_AUTH_PRIVACY_INVOKED:
                rc = siwauth_privacy_invoked(dev, info, erq, buf);
                break;
+#ifdef IW_AUTH_CIPHER_GROUP_MGMT
+       case IW_AUTH_CIPHER_GROUP_MGMT:
+               rc = siwauth_cipher_group_mgmt(dev, info, erq, buf);
+               break;
+#endif
+#ifdef IW_AUTH_MFP
+       case IW_AUTH_MFP:
+               rc = siwauth_mfp(dev, info, erq, buf);
+               break;
+#endif
        default:
                printk(KERN_WARNING "%s: unknown SIOCSIWAUTH flag %d\n",
                        dev->name, erq->flags);