Re: [PATCH v2 2/3] gdhcp: Use unalignment macros from unaligned.h

2012-10-10 Thread Jukka Rissanen
Hi Marcel, On 09.10.2012 17:09, Marcel Holtmann wrote: Hi Jukka, gdhcp/client.c | 17 +++-- gdhcp/common.c | 19 +++ gdhcp/common.h | 16 gdhcp/server.c | 8 4 files changed, 26 insertions(+), 34 deletions(-) diff --git

[PATCH v3 2/3] gdhcp: Use unalignment macros from unaligned.h

2012-10-10 Thread Jukka Rissanen
--- gdhcp/client.c | 17 ++--- gdhcp/common.c | 21 + gdhcp/common.h | 17 + gdhcp/server.c | 7 +++ 4 files changed, 27 insertions(+), 35 deletions(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index cf04ced..6632c2c 100644 ---

[PATCH v3 0/3] clang compile fixes

2012-10-10 Thread Jukka Rissanen
Hi, v3: - use unalignment macros from Bluez (#1) - remove unnecessary cast in client.c (#2) - add comment in client.c (#2) Patch #1 creates put|get_unaligned and get_[b|l]e* macros which can convert between big-endian or little-endian values. Patch #2 adds the alignment macros into gdhcp code.

[PATCH v3 3/3] build: Ignore cast-align and unused-value errors if clang is used

2012-10-10 Thread Jukka Rissanen
The clang compiler gives too many false errors atm. So downgrade cast-align and unused-value errors into warnings. This is done like this right now but should be fixed later. --- configure.ac | 6 ++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index

[PATCH v3 1/3] gdhcp: Add unalignment macros

2012-10-10 Thread Jukka Rissanen
The alignment macros are copied from Bluez. --- Makefile.am | 2 +- gdhcp/unaligned.h | 116 ++ 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 gdhcp/unaligned.h diff --git a/Makefile.am b/Makefile.am index

[PATCH] gsupplicant: Adding a new state according to 'interface_disabled'

2012-10-10 Thread Tomasz Bursztyka
When soft rfkill is on, wpa_supplicant sets the interface disabled, and send a state named 'interface_disabled'. It is required to be managed and taken into account to set if interface is ready or not. It fixes this issue: - disable wifi (user setting), and hard rfkill it. - then un-hard rfkill

[PATCH v2] gsupplicant: Adding a new state according to 'interface_disabled'

2012-10-10 Thread Tomasz Bursztyka
When soft rfkill is on, wpa_supplicant sets the interface disabled, and send a state named 'interface_disabled'. It is required to be managed and taken into account to set interface ready or not. It fixes this issue: - disable wifi (user setting), and hard rfkill it. - then un-hard rfkill it:

Re: [PATCH v2 2/3] gdhcp: Use unalignment macros from unaligned.h

2012-10-10 Thread Marcel Holtmann
Hi Jukka, gdhcp/client.c | 17 +++-- gdhcp/common.c | 19 +++ gdhcp/common.h | 16 gdhcp/server.c | 8 4 files changed, 26 insertions(+), 34 deletions(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index

[PATCH 0/2] Interface readiness, scan and device refcount issue

2012-10-10 Thread Tomasz Bursztyka
Hi, While testing further the issue fixed by my previous patch: [PATCH v2] gsupplicant: Adding a new state according to 'interface_disabled' I figured out that, if the interface is not ready the order of callbacks interface_scan_result() and signal_scan_done() is reversed (probably an issue in

[PATCH 1/2] gsupplicant: Interpret unreadiness as an error on scan result

2012-10-10 Thread Tomasz Bursztyka
--- gsupplicant/supplicant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 477106b..576df20 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -2701,8 +2701,8 @@ static void

[PATCH 2/2] wifi: Do not start autoscan if interface is not ready on scan callback

2012-10-10 Thread Tomasz Bursztyka
--- plugins/wifi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index 2984de0..aecf980 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -516,7 +516,10 @@ static void scan_callback(int result, GSupplicantInterface *interface,

Re: [PATCH v3 2/3] gdhcp: Use unalignment macros from unaligned.h

2012-10-10 Thread Marcel Holtmann
Hi Jukka, gdhcp/client.c | 17 ++--- gdhcp/common.c | 21 + gdhcp/common.h | 17 + gdhcp/server.c | 7 +++ 4 files changed, 27 insertions(+), 35 deletions(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index cf04ced..6632c2c 100644

Re: [PATCH 5/9] main.conf: Add SingleConnection description

2012-10-10 Thread Patrik Flykt
On Tue, 2012-10-09 at 15:44 +0200, Marcel Holtmann wrote: however the description in the main.conf is bad. That needs at least work. That's fixable for sure :-) And the one important question is that if this means READY connections or ONLINE connections. For example if you have a working

Re: [PATCH 5/9] main.conf: Add SingleConnection description

2012-10-10 Thread Marcel Holtmann
Hi Patrik, however the description in the main.conf is bad. That needs at least work. That's fixable for sure :-) And the one important question is that if this means READY connections or ONLINE connections. For example if you have a working ONLINE connection in single mode and you

[PATCH v4 1/4] gdhcp: Add unalignment macros

2012-10-10 Thread Jukka Rissanen
The alignment macros are copied from Bluez. --- Makefile.am | 2 +- gdhcp/unaligned.h | 163 ++ 2 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 gdhcp/unaligned.h diff --git a/Makefile.am b/Makefile.am index

[PATCH v4 0/4] clang compile fixes

2012-10-10 Thread Jukka Rissanen
Hi, v4: - remove inclusion guard from header file (#1) - really remove unneccesary cast in client.c (#2) - use host byte order internally (#2) - changed option_u8 to option (#2) - remove obsolete function (#3) v3: - use unalignment macros from Bluez (#1) - remove unnecessary cast in client.c

[PATCH v4 3/4] gdhcp: Remove obsolete load lease function

2012-10-10 Thread Jukka Rissanen
--- gdhcp/gdhcp.h | 2 -- gdhcp/server.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h index 169b81f..f011690 100644 --- a/gdhcp/gdhcp.h +++ b/gdhcp/gdhcp.h @@ -186,8 +186,6 @@ int g_dhcp_server_set_option(GDHCPServer *server, unsigned

[PATCH v4 2/4] gdhcp: Use host byte order internally

2012-10-10 Thread Jukka Rissanen
Convert to network byte order just before sending the packet. --- gdhcp/client.c | 47 +-- gdhcp/common.c | 20 +++- gdhcp/common.h | 17 + gdhcp/ipv4ll.c | 4 ++-- gdhcp/server.c | 41

[PATCH v4 4/4] build: Ignore cast-align and unused-value errors if clang is used

2012-10-10 Thread Jukka Rissanen
The clang compiler gives too many false errors atm. So downgrade cast-align and unused-value errors into warnings. This is done like this right now but should be fixed later. --- configure.ac | 6 ++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index

Re: [PATCH v4 3/4] gdhcp: Remove obsolete load lease function

2012-10-10 Thread Marcel Holtmann
Hi Jukka, gdhcp/gdhcp.h | 2 -- gdhcp/server.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h index 169b81f..f011690 100644 --- a/gdhcp/gdhcp.h +++ b/gdhcp/gdhcp.h @@ -186,8 +186,6 @@ int g_dhcp_server_set_option(GDHCPServer *server,

Re: [PATCH v4 2/4] gdhcp: Use host byte order internally

2012-10-10 Thread Marcel Holtmann
Hi Jukka, Convert to network byte order just before sending the packet. --- gdhcp/client.c | 47 +-- gdhcp/common.c | 20 +++- gdhcp/common.h | 17 + gdhcp/ipv4ll.c | 4 ++-- gdhcp/server.c | 41

Re: [PATCH v4 3/4] gdhcp: Remove obsolete load lease function

2012-10-10 Thread Jukka Rissanen
Hi Marcel, On 10.10.2012 18:04, Marcel Holtmann wrote: Hi Jukka, gdhcp/gdhcp.h | 2 -- gdhcp/server.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h index 169b81f..f011690 100644 --- a/gdhcp/gdhcp.h +++ b/gdhcp/gdhcp.h @@ -186,8 +186,6 @@ int

Re: [PATCH v4 2/4] gdhcp: Use host byte order internally

2012-10-10 Thread Jukka Rissanen
Hi Marcel, On 10.10.2012 18:10, Marcel Holtmann wrote: Hi Jukka, Convert to network byte order just before sending the packet. --- gdhcp/client.c | 47 +-- gdhcp/common.c | 20 +++- gdhcp/common.h | 17 +

Re: [PATCH v4 2/4] gdhcp: Use host byte order internally

2012-10-10 Thread Marcel Holtmann
Hi Jukka, Convert to network byte order just before sending the packet. --- gdhcp/client.c | 47 +-- gdhcp/common.c | 20 +++- gdhcp/common.h | 17 + gdhcp/ipv4ll.c | 4 ++-- gdhcp/server.c | 41

Re: [PATCH v4 3/4] gdhcp: Remove obsolete load lease function

2012-10-10 Thread Marcel Holtmann
Hi Jukka, gdhcp/gdhcp.h | 2 -- gdhcp/server.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h index 169b81f..f011690 100644 --- a/gdhcp/gdhcp.h +++ b/gdhcp/gdhcp.h @@ -186,8 +186,6 @@ int g_dhcp_server_set_option(GDHCPServer *server,