*/
s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
{
- struct pkt_file pktfile;
s32 frg_inx, frg_len, mpdu_len, llc_sz, mem_sz;
size_t addr;
u8 *pframe, *mem_start;
u8 *pbuf_start;
s32 bmcst = IS_MCAST(pattrib->ra);
s32 res = _SUCCESS;
-
+ size_t remainder = pkt->len - ETH_HLEN;
psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra);
goto exit;
}
- _rtw_open_pktfile(pkt, &pktfile);
- _rtw_pktfile_read(&pktfile, NULL, ETH_HLEN);
-
frg_inx = 0;
frg_len = pxmitpriv->frag_len - 4;/* 2346-4 = 2342 */
if ((pattrib->icv_len > 0) && (pattrib->bswenc))
mpdu_len -= pattrib->icv_len;
- if (bmcst) {
- /* don't do fragment to broadcat/multicast packets */
- mem_sz = _rtw_pktfile_read(&pktfile, pframe, pattrib->pktlen);
- } else {
- mem_sz = _rtw_pktfile_read(&pktfile, pframe, mpdu_len);
- }
+ mem_sz = min_t(size_t, bmcst ? pattrib->pktlen : mpdu_len, remainder);
+ skb_copy_bits(pkt, pkt->len - remainder, pframe, mem_sz);
+ remainder -= mem_sz;
pframe += mem_sz;
frg_inx++;
- if (bmcst || pktfile.pkt_len == 0) {
+ if (bmcst || remainder == 0) {
pattrib->nr_frags = frg_inx;
pattrib->last_txcmdsz = pattrib->hdrlen + pattrib->iv_len + ((pattrib->nr_frags == 1) ? llc_sz : 0) +