Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d018b6f4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
  GRETH: resolve SMP issues and other problems
  GRETH: handle frame error interrupts
  GRETH: avoid writing bad speed/duplex when setting transfer mode
  GRETH: fixed skb buffer memory leak on frame errors
  GRETH: GBit transmit descriptor handling optimization
  GRETH: fix opening/closing
  GRETH: added raw AMBA vendor/device number to match against.
  cassini: Fix build bustage on x86.
  e1000e: consistent use of Rx/Tx vs. RX/TX/rx/tx in comments/logs
  e1000e: update Copyright for 2011
  e1000: Avoid unhandled IRQ
  r8169: keep firmware in memory.
  netdev: tilepro: Use is_unicast_ether_addr helper
  etherdevice.h: Add is_unicast_ether_addr function
  ks8695net: Use default implementation of ethtool_ops::get_link
  ks8695net: Disable non-working ethtool operations
  USB CDC NCM: Don't deref NULL in cdc_ncm_rx_fixup() and don't use uninitialized variable.
  vxge: Remember to release firmware after upgrading firmware
  netdev: bfin_mac: Remove is_multicast_ether_addr use in netdev_for_each_mc_addr
  ipsec: update MAX_AH_AUTH_LEN to support sha512
  ...
parents 18bce371 0f73f2c5
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -268,10 +268,6 @@
!Finclude/net/mac80211.h ieee80211_ops
!Finclude/net/mac80211.h ieee80211_alloc_hw
!Finclude/net/mac80211.h ieee80211_register_hw
!Finclude/net/mac80211.h ieee80211_get_tx_led_name
!Finclude/net/mac80211.h ieee80211_get_rx_led_name
!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
!Finclude/net/mac80211.h ieee80211_get_radio_led_name
!Finclude/net/mac80211.h ieee80211_unregister_hw
!Finclude/net/mac80211.h ieee80211_free_hw
      </chapter>
@@ -382,6 +378,23 @@
        </para>
      </partintro>

      <chapter id="led-support">
        <title>LED support</title>
        <para>
         Mac80211 supports various ways of blinking LEDs. Wherever possible,
         device LEDs should be exposed as LED class devices and hooked up to
         the appropriate trigger, which will then be triggered appropriately
         by mac80211.
        </para>
!Finclude/net/mac80211.h ieee80211_get_tx_led_name
!Finclude/net/mac80211.h ieee80211_get_rx_led_name
!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
!Finclude/net/mac80211.h ieee80211_get_radio_led_name
!Finclude/net/mac80211.h ieee80211_tpt_blink
!Finclude/net/mac80211.h ieee80211_tpt_led_trigger_flags
!Finclude/net/mac80211.h ieee80211_create_tpt_led_trigger
      </chapter>

      <chapter id="hardware-crypto-offload">
        <title>Hardware crypto acceleration</title>
!Pinclude/net/mac80211.h Hardware crypto acceleration
+95 −193
Original line number Diff line number Diff line
@@ -854,12 +854,12 @@ ks8695_set_msglevel(struct net_device *ndev, u32 value)
}

/**
 *	ks8695_get_settings - Get device-specific settings.
 *	ks8695_wan_get_settings - Get device-specific settings.
 *	@ndev: The network device to read settings from
 *	@cmd: The ethtool structure to read into
 */
