Commit d64536b0 authored by Simon Kelley's avatar Simon Kelley Committed by Jeff Garzik

[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.
parent f9f04003
...@@ -284,6 +284,8 @@ config AIRO_CS ...@@ -284,6 +284,8 @@ config AIRO_CS
config PCMCIA_ATMEL config PCMCIA_ATMEL
tristate "Atmel at76c502/at76c504 PCMCIA cards" tristate "Atmel at76c502/at76c504 PCMCIA cards"
depends on NET_RADIO && EXPERIMENTAL && PCMCIA depends on NET_RADIO && EXPERIMENTAL && PCMCIA
enable FW_LOADER
enable CRC32
---help--- ---help---
A driver for PCMCIA 802.11 wireless cards based on the A driver for PCMCIA 802.11 wireless cards based on the
Atmel fast-vnet chips. This driver supports standard Atmel fast-vnet chips. This driver supports standard
......
...@@ -64,13 +64,11 @@ ...@@ -64,13 +64,11 @@
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#ifdef CONFIG_FW_LOADER
#include <linux/firmware.h> #include <linux/firmware.h>
#endif
#include "ieee802_11.h" #include "ieee802_11.h"
#define DRIVER_MAJOR 0 #define DRIVER_MAJOR 0
#define DRIVER_MINOR 7 #define DRIVER_MINOR 8
MODULE_AUTHOR("Simon Kelley"); MODULE_AUTHOR("Simon Kelley");
MODULE_DESCRIPTION("Support for Atmel at76c50x 802.11 wireless ethernet cards."); MODULE_DESCRIPTION("Support for Atmel at76c50x 802.11 wireless ethernet cards.");
...@@ -2057,12 +2055,13 @@ static int atmel_get_range(struct net_device *dev, ...@@ -2057,12 +2055,13 @@ static int atmel_get_range(struct net_device *dev,
range->num_channels = 0; range->num_channels = 0;
for (j = 0; j < sizeof(channel_table)/sizeof(channel_table[0]); j++) for (j = 0; j < sizeof(channel_table)/sizeof(channel_table[0]); j++)
if (priv->reg_domain == channel_table[j].reg_domain) { 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) { if (range->num_channels != 0) {
for(k = 0, i = channel_table[j].min; i <= channel_table[j].max; i++) { 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].i = i; /* List index */
range->freq[k].m = frequency_list[i] * 100000; range->freq[k].m = frequency_list[i-1] * 100000;
range->freq[k++].e = 1; /* Values in table in MHz -> * 10^5 * 10 */ range->freq[k++].e = 1; /* Values in table in MHz -> * 10^5 * 10 */
} }
range->num_frequency = k; range->num_frequency = k;
...@@ -3337,13 +3336,10 @@ int reset_atmel_card(struct net_device *dev) ...@@ -3337,13 +3336,10 @@ int reset_atmel_card(struct net_device *dev)
if (priv->card_type == CARD_TYPE_EEPROM) { if (priv->card_type == CARD_TYPE_EEPROM) {
/* copy in firmware if needed */ /* copy in firmware if needed */
#ifdef CONFIG_FW_LOADER
const struct firmware *fw_entry = NULL; const struct firmware *fw_entry = NULL;
#endif
unsigned char *fw; unsigned char *fw;
int len = priv->firmware_length; int len = priv->firmware_length;
if (!(fw = priv->firmware)) { if (!(fw = priv->firmware)) {
#ifdef CONFIG_FW_LOADER
if (strlen(priv->firmware_id) == 0) { if (strlen(priv->firmware_id) == 0) {
printk(KERN_INFO printk(KERN_INFO
"%s: card type is unknown: assuming at76c502 firmware is OK.\n", "%s: card type is unknown: assuming at76c502 firmware is OK.\n",
...@@ -3361,11 +3357,6 @@ int reset_atmel_card(struct net_device *dev) ...@@ -3361,11 +3357,6 @@ int reset_atmel_card(struct net_device *dev)
} }
fw = fw_entry->data; fw = fw_entry->data;
len = fw_entry->size; len = fw_entry->size;
#else
printk(KERN_ALERT
"%s: no firmware supplied, cannot start.\n", dev->name);
return 0;
#endif
} }
if (len <= 0x6000) { if (len <= 0x6000) {
...@@ -3381,10 +3372,8 @@ int reset_atmel_card(struct net_device *dev) ...@@ -3381,10 +3372,8 @@ int reset_atmel_card(struct net_device *dev)
atmel_copy_to_card(priv->dev, 0x8000, &fw[0x6000], len - 0x6000); atmel_copy_to_card(priv->dev, 0x8000, &fw[0x6000], len - 0x6000);
} }
#ifdef CONFIG_FW_LOADER
if (fw_entry) if (fw_entry)
release_firmware(fw_entry); release_firmware(fw_entry);
#endif
} }
if (!atmel_wakeup_firmware(priv)) if (!atmel_wakeup_firmware(priv))
......
...@@ -370,6 +370,7 @@ static struct { ...@@ -370,6 +370,7 @@ static struct {
{ 0, 0, "SMC/2632W", "atmel_at76c502d.bin", "SMC 2632W-V3" }, { 0, 0, "SMC/2632W", "atmel_at76c502d.bin", "SMC 2632W-V3" },
{ 0xd601, 0x0007, NULL, "atmel_at76c502.bin", "Sitecom WLAN-011"}, /* suspect - from a usenet posting. */ { 0xd601, 0x0007, NULL, "atmel_at76c502.bin", "Sitecom WLAN-011"}, /* suspect - from a usenet posting. */
{ 0x01bf, 0x3302, NULL, "atmel_at76c502d.bin", "Belkin F5D6060u"}, /* " " " " " */ { 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. */ /* This is strictly temporary, until PCMCIA devices get integrated into the device model. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment