Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268137
b: refs/heads/master
c: 669c1fc
h: refs/heads/master
i:
  268135: 1b9b9bf
v: v3
  • Loading branch information
Haiyang Zhang authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent e8aabe7 commit 0769232
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bf769375c9175b29fe72b10394888e0090c6b133
refs/heads/master: 669c1fc61679f7e85f467c852bfe7b6c9dd75d25
10 changes: 10 additions & 0 deletions trunk/drivers/staging/hv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ static void rndis_filter_receive_data(struct rndis_device *dev,
{
struct rndis_packet *rndis_pkt;
u32 data_offset;
int i;

rndis_pkt = &msg->msg.pkt;

Expand All @@ -338,6 +339,15 @@ static void rndis_filter_receive_data(struct rndis_device *dev,
pkt->page_buf[0].offset += data_offset;
pkt->page_buf[0].len -= data_offset;

/* Drop the 0th page, if rndis data go beyond page boundary */
if (pkt->page_buf[0].offset >= PAGE_SIZE) {
pkt->page_buf[1].offset = pkt->page_buf[0].offset - PAGE_SIZE;
pkt->page_buf[1].len -= pkt->page_buf[1].offset;
pkt->page_buf_cnt--;
for (i = 0; i < pkt->page_buf_cnt; i++)
pkt->page_buf[i] = pkt->page_buf[i+1];
}

pkt->is_data_pkt = true;

netvsc_recv_callback(dev->net_dev->dev, pkt);
Expand Down

0 comments on commit 0769232

Please sign in to comment.