ar71xx: add hard_cfg offset detection for rb2011 support - fixes wlan on some newer...
[openwrt/openwrt.git] / target / linux / ar71xx / files / arch / mips / ath79 / routerboot.h
1 /*
2 * RouterBoot definitions
3 *
4 * Copyright (C) 2012 Gabor Juhos <juhosg@openwrt.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 */
10
11 #ifndef _ATH79_ROUTERBOOT_H_
12 #define _ATH79_ROUTERBOOT_H_
13
14 #ifdef CONFIG_ATH79_ROUTERBOOT
15 int routerboot_find_tag(u8 *buf, unsigned int buflen, u16 tag_id,
16 u8 **tag_data, u16 *tag_len);
17 int routerboot_find_magic(u8 *buf, unsigned int buflen, u32 *offset, bool hard);
18 #else
19 static inline int
20 routerboot_find_tag(u8 *buf, unsigned int buflen, u16 tag_id,
21 u8 **tag_data, u16 *tag_len)
22 {
23 return -ENOENT;
24 }
25
26 static inline int
27 routerboot_find_magic(u8 *buf, unsigned int buflen, u32 *offset, bool hard)
28 {
29 return -ENOENT;
30 }
31 #endif
32
33 #endif /* _ATH79_ROUTERBOOT_H_ */