* Re: [Powertop] [Discuss] [PATCH] iw: handle HAVE_LIBNL20 properly
@ 2012-05-18 13:54 Sergey Senozhatsky
0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2012-05-18 13:54 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 3248 bytes --]
On (05/18/12 15:40), Németh Márton wrote:
> Doesn't compile either:
>
> gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -g -O2 -MT tuning/powertop-iw.o -MD -MP -MF tuning/.deps/powertop-iw.Tpo -c -o tuning/powertop-iw.o
> `test -f 'tuning/iw.c' || echo './'`tuning/iw.c
> tuning/iw.c: In function ‘set_power_save’:
> tuning/iw.c:130: error: storage size of ‘ps_state’ isn’t known
> tuning/iw.c:132: error: ‘NL80211_PS_DISABLED’ undeclared (first use in this function)
> tuning/iw.c:132: error: (Each undeclared identifier is reported only once
> tuning/iw.c:132: error: for each function it appears in.)
> tuning/iw.c:134: error: ‘NL80211_PS_ENABLED’ undeclared (first use in this function)
> tuning/iw.c:136: error: ‘NL80211_ATTR_PS_STATE’ undeclared (first use in this function)
> tuning/iw.c: In function ‘print_power_save_handler’:
> tuning/iw.c:152: error: ‘NL80211_ATTR_PS_STATE’ undeclared (first use in this function)
> tuning/iw.c:156: error: ‘NL80211_PS_ENABLED’ undeclared (first use in this function)
> tuning/iw.c:159: error: ‘NL80211_PS_DISABLED’ undeclared (first use in this function)
> tuning/iw.c: In function ‘__handle_cmd’:
> tuning/iw.c:227: error: ‘NL80211_CMD_GET_POWER_SAVE’ undeclared (first use in this function)
> tuning/iw.c:230: error: ‘NL80211_CMD_SET_POWER_SAVE’ undeclared (first use in this function)
> make[3]: *** [tuning/powertop-iw.o] Error 1
> make[3]: Leaving directory `/mnt/store/nmarci/src/powertop/powertop2/powertop/src'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/mnt/store/nmarci/src/powertop/powertop2/powertop/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/mnt/store/nmarci/src/powertop/powertop2/powertop'
> make: *** [all] Error 2
>
> Looks like I have a linux/nl80211.h installed on my system which doesn't contain
> NL80211_PS_ENABLED, NL80211_PS_DISABLED, NL80211_ATTR_PS_STATE, NL80211_CMD_GET_POWER_SAVE
> and NL80211_CMD_SET_POWER_SAVE. These were added by commit
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ffb9eb3d8b450c22bbbc688c6b630141ac476fd9
>
> The header file src/tuning/nl80211.h in powertop repository seems to be a newer one.
>
Hm.. In that case solution is simple.
---
src/tuning/iw.c | 1 +
src/tuning/iw.h | 6 ------
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/tuning/iw.c b/src/tuning/iw.c
index aeba3fd..68eb6dc 100644
--- a/src/tuning/iw.c
+++ b/src/tuning/iw.c
@@ -39,6 +39,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <unistd.h>
#include <stdbool.h>
+#include "nl80211.h"
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
#include <netlink/genl/ctrl.h>
diff --git a/src/tuning/iw.h b/src/tuning/iw.h
index acf132d..6ea5a3d 100644
--- a/src/tuning/iw.h
+++ b/src/tuning/iw.h
@@ -33,12 +33,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdbool.h>
-#include <netlink/netlink.h>
-#include <netlink/genl/genl.h>
-#include <netlink/genl/family.h>
-#include <netlink/genl/ctrl.h>
-
-#include <linux/nl80211.h>
#define ETH_ALEN 6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Powertop] [Discuss] [PATCH] iw: handle HAVE_LIBNL20 properly
@ 2012-05-21 19:19 Chris Ferron
0 siblings, 0 replies; 4+ messages in thread
From: Chris Ferron @ 2012-05-21 19:19 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 3431 bytes --]
patch accepted
thanks
-Chris
On 05/18/2012 06:54 AM, Sergey Senozhatsky wrote:
> On (05/18/12 15:40), Németh Márton wrote:
>> Doesn't compile either:
>>
>> gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -g -O2 -MT tuning/powertop-iw.o -MD -MP -MF tuning/.deps/powertop-iw.Tpo -c -o tuning/powertop-iw.o
>> `test -f 'tuning/iw.c' || echo './'`tuning/iw.c
>> tuning/iw.c: In function ‘set_power_save’:
>> tuning/iw.c:130: error: storage size of ‘ps_state’ isn’t known
>> tuning/iw.c:132: error: ‘NL80211_PS_DISABLED’ undeclared (first use in this function)
>> tuning/iw.c:132: error: (Each undeclared identifier is reported only once
>> tuning/iw.c:132: error: for each function it appears in.)
>> tuning/iw.c:134: error: ‘NL80211_PS_ENABLED’ undeclared (first use in this function)
>> tuning/iw.c:136: error: ‘NL80211_ATTR_PS_STATE’ undeclared (first use in this function)
>> tuning/iw.c: In function ‘print_power_save_handler’:
>> tuning/iw.c:152: error: ‘NL80211_ATTR_PS_STATE’ undeclared (first use in this function)
>> tuning/iw.c:156: error: ‘NL80211_PS_ENABLED’ undeclared (first use in this function)
>> tuning/iw.c:159: error: ‘NL80211_PS_DISABLED’ undeclared (first use in this function)
>> tuning/iw.c: In function ‘__handle_cmd’:
>> tuning/iw.c:227: error: ‘NL80211_CMD_GET_POWER_SAVE’ undeclared (first use in this function)
>> tuning/iw.c:230: error: ‘NL80211_CMD_SET_POWER_SAVE’ undeclared (first use in this function)
>> make[3]: *** [tuning/powertop-iw.o] Error 1
>> make[3]: Leaving directory `/mnt/store/nmarci/src/powertop/powertop2/powertop/src'
>> make[2]: *** [all] Error 2
>> make[2]: Leaving directory `/mnt/store/nmarci/src/powertop/powertop2/powertop/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/mnt/store/nmarci/src/powertop/powertop2/powertop'
>> make: *** [all] Error 2
>>
>> Looks like I have a linux/nl80211.h installed on my system which doesn't contain
>> NL80211_PS_ENABLED, NL80211_PS_DISABLED, NL80211_ATTR_PS_STATE, NL80211_CMD_GET_POWER_SAVE
>> and NL80211_CMD_SET_POWER_SAVE. These were added by commit
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ffb9eb3d8b450c22bbbc688c6b630141ac476fd9
>>
>> The header file src/tuning/nl80211.h in powertop repository seems to be a newer one.
>>
> Hm.. In that case solution is simple.
>
>
> ---
>
> src/tuning/iw.c | 1 +
> src/tuning/iw.h | 6 ------
> 2 files changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/src/tuning/iw.c b/src/tuning/iw.c
> index aeba3fd..68eb6dc 100644
> --- a/src/tuning/iw.c
> +++ b/src/tuning/iw.c
> @@ -39,6 +39,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> #include<unistd.h>
> #include<stdbool.h>
>
> +#include "nl80211.h"
> #include<netlink/genl/genl.h>
> #include<netlink/genl/family.h>
> #include<netlink/genl/ctrl.h>
> diff --git a/src/tuning/iw.h b/src/tuning/iw.h
> index acf132d..6ea5a3d 100644
> --- a/src/tuning/iw.h
> +++ b/src/tuning/iw.h
> @@ -33,12 +33,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> */
>
> #include<stdbool.h>
> -#include<netlink/netlink.h>
> -#include<netlink/genl/genl.h>
> -#include<netlink/genl/family.h>
> -#include<netlink/genl/ctrl.h>
> -
> -#include<linux/nl80211.h>
>
> #define ETH_ALEN 6
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Powertop] [Discuss] [PATCH] iw: handle HAVE_LIBNL20 properly
@ 2012-05-18 13:50 Arjan van de Ven
0 siblings, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2012-05-18 13:50 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2558 bytes --]
On 5/18/2012 6:40 AM, Németh Márton wrote:
> Hi Sergey,
> Sergey Senozhatsky wrote:
>> On (05/18/12 10:22), Németh Márton wrote:
>>> starting with the commit b0d2854861de2f15671e633da11f42207d4357df
>>> I get the following compile time error:
>>>
>>
>> Well, that's strange, since commit itself doesn't change much....
>>
>> how about the following one
>
> Doesn't compile either:
>
> gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -g -O2 -MT tuning/powertop-iw.o -MD -MP -MF tuning/.deps/powertop-iw.Tpo -c -o tuning/powertop-iw.o
> `test -f 'tuning/iw.c' || echo './'`tuning/iw.c
> tuning/iw.c: In function ‘set_power_save’:
> tuning/iw.c:130: error: storage size of ‘ps_state’ isn’t known
> tuning/iw.c:132: error: ‘NL80211_PS_DISABLED’ undeclared (first use in this function)
> tuning/iw.c:132: error: (Each undeclared identifier is reported only once
> tuning/iw.c:132: error: for each function it appears in.)
> tuning/iw.c:134: error: ‘NL80211_PS_ENABLED’ undeclared (first use in this function)
> tuning/iw.c:136: error: ‘NL80211_ATTR_PS_STATE’ undeclared (first use in this function)
> tuning/iw.c: In function ‘print_power_save_handler’:
> tuning/iw.c:152: error: ‘NL80211_ATTR_PS_STATE’ undeclared (first use in this function)
> tuning/iw.c:156: error: ‘NL80211_PS_ENABLED’ undeclared (first use in this function)
> tuning/iw.c:159: error: ‘NL80211_PS_DISABLED’ undeclared (first use in this function)
> tuning/iw.c: In function ‘__handle_cmd’:
> tuning/iw.c:227: error: ‘NL80211_CMD_GET_POWER_SAVE’ undeclared (first use in this function)
> tuning/iw.c:230: error: ‘NL80211_CMD_SET_POWER_SAVE’ undeclared (first use in this function)
> make[3]: *** [tuning/powertop-iw.o] Error 1
> make[3]: Leaving directory `/mnt/store/nmarci/src/powertop/powertop2/powertop/src'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/mnt/store/nmarci/src/powertop/powertop2/powertop/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/mnt/store/nmarci/src/powertop/powertop2/powertop'
> make: *** [all] Error 2
>
> Looks like I have a linux/nl80211.h installed on my system which doesn't contain
> NL80211_PS_ENABLED, NL80211_PS_DISABLED, NL80211_ATTR_PS_STATE, NL80211_CMD_GET_POWER_SAVE
> and NL80211_CMD_SET_POWER_SAVE. These were added by commit
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ffb9eb3d8b450c22bbbc688c6b630141ac476fd9
Feb 2010
what kind of OS are you running???
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Powertop] [Discuss] [PATCH] iw: handle HAVE_LIBNL20 properly
@ 2012-05-18 10:26 Sergey Senozhatsky
0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2012-05-18 10:26 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1450 bytes --]
On (05/18/12 10:22), Németh Márton wrote:
>
> Hi,
>
Hello,
Cc powertop(a)lists.01.org list
> starting with the commit b0d2854861de2f15671e633da11f42207d4357df
> I get the following compile time error:
>
Well, that's strange, since commit itself doesn't change much....
how about the following one
-------8<---------8<----------
Re-organize iw header includes.
Reported-by: Németh Márton <nm127(a)freemail.hu>
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>
---
src/tuning/iw.c | 1 +
src/tuning/iw.h | 6 ------
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/tuning/iw.c b/src/tuning/iw.c
index aeba3fd..9e7508b 100644
--- a/src/tuning/iw.c
+++ b/src/tuning/iw.c
@@ -39,6 +39,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <unistd.h>
#include <stdbool.h>
+#include <linux/nl80211.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
#include <netlink/genl/ctrl.h>
diff --git a/src/tuning/iw.h b/src/tuning/iw.h
index acf132d..6ea5a3d 100644
--- a/src/tuning/iw.h
+++ b/src/tuning/iw.h
@@ -33,12 +33,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdbool.h>
-#include <netlink/netlink.h>
-#include <netlink/genl/genl.h>
-#include <netlink/genl/family.h>
-#include <netlink/genl/ctrl.h>
-
-#include <linux/nl80211.h>
#define ETH_ALEN 6
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-21 19:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18 13:54 [Powertop] [Discuss] [PATCH] iw: handle HAVE_LIBNL20 properly Sergey Senozhatsky
-- strict thread matches above, loose matches on Subject: below --
2012-05-21 19:19 Chris Ferron
2012-05-18 13:50 Arjan van de Ven
2012-05-18 10:26 Sergey Senozhatsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.