3 # Copyright (C) 2006 OpenWrt.org
4 # Copyright (C) 2006 Felix Fietkau
6 # This is free software, licensed under the GNU General Public License v2.
7 # See /LICENSE for more information.
11 my $TABLE = pack("V", 0xbadc0ded);
13 my $SLT1 = "\x01\x00\x00\x00";
14 my $SLT2 = "\x02\x00\x00\x00";
15 my $ACKW = "\x03\x00\x00\x00";
16 my $PTABLE_END = "\xff\xff\xff\xff";
28 $TABLE .= pack("V", $value);
29 $TABLE .= pack("V", $default);
34 /^\w{8}\s*<(.*)>:$/ and $function = $1;
35 /^\s*(\w+):\s*(\w{8})\s*/ and do {
40 ($function eq 'wlc_update_slot_timing') and do {
41 # li a2,9 -- short slot time
42 ($opcode eq '24060009') and add_entry
($SLT1, hex($addr), hex($opcode));
43 # li v0,519 -- 510 + short slot time
44 ($opcode eq '24020207') and add_entry
($SLT2, hex($addr), hex($opcode));
46 # li a2,20 -- long slot time
47 ($opcode eq '24060014') and add_entry
($SLT1, hex($addr), hex($opcode));
48 # li v0,530 -- 510 + long slot time
49 ($opcode eq '24020212') and add_entry
($SLT2, hex($addr), hex($opcode));
51 ($function eq 'wlc_d11hdrs') and do {
52 # ori s6,s6,0x1 -- ack flag (new)
53 ($opcode eq '36d60001') and add_entry
($ACKW, hex($addr), hex($opcode));
54 # ori s3,s3,0x1 -- ack flag (old)
55 ($opcode eq '36730001') and add_entry
($ACKW, hex($addr), hex($opcode));
59 $TABLE .= $PTABLE_END;
60 $TABLE .= ("\x00" x
($TABLE_SIZE - length($TABLE)));
This page took 0.050443 seconds and 5 git commands to generate.