]> git.hungrycats.org Git - linux/commitdiff
[wireless atmel] minor updates
authorSimon Kelley <srk@thekelleys.org.uk>
Mon, 18 Aug 2003 20:04:11 +0000 (16:04 -0400)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 18 Aug 2003 20:04:11 +0000 (16:04 -0400)
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
drivers/net/wireless/atmel.c
drivers/net/wireless/atmel_cs.c

index 5f97d1cfb12bad2dbe0135462483ee3d45afcbf6..a9090fe5ab417fd472410eb3e171ddca232177d4 100644 (file)
@@ -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
index 290891cd4a52d317ace8eec53664bd09363253f0..2638b7613041f5343f363d241e8c3bae6d2c21bd 100644 (file)
 #include <linux/proc_fs.h>
 #include <linux/device.h>
 #include <linux/moduleparam.h>
-#ifdef CONFIG_FW_LOADER
 #include <linux/firmware.h>
-#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))
index cfc4b069e0e978249e186b709e028bbe37308931..bacf015ecf421d58928794a47cf807354e19773a 100644 (file)
@@ -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. */