diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/acx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c index a5c9c0aff83f..8a39d1e40a68 100644 --- a/drivers/net/wireless/wl12xx/acx.c +++ b/drivers/net/wireless/wl12xx/acx.c | |||
@@ -1626,3 +1626,43 @@ out: | |||
1626 | kfree(acx); | 1626 | kfree(acx); |
1627 | return ret; | 1627 | return ret; |
1628 | } | 1628 | } |
1629 | |||
1630 | int wl1271_acx_fm_coex(struct wl1271 *wl) | ||
1631 | { | ||
1632 | struct wl1271_acx_fm_coex *acx; | ||
1633 | int ret; | ||
1634 | |||
1635 | wl1271_debug(DEBUG_ACX, "acx fm coex setting"); | ||
1636 | |||
1637 | acx = kzalloc(sizeof(*acx), GFP_KERNEL); | ||
1638 | if (!acx) { | ||
1639 | ret = -ENOMEM; | ||
1640 | goto out; | ||
1641 | } | ||
1642 | |||
1643 | acx->enable = wl->conf.fm_coex.enable; | ||
1644 | acx->swallow_period = wl->conf.fm_coex.swallow_period; | ||
1645 | acx->n_divider_fref_set_1 = wl->conf.fm_coex.n_divider_fref_set_1; | ||
1646 | acx->n_divider_fref_set_2 = wl->conf.fm_coex.n_divider_fref_set_2; | ||
1647 | acx->m_divider_fref_set_1 = | ||
1648 | cpu_to_le16(wl->conf.fm_coex.m_divider_fref_set_1); | ||
1649 | acx->m_divider_fref_set_2 = | ||
1650 | cpu_to_le16(wl->conf.fm_coex.m_divider_fref_set_2); | ||
1651 | acx->coex_pll_stabilization_time = | ||
1652 | cpu_to_le32(wl->conf.fm_coex.coex_pll_stabilization_time); | ||
1653 | acx->ldo_stabilization_time = | ||
1654 | cpu_to_le16(wl->conf.fm_coex.ldo_stabilization_time); | ||
1655 | acx->fm_disturbed_band_margin = | ||
1656 | wl->conf.fm_coex.fm_disturbed_band_margin; | ||
1657 | acx->swallow_clk_diff = wl->conf.fm_coex.swallow_clk_diff; | ||
1658 | |||
1659 | ret = wl1271_cmd_configure(wl, ACX_FM_COEX_CFG, acx, sizeof(*acx)); | ||
1660 | if (ret < 0) { | ||
1661 | wl1271_warning("acx fm coex setting failed: %d", ret); | ||
1662 | goto out; | ||
1663 | } | ||
1664 | |||
1665 | out: | ||
1666 | kfree(acx); | ||
1667 | return ret; | ||
1668 | } | ||