aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/rndis_host.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/rndis_host.c')
-rw-r--r--drivers/net/usb/rndis_host.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 08139030954f..800c9d02c3f4 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -148,10 +148,26 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf)
148 request_id, xid); 148 request_id, xid);
149 /* then likely retry */ 149 /* then likely retry */
150 } else switch (buf->msg_type) { 150 } else switch (buf->msg_type) {
151 case RNDIS_MSG_INDICATE: { /* fault */ 151 case RNDIS_MSG_INDICATE: { /* fault/event */
152 // struct rndis_indicate *msg = (void *)buf; 152 struct rndis_indicate *msg = (void *)buf;
153 dev_info(&info->control->dev, 153 int state = 0;
154 "rndis fault indication\n"); 154
155 switch (msg->status) {
156 case RNDIS_STATUS_MEDIA_CONNECT:
157 state = 1;
158 case RNDIS_STATUS_MEDIA_DISCONNECT:
159 dev_info(&info->control->dev,
160 "rndis media %sconnect\n",
161 !state?"dis":"");
162 if (dev->driver_info->link_change)
163 dev->driver_info->link_change(
164 dev, state);
165 break;
166 default:
167 dev_info(&info->control->dev,
168 "rndis indication: 0x%08x\n",
169 le32_to_cpu(msg->status));
170 }
155 } 171 }
156 break; 172 break;
157 case RNDIS_MSG_KEEPALIVE: { /* ping */ 173 case RNDIS_MSG_KEEPALIVE: { /* ping */