aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 18:43:39 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 18:43:39 -0500
commit43ecb9a33ba8c93ebbda81d48ca05f0d1bbf9056 (patch)
tree28e4c9fa3ac800e2799d48e981a25f1403c4502e
parent58cba4650a7a414eabd2b40cc9d8e45fcdf192d9 (diff)
parent9f3f46b5fe83a56d380d4006dd2cd906bc186f91 (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
-rw-r--r--drivers/net/bonding/bond_alb.c4
-rw-r--r--drivers/net/bonding/bonding.h4
-rw-r--r--drivers/net/e100.c32
-rw-r--r--drivers/net/gianfar.c6
-rw-r--r--drivers/net/gianfar_mii.c5
-rw-r--r--drivers/net/phy/mdio_bus.c2
-rw-r--r--drivers/net/phy/phy.c2
-rw-r--r--drivers/net/tulip/uli526x.c6
-rw-r--r--drivers/net/via-velocity.c2
-rw-r--r--drivers/net/wireless/Kconfig2
-rw-r--r--drivers/net/wireless/atmel.c227
-rw-r--r--include/linux/fsl_devices.h6
-rw-r--r--include/linux/phy.h3
-rw-r--r--include/net/ieee80211.h6
14 files changed, 281 insertions, 26 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 854ddfb90da1..f2a63186ae05 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -169,9 +169,9 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_
169 index = next_index; 169 index = next_index;
170 } 170 }
171 171
172 _unlock_tx_hashtbl(bond);
173
174 tlb_init_slave(slave); 172 tlb_init_slave(slave);
173
174 _unlock_tx_hashtbl(bond);
175} 175}
176 176
177/* Must be called before starting the monitor timer */ 177/* Must be called before starting the monitor timer */
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index f20bb85c1ea5..3dd78d048c3e 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -22,8 +22,8 @@
22#include "bond_3ad.h" 22#include "bond_3ad.h"
23#include "bond_alb.h" 23#include "bond_alb.h"
24 24
25#define DRV_VERSION "3.0.0" 25#define DRV_VERSION "3.0.1"
26#define DRV_RELDATE "November 8, 2005" 26#define DRV_RELDATE "January 9, 2006"
27#define DRV_NAME "bonding" 27#define DRV_NAME "bonding"
28#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" 28#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"
29 29
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 22cd04556707..23de22631c64 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -132,6 +132,10 @@
132 * TODO: 132 * TODO:
133 * o several entry points race with dev->close 133 * o several entry points race with dev->close
134 * o check for tx-no-resources/stop Q races with tx clean/wake Q 134 * o check for tx-no-resources/stop Q races with tx clean/wake Q
135 *
136 * FIXES:
137 * 2005/12/02 - Michael O'Donnell <Michael.ODonnell at stratus dot com>
138 * - Stratus87247: protect MDI control register manipulations
135 */ 139 */
136 140
137#include <linux/config.h> 141#include <linux/config.h>
@@ -578,6 +582,7 @@ struct nic {
578 u16 leds; 582 u16 leds;
579 u16 eeprom_wc; 583 u16 eeprom_wc;
580 u16 eeprom[256]; 584 u16 eeprom[256];
585 spinlock_t mdio_lock;
581}; 586};
582 587
583static inline void e100_write_flush(struct nic *nic) 588static inline void e100_write_flush(struct nic *nic)
@@ -876,15 +881,35 @@ static u16 mdio_ctrl(struct nic *nic, u32 addr, u32 dir, u32 reg, u16 data)
876{ 881{
877 u32 data_out = 0; 882 u32 data_out = 0;
878 unsigned int i; 883 unsigned int i;
884 unsigned long flags;
879 885
886
887 /*
888 * Stratus87247: we shouldn't be writing the MDI control
889 * register until the Ready bit shows True. Also, since
890 * manipulation of the MDI control registers is a multi-step
891 * procedure it should be done under lock.
892 */
893 spin_lock_irqsave(&nic->mdio_lock, flags);
894 for (i = 100; i; --i) {
895 if (readl(&nic->csr->mdi_ctrl) & mdi_ready)
896 break;
897 udelay(20);
898 }
899 if (unlikely(!i)) {
900 printk("e100.mdio_ctrl(%s) won't go Ready\n",
901 nic->netdev->name );
902 spin_unlock_irqrestore(&nic->mdio_lock, flags);
903 return 0; /* No way to indicate timeout error */
904 }
880 writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl); 905 writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl);
881 906
882 for(i = 0; i < 100; i++) { 907 for (i = 0; i < 100; i++) {
883 udelay(20); 908 udelay(20);
884 if((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready) 909 if ((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready)
885 break; 910 break;
886 } 911 }
887 912 spin_unlock_irqrestore(&nic->mdio_lock, flags);
888 DPRINTK(HW, DEBUG, 913 DPRINTK(HW, DEBUG,
889 "%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n", 914 "%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n",
890 dir == mdi_read ? "READ" : "WRITE", addr, reg, data, data_out); 915 dir == mdi_read ? "READ" : "WRITE", addr, reg, data, data_out);
@@ -2562,6 +2587,7 @@ static int __devinit e100_probe(struct pci_dev *pdev,
2562 /* locks must be initialized before calling hw_reset */ 2587 /* locks must be initialized before calling hw_reset */
2563 spin_lock_init(&nic->cb_lock); 2588 spin_lock_init(&nic->cb_lock);
2564 spin_lock_init(&nic->cmd_lock); 2589 spin_lock_init(&nic->cmd_lock);
2590 spin_lock_init(&nic->mdio_lock);
2565 2591
2566 /* Reset the device before pci_set_master() in case device is in some 2592 /* Reset the device before pci_set_master() in case device is in some
2567 * funky state and has an interrupt pending - hint: we don't have the 2593 * funky state and has an interrupt pending - hint: we don't have the
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 146f9513aea5..0c18dbd67d3b 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -84,6 +84,7 @@
84#include <linux/ip.h> 84#include <linux/ip.h>
85#include <linux/tcp.h> 85#include <linux/tcp.h>
86#include <linux/udp.h> 86#include <linux/udp.h>
87#include <linux/in.h>
87 88
88#include <asm/io.h> 89#include <asm/io.h>
89#include <asm/irq.h> 90#include <asm/irq.h>
@@ -398,12 +399,15 @@ static int init_phy(struct net_device *dev)
398 priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? 399 priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ?
399 SUPPORTED_1000baseT_Full : 0; 400 SUPPORTED_1000baseT_Full : 0;
400 struct phy_device *phydev; 401 struct phy_device *phydev;
402 char phy_id[BUS_ID_SIZE];
401 403
402 priv->oldlink = 0; 404 priv->oldlink = 0;
403 priv->oldspeed = 0; 405 priv->oldspeed = 0;
404 priv->oldduplex = -1; 406 priv->oldduplex = -1;
405 407
406 phydev = phy_connect(dev, priv->einfo->bus_id, &adjust_link, 0); 408 snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv->einfo->bus_id, priv->einfo->phy_id);
409
410 phydev = phy_connect(dev, phy_id, &adjust_link, 0);
407 411
408 if (IS_ERR(phydev)) { 412 if (IS_ERR(phydev)) {
409 printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); 413 printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index 04a462c2a5b7..74e52fcbf806 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -128,6 +128,7 @@ int gfar_mdio_probe(struct device *dev)
128 struct gianfar_mdio_data *pdata; 128 struct gianfar_mdio_data *pdata;
129 struct gfar_mii *regs; 129 struct gfar_mii *regs;
130 struct mii_bus *new_bus; 130 struct mii_bus *new_bus;
131 struct resource *r;
131 int err = 0; 132 int err = 0;
132 133
133 if (NULL == dev) 134 if (NULL == dev)
@@ -151,8 +152,10 @@ int gfar_mdio_probe(struct device *dev)
151 return -ENODEV; 152 return -ENODEV;
152 } 153 }
153 154
155 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
156
154 /* Set the PHY base address */ 157 /* Set the PHY base address */
155 regs = (struct gfar_mii *) ioremap(pdata->paddr, 158 regs = (struct gfar_mii *) ioremap(r->start,
156 sizeof (struct gfar_mii)); 159 sizeof (struct gfar_mii));
157 160
158 if (NULL == regs) { 161 if (NULL == regs) {
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 02940c0fef68..459443b572ce 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -81,7 +81,7 @@ int mdiobus_register(struct mii_bus *bus)
81 81
82 phydev->dev.parent = bus->dev; 82 phydev->dev.parent = bus->dev;
83 phydev->dev.bus = &mdio_bus_type; 83 phydev->dev.bus = &mdio_bus_type;
84 sprintf(phydev->dev.bus_id, "phy%d:%d", bus->id, i); 84 snprintf(phydev->dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, bus->id, i);
85 85
86 phydev->bus = bus; 86 phydev->bus = bus;
87 87
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index b8686e47f899..1474b7c5ac0b 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -42,7 +42,7 @@
42 */ 42 */
43void phy_print_status(struct phy_device *phydev) 43void phy_print_status(struct phy_device *phydev)
44{ 44{
45 pr_info("%s: Link is %s", phydev->dev.bus_id, 45 pr_info("PHY: %s - Link is %s", phydev->dev.bus_id,
46 phydev->link ? "Up" : "Down"); 46 phydev->link ? "Up" : "Down");
47 if (phydev->link) 47 if (phydev->link)
48 printk(" - %d/%s", phydev->speed, 48 printk(" - %d/%s", phydev->speed,
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c
index 1a4316336256..983981666800 100644
--- a/drivers/net/tulip/uli526x.c
+++ b/drivers/net/tulip/uli526x.c
@@ -1689,9 +1689,9 @@ MODULE_AUTHOR("Peer Chen, peer.chen@uli.com.tw");
1689MODULE_DESCRIPTION("ULi M5261/M5263 fast ethernet driver"); 1689MODULE_DESCRIPTION("ULi M5261/M5263 fast ethernet driver");
1690MODULE_LICENSE("GPL"); 1690MODULE_LICENSE("GPL");
1691 1691
1692MODULE_PARM(debug, "i"); 1692module_param(debug, int, 0644);
1693MODULE_PARM(mode, "i"); 1693module_param(mode, int, 0);
1694MODULE_PARM(cr6set, "i"); 1694module_param(cr6set, int, 0);
1695MODULE_PARM_DESC(debug, "ULi M5261/M5263 enable debugging (0-1)"); 1695MODULE_PARM_DESC(debug, "ULi M5261/M5263 enable debugging (0-1)");
1696MODULE_PARM_DESC(mode, "ULi M5261/M5263: Bit 0: 10/100Mbps, bit 2: duplex, bit 8: HomePNA"); 1696MODULE_PARM_DESC(mode, "ULi M5261/M5263: Bit 0: 10/100Mbps, bit 2: duplex, bit 8: HomePNA");
1697 1697
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 82c6b757d306..c2d5907dc8e0 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -791,7 +791,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
791#endif 791#endif
792 792
793 if (vptr->flags & VELOCITY_FLAGS_TX_CSUM) { 793 if (vptr->flags & VELOCITY_FLAGS_TX_CSUM) {
794 dev->features |= NETIF_F_HW_CSUM; 794 dev->features |= NETIF_F_IP_CSUM;
795 } 795 }
796 796
797 ret = register_netdev(dev); 797 ret = register_netdev(dev);
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 24f7967aab67..c1a6e69f7905 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -243,7 +243,7 @@ config IPW2200_DEBUG
243 243
244config AIRO 244config AIRO
245 tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" 245 tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards"
246 depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN) 246 depends on NET_RADIO && ISA_DMA_API && CRYPTO && (PCI || BROKEN)
247 ---help--- 247 ---help---
248 This is the standard Linux driver to support Cisco/Aironet ISA and 248 This is the standard Linux driver to support Cisco/Aironet ISA and
249 PCI 802.11 wireless cards. 249 PCI 802.11 wireless cards.
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index e4729ddf29fd..f0ccfef66445 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -1407,6 +1407,17 @@ static int atmel_close(struct net_device *dev)
1407{ 1407{
1408 struct atmel_private *priv = netdev_priv(dev); 1408 struct atmel_private *priv = netdev_priv(dev);
1409 1409
1410 /* Send event to userspace that we are disassociating */
1411 if (priv->station_state == STATION_STATE_READY) {
1412 union iwreq_data wrqu;
1413
1414 wrqu.data.length = 0;
1415 wrqu.data.flags = 0;
1416 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
1417 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
1418 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
1419 }
1420
1410 atmel_enter_state(priv, STATION_STATE_DOWN); 1421 atmel_enter_state(priv, STATION_STATE_DOWN);
1411 1422
1412 if (priv->bus_type == BUS_TYPE_PCCARD) 1423 if (priv->bus_type == BUS_TYPE_PCCARD)
@@ -1780,10 +1791,10 @@ static int atmel_set_encode(struct net_device *dev,
1780 priv->wep_is_on = 1; 1791 priv->wep_is_on = 1;
1781 priv->exclude_unencrypted = 1; 1792 priv->exclude_unencrypted = 1;
1782 if (priv->wep_key_len[index] > 5) { 1793 if (priv->wep_key_len[index] > 5) {
1783 priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64; 1794 priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128;
1784 priv->encryption_level = 2; 1795 priv->encryption_level = 2;
1785 } else { 1796 } else {
1786 priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128; 1797 priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64;
1787 priv->encryption_level = 1; 1798 priv->encryption_level = 1;
1788 } 1799 }
1789 } 1800 }
@@ -1853,6 +1864,181 @@ static int atmel_get_encode(struct net_device *dev,
1853 return 0; 1864 return 0;
1854} 1865}
1855 1866
1867static int atmel_set_encodeext(struct net_device *dev,
1868 struct iw_request_info *info,
1869 union iwreq_data *wrqu,
1870 char *extra)
1871{
1872 struct atmel_private *priv = netdev_priv(dev);
1873 struct iw_point *encoding = &wrqu->encoding;
1874 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
1875 int idx, key_len;
1876
1877 /* Determine and validate the key index */
1878 idx = encoding->flags & IW_ENCODE_INDEX;
1879 if (idx) {
1880 if (idx < 1 || idx > WEP_KEYS)
1881 return -EINVAL;
1882 idx--;
1883 } else
1884 idx = priv->default_key;
1885
1886 if ((encoding->flags & IW_ENCODE_DISABLED) ||
1887 ext->alg == IW_ENCODE_ALG_NONE) {
1888 priv->wep_is_on = 0;
1889 priv->encryption_level = 0;
1890 priv->pairwise_cipher_suite = CIPHER_SUITE_NONE;
1891 }
1892
1893 if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
1894 priv->default_key = idx;
1895
1896 /* Set the requested key */
1897 switch (ext->alg) {
1898 case IW_ENCODE_ALG_NONE:
1899 break;
1900 case IW_ENCODE_ALG_WEP:
1901 if (ext->key_len > 5) {
1902 priv->wep_key_len[idx] = 13;
1903 priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128;
1904 priv->encryption_level = 2;
1905 } else if (ext->key_len > 0) {
1906 priv->wep_key_len[idx] = 5;
1907 priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64;
1908 priv->encryption_level = 1;
1909 } else {
1910 return -EINVAL;
1911 }
1912 priv->wep_is_on = 1;
1913 memset(priv->wep_keys[idx], 0, 13);
1914 key_len = min ((int)ext->key_len, priv->wep_key_len[idx]);
1915 memcpy(priv->wep_keys[idx], ext->key, key_len);
1916 break;
1917 default:
1918 return -EINVAL;
1919 }
1920
1921 return -EINPROGRESS;
1922}
1923
1924static int atmel_get_encodeext(struct net_device *dev,
1925 struct iw_request_info *info,
1926 union iwreq_data *wrqu,
1927 char *extra)
1928{
1929 struct atmel_private *priv = netdev_priv(dev);
1930 struct iw_point *encoding = &wrqu->encoding;
1931 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
1932 int idx, max_key_len;
1933
1934 max_key_len = encoding->length - sizeof(*ext);
1935 if (max_key_len < 0)
1936 return -EINVAL;
1937
1938 idx = encoding->flags & IW_ENCODE_INDEX;
1939 if (idx) {
1940 if (idx < 1 || idx > WEP_KEYS)
1941 return -EINVAL;
1942 idx--;
1943 } else
1944 idx = priv->default_key;
1945
1946 encoding->flags = idx + 1;
1947 memset(ext, 0, sizeof(*ext));
1948
1949 if (!priv->wep_is_on) {
1950 ext->alg = IW_ENCODE_ALG_NONE;
1951 ext->key_len = 0;
1952 encoding->flags |= IW_ENCODE_DISABLED;
1953 } else {
1954 if (priv->encryption_level > 0)
1955 ext->alg = IW_ENCODE_ALG_WEP;
1956 else
1957 return -EINVAL;
1958
1959 ext->key_len = priv->wep_key_len[idx];
1960 memcpy(ext->key, priv->wep_keys[idx], ext->key_len);
1961 encoding->flags |= IW_ENCODE_ENABLED;
1962 }
1963
1964 return 0;
1965}
1966
1967static int atmel_set_auth(struct net_device *dev,
1968 struct iw_request_info *info,
1969 union iwreq_data *wrqu, char *extra)
1970{
1971 struct atmel_private *priv = netdev_priv(dev);
1972 struct iw_param *param = &wrqu->param;
1973
1974 switch (param->flags & IW_AUTH_INDEX) {
1975 case IW_AUTH_WPA_VERSION:
1976 case IW_AUTH_CIPHER_PAIRWISE:
1977 case IW_AUTH_CIPHER_GROUP:
1978 case IW_AUTH_KEY_MGMT:
1979 case IW_AUTH_RX_UNENCRYPTED_EAPOL:
1980 case IW_AUTH_PRIVACY_INVOKED:
1981 /*
1982 * atmel does not use these parameters
1983 */
1984 break;
1985
1986 case IW_AUTH_DROP_UNENCRYPTED:
1987 priv->exclude_unencrypted = param->value ? 1 : 0;
1988 break;
1989
1990 case IW_AUTH_80211_AUTH_ALG: {
1991 if (param->value & IW_AUTH_ALG_SHARED_KEY) {
1992 priv->exclude_unencrypted = 1;
1993 } else if (param->value & IW_AUTH_ALG_OPEN_SYSTEM) {
1994 priv->exclude_unencrypted = 0;
1995 } else
1996 return -EINVAL;
1997 break;
1998 }
1999
2000 case IW_AUTH_WPA_ENABLED:
2001 /* Silently accept disable of WPA */
2002 if (param->value > 0)
2003 return -EOPNOTSUPP;
2004 break;
2005
2006 default:
2007 return -EOPNOTSUPP;
2008 }
2009 return -EINPROGRESS;
2010}
2011
2012static int atmel_get_auth(struct net_device *dev,
2013 struct iw_request_info *info,
2014 union iwreq_data *wrqu, char *extra)
2015{
2016 struct atmel_private *priv = netdev_priv(dev);
2017 struct iw_param *param = &wrqu->param;
2018
2019 switch (param->flags & IW_AUTH_INDEX) {
2020 case IW_AUTH_DROP_UNENCRYPTED:
2021 param->value = priv->exclude_unencrypted;
2022 break;
2023
2024 case IW_AUTH_80211_AUTH_ALG:
2025 if (priv->exclude_unencrypted == 1)
2026 param->value = IW_AUTH_ALG_SHARED_KEY;
2027 else
2028 param->value = IW_AUTH_ALG_OPEN_SYSTEM;
2029 break;
2030
2031 case IW_AUTH_WPA_ENABLED:
2032 param->value = 0;
2033 break;
2034
2035 default:
2036 return -EOPNOTSUPP;
2037 }
2038 return 0;
2039}
2040
2041
1856static int atmel_get_name(struct net_device *dev, 2042static int atmel_get_name(struct net_device *dev,
1857 struct iw_request_info *info, 2043 struct iw_request_info *info,
1858 char *cwrq, 2044 char *cwrq,
@@ -2289,13 +2475,15 @@ static int atmel_set_wap(struct net_device *dev,
2289{ 2475{
2290 struct atmel_private *priv = netdev_priv(dev); 2476 struct atmel_private *priv = netdev_priv(dev);
2291 int i; 2477 int i;
2292 static const u8 bcast[] = { 255, 255, 255, 255, 255, 255 }; 2478 static const u8 any[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
2479 static const u8 off[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
2293 unsigned long flags; 2480 unsigned long flags;
2294 2481
2295 if (awrq->sa_family != ARPHRD_ETHER) 2482 if (awrq->sa_family != ARPHRD_ETHER)
2296 return -EINVAL; 2483 return -EINVAL;
2297 2484
2298 if (memcmp(bcast, awrq->sa_data, 6) == 0) { 2485 if (!memcmp(any, awrq->sa_data, 6) ||
2486 !memcmp(off, awrq->sa_data, 6)) {
2299 del_timer_sync(&priv->management_timer); 2487 del_timer_sync(&priv->management_timer);
2300 spin_lock_irqsave(&priv->irqlock, flags); 2488 spin_lock_irqsave(&priv->irqlock, flags);
2301 atmel_scan(priv, 1); 2489 atmel_scan(priv, 1);
@@ -2378,6 +2566,15 @@ static const iw_handler atmel_handler[] =
2378 (iw_handler) atmel_get_encode, /* SIOCGIWENCODE */ 2566 (iw_handler) atmel_get_encode, /* SIOCGIWENCODE */
2379 (iw_handler) atmel_set_power, /* SIOCSIWPOWER */ 2567 (iw_handler) atmel_set_power, /* SIOCSIWPOWER */
2380 (iw_handler) atmel_get_power, /* SIOCGIWPOWER */ 2568 (iw_handler) atmel_get_power, /* SIOCGIWPOWER */
2569 (iw_handler) NULL, /* -- hole -- */
2570 (iw_handler) NULL, /* -- hole -- */
2571 (iw_handler) NULL, /* SIOCSIWGENIE */
2572 (iw_handler) NULL, /* SIOCGIWGENIE */
2573 (iw_handler) atmel_set_auth, /* SIOCSIWAUTH */
2574 (iw_handler) atmel_get_auth, /* SIOCGIWAUTH */
2575 (iw_handler) atmel_set_encodeext, /* SIOCSIWENCODEEXT */
2576 (iw_handler) atmel_get_encodeext, /* SIOCGIWENCODEEXT */
2577 (iw_handler) NULL, /* SIOCSIWPMKSA */
2381}; 2578};
2382 2579
2383static const iw_handler atmel_private_handler[] = 2580static const iw_handler atmel_private_handler[] =
@@ -2924,6 +3121,8 @@ static void associate(struct atmel_private *priv, u16 frame_len, u16 subtype)
2924 u16 ass_id = le16_to_cpu(ass_resp->ass_id); 3121 u16 ass_id = le16_to_cpu(ass_resp->ass_id);
2925 u16 rates_len = ass_resp->length > 4 ? 4 : ass_resp->length; 3122 u16 rates_len = ass_resp->length > 4 ? 4 : ass_resp->length;
2926 3123
3124 union iwreq_data wrqu;
3125
2927 if (frame_len < 8 + rates_len) 3126 if (frame_len < 8 + rates_len)
2928 return; 3127 return;
2929 3128
@@ -2954,6 +3153,14 @@ static void associate(struct atmel_private *priv, u16 frame_len, u16 subtype)
2954 priv->station_is_associated = 1; 3153 priv->station_is_associated = 1;
2955 priv->station_was_associated = 1; 3154 priv->station_was_associated = 1;
2956 atmel_enter_state(priv, STATION_STATE_READY); 3155 atmel_enter_state(priv, STATION_STATE_READY);
3156
3157 /* Send association event to userspace */
3158 wrqu.data.length = 0;
3159 wrqu.data.flags = 0;
3160 memcpy(wrqu.ap_addr.sa_data, priv->CurrentBSSID, ETH_ALEN);
3161 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
3162 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
3163
2957 return; 3164 return;
2958 } 3165 }
2959 3166
@@ -3632,6 +3839,7 @@ static int reset_atmel_card(struct net_device *dev)
3632 3839
3633 struct atmel_private *priv = netdev_priv(dev); 3840 struct atmel_private *priv = netdev_priv(dev);
3634 u8 configuration; 3841 u8 configuration;
3842 int old_state = priv->station_state;
3635 3843
3636 /* data to add to the firmware names, in priority order 3844 /* data to add to the firmware names, in priority order
3637 this implemenents firmware versioning */ 3845 this implemenents firmware versioning */
@@ -3792,6 +4000,17 @@ static int reset_atmel_card(struct net_device *dev)
3792 else 4000 else
3793 build_wep_mib(priv); 4001 build_wep_mib(priv);
3794 4002
4003 if (old_state == STATION_STATE_READY)
4004 {
4005 union iwreq_data wrqu;
4006
4007 wrqu.data.length = 0;
4008 wrqu.data.flags = 0;
4009 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
4010 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
4011 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
4012 }
4013
3795 return 1; 4014 return 1;
3796} 4015}
3797 4016
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 934aa9bda481..a9f1cfd096ff 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -50,14 +50,12 @@ struct gianfar_platform_data {
50 50
51 /* board specific information */ 51 /* board specific information */
52 u32 board_flags; 52 u32 board_flags;
53 const char *bus_id; 53 u32 bus_id;
54 u32 phy_id;
54 u8 mac_addr[6]; 55 u8 mac_addr[6];
55}; 56};
56 57
57struct gianfar_mdio_data { 58struct gianfar_mdio_data {
58 /* device specific information */
59 u32 paddr;
60
61 /* board specific information */ 59 /* board specific information */
62 int irq[32]; 60 int irq[32];
63}; 61};
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 92a9696fdebe..331521a10a2d 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -53,6 +53,9 @@
53 53
54#define PHY_MAX_ADDR 32 54#define PHY_MAX_ADDR 32
55 55
56/* Used when trying to connect to a specific phy (mii bus id:phy device id) */
57#define PHY_ID_FMT "%x:%02x"
58
56/* The Bus class for PHYs. Devices which provide access to 59/* The Bus class for PHYs. Devices which provide access to
57 * PHYs should register using this structure */ 60 * PHYs should register using this structure */
58struct mii_bus { 61struct mii_bus {
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index cde2f4f4f501..df05f468fa5c 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -363,8 +363,9 @@ enum ieee80211_reasoncode {
363#define IEEE80211_OFDM_SHIFT_MASK_A 4 363#define IEEE80211_OFDM_SHIFT_MASK_A 4
364 364
365/* NOTE: This data is for statistical purposes; not all hardware provides this 365/* NOTE: This data is for statistical purposes; not all hardware provides this
366 * information for frames received. Not setting these will not cause 366 * information for frames received.
367 * any adverse affects. */ 367 * For ieee80211_rx_mgt, you need to set at least the 'len' parameter.
368 */
368struct ieee80211_rx_stats { 369struct ieee80211_rx_stats {
369 u32 mac_time; 370 u32 mac_time;
370 s8 rssi; 371 s8 rssi;
@@ -1088,6 +1089,7 @@ extern int ieee80211_tx_frame(struct ieee80211_device *ieee,
1088/* ieee80211_rx.c */ 1089/* ieee80211_rx.c */
1089extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, 1090extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
1090 struct ieee80211_rx_stats *rx_stats); 1091 struct ieee80211_rx_stats *rx_stats);
1092/* make sure to set stats->len */
1091extern void ieee80211_rx_mgt(struct ieee80211_device *ieee, 1093extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
1092 struct ieee80211_hdr_4addr *header, 1094 struct ieee80211_hdr_4addr *header,
1093 struct ieee80211_rx_stats *stats); 1095 struct ieee80211_rx_stats *stats);