On Fri, Apr 15, 2011 at 7:01 AM, Jouni Malinen <span dir="ltr">&lt;<a href="mailto:j@w1.fi">j@w1.fi</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, Apr 14, 2011 at 02:34:52PM -0700, Dmitry Shmidt wrote:<br>
<br>
&gt; diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c<br>
</div><div class="im">&gt; @@ -3290,6 +3290,9 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,<br>
</div><div class="im">&gt; +     } else if (os_strncmp(buf, &quot;COUNTRY &quot;, 8) == 0) {<br>
&gt; +             if (wpa_drv_set_country(wpa_s, buf + 8))<br>
&gt; +                     reply_len = -1;<br>
<br>
</div>This does not update the internal country code which is needed, e.g.,<br>
for P2P. In addition, there is already a mechanism for updating that<br>
through control interface: &quot;SET country &lt;country code&gt;&quot;. That does not<br>
currently call wpa_drv_set_country(), but the proper way of adding this<br>
functionality is to add this into wpa_supplicant_update_config() instead<br>
of introducing an alternative control interface command for the exact<br>
same purpose. Please see whether this meets your needs:<br>
<a href="http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff;h=849b5dc78b6eeb35d6544819efc4d8d1b31217fb" target="_blank">http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff;h=849b5dc78b6eeb35d6544819efc4d8d1b31217fb</a></blockquote>
<div><br></div><div>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 &quot;set country US&quot; how do you get the current setting?  It looks like &quot;get&quot; isn&#39;t hooked up to a general mechanism like &quot;set&quot; is.</div>
<div><br></div><div>-Sam</div></div>