18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * This file is part of wl12xx 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2008-2009 Nokia Corporation 68c2ecf20Sopenharmony_ci * Copyright (C) 2011 Texas Instruments Inc. 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include "../wlcore/cmd.h" 108c2ecf20Sopenharmony_ci#include "../wlcore/debug.h" 118c2ecf20Sopenharmony_ci#include "../wlcore/acx.h" 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include "acx.h" 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciint wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap) 168c2ecf20Sopenharmony_ci{ 178c2ecf20Sopenharmony_ci struct wl1271_acx_host_config_bitmap *bitmap_conf; 188c2ecf20Sopenharmony_ci int ret; 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci bitmap_conf = kzalloc(sizeof(*bitmap_conf), GFP_KERNEL); 218c2ecf20Sopenharmony_ci if (!bitmap_conf) { 228c2ecf20Sopenharmony_ci ret = -ENOMEM; 238c2ecf20Sopenharmony_ci goto out; 248c2ecf20Sopenharmony_ci } 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci bitmap_conf->host_cfg_bitmap = cpu_to_le32(host_cfg_bitmap); 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci ret = wl1271_cmd_configure(wl, ACX_HOST_IF_CFG_BITMAP, 298c2ecf20Sopenharmony_ci bitmap_conf, sizeof(*bitmap_conf)); 308c2ecf20Sopenharmony_ci if (ret < 0) { 318c2ecf20Sopenharmony_ci wl1271_warning("wl1271 bitmap config opt failed: %d", ret); 328c2ecf20Sopenharmony_ci goto out; 338c2ecf20Sopenharmony_ci } 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciout: 368c2ecf20Sopenharmony_ci kfree(bitmap_conf); 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci return ret; 398c2ecf20Sopenharmony_ci} 40