1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * This file is part of wl12xx
4 *
5 * Copyright (C) 2008-2009 Nokia Corporation
6 * Copyright (C) 2011 Texas Instruments Inc.
7 */
8
9#include "../wlcore/cmd.h"
10#include "../wlcore/debug.h"
11#include "../wlcore/acx.h"
12
13#include "acx.h"
14
15int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap)
16{
17	struct wl1271_acx_host_config_bitmap *bitmap_conf;
18	int ret;
19
20	bitmap_conf = kzalloc(sizeof(*bitmap_conf), GFP_KERNEL);
21	if (!bitmap_conf) {
22		ret = -ENOMEM;
23		goto out;
24	}
25
26	bitmap_conf->host_cfg_bitmap = cpu_to_le32(host_cfg_bitmap);
27
28	ret = wl1271_cmd_configure(wl, ACX_HOST_IF_CFG_BITMAP,
29				   bitmap_conf, sizeof(*bitmap_conf));
30	if (ret < 0) {
31		wl1271_warning("wl1271 bitmap config opt failed: %d", ret);
32		goto out;
33	}
34
35out:
36	kfree(bitmap_conf);
37
38	return ret;
39}
40