summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wl18xx/acx.c
diff options
context:
space:
mode:
authorGuy Mishol2016-08-24 13:35:27 +0200
committerKalle Valo2016-09-03 19:02:34 +0200
commitc5aa9541818a1aacf05ab9a30c3f525841cdc1c9 (patch)
tree7eb6ace156a44dd619a4a7e7beb0e14bbe0001cb /drivers/net/wireless/ti/wl18xx/acx.c
parentbrcmfmac: fix pmksa->bssid usage (diff)
downloadkernel-qcow2-linux-c5aa9541818a1aacf05ab9a30c3f525841cdc1c9.tar.gz
kernel-qcow2-linux-c5aa9541818a1aacf05ab9a30c3f525841cdc1c9.tar.xz
kernel-qcow2-linux-c5aa9541818a1aacf05ab9a30c3f525841cdc1c9.zip
wl18xx: add time sync configuration api
Add time sync configuration api. The new api allows to configure the synchronization mode (STA/AP/MESH) and (in case of Mesh mode) the master address of each zone. Signed-off-by: Guy Mishol <guym@ti.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/acx.c')
-rw-r--r--drivers/net/wireless/ti/wl18xx/acx.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/acx.c b/drivers/net/wireless/ti/wl18xx/acx.c
index 4be0409308cb..b5525a38264b 100644
--- a/drivers/net/wireless/ti/wl18xx/acx.c
+++ b/drivers/net/wireless/ti/wl18xx/acx.c
@@ -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;
+}