nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /*************************************************************************** |
2 | * * |
||
3 | * ########### ########### ########## ########## * |
||
4 | * ############ ############ ############ ############ * |
||
5 | * ## ## ## ## ## ## ## * |
||
6 | * ## ## ## ## ## ## ## * |
||
7 | * ########### #### ###### ## ## ## ## ###### * |
||
8 | * ########### #### # ## ## ## ## # # * |
||
9 | * ## ## ###### ## ## ## ## # # * |
||
10 | * ## ## # ## ## ## ## # # * |
||
11 | * ############ ##### ###### ## ## ## ##### ###### * |
||
12 | * ########### ########### ## ## ## ########## * |
||
13 | * * |
||
14 | * S E C U R E M O B I L E N E T W O R K I N G * |
||
15 | * * |
||
16 | * This file is part of NexMon. * |
||
17 | * * |
||
18 | * Copyright (c) 2016 NexMon Team * |
||
19 | * * |
||
20 | * NexMon is free software: you can redistribute it and/or modify * |
||
21 | * it under the terms of the GNU General Public License as published by * |
||
22 | * the Free Software Foundation, either version 3 of the License, or * |
||
23 | * (at your option) any later version. * |
||
24 | * * |
||
25 | * NexMon is distributed in the hope that it will be useful, * |
||
26 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
27 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
28 | * GNU General Public License for more details. * |
||
29 | * * |
||
30 | * You should have received a copy of the GNU General Public License * |
||
31 | * along with NexMon. If not, see <http://www.gnu.org/licenses/>. * |
||
32 | * * |
||
33 | **************************************************************************/ |
||
34 | |||
35 | #pragma NEXMON targetregion "patch" |
||
36 | |||
37 | #include <firmware_version.h> |
||
38 | #include <wrapper.h> // wrapper definitions for functions that already exist in the firmware |
||
39 | #include <structs.h> // structures that are used by the code in the firmware |
||
40 | #include <patcher.h> |
||
41 | #include <helper.h> |
||
42 | #include <capabilities.h> // capabilities included in a nexmon patch |
||
43 | |||
44 | int capabilities = NEX_CAP_MONITOR_MODE | NEX_CAP_MONITOR_MODE_RADIOTAP | NEX_CAP_FRAME_INJECTION; |
||
45 | |||
46 | // Hook the call to wlc_ucode_write in wlc_ucode_download |
||
47 | __attribute__((at(WLC_UCODE_WRITE_BL_HOOK_ADDR, "", CHIP_VER_ALL, FW_VER_ALL))) |
||
48 | BLPatch(wlc_ucode_write_compressed, wlc_ucode_write_compressed); |
||
49 | |||
50 | __attribute__((at(HNDRTE_RECLAIM_0_END_PTR, "", CHIP_VER_ALL, FW_VER_ALL))) |
||
51 | GenericPatch4(hndrte_reclaim_0_end, PATCHSTART); |
||
52 | |||
53 | extern unsigned char templateram_bin[]; |
||
54 | |||
55 | // Moving template ram to another place in the ucode region |
||
56 | #if TEMPLATERAMSTART_PTR != 0 |
||
57 | __attribute__((at(TEMPLATERAMSTART_PTR, "", CHIP_VER_ALL, FW_VER_ALL))) |
||
58 | GenericPatch4(templateram_bin, templateram_bin); |
||
59 | #endif |