Commit 9ce3075c authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (35 commits)
  Add support for the Davicom DM9161A PHY
  sky2: only disable 88e8056 on some boards
  sky2: 88e8071 support not ready
  skge: crash on shutdown/suspend
  sky2: fix oops on shutdown
  mlx4: don't use deprecated IRQ flags
  netxen_nic_main don't use deprecated irq flags
  Use menuconfig objects II - netdev/wan
  Use menuconfig objects II - netdev/pcmcia
  Use menuconfig objects II - netdev/atm
  Use menuconfig objects: netdev
  Use menuconfig objects: PHY
  spidernet: remove unnecessary accesses to phy
  S2IO: Statistics for link up/down and memory allocated/freed
  S2IO: statistics for memory allocation failuers
  S2IO: getringparam ethtool option
  [PATCH] libertas: 64-bit cleanups
  [PATCH] libertas: sparse fixes
  [PATCH] libertas: fix missing unlock in TX error path
  [PATCH] libertas: make debugfs.c sparse-clean
  ...
parents b3b7cc7b 17cf8cc9
...@@ -2,19 +2,22 @@ ...@@ -2,19 +2,22 @@
# ATM device configuration # ATM device configuration
# #
menu "ATM drivers" menuconfig ATM_DRIVERS
bool "ATM drivers"
depends on NETDEVICES && ATM depends on NETDEVICES && ATM
default y
if ATM_DRIVERS
config ATM_DUMMY config ATM_DUMMY
tristate "Dummy ATM driver" tristate "Dummy ATM driver"
depends on ATM
help help
Dummy ATM driver. Useful for proxy signalling, testing, Dummy ATM driver. Useful for proxy signalling, testing,
and development. If unsure, say N. and development. If unsure, say N.
config ATM_TCP config ATM_TCP
tristate "ATM over TCP" tristate "ATM over TCP"
depends on INET && ATM depends on INET
help help
ATM over TCP driver. Useful mainly for development and for ATM over TCP driver. Useful mainly for development and for
experiments. If unsure, say N. experiments. If unsure, say N.
...@@ -30,7 +33,7 @@ config ATM_LANAI ...@@ -30,7 +33,7 @@ config ATM_LANAI
config ATM_ENI config ATM_ENI
tristate "Efficient Networks ENI155P" tristate "Efficient Networks ENI155P"
depends on PCI && ATM depends on PCI
---help--- ---help---
Driver for the Efficient Networks ENI155p series and SMC ATM Driver for the Efficient Networks ENI155p series and SMC ATM
Power155 155 Mbps ATM adapters. Both, the versions with 512KB and Power155 155 Mbps ATM adapters. Both, the versions with 512KB and
...@@ -139,7 +142,7 @@ config ATM_ENI_BURST_RX_2W ...@@ -139,7 +142,7 @@ config ATM_ENI_BURST_RX_2W
config ATM_FIRESTREAM config ATM_FIRESTREAM
tristate "Fujitsu FireStream (FS50/FS155) " tristate "Fujitsu FireStream (FS50/FS155) "
depends on PCI && ATM depends on PCI
help help
Driver for the Fujitsu FireStream 155 (MB86697) and Driver for the Fujitsu FireStream 155 (MB86697) and
FireStream 50 (MB86695) ATM PCI chips. FireStream 50 (MB86695) ATM PCI chips.
...@@ -149,7 +152,7 @@ config ATM_FIRESTREAM ...@@ -149,7 +152,7 @@ config ATM_FIRESTREAM
config ATM_ZATM config ATM_ZATM
tristate "ZeitNet ZN1221/ZN1225" tristate "ZeitNet ZN1221/ZN1225"
depends on PCI && ATM depends on PCI
help help
Driver for the ZeitNet ZN1221 (MMF) and ZN1225 (UTP-5) 155 Mbps ATM Driver for the ZeitNet ZN1221 (MMF) and ZN1225 (UTP-5) 155 Mbps ATM
adapters. adapters.
...@@ -169,7 +172,7 @@ config ATM_ZATM_DEBUG ...@@ -169,7 +172,7 @@ config ATM_ZATM_DEBUG
config ATM_NICSTAR config ATM_NICSTAR
tristate "IDT 77201 (NICStAR) (ForeRunnerLE)" tristate "IDT 77201 (NICStAR) (ForeRunnerLE)"
depends on PCI && ATM && !64BIT depends on PCI && !64BIT
help help
The NICStAR chipset family is used in a large number of ATM NICs for The NICStAR chipset family is used in a large number of ATM NICs for
25 and for 155 Mbps, including IDT cards and the Fore ForeRunnerLE 25 and for 155 Mbps, including IDT cards and the Fore ForeRunnerLE
...@@ -202,7 +205,7 @@ config ATM_NICSTAR_USE_IDT77105 ...@@ -202,7 +205,7 @@ config ATM_NICSTAR_USE_IDT77105
config ATM_IDT77252 config ATM_IDT77252
tristate "IDT 77252 (NICStAR II)" tristate "IDT 77252 (NICStAR II)"
depends on PCI && ATM depends on PCI
help help
Driver for the IDT 77252 ATM PCI chips. Driver for the IDT 77252 ATM PCI chips.
...@@ -237,7 +240,7 @@ config ATM_IDT77252_USE_SUNI ...@@ -237,7 +240,7 @@ config ATM_IDT77252_USE_SUNI
config ATM_AMBASSADOR config ATM_AMBASSADOR
tristate "Madge Ambassador (Collage PCI 155 Server)" tristate "Madge Ambassador (Collage PCI 155 Server)"
depends on PCI && ATM depends on PCI
select BITREVERSE select BITREVERSE
help help
This is a driver for ATMizer based ATM card produced by Madge This is a driver for ATMizer based ATM card produced by Madge
...@@ -262,7 +265,7 @@ config ATM_AMBASSADOR_DEBUG ...@@ -262,7 +265,7 @@ config ATM_AMBASSADOR_DEBUG
config ATM_HORIZON config ATM_HORIZON
tristate "Madge Horizon [Ultra] (Collage PCI 25 and Collage PCI 155 Client)" tristate "Madge Horizon [Ultra] (Collage PCI 25 and Collage PCI 155 Client)"
depends on PCI && ATM depends on PCI
help help
This is a driver for the Horizon chipset ATM adapter cards once This is a driver for the Horizon chipset ATM adapter cards once
produced by Madge Networks Ltd. Say Y (or M to compile as a module produced by Madge Networks Ltd. Say Y (or M to compile as a module
...@@ -286,7 +289,7 @@ config ATM_HORIZON_DEBUG ...@@ -286,7 +289,7 @@ config ATM_HORIZON_DEBUG
config ATM_IA config ATM_IA
tristate "Interphase ATM PCI x575/x525/x531" tristate "Interphase ATM PCI x575/x525/x531"
depends on PCI && ATM && !64BIT depends on PCI && !64BIT
---help--- ---help---
This is a driver for the Interphase (i)ChipSAR adapter cards This is a driver for the Interphase (i)ChipSAR adapter cards
which include a variety of variants in term of the size of the which include a variety of variants in term of the size of the
...@@ -319,7 +322,7 @@ config ATM_IA_DEBUG ...@@ -319,7 +322,7 @@ config ATM_IA_DEBUG
config ATM_FORE200E_MAYBE config ATM_FORE200E_MAYBE
tristate "FORE Systems 200E-series" tristate "FORE Systems 200E-series"
depends on (PCI || SBUS) && ATM depends on PCI || SBUS
---help--- ---help---
This is a driver for the FORE Systems 200E-series ATM adapter This is a driver for the FORE Systems 200E-series ATM adapter
cards. It simultaneously supports PCA-200E and SBA-200E models cards. It simultaneously supports PCA-200E and SBA-200E models
...@@ -436,7 +439,7 @@ config ATM_FORE200E ...@@ -436,7 +439,7 @@ config ATM_FORE200E
config ATM_HE config ATM_HE
tristate "ForeRunner HE Series" tristate "ForeRunner HE Series"
depends on PCI && ATM depends on PCI
help help
This is a driver for the Marconi ForeRunner HE-series ATM adapter This is a driver for the Marconi ForeRunner HE-series ATM adapter
cards. It simultaneously supports the 155 and 622 versions. cards. It simultaneously supports the 155 and 622 versions.
...@@ -448,5 +451,4 @@ config ATM_HE_USE_SUNI ...@@ -448,5 +451,4 @@ config ATM_HE_USE_SUNI
Support for the S/UNI-Ultra and S/UNI-622 found in the ForeRunner Support for the S/UNI-Ultra and S/UNI-622 found in the ForeRunner
HE cards. This driver provides carrier detection some statistics. HE cards. This driver provides carrier detection some statistics.
endmenu endif # ATM
...@@ -1898,8 +1898,12 @@ endmenu ...@@ -1898,8 +1898,12 @@ endmenu
# Gigabit Ethernet # Gigabit Ethernet
# #
menu "Ethernet (1000 Mbit)" menuconfig NETDEV_1000
bool "Ethernet (1000 Mbit)"
depends on !UML depends on !UML
default y
if NETDEV_1000
config ACENIC config ACENIC
tristate "Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support" tristate "Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support"
...@@ -2326,14 +2330,18 @@ config ATL1 ...@@ -2326,14 +2330,18 @@ config ATL1
To compile this driver as a module, choose M here. The module To compile this driver as a module, choose M here. The module
will be called atl1. will be called atl1.
endmenu endif # NETDEV_1000
# #
# 10 Gigabit Ethernet # 10 Gigabit Ethernet
# #
menu "Ethernet (10000 Mbit)" menuconfig NETDEV_10000
bool "Ethernet (10000 Mbit)"
depends on !UML depends on !UML
default y
if NETDEV_10000
config CHELSIO_T1 config CHELSIO_T1
tristate "Chelsio 10Gb Ethernet support" tristate "Chelsio 10Gb Ethernet support"
...@@ -2507,7 +2515,7 @@ config MLX4_DEBUG ...@@ -2507,7 +2515,7 @@ config MLX4_DEBUG
debug_level module parameter (which can also be set after debug_level module parameter (which can also be set after
the driver is loaded through sysfs). the driver is loaded through sysfs).
endmenu endif # NETDEV_10000
source "drivers/net/tokenring/Kconfig" source "drivers/net/tokenring/Kconfig"
......
...@@ -623,7 +623,7 @@ int __devinit mlx4_init_eq_table(struct mlx4_dev *dev) ...@@ -623,7 +623,7 @@ int __devinit mlx4_init_eq_table(struct mlx4_dev *dev)
priv->eq_table.eq[MLX4_EQ_CATAS].have_irq = 1; priv->eq_table.eq[MLX4_EQ_CATAS].have_irq = 1;
} else { } else {
err = request_irq(dev->pdev->irq, mlx4_interrupt, err = request_irq(dev->pdev->irq, mlx4_interrupt,
SA_SHIRQ, DRV_NAME, dev); IRQF_SHARED, DRV_NAME, dev);
if (err) if (err)
goto err_out_async; goto err_out_async;
......
...@@ -735,7 +735,7 @@ static int netxen_nic_open(struct net_device *netdev) ...@@ -735,7 +735,7 @@ static int netxen_nic_open(struct net_device *netdev)
} }
adapter->irq = adapter->ahw.pdev->irq; adapter->irq = adapter->ahw.pdev->irq;
err = request_irq(adapter->ahw.pdev->irq, netxen_intr, err = request_irq(adapter->ahw.pdev->irq, netxen_intr,
SA_SHIRQ | SA_SAMPLE_RANDOM, netdev->name, IRQF_SHARED|IRQF_SAMPLE_RANDOM, netdev->name,
adapter); adapter);
if (err) { if (err) {
printk(KERN_ERR "request_irq failed with: %d\n", err); printk(KERN_ERR "request_irq failed with: %d\n", err);
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
# PCMCIA Network device configuration # PCMCIA Network device configuration
# #
menu "PCMCIA network device support" menuconfig NET_PCMCIA
depends on NETDEVICES && PCMCIA!=n
config NET_PCMCIA
bool "PCMCIA network device support" bool "PCMCIA network device support"
depends on PCMCIA
---help--- ---help---
Say Y if you would like to include support for any PCMCIA or CardBus Say Y if you would like to include support for any PCMCIA or CardBus
network adapters, then say Y to the driver for your particular card network adapters, then say Y to the driver for your particular card
...@@ -21,9 +19,10 @@ config NET_PCMCIA ...@@ -21,9 +19,10 @@ config NET_PCMCIA
If unsure, say N. If unsure, say N.
if NET_PCMCIA
config PCMCIA_3C589 config PCMCIA_3C589
tristate "3Com 3c589 PCMCIA support" tristate "3Com 3c589 PCMCIA support"
depends on NET_PCMCIA && PCMCIA
help help
Say Y here if you intend to attach a 3Com 3c589 or compatible PCMCIA Say Y here if you intend to attach a 3Com 3c589 or compatible PCMCIA
(PC-card) Ethernet card to your computer. (PC-card) Ethernet card to your computer.
...@@ -33,7 +32,6 @@ config PCMCIA_3C589 ...@@ -33,7 +32,6 @@ config PCMCIA_3C589
config PCMCIA_3C574 config PCMCIA_3C574
tristate "3Com 3c574 PCMCIA support" tristate "3Com 3c574 PCMCIA support"
depends on NET_PCMCIA && PCMCIA
help help
Say Y here if you intend to attach a 3Com 3c574 or compatible PCMCIA Say Y here if you intend to attach a 3Com 3c574 or compatible PCMCIA
(PC-card) Fast Ethernet card to your computer. (PC-card) Fast Ethernet card to your computer.
...@@ -43,7 +41,6 @@ config PCMCIA_3C574 ...@@ -43,7 +41,6 @@ config PCMCIA_3C574
config PCMCIA_FMVJ18X config PCMCIA_FMVJ18X
tristate "Fujitsu FMV-J18x PCMCIA support" tristate "Fujitsu FMV-J18x PCMCIA support"
depends on NET_PCMCIA && PCMCIA
select CRC32 select CRC32
help help
Say Y here if you intend to attach a Fujitsu FMV-J18x or compatible Say Y here if you intend to attach a Fujitsu FMV-J18x or compatible
...@@ -54,7 +51,6 @@ config PCMCIA_FMVJ18X ...@@ -54,7 +51,6 @@ config PCMCIA_FMVJ18X
config PCMCIA_PCNET config PCMCIA_PCNET
tristate "NE2000 compatible PCMCIA support" tristate "NE2000 compatible PCMCIA support"
depends on NET_PCMCIA && PCMCIA
select CRC32 select CRC32
help help
Say Y here if you intend to attach an NE2000 compatible PCMCIA Say Y here if you intend to attach an NE2000 compatible PCMCIA
...@@ -65,7 +61,6 @@ config PCMCIA_PCNET ...@@ -65,7 +61,6 @@ config PCMCIA_PCNET
config PCMCIA_NMCLAN config PCMCIA_NMCLAN
tristate "New Media PCMCIA support" tristate "New Media PCMCIA support"
depends on NET_PCMCIA && PCMCIA
help help
Say Y here if you intend to attach a New Media Ethernet or LiveWire Say Y here if you intend to attach a New Media Ethernet or LiveWire
PCMCIA (PC-card) Ethernet card to your computer. PCMCIA (PC-card) Ethernet card to your computer.
...@@ -75,7 +70,6 @@ config PCMCIA_NMCLAN ...@@ -75,7 +70,6 @@ config PCMCIA_NMCLAN
config PCMCIA_SMC91C92 config PCMCIA_SMC91C92
tristate "SMC 91Cxx PCMCIA support" tristate "SMC 91Cxx PCMCIA support"
depends on NET_PCMCIA && PCMCIA
select CRC32 select CRC32
select MII select MII
help help
...@@ -87,7 +81,6 @@ config PCMCIA_SMC91C92 ...@@ -87,7 +81,6 @@ config PCMCIA_SMC91C92
config PCMCIA_XIRC2PS config PCMCIA_XIRC2PS
tristate "Xircom 16-bit PCMCIA support" tristate "Xircom 16-bit PCMCIA support"
depends on NET_PCMCIA && PCMCIA
help help
Say Y here if you intend to attach a Xircom 16-bit PCMCIA (PC-card) Say Y here if you intend to attach a Xircom 16-bit PCMCIA (PC-card)
Ethernet or Fast Ethernet card to your computer. Ethernet or Fast Ethernet card to your computer.
...@@ -97,7 +90,6 @@ config PCMCIA_XIRC2PS ...@@ -97,7 +90,6 @@ config PCMCIA_XIRC2PS
config PCMCIA_AXNET config PCMCIA_AXNET
tristate "Asix AX88190 PCMCIA support" tristate "Asix AX88190 PCMCIA support"
depends on NET_PCMCIA && PCMCIA
---help--- ---help---
Say Y here if you intend to attach an Asix AX88190-based PCMCIA Say Y here if you intend to attach an Asix AX88190-based PCMCIA
(PC-card) Fast Ethernet card to your computer. These cards are (PC-card) Fast Ethernet card to your computer. These cards are
...@@ -109,7 +101,7 @@ config PCMCIA_AXNET ...@@ -109,7 +101,7 @@ config PCMCIA_AXNET
config ARCNET_COM20020_CS config ARCNET_COM20020_CS
tristate "COM20020 ARCnet PCMCIA support" tristate "COM20020 ARCnet PCMCIA support"
depends on NET_PCMCIA && ARCNET_COM20020 && PCMCIA depends on ARCNET_COM20020
help help
Say Y here if you intend to attach this type of ARCnet PCMCIA card Say Y here if you intend to attach this type of ARCnet PCMCIA card
to your computer. to your computer.
...@@ -119,7 +111,7 @@ config ARCNET_COM20020_CS ...@@ -119,7 +111,7 @@ config ARCNET_COM20020_CS
config PCMCIA_IBMTR config PCMCIA_IBMTR
tristate "IBM PCMCIA tokenring adapter support" tristate "IBM PCMCIA tokenring adapter support"
depends on NET_PCMCIA && IBMTR!=y && TR && PCMCIA && !64BIT depends on IBMTR!=y && TR && !64BIT
help help
Say Y here if you intend to attach this type of Token Ring PCMCIA Say Y here if you intend to attach this type of Token Ring PCMCIA
card to your computer. You then also need to say Y to "Token Ring card to your computer. You then also need to say Y to "Token Ring
...@@ -128,5 +120,4 @@ config PCMCIA_IBMTR ...@@ -128,5 +120,4 @@ config PCMCIA_IBMTR
To compile this driver as a module, choose M here: the module will be To compile this driver as a module, choose M here: the module will be
called ibmtr_cs. called ibmtr_cs.
endmenu endif # NET_PCMCIA
...@@ -2,70 +2,61 @@ ...@@ -2,70 +2,61 @@
# PHY Layer Configuration # PHY Layer Configuration
# #
menu "PHY device support" menuconfig PHYLIB
depends on !S390
config PHYLIB
tristate "PHY Device support and infrastructure" tristate "PHY Device support and infrastructure"
depends on !S390
depends on NET_ETHERNET && (BROKEN || !S390) depends on NET_ETHERNET && (BROKEN || !S390)
help help
Ethernet controllers are usually attached to PHY Ethernet controllers are usually attached to PHY
devices. This option provides infrastructure for devices. This option provides infrastructure for
managing PHY devices. managing PHY devices.
if PHYLIB
comment "MII PHY device drivers" comment "MII PHY device drivers"
depends on PHYLIB
config MARVELL_PHY config MARVELL_PHY
tristate "Drivers for Marvell PHYs" tristate "Drivers for Marvell PHYs"
depends on PHYLIB
---help--- ---help---
Currently has a driver for the 88E1011S Currently has a driver for the 88E1011S
config DAVICOM_PHY config DAVICOM_PHY
tristate "Drivers for Davicom PHYs" tristate "Drivers for Davicom PHYs"
depends on PHYLIB
---help--- ---help---
Currently supports dm9161e and dm9131 Currently supports dm9161e and dm9131
config QSEMI_PHY config QSEMI_PHY
tristate "Drivers for Quality Semiconductor PHYs" tristate "Drivers for Quality Semiconductor PHYs"
depends on PHYLIB
---help--- ---help---
Currently supports the qs6612 Currently supports the qs6612
config LXT_PHY config LXT_PHY
tristate "Drivers for the Intel LXT PHYs" tristate "Drivers for the Intel LXT PHYs"
depends on PHYLIB
---help--- ---help---
Currently supports the lxt970, lxt971 Currently supports the lxt970, lxt971
config CICADA_PHY config CICADA_PHY
tristate "Drivers for the Cicada PHYs" tristate "Drivers for the Cicada PHYs"
depends on PHYLIB
---help--- ---help---
Currently supports the cis8204 Currently supports the cis8204
config VITESSE_PHY config VITESSE_PHY
tristate "Drivers for the Vitesse PHYs" tristate "Drivers for the Vitesse PHYs"
depends on PHYLIB
---help--- ---help---
Currently supports the vsc8244 Currently supports the vsc8244
config SMSC_PHY config SMSC_PHY
tristate "Drivers for SMSC PHYs" tristate "Drivers for SMSC PHYs"
depends on PHYLIB
---help--- ---help---
Currently supports the LAN83C185 PHY Currently supports the LAN83C185 PHY
config BROADCOM_PHY config BROADCOM_PHY
tristate "Drivers for Broadcom PHYs" tristate "Drivers for Broadcom PHYs"
depends on PHYLIB
---help--- ---help---
Currently supports the BCM5411, BCM5421 and BCM5461 PHYs. Currently supports the BCM5411, BCM5421 and BCM5461 PHYs.
config FIXED_PHY config FIXED_PHY
tristate "Drivers for PHY emulation on fixed speed/link" tristate "Drivers for PHY emulation on fixed speed/link"
depends on PHYLIB
---help--- ---help---
Adds the driver to PHY layer to cover the boards that do not have any PHY bound, Adds the driver to PHY layer to cover the boards that do not have any PHY bound,
but with the ability to manipulate the speed/link in software. The relevant MII but with the ability to manipulate the speed/link in software. The relevant MII
...@@ -80,5 +71,4 @@ config FIXED_MII_100_FDX ...@@ -80,5 +71,4 @@ config FIXED_MII_100_FDX
bool "Emulation for 100M Fdx fixed PHY behavior" bool "Emulation for 100M Fdx fixed PHY behavior"
depends on FIXED_PHY depends on FIXED_PHY
endmenu endif # PHYLIB
...@@ -139,7 +139,7 @@ static int dm9161_ack_interrupt(struct phy_device *phydev) ...@@ -139,7 +139,7 @@ static int dm9161_ack_interrupt(struct phy_device *phydev)
return (err < 0) ? err : 0; return (err < 0) ? err : 0;
} }
static struct phy_driver dm9161_driver = { static struct phy_driver dm9161e_driver = {
.phy_id = 0x0181b880, .phy_id = 0x0181b880,
.name = "Davicom DM9161E", .name = "Davicom DM9161E",
.phy_id_mask = 0x0ffffff0, .phy_id_mask = 0x0ffffff0,
...@@ -147,7 +147,18 @@ static struct phy_driver dm9161_driver = { ...@@ -147,7 +147,18 @@ static struct phy_driver dm9161_driver = {
.config_init = dm9161_config_init, .config_init = dm9161_config_init,
.config_aneg = dm9161_config_aneg, .config_aneg = dm9161_config_aneg,
.read_status = genphy_read_status, .read_status = genphy_read_status,
.driver = { .owner = THIS_MODULE,}, .driver = { .owner = THIS_MODULE,},
};
static struct phy_driver dm9161a_driver = {
.phy_id = 0x0181b8a0,
.name = "Davicom DM9161A",
.phy_id_mask = 0x0ffffff0,
.features = PHY_BASIC_FEATURES,
.config_init = dm9161_config_init,
.config_aneg = dm9161_config_aneg,
.read_status = genphy_read_status,
.driver = { .owner = THIS_MODULE,},
}; };
static struct phy_driver dm9131_driver = { static struct phy_driver dm9131_driver = {
...@@ -160,31 +171,38 @@ static struct phy_driver dm9131_driver = { ...@@ -160,31 +171,38 @@ static struct phy_driver dm9131_driver = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = dm9161_ack_interrupt, .ack_interrupt = dm9161_ack_interrupt,
.config_intr = dm9161_config_intr, .config_intr = dm9161_config_intr,
.driver = { .owner = THIS_MODULE,}, .driver = { .owner = THIS_MODULE,},
}; };
static int __init davicom_init(void) static int __init davicom_init(void)
{ {
int ret; int ret;
ret = phy_driver_register(&dm9161_driver); ret = phy_driver_register(&dm9161e_driver);
if (ret) if (ret)
goto err1; goto err1;
ret = phy_driver_register(&dm9131_driver); ret = phy_driver_register(&dm9161a_driver);
if (ret) if (ret)
goto err2; goto err2;
ret = phy_driver_register(&dm9131_driver);
if (ret)
goto err3;
return 0; return 0;
err2: err3:
phy_driver_unregister(&dm9161_driver); phy_driver_unregister(&dm9161a_driver);
err2:
phy_driver_unregister(&dm9161e_driver);
err1: err1:
return ret; return ret;
} }
static void __exit davicom_exit(void) static void __exit davicom_exit(void)
{ {
phy_driver_unregister(&dm9161_driver); phy_driver_unregister(&dm9161e_driver);
phy_driver_unregister(&dm9161a_driver);
phy_driver_unregister(&dm9131_driver); phy_driver_unregister(&dm9131_driver);
} }
......
This diff is collapsed.
...@@ -95,6 +95,32 @@ struct swStat { ...@@ -95,6 +95,32 @@ struct swStat {
unsigned long long flush_max_pkts; unsigned long long flush_max_pkts;
unsigned long long sum_avg_pkts_aggregated; unsigned long long sum_avg_pkts_aggregated;
unsigned long long num_aggregations; unsigned long long num_aggregations;
/* Other statistics */
unsigned long long mem_alloc_fail_cnt;
unsigned long long watchdog_timer_cnt;
unsigned long long mem_allocated;
unsigned long long mem_freed;
unsigned long long link_up_cnt;
unsigned long long link_down_cnt;
unsigned long long link_up_time;
unsigned long long link_down_time;
/* Transfer Code statistics */
unsigned long long tx_buf_abort_cnt;
unsigned long long tx_desc_abort_cnt;
unsigned long long tx_parity_err_cnt;
unsigned long long tx_link_loss_cnt;
unsigned long long tx_list_proc_err_cnt;
unsigned long long rx_parity_err_cnt;
unsigned long long rx_abort_cnt;
unsigned long long rx_parity_abort_cnt;
unsigned long long rx_rda_fail_cnt;
unsigned long long rx_unkn_prot_cnt;
unsigned long long rx_fcs_err_cnt;
unsigned long long rx_buf_size_err_cnt;
unsigned long long rx_rxd_corrupt_cnt;
unsigned long long rx_unkn_err_cnt;
}; };
/* Xpak releated alarm and warnings */ /* Xpak releated alarm and warnings */
...@@ -308,6 +334,11 @@ struct stat_block { ...@@ -308,6 +334,11 @@ struct stat_block {
#define MAX_TX_FIFOS 8 #define MAX_TX_FIFOS 8
#define MAX_RX_RINGS 8 #define MAX_RX_RINGS 8
#define MAX_RX_DESC_1 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 127 )
#define MAX_RX_DESC_2 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 85 )
#define MAX_RX_DESC_3 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 85 )
#define MAX_TX_DESC (MAX_AVAILABLE_TXDS)
/* FIFO mappings for all possible number of fifos configured */ /* FIFO mappings for all possible number of fifos configured */
static int fifo_map[][MAX_TX_FIFOS] = { static int fifo_map[][MAX_TX_FIFOS] = {
{0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0},
...@@ -819,6 +850,7 @@ struct s2io_nic { ...@@ -819,6 +850,7 @@ struct s2io_nic {
#define LINK_UP 2 #define LINK_UP 2
int task_flag; int task_flag;
unsigned long long start_time;
#define CARD_DOWN 1 #define CARD_DOWN 1
#define CARD_UP 2 #define CARD_UP 2
atomic_t card_state; atomic_t card_state;
......
...@@ -3802,6 +3802,9 @@ static int skge_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -3802,6 +3802,9 @@ static int skge_suspend(struct pci_dev *pdev, pm_message_t state)
struct skge_hw *hw = pci_get_drvdata(pdev); struct skge_hw *hw = pci_get_drvdata(pdev);
int i, err, wol = 0; int i, err, wol = 0;
if (!hw)
return 0;
err = pci_save_state(pdev); err = pci_save_state(pdev);
if (err) if (err)
return err; return err;
...@@ -3830,6 +3833,9 @@ static int skge_resume(struct pci_dev *pdev) ...@@ -3830,6 +3833,9 @@ static int skge_resume(struct pci_dev *pdev)
struct skge_hw *hw = pci_get_drvdata(pdev); struct skge_hw *hw = pci_get_drvdata(pdev);
int i, err; int i, err;
if (!hw)
return 0;
err = pci_set_power_state(pdev, PCI_D0); err = pci_set_power_state(pdev, PCI_D0);
if (err) if (err)
goto out; goto out;
...@@ -3868,6 +3874,9 @@ static void skge_shutdown(struct pci_dev *pdev) ...@@ -3868,6 +3874,9 @@ static void skge_shutdown(struct pci_dev *pdev)
struct skge_hw *hw = pci_get_drvdata(pdev); struct skge_hw *hw = pci_get_drvdata(pdev);
int i, wol = 0; int i, wol = 0;
if (!hw)
return;
for (i = 0; i < hw->ports; i++) { for (i = 0; i < hw->ports; i++) {
struct net_device *dev = hw->dev[i]; struct net_device *dev = hw->dev[i];
struct skge_port *skge = netdev_priv(dev); struct skge_port *skge = netdev_priv(dev);
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#include <linux/prefetch.h> #include <linux/prefetch.h>
#include <linux/mii.h> #include <linux/mii.h>
#include <linux/dmi.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -130,7 +131,7 @@ static const struct pci_device_id sky2_id_table[] = { ...@@ -130,7 +131,7 @@ static const struct pci_device_id sky2_id_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4368) }, /* 88EC034 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4368) }, /* 88EC034 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4369) }, /* 88EC042 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4369) }, /* 88EC042 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436A) }, /* 88E8058 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436A) }, /* 88E8058 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */ // { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */
{ 0 } { 0 }
}; };
...@@ -150,6 +151,8 @@ static const char *yukon2_name[] = { ...@@ -150,6 +151,8 @@ static const char *yukon2_name[] = {
"FE", /* 0xb7 */ "FE", /* 0xb7 */
}; };
static int dmi_blacklisted;
/* Access to external PHY */ /* Access to external PHY */
static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val) static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val)
{ {
...@@ -2531,6 +2534,17 @@ static int __devinit sky2_init(struct sky2_hw *hw) ...@@ -2531,6 +2534,17 @@ static int __devinit sky2_init(struct sky2_hw *hw)
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
/* Some Gigabyte motherboards have 88e8056 but cause problems
* There is some unresolved hardware related problem that causes
* descriptor errors and receive data corruption.
*/
if (hw->chip_id == CHIP_ID_YUKON_EC_U && dmi_blacklisted) {
dev_err(&hw->pdev->dev,
"88E8056 on this motherboard not supported\n");
return -EOPNOTSUPP;
}
hw->pmd_type = sky2_read8(hw, B2_PMD_TYP); hw->pmd_type = sky2_read8(hw, B2_PMD_TYP);
hw->ports = 1; hw->ports = 1;
t8 = sky2_read8(hw, B2_Y2_HW_RES); t8 = sky2_read8(hw, B2_Y2_HW_RES);
...@@ -3578,17 +3592,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev, ...@@ -3578,17 +3592,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
goto err_out; goto err_out;
} }
/* Some Gigabyte motherboards have 88e8056 but cause problems
* There is some unresolved hardware related problem that causes
* descriptor errors and receive data corruption.
*/
if (pdev->vendor == PCI_VENDOR_ID_MARVELL &&
pdev->device == 0x4364 && pdev->subsystem_vendor == 0x1458) {
dev_err(&pdev->dev,
"88E8056 on Gigabyte motherboards not supported\n");
goto err_out_disable;
}
err = pci_request_regions(pdev, DRV_NAME); err = pci_request_regions(pdev, DRV_NAME);
if (err) { if (err) {
dev_err(&pdev->dev, "cannot obtain PCI resources\n"); dev_err(&pdev->dev, "cannot obtain PCI resources\n");
...@@ -3732,6 +3735,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev, ...@@ -3732,6 +3735,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
err_out_disable: err_out_disable:
pci_disable_device(pdev); pci_disable_device(pdev);
err_out: err_out:
pci_set_drvdata(pdev, NULL);
return err; return err;
} }
...@@ -3784,6 +3788,9 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -3784,6 +3788,9 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state)
struct sky2_hw *hw = pci_get_drvdata(pdev); struct sky2_hw *hw = pci_get_drvdata(pdev);
int i, wol = 0; int i, wol = 0;
if (!hw)
return 0;
del_timer_sync(&hw->idle_timer); del_timer_sync(&hw->idle_timer);
netif_poll_disable(hw->dev[0]); netif_poll_disable(hw->dev[0]);
...@@ -3815,6 +3822,9 @@ static int sky2_resume(struct pci_dev *pdev) ...@@ -3815,6 +3822,9 @@ static int sky2_resume(struct pci_dev *pdev)
struct sky2_hw *hw = pci_get_drvdata(pdev); struct sky2_hw *hw = pci_get_drvdata(pdev);
int i, err; int i, err;
if (!hw)
return 0;
err = pci_set_power_state(pdev, PCI_D0); err = pci_set_power_state(pdev, PCI_D0);
if (err) if (err)
goto out; goto out;
...@@ -3861,6 +3871,9 @@ static void sky2_shutdown(struct pci_dev *pdev) ...@@ -3861,6 +3871,9 @@ static void sky2_shutdown(struct pci_dev *pdev)
struct sky2_hw *hw = pci_get_drvdata(pdev); struct sky2_hw *hw = pci_get_drvdata(pdev);
int i, wol = 0; int i, wol = 0;
if (!hw)
return;
del_timer_sync(&hw->idle_timer); del_timer_sync(&hw->idle_timer);
netif_poll_disable(hw->dev[0]); netif_poll_disable(hw->dev[0]);
...@@ -3897,8 +3910,24 @@ static struct pci_driver sky2_driver = { ...@@ -3897,8 +3910,24 @@ static struct pci_driver sky2_driver = {
.shutdown = sky2_shutdown, .shutdown = sky2_shutdown,
}; };
static struct dmi_system_id __initdata broken_dmi_table[] = {
{
.ident = "Gigabyte 965P-S3",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Gigabyte Technology Co., Ltd."),
DMI_MATCH(DMI_PRODUCT_NAME, "965P-S3"),
},
},
{ }
};
static int __init sky2_init_module(void) static int __init sky2_init_module(void)
{ {
/* Look for sick motherboards */
if (dmi_check_system(broken_dmi_table))
dmi_blacklisted = 1;
return pci_register_driver(&sky2_driver); return pci_register_driver(&sky2_driver);
} }
......
...@@ -175,12 +175,10 @@ spider_net_setup_aneg(struct spider_net_card *card) ...@@ -175,12 +175,10 @@ spider_net_setup_aneg(struct spider_net_card *card)
{ {
struct mii_phy *phy = &card->phy; struct mii_phy *phy = &card->phy;
u32 advertise = 0; u32 advertise = 0;
u16 bmcr, bmsr, stat1000, estat; u16 bmsr, estat;
bmcr = spider_net_read_phy(card->netdev, phy->mii_id, MII_BMCR); bmsr = spider_net_read_phy(card->netdev, phy->mii_id, MII_BMSR);
bmsr = spider_net_read_phy(card->netdev, phy->mii_id, MII_BMSR); estat = spider_net_read_phy(card->netdev, phy->mii_id, MII_ESTATUS);
stat1000 = spider_net_read_phy(card->netdev, phy->mii_id, MII_STAT1000);
estat = spider_net_read_phy(card->netdev, phy->mii_id, MII_ESTATUS);
if (bmsr & BMSR_10HALF) if (bmsr & BMSR_10HALF)
advertise |= ADVERTISED_10baseT_Half; advertise |= ADVERTISED_10baseT_Half;
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
# wan devices configuration # wan devices configuration
# #
menu "Wan interfaces" menuconfig WAN
depends on NETDEVICES
config WAN
bool "Wan interfaces support" bool "Wan interfaces support"
---help--- ---help---
Wide Area Networks (WANs), such as X.25, Frame Relay and leased Wide Area Networks (WANs), such as X.25, Frame Relay and leased
...@@ -23,10 +20,12 @@ config WAN ...@@ -23,10 +20,12 @@ config WAN
If unsure, say N. If unsure, say N.
if WAN
# There is no way to detect a comtrol sv11 - force it modular for now. # There is no way to detect a comtrol sv11 - force it modular for now.
config HOSTESS_SV11 config HOSTESS_SV11
tristate "Comtrol Hostess SV-11 support" tristate "Comtrol Hostess SV-11 support"
depends on WAN && ISA && m && ISA_DMA_API && INET depends on ISA && m && ISA_DMA_API && INET
help help
Driver for Comtrol Hostess SV-11 network card which Driver for Comtrol Hostess SV-11 network card which
operates on low speed synchronous serial links at up to operates on low speed synchronous serial links at up to
...@@ -38,7 +37,7 @@ config HOSTESS_SV11 ...@@ -38,7 +37,7 @@ config HOSTESS_SV11
# The COSA/SRP driver has not been tested as non-modular yet. # The COSA/SRP driver has not been tested as non-modular yet.
config COSA config COSA
tristate "COSA/SRP sync serial boards support" tristate "COSA/SRP sync serial boards support"
depends on WAN && ISA && m && ISA_DMA_API depends on ISA && m && ISA_DMA_API
---help--- ---help---
Driver for COSA and SRP synchronous serial boards. Driver for COSA and SRP synchronous serial boards.
...@@ -62,7 +61,7 @@ config COSA ...@@ -62,7 +61,7 @@ config COSA
# #
config LANMEDIA config LANMEDIA
tristate "LanMedia Corp. SSI/V.35, T1/E1, HSSI, T3 boards" tristate "LanMedia Corp. SSI/V.35, T1/E1, HSSI, T3 boards"
depends on WAN && PCI depends on PCI
---help--- ---help---
Driver for the following Lan Media family of serial boards: Driver for the following Lan Media family of serial boards:
...@@ -89,7 +88,7 @@ config LANMEDIA ...@@ -89,7 +88,7 @@ config LANMEDIA
# There is no way to detect a Sealevel board. Force it modular # There is no way to detect a Sealevel board. Force it modular
config SEALEVEL_4021 config SEALEVEL_4021
tristate "Sealevel Systems 4021 support" tristate "Sealevel Systems 4021 support"
depends on WAN && ISA && m && ISA_DMA_API && INET depends on ISA && m && ISA_DMA_API && INET
help help
This is a driver for the Sealevel Systems ACB 56 serial I/O adapter. This is a driver for the Sealevel Systems ACB 56 serial I/O adapter.
...@@ -99,7 +98,6 @@ config SEALEVEL_4021 ...@@ -99,7 +98,6 @@ config SEALEVEL_4021
# Generic HDLC # Generic HDLC
config HDLC config HDLC
tristate "Generic HDLC layer" tristate "Generic HDLC layer"
depends on WAN
help help
Say Y to this option if your Linux box contains a WAN (Wide Area Say Y to this option if your Linux box contains a WAN (Wide Area
Network) card supported by this driver and you are planning to Network) card supported by this driver and you are planning to
...@@ -167,7 +165,7 @@ config HDLC_X25 ...@@ -167,7 +165,7 @@ config HDLC_X25
If unsure, say N. If unsure, say N.
comment "X.25/LAPB support is disabled" comment "X.25/LAPB support is disabled"
depends on WAN && HDLC && (LAPB!=m || HDLC!=m) && LAPB!=y depends on HDLC && (LAPB!=m || HDLC!=m) && LAPB!=y
config PCI200SYN config PCI200SYN
tristate "Goramo PCI200SYN support" tristate "Goramo PCI200SYN support"
...@@ -230,10 +228,10 @@ config PC300_MLPPP ...@@ -230,10 +228,10 @@ config PC300_MLPPP
Multilink PPP over the PC300 synchronous communication boards. Multilink PPP over the PC300 synchronous communication boards.
comment "Cyclades-PC300 MLPPP support is disabled." comment "Cyclades-PC300 MLPPP support is disabled."
depends on WAN && HDLC && PC300 && (PPP=n || !PPP_MULTILINK || PPP_SYNC_TTY=n || !HDLC_PPP) depends on HDLC && PC300 && (PPP=n || !PPP_MULTILINK || PPP_SYNC_TTY=n || !HDLC_PPP)
comment "Refer to the file README.mlppp, provided by PC300 package." comment "Refer to the file README.mlppp, provided by PC300 package."
depends on WAN && HDLC && PC300 && (PPP=n || !PPP_MULTILINK || PPP_SYNC_TTY=n || !HDLC_PPP) depends on HDLC && PC300 && (PPP=n || !PPP_MULTILINK || PPP_SYNC_TTY=n || !HDLC_PPP)
config PC300TOO config PC300TOO
tristate "Cyclades PC300 RSV/X21 alternative support" tristate "Cyclades PC300 RSV/X21 alternative support"
...@@ -338,7 +336,6 @@ config DSCC4_PCI_RST ...@@ -338,7 +336,6 @@ config DSCC4_PCI_RST
config DLCI config DLCI
tristate "Frame Relay DLCI support" tristate "Frame Relay DLCI support"
depends on WAN
---help--- ---help---
Support for the Frame Relay protocol. Support for the Frame Relay protocol.
...@@ -385,7 +382,7 @@ config SDLA ...@@ -385,7 +382,7 @@ config SDLA
# Wan router core. # Wan router core.
config WAN_ROUTER_DRIVERS config WAN_ROUTER_DRIVERS
tristate "WAN router drivers" tristate "WAN router drivers"
depends on WAN && WAN_ROUTER depends on WAN_ROUTER
---help--- ---help---
Connect LAN to WAN via Linux box. Connect LAN to WAN via Linux box.
...@@ -440,7 +437,7 @@ config CYCLOMX_X25 ...@@ -440,7 +437,7 @@ config CYCLOMX_X25
# X.25 network drivers # X.25 network drivers
config LAPBETHER config LAPBETHER
tristate "LAPB over Ethernet driver (EXPERIMENTAL)" tristate "LAPB over Ethernet driver (EXPERIMENTAL)"
depends on WAN && LAPB && X25 depends on LAPB && X25
---help--- ---help---
Driver for a pseudo device (typically called /dev/lapb0) which allows Driver for a pseudo device (typically called /dev/lapb0) which allows
you to open an LAPB point-to-point connection to some other computer you to open an LAPB point-to-point connection to some other computer
...@@ -456,7 +453,7 @@ config LAPBETHER ...@@ -456,7 +453,7 @@ config LAPBETHER
config X25_ASY config X25_ASY
tristate "X.25 async driver (EXPERIMENTAL)" tristate "X.25 async driver (EXPERIMENTAL)"
depends on WAN && LAPB && X25 depends on LAPB && X25
---help--- ---help---
Send and receive X.25 frames over regular asynchronous serial Send and receive X.25 frames over regular asynchronous serial
lines such as telephone lines equipped with ordinary modems. lines such as telephone lines equipped with ordinary modems.
...@@ -471,7 +468,7 @@ config X25_ASY ...@@ -471,7 +468,7 @@ config X25_ASY
config SBNI config SBNI
tristate "Granch SBNI12 Leased Line adapter support" tristate "Granch SBNI12 Leased Line adapter support"
depends on WAN && X86 depends on X86
---help--- ---help---
Driver for ISA SBNI12-xx cards which are low cost alternatives to Driver for ISA SBNI12-xx cards which are low cost alternatives to
leased line modems. leased line modems.
...@@ -497,5 +494,4 @@ config SBNI_MULTILINE ...@@ -497,5 +494,4 @@ config SBNI_MULTILINE
If unsure, say N. If unsure, say N.
endmenu endif # WAN
# EXTRA_CFLAGS += -Wpacked
usb8xxx-objs := main.o fw.o wext.o \ usb8xxx-objs := main.o fw.o wext.o \
rx.o tx.o cmd.o \ rx.o tx.o cmd.o \
cmdresp.o scan.o \ cmdresp.o scan.o \
...@@ -7,13 +5,6 @@ usb8xxx-objs := main.o fw.o wext.o \ ...@@ -7,13 +5,6 @@ usb8xxx-objs := main.o fw.o wext.o \
ioctl.o debugfs.o \ ioctl.o debugfs.o \
ethtool.o assoc.o ethtool.o assoc.o
ifeq ($(CONFIG_LIBERTAS_USB_DEBUG), y)
EXTRA_CFLAGS += -DDEBUG -DPROC_DEBUG
endif
# This is needed to support the newer boot2 bootloader (v >= 3104)
EXTRA_CFLAGS += -DSUPPORT_BOOT_COMMAND
usb8xxx-objs += if_bootcmd.o usb8xxx-objs += if_bootcmd.o
usb8xxx-objs += if_usb.o usb8xxx-objs += if_usb.o
......
This diff is collapsed.
...@@ -23,13 +23,13 @@ static int assoc_helper_essid(wlan_private *priv, ...@@ -23,13 +23,13 @@ static int assoc_helper_essid(wlan_private *priv,
ENTER(); ENTER();
lbs_pr_debug(1, "New SSID requested: %s\n", assoc_req->ssid.ssid); lbs_pr_debug(1, "New SSID requested: %s\n", assoc_req->ssid.ssid);
if (assoc_req->mode == wlan802_11infrastructure) { if (assoc_req->mode == IW_MODE_INFRA) {
if (adapter->prescan) { if (adapter->prescan) {
libertas_send_specific_SSID_scan(priv, &assoc_req->ssid, 1); libertas_send_specific_SSID_scan(priv, &assoc_req->ssid, 1);
} }
i = libertas_find_SSID_in_list(adapter, &assoc_req->ssid, i = libertas_find_SSID_in_list(adapter, &assoc_req->ssid,
NULL, wlan802_11infrastructure); NULL, IW_MODE_INFRA);
if (i >= 0) { if (i >= 0) {
lbs_pr_debug(1, lbs_pr_debug(1,
"SSID found in scan list ... associating...\n"); "SSID found in scan list ... associating...\n");
...@@ -44,7 +44,7 @@ static int assoc_helper_essid(wlan_private *priv, ...@@ -44,7 +44,7 @@ static int assoc_helper_essid(wlan_private *priv,
lbs_pr_debug(1, "SSID '%s' not found; cannot associate\n", lbs_pr_debug(1, "SSID '%s' not found; cannot associate\n",
assoc_req->ssid.ssid); assoc_req->ssid.ssid);
} }
} else if (assoc_req->mode == wlan802_11ibss) { } else if (assoc_req->mode == IW_MODE_ADHOC) {
/* Scan for the network, do not save previous results. Stale /* Scan for the network, do not save previous results. Stale
* scan data will cause us to join a non-existant adhoc network * scan data will cause us to join a non-existant adhoc network
*/ */
...@@ -52,7 +52,7 @@ static int assoc_helper_essid(wlan_private *priv, ...@@ -52,7 +52,7 @@ static int assoc_helper_essid(wlan_private *priv,
/* Search for the requested SSID in the scan table */ /* Search for the requested SSID in the scan table */
i = libertas_find_SSID_in_list(adapter, &assoc_req->ssid, NULL, i = libertas_find_SSID_in_list(adapter, &assoc_req->ssid, NULL,
wlan802_11ibss); IW_MODE_ADHOC);
if (i >= 0) { if (i >= 0) {
lbs_pr_debug(1, "SSID found at %d in List, so join\n", ret); lbs_pr_debug(1, "SSID found at %d in List, so join\n", ret);
libertas_join_adhoc_network(priv, &adapter->scantable[i]); libertas_join_adhoc_network(priv, &adapter->scantable[i]);
...@@ -90,10 +90,10 @@ static int assoc_helper_bssid(wlan_private *priv, ...@@ -90,10 +90,10 @@ static int assoc_helper_bssid(wlan_private *priv,
goto out; goto out;
} }
if (assoc_req->mode == wlan802_11infrastructure) { if (assoc_req->mode == IW_MODE_INFRA) {
ret = wlan_associate(priv, &adapter->scantable[i]); ret = wlan_associate(priv, &adapter->scantable[i]);
lbs_pr_debug(1, "ASSOC: return from wlan_associate(bssd) was %d\n", ret); lbs_pr_debug(1, "ASSOC: return from wlan_associate(bssd) was %d\n", ret);
} else if (assoc_req->mode == wlan802_11ibss) { } else if (assoc_req->mode == IW_MODE_ADHOC) {
libertas_join_adhoc_network(priv, &adapter->scantable[i]); libertas_join_adhoc_network(priv, &adapter->scantable[i]);
} }
memcpy(&assoc_req->ssid, &adapter->scantable[i].ssid, memcpy(&assoc_req->ssid, &adapter->scantable[i].ssid,
...@@ -142,23 +142,23 @@ static int assoc_helper_mode(wlan_private *priv, ...@@ -142,23 +142,23 @@ static int assoc_helper_mode(wlan_private *priv,
ENTER(); ENTER();
if (assoc_req->mode == adapter->inframode) { if (assoc_req->mode == adapter->mode) {
LEAVE(); LEAVE();
return 0; return 0;
} }
if (assoc_req->mode == wlan802_11infrastructure) { if (assoc_req->mode == IW_MODE_INFRA) {
if (adapter->psstate != PS_STATE_FULL_POWER) if (adapter->psstate != PS_STATE_FULL_POWER)
libertas_ps_wakeup(priv, cmd_option_waitforrsp); libertas_ps_wakeup(priv, cmd_option_waitforrsp);
adapter->psmode = wlan802_11powermodecam; adapter->psmode = wlan802_11powermodecam;
} }
adapter->inframode = assoc_req->mode; adapter->mode = assoc_req->mode;
ret = libertas_prepare_and_send_command(priv, ret = libertas_prepare_and_send_command(priv,
cmd_802_11_snmp_mib, cmd_802_11_snmp_mib,
0, cmd_option_waitforrsp, 0, cmd_option_waitforrsp,
OID_802_11_INFRASTRUCTURE_MODE, OID_802_11_INFRASTRUCTURE_MODE,
(void *) assoc_req->mode); (void *) (size_t) assoc_req->mode);
LEAVE(); LEAVE();
return ret; return ret;
...@@ -196,7 +196,7 @@ static int assoc_helper_wep_keys(wlan_private *priv, ...@@ -196,7 +196,7 @@ static int assoc_helper_wep_keys(wlan_private *priv,
goto out; goto out;
/* enable/disable the MAC's WEP packet filter */ /* enable/disable the MAC's WEP packet filter */
if (assoc_req->secinfo.WEPstatus == wlan802_11WEPenabled) if (assoc_req->secinfo.wep_enabled)
adapter->currentpacketfilter |= cmd_act_mac_wep_enable; adapter->currentpacketfilter |= cmd_act_mac_wep_enable;
else else
adapter->currentpacketfilter &= ~cmd_act_mac_wep_enable; adapter->currentpacketfilter &= ~cmd_act_mac_wep_enable;
...@@ -300,8 +300,7 @@ static int should_deauth_infrastructure(wlan_adapter *adapter, ...@@ -300,8 +300,7 @@ static int should_deauth_infrastructure(wlan_adapter *adapter,
} }
if (test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) { if (test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) {
if (adapter->secinfo.authmode != if (adapter->secinfo.auth_mode != assoc_req->secinfo.auth_mode) {
assoc_req->secinfo.authmode) {
lbs_pr_debug(1, "Deauthenticating due to updated security " lbs_pr_debug(1, "Deauthenticating due to updated security "
"info in configuration request.\n"); "info in configuration request.\n");
return 1; return 1;
...@@ -316,7 +315,7 @@ static int should_deauth_infrastructure(wlan_adapter *adapter, ...@@ -316,7 +315,7 @@ static int should_deauth_infrastructure(wlan_adapter *adapter,
/* FIXME: deal with 'auto' mode somehow */ /* FIXME: deal with 'auto' mode somehow */
if (test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) { if (test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) {
if (assoc_req->mode != wlan802_11infrastructure) if (assoc_req->mode != IW_MODE_INFRA)
return 1; return 1;
} }
...@@ -333,12 +332,12 @@ static int should_stop_adhoc(wlan_adapter *adapter, ...@@ -333,12 +332,12 @@ static int should_stop_adhoc(wlan_adapter *adapter,
if (adapter->curbssparams.ssid.ssidlength != assoc_req->ssid.ssidlength) if (adapter->curbssparams.ssid.ssidlength != assoc_req->ssid.ssidlength)
return 1; return 1;
if (memcmp(adapter->curbssparams.ssid.ssid, assoc_req->ssid.ssid, if (memcmp(adapter->curbssparams.ssid.ssid, assoc_req->ssid.ssid,
sizeof(struct WLAN_802_11_SSID))) adapter->curbssparams.ssid.ssidlength))
return 1; return 1;
/* FIXME: deal with 'auto' mode somehow */ /* FIXME: deal with 'auto' mode somehow */
if (test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) { if (test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) {
if (assoc_req->mode != wlan802_11ibss) if (assoc_req->mode != IW_MODE_ADHOC)
return 1; return 1;
} }
...@@ -382,7 +381,7 @@ void wlan_association_worker(struct work_struct *work) ...@@ -382,7 +381,7 @@ void wlan_association_worker(struct work_struct *work)
} }
if (find_any_ssid) { if (find_any_ssid) {
enum WLAN_802_11_NETWORK_INFRASTRUCTURE new_mode; u8 new_mode;
ret = libertas_find_best_network_SSID(priv, &assoc_req->ssid, ret = libertas_find_best_network_SSID(priv, &assoc_req->ssid,
assoc_req->mode, &new_mode); assoc_req->mode, &new_mode);
...@@ -393,7 +392,7 @@ void wlan_association_worker(struct work_struct *work) ...@@ -393,7 +392,7 @@ void wlan_association_worker(struct work_struct *work)
} }
/* Ensure we switch to the mode of the AP */ /* Ensure we switch to the mode of the AP */
if (assoc_req->mode == wlan802_11autounknown) { if (assoc_req->mode == IW_MODE_AUTO) {
set_bit(ASSOC_FLAG_MODE, &assoc_req->flags); set_bit(ASSOC_FLAG_MODE, &assoc_req->flags);
assoc_req->mode = new_mode; assoc_req->mode = new_mode;
} }
...@@ -403,7 +402,7 @@ void wlan_association_worker(struct work_struct *work) ...@@ -403,7 +402,7 @@ void wlan_association_worker(struct work_struct *work)
* Check if the attributes being changing require deauthentication * Check if the attributes being changing require deauthentication
* from the currently associated infrastructure access point. * from the currently associated infrastructure access point.
*/ */
if (adapter->inframode == wlan802_11infrastructure) { if (adapter->mode == IW_MODE_INFRA) {
if (should_deauth_infrastructure(adapter, assoc_req)) { if (should_deauth_infrastructure(adapter, assoc_req)) {
ret = libertas_send_deauthentication(priv); ret = libertas_send_deauthentication(priv);
if (ret) { if (ret) {
...@@ -412,7 +411,7 @@ void wlan_association_worker(struct work_struct *work) ...@@ -412,7 +411,7 @@ void wlan_association_worker(struct work_struct *work)
ret); ret);
} }
} }
} else if (adapter->inframode == wlan802_11ibss) { } else if (adapter->mode == IW_MODE_ADHOC) {
if (should_stop_adhoc(adapter, assoc_req)) { if (should_stop_adhoc(adapter, assoc_req)) {
ret = libertas_stop_adhoc_network(priv); ret = libertas_stop_adhoc_network(priv);
if (ret) { if (ret) {
...@@ -543,7 +542,7 @@ struct assoc_request * wlan_get_association_request(wlan_adapter *adapter) ...@@ -543,7 +542,7 @@ struct assoc_request * wlan_get_association_request(wlan_adapter *adapter)
assoc_req->channel = adapter->curbssparams.channel; assoc_req->channel = adapter->curbssparams.channel;
if (!test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) if (!test_bit(ASSOC_FLAG_MODE, &assoc_req->flags))
assoc_req->mode = adapter->inframode; assoc_req->mode = adapter->mode;
if (!test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { if (!test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) {
memcpy(&assoc_req->bssid, adapter->curbssparams.bssid, memcpy(&assoc_req->bssid, adapter->curbssparams.bssid,
......
...@@ -381,15 +381,16 @@ static int wlan_cmd_802_11_snmp_mib(wlan_private * priv, ...@@ -381,15 +381,16 @@ static int wlan_cmd_802_11_snmp_mib(wlan_private * priv,
switch (cmd_oid) { switch (cmd_oid) {
case OID_802_11_INFRASTRUCTURE_MODE: case OID_802_11_INFRASTRUCTURE_MODE:
{ {
enum WLAN_802_11_NETWORK_INFRASTRUCTURE mode = u8 mode = (u8) (size_t) pdata_buf;
(enum WLAN_802_11_NETWORK_INFRASTRUCTURE) pdata_buf;
pSNMPMIB->querytype = cpu_to_le16(cmd_act_set); pSNMPMIB->querytype = cpu_to_le16(cmd_act_set);
pSNMPMIB->oid = cpu_to_le16((u16) desired_bsstype_i); pSNMPMIB->oid = cpu_to_le16((u16) desired_bsstype_i);
pSNMPMIB->bufsize = sizeof(u8); pSNMPMIB->bufsize = sizeof(u8);
if (mode == wlan802_11infrastructure) if (mode == IW_MODE_ADHOC) {
ucTemp = SNMP_MIB_VALUE_INFRA;
else
ucTemp = SNMP_MIB_VALUE_ADHOC; ucTemp = SNMP_MIB_VALUE_ADHOC;
} else {
/* Infra and Auto modes */
ucTemp = SNMP_MIB_VALUE_INFRA;
}
memmove(pSNMPMIB->value, &ucTemp, sizeof(u8)); memmove(pSNMPMIB->value, &ucTemp, sizeof(u8));
...@@ -947,8 +948,8 @@ void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u ...@@ -947,8 +948,8 @@ void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u
spin_unlock_irqrestore(&adapter->driver_lock, flags); spin_unlock_irqrestore(&adapter->driver_lock, flags);
lbs_pr_debug(1, "QUEUE_CMD: Inserted node=0x%x, cmd=0x%x in cmdpendingq\n", lbs_pr_debug(1, "QUEUE_CMD: Inserted node=%p, cmd=0x%x in cmdpendingq\n",
(u32) cmdnode, cmdnode,
((struct cmd_ds_gen*)cmdnode->bufvirtualaddr)->command); ((struct cmd_ds_gen*)cmdnode->bufvirtualaddr)->command);
done: done:
...@@ -976,8 +977,8 @@ static int DownloadcommandToStation(wlan_private * priv, ...@@ -976,8 +977,8 @@ static int DownloadcommandToStation(wlan_private * priv,
ENTER(); ENTER();
if (!adapter || !cmdnode) { if (!adapter || !cmdnode) {
lbs_pr_debug(1, "DNLD_CMD: adapter = %#x, cmdnode = %#x\n", lbs_pr_debug(1, "DNLD_CMD: adapter = %p, cmdnode = %p\n",
(int)adapter, (int)cmdnode); adapter, cmdnode);
if (cmdnode) { if (cmdnode) {
spin_lock_irqsave(&adapter->driver_lock, flags); spin_lock_irqsave(&adapter->driver_lock, flags);
__libertas_cleanup_and_insert_cmd(priv, cmdnode); __libertas_cleanup_and_insert_cmd(priv, cmdnode);
...@@ -1174,8 +1175,8 @@ int libertas_prepare_and_send_command(wlan_private * priv, ...@@ -1174,8 +1175,8 @@ int libertas_prepare_and_send_command(wlan_private * priv,
cmdptr = (struct cmd_ds_command *)cmdnode->bufvirtualaddr; cmdptr = (struct cmd_ds_command *)cmdnode->bufvirtualaddr;
lbs_pr_debug(1, "PREP_CMD: Val of cmd ptr =0x%x, command=0x%X\n", lbs_pr_debug(1, "PREP_CMD: Val of cmd ptr=%p, command=0x%X\n",
(u32) cmdptr, cmd_no); cmdptr, cmd_no);
if (!cmdptr) { if (!cmdptr) {
lbs_pr_debug(1, "PREP_CMD: bufvirtualaddr of cmdnode is NULL\n"); lbs_pr_debug(1, "PREP_CMD: bufvirtualaddr of cmdnode is NULL\n");
......
...@@ -72,8 +72,6 @@ void libertas_mac_event_disconnected(wlan_private * priv) ...@@ -72,8 +72,6 @@ void libertas_mac_event_disconnected(wlan_private * priv)
adapter->secinfo.WPAenabled = 0; adapter->secinfo.WPAenabled = 0;
adapter->secinfo.WPA2enabled = 0; adapter->secinfo.WPA2enabled = 0;
adapter->wpa_ie_len = 0; adapter->wpa_ie_len = 0;
adapter->secinfo.auth1xalg = WLAN_1X_AUTH_ALG_NONE;
adapter->secinfo.Encryptionmode = CIPHER_NONE;
adapter->connect_status = libertas_disconnected; adapter->connect_status = libertas_disconnected;
...@@ -811,7 +809,7 @@ int libertas_process_rx_command(wlan_private * priv) ...@@ -811,7 +809,7 @@ int libertas_process_rx_command(wlan_private * priv)
if (result) { if (result) {
lbs_pr_debug(1, "CMD_RESP: PS command failed- %#x \n", lbs_pr_debug(1, "CMD_RESP: PS command failed- %#x \n",
resp->result); resp->result);
if (adapter->inframode == wlan802_11ibss) { if (adapter->mode == IW_MODE_ADHOC) {
/* /*
* We should not re-try enter-ps command in * We should not re-try enter-ps command in
* ad-hoc mode. It takes place in * ad-hoc mode. It takes place in
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "dev.h" #include "dev.h"
#include "decl.h" #include "decl.h"
#include "host.h" #include "host.h"
#include "debugfs.h"
static struct dentry *libertas_dir = NULL; static struct dentry *libertas_dir = NULL;
static char *szStates[] = { static char *szStates[] = {
...@@ -276,7 +277,7 @@ static void libertas_parse_ssid(char *buf, size_t count, ...@@ -276,7 +277,7 @@ static void libertas_parse_ssid(char *buf, size_t count,
if (!end) if (!end)
end = buf + count - 1; end = buf + count - 1;
size = min(IW_ESSID_MAX_SIZE, end - hold); size = min((size_t)IW_ESSID_MAX_SIZE, (size_t) (end - hold));
strncpy(scan_cfg->specificSSID, hold, size); strncpy(scan_cfg->specificSSID, hold, size);
return; return;
...@@ -1648,7 +1649,7 @@ struct libertas_debugfs_files { ...@@ -1648,7 +1649,7 @@ struct libertas_debugfs_files {
struct file_operations fops; struct file_operations fops;
}; };
struct libertas_debugfs_files debugfs_files[] = { static struct libertas_debugfs_files debugfs_files[] = {
{ "info", 0444, FOPS(libertas_dev_info, write_file_dummy), }, { "info", 0444, FOPS(libertas_dev_info, write_file_dummy), },
{ "getscantable", 0444, FOPS(libertas_getscantable, { "getscantable", 0444, FOPS(libertas_getscantable,
write_file_dummy), }, write_file_dummy), },
...@@ -1658,7 +1659,7 @@ struct libertas_debugfs_files debugfs_files[] = { ...@@ -1658,7 +1659,7 @@ struct libertas_debugfs_files debugfs_files[] = {
{ "setuserscan", 0600, FOPS(NULL, libertas_setuserscan), }, { "setuserscan", 0600, FOPS(NULL, libertas_setuserscan), },
}; };
struct libertas_debugfs_files debugfs_events_files[] = { static struct libertas_debugfs_files debugfs_events_files[] = {
{"low_rssi", 0644, FOPS(libertas_lowrssi_read, {"low_rssi", 0644, FOPS(libertas_lowrssi_read,
libertas_lowrssi_write), }, libertas_lowrssi_write), },
{"low_snr", 0644, FOPS(libertas_lowsnr_read, {"low_snr", 0644, FOPS(libertas_lowsnr_read,
...@@ -1673,7 +1674,7 @@ struct libertas_debugfs_files debugfs_events_files[] = { ...@@ -1673,7 +1674,7 @@ struct libertas_debugfs_files debugfs_events_files[] = {
libertas_highsnr_write), }, libertas_highsnr_write), },
}; };
struct libertas_debugfs_files debugfs_regs_files[] = { static struct libertas_debugfs_files debugfs_regs_files[] = {
{"rdmac", 0644, FOPS(libertas_rdmac_read, libertas_rdmac_write), }, {"rdmac", 0644, FOPS(libertas_rdmac_read, libertas_rdmac_write), },
{"wrmac", 0600, FOPS(NULL, libertas_wrmac_write), }, {"wrmac", 0600, FOPS(NULL, libertas_wrmac_write), },
{"rdbbp", 0644, FOPS(libertas_rdbbp_read, libertas_rdbbp_write), }, {"rdbbp", 0644, FOPS(libertas_rdbbp_read, libertas_rdbbp_write), },
...@@ -1778,7 +1779,7 @@ void libertas_debugfs_remove_one(wlan_private *priv) ...@@ -1778,7 +1779,7 @@ void libertas_debugfs_remove_one(wlan_private *priv)
struct debug_data { struct debug_data {
char name[32]; char name[32];
u32 size; u32 size;
u32 addr; size_t addr;
}; };
/* To debug any member of wlan_adapter, simply add one line here. /* To debug any member of wlan_adapter, simply add one line here.
...@@ -1825,6 +1826,8 @@ static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf, ...@@ -1825,6 +1826,8 @@ static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf,
val = *((u16 *) d[i].addr); val = *((u16 *) d[i].addr);
else if (d[i].size == 4) else if (d[i].size == 4)
val = *((u32 *) d[i].addr); val = *((u32 *) d[i].addr);
else if (d[i].size == 8)
val = *((u64 *) d[i].addr);
pos += sprintf(p + pos, "%s=%d\n", d[i].name, val); pos += sprintf(p + pos, "%s=%d\n", d[i].name, val);
} }
...@@ -1844,7 +1847,7 @@ static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf, ...@@ -1844,7 +1847,7 @@ static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf,
* @param data data to write * @param data data to write
* @return number of data * @return number of data
*/ */
static int wlan_debugfs_write(struct file *f, const char __user *buf, static ssize_t wlan_debugfs_write(struct file *f, const char __user *buf,
size_t cnt, loff_t *ppos) size_t cnt, loff_t *ppos)
{ {
int r, i; int r, i;
...@@ -1886,12 +1889,14 @@ static int wlan_debugfs_write(struct file *f, const char __user *buf, ...@@ -1886,12 +1889,14 @@ static int wlan_debugfs_write(struct file *f, const char __user *buf,
*((u16 *) d[i].addr) = (u16) r; *((u16 *) d[i].addr) = (u16) r;
else if (d[i].size == 4) else if (d[i].size == 4)
*((u32 *) d[i].addr) = (u32) r; *((u32 *) d[i].addr) = (u32) r;
else if (d[i].size == 8)
*((u64 *) d[i].addr) = (u64) r;
break; break;
} while (1); } while (1);
} }
kfree(pdata); kfree(pdata);
return cnt; return (ssize_t)cnt;
} }
static struct file_operations libertas_debug_fops = { static struct file_operations libertas_debug_fops = {
...@@ -1916,20 +1921,10 @@ void libertas_debug_init(wlan_private * priv, struct net_device *dev) ...@@ -1916,20 +1921,10 @@ void libertas_debug_init(wlan_private * priv, struct net_device *dev)
return; return;
for (i = 0; i < num_of_items; i++) for (i = 0; i < num_of_items; i++)
items[i].addr += (u32) priv->adapter; items[i].addr += (size_t) priv->adapter;
priv->debugfs_debug = debugfs_create_file("debug", 0644, priv->debugfs_debug = debugfs_create_file("debug", 0644,
priv->debugfs_dir, &items[0], priv->debugfs_dir, &items[0],
&libertas_debug_fops); &libertas_debug_fops);
} }
/**
* @brief remove proc file
*
* @param priv pointer wlan_private
* @return N/A
*/
void libertas_debug_remove(wlan_private * priv)
{
debugfs_remove(priv->debugfs_debug);
}
...@@ -9,6 +9,11 @@ ...@@ -9,6 +9,11 @@
extern unsigned int libertas_debug; extern unsigned int libertas_debug;
#ifdef CONFIG_LIBERTAS_DEBUG
#define DEBUG
#define PROC_DEBUG
#endif
#define DRV_NAME "usb8xxx" #define DRV_NAME "usb8xxx"
#define lbs_pr_info(format, args...) \ #define lbs_pr_info(format, args...) \
...@@ -223,31 +228,6 @@ enum SNRNF_DATA { ...@@ -223,31 +228,6 @@ enum SNRNF_DATA {
MAX_TYPE_AVG MAX_TYPE_AVG
}; };
/** WLAN_802_11_AUTH_ALG*/
enum WLAN_802_11_AUTH_ALG {
AUTH_ALG_OPEN_SYSTEM = 1,
AUTH_ALG_SHARED_KEY = 2,
AUTH_ALG_NETWORK_EAP = 8,
};
/** WLAN_802_1X_AUTH_ALG */
enum WLAN_802_1X_AUTH_ALG {
WLAN_1X_AUTH_ALG_NONE = 1,
WLAN_1X_AUTH_ALG_LEAP = 2,
WLAN_1X_AUTH_ALG_TLS = 4,
WLAN_1X_AUTH_ALG_TTLS = 8,
WLAN_1X_AUTH_ALG_MD5 = 16,
};
/** WLAN_802_11_ENCRYPTION_MODE */
enum WLAN_802_11_ENCRYPTION_MODE {
CIPHER_NONE,
CIPHER_WEP40,
CIPHER_TKIP,
CIPHER_CCMP,
CIPHER_WEP104,
};
/** WLAN_802_11_POWER_MODE */ /** WLAN_802_11_POWER_MODE */
enum WLAN_802_11_POWER_MODE { enum WLAN_802_11_POWER_MODE {
wlan802_11powermodecam, wlan802_11powermodecam,
...@@ -292,28 +272,6 @@ enum mv_ms_type { ...@@ -292,28 +272,6 @@ enum mv_ms_type {
MVMS_EVENT MVMS_EVENT
}; };
/** WLAN_802_11_NETWORK_INFRASTRUCTURE */
enum WLAN_802_11_NETWORK_INFRASTRUCTURE {
wlan802_11ibss,
wlan802_11infrastructure,
wlan802_11autounknown,
/*defined as upper bound */
wlan802_11infrastructuremax
};
/** WLAN_802_11_AUTHENTICATION_MODE */
enum WLAN_802_11_AUTHENTICATION_MODE {
wlan802_11authmodeopen = 0x00,
wlan802_11authmodeshared = 0x01,
wlan802_11authmodenetworkEAP = 0x80,
};
/** WLAN_802_11_WEP_STATUS */
enum WLAN_802_11_WEP_STATUS {
wlan802_11WEPenabled,
wlan802_11WEPdisabled,
};
/** SNMP_MIB_INDEX_e */ /** SNMP_MIB_INDEX_e */
enum SNMP_MIB_INDEX_e { enum SNMP_MIB_INDEX_e {
desired_bsstype_i = 0, desired_bsstype_i = 0,
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/wireless.h> #include <linux/wireless.h>
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <net/ieee80211.h>
#include "defs.h" #include "defs.h"
#include "scan.h" #include "scan.h"
...@@ -56,10 +57,8 @@ struct region_channel { ...@@ -56,10 +57,8 @@ struct region_channel {
struct wlan_802_11_security { struct wlan_802_11_security {
u8 WPAenabled; u8 WPAenabled;
u8 WPA2enabled; u8 WPA2enabled;
enum WLAN_802_11_WEP_STATUS WEPstatus; u8 wep_enabled;
enum WLAN_802_11_AUTHENTICATION_MODE authmode; u8 auth_mode;
enum WLAN_802_1X_AUTH_ALG auth1xalg;
enum WLAN_802_11_ENCRYPTION_MODE Encryptionmode;
}; };
/** Current Basic Service Set State Structure */ /** Current Basic Service Set State Structure */
...@@ -184,7 +183,7 @@ struct assoc_request { ...@@ -184,7 +183,7 @@ struct assoc_request {
struct WLAN_802_11_SSID ssid; struct WLAN_802_11_SSID ssid;
u8 channel; u8 channel;
enum WLAN_802_11_NETWORK_INFRASTRUCTURE mode; u8 mode;
u8 bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];
/** WEP keys */ /** WEP keys */
...@@ -198,7 +197,6 @@ struct assoc_request { ...@@ -198,7 +197,6 @@ struct assoc_request {
struct wlan_802_11_security secinfo; struct wlan_802_11_security secinfo;
/** WPA Information Elements*/ /** WPA Information Elements*/
#define MAX_WPA_IE_LEN 64
u8 wpa_ie[MAX_WPA_IE_LEN]; u8 wpa_ie[MAX_WPA_IE_LEN];
u8 wpa_ie_len; u8 wpa_ie_len;
}; };
...@@ -254,7 +252,8 @@ struct _wlan_adapter { ...@@ -254,7 +252,8 @@ struct _wlan_adapter {
/** current ssid/bssid related parameters*/ /** current ssid/bssid related parameters*/
struct current_bss_params curbssparams; struct current_bss_params curbssparams;
enum WLAN_802_11_NETWORK_INFRASTRUCTURE inframode; /* IW_MODE_* */
u8 mode;
struct bss_descriptor *pattemptedbssdesc; struct bss_descriptor *pattemptedbssdesc;
...@@ -339,7 +338,6 @@ struct _wlan_adapter { ...@@ -339,7 +338,6 @@ struct _wlan_adapter {
struct WLAN_802_11_KEY wpa_unicast_key; struct WLAN_802_11_KEY wpa_unicast_key;
/** WPA Information Elements*/ /** WPA Information Elements*/
#define MAX_WPA_IE_LEN 64
u8 wpa_ie[MAX_WPA_IE_LEN]; u8 wpa_ie[MAX_WPA_IE_LEN];
u8 wpa_ie_len; u8 wpa_ie_len;
......
...@@ -194,16 +194,13 @@ static void wlan_init_adapter(wlan_private * priv) ...@@ -194,16 +194,13 @@ static void wlan_init_adapter(wlan_private * priv)
adapter->scanmode = cmd_bss_type_any; adapter->scanmode = cmd_bss_type_any;
/* 802.11 specific */ /* 802.11 specific */
adapter->secinfo.WEPstatus = wlan802_11WEPdisabled; adapter->secinfo.wep_enabled = 0;
for (i = 0; i < sizeof(adapter->wep_keys) / sizeof(adapter->wep_keys[0]); for (i = 0; i < sizeof(adapter->wep_keys) / sizeof(adapter->wep_keys[0]);
i++) i++)
memset(&adapter->wep_keys[i], 0, sizeof(struct WLAN_802_11_KEY)); memset(&adapter->wep_keys[i], 0, sizeof(struct WLAN_802_11_KEY));
adapter->wep_tx_keyidx = 0; adapter->wep_tx_keyidx = 0;
adapter->secinfo.WEPstatus = wlan802_11WEPdisabled; adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
adapter->secinfo.authmode = wlan802_11authmodeopen; adapter->mode = IW_MODE_INFRA;
adapter->secinfo.auth1xalg = WLAN_1X_AUTH_ALG_NONE;
adapter->secinfo.Encryptionmode = CIPHER_NONE;
adapter->inframode = wlan802_11infrastructure;
adapter->assoc_req = NULL; adapter->assoc_req = NULL;
......
...@@ -388,7 +388,7 @@ static int __if_usb_submit_rx_urb(wlan_private * priv, ...@@ -388,7 +388,7 @@ static int __if_usb_submit_rx_urb(wlan_private * priv,
usb_fill_bulk_urb(cardp->rx_urb, cardp->udev, usb_fill_bulk_urb(cardp->rx_urb, cardp->udev,
usb_rcvbulkpipe(cardp->udev, usb_rcvbulkpipe(cardp->udev,
cardp->bulk_in_endpointAddr), cardp->bulk_in_endpointAddr),
skb->tail + IPFIELD_ALIGN_OFFSET, (void *) (skb->tail + (size_t) IPFIELD_ALIGN_OFFSET),
MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn,
rinfo); rinfo);
...@@ -626,6 +626,7 @@ static void if_usb_receive(struct urb *urb) ...@@ -626,6 +626,7 @@ static void if_usb_receive(struct urb *urb)
cardp->usb_event_cause); cardp->usb_event_cause);
if (cardp->usb_event_cause & 0xffff0000) { if (cardp->usb_event_cause & 0xffff0000) {
libertas_send_tx_feedback(priv); libertas_send_tx_feedback(priv);
spin_unlock(&priv->adapter->driver_lock);
break; break;
} }
cardp->usb_event_cause = le32_to_cpu(cardp->usb_event_cause) << 3; cardp->usb_event_cause = le32_to_cpu(cardp->usb_event_cause) << 3;
...@@ -775,7 +776,6 @@ int libertas_sbi_prog_firmware(wlan_private * priv) ...@@ -775,7 +776,6 @@ int libertas_sbi_prog_firmware(wlan_private * priv)
return -1; return -1;
} }
#ifdef SUPPORT_BOOT_COMMAND
cardp->bootcmdresp = 0; cardp->bootcmdresp = 0;
do { do {
int j = 0; int j = 0;
...@@ -796,7 +796,6 @@ int libertas_sbi_prog_firmware(wlan_private * priv) ...@@ -796,7 +796,6 @@ int libertas_sbi_prog_firmware(wlan_private * priv)
} }
return -1; return -1;
} }
#endif
i = 0; i = 0;
priv->adapter->fw_ready = 0; priv->adapter->fw_ready = 0;
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#define USB8388_VID_2 0x05a3 #define USB8388_VID_2 0x05a3
#define USB8388_PID_2 0x8388 #define USB8388_PID_2 0x8388
#ifdef SUPPORT_BOOT_COMMAND
#define BOOT_CMD_FW_BY_USB 0x01 #define BOOT_CMD_FW_BY_USB 0x01
#define BOOT_CMD_FW_IN_EEPROM 0x02 #define BOOT_CMD_FW_IN_EEPROM 0x02
#define BOOT_CMD_UPDATE_BOOT2 0x03 #define BOOT_CMD_UPDATE_BOOT2 0x03
...@@ -36,7 +35,6 @@ struct bootcmdrespStr ...@@ -36,7 +35,6 @@ struct bootcmdrespStr
u8 u8result; u8 u8result;
u8 au8dumy[2]; u8 au8dumy[2];
}; };
#endif /* SUPPORT_BOOT_COMMAND */
/* read callback private data */ /* read callback private data */
struct read_cb_info { struct read_cb_info {
......
This diff is collapsed.
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#include "join.h" #include "join.h"
#include "dev.h" #include "dev.h"
#define AD_HOC_CAP_PRIVACY_ON 1
/** /**
* @brief This function finds out the common rates between rate1 and rate2. * @brief This function finds out the common rates between rate1 and rate2.
* *
...@@ -85,7 +87,7 @@ int libertas_send_deauth(wlan_private * priv) ...@@ -85,7 +87,7 @@ int libertas_send_deauth(wlan_private * priv)
wlan_adapter *adapter = priv->adapter; wlan_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
if (adapter->inframode == wlan802_11infrastructure && if (adapter->mode == IW_MODE_INFRA &&
adapter->connect_status == libertas_connected) adapter->connect_status == libertas_connected)
ret = libertas_send_deauthentication(priv); ret = libertas_send_deauthentication(priv);
else else
...@@ -94,20 +96,6 @@ int libertas_send_deauth(wlan_private * priv) ...@@ -94,20 +96,6 @@ int libertas_send_deauth(wlan_private * priv)
return ret; return ret;
} }
int libertas_do_adhocstop_ioctl(wlan_private * priv)
{
wlan_adapter *adapter = priv->adapter;
int ret = 0;
if (adapter->inframode == wlan802_11ibss &&
adapter->connect_status == libertas_connected)
ret = libertas_stop_adhoc_network(priv);
else
ret = -ENOTSUPP;
return ret;
}
/** /**
* @brief Associate to a specific BSS discovered in a scan * @brief Associate to a specific BSS discovered in a scan
* *
...@@ -207,8 +195,7 @@ int libertas_join_adhoc_network(wlan_private * priv, struct bss_descriptor * pbs ...@@ -207,8 +195,7 @@ int libertas_join_adhoc_network(wlan_private * priv, struct bss_descriptor * pbs
/* check if the requested SSID is already joined */ /* check if the requested SSID is already joined */
if (adapter->curbssparams.ssid.ssidlength if (adapter->curbssparams.ssid.ssidlength
&& !libertas_SSID_cmp(&pbssdesc->ssid, &adapter->curbssparams.ssid) && !libertas_SSID_cmp(&pbssdesc->ssid, &adapter->curbssparams.ssid)
&& (adapter->curbssparams.bssdescriptor.inframode == && (adapter->mode == IW_MODE_ADHOC)) {
wlan802_11ibss)) {
lbs_pr_debug(1, lbs_pr_debug(1,
"ADHOC_J_CMD: New ad-hoc SSID is the same as current, " "ADHOC_J_CMD: New ad-hoc SSID is the same as current, "
...@@ -260,130 +247,6 @@ int libertas_send_deauthentication(wlan_private * priv) ...@@ -260,130 +247,6 @@ int libertas_send_deauthentication(wlan_private * priv)
0, cmd_option_waitforrsp, 0, NULL); 0, cmd_option_waitforrsp, 0, NULL);
} }
/**
* @brief Set Idle Off
*
* @param priv A pointer to wlan_private structure
* @return 0 --success, otherwise fail
*/
int libertas_idle_off(wlan_private * priv)
{
wlan_adapter *adapter = priv->adapter;
int ret = 0;
const u8 zeromac[] = { 0, 0, 0, 0, 0, 0 };
int i;
ENTER();
if (adapter->connect_status == libertas_disconnected) {
if (adapter->inframode == wlan802_11infrastructure) {
if (memcmp(adapter->previousbssid, zeromac,
sizeof(zeromac)) != 0) {
lbs_pr_debug(1, "Previous SSID = %s\n",
adapter->previousssid.ssid);
lbs_pr_debug(1, "Previous BSSID = "
"%02x:%02x:%02x:%02x:%02x:%02x:\n",
adapter->previousbssid[0],
adapter->previousbssid[1],
adapter->previousbssid[2],
adapter->previousbssid[3],
adapter->previousbssid[4],
adapter->previousbssid[5]);
i = libertas_find_SSID_in_list(adapter,
&adapter->previousssid,
adapter->previousbssid,
adapter->inframode);
if (i < 0) {
libertas_send_specific_BSSID_scan(priv,
adapter->
previousbssid,
1);
i = libertas_find_SSID_in_list(adapter,
&adapter->
previousssid,
adapter->
previousbssid,
adapter->
inframode);
}
if (i < 0) {
/* If the BSSID could not be found, try just the SSID */
i = libertas_find_SSID_in_list(adapter,
&adapter->
previousssid, NULL,
adapter->
inframode);
}
if (i < 0) {
libertas_send_specific_SSID_scan(priv,
&adapter->
previousssid,
1);
i = libertas_find_SSID_in_list(adapter,
&adapter->
previousssid, NULL,
adapter->
inframode);
}
if (i >= 0) {
ret =
wlan_associate(priv,
&adapter->
scantable[i]);
}
}
} else if (adapter->inframode == wlan802_11ibss) {
ret = libertas_prepare_and_send_command(priv,
cmd_802_11_ad_hoc_start,
0,
cmd_option_waitforrsp,
0, &adapter->previousssid);
}
}
/* else it is connected */
lbs_pr_debug(1, "\nwlanidle is off");
LEAVE();
return ret;
}
/**
* @brief Set Idle On
*
* @param priv A pointer to wlan_private structure
* @return 0 --success, otherwise fail
*/
int libertas_idle_on(wlan_private * priv)
{
wlan_adapter *adapter = priv->adapter;
int ret = 0;
if (adapter->connect_status == libertas_connected) {
if (adapter->inframode == wlan802_11infrastructure) {
lbs_pr_debug(1, "Previous SSID = %s\n",
adapter->previousssid.ssid);
memmove(&adapter->previousssid,
&adapter->curbssparams.ssid,
sizeof(struct WLAN_802_11_SSID));
libertas_send_deauth(priv);
} else if (adapter->inframode == wlan802_11ibss) {
ret = libertas_stop_adhoc_network(priv);
}
}
lbs_pr_debug(1, "\nwlanidle is on");
return ret;
}
/** /**
* @brief This function prepares command of authenticate. * @brief This function prepares command of authenticate.
* *
...@@ -398,22 +261,39 @@ int libertas_cmd_80211_authenticate(wlan_private * priv, ...@@ -398,22 +261,39 @@ int libertas_cmd_80211_authenticate(wlan_private * priv,
void *pdata_buf) void *pdata_buf)
{ {
wlan_adapter *adapter = priv->adapter; wlan_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_authenticate *pauthenticate = struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
&cmd->params.auth; int ret = -1;
u8 *bssid = pdata_buf; u8 *bssid = pdata_buf;
cmd->command = cpu_to_le16(cmd_802_11_authenticate); cmd->command = cpu_to_le16(cmd_802_11_authenticate);
cmd->size = cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_authenticate)
cpu_to_le16(sizeof(struct cmd_ds_802_11_authenticate) + S_DS_GEN);
+ S_DS_GEN);
/* translate auth mode to 802.11 defined wire value */
switch (adapter->secinfo.auth_mode) {
case IW_AUTH_ALG_OPEN_SYSTEM:
pauthenticate->authtype = 0x00;
break;
case IW_AUTH_ALG_SHARED_KEY:
pauthenticate->authtype = 0x01;
break;
case IW_AUTH_ALG_LEAP:
pauthenticate->authtype = 0x80;
break;
default:
lbs_pr_debug(1, "AUTH_CMD: invalid auth alg 0x%X\n",
adapter->secinfo.auth_mode);
goto out;
}
pauthenticate->authtype = adapter->secinfo.authmode;
memcpy(pauthenticate->macaddr, bssid, ETH_ALEN); memcpy(pauthenticate->macaddr, bssid, ETH_ALEN);
lbs_pr_debug(1, "AUTH_CMD: Bssid is : %x:%x:%x:%x:%x:%x\n", lbs_pr_debug(1, "AUTH_CMD: Bssid is : %x:%x:%x:%x:%x:%x\n",
bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]); bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]);
ret = 0;
return 0; out:
return ret;
} }
int libertas_cmd_80211_deauthenticate(wlan_private * priv, int libertas_cmd_80211_deauthenticate(wlan_private * priv,
...@@ -550,7 +430,7 @@ int libertas_cmd_80211_associate(wlan_private * priv, ...@@ -550,7 +430,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
lbs_pr_debug(1, "ASSOC_CMD: rates->header.len = %d\n", rates->header.len); lbs_pr_debug(1, "ASSOC_CMD: rates->header.len = %d\n", rates->header.len);
/* set IBSS field */ /* set IBSS field */
if (pbssdesc->inframode == wlan802_11infrastructure) { if (pbssdesc->mode == IW_MODE_INFRA) {
#define CAPINFO_ESS_MODE 1 #define CAPINFO_ESS_MODE 1
passo->capinfo.ess = CAPINFO_ESS_MODE; passo->capinfo.ess = CAPINFO_ESS_MODE;
} }
...@@ -624,7 +504,7 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv, ...@@ -624,7 +504,7 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
/* set the BSS type */ /* set the BSS type */
adhs->bsstype = cmd_bss_type_ibss; adhs->bsstype = cmd_bss_type_ibss;
pbssdesc->inframode = wlan802_11ibss; pbssdesc->mode = IW_MODE_ADHOC;
adhs->beaconperiod = adapter->beaconperiod; adhs->beaconperiod = adapter->beaconperiod;
/* set Physical param set */ /* set Physical param set */
...@@ -666,15 +546,12 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv, ...@@ -666,15 +546,12 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
adhs->probedelay = cpu_to_le16(cmd_scan_probe_delay_time); adhs->probedelay = cpu_to_le16(cmd_scan_probe_delay_time);
/* set up privacy in adapter->scantable[i] */ /* set up privacy in adapter->scantable[i] */
if (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) { if (adapter->secinfo.wep_enabled) {
lbs_pr_debug(1, "ADHOC_S_CMD: WEP enabled, setting privacy on\n");
#define AD_HOC_CAP_PRIVACY_ON 1
lbs_pr_debug(1, "ADHOC_S_CMD: WEPstatus set, privacy to WEP\n");
pbssdesc->privacy = wlan802_11privfilter8021xWEP; pbssdesc->privacy = wlan802_11privfilter8021xWEP;
adhs->cap.privacy = AD_HOC_CAP_PRIVACY_ON; adhs->cap.privacy = AD_HOC_CAP_PRIVACY_ON;
} else { } else {
lbs_pr_debug(1, "ADHOC_S_CMD: WEPstatus NOT set, Setting " lbs_pr_debug(1, "ADHOC_S_CMD: WEP disabled, setting privacy off\n");
"privacy to ACCEPT ALL\n");
pbssdesc->privacy = wlan802_11privfilteracceptall; pbssdesc->privacy = wlan802_11privfilteracceptall;
} }
...@@ -786,9 +663,6 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv, ...@@ -786,9 +663,6 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
padhocjoin->bssdescriptor.BSSID[5], padhocjoin->bssdescriptor.BSSID[5],
padhocjoin->bssdescriptor.SSID); padhocjoin->bssdescriptor.SSID);
lbs_pr_debug(1, "ADHOC_J_CMD: Data Rate = %x\n",
(u32) padhocjoin->bssdescriptor.datarates);
/* failtimeout */ /* failtimeout */
padhocjoin->failtimeout = cpu_to_le16(MRVDRV_ASSOCIATION_TIME_OUT); padhocjoin->failtimeout = cpu_to_le16(MRVDRV_ASSOCIATION_TIME_OUT);
...@@ -832,7 +706,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv, ...@@ -832,7 +706,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
padhocjoin->bssdescriptor.ssparamset.ibssparamset.atimwindow = padhocjoin->bssdescriptor.ssparamset.ibssparamset.atimwindow =
cpu_to_le16(pbssdesc->atimwindow); cpu_to_le16(pbssdesc->atimwindow);
if (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) { if (adapter->secinfo.wep_enabled) {
padhocjoin->bssdescriptor.cap.privacy = AD_HOC_CAP_PRIVACY_ON; padhocjoin->bssdescriptor.cap.privacy = AD_HOC_CAP_PRIVACY_ON;
} }
......
/* -*- mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
/* vi: set expandtab shiftwidth=4 tabstop=4 textwidth=78: */
/** /**
* Interface for the wlan infrastructure and adhoc join routines * Interface for the wlan infrastructure and adhoc join routines
* *
...@@ -40,10 +37,6 @@ extern int libertas_ret_80211_disassociate(wlan_private * priv, ...@@ -40,10 +37,6 @@ extern int libertas_ret_80211_disassociate(wlan_private * priv,
extern int libertas_ret_80211_associate(wlan_private * priv, extern int libertas_ret_80211_associate(wlan_private * priv,
struct cmd_ds_command *resp); struct cmd_ds_command *resp);
extern int libertas_idle_on(wlan_private * priv);
extern int libertas_idle_off(wlan_private * priv);
extern int libertas_do_adhocstop_ioctl(wlan_private * priv);
extern int libertas_reassociation_thread(void *data); extern int libertas_reassociation_thread(void *data);
struct WLAN_802_11_SSID; struct WLAN_802_11_SSID;
......
...@@ -21,6 +21,13 @@ ...@@ -21,6 +21,13 @@
#include "debugfs.h" #include "debugfs.h"
#include "assoc.h" #include "assoc.h"
#define DRIVER_RELEASE_VERSION "320.p0"
const char libertas_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
#ifdef DEBUG
"-dbg"
#endif
"";
#ifdef ENABLE_PM #ifdef ENABLE_PM
static struct pm_dev *wlan_pm_dev = NULL; static struct pm_dev *wlan_pm_dev = NULL;
#endif #endif
......
...@@ -210,7 +210,7 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb) ...@@ -210,7 +210,7 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb)
goto done; goto done;
} }
lbs_pr_debug(1, "RX Data: skb->len - sizeof(RxPd) = %d - %d = %d\n", lbs_pr_debug(1, "RX Data: skb->len - sizeof(RxPd) = %d - %zd = %zd\n",
skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd)); skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
lbs_dbg_hex("RX Data: Dest", p_rx_pkt->eth803_hdr.dest_addr, lbs_dbg_hex("RX Data: Dest", p_rx_pkt->eth803_hdr.dest_addr,
...@@ -364,7 +364,7 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb) ...@@ -364,7 +364,7 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)
priv->stats.rx_errors++; priv->stats.rx_errors++;
} }
lbs_pr_debug(1, "RX Data: skb->len - sizeof(RxPd) = %d - %d = %d\n", lbs_pr_debug(1, "RX Data: skb->len - sizeof(RxPd) = %d - %zd = %zd\n",
skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd)); skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
/* create the exported radio header */ /* create the exported radio header */
......
This diff is collapsed.
This diff is collapsed.
...@@ -78,7 +78,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb) ...@@ -78,7 +78,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb)
min_t(unsigned int, skb->len, 100)); min_t(unsigned int, skb->len, 100));
if (!skb->len || (skb->len > MRVDRV_ETH_TX_PACKET_BUFFER_SIZE)) { if (!skb->len || (skb->len > MRVDRV_ETH_TX_PACKET_BUFFER_SIZE)) {
lbs_pr_debug(1, "Tx error: Bad skb length %d : %d\n", lbs_pr_debug(1, "Tx error: Bad skb length %d : %zd\n",
skb->len, MRVDRV_ETH_TX_PACKET_BUFFER_SIZE); skb->len, MRVDRV_ETH_TX_PACKET_BUFFER_SIZE);
ret = -1; ret = -1;
goto done; goto done;
......
#define DRIVER_RELEASE_VERSION "320.p0"
const char libertas_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
#ifdef DEBUG
"-dbg"
#endif
"";
This diff is collapsed.
This diff is collapsed.
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