-/* $OpenBSD: if_iwm.c,v 1.97 2016/08/07 23:06:39 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.98 2016/08/15 12:59:53 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
cmd.aggregate = 0;
cmd.window = IWM_FRAME_LIMIT;
- error = iwm_mvm_send_cmd_pdu(sc, IWM_SCD_QUEUE_CFG, IWM_CMD_SYNC,
+ error = iwm_mvm_send_cmd_pdu(sc, IWM_SCD_QUEUE_CFG, 0,
sizeof(cmd), &cmd);
if (error) {
DPRINTF(("%s: cannot enable txq %d\n", DEVNAME(sc), qid));
if (sc->sc_capaflags & IWM_UCODE_TLV_FLAGS_TIME_EVENT_API_V2)
return iwm_mvm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD,
- IWM_CMD_SYNC, sizeof(*cmd), cmd);
+ 0, sizeof(*cmd), cmd);
iwm_mvm_te_v2_to_v1(cmd, &cmd_v1);
- return iwm_mvm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD, IWM_CMD_SYNC,
+ return iwm_mvm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD, 0,
sizeof(cmd_v1), &cmd_v1);
}
struct iwm_rx_packet *pkt;
struct iwm_host_cmd cmd = {
.id = IWM_NVM_ACCESS_CMD,
- .flags = IWM_CMD_SYNC | IWM_CMD_WANT_SKB |
- IWM_CMD_SEND_IN_RFKILL,
+ .flags = (IWM_CMD_WANT_SKB | IWM_CMD_SEND_IN_RFKILL),
.data = { &nvm_access_cmd, },
};
int ret, offset_read;
};
return iwm_mvm_send_cmd_pdu(sc, IWM_TX_ANT_CONFIGURATION_CMD,
- IWM_CMD_SYNC, sizeof(tx_ant_cmd), &tx_ant_cmd);
+ 0, sizeof(tx_ant_cmd), &tx_ant_cmd);
}
int
sc->sc_default_calib[ucode_type].flow_trigger;
DPRINTFN(10, ("Sending Phy CFG command: 0x%x\n", phy_cfg_cmd.phy_cfg));
- return iwm_mvm_send_cmd_pdu(sc, IWM_PHY_CONFIGURATION_CMD, IWM_CMD_SYNC,
+ return iwm_mvm_send_cmd_pdu(sc, IWM_PHY_CONFIGURATION_CMD, 0,
sizeof(phy_cfg_cmd), &phy_cfg_cmd);
}
iwm_mvm_phy_ctxt_cmd_data(sc, &cmd, ctxt->channel,
chains_static, chains_dynamic);
- ret = iwm_mvm_send_cmd_pdu(sc, IWM_PHY_CONTEXT_CMD, IWM_CMD_SYNC,
+ ret = iwm_mvm_send_cmd_pdu(sc, IWM_PHY_CONTEXT_CMD, 0,
sizeof(struct iwm_phy_context_cmd), &cmd);
if (ret) {
DPRINTF(("PHY ctxt cmd error. ret=%d\n", ret));
int error, resp_len;
KASSERT((cmd->flags & IWM_CMD_WANT_SKB) == 0);
- cmd->flags |= IWM_CMD_SYNC | IWM_CMD_WANT_SKB;
+ cmd->flags |= IWM_CMD_WANT_SKB;
if ((error = iwm_send_cmd(sc, cmd)) != 0)
return error;
iwm_free_resp(struct iwm_softc *sc, struct iwm_host_cmd *hcmd)
{
KASSERT(sc->sc_wantresp != IWM_CMD_RESP_IDLE);
- KASSERT((hcmd->flags & (IWM_CMD_WANT_SKB|IWM_CMD_SYNC))
- == (IWM_CMD_WANT_SKB|IWM_CMD_SYNC));
+ KASSERT((hcmd->flags & (IWM_CMD_WANT_SKB)) == IWM_CMD_WANT_SKB);
sc->sc_wantresp = IWM_CMD_RESP_IDLE;
wakeup(&sc->sc_wantresp);
}
int ret;
ret = iwm_mvm_send_cmd_pdu(sc, IWM_TXPATH_FLUSH,
- sync ? IWM_CMD_SYNC : IWM_CMD_ASYNC,
+ sync ? 0 : IWM_CMD_ASYNC,
sizeof(flush_cmd), &flush_cmd);
if (ret)
printf("%s: Flushing tx queue failed: %d\n", DEVNAME(sc), ret);
int ret;
ret = iwm_mvm_send_cmd_pdu(sc, IWM_REPLY_BEACON_FILTERING_CMD,
- IWM_CMD_SYNC, sizeof(struct iwm_beacon_filter_cmd), cmd);
+ 0, sizeof(struct iwm_beacon_filter_cmd), cmd);
if (!ret) {
DPRINTF(("ba_enable_beacon_abort is: %d\n",
iwm_mvm_power_log(sc, &cmd);
if ((ret = iwm_mvm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE,
- IWM_CMD_SYNC, sizeof(cmd), &cmd)) != 0)
+ 0, sizeof(cmd), &cmd)) != 0)
return ret;
ba_enable = !!(cmd.flags &
DPRINTF(("Sending device power command with flags = 0x%X\n", cmd.flags));
return iwm_mvm_send_cmd_pdu(sc,
- IWM_POWER_TABLE_CMD, IWM_CMD_SYNC, sizeof(cmd), &cmd);
+ IWM_POWER_TABLE_CMD, 0, sizeof(cmd), &cmd);
}
int
.id = IWM_SCAN_OFFLOAD_REQUEST_CMD,
.len = { 0, },
.data = { NULL, },
- .flags = IWM_CMD_SYNC,
+ .flags = 0,
};
struct iwm_scan_req_lmac *req;
size_t req_len;
struct ieee80211_channel *c;
struct iwm_host_cmd hcmd = {
.id = iwm_cmd_id(IWM_SCAN_CFG_CMD, IWM_ALWAYS_LONG_GROUP, 0),
- .flags = IWM_CMD_SYNC,
+ .flags = 0,
};
static const uint32_t rates = (IWM_SCAN_CONFIG_RATE_1M |
IWM_SCAN_CONFIG_RATE_2M | IWM_SCAN_CONFIG_RATE_5M |
.id = iwm_cmd_id(IWM_SCAN_REQ_UMAC, IWM_ALWAYS_LONG_GROUP, 0),
.len = { 0, },
.data = { NULL, },
- .flags = IWM_CMD_SYNC,
+ .flags =0,
};
struct iwm_scan_req_umac *req;
struct iwm_scan_req_umac_tail *tail;
int
iwm_mvm_mac_ctxt_send_cmd(struct iwm_softc *sc, struct iwm_mac_ctx_cmd *cmd)
{
- int ret = iwm_mvm_send_cmd_pdu(sc, IWM_MAC_CONTEXT_CMD, IWM_CMD_SYNC,
+ int ret = iwm_mvm_send_cmd_pdu(sc, IWM_MAC_CONTEXT_CMD, 0,
sizeof(*cmd), cmd);
if (ret)
DPRINTF(("%s: Failed to send MAC context (action:%d): %d\n",
cmd.action = htole32(IWM_FW_CTXT_ACTION_REMOVE);
ret = iwm_mvm_send_cmd_pdu(sc,
- IWM_MAC_CONTEXT_CMD, IWM_CMD_SYNC, sizeof(cmd), &cmd);
+ IWM_MAC_CONTEXT_CMD, 0, sizeof(cmd), &cmd);
if (ret) {
printf("%s: Failed to remove MAC context: %d\n", DEVNAME(sc), ret);
return ret;
/* Give the remainder of the session to the first binding */
cmd.quotas[0].quota = htole32(le32toh(cmd.quotas[0].quota) + quota_rem);
- ret = iwm_mvm_send_cmd_pdu(sc, IWM_TIME_QUOTA_CMD, IWM_CMD_SYNC,
+ ret = iwm_mvm_send_cmd_pdu(sc, IWM_TIME_QUOTA_CMD, 0,
sizeof(cmd), &cmd);
if (ret)
DPRINTF(("%s: Failed to send quota: %d\n", DEVNAME(sc), ret));
struct iwm_host_cmd cmd = {
.id = IWM_LQ_CMD,
.len = { sizeof(in->in_lq), },
- .flags = IWM_CMD_SYNC,
+ .flags = 0,
};
memset(lq, 0, sizeof(*lq));
struct iwm_mcc_update_cmd mcc_cmd;
struct iwm_host_cmd hcmd = {
.id = IWM_MCC_UPDATE_CMD,
- .flags = (IWM_CMD_SYNC | IWM_CMD_WANT_SKB),
+ .flags = IWM_CMD_WANT_SKB,
.data = { &mcc_cmd },
};
int ret;
IEEE80211_ADDR_COPY(cmd->bssid, ni->ni_bssid);
error = iwm_mvm_send_cmd_pdu(sc, IWM_MCAST_FILTER_CMD,
- IWM_CMD_SYNC, size, cmd);
+ 0, size, cmd);
free(cmd, M_DEVBUF, size);
return error;
}