/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. * Copyright (C) 2006 FON Technology, SL. * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org>
*/
/* * Now find the start of Radio Configuration data, using heuristics: * Search forward from Board Configuration data by 0x1000 bytes * at a time until we find non-0xffffffff.
*/
begin = bcfg + 0x1000;
end = limit; for (rcfg = begin; rcfg < end; rcfg += 0x1000) if (check_notempty(rcfg) && check_radio_magic(rcfg)) return rcfg;
/* AR2316 relocates radio config to new location */
begin = bcfg + 0xf8;
end = limit - 0x1000 + 0xf8; for (rcfg = begin; rcfg < end; rcfg += 0x1000) if (check_notempty(rcfg) && check_radio_magic(rcfg)) return rcfg;
return NULL;
}
/* * NB: Search region size could be larger than the actual flash size, * but this shouldn't be a problem here, because the flash * will simply be mapped multiple times.
*/ int __init ath25_find_config(phys_addr_t base, unsignedlong size)
{ constvoid __iomem *flash_base, *flash_limit; struct ath25_boarddata *config; unsignedint rcfg_size; int broken_boarddata = 0; constvoid __iomem *bcfg, *rcfg;
u8 *board_data;
u8 *radio_data;
u8 *mac_addr;
u32 offset;
mac_addr = &radio_data[0x1d * 2]; if (is_broadcast_ether_addr(mac_addr)) {
pr_info("Radio MAC is blank; using board-data\n");
ether_addr_copy(mac_addr, ath25_board.config->wlan0_mac);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.