[PATCH] Add 'country CC' command to set regulatory domain

Sam Leffler sleffler at google.com
Fri Apr 15 20:13:40 EDT 2011


On Fri, Apr 15, 2011 at 7:01 AM, Jouni Malinen <j at w1.fi> wrote:

> On Thu, Apr 14, 2011 at 02:34:52PM -0700, Dmitry Shmidt wrote:
>
> > diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
> > @@ -3290,6 +3290,9 @@ char * wpa_supplicant_ctrl_iface_process(struct
> wpa_supplicant *wpa_s,
> > +     } else if (os_strncmp(buf, "COUNTRY ", 8) == 0) {
> > +             if (wpa_drv_set_country(wpa_s, buf + 8))
> > +                     reply_len = -1;
>
> This does not update the internal country code which is needed, e.g.,
> for P2P. In addition, there is already a mechanism for updating that
> through control interface: "SET country <country code>". That does not
> currently call wpa_drv_set_country(), but the proper way of adding this
> functionality is to add this into wpa_supplicant_update_config() instead
> of introducing an alternative control interface command for the exact
> same purpose. Please see whether this meets your needs:
>
> http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff;h=849b5dc78b6eeb35d6544819efc4d8d1b31217fb


With your change my dbus setter for Country needs to be changed.  It so
happens I had similar changes to Dmitry that I was preparing (my country cmd
displayed the current setting w/ no args).  While you can now use "set
country US" how do you get the current setting?  It looks like "get" isn't
hooked up to a general mechanism like "set" is.

-Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110415/dafb0128/attachment-0001.htm 


More information about the HostAP mailing list