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:
Larry Finger 2015-03-12 14:14:19 -05:00
parent bb4b1fe327
commit f42ef2ce84
8 changed files with 10 additions and 111 deletions

View file

@ -415,33 +415,12 @@ int hostapd_mode_init(struct adapter *padapter)
pnetdev->stop = mgnt_netdev_close;
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
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)
{
DBG_871X("hostapd_mode_init(): dev_alloc_name, fail! \n");
}
/* SET_NETDEV_DEV(pnetdev, pintfpriv->udev); */
mac[0]=0x00;
mac[1]=0xe0;
@ -457,18 +436,12 @@ int hostapd_mode_init(struct adapter *padapter)
/* 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");
if(pnetdev)
{
rtw_free_netdev(pnetdev);
}
}
return 0;
}
void hostapd_mode_unload(struct adapter *padapter)

View file

@ -594,26 +594,15 @@ struct net_device *rtw_init_netdev(struct adapter *old_padapter)
pnetdev->do_ioctl = rtw_ioctl;
#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 */
#ifdef CONFIG_WIRELESS_EXT
pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def;
#endif
#ifdef WIRELESS_SPY
/* priv->wireless_data.spy_data = &priv->spy_data; */
/* pnetdev->wireless_data = &priv->wireless_data; */
#endif
/* step 2. */
loadparam(padapter, pnetdev);
return pnetdev;
}
u32 rtw_start_drv_threads(struct adapter *padapter)

View file

@ -72,39 +72,6 @@ sint rtw_endofpktfile(struct pkt_file *pfile)
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 i;