svn commit: r250375 - head/sys/dev/qlxgb

David C Somayajulu davidcs at FreeBSD.org
Wed May 8 18:25:47 UTC 2013


Author: davidcs
Date: Wed May  8 18:25:46 2013
New Revision: 250375
URL: http://svnweb.freebsd.org/changeset/base/250375

Log:
  No need to set if_mtu since it automatically updated by ether_ifattach().
  Use  if_initbaudrate() to set baudrate.
  Add IFCAP_LINKSTATE to if_capabilities.
  
  Submitted by:	David C Somayajulu <davidcs at freebsd.org>
  Approved by:	George Neville-Neil <gnn at freebsd.org>

Modified:
  head/sys/dev/qlxgb/qla_os.c

Modified: head/sys/dev/qlxgb/qla_os.c
==============================================================================
--- head/sys/dev/qlxgb/qla_os.c	Wed May  8 17:45:22 2013	(r250374)
+++ head/sys/dev/qlxgb/qla_os.c	Wed May  8 18:25:46 2013	(r250375)
@@ -669,8 +669,7 @@ qla_init_ifnet(device_t dev, qla_host_t 
 
 	if_initname(ifp, device_get_name(dev), device_get_unit(dev));
 
-	ifp->if_mtu = ETHERMTU;
-	ifp->if_baudrate = (1 * 1000 * 1000 *1000);
+	if_initbaudrate(ifp, IF_Gbps(10));
 	ifp->if_init = qla_init;
 	ifp->if_softc = ha;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
@@ -690,6 +689,7 @@ qla_init_ifnet(device_t dev, qla_host_t 
 				IFCAP_JUMBO_MTU;
 
 	ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
+	ifp->if_capabilities |= IFCAP_LINKSTATE;
 
 #if defined(__FreeBSD_version) && (__FreeBSD_version < 900002)
 	ifp->if_timer = 0;


More information about the svn-src-head mailing list