- case EIOCSADDR: //这条是设置mac地址
- //DRV_LOG (DRV_DEBUG_LOAD, "EIOICSADDR\n", 1, 2, 3, 4, 5, 6);
- printf("\n\n\nset the mac addr is:\n");
- if (data == NULL)
- return (EINVAL);
- bcopy ((char *)data, (char *)END_HADDR(&pDrvCtrl->end),
- END_HADDR_LEN(&pDrvCtrl->end));
/*下面这两句是我自己添加上的,目的是使mac写进寄存器里面,这样的话,就能够ping通了*/
- //bcopy ((char *)data, (char *)(pDrvCtrl->enetAddr),
- //END_HADDR_LEN(&pDrvCtrl->end));
- //dm9000_hash_table(pDrvCtrl);
-
- printf("\n\n\nset the mac addr is:\n");
- pch =(char *)data;
- for(i=0;i<6; i++,pch++)
- printf("0x%c ",*pch);
-
- break;
- case EIOCGADDR: //这条是获取mac地址
- DRV_LOG (DRV_DEBUG_LOAD, "EIOCGADDR\n", 1, 2, 3, 4, 5, 6);
- if (data == NULL)
- return (EINVAL);
- bcopy ((char *)END_HADDR(&pDrvCtrl->end), (char *)data,
- END_HADDR_LEN(&pDrvCtrl->end));
- break;