Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81844
b: refs/heads/master
c: 5d6ecf6
h: refs/heads/master
v: v3
  • Loading branch information
Jussi Kivilinna authored and David S. Miller committed Feb 1, 2008
1 parent 4459e0a commit a1720b3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c39e038fc738012ba36ed222bb62545ee59c012
refs/heads/master: 5d6ecf6c5d4994198527496fa51ea119030400e0
24 changes: 20 additions & 4 deletions trunk/drivers/net/usb/rndis_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,26 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf)
request_id, xid);
/* then likely retry */
} else switch (buf->msg_type) {
case RNDIS_MSG_INDICATE: { /* fault */
// struct rndis_indicate *msg = (void *)buf;
dev_info(&info->control->dev,
"rndis fault indication\n");
case RNDIS_MSG_INDICATE: { /* fault/event */
struct rndis_indicate *msg = (void *)buf;
int state = 0;

switch (msg->status) {
case RNDIS_STATUS_MEDIA_CONNECT:
state = 1;
case RNDIS_STATUS_MEDIA_DISCONNECT:
dev_info(&info->control->dev,
"rndis media %sconnect\n",
!state?"dis":"");
if (dev->driver_info->link_change)
dev->driver_info->link_change(
dev, state);
break;
default:
dev_info(&info->control->dev,
"rndis indication: 0x%08x\n",
le32_to_cpu(msg->status));
}
}
break;
case RNDIS_MSG_KEEPALIVE: { /* ping */
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/usb/usbnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ struct driver_info {
* right after minidriver have initialized hardware. */
int (*early_init)(struct usbnet *dev);

/* called by minidriver when link state changes, state: 0=disconnect,
* 1=connect */
void (*link_change)(struct usbnet *dev, int state);

/* for new devices, use the descriptor-reading code instead */
int in; /* rx endpoint */
int out; /* tx endpoint */
Expand Down

0 comments on commit a1720b3

Please sign in to comment.