[PATCH] Adding fields channel and frequency in interface capability properties on dbus
Blanquicet-Melendez Jose (MM)
jose.blanquicet-melendez at magnetimarelli.com
Mon Dec 12 05:15:52 PST 2016
Hi,
> > diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c
> > b/wpa_supplicant/dbus/dbus_new_handlers.c
> > @@ -2642,6 +2642,27 @@ dbus_bool_t wpas_dbus_getter_capabilities(
> > +if (res >= 0) {
> > +char buf[4096];
> > +int len=4096;
> > +if( ctrl_iface_get_capability_freq(wpa_s, buf, len))
> > +{
> > +if(!wpa_dbus_dict_append_string(&iter_dict,
> "Frequency", buf))
>
> This would expose that exact text string through the D-Bus interface.
> That does not sound very convenient and consistent with D-Bus
> expectations. Shouldn't this build a D-Bus array of integer values instead? Or
> whatever more native D-Bus data structure that would fit in here for the use
> case.
We would be also very interested in the idea of this patch. However, I absolutely agree with Jouni about the structure of the D-Bus message. I think they could be two entries in the Capabilities array and looks like this:
dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1 /fi/w1/wpa_supplicant1/Interfaces/1 org.freedesktop.DBus.Properties.GetAll string:"fi.w1.wpa_supplicant1.Interface"
dict entry(
string "Capabilities"
variant array [
...
dict entry(
string "Frequency"
variant array [
dict entry(
string "A"
variant array [
uint32 5180
...
]
)
dict entry(
string "G"
variant array [
uint32 2412
...
]
)
...
dict entry(
string "N"
variant array [
uint32 2412
...
uint32 5180
...
]
)
dict entry(
string "AC"
variant array [
uint32 5180
...
]
)
]
)
...
Same for channels. What do you think?
Regards,
Jose Blanquicet
VISITA IL NOSTRO SITO WEB! - VISIT OUR WEB SITE! www.magnetimarelli.com Confidential Notice: This message - including its attachments - may contain proprietary, confidential and/or legally protected information and is intended solely for the use of the designated addressee(s) above. If you are not the intended recipient be aware that any downloading, copying, disclosure, distribution or use of the contents of the above information is strictly prohibited. If you have received this communication by mistake, please forward the message back to the sender at the email address above, delete the message from all mailboxes and any other electronic storage medium and destroy all copies. Disclaimer Notice: Internet communications cannot be guaranteed to be safe or error-free. Therefore we do not assure that this message is complete or accurate and we do not accept liability for any errors or omissions in the contents of this message.
More information about the Hostap
mailing list