From d64536b03f80d24e3c2d21e21510087468028722 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Mon, 18 Aug 2003 16:04:11 -0400 Subject: [PATCH] [wireless atmel] minor updates 1) Add another card to the PCMCIA card database. 2) Fix a bug in wireless extensions. 3) Remove extra code for compilation without the firmware loader 4) force-enable CRC32 and FW_LOADER in Kconfig. --- drivers/net/wireless/Kconfig | 2 ++ drivers/net/wireless/atmel.c | 21 +++++---------------- drivers/net/wireless/atmel_cs.c | 1 + 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 5f97d1cfb12ba..a9090fe5ab417 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig @@ -284,6 +284,8 @@ config AIRO_CS config PCMCIA_ATMEL tristate "Atmel at76c502/at76c504 PCMCIA cards" depends on NET_RADIO && EXPERIMENTAL && PCMCIA + enable FW_LOADER + enable CRC32 ---help--- A driver for PCMCIA 802.11 wireless cards based on the Atmel fast-vnet chips. This driver supports standard diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 290891cd4a52d..2638b7613041f 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c @@ -64,13 +64,11 @@ #include #include #include -#ifdef CONFIG_FW_LOADER #include -#endif #include "ieee802_11.h" #define DRIVER_MAJOR 0 -#define DRIVER_MINOR 7 +#define DRIVER_MINOR 8 MODULE_AUTHOR("Simon Kelley"); MODULE_DESCRIPTION("Support for Atmel at76c50x 802.11 wireless ethernet cards."); @@ -2057,12 +2055,13 @@ static int atmel_get_range(struct net_device *dev, range->num_channels = 0; for (j = 0; j < sizeof(channel_table)/sizeof(channel_table[0]); j++) if (priv->reg_domain == channel_table[j].reg_domain) { - range->num_channels = channel_table[j].max - channel_table[j].min + 1; + range->num_channels = channel_table[j].max - channel_table[j].min + 1; + break; } if (range->num_channels != 0) { for(k = 0, i = channel_table[j].min; i <= channel_table[j].max; i++) { - range->freq[k].i = i + 1; /* List index */ - range->freq[k].m = frequency_list[i] * 100000; + range->freq[k].i = i; /* List index */ + range->freq[k].m = frequency_list[i-1] * 100000; range->freq[k++].e = 1; /* Values in table in MHz -> * 10^5 * 10 */ } range->num_frequency = k; @@ -3337,13 +3336,10 @@ int reset_atmel_card(struct net_device *dev) if (priv->card_type == CARD_TYPE_EEPROM) { /* copy in firmware if needed */ -#ifdef CONFIG_FW_LOADER const struct firmware *fw_entry = NULL; -#endif unsigned char *fw; int len = priv->firmware_length; if (!(fw = priv->firmware)) { -#ifdef CONFIG_FW_LOADER if (strlen(priv->firmware_id) == 0) { printk(KERN_INFO "%s: card type is unknown: assuming at76c502 firmware is OK.\n", @@ -3361,11 +3357,6 @@ int reset_atmel_card(struct net_device *dev) } fw = fw_entry->data; len = fw_entry->size; -#else - printk(KERN_ALERT - "%s: no firmware supplied, cannot start.\n", dev->name); - return 0; -#endif } if (len <= 0x6000) { @@ -3381,10 +3372,8 @@ int reset_atmel_card(struct net_device *dev) atmel_copy_to_card(priv->dev, 0x8000, &fw[0x6000], len - 0x6000); } -#ifdef CONFIG_FW_LOADER if (fw_entry) release_firmware(fw_entry); -#endif } if (!atmel_wakeup_firmware(priv)) diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index cfc4b069e0e97..bacf015ecf421 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c @@ -370,6 +370,7 @@ static struct { { 0, 0, "SMC/2632W", "atmel_at76c502d.bin", "SMC 2632W-V3" }, { 0xd601, 0x0007, NULL, "atmel_at76c502.bin", "Sitecom WLAN-011"}, /* suspect - from a usenet posting. */ { 0x01bf, 0x3302, NULL, "atmel_at76c502d.bin", "Belkin F5D6060u"}, /* " " " " " */ + { 0, 0, "BT/Voyager 1020 Laptop Adapter", "atmel_at76c502.bin", "BT Voyager 1020"} }; /* This is strictly temporary, until PCMCIA devices get integrated into the device model. */ -- 2.53.0