diff options
author | Arik Nemtsov <arik@wizery.com> | 2012-05-10 12:13:27 +0300 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-05 15:55:20 +0300 |
commit | 2fc28de5989e1c40fee4e92e2a8f3bdd47b1b34a (patch) | |
tree | 78db906825e679db86874d628881f0525e1ab8d3 /drivers/net/wireless/ti/wl18xx/acx.c | |
parent | b8422dcb865befc5d2d7c21e8427eedf32558fea (diff) |
wlcore/wl18xx: add hw op for setting Tx HW checksum
Some chip families are capable of checksumming certain classes of Tx
packets in HW. Indicate this fact in the netdev features and perform the
HW checksum by protocol type for the 18xx family.
Fix the location of the skb network header when we move it so we can
rely on it when setting the checksum.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/acx.c')
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/acx.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/acx.c b/drivers/net/wireless/ti/wl18xx/acx.c index aed8d0dff91..3379db23a16 100644 --- a/drivers/net/wireless/ti/wl18xx/acx.c +++ b/drivers/net/wireless/ti/wl18xx/acx.c @@ -55,3 +55,29 @@ out: return ret; } + +int wl18xx_acx_set_checksum_state(struct wl1271 *wl) +{ + struct wl18xx_acx_checksum_state *acx; + int ret; + + wl1271_debug(DEBUG_ACX, "acx checksum state"); + + acx = kzalloc(sizeof(*acx), GFP_KERNEL); + if (!acx) { + ret = -ENOMEM; + goto out; + } + + acx->checksum_state = CHECKSUM_OFFLOAD_ENABLED; + + ret = wl1271_cmd_configure(wl, ACX_CHECKSUM_CONFIG, acx, sizeof(*acx)); + if (ret < 0) { + wl1271_warning("failed to set Tx checksum state: %d", ret); + goto out; + } + +out: + kfree(acx); + return ret; +} |