diff options
author | Ali Bahar <ali@internetdog.org> | 2011-09-03 19:14:21 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-07 00:00:35 (GMT) |
commit | ee5b1aadfd5cda257337a9b9777114a10c18c31e (patch) | |
tree | c0daca525c44f56ce59ce8f7d9fdf5f0136c3c9a /drivers/staging/rtl8712/rtl8712_recv.c | |
parent | c6dc001f2add6d6609f94246bbec30d81494f5f7 (diff) | |
download | linux-ee5b1aadfd5cda257337a9b9777114a10c18c31e.tar.xz |
staging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes.
In r8712_generate_ie(), HT check is no longer done.
Removed r8712_add_ht_addt_info().
Changes to defragmentation handling, and queue selection.
Get TSSI command.
Added an Ad-Hoc check to is_desired_network()
r8712_ind_disconnect() now checks for Linked state.
r8712_xmit_bh() now schedules an xmit tasklet.
Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8712/rtl8712_recv.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_recv.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c index 625a8a0..6d69265 100644 --- a/drivers/staging/rtl8712/rtl8712_recv.c +++ b/drivers/staging/rtl8712/rtl8712_recv.c @@ -192,7 +192,7 @@ static void update_recvframe_attrib_from_recvstat(struct rx_pkt_attrib *pattrib, } else pattrib->tcpchk_valid = 0; /* invalid */ pattrib->mcs_rate = (u8)((le32_to_cpu(prxstat->rxdw3)) & 0x3f); - pattrib->htc = (u8)((le32_to_cpu(prxstat->rxdw3) >> 6) & 0x1); + pattrib->htc = (u8)((le32_to_cpu(prxstat->rxdw3) >> 14) & 0x1); /*Offset 16*/ /*Offset 20*/ /*phy_info*/ @@ -207,7 +207,7 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter, struct __queue *defrag_q) { struct list_head *plist, *phead; - u8 wlanhdr_offset; + u8 *data, wlanhdr_offset; u8 curfragnum; struct recv_frame_hdr *pfhdr, *pnfhdr; union recv_frame *prframe, *pnextrframe; @@ -224,22 +224,25 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter, /*the first fragment number must be 0 *free the whole queue*/ r8712_free_recvframe(prframe, pfree_recv_queue); - prframe = NULL; - goto exit; + r8712_free_recvframe_queue(defrag_q, pfree_recv_queue); + return NULL; } - plist = get_next(phead); + curfragnum++; + plist = get_list_head(defrag_q); + plist = get_next(plist); + data = get_recvframe_data(prframe); while (end_of_queue_search(phead, plist) == false) { pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u); - /*check the fragment sequence (2nd ~n fragment frame) */ pnfhdr = &pnextrframe->u.hdr; - curfragnum++; + /*check the fragment sequence (2nd ~n fragment frame) */ if (curfragnum != pnfhdr->attrib.frag_num) { /* the fragment number must increase (after decache) * release the defrag_q & prframe */ r8712_free_recvframe(prframe, pfree_recv_queue); - prframe = NULL; - goto exit; + r8712_free_recvframe_queue(defrag_q, pfree_recv_queue); + return NULL; } + curfragnum++; /* copy the 2nd~n fragment frame's payload to the first fragment * get the 2nd~last fragment frame's payload */ wlanhdr_offset = pnfhdr->attrib.hdrlen + pnfhdr->attrib.iv_len; @@ -252,7 +255,6 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter, pfhdr->attrib.icv_len = pnfhdr->attrib.icv_len; plist = get_next(plist); } -exit: /* free the defrag_q queue and return the prframe */ r8712_free_recvframe_queue(defrag_q, pfree_recv_queue); return prframe; @@ -1074,7 +1076,7 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb) /* for first fragment packet, driver need allocate 1536 + * drvinfo_sz + RXDESC_SIZE to defrag packet. */ if ((mf == 1) && (frag == 0)) - alloc_sz = 1658; + alloc_sz = 1658;/*1658+6=1664, 1664 is 128 alignment.*/ else alloc_sz = tmp_len; /* 2 is for IP header 4 bytes alignment in QoS packet case. |