Sergio,

        If I had a guess, I would guess that the n900 probably has a
different set of compile time defines, that cause the ieee80211 structure to
be defined differently on the n900 vs a stock machine.  The compile time
failsafe is to make sure that the structure iee80211 is larger than skb->cb.
Run a grep on the code to find out where/how the ieee80211 structure is
being defined and you will probably find the issue.   

Nathan.

-----Original Message-----
From: maemo-developers-boun...@maemo.org
[mailto:maemo-developers-boun...@maemo.org] On Behalf Of Sergio Lembo
Sent: Thursday, June 17, 2010 3:08 AM
To: maemo-developers@maemo.org
Subject: N900 kernel 2.6.28 no compiles after changing cb[] array size


Hi,

   I am having an inconsistent state in the N900 kernel 2.6.28 when I make a
very simple
change:

   The problem is reproduced easily by just increasing the size of the
control buffer cb[] in struct sk_buff{} (include/linux/skbuff.h):

-       char                    cb[48];
-
+       char                    cb[62];

   Using cb[62] I get a compilation error :

CC [M]  net/mac80211/main.o
net/mac80211/main.c: In function 'ieee80211_init':
net/mac80211/main.c:1026: error: size of array 'type name' is negative
make[2]: *** [net/mac80211/main.o] Error 1
make[1]: *** [net/mac80211] Error 2
make: *** [net] Error 2

   The line with the error is a failsafe at compilation time
(net/mac80211/main.c):

        BUILD_BUG_ON(sizeof(struct ieee80211_tx_info) > sizeof(skb->cb));

   Bypassing such failsafe line the kernel compiles Ok, but the binary
flashed to the N900 fails to boot the system.

   I observe that such compilation error does not happen when compiling a
plain 2.6.28 kernel for a PC.

   And note that this error is just caused by changing the size of cb[] from
48 to 62; that is the only modification we made to the kernel sources.


Regards,

Sergio



_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to