mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 15:39:38 +00:00
rtl8188eu: Remove CONFIG_TCP_CSUM_OFFLOAD_TX
This change also allows the removal of rtw_set_tx_chksum_offload() as it is now empty. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
bb4b1fe327
commit
f42ef2ce84
8 changed files with 10 additions and 111 deletions
|
@ -822,12 +822,9 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib
|
||||||
pattrib->bswenc = false;
|
pattrib->bswenc = false;
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=false\n"));
|
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=false\n"));
|
||||||
}
|
}
|
||||||
rtw_set_tx_chksum_offload(pkt, pattrib);
|
|
||||||
|
|
||||||
update_attrib_phy_info(pattrib, psta);
|
update_attrib_phy_info(pattrib, psta);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -364,20 +364,7 @@ if (padapter->registrypriv.mp_mode == 0)
|
||||||
|
|
||||||
ptxdesc->txdw5 |= cpu_to_le32(MRateToHwRate(pmlmeext->tx_rate));
|
ptxdesc->txdw5 |= cpu_to_le32(MRateToHwRate(pmlmeext->tx_rate));
|
||||||
}
|
}
|
||||||
|
} else if((pxmitframe->frame_tag&0x0f)== MGNT_FRAMETAG) {
|
||||||
#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX
|
|
||||||
/* offset 24 */
|
|
||||||
if ( pattrib->hw_tcp_csum == 1 ) {
|
|
||||||
u8 ip_hdr_offset = 32 + pattrib->hdrlen + pattrib->iv_len + 8;
|
|
||||||
ptxdesc->txdw7 = (1 << 31) | (ip_hdr_offset << 16);
|
|
||||||
DBG_8192C("ptxdesc->txdw7 = %08x\n", ptxdesc->txdw7);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else if((pxmitframe->frame_tag&0x0f)== MGNT_FRAMETAG)
|
|
||||||
{
|
|
||||||
/* DBG_8192C("pxmitframe->frame_tag == MGNT_FRAMETAG\n"); */
|
|
||||||
|
|
||||||
/* offset 4 */
|
/* offset 4 */
|
||||||
ptxdesc->txdw1 |= cpu_to_le32(pattrib->mac_id&0x3f);
|
ptxdesc->txdw1 |= cpu_to_le32(pattrib->mac_id&0x3f);
|
||||||
|
|
||||||
|
@ -386,8 +373,6 @@ if (padapter->registrypriv.mp_mode == 0)
|
||||||
|
|
||||||
ptxdesc->txdw1 |= cpu_to_le32((pattrib->raid<< RATE_ID_SHT) & 0x000f0000);
|
ptxdesc->txdw1 |= cpu_to_le32((pattrib->raid<< RATE_ID_SHT) & 0x000f0000);
|
||||||
|
|
||||||
/* fill_txdesc_sectype(pattrib, ptxdesc); */
|
|
||||||
|
|
||||||
/* offset 8 */
|
/* offset 8 */
|
||||||
/* CCX-TXRPT ack for xmit mgmt frames. */
|
/* CCX-TXRPT ack for xmit mgmt frames. */
|
||||||
if (pxmitframe->ack_report) {
|
if (pxmitframe->ack_report) {
|
||||||
|
|
|
@ -67,15 +67,8 @@
|
||||||
#include <net/route.h>
|
#include <net/route.h>
|
||||||
#include <net/flow.h>
|
#include <net/flow.h>
|
||||||
#include <net/arp.h>
|
#include <net/arp.h>
|
||||||
|
|
||||||
#include <net/ieee80211_radiotap.h>
|
#include <net/ieee80211_radiotap.h>
|
||||||
#include <net/cfg80211.h>
|
#include <net/cfg80211.h>
|
||||||
|
|
||||||
#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX
|
|
||||||
#include <linux/in.h>
|
|
||||||
#include <linux/udp.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <linux/usb.h>
|
#include <linux/usb.h>
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))
|
||||||
#include <linux/usb_ch9.h>
|
#include <linux/usb_ch9.h>
|
||||||
|
|
|
@ -171,9 +171,6 @@ struct pkt_attrib
|
||||||
u8 intel_proxim;
|
u8 intel_proxim;
|
||||||
u8 retry_ctrl;
|
u8 retry_ctrl;
|
||||||
struct sta_info * psta;
|
struct sta_info * psta;
|
||||||
#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX
|
|
||||||
u8 hw_tcp_csum;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define WLANHDR_OFFSET 64
|
#define WLANHDR_OFFSET 64
|
||||||
|
|
|
@ -41,22 +41,20 @@ struct sta_xmit_priv;
|
||||||
struct xmit_frame;
|
struct xmit_frame;
|
||||||
struct xmit_buf;
|
struct xmit_buf;
|
||||||
|
|
||||||
extern int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||||
extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||||
|
|
||||||
void rtw_os_xmit_schedule(struct adapter *padapter);
|
void rtw_os_xmit_schedule(struct adapter *padapter);
|
||||||
|
|
||||||
int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz);
|
int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz);
|
||||||
void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz);
|
void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz);
|
||||||
|
|
||||||
extern void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib);
|
uint rtw_remainder_len(struct pkt_file *pfile);
|
||||||
|
void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile);
|
||||||
|
uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen);
|
||||||
|
sint rtw_endofpktfile (struct pkt_file *pfile);
|
||||||
|
|
||||||
extern uint rtw_remainder_len(struct pkt_file *pfile);
|
void rtw_os_pkt_complete(struct adapter *padapter, _pkt *pkt);
|
||||||
extern void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile);
|
void rtw_os_xmit_complete(struct adapter *padapter, struct xmit_frame *pxframe);
|
||||||
extern uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen);
|
|
||||||
extern sint rtw_endofpktfile (struct pkt_file *pfile);
|
|
||||||
|
|
||||||
extern void rtw_os_pkt_complete(struct adapter *padapter, _pkt *pkt);
|
|
||||||
extern void rtw_os_xmit_complete(struct adapter *padapter, struct xmit_frame *pxframe);
|
|
||||||
|
|
||||||
#endif //__XMIT_OSDEP_H_
|
#endif //__XMIT_OSDEP_H_
|
||||||
|
|
|
@ -415,33 +415,12 @@ int hostapd_mode_init(struct adapter *padapter)
|
||||||
pnetdev->stop = mgnt_netdev_close;
|
pnetdev->stop = mgnt_netdev_close;
|
||||||
|
|
||||||
pnetdev->hard_start_xmit = mgnt_xmit_entry;
|
pnetdev->hard_start_xmit = mgnt_xmit_entry;
|
||||||
|
|
||||||
/* pnetdev->set_mac_address = r871x_net_set_mac_address; */
|
|
||||||
|
|
||||||
/* pnetdev->get_stats = r871x_net_get_stats; */
|
|
||||||
|
|
||||||
/* pnetdev->do_ioctl = r871x_mp_ioctl; */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pnetdev->watchdog_timeo = HZ; /* 1 second timeout */
|
pnetdev->watchdog_timeo = HZ; /* 1 second timeout */
|
||||||
|
|
||||||
/* pnetdev->wireless_handlers = NULL; */
|
|
||||||
|
|
||||||
#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX
|
|
||||||
pnetdev->features |= NETIF_F_IP_CSUM;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(dev_alloc_name(pnetdev,"mgnt.wlan%d") < 0)
|
if(dev_alloc_name(pnetdev,"mgnt.wlan%d") < 0)
|
||||||
{
|
|
||||||
DBG_871X("hostapd_mode_init(): dev_alloc_name, fail! \n");
|
DBG_871X("hostapd_mode_init(): dev_alloc_name, fail! \n");
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* SET_NETDEV_DEV(pnetdev, pintfpriv->udev); */
|
|
||||||
|
|
||||||
|
|
||||||
mac[0]=0x00;
|
mac[0]=0x00;
|
||||||
mac[1]=0xe0;
|
mac[1]=0xe0;
|
||||||
|
@ -457,18 +436,12 @@ int hostapd_mode_init(struct adapter *padapter)
|
||||||
|
|
||||||
|
|
||||||
/* Tell the network stack we exist */
|
/* Tell the network stack we exist */
|
||||||
if (register_netdev(pnetdev) != 0)
|
if (register_netdev(pnetdev) != 0) {
|
||||||
{
|
|
||||||
DBG_871X("hostapd_mode_init(): register_netdev fail!\n");
|
DBG_871X("hostapd_mode_init(): register_netdev fail!\n");
|
||||||
|
|
||||||
if(pnetdev)
|
if(pnetdev)
|
||||||
{
|
|
||||||
rtw_free_netdev(pnetdev);
|
rtw_free_netdev(pnetdev);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void hostapd_mode_unload(struct adapter *padapter)
|
void hostapd_mode_unload(struct adapter *padapter)
|
||||||
|
|
|
@ -594,26 +594,15 @@ struct net_device *rtw_init_netdev(struct adapter *old_padapter)
|
||||||
pnetdev->do_ioctl = rtw_ioctl;
|
pnetdev->do_ioctl = rtw_ioctl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX
|
|
||||||
pnetdev->features |= NETIF_F_IP_CSUM;
|
|
||||||
#endif
|
|
||||||
/* pnetdev->tx_timeout = NULL; */
|
|
||||||
pnetdev->watchdog_timeo = HZ*3; /* 3 second timeout */
|
pnetdev->watchdog_timeo = HZ*3; /* 3 second timeout */
|
||||||
#ifdef CONFIG_WIRELESS_EXT
|
#ifdef CONFIG_WIRELESS_EXT
|
||||||
pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def;
|
pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIRELESS_SPY
|
|
||||||
/* priv->wireless_data.spy_data = &priv->spy_data; */
|
|
||||||
/* pnetdev->wireless_data = &priv->wireless_data; */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* step 2. */
|
/* step 2. */
|
||||||
loadparam(padapter, pnetdev);
|
loadparam(padapter, pnetdev);
|
||||||
|
|
||||||
return pnetdev;
|
return pnetdev;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 rtw_start_drv_threads(struct adapter *padapter)
|
u32 rtw_start_drv_threads(struct adapter *padapter)
|
||||||
|
|
|
@ -72,39 +72,6 @@ sint rtw_endofpktfile(struct pkt_file *pfile)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib)
|
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX
|
|
||||||
struct sk_buff *skb = (struct sk_buff *)pkt;
|
|
||||||
pattrib->hw_tcp_csum = 0;
|
|
||||||
|
|
||||||
if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
|
||||||
if (skb_shinfo(skb)->nr_frags == 0)
|
|
||||||
{
|
|
||||||
const struct iphdr *ip = ip_hdr(skb);
|
|
||||||
if (ip->protocol == IPPROTO_TCP) {
|
|
||||||
/* TCP checksum offload by HW */
|
|
||||||
DBG_871X("CHECKSUM_PARTIAL TCP\n");
|
|
||||||
pattrib->hw_tcp_csum = 1;
|
|
||||||
/* skb_checksum_help(skb); */
|
|
||||||
} else if (ip->protocol == IPPROTO_UDP) {
|
|
||||||
/* DBG_871X("CHECKSUM_PARTIAL UDP\n"); */
|
|
||||||
skb_checksum_help(skb);
|
|
||||||
} else {
|
|
||||||
DBG_871X("%s-%d TCP CSUM offload Error!!\n", __FUNCTION__, __LINE__);
|
|
||||||
WARN_ON(1); /* we need a WARN() */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else { /* IP fragmentation case */
|
|
||||||
DBG_871X("%s-%d nr_frags != 0, using skb_checksum_help(skb);!!\n", __FUNCTION__, __LINE__);
|
|
||||||
skb_checksum_help(skb);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz)
|
int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
Loading…
Reference in a new issue