Commit 2c4f365a authored by Jeff Garzik's avatar Jeff Garzik

Merge branch 'upstream' of...

Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream
parents 3cb7396b 47c93d2f
...@@ -658,12 +658,6 @@ struct bcm43xx_pio { ...@@ -658,12 +658,6 @@ struct bcm43xx_pio {
#define BCM43xx_MAX_80211_CORES 2 #define BCM43xx_MAX_80211_CORES 2
#ifdef CONFIG_BCM947XX
#define core_offset(bcm) (bcm)->current_core_offset
#else
#define core_offset(bcm) 0
#endif
/* Generic information about a core. */ /* Generic information about a core. */
struct bcm43xx_coreinfo { struct bcm43xx_coreinfo {
u8 available:1, u8 available:1,
...@@ -789,10 +783,6 @@ struct bcm43xx_private { ...@@ -789,10 +783,6 @@ struct bcm43xx_private {
/* The currently active core. */ /* The currently active core. */
struct bcm43xx_coreinfo *current_core; struct bcm43xx_coreinfo *current_core;
#ifdef CONFIG_BCM947XX
/** current core memory offset */
u32 current_core_offset;
#endif
struct bcm43xx_coreinfo *active_80211_core; struct bcm43xx_coreinfo *active_80211_core;
/* coreinfo structs for all possible cores follow. /* coreinfo structs for all possible cores follow.
* Note that a core might not exist. * Note that a core might not exist.
...@@ -943,25 +933,25 @@ struct bcm43xx_lopair * bcm43xx_get_lopair(struct bcm43xx_phyinfo *phy, ...@@ -943,25 +933,25 @@ struct bcm43xx_lopair * bcm43xx_get_lopair(struct bcm43xx_phyinfo *phy,
static inline static inline
u16 bcm43xx_read16(struct bcm43xx_private *bcm, u16 offset) u16 bcm43xx_read16(struct bcm43xx_private *bcm, u16 offset)
{ {
return ioread16(bcm->mmio_addr + core_offset(bcm) + offset); return ioread16(bcm->mmio_addr + offset);
} }
static inline static inline
void bcm43xx_write16(struct bcm43xx_private *bcm, u16 offset, u16 value) void bcm43xx_write16(struct bcm43xx_private *bcm, u16 offset, u16 value)
{ {
iowrite16(value, bcm->mmio_addr + core_offset(bcm) + offset); iowrite16(value, bcm->mmio_addr + offset);
} }
static inline static inline
u32 bcm43xx_read32(struct bcm43xx_private *bcm, u16 offset) u32 bcm43xx_read32(struct bcm43xx_private *bcm, u16 offset)
{ {
return ioread32(bcm->mmio_addr + core_offset(bcm) + offset); return ioread32(bcm->mmio_addr + offset);
} }
static inline static inline
void bcm43xx_write32(struct bcm43xx_private *bcm, u16 offset, u32 value) void bcm43xx_write32(struct bcm43xx_private *bcm, u16 offset, u32 value)
{ {
iowrite32(value, bcm->mmio_addr + core_offset(bcm) + offset); iowrite32(value, bcm->mmio_addr + offset);
} }
static inline static inline
......
...@@ -660,10 +660,6 @@ struct bcm43xx_dmaring * bcm43xx_setup_dmaring(struct bcm43xx_private *bcm, ...@@ -660,10 +660,6 @@ struct bcm43xx_dmaring * bcm43xx_setup_dmaring(struct bcm43xx_private *bcm,
ring->routing = BCM43xx_DMA32_CLIENTTRANS; ring->routing = BCM43xx_DMA32_CLIENTTRANS;
if (dma64) if (dma64)
ring->routing = BCM43xx_DMA64_CLIENTTRANS; ring->routing = BCM43xx_DMA64_CLIENTTRANS;
#ifdef CONFIG_BCM947XX
if (bcm->pci_dev->bus->number == 0)
ring->routing = dma64 ? BCM43xx_DMA64_NOTRANS : BCM43xx_DMA32_NOTRANS;
#endif
ring->bcm = bcm; ring->bcm = bcm;
ring->nr_slots = nr_slots; ring->nr_slots = nr_slots;
......
...@@ -61,10 +61,6 @@ MODULE_AUTHOR("Stefano Brivio"); ...@@ -61,10 +61,6 @@ MODULE_AUTHOR("Stefano Brivio");
MODULE_AUTHOR("Michael Buesch"); MODULE_AUTHOR("Michael Buesch");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#ifdef CONFIG_BCM947XX
extern char *nvram_get(char *name);
#endif
#if defined(CONFIG_BCM43XX_DMA) && defined(CONFIG_BCM43XX_PIO) #if defined(CONFIG_BCM43XX_DMA) && defined(CONFIG_BCM43XX_PIO)
static int modparam_pio; static int modparam_pio;
module_param_named(pio, modparam_pio, int, 0444); module_param_named(pio, modparam_pio, int, 0444);
...@@ -142,10 +138,6 @@ MODULE_PARM_DESC(fwpostfix, "Postfix for .fw files. Useful for using multiple fi ...@@ -142,10 +138,6 @@ MODULE_PARM_DESC(fwpostfix, "Postfix for .fw files. Useful for using multiple fi
{ PCI_VENDOR_ID_BROADCOM, 0x4324, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { PCI_VENDOR_ID_BROADCOM, 0x4324, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
/* Broadcom 43XG 802.11b/g */ /* Broadcom 43XG 802.11b/g */
{ PCI_VENDOR_ID_BROADCOM, 0x4325, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { PCI_VENDOR_ID_BROADCOM, 0x4325, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
#ifdef CONFIG_BCM947XX
/* SB bus on BCM947xx */
{ PCI_VENDOR_ID_BROADCOM, 0x0800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
#endif
{ 0 }, { 0 },
}; };
MODULE_DEVICE_TABLE(pci, bcm43xx_pci_tbl); MODULE_DEVICE_TABLE(pci, bcm43xx_pci_tbl);
...@@ -786,9 +778,6 @@ static int bcm43xx_sprom_extract(struct bcm43xx_private *bcm) ...@@ -786,9 +778,6 @@ static int bcm43xx_sprom_extract(struct bcm43xx_private *bcm)
{ {
u16 value; u16 value;
u16 *sprom; u16 *sprom;
#ifdef CONFIG_BCM947XX
char *c;
#endif
sprom = kzalloc(BCM43xx_SPROM_SIZE * sizeof(u16), sprom = kzalloc(BCM43xx_SPROM_SIZE * sizeof(u16),
GFP_KERNEL); GFP_KERNEL);
...@@ -796,28 +785,7 @@ static int bcm43xx_sprom_extract(struct bcm43xx_private *bcm) ...@@ -796,28 +785,7 @@ static int bcm43xx_sprom_extract(struct bcm43xx_private *bcm)
printk(KERN_ERR PFX "sprom_extract OOM\n"); printk(KERN_ERR PFX "sprom_extract OOM\n");
return -ENOMEM; return -ENOMEM;
} }
#ifdef CONFIG_BCM947XX
sprom[BCM43xx_SPROM_BOARDFLAGS2] = atoi(nvram_get("boardflags2"));
sprom[BCM43xx_SPROM_BOARDFLAGS] = atoi(nvram_get("boardflags"));
if ((c = nvram_get("il0macaddr")) != NULL)
e_aton(c, (char *) &(sprom[BCM43xx_SPROM_IL0MACADDR]));
if ((c = nvram_get("et1macaddr")) != NULL)
e_aton(c, (char *) &(sprom[BCM43xx_SPROM_ET1MACADDR]));
sprom[BCM43xx_SPROM_PA0B0] = atoi(nvram_get("pa0b0"));
sprom[BCM43xx_SPROM_PA0B1] = atoi(nvram_get("pa0b1"));
sprom[BCM43xx_SPROM_PA0B2] = atoi(nvram_get("pa0b2"));
sprom[BCM43xx_SPROM_PA1B0] = atoi(nvram_get("pa1b0"));
sprom[BCM43xx_SPROM_PA1B1] = atoi(nvram_get("pa1b1"));
sprom[BCM43xx_SPROM_PA1B2] = atoi(nvram_get("pa1b2"));
sprom[BCM43xx_SPROM_BOARDREV] = atoi(nvram_get("boardrev"));
#else
bcm43xx_sprom_read(bcm, sprom); bcm43xx_sprom_read(bcm, sprom);
#endif
/* boardflags2 */ /* boardflags2 */
value = sprom[BCM43xx_SPROM_BOARDFLAGS2]; value = sprom[BCM43xx_SPROM_BOARDFLAGS2];
...@@ -1225,12 +1193,6 @@ static int _switch_core(struct bcm43xx_private *bcm, int core) ...@@ -1225,12 +1193,6 @@ static int _switch_core(struct bcm43xx_private *bcm, int core)
goto error; goto error;
udelay(10); udelay(10);
} }
#ifdef CONFIG_BCM947XX
if (bcm->pci_dev->bus->number == 0)
bcm->current_core_offset = 0x1000 * core;
else
bcm->current_core_offset = 0;
#endif
return 0; return 0;
error: error:
...@@ -1387,19 +1349,6 @@ void bcm43xx_wireless_core_reset(struct bcm43xx_private *bcm, int connect_phy) ...@@ -1387,19 +1349,6 @@ void bcm43xx_wireless_core_reset(struct bcm43xx_private *bcm, int connect_phy)
if ((bcm43xx_core_enabled(bcm)) && if ((bcm43xx_core_enabled(bcm)) &&
!bcm43xx_using_pio(bcm)) { !bcm43xx_using_pio(bcm)) {
//FIXME: Do we _really_ want #ifndef CONFIG_BCM947XX here?
#if 0
#ifndef CONFIG_BCM947XX
/* reset all used DMA controllers. */
bcm43xx_dmacontroller_tx_reset(bcm, BCM43xx_MMIO_DMA1_BASE);
bcm43xx_dmacontroller_tx_reset(bcm, BCM43xx_MMIO_DMA2_BASE);
bcm43xx_dmacontroller_tx_reset(bcm, BCM43xx_MMIO_DMA3_BASE);
bcm43xx_dmacontroller_tx_reset(bcm, BCM43xx_MMIO_DMA4_BASE);
bcm43xx_dmacontroller_rx_reset(bcm, BCM43xx_MMIO_DMA1_BASE);
if (bcm->current_core->rev < 5)
bcm43xx_dmacontroller_rx_reset(bcm, BCM43xx_MMIO_DMA4_BASE);
#endif
#endif
} }
if (bcm43xx_status(bcm) == BCM43xx_STAT_SHUTTINGDOWN) { if (bcm43xx_status(bcm) == BCM43xx_STAT_SHUTTINGDOWN) {
bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD,
...@@ -2140,32 +2089,11 @@ out: ...@@ -2140,32 +2089,11 @@ out:
return err; return err;
} }
#ifdef CONFIG_BCM947XX
static struct pci_device_id bcm43xx_47xx_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4324) },
{ 0 }
};
#endif
static int bcm43xx_initialize_irq(struct bcm43xx_private *bcm) static int bcm43xx_initialize_irq(struct bcm43xx_private *bcm)
{ {
int err; int err;
bcm->irq = bcm->pci_dev->irq; bcm->irq = bcm->pci_dev->irq;
#ifdef CONFIG_BCM947XX
if (bcm->pci_dev->bus->number == 0) {
struct pci_dev *d;
struct pci_device_id *id;
for (id = bcm43xx_47xx_ids; id->vendor; id++) {
d = pci_get_device(id->vendor, id->device, NULL);
if (d != NULL) {
bcm->irq = d->irq;
pci_dev_put(d);
break;
}
}
}
#endif
err = request_irq(bcm->irq, bcm43xx_interrupt_handler, err = request_irq(bcm->irq, bcm43xx_interrupt_handler,
IRQF_SHARED, KBUILD_MODNAME, bcm); IRQF_SHARED, KBUILD_MODNAME, bcm);
if (err) if (err)
...@@ -2645,10 +2573,6 @@ static int bcm43xx_probe_cores(struct bcm43xx_private *bcm) ...@@ -2645,10 +2573,6 @@ static int bcm43xx_probe_cores(struct bcm43xx_private *bcm)
chip_id_16 = 0x4610; chip_id_16 = 0x4610;
else if ((pci_device >= 0x4710) && (pci_device <= 0x4715)) else if ((pci_device >= 0x4710) && (pci_device <= 0x4715))
chip_id_16 = 0x4710; chip_id_16 = 0x4710;
#ifdef CONFIG_BCM947XX
else if ((pci_device >= 0x4320) && (pci_device <= 0x4325))
chip_id_16 = 0x4309;
#endif
else { else {
printk(KERN_ERR PFX "Could not determine Chip ID\n"); printk(KERN_ERR PFX "Could not determine Chip ID\n");
return -ENODEV; return -ENODEV;
...@@ -4144,11 +4068,6 @@ static int __devinit bcm43xx_init_one(struct pci_dev *pdev, ...@@ -4144,11 +4068,6 @@ static int __devinit bcm43xx_init_one(struct pci_dev *pdev,
struct bcm43xx_private *bcm; struct bcm43xx_private *bcm;
int err; int err;
#ifdef CONFIG_BCM947XX
if ((pdev->bus->number == 0) && (pdev->device != 0x0800))
return -ENODEV;
#endif
#ifdef DEBUG_SINGLE_DEVICE_ONLY #ifdef DEBUG_SINGLE_DEVICE_ONLY
if (strcmp(pci_name(pdev), DEBUG_SINGLE_DEVICE_ONLY)) if (strcmp(pci_name(pdev), DEBUG_SINGLE_DEVICE_ONLY))
return -ENODEV; return -ENODEV;
......
...@@ -33,25 +33,6 @@ ...@@ -33,25 +33,6 @@
#include "bcm43xx.h" #include "bcm43xx.h"
#ifdef CONFIG_BCM947XX
#define atoi(str) simple_strtoul(((str != NULL) ? str : ""), NULL, 0)
static inline void e_aton(char *str, char *dest)
{
int i = 0;
u16 *d = (u16 *) dest;
for (;;) {
dest[i++] = (char) simple_strtoul(str, NULL, 16);
str += 2;
if (!*str++ || i == 6)
break;
}
for (i = 0; i < 3; i++)
d[i] = cpu_to_be16(d[i]);
}
#endif
#define P4D_BYT3S(magic, nr_bytes) u8 __p4dding##magic[nr_bytes] #define P4D_BYT3S(magic, nr_bytes) u8 __p4dding##magic[nr_bytes]
#define P4D_BYTES(line, nr_bytes) P4D_BYT3S(line, nr_bytes) #define P4D_BYTES(line, nr_bytes) P4D_BYT3S(line, nr_bytes)
/* Magic helper macro to pad structures. Ignore those above. It's magic. */ /* Magic helper macro to pad structures. Ignore those above. It's magic. */
......
...@@ -40,6 +40,7 @@ static struct usb_device_id usb_ids[] = { ...@@ -40,6 +40,7 @@ static struct usb_device_id usb_ids[] = {
{ USB_DEVICE(0x126f, 0xa006), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x126f, 0xa006), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x0df6, 0x9071), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x0df6, 0x9071), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x0df6, 0x9075), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x157e, 0x300b), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x157e, 0x300b), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x079b, 0x004a), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x079b, 0x004a), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x1740, 0x2000), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x1740, 0x2000), .driver_info = DEVICE_ZD1211 },
...@@ -67,8 +68,11 @@ static struct usb_device_id usb_ids[] = { ...@@ -67,8 +68,11 @@ static struct usb_device_id usb_ids[] = {
{ USB_DEVICE(0x0586, 0x3410), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x0586, 0x3410), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x0baf, 0x0121), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x0baf, 0x0121), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x0586, 0x3412), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x0586, 0x3412), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x0586, 0x3413), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x0053, 0x5301), .driver_info = DEVICE_ZD1211B },
/* "Driverless" devices that need ejecting */ /* "Driverless" devices that need ejecting */
{ USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER }, { USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER },
{ USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER },
{} {}
}; };
......
...@@ -1291,6 +1291,8 @@ extern u8 ieee80211_get_channel_flags(struct ieee80211_device *ieee, ...@@ -1291,6 +1291,8 @@ extern u8 ieee80211_get_channel_flags(struct ieee80211_device *ieee,
extern const struct ieee80211_channel *ieee80211_get_channel(struct extern const struct ieee80211_channel *ieee80211_get_channel(struct
ieee80211_device ieee80211_device
*ieee, u8 channel); *ieee, u8 channel);
extern u32 ieee80211_channel_to_freq(struct ieee80211_device * ieee,
u8 channel);
/* ieee80211_wx.c */ /* ieee80211_wx.c */
extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee, extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
......
...@@ -94,6 +94,21 @@ int ieee80211_channel_to_index(struct ieee80211_device *ieee, u8 channel) ...@@ -94,6 +94,21 @@ int ieee80211_channel_to_index(struct ieee80211_device *ieee, u8 channel)
return -1; return -1;
} }
u32 ieee80211_channel_to_freq(struct ieee80211_device * ieee, u8 channel)
{
const struct ieee80211_channel * ch;
/* Driver needs to initialize the geography map before using
* these helper functions */
if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0)
return 0;
ch = ieee80211_get_channel(ieee, channel);
if (!ch->channel)
return 0;
return ch->freq;
}
u8 ieee80211_freq_to_channel(struct ieee80211_device * ieee, u32 freq) u8 ieee80211_freq_to_channel(struct ieee80211_device * ieee, u32 freq)
{ {
int i; int i;
...@@ -174,6 +189,7 @@ EXPORT_SYMBOL(ieee80211_get_channel); ...@@ -174,6 +189,7 @@ EXPORT_SYMBOL(ieee80211_get_channel);
EXPORT_SYMBOL(ieee80211_get_channel_flags); EXPORT_SYMBOL(ieee80211_get_channel_flags);
EXPORT_SYMBOL(ieee80211_is_valid_channel); EXPORT_SYMBOL(ieee80211_is_valid_channel);
EXPORT_SYMBOL(ieee80211_freq_to_channel); EXPORT_SYMBOL(ieee80211_freq_to_channel);
EXPORT_SYMBOL(ieee80211_channel_to_freq);
EXPORT_SYMBOL(ieee80211_channel_to_index); EXPORT_SYMBOL(ieee80211_channel_to_index);
EXPORT_SYMBOL(ieee80211_set_geo); EXPORT_SYMBOL(ieee80211_set_geo);
EXPORT_SYMBOL(ieee80211_get_geo); EXPORT_SYMBOL(ieee80211_get_geo);
...@@ -89,15 +89,17 @@ static char *ieee80211_translate_scan(struct ieee80211_device *ieee, ...@@ -89,15 +89,17 @@ static char *ieee80211_translate_scan(struct ieee80211_device *ieee,
start = iwe_stream_add_event(start, stop, &iwe, IW_EV_UINT_LEN); start = iwe_stream_add_event(start, stop, &iwe, IW_EV_UINT_LEN);
} }
/* Add frequency/channel */ /* Add channel and frequency */
iwe.cmd = SIOCGIWFREQ; iwe.cmd = SIOCGIWFREQ;
/* iwe.u.freq.m = ieee80211_frequency(network->channel, network->mode);
iwe.u.freq.e = 3; */
iwe.u.freq.m = network->channel; iwe.u.freq.m = network->channel;
iwe.u.freq.e = 0; iwe.u.freq.e = 0;
iwe.u.freq.i = 0; iwe.u.freq.i = 0;
start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN); start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN);
iwe.u.freq.m = ieee80211_channel_to_freq(ieee, network->channel);
iwe.u.freq.e = 6;
start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN);
/* Add encryption capability */ /* Add encryption capability */
iwe.cmd = SIOCGIWENCODE; iwe.cmd = SIOCGIWENCODE;
if (network->capability & WLAN_CAPABILITY_PRIVACY) if (network->capability & WLAN_CAPABILITY_PRIVACY)
......
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