patch-2.4.21 linux-2.4.21/drivers/net/e100/e100_config.c
Next file: linux-2.4.21/drivers/net/e100/e100_config.h
Previous file: linux-2.4.21/drivers/net/e100/e100.h
Back to the patch index
Back to the overall index
- Lines: 72
- Date:
2003-06-13 07:51:34.000000000 -0700
- Orig file:
linux-2.4.20/drivers/net/e100/e100_config.c
- Orig date:
2002-11-28 15:53:13.000000000 -0800
diff -urN linux-2.4.20/drivers/net/e100/e100_config.c linux-2.4.21/drivers/net/e100/e100_config.c
@@ -1,7 +1,7 @@
/*******************************************************************************
- Copyright(c) 1999 - 2002 Intel Corporation. All rights reserved.
+ Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
@@ -149,7 +149,7 @@
* 32 from the RFD base address, instead of at offset 16. */
bdp->config[7] |= CB_CFIG_EXTENDED_RFD;
- /* put the chip into D102 receive mode. This is neccessary
+ /* put the chip into D102 receive mode. This is necessary
* for any parsing and offloading features. */
bdp->config[22] = CB_CFIG_RECEIVE_GAMLA_MODE;
@@ -494,8 +494,7 @@
* e100_config_wol
* @bdp: atapter's private data struct
*
- * This sets configuration options for Wake On LAN functionality (WOL) in the
- * config record. WOL options are retrieved from wolinfo_wolopts in @bdp
+ * This sets configuration options for PHY and Magic Packet WoL
*/
void
e100_config_wol(struct e100_private *bdp)
@@ -504,14 +503,40 @@
if (bdp->wolopts & WAKE_PHY) {
bdp->config[9] |= CB_LINK_STATUS_WOL;
- E100_CONFIG(bdp, 9);
+ }
+ else {
+ /* Disable PHY WoL */
+ bdp->config[9] &= ~CB_LINK_STATUS_WOL;
}
- if (!(bdp->wolopts & WAKE_MAGIC)) {
+ if (bdp->wolopts & WAKE_MAGIC) {
+ bdp->config[19] &= ~CB_DISABLE_MAGPAK_WAKE;
+ }
+ else {
+ /* Disable Magic Packet WoL */
bdp->config[19] |= CB_DISABLE_MAGPAK_WAKE;
- E100_CONFIG(bdp, 19);
}
+ E100_CONFIG(bdp, 19);
+ spin_unlock_bh(&(bdp->config_lock));
+}
+
+void
+e100_config_vlan_drop(struct e100_private *bdp, unsigned char enable)
+{
+ spin_lock_bh(&(bdp->config_lock));
+ if (enable) {
+ if (!(bdp->config[22] & CB_CFIG_VLAN_DROP_ENABLE)) {
+ bdp->config[22] |= CB_CFIG_VLAN_DROP_ENABLE;
+ E100_CONFIG(bdp, 22);
+ }
+
+ } else {
+ if ((bdp->config[22] & CB_CFIG_VLAN_DROP_ENABLE)) {
+ bdp->config[22] &= ~CB_CFIG_VLAN_DROP_ENABLE;
+ E100_CONFIG(bdp, 22);
+ }
+ }
spin_unlock_bh(&(bdp->config_lock));
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)