acx.c 824 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. #include "../wlcore/cmd.h"
  9. #include "../wlcore/debug.h"
  10. #include "../wlcore/acx.h"
  11. #include "acx.h"
  12. int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap)
  13. {
  14. struct wl1271_acx_host_config_bitmap *bitmap_conf;
  15. int ret;
  16. bitmap_conf = kzalloc(sizeof(*bitmap_conf), GFP_KERNEL);
  17. if (!bitmap_conf) {
  18. ret = -ENOMEM;
  19. goto out;
  20. }
  21. bitmap_conf->host_cfg_bitmap = cpu_to_le32(host_cfg_bitmap);
  22. ret = wl1271_cmd_configure(wl, ACX_HOST_IF_CFG_BITMAP,
  23. bitmap_conf, sizeof(*bitmap_conf));
  24. if (ret < 0) {
  25. wl1271_warning("wl1271 bitmap config opt failed: %d", ret);
  26. goto out;
  27. }
  28. out:
  29. kfree(bitmap_conf);
  30. return ret;
  31. }