static s32 update_txdesc(_adapter *padapter, _pkt *pkt, TXDESC_8195A *ptxdesc) { sint res = _SUCCESS; struct pkt_file pktfile; struct ethhdr etherhdr; _func_enter_; _rtw_open_pktfile(pkt, &pktfile); ptxdesc->txpktsize = pktfile.pkt_len; _func_exit_; return res; }
void fill_txdesc_for_mp(struct xmit_frame *pxmitframe, struct tx_desc *ptxdesc) { #ifdef CONFIG_MP_INCLUDED struct pkt_attrib *pattrib = &pxmitframe->attrib; sint bmcst = IS_MCAST(pattrib->ra); if (pattrib->pctrl == 1) // mp tx packets { struct tx_desc txdesc, *ptxdesc_mp; struct pkt_file pktfile; ptxdesc_mp = &txdesc; _rtw_open_pktfile(pxmitframe->pkt, &pktfile); _rtw_pktfile_read(&pktfile, NULL, ETH_HLEN); _rtw_pktfile_read(&pktfile, (u8*)ptxdesc_mp, TXDESC_SIZE); //offset 8 ptxdesc->txdw2 = cpu_to_le32(ptxdesc_mp->txdw2); if (bmcst) ptxdesc->txdw2 |= cpu_to_le32(BMC); ptxdesc->txdw2 |= cpu_to_le32(BK); //RT_TRACE(_module_rtl871x_xmit_c_,_drv_alert_,("mp pkt offset8-txdesc=0x%8x\n", ptxdesc->txdw2)); ptxdesc->txdw4 = cpu_to_le32(ptxdesc_mp->txdw4); //RT_TRACE(_module_rtl871x_xmit_c_,_drv_alert_,("mp pkt offset16-txdesc=0x%8x\n", ptxdesc->txdw4)); //offset 20 ptxdesc->txdw5 = cpu_to_le32(ptxdesc_mp->txdw5); //RT_TRACE(_module_rtl871x_xmit_c_,_drv_alert_,("mp pkt offset20-txdesc=0x%8x\n", ptxdesc->txdw5)); pattrib->pctrl = 0;//reset to zero; } #endif }