Re: [PATCH] cfg80211: basic support for PBSS network type

2016-01-26 Thread Johannes Berg
On Wed, 2016-01-13 at 11:04 +0200, Lior David wrote:
> 
> + * @NL80211_ATTR_PBSS: flag attribute. If set it means operate
> + *   in a PBSS. Specified in %NL80211_CMD_CONNECT to request
> + *   connecting to a PCP, and in %NL80211_CMD_START_AP to start
> + *   a PCP instead of AP. Relevant for DMG networks only.

I'm continually confused by this; is it possible for DMG devices to be
a "real" AP rather than a PCP?

> @@ -3461,6 +3462,8 @@  static int nl80211_start_ap(struct sk_buff *skb, 
> struct genl_info *info)
>   return PTR_ERR(params.acl);
>   }
>  
> + params.pbss = nla_get_flag(info->attrs[NL80211_ATTR_PBSS]);
> +
>   wdev_lock(wdev);
>   err = rdev_start_ap(rdev, dev, );
>   if (!err) {

This, and the corresponding code in nl80211_connect, really ought to
check that the device is a DMG device and able to do this.

Perhaps this even needs a capability check, or do we assume that all
devices/drivers will be able to do this (or should reject it?)

If you want to rely on drivers though you need to have (in this patch!)
a small change to the existing driver to reject the operations if
pbss==true since obviously it cannot be doing the right thing right now
without further changes. That reject would then of course be removed
again with the driver update.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] cfg80211: basic support for PBSS network type

2016-01-26 Thread Lior David
On 1/26/2016 1:22 PM, Johannes Berg wrote:
> On Wed, 2016-01-13 at 11:04 +0200, Lior David wrote:
>>  
>> + * @NL80211_ATTR_PBSS: flag attribute. If set it means operate
>> + *  in a PBSS. Specified in %NL80211_CMD_CONNECT to request
>> + *  connecting to a PCP, and in %NL80211_CMD_START_AP to start
>> + *  a PCP instead of AP. Relevant for DMG networks only.
> 
> I'm continually confused by this; is it possible for DMG devices to be
> a "real" AP rather than a PCP?
> 
Yes, DMG devices can function as a full AP in addition to PCP.

>> @@ -3461,6 +3462,8 @@  static int nl80211_start_ap(struct sk_buff *skb, 
>> struct genl_info *info)
>>  return PTR_ERR(params.acl);
>>  }
>>  
>> +params.pbss = nla_get_flag(info->attrs[NL80211_ATTR_PBSS]);
>> +
>>  wdev_lock(wdev);
>>  err = rdev_start_ap(rdev, dev, );
>>  if (!err) {
> 
> This, and the corresponding code in nl80211_connect, really ought to
> check that the device is a DMG device and able to do this.
> 
> Perhaps this even needs a capability check, or do we assume that all
> devices/drivers will be able to do this (or should reject it?)
> 
Certified 11ad devices must support PBSS, but in theory you can have
11ad drivers that do not support it. 11ac devices cannot support
it and currently will just ignore this flag, so I think I will add a
feature flag (something like NL80211_EXT_FEATURE_PBSS) and return an
error if the driver does not support this feature.

> If you want to rely on drivers though you need to have (in this patch!)
> a small change to the existing driver to reject the operations if
> pbss==true since obviously it cannot be doing the right thing right now
> without further changes. That reject would then of course be removed
> again with the driver update.
I have a patch for the wil6210 driver that uses this feature. Do you prefer
that I add the wil6210 driver changes to this patch?

Thanks,
Lior
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] cfg80211: basic support for PBSS network type

2016-01-26 Thread Johannes Berg

> Yes, DMG devices can function as a full AP in addition to PCP.

Ok. I'll try to remember :)

> Certified 11ad devices must support PBSS, but in theory you can have
> 11ad drivers that do not support it. 11ac devices cannot support
> it and currently will just ignore this flag, so I think I will add a
> feature flag (something like NL80211_EXT_FEATURE_PBSS) and return an
> error if the driver does not support this feature.

I'd rather return an error when the device isn't 11ad.

If it's basically a requirement then I don't think we really need a
feature flag, but can just have the driver reject the flag in the
meantime. I do want to avoid having a situation where userspace
specified PBSS and it gets ignored entirely though.

> I have a patch for the wil6210 driver that uses this feature. Do you
> prefer that I add the wil6210 driver changes to this patch?

Great. No, I don't want bigger wil6210 changes in this patch, so I'd
prefer you add a few lines to this patch that make wil6210 reject the
configuration with PBSS, and then obviously in the real wil6210 patch
remove that again.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html