/* * wrapper for wlcore_cmd_configure that accepts only success status. * return 0 on success */ int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len) { int ret = wlcore_cmd_configure_failsafe(wl, id, buf, len, 0); if (ret < 0) return ret; return 0; }
/* setup BA session receiver setting in the FW. */ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, u16 ssn, bool enable, u8 peer_hlid, u8 win_size) { struct wl1271_acx_ba_receiver_setup *acx; int ret; wl1271_debug(DEBUG_ACX, "acx ba receiver session setting"); acx = kzalloc(sizeof(*acx), GFP_KERNEL); if (!acx) { ret = -ENOMEM; goto out; } acx->hlid = peer_hlid; acx->tid = tid_index; acx->enable = enable; acx->win_size = win_size; acx->ssn = ssn; ret = wlcore_cmd_configure_failsafe(wl, ACX_BA_SESSION_RX_SETUP, acx, sizeof(*acx), BIT(CMD_STATUS_NO_RX_BA_SESSION)); if (ret < 0) { wl1271_warning("acx ba receiver session failed: %d", ret); goto out; } /* sometimes we can't start the session */ if (ret == CMD_STATUS_NO_RX_BA_SESSION) { wl1271_warning("no fw rx ba on tid %d", tid_index); ret = -EBUSY; goto out; } ret = 0; out: kfree(acx); return ret; }