aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia')
-rw-r--r--drivers/net/pcmcia/3c574_cs.c9
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c27
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c19
3 files changed, 15 insertions, 40 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 046009928526..420f70b6b88a 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -397,12 +397,9 @@ static int tc574_config(struct pcmcia_device *link)
397 goto failed; 397 goto failed;
398 } 398 }
399 } 399 }
400 tuple.DesiredTuple = CISTPL_VERS_1; 400 if (link->prod_id[1])
401 if (pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS && 401 cardname = link->prod_id[1];
402 pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS && 402 else
403 pcmcia_parse_tuple(link, &tuple, &parse) == CS_SUCCESS) {
404 cardname = parse.version_1.str + parse.version_1.ofs[1];
405 } else
406 cardname = "3Com 3c574"; 403 cardname = "3Com 3c574";
407 404
408 { 405 {
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index ae024bfc1ae4..bf408482443e 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -560,16 +560,8 @@ static int mhz_setup(struct pcmcia_device *link)
560 560
561 /* Read the station address from the CIS. It is stored as the last 561 /* Read the station address from the CIS. It is stored as the last
562 (fourth) string in the Version 1 Version/ID tuple. */ 562 (fourth) string in the Version 1 Version/ID tuple. */
563 tuple->DesiredTuple = CISTPL_VERS_1; 563 if (link->prod_id[3]) {
564 if (first_tuple(link, tuple, parse) != CS_SUCCESS) { 564 station_addr = link->prod_id[3];
565 rc = -1;
566 goto free_cfg_mem;
567 }
568 /* Ugh -- the EM1144 card has two VERS_1 tuples!?! */
569 if (next_tuple(link, tuple, parse) != CS_SUCCESS)
570 first_tuple(link, tuple, parse);
571 if (parse->version_1.ns > 3) {
572 station_addr = parse->version_1.str + parse->version_1.ofs[3];
573 if (cvt_ascii_address(dev, station_addr) == 0) { 565 if (cvt_ascii_address(dev, station_addr) == 0) {
574 rc = 0; 566 rc = 0;
575 goto free_cfg_mem; 567 goto free_cfg_mem;
@@ -744,15 +736,12 @@ static int smc_setup(struct pcmcia_device *link)
744 } 736 }
745 } 737 }
746 /* Try the third string in the Version 1 Version/ID tuple. */ 738 /* Try the third string in the Version 1 Version/ID tuple. */
747 tuple->DesiredTuple = CISTPL_VERS_1; 739 if (link->prod_id[2]) {
748 if (first_tuple(link, tuple, parse) != CS_SUCCESS) { 740 station_addr = link->prod_id[2];
749 rc = -1; 741 if (cvt_ascii_address(dev, station_addr) == 0) {
750 goto free_cfg_mem; 742 rc = 0;
751 } 743 goto free_cfg_mem;
752 station_addr = parse->version_1.str + parse->version_1.ofs[2]; 744 }
753 if (cvt_ascii_address(dev, station_addr) == 0) {
754 rc = 0;
755 goto free_cfg_mem;
756 } 745 }
757 746
758 rc = -1; 747 rc = -1;
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index f3914f58d67f..d6273619686a 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -707,22 +707,11 @@ set_card_type(struct pcmcia_device *link, const void *s)
707 * Returns: true if this is a CE2 707 * Returns: true if this is a CE2
708 */ 708 */
709static int 709static int
710has_ce2_string(struct pcmcia_device * link) 710has_ce2_string(struct pcmcia_device * p_dev)
711{ 711{
712 tuple_t tuple; 712 if (p_dev->prod_id[2] && strstr(p_dev->prod_id[2], "CE2"))
713 cisparse_t parse; 713 return 1;
714 u_char buf[256]; 714 return 0;
715
716 tuple.Attributes = 0;
717 tuple.TupleData = buf;
718 tuple.TupleDataMax = 254;
719 tuple.TupleOffset = 0;
720 tuple.DesiredTuple = CISTPL_VERS_1;
721 if (!first_tuple(link, &tuple, &parse) && parse.version_1.ns > 2) {
722 if (strstr(parse.version_1.str + parse.version_1.ofs[2], "CE2"))
723 return 1;
724 }
725 return 0;
726} 715}
727 716
728/**************** 717/****************