On Wed, 2016-10-12 at 18:26 +0530, Purushottam Kushwaha wrote:
> This commit provides a mechanism for the host drivers to advertise
> the
> support for different beacon intervals among the respective interface
> combinations in a group, through beacon_int_min_gcd (u32).
> This beacon_int_min_gcd will be compared against GCD of all beaconing
> interfaces of matching combinations.

Applied. I made some more changes, in particular:

> @@ -3120,7 +3130,7 @@ struct ieee80211_iface_limit {
>   *  };
>   *
>   *
> - * 2. Allow #{AP, P2P-GO} <= 8, channels = 1, 8 total:
> + * 2. Allow #{AP, P2P-GO} <= 8, BI min gcd = 10, channels = 1, 8
> total:
>   *
>   *  struct ieee80211_iface_limit limits2[] = {
>   *   { .max = 8, .types = BIT(NL80211_IFTYPE_AP) |
> @@ -3131,6 +3141,7 @@ struct ieee80211_iface_limit {
>   *   .n_limits = ARRAY_SIZE(limits2),
>   *   .max_interfaces = 8,
>   *   .num_different_channels = 1,
> + *   .beacon_int_min_gcd = 10,
>   *  };
>   *

I removed this, because it would conflict with the other documentation
changes in this area going through the doc tree. I didn't think this
was important enough in the example to break the merge later.

>       list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
>               if (!wdev->beacon_interval)
>                       continue;
>               if (wdev->beacon_interval != beacon_int) {
> -                     res = -EINVAL;
> +                     params.diff_bi = true;
> +                     /* Get the GCD */
> +                     bi_prev = wdev->beacon_interval;
> +                     while (bi_prev != 0) {
> +                             tmp_bi = bi_prev;
> +                             bi_prev = params.beacon_gcd %
> bi_prev;
> +                             params.beacon_gcd = tmp_bi;
> +                     }

I changed that a bit, moving the variables in.

>                       break;

and, more importantly, I removed this break - we need to look at all
interfaces now, not break after the first one with different BI.

>               }
>       }
>  
> -     return res;
> +     res = cfg80211_check_combinations(&rdev->wiphy, &params);
> +     return (res < 0) ? res : 0;

removed the res variable too

johannes

Reply via email to