aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2010-08-21 18:00:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-25 14:33:18 -0400
commitd7065c305544d575c3697b46ddbc8601de03e46f (patch)
tree045878b92a08e7c69b0dcaa281dce07581987e78 /drivers/net/wireless/p54
parentb4c52612069c2756ad7506754765bfee57315efe (diff)
p54spi: Kconfig option for config blob
This patch adds an Kconfig option, which allows the user to select, whenever he/she wants to include a 4k blob for generic calibration and interface values into the driver, or cut the module size by about 15 to 20%. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r--drivers/net/wireless/p54/Kconfig17
-rw-r--r--drivers/net/wireless/p54/p54spi.c7
2 files changed, 23 insertions, 1 deletions
diff --git a/drivers/net/wireless/p54/Kconfig b/drivers/net/wireless/p54/Kconfig
index 60a930e45a8b..e5f45cb2a7a2 100644
--- a/drivers/net/wireless/p54/Kconfig
+++ b/drivers/net/wireless/p54/Kconfig
@@ -49,6 +49,23 @@ config P54_SPI
49 49
50 If you choose to build a module, it'll be called p54spi. 50 If you choose to build a module, it'll be called p54spi.
51 51
52config P54_SPI_DEFAULT_EEPROM
53 bool "Include fallback EEPROM blob"
54 depends on P54_SPI
55 default n
56 ---help---
57 Unlike the PCI or USB devices, the SPI variants don't have
58 a dedicated EEPROM chip to store all device specific values
59 for calibration, country and interface settings.
60
61 The driver will try to load the image "3826.eeprom", if the
62 file is put at the right place. (usually /lib/firmware.)
63
64 Only if this request fails, this option will provide a
65 backup set of generic values to get the device working.
66
67 Enabling this option adds about 4k to p54spi.
68
52config P54_LEDS 69config P54_LEDS
53 bool 70 bool
54 depends on P54_COMMON && MAC80211_LEDS && (LEDS_CLASS = y || LEDS_CLASS = P54_COMMON) 71 depends on P54_COMMON && MAC80211_LEDS && (LEDS_CLASS = y || LEDS_CLASS = P54_COMMON)
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index 087bf0698a5a..156e57dbd2cf 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -32,11 +32,14 @@
32#include <linux/slab.h> 32#include <linux/slab.h>
33 33
34#include "p54spi.h" 34#include "p54spi.h"
35#include "p54spi_eeprom.h"
36#include "p54.h" 35#include "p54.h"
37 36
38#include "lmac.h" 37#include "lmac.h"
39 38
39#ifdef CONFIG_P54_SPI_DEFAULT_EEPROM
40#include "p54spi_eeprom.h"
41#endif /* CONFIG_P54_SPI_DEFAULT_EEPROM */
42
40MODULE_FIRMWARE("3826.arm"); 43MODULE_FIRMWARE("3826.arm");
41MODULE_ALIAS("stlc45xx"); 44MODULE_ALIAS("stlc45xx");
42 45
@@ -195,9 +198,11 @@ static int p54spi_request_eeprom(struct ieee80211_hw *dev)
195 198
196 ret = request_firmware(&eeprom, "3826.eeprom", &priv->spi->dev); 199 ret = request_firmware(&eeprom, "3826.eeprom", &priv->spi->dev);
197 if (ret < 0) { 200 if (ret < 0) {
201#ifdef CONFIG_P54_SPI_DEFAULT_EEPROM
198 dev_info(&priv->spi->dev, "loading default eeprom...\n"); 202 dev_info(&priv->spi->dev, "loading default eeprom...\n");
199 ret = p54_parse_eeprom(dev, (void *) p54spi_eeprom, 203 ret = p54_parse_eeprom(dev, (void *) p54spi_eeprom,
200 sizeof(p54spi_eeprom)); 204 sizeof(p54spi_eeprom));
205#endif /* CONFIG_P54_SPI_DEFAULT_EEPROM */
201 } else { 206 } else {
202 dev_info(&priv->spi->dev, "loading user eeprom...\n"); 207 dev_info(&priv->spi->dev, "loading user eeprom...\n");
203 ret = p54_parse_eeprom(dev, (void *) eeprom->data, 208 ret = p54_parse_eeprom(dev, (void *) eeprom->data,