Add ioctl() in read_ether() so that pccardd ensure reading its ether
address from the attribute memory area.
This commit is contained in:
parent
4f79a4117a
commit
10e6817efc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59958
@ -318,7 +318,9 @@ static void
|
||||
read_ether(struct slot *sp)
|
||||
{
|
||||
unsigned char net_addr[12];
|
||||
int flags = MDF_ATTR; /* attribute memory */
|
||||
|
||||
ioctl(sp->fd, PIOCRWFLAG, &flags);
|
||||
lseek(sp->fd, (off_t)sp->card->ether->value, SEEK_SET);
|
||||
if (read(sp->fd, net_addr, sizeof(net_addr)) != sizeof(net_addr)) {
|
||||
logerr("read err on net addr");
|
||||
|
Loading…
Reference in New Issue
Block a user