2010-10-05 11:44:05     net/mac80211/wpa.c compiling error

Document created by Aaronwu Employee on Sep 26, 2013
Version 1Show Document
  • View in full screen mode

2010-10-05 11:44:05     net/mac80211/wpa.c compiling error

Kirill Zut (BELARUS)

Message: 94194   

 

Hello,

 

We have tried to use wpa2 wireless encryption mode on bf526 custom board with rtl8187 module. Association is done correctly but no any data can be sent - 'dhcp' fails by timeout, setting static ip and run 'ping' also have no result. Log from access point shows that device send incorrect packets.

 

Next investigation shows:

 

after execution line 312 from net/mac80211/wpa.c: ccmp_special_blocks()

 

309     /* AAD (extra authenticate-only data) / masked 802.11 header

310      * FC | A1 | A2 | A3 | SC | [A4] | [QC] */

311     put_unaligned_be16(len_a, &aad[0]);

312     put_unaligned(mask_fc, (__le16 *)&aad[2]);

 

aad[3] always contains 0x0 instead of high byte of 'mask_fc'.

 

objbump:

00000164 <_ccmp_special_blocks>:

...

 

232:   47 30           R0 = FP;

234:   a8 e6 02 00     B[P5 + 0x2] = R0;

238:   00 60           R0 = 0x0 (X);           /*              R0=0x0(  0) */

23a:   a9 e6 01 00     B[P5 + 0x1] = R1;

23e:   a8 e6 03 00     B[P5 + 0x3] = R0;

...

 

Declare 'mask_fc' as volatile (or use memcpy() instead of put_unaligned()) helps to solve the problem:

...

240:   b0 a9           R0 = W[SP + 0xc] (X);

242:   c0 42           R0 = R0.L (Z);

244:   a8 e6 02 00     B[P5 + 0x2] = R0;

248:   40 4e           R0 >>= 0x8;

24a:   a8 e6 03 00     B[P5 + 0x3] = R0;

...

 

toolchain version - blackfin-toolchain-09r1.1-2.i386.tar.bz2 + blackfin-toolchain-uclibc-full-09r1.1-2.i386.tar.bz2

kernel  - trunk rev8959, and checked on latest rev9188.

 

 

QuoteReplyEditDelete

 

 

2010-10-06 02:15:55     Re: net/mac80211/wpa.c compiling error

Simon Brewer (AUSTRALIA)

Message: 94209   

 

I am running the latest tools (gcc version 4.3.5 (ADI-2010R1-RC3) ) and it seems fine for me:

 

360:   b0 a9           R0 = W[SP + 0xc] (X);

362:   70 4a           BITSET (R0, 0xe);               /* bit 14 */

364:   c0 42           R0 = R0.L (Z);

366:   a8 e6 02 00     B[P5 + 0x2] = R0;

36a:   40 4e           R0 >>= 0x8;

36c:   a8 e6 03 00     B[P5 + 0x3] = R0;

 

 

Have you tried building with the latest?

QuoteReplyEditDelete

 

 

2010-10-06 03:06:18     Re: net/mac80211/wpa.c compiling error

Mike Frysinger (UNITED STATES)

Message: 94222   

 

mixing versions of tools isnt supported.  if you want to use trunk, you should be using something newer than 2009R1.

 

please read the FAQ:

http://docs.blackfin.uclinux.org/doku.php?id=faq

QuoteReplyEditDelete

 

 

2010-10-06 06:09:51     Re: net/mac80211/wpa.c compiling error

Kirill Zut (BELARUS)

Message: 94261   

 

Thanks a lot for your replies.  Using tools version 2010R1-RC3 solve the problem

Attachments

    Outcomes