static int
ks8695_get_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
ks8695_wan_get_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
{
	struct ks8695_priv *ksp = netdev_priv(ndev);
	u32 ctrl;
@@ -870,21 +870,6 @@ ks8695_get_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
			  SUPPORTED_TP | SUPPORTED_MII);
	cmd->transceiver = XCVR_INTERNAL;

	/* Port specific extras */
	switch (ksp->dtype) {
	case KS8695_DTYPE_HPNA:
		cmd->phy_address = 0;
		/* not supported for HPNA */
		cmd->autoneg = AUTONEG_DISABLE;

		/* BUG: Erm, dtype hpna implies no phy regs */
		/*
		ctrl = readl(KS8695_MISC_VA + KS8695_HMC);
		cmd->speed = (ctrl & HMC_HSS) ? SPEED_100 : SPEED_10;
		cmd->duplex = (ctrl & HMC_HDS) ? DUPLEX_FULL : DUPLEX_HALF;
		*/
		return -EOPNOTSUPP;
	case KS8695_DTYPE_WAN:
	cmd->advertising = ADVERTISED_TP | ADVERTISED_MII;
	cmd->port = PORT_MII;
	cmd->supported |= (SUPPORTED_Autoneg | SUPPORTED_Pause);
@@ -918,21 +903,17 @@ ks8695_get_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
		cmd->duplex = (ctrl & WMC_WANFF) ?
			DUPLEX_FULL : DUPLEX_HALF;
	}
		break;
	case KS8695_DTYPE_LAN:
		return -EOPNOTSUPP;
	}

	return 0;
}

/**
 *	ks8695_set_settings - Set device-specific settings.
 *	ks8695_wan_set_settings - Set device-specific settings.
 *	@ndev: The network device to configure
 *	@cmd: The settings to configure
 */
static int
ks8695_set_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
ks8695_wan_set_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
{
	struct ks8695_priv *ksp = netdev_priv(ndev);
	u32 ctrl;
@@ -956,11 +937,6 @@ ks8695_set_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
				ADVERTISED_100baseT_Full)) == 0)
			return -EINVAL;

		switch (ksp->dtype) {
		case KS8695_DTYPE_HPNA:
			/* HPNA does not support auto-negotiation. */
			return -EINVAL;
		case KS8695_DTYPE_WAN:
		ctrl = readl(ksp->phyiface_regs + KS8695_WMC);

		ctrl &= ~(WMC_WAND | WMC_WANA100F | WMC_WANA100H |
@@ -977,28 +953,7 @@ ks8695_set_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
		/* force a re-negotiation */
		ctrl |= WMC_WANR;
		writel(ctrl, ksp->phyiface_regs + KS8695_WMC);
			break;
		case KS8695_DTYPE_LAN:
			return -EOPNOTSUPP;
		}

	} else {
		switch (ksp->dtype) {
		case KS8695_DTYPE_HPNA:
			/* BUG: dtype_hpna implies no phy registers */
			/*
			ctrl = __raw_readl(KS8695_MISC_VA + KS8695_HMC);

			ctrl &= ~(HMC_HSS | HMC_HDS);
			if (cmd->speed == SPEED_100)
				ctrl |= HMC_HSS;
			if (cmd->duplex == DUPLEX_FULL)
				ctrl |= HMC_HDS;

			__raw_writel(ctrl, KS8695_MISC_VA + KS8695_HMC);
			*/
			return -EOPNOTSUPP;
		case KS8695_DTYPE_WAN:
		ctrl = readl(ksp->phyiface_regs + KS8695_WMC);

		/* disable auto-negotiation */
@@ -1011,30 +966,21 @@ ks8695_set_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
			ctrl |= WMC_WANFF;

		writel(ctrl, ksp->phyiface_regs + KS8695_WMC);
			break;
		case KS8695_DTYPE_LAN:
			return -EOPNOTSUPP;
		}
	}

	return 0;
}

/**
 *	ks8695_nwayreset - Restart the autonegotiation on the port.
 *	ks8695_wan_nwayreset - Restart the autonegotiation on the port.
 *	@ndev: The network device to restart autoneotiation on
 */
