19d68d1eeSLuciano Coelho /* 29d68d1eeSLuciano Coelho * This file is part of wl12xx 39d68d1eeSLuciano Coelho * 49d68d1eeSLuciano Coelho * Copyright (C) 2008-2009 Nokia Corporation 59d68d1eeSLuciano Coelho * Copyright (C) 2011 Texas Instruments Inc. 69d68d1eeSLuciano Coelho * 79d68d1eeSLuciano Coelho * This program is free software; you can redistribute it and/or 89d68d1eeSLuciano Coelho * modify it under the terms of the GNU General Public License 99d68d1eeSLuciano Coelho * version 2 as published by the Free Software Foundation. 109d68d1eeSLuciano Coelho * 119d68d1eeSLuciano Coelho * This program is distributed in the hope that it will be useful, but 129d68d1eeSLuciano Coelho * WITHOUT ANY WARRANTY; without even the implied warranty of 139d68d1eeSLuciano Coelho * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 149d68d1eeSLuciano Coelho * General Public License for more details. 159d68d1eeSLuciano Coelho * 169d68d1eeSLuciano Coelho * You should have received a copy of the GNU General Public License 179d68d1eeSLuciano Coelho * along with this program; if not, write to the Free Software 189d68d1eeSLuciano Coelho * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 199d68d1eeSLuciano Coelho * 02110-1301 USA 209d68d1eeSLuciano Coelho * 219d68d1eeSLuciano Coelho */ 229d68d1eeSLuciano Coelho 239d68d1eeSLuciano Coelho #include "../wlcore/cmd.h" 249d68d1eeSLuciano Coelho #include "../wlcore/debug.h" 259d68d1eeSLuciano Coelho #include "../wlcore/acx.h" 269d68d1eeSLuciano Coelho 279d68d1eeSLuciano Coelho #include "acx.h" 289d68d1eeSLuciano Coelho 299d68d1eeSLuciano Coelho int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap) 309d68d1eeSLuciano Coelho { 319d68d1eeSLuciano Coelho struct wl1271_acx_host_config_bitmap *bitmap_conf; 329d68d1eeSLuciano Coelho int ret; 339d68d1eeSLuciano Coelho 349d68d1eeSLuciano Coelho bitmap_conf = kzalloc(sizeof(*bitmap_conf), GFP_KERNEL); 359d68d1eeSLuciano Coelho if (!bitmap_conf) { 369d68d1eeSLuciano Coelho ret = -ENOMEM; 379d68d1eeSLuciano Coelho goto out; 389d68d1eeSLuciano Coelho } 399d68d1eeSLuciano Coelho 409d68d1eeSLuciano Coelho bitmap_conf->host_cfg_bitmap = cpu_to_le32(host_cfg_bitmap); 419d68d1eeSLuciano Coelho 429d68d1eeSLuciano Coelho ret = wl1271_cmd_configure(wl, ACX_HOST_IF_CFG_BITMAP, 439d68d1eeSLuciano Coelho bitmap_conf, sizeof(*bitmap_conf)); 449d68d1eeSLuciano Coelho if (ret < 0) { 459d68d1eeSLuciano Coelho wl1271_warning("wl1271 bitmap config opt failed: %d", ret); 469d68d1eeSLuciano Coelho goto out; 479d68d1eeSLuciano Coelho } 489d68d1eeSLuciano Coelho 499d68d1eeSLuciano Coelho out: 509d68d1eeSLuciano Coelho kfree(bitmap_conf); 519d68d1eeSLuciano Coelho 529d68d1eeSLuciano Coelho return ret; 539d68d1eeSLuciano Coelho } 54