wlcore/wl18xx: add hw op for setting Tx HW checksum
[profile/ivi/kernel-x86-ivi.git] / drivers / net / wireless / ti / wl18xx / acx.c
index aed8d0d..3379db2 100644 (file)
@@ -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;
+}