162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * This file is part of wl12xx 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 2008-2009 Nokia Corporation 662306a36Sopenharmony_ci * Copyright (C) 2011 Texas Instruments Inc. 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#include "../wlcore/cmd.h" 1062306a36Sopenharmony_ci#include "../wlcore/debug.h" 1162306a36Sopenharmony_ci#include "../wlcore/acx.h" 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#include "acx.h" 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciint wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap) 1662306a36Sopenharmony_ci{ 1762306a36Sopenharmony_ci struct wl1271_acx_host_config_bitmap *bitmap_conf; 1862306a36Sopenharmony_ci int ret; 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci bitmap_conf = kzalloc(sizeof(*bitmap_conf), GFP_KERNEL); 2162306a36Sopenharmony_ci if (!bitmap_conf) { 2262306a36Sopenharmony_ci ret = -ENOMEM; 2362306a36Sopenharmony_ci goto out; 2462306a36Sopenharmony_ci } 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci bitmap_conf->host_cfg_bitmap = cpu_to_le32(host_cfg_bitmap); 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci ret = wl1271_cmd_configure(wl, ACX_HOST_IF_CFG_BITMAP, 2962306a36Sopenharmony_ci bitmap_conf, sizeof(*bitmap_conf)); 3062306a36Sopenharmony_ci if (ret < 0) { 3162306a36Sopenharmony_ci wl1271_warning("wl1271 bitmap config opt failed: %d", ret); 3262306a36Sopenharmony_ci goto out; 3362306a36Sopenharmony_ci } 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ciout: 3662306a36Sopenharmony_ci kfree(bitmap_conf); 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci return ret; 3962306a36Sopenharmony_ci} 40