summaryrefslogtreecommitdiff
path: root/sys/dev/ep
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2005-01-20 19:37:22 +0000
committerWarner Losh <imp@FreeBSD.org>2005-01-20 19:37:22 +0000
commit0409a8c3871ac9d0b7c8e1da6badf3a6f23194c2 (patch)
treefa9ac369213bd9ef949c22a8b423b23ab4c1222a /sys/dev/ep
parent52cba392e00c288e25cb22e41c342e5b715abb65 (diff)
Notes
Diffstat (limited to 'sys/dev/ep')
-rw-r--r--sys/dev/ep/if_ep_pccard.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/ep/if_ep_pccard.c b/sys/dev/ep/if_ep_pccard.c
index 5101a176a105..163f1688634d 100644
--- a/sys/dev/ep/if_ep_pccard.c
+++ b/sys/dev/ep/if_ep_pccard.c
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
#include <dev/ep/if_epvar.h>
#include <dev/pccard/pccardvar.h>
+#include <dev/pccard/pccard_cis.h>
#include "card_if.h"
#include "pccarddevs.h"
@@ -266,6 +267,15 @@ static int
ep_pccard_match(device_t dev)
{
const struct pccard_product *pp;
+ int error;
+ uint32_t fcn = PCCARD_FUNCTION_UNSPEC;
+
+ /* Make sure we're a network function */
+ error = pccard_get_function(dev, &fcn);
+ if (error != 0)
+ return (error);
+ if (fcn != PCCARD_FUNCTION_NETWORK)
+ return (ENXIO);
if ((pp = pccard_product_lookup(dev, ep_pccard_products,
sizeof(ep_pccard_products[0]), NULL)) != NULL) {