Merge remote-tracking branch 'ftrace/for-next'
[deliverable/linux.git] / drivers / net / wireless / ti / wl18xx / acx.c
index 4be0409308cb6f2a9d315b7ed77d2150f65ad6f0..b5525a38264b45d9b7b25a0db75f682764cb5a43 100644 (file)
@@ -309,3 +309,32 @@ out:
        kfree(acx);
        return ret;
 }
+
+int wl18xx_acx_time_sync_cfg(struct wl1271 *wl)
+{
+       struct acx_time_sync_cfg *acx;
+       int ret;
+
+       wl1271_debug(DEBUG_ACX, "acx time sync cfg: mode %d, addr: %pM",
+                    wl->conf.sg.params[WL18XX_CONF_SG_TIME_SYNC],
+                    wl->zone_master_mac_addr);
+
+       acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+       if (!acx) {
+               ret = -ENOMEM;
+               goto out;
+       }
+
+       acx->sync_mode = wl->conf.sg.params[WL18XX_CONF_SG_TIME_SYNC];
+       memcpy(acx->zone_mac_addr, wl->zone_master_mac_addr, ETH_ALEN);
+
+       ret = wl1271_cmd_configure(wl, ACX_TIME_SYNC_CFG,
+                                  acx, sizeof(*acx));
+       if (ret < 0) {
+               wl1271_warning("acx time sync cfg failed: %d", ret);
+               goto out;
+       }
+out:
+       kfree(acx);
+       return ret;
+}
This page took 0.024303 seconds and 5 git commands to generate.