acx.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * This file is part of wl12xx
  3. *
  4. * Copyright (C) 2008-2009 Nokia Corporation
  5. * Copyright (C) 2011 Texas Instruments Inc.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * version 2 as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  19. * 02110-1301 USA
  20. *
  21. */
  22. #include "../wlcore/cmd.h"
  23. #include "../wlcore/debug.h"
  24. #include "../wlcore/acx.h"
  25. #include "acx.h"
  26. int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap)
  27. {
  28. struct wl1271_acx_host_config_bitmap *bitmap_conf;
  29. int ret;
  30. bitmap_conf = kzalloc(sizeof(*bitmap_conf), GFP_KERNEL);
  31. if (!bitmap_conf) {
  32. ret = -ENOMEM;
  33. goto out;
  34. }
  35. bitmap_conf->host_cfg_bitmap = cpu_to_le32(host_cfg_bitmap);
  36. ret = wl1271_cmd_configure(wl, ACX_HOST_IF_CFG_BITMAP,
  37. bitmap_conf, sizeof(*bitmap_conf));
  38. if (ret < 0) {
  39. wl1271_warning("wl1271 bitmap config opt failed: %d", ret);
  40. goto out;
  41. }
  42. out:
  43. kfree(bitmap_conf);
  44. return ret;
  45. }