ahb.c (d94e5fcbf1420366dcb4102bafe04dbcfc0d0d4b) ahb.c (4d6b228d84ba992ee13c90312c1ed539191c94b1)
1/*
2 * Copyright (c) 2008-2009 Atheros Communications Inc.
3 * Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org>
4 * Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org>
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.

--- 26 unchanged lines hidden (view full) ---

35static bool ath_ahb_eeprom_read(struct ath_hw *ah, u32 off, u16 *data)
36{
37 struct ath_softc *sc = ah->ah_sc;
38 struct platform_device *pdev = to_platform_device(sc->dev);
39 struct ath9k_platform_data *pdata;
40
41 pdata = (struct ath9k_platform_data *) pdev->dev.platform_data;
42 if (off >= (ARRAY_SIZE(pdata->eeprom_data))) {
1/*
2 * Copyright (c) 2008-2009 Atheros Communications Inc.
3 * Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org>
4 * Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org>
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.

--- 26 unchanged lines hidden (view full) ---

35static bool ath_ahb_eeprom_read(struct ath_hw *ah, u32 off, u16 *data)
36{
37 struct ath_softc *sc = ah->ah_sc;
38 struct platform_device *pdev = to_platform_device(sc->dev);
39 struct ath9k_platform_data *pdata;
40
41 pdata = (struct ath9k_platform_data *) pdev->dev.platform_data;
42 if (off >= (ARRAY_SIZE(pdata->eeprom_data))) {
43 DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
43 DPRINTF(ah, ATH_DBG_FATAL,
44 "%s: flash read failed, offset %08x is out of range\n",
45 __func__, off);
46 return false;
47 }
48
49 *data = pdata->eeprom_data[off];
50 return true;
51}

--- 139 unchanged lines hidden ---
44 "%s: flash read failed, offset %08x is out of range\n",
45 __func__, off);
46 return false;
47 }
48
49 *data = pdata->eeprom_data[off];
50 return true;
51}

--- 139 unchanged lines hidden ---