static int
ks8695_nwayreset(struct net_device *ndev)
ks8695_wan_nwayreset(struct net_device *ndev)
{
	struct ks8695_priv *ksp = netdev_priv(ndev);
	u32 ctrl;

	switch (ksp->dtype) {
	case KS8695_DTYPE_HPNA:
		/* No phy means no autonegotiation on hpna */
		return -EINVAL;
	case KS8695_DTYPE_WAN:
	ctrl = readl(ksp->phyiface_regs + KS8695_WMC);

	if ((ctrl & WMC_WAND) == 0)
@@ -1043,54 +989,21 @@ ks8695_nwayreset(struct net_device *ndev)
	else
		/* auto-negotiation not enabled */
		return -EINVAL;
		break;
	case KS8695_DTYPE_LAN:
		return -EOPNOTSUPP;
	}

	return 0;
}

/**
 *	ks8695_get_link - Retrieve link status of network interface
 *	@ndev: The network interface to retrive the link status of.
 */
static u32
ks8695_get_link(struct net_device *ndev)
{
	struct ks8695_priv *ksp = netdev_priv(ndev);
	u32 ctrl;

	switch (ksp->dtype) {
	case KS8695_DTYPE_HPNA:
		/* HPNA always has link */
		return 1;
	case KS8695_DTYPE_WAN:
		/* WAN we can read the PHY for */
		ctrl = readl(ksp->phyiface_regs + KS8695_WMC);
		return ctrl & WMC_WLS;
	case KS8695_DTYPE_LAN:
		return -EOPNOTSUPP;
	}
	return 0;
}

/**
 *	ks8695_get_pause - Retrieve network pause/flow-control advertising
 *	ks8695_wan_get_pause - Retrieve network pause/flow-control advertising
 *	@ndev: The device to retrieve settings from
 *	@param: The structure to fill out with the information
 */
static void
ks8695_get_pause(struct net_device *ndev, struct ethtool_pauseparam *param)
ks8695_wan_get_pause(struct net_device *ndev, struct ethtool_pauseparam *param)
{
	struct ks8695_priv *ksp = netdev_priv(ndev);
	u32 ctrl;

	switch (ksp->dtype) {
	case KS8695_DTYPE_HPNA:
		/* No phy link on hpna to configure */
		return;
	case KS8695_DTYPE_WAN:
	ctrl = readl(ksp->phyiface_regs + KS8695_WMC);

	/* advertise Pause */
@@ -1103,24 +1016,6 @@ ks8695_get_pause(struct net_device *ndev, struct ethtool_pauseparam *param)
	/* current Tx Flow-control */
	ctrl = ks8695_readreg(ksp, KS8695_DTXC);
	param->tx_pause = (ctrl & DTXC_TFCE);
		break;
	case KS8695_DTYPE_LAN:
		/* The LAN's "phy" is a direct-attached switch */
		return;
	}
}

/**
 *	ks8695_set_pause - Configure pause/flow-control
 *	@ndev: The device to configure
 *	@param: The pause parameters to set
 *
 *	TODO: Implement this
 */
static int
ks8695_set_pause(struct net_device *ndev, struct ethtool_pauseparam *param)
{
	return -EOPNOTSUPP;
}

/**
@@ -1140,12 +1035,17 @@ ks8695_get_drvinfo(struct net_device *ndev, struct ethtool_drvinfo *info)
static const struct ethtool_ops ks8695_ethtool_ops = {
	.get_msglevel	= ks8695_get_msglevel,
	.set_msglevel	= ks8695_set_msglevel,
	.get_settings	= ks8695_get_settings,
	.set_settings	= ks8695_set_settings,
	.nway_reset	= ks8695_nwayreset,
	.get_link	= ks8695_get_link,
	.get_pauseparam = ks8695_get_pause,
	.set_pauseparam = ks8695_set_pause,
	.get_drvinfo	= ks8695_get_drvinfo,
};

static const struct ethtool_ops ks8695_wan_ethtool_ops = {
	.get_msglevel	= ks8695_get_msglevel,
	.set_msglevel	= ks8695_set_msglevel,
	.get_settings	= ks8695_wan_get_settings,
	.set_settings	= ks8695_wan_set_settings,
	.nway_reset	= ks8695_wan_nwayreset,
	.get_link	= ethtool_op_get_link,
	.get_pauseparam = ks8695_wan_get_pause,
	.get_drvinfo	= ks8695_get_drvinfo,
};

@@ -1541,7 +1441,6 @@ ks8695_probe(struct platform_device *pdev)

	/* driver system setup */
	ndev->netdev_ops = &ks8695_netdev_ops;
	SET_ETHTOOL_OPS(ndev, &ks8695_ethtool_ops);
	ndev->watchdog_timeo	 = msecs_to_jiffies(watchdog);

	netif_napi_add(ndev, &ksp->napi, ks8695_poll, NAPI_WEIGHT);
