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

Johannes Berg
2014-01-17T18:54:59Z

On Sat, 2014-01-18 at 00:22 +0530, Krishna Chaitanya wrote:
> 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.

-1 is -EPERM anyway, which doesn't seem appropriate.

johannes