Re: [PATCH] cfg80211: Do not call CRDA when using internal regulatory database

Krishna Chaitanya
2014-01-17T18:52:23Z

On Fri, Jan 17, 2014 at 3:32 AM, Chaitanya T K <chaitanya.mgit@gmail.com> wrote:
>
> When using internal regulatory data base kconfig option
> do not try to call crda, this complely defeats the
> purposes of enabling internal regulatory db.
>
> Signed-off-by: Chaitanya T K <chaitanya.mgit@gmail.com>
>
> ---
> net/wireless/reg.c | 29 +++++++++++++++--------------
> 1 file changed, 15 insertions(+), 14 deletions(-)
>
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index 7d20d84..1cb0f99 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -454,16 +454,16 @@ static void reg_regdb_search(struct work_struct *work)
>
> static DECLARE_WORK(reg_regdb_work, reg_regdb_search);
>
> -static void reg_regdb_query(const char *alpha2)
> +static int reg_regdb_query(const char *alpha2)
> {
> struct reg_regdb_search_request *request;
>
> if (!alpha2)
> - return;
> + return -1;
>
> request = kzalloc(sizeof(struct reg_regdb_search_request), GFP_KERNEL);
> if (!request)
> - return;
> + return -1;
>
I guess the return values must be 1 so that in case of failure
we ignore the reg update. Will wait for sometime for other
comments and send V2.