@@ -1608,12 +1507,15 @@ ks8695_probe(struct platform_device *pdev)
	if (ksp->phyiface_regs && ksp->link_irq == -1) {
		ks8695_init_switch(ksp);
		ksp->dtype = KS8695_DTYPE_LAN;
		SET_ETHTOOL_OPS(ndev, &ks8695_ethtool_ops);
	} else if (ksp->phyiface_regs && ksp->link_irq != -1) {
		ks8695_init_wan_phy(ksp);
		ksp->dtype = KS8695_DTYPE_WAN;
		SET_ETHTOOL_OPS(ndev, &ks8695_wan_ethtool_ops);
	} else {
		/* No initialisation since HPNA does not have a PHY */
		ksp->dtype = KS8695_DTYPE_HPNA;
		SET_ETHTOOL_OPS(ndev, &ks8695_ethtool_ops);
	}

	/* And bring up the net_device with the net core */
+1 −8
Original line number Diff line number Diff line
@@ -1284,19 +1284,12 @@ static void bfin_mac_multicast_hash(struct net_device *dev)
{
	u32 emac_hashhi, emac_hashlo;
	struct netdev_hw_addr *ha;
	char *addrs;
	u32 crc;

	emac_hashhi = emac_hashlo = 0;

	netdev_for_each_mc_addr(ha, dev) {
		addrs = ha->addr;

		/* skip non-multicast addresses */
		if (!(*addrs & 1))
			continue;

		crc = ether_crc(ETH_ALEN, addrs);
		crc = ether_crc(ETH_ALEN, ha->addr);
		crc >>= 26;

		if (crc & 0x20)
+0 −1
Original line number Diff line number Diff line
@@ -275,7 +275,6 @@ bnad_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)

	ioc_attr = kzalloc(sizeof(*ioc_attr), GFP_KERNEL);
	if (ioc_attr) {
		memset(ioc_attr, 0, sizeof(*ioc_attr));
		spin_lock_irqsave(&bnad->bna_lock, flags);
		bfa_nw_ioc_get_attr(&bnad->bna.device.ioc, ioc_attr);
		spin_unlock_irqrestore(&bnad->bna_lock, flags);
+3 −3
Original line number Diff line number Diff line
@@ -3203,7 +3203,7 @@ static int cas_get_vpd_info(struct cas *cp, unsigned char *dev_addr,
	int phy_type = CAS_PHY_MII_MDIO0; /* default phy type */
	int mac_off  = 0;

#if defined(CONFIG_OF)
#if defined(CONFIG_SPARC)
	const unsigned char *addr;
#endif

@@ -3354,7 +3354,7 @@ use_random_mac_addr:
	if (found & VPD_FOUND_MAC)
		goto done;

#if defined(CONFIG_OF)
#if defined(CONFIG_SPARC)
	addr = of_get_property(cp->of_node, "local-mac-address", NULL);
	if (addr != NULL) {
		memcpy(dev_addr, addr, 6);
@@ -5031,7 +5031,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
	cp->msg_enable = (cassini_debug < 0) ? CAS_DEF_MSG_ENABLE :
	  cassini_debug;

#if defined(CONFIG_OF)
#if defined(CONFIG_SPARC)
	cp->of_node = pci_device_to_OF_node(pdev);
#endif

Loading