Search Linux Wireless

Re: [PATCH] cfg80211: reg: track crda request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 16, 2014 at 3:53 AM, Janusz Dziedzic
<janusz.dziedzic@xxxxxxxxx> wrote:
>
>  static void reg_timeout_work(struct work_struct *work)
>  {
> -       REG_DBG_PRINT("Timeout while waiting for CRDA to reply, restoring regulatory settings\n");
> +       struct regulatory_request *lr;
> +
>         rtnl_lock();
> -       restore_regulatory_settings(true);
> +
> +       lr = get_last_request();
> +       REG_DBG_PRINT("Timeout while waiting for CRDA to reply %s request, restoring regulatory settings\n",
> +                     reg_initiator_name(lr->initiator));
> +
> +       switch (lr->initiator) {
> +       case NL80211_REGDOM_SET_BY_CORE:
> +       case NL80211_REGDOM_SET_BY_DRIVER:
> +               /* Call CRDA again for last request */
> +               reg_process_hint(lr);
> +               break;
> +       case NL80211_REGDOM_SET_BY_USER:
> +               restore_regulatory_settings(true);
> +               break;
> +       case NL80211_REGDOM_SET_BY_COUNTRY_IE:
> +               restore_regulatory_settings(false);
> +               break;
> +       default:
> +               WARN_ON(1);
> +               break;
> +       }
>         rtnl_unlock();
>  }

Janusz,

As is, we don't ever bail out and could end up triggering CRDA to be
called every ~3 seconds with this patch. This is why I had added the
opportunistic triggers, which are technically still in place today but
there are only a few entries for those to kick off: beacon hints on 5
GHz for cards that enable beacon hints. I don't think its a good idea
we have a a recurring timer trigger for this. I think we need to
consider a time at which we should give up on CRDA being present and
instead rely on userspace to let us know its ready (ideally userspace
would do something with inotify on the path) so we can kick the queue
again.

Thoughts?

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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux