Commit a1022927 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach

iwlwifi: remove CMD_SYNC

CMD_SYNC is really 0 which is confusing:

if (cmd.flags & CMD_SYNC) is always false.
Fix this by simply removing its definition.
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 90c456fc
...@@ -94,7 +94,6 @@ int iwl_send_calib_results(struct iwl_priv *priv) ...@@ -94,7 +94,6 @@ int iwl_send_calib_results(struct iwl_priv *priv)
{ {
struct iwl_host_cmd hcmd = { struct iwl_host_cmd hcmd = {
.id = REPLY_PHY_CALIBRATION_CMD, .id = REPLY_PHY_CALIBRATION_CMD,
.flags = CMD_SYNC,
}; };
struct iwl_calib_result *res; struct iwl_calib_result *res;
......
...@@ -1481,7 +1481,7 @@ static ssize_t iwl_dbgfs_ucode_bt_stats_read(struct file *file, ...@@ -1481,7 +1481,7 @@ static ssize_t iwl_dbgfs_ucode_bt_stats_read(struct file *file,
/* make request to uCode to retrieve statistics information */ /* make request to uCode to retrieve statistics information */
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
ret = iwl_send_statistics_request(priv, CMD_SYNC, false); ret = iwl_send_statistics_request(priv, 0, false);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
if (ret) if (ret)
...@@ -1868,7 +1868,7 @@ static ssize_t iwl_dbgfs_clear_ucode_statistics_write(struct file *file, ...@@ -1868,7 +1868,7 @@ static ssize_t iwl_dbgfs_clear_ucode_statistics_write(struct file *file,
/* make request to uCode to retrieve statistics information */ /* make request to uCode to retrieve statistics information */
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
iwl_send_statistics_request(priv, CMD_SYNC, true); iwl_send_statistics_request(priv, 0, true);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
return count; return count;
...@@ -2188,7 +2188,6 @@ static int iwl_cmd_echo_test(struct iwl_priv *priv) ...@@ -2188,7 +2188,6 @@ static int iwl_cmd_echo_test(struct iwl_priv *priv)
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = REPLY_ECHO, .id = REPLY_ECHO,
.len = { 0 }, .len = { 0 },
.flags = CMD_SYNC,
}; };
ret = iwl_dvm_send_cmd(priv, &cmd); ret = iwl_dvm_send_cmd(priv, &cmd);
...@@ -2320,7 +2319,7 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct file *file, ...@@ -2320,7 +2319,7 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct file *file,
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
/* take the return value to make compiler happy - it will fail anyway */ /* take the return value to make compiler happy - it will fail anyway */
ret = iwl_dvm_send_cmd_pdu(priv, REPLY_ERROR, CMD_SYNC, 0, NULL); ret = iwl_dvm_send_cmd_pdu(priv, REPLY_ERROR, 0, 0, NULL);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
......
...@@ -417,7 +417,6 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, ...@@ -417,7 +417,6 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
struct iwl_host_cmd hcmd = { struct iwl_host_cmd hcmd = {
.id = REPLY_CHANNEL_SWITCH, .id = REPLY_CHANNEL_SWITCH,
.len = { sizeof(cmd), }, .len = { sizeof(cmd), },
.flags = CMD_SYNC,
.data = { &cmd, }, .data = { &cmd, },
}; };
...@@ -579,7 +578,6 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, ...@@ -579,7 +578,6 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
struct iwl_host_cmd hcmd = { struct iwl_host_cmd hcmd = {
.id = REPLY_CHANNEL_SWITCH, .id = REPLY_CHANNEL_SWITCH,
.len = { sizeof(*cmd), }, .len = { sizeof(*cmd), },
.flags = CMD_SYNC,
.dataflags[0] = IWL_HCMD_DFL_NOCOPY, .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
}; };
int err; int err;
......
...@@ -81,7 +81,7 @@ int iwlagn_send_tx_power(struct iwl_priv *priv) ...@@ -81,7 +81,7 @@ int iwlagn_send_tx_power(struct iwl_priv *priv)
else else
tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD; tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD;
return iwl_dvm_send_cmd_pdu(priv, tx_ant_cfg_cmd, CMD_SYNC, return iwl_dvm_send_cmd_pdu(priv, tx_ant_cfg_cmd, 0,
sizeof(tx_power_cmd), &tx_power_cmd); sizeof(tx_power_cmd), &tx_power_cmd);
} }
...@@ -141,7 +141,6 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u32 scd_q_msk) ...@@ -141,7 +141,6 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u32 scd_q_msk)
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = REPLY_TXFIFO_FLUSH, .id = REPLY_TXFIFO_FLUSH,
.len = { sizeof(struct iwl_txfifo_flush_cmd), }, .len = { sizeof(struct iwl_txfifo_flush_cmd), },
.flags = CMD_SYNC,
.data = { &flush_cmd, }, .data = { &flush_cmd, },
}; };
...@@ -333,12 +332,12 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv) ...@@ -333,12 +332,12 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
memcpy(&bt_cmd_v2.basic, &basic, memcpy(&bt_cmd_v2.basic, &basic,
sizeof(basic)); sizeof(basic));
ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG, ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG,
CMD_SYNC, sizeof(bt_cmd_v2), &bt_cmd_v2); 0, sizeof(bt_cmd_v2), &bt_cmd_v2);
} else { } else {
memcpy(&bt_cmd_v1.basic, &basic, memcpy(&bt_cmd_v1.basic, &basic,
sizeof(basic)); sizeof(basic));
ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG, ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG,
CMD_SYNC, sizeof(bt_cmd_v1), &bt_cmd_v1); 0, sizeof(bt_cmd_v1), &bt_cmd_v1);
} }
if (ret) if (ret)
IWL_ERR(priv, "failed to send BT Coex Config\n"); IWL_ERR(priv, "failed to send BT Coex Config\n");
...@@ -1044,7 +1043,6 @@ int iwlagn_send_patterns(struct iwl_priv *priv, ...@@ -1044,7 +1043,6 @@ int iwlagn_send_patterns(struct iwl_priv *priv,
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = REPLY_WOWLAN_PATTERNS, .id = REPLY_WOWLAN_PATTERNS,
.dataflags[0] = IWL_HCMD_DFL_NOCOPY, .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
.flags = CMD_SYNC,
}; };
int i, err; int i, err;
...@@ -1201,7 +1199,6 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan) ...@@ -1201,7 +1199,6 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan)
if (key_data.use_rsc_tsc) { if (key_data.use_rsc_tsc) {
struct iwl_host_cmd rsc_tsc_cmd = { struct iwl_host_cmd rsc_tsc_cmd = {
.id = REPLY_WOWLAN_TSC_RSC_PARAMS, .id = REPLY_WOWLAN_TSC_RSC_PARAMS,
.flags = CMD_SYNC,
.data[0] = key_data.rsc_tsc, .data[0] = key_data.rsc_tsc,
.dataflags[0] = IWL_HCMD_DFL_NOCOPY, .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
.len[0] = sizeof(*key_data.rsc_tsc), .len[0] = sizeof(*key_data.rsc_tsc),
...@@ -1215,7 +1212,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan) ...@@ -1215,7 +1212,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan)
if (key_data.use_tkip) { if (key_data.use_tkip) {
ret = iwl_dvm_send_cmd_pdu(priv, ret = iwl_dvm_send_cmd_pdu(priv,
REPLY_WOWLAN_TKIP_PARAMS, REPLY_WOWLAN_TKIP_PARAMS,
CMD_SYNC, sizeof(tkip_cmd), 0, sizeof(tkip_cmd),
&tkip_cmd); &tkip_cmd);
if (ret) if (ret)
goto out; goto out;
...@@ -1231,20 +1228,20 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan) ...@@ -1231,20 +1228,20 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan)
ret = iwl_dvm_send_cmd_pdu(priv, ret = iwl_dvm_send_cmd_pdu(priv,
REPLY_WOWLAN_KEK_KCK_MATERIAL, REPLY_WOWLAN_KEK_KCK_MATERIAL,
CMD_SYNC, sizeof(kek_kck_cmd), 0, sizeof(kek_kck_cmd),
&kek_kck_cmd); &kek_kck_cmd);
if (ret) if (ret)
goto out; goto out;
} }
} }
ret = iwl_dvm_send_cmd_pdu(priv, REPLY_D3_CONFIG, CMD_SYNC, ret = iwl_dvm_send_cmd_pdu(priv, REPLY_D3_CONFIG, 0,
sizeof(d3_cfg_cmd), &d3_cfg_cmd); sizeof(d3_cfg_cmd), &d3_cfg_cmd);
if (ret) if (ret)
goto out; goto out;
ret = iwl_dvm_send_cmd_pdu(priv, REPLY_WOWLAN_WAKEUP_FILTER, ret = iwl_dvm_send_cmd_pdu(priv, REPLY_WOWLAN_WAKEUP_FILTER,
CMD_SYNC, sizeof(wakeup_filter_cmd), 0, sizeof(wakeup_filter_cmd),
&wakeup_filter_cmd); &wakeup_filter_cmd);
if (ret) if (ret)
goto out; goto out;
......
...@@ -128,7 +128,6 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv) ...@@ -128,7 +128,6 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv)
struct iwl_tx_beacon_cmd *tx_beacon_cmd; struct iwl_tx_beacon_cmd *tx_beacon_cmd;
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = REPLY_TX_BEACON, .id = REPLY_TX_BEACON,
.flags = CMD_SYNC,
}; };
struct ieee80211_tx_info *info; struct ieee80211_tx_info *info;
u32 frame_size; u32 frame_size;
...@@ -311,8 +310,7 @@ int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear) ...@@ -311,8 +310,7 @@ int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear)
sizeof(struct iwl_statistics_cmd), sizeof(struct iwl_statistics_cmd),
&statistics_cmd); &statistics_cmd);
else else
return iwl_dvm_send_cmd_pdu(priv, REPLY_STATISTICS_CMD, return iwl_dvm_send_cmd_pdu(priv, REPLY_STATISTICS_CMD, 0,
CMD_SYNC,
sizeof(struct iwl_statistics_cmd), sizeof(struct iwl_statistics_cmd),
&statistics_cmd); &statistics_cmd);
} }
...@@ -622,7 +620,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv) ...@@ -622,7 +620,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv)
ret = iwl_dvm_send_cmd_pdu(priv, ret = iwl_dvm_send_cmd_pdu(priv,
REPLY_CT_KILL_CONFIG_CMD, REPLY_CT_KILL_CONFIG_CMD,
CMD_SYNC, sizeof(adv_cmd), &adv_cmd); 0, sizeof(adv_cmd), &adv_cmd);
if (ret) if (ret)
IWL_ERR(priv, "REPLY_CT_KILL_CONFIG_CMD failed\n"); IWL_ERR(priv, "REPLY_CT_KILL_CONFIG_CMD failed\n");
else else
...@@ -637,7 +635,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv) ...@@ -637,7 +635,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv)
ret = iwl_dvm_send_cmd_pdu(priv, ret = iwl_dvm_send_cmd_pdu(priv,
REPLY_CT_KILL_CONFIG_CMD, REPLY_CT_KILL_CONFIG_CMD,
CMD_SYNC, sizeof(cmd), &cmd); 0, sizeof(cmd), &cmd);
if (ret) if (ret)
IWL_ERR(priv, "REPLY_CT_KILL_CONFIG_CMD failed\n"); IWL_ERR(priv, "REPLY_CT_KILL_CONFIG_CMD failed\n");
else else
...@@ -673,9 +671,7 @@ static int iwlagn_send_tx_ant_config(struct iwl_priv *priv, u8 valid_tx_ant) ...@@ -673,9 +671,7 @@ static int iwlagn_send_tx_ant_config(struct iwl_priv *priv, u8 valid_tx_ant)
if (IWL_UCODE_API(priv->fw->ucode_ver) > 1) { if (IWL_UCODE_API(priv->fw->ucode_ver) > 1) {
IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant); IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant);
return iwl_dvm_send_cmd_pdu(priv, return iwl_dvm_send_cmd_pdu(priv, TX_ANT_CONFIGURATION_CMD, 0,
TX_ANT_CONFIGURATION_CMD,
CMD_SYNC,
sizeof(struct iwl_tx_ant_config_cmd), sizeof(struct iwl_tx_ant_config_cmd),
&tx_ant_cmd); &tx_ant_cmd);
} else { } else {
...@@ -703,7 +699,7 @@ static void iwl_send_bt_config(struct iwl_priv *priv) ...@@ -703,7 +699,7 @@ static void iwl_send_bt_config(struct iwl_priv *priv)
(bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active");
if (iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG, if (iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG,
CMD_SYNC, sizeof(struct iwl_bt_cmd), &bt_cmd)) 0, sizeof(struct iwl_bt_cmd), &bt_cmd))
IWL_ERR(priv, "failed to send BT Coex Config\n"); IWL_ERR(priv, "failed to send BT Coex Config\n");
} }
......
...@@ -278,7 +278,7 @@ static int iwl_set_power(struct iwl_priv *priv, struct iwl_powertable_cmd *cmd) ...@@ -278,7 +278,7 @@ static int iwl_set_power(struct iwl_priv *priv, struct iwl_powertable_cmd *cmd)
le32_to_cpu(cmd->sleep_interval[3]), le32_to_cpu(cmd->sleep_interval[3]),
le32_to_cpu(cmd->sleep_interval[4])); le32_to_cpu(cmd->sleep_interval[4]));
return iwl_dvm_send_cmd_pdu(priv, POWER_TABLE_CMD, CMD_SYNC, return iwl_dvm_send_cmd_pdu(priv, POWER_TABLE_CMD, 0,
sizeof(struct iwl_powertable_cmd), cmd); sizeof(struct iwl_powertable_cmd), cmd);
} }
......
...@@ -2709,7 +2709,7 @@ static void rs_initialize_lq(struct iwl_priv *priv, ...@@ -2709,7 +2709,7 @@ static void rs_initialize_lq(struct iwl_priv *priv,
rs_set_expected_tpt_table(lq_sta, tbl); rs_set_expected_tpt_table(lq_sta, tbl);
rs_fill_link_cmd(NULL, lq_sta, rate); rs_fill_link_cmd(NULL, lq_sta, rate);
priv->stations[lq_sta->lq.sta_id].lq = &lq_sta->lq; priv->stations[lq_sta->lq.sta_id].lq = &lq_sta->lq;
iwl_send_lq_cmd(priv, ctx, &lq_sta->lq, CMD_SYNC, true); iwl_send_lq_cmd(priv, ctx, &lq_sta->lq, 0, true);
} }
static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta, static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
......
...@@ -104,7 +104,7 @@ static int iwlagn_disable_bss(struct iwl_priv *priv, ...@@ -104,7 +104,7 @@ static int iwlagn_disable_bss(struct iwl_priv *priv,
send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; send->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd,
CMD_SYNC, sizeof(*send), send); 0, sizeof(*send), send);
send->filter_flags = old_filter; send->filter_flags = old_filter;
...@@ -134,7 +134,7 @@ static int iwlagn_disable_pan(struct iwl_priv *priv, ...@@ -134,7 +134,7 @@ static int iwlagn_disable_pan(struct iwl_priv *priv,
send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; send->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
send->dev_type = RXON_DEV_TYPE_P2P; send->dev_type = RXON_DEV_TYPE_P2P;
ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd,
CMD_SYNC, sizeof(*send), send); 0, sizeof(*send), send);
send->filter_flags = old_filter; send->filter_flags = old_filter;
send->dev_type = old_dev_type; send->dev_type = old_dev_type;
...@@ -160,7 +160,7 @@ static int iwlagn_disconn_pan(struct iwl_priv *priv, ...@@ -160,7 +160,7 @@ static int iwlagn_disconn_pan(struct iwl_priv *priv,
int ret; int ret;
send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; send->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, CMD_SYNC, ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, 0,
sizeof(*send), send); sizeof(*send), send);
send->filter_flags = old_filter; send->filter_flags = old_filter;
...@@ -189,7 +189,7 @@ static void iwlagn_update_qos(struct iwl_priv *priv, ...@@ -189,7 +189,7 @@ static void iwlagn_update_qos(struct iwl_priv *priv,
ctx->qos_data.qos_active, ctx->qos_data.qos_active,
ctx->qos_data.def_qos_parm.qos_flags); ctx->qos_data.def_qos_parm.qos_flags);
ret = iwl_dvm_send_cmd_pdu(priv, ctx->qos_cmd, CMD_SYNC, ret = iwl_dvm_send_cmd_pdu(priv, ctx->qos_cmd, 0,
sizeof(struct iwl_qosparam_cmd), sizeof(struct iwl_qosparam_cmd),
&ctx->qos_data.def_qos_parm); &ctx->qos_data.def_qos_parm);
if (ret) if (ret)
...@@ -353,7 +353,7 @@ static int iwl_send_rxon_timing(struct iwl_priv *priv, ...@@ -353,7 +353,7 @@ static int iwl_send_rxon_timing(struct iwl_priv *priv,
le16_to_cpu(ctx->timing.atim_window)); le16_to_cpu(ctx->timing.atim_window));
return iwl_dvm_send_cmd_pdu(priv, ctx->rxon_timing_cmd, return iwl_dvm_send_cmd_pdu(priv, ctx->rxon_timing_cmd,
CMD_SYNC, sizeof(ctx->timing), &ctx->timing); 0, sizeof(ctx->timing), &ctx->timing);
} }
static int iwlagn_rxon_disconn(struct iwl_priv *priv, static int iwlagn_rxon_disconn(struct iwl_priv *priv,
...@@ -495,7 +495,7 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv, ...@@ -495,7 +495,7 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv,
* Associated RXON doesn't clear the station table in uCode, * Associated RXON doesn't clear the station table in uCode,
* so we don't need to restore stations etc. after this. * so we don't need to restore stations etc. after this.
*/ */
ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, CMD_SYNC, ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, 0,
sizeof(struct iwl_rxon_cmd), &ctx->staging); sizeof(struct iwl_rxon_cmd), &ctx->staging);
if (ret) { if (ret) {
IWL_ERR(priv, "Error setting new RXON (%d)\n", ret); IWL_ERR(priv, "Error setting new RXON (%d)\n", ret);
...@@ -610,7 +610,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv) ...@@ -610,7 +610,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv)
cmd.slots[0].width = cpu_to_le16(slot0); cmd.slots[0].width = cpu_to_le16(slot0);
cmd.slots[1].width = cpu_to_le16(slot1); cmd.slots[1].width = cpu_to_le16(slot1);
ret = iwl_dvm_send_cmd_pdu(priv, REPLY_WIPAN_PARAMS, CMD_SYNC, ret = iwl_dvm_send_cmd_pdu(priv, REPLY_WIPAN_PARAMS, 0,
sizeof(cmd), &cmd); sizeof(cmd), &cmd);
if (ret) if (ret)
IWL_ERR(priv, "Error setting PAN parameters (%d)\n", ret); IWL_ERR(priv, "Error setting PAN parameters (%d)\n", ret);
...@@ -1395,7 +1395,7 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv) ...@@ -1395,7 +1395,7 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv)
priv->phy_calib_chain_noise_reset_cmd); priv->phy_calib_chain_noise_reset_cmd);
ret = iwl_dvm_send_cmd_pdu(priv, ret = iwl_dvm_send_cmd_pdu(priv,
REPLY_PHY_CALIBRATION_CMD, REPLY_PHY_CALIBRATION_CMD,
CMD_SYNC, sizeof(cmd), &cmd); 0, sizeof(cmd), &cmd);
if (ret) if (ret)
IWL_ERR(priv, IWL_ERR(priv,
"Could not send REPLY_PHY_CALIBRATION_CMD\n"); "Could not send REPLY_PHY_CALIBRATION_CMD\n");
......
...@@ -59,7 +59,7 @@ static int iwl_send_scan_abort(struct iwl_priv *priv) ...@@ -59,7 +59,7 @@ static int iwl_send_scan_abort(struct iwl_priv *priv)
int ret; int ret;
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = REPLY_SCAN_ABORT_CMD, .id = REPLY_SCAN_ABORT_CMD,
.flags = CMD_SYNC | CMD_WANT_SKB, .flags = CMD_WANT_SKB,
}; };
__le32 *status; __le32 *status;
...@@ -639,7 +639,6 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) ...@@ -639,7 +639,6 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = REPLY_SCAN_CMD, .id = REPLY_SCAN_CMD,
.len = { sizeof(struct iwl_scan_cmd), }, .len = { sizeof(struct iwl_scan_cmd), },
.flags = CMD_SYNC,
}; };
struct iwl_scan_cmd *scan; struct iwl_scan_cmd *scan;
struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
......
...@@ -261,7 +261,7 @@ int iwl_sta_update_ht(struct iwl_priv *priv, struct iwl_rxon_context *ctx, ...@@ -261,7 +261,7 @@ int iwl_sta_update_ht(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
cmd.station_flags = flags; cmd.station_flags = flags;
cmd.sta.sta_id = sta_id; cmd.sta.sta_id = sta_id;
return iwl_send_add_sta(priv, &cmd, CMD_SYNC); return iwl_send_add_sta(priv, &cmd, 0);
} }
static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index, static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index,
...@@ -413,7 +413,7 @@ int iwl_add_station_common(struct iwl_priv *priv, struct iwl_rxon_context *ctx, ...@@ -413,7 +413,7 @@ int iwl_add_station_common(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
spin_unlock_bh(&priv->sta_lock); spin_unlock_bh(&priv->sta_lock);
/* Add station to device's station table */ /* Add station to device's station table */
ret = iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC); ret = iwl_send_add_sta(priv, &sta_cmd, 0);
if (ret) { if (ret) {
spin_lock_bh(&priv->sta_lock); spin_lock_bh(&priv->sta_lock);
IWL_ERR(priv, "Adding station %pM failed.\n", IWL_ERR(priv, "Adding station %pM failed.\n",
...@@ -456,7 +456,6 @@ static int iwl_send_remove_station(struct iwl_priv *priv, ...@@ -456,7 +456,6 @@ static int iwl_send_remove_station(struct iwl_priv *priv,
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = REPLY_REMOVE_STA, .id = REPLY_REMOVE_STA,
.len = { sizeof(struct iwl_rem_sta_cmd), }, .len = { sizeof(struct iwl_rem_sta_cmd), },
.flags = CMD_SYNC,
.data = { &rm_sta_cmd, }, .data = { &rm_sta_cmd, },
}; };
...@@ -740,7 +739,7 @@ void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx) ...@@ -740,7 +739,7 @@ void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
send_lq = true; send_lq = true;
} }
spin_unlock_bh(&priv->sta_lock); spin_unlock_bh(&priv->sta_lock);
ret = iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC); ret = iwl_send_add_sta(priv, &sta_cmd, 0);
if (ret) { if (ret) {
spin_lock_bh(&priv->sta_lock); spin_lock_bh(&priv->sta_lock);
IWL_ERR(priv, "Adding station %pM failed.\n", IWL_ERR(priv, "Adding station %pM failed.\n",
...@@ -756,8 +755,7 @@ void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx) ...@@ -756,8 +755,7 @@ void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
* current LQ command * current LQ command
*/ */
if (send_lq) if (send_lq)
iwl_send_lq_cmd(priv, ctx, &lq, iwl_send_lq_cmd(priv, ctx, &lq, 0, true);
CMD_SYNC, true);
spin_lock_bh(&priv->sta_lock); spin_lock_bh(&priv->sta_lock);
priv->stations[i].used &= ~IWL_STA_UCODE_INPROGRESS; priv->stations[i].used &= ~IWL_STA_UCODE_INPROGRESS;
} }
...@@ -968,7 +966,7 @@ int iwlagn_add_bssid_station(struct iwl_priv *priv, ...@@ -968,7 +966,7 @@ int iwlagn_add_bssid_station(struct iwl_priv *priv,
return -ENOMEM; return -ENOMEM;
} }
ret = iwl_send_lq_cmd(priv, ctx, link_cmd, CMD_SYNC, true); ret = iwl_send_lq_cmd(priv, ctx, link_cmd, 0, true);
if (ret) if (ret)
IWL_ERR(priv, "Link quality command failed (%d)\n", ret); IWL_ERR(priv, "Link quality command failed (%d)\n", ret);
...@@ -999,7 +997,6 @@ static int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, ...@@ -999,7 +997,6 @@ static int iwl_send_static_wepkey_cmd(struct iwl_priv *priv,
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = ctx->wep_key_cmd, .id = ctx->wep_key_cmd,
.data = { wep_cmd, }, .data = { wep_cmd, },
.flags = CMD_SYNC,
}; };
might_sleep(); might_sleep();
...@@ -1248,7 +1245,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, ...@@ -1248,7 +1245,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK; sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK;
sta_cmd.mode = STA_CONTROL_MODIFY_MSK; sta_cmd.mode = STA_CONTROL_MODIFY_MSK;
return iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC); return iwl_send_add_sta(priv, &sta_cmd, 0);
} }
int iwl_set_dynamic_key(struct iwl_priv *priv, int iwl_set_dynamic_key(struct iwl_priv *priv,
...@@ -1284,13 +1281,13 @@ int iwl_set_dynamic_key(struct iwl_priv *priv, ...@@ -1284,13 +1281,13 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
ieee80211_get_key_rx_seq(keyconf, 0, &seq); ieee80211_get_key_rx_seq(keyconf, 0, &seq);
ieee80211_get_tkip_rx_p1k(keyconf, addr, seq.tkip.iv32, p1k); ieee80211_get_tkip_rx_p1k(keyconf, addr, seq.tkip.iv32, p1k);
ret = iwlagn_send_sta_key(priv, keyconf, sta_id, ret = iwlagn_send_sta_key(priv, keyconf, sta_id,
seq.tkip.iv32, p1k, CMD_SYNC); seq.tkip.iv32, p1k, 0);
break; break;
case WLAN_CIPHER_SUITE_CCMP: case WLAN_CIPHER_SUITE_CCMP:
case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104: case WLAN_CIPHER_SUITE_WEP104:
ret = iwlagn_send_sta_key(priv, keyconf, sta_id, ret = iwlagn_send_sta_key(priv, keyconf, sta_id,
0, NULL, CMD_SYNC); 0, NULL, 0);
break; break;
default: default:
IWL_ERR(priv, "Unknown cipher %x\n", keyconf->cipher); IWL_ERR(priv, "Unknown cipher %x\n", keyconf->cipher);
...@@ -1409,7 +1406,7 @@ int iwl_sta_tx_modify_enable_tid(struct iwl_priv *priv, int sta_id, int tid) ...@@ -1409,7 +1406,7 @@ int iwl_sta_tx_modify_enable_tid(struct iwl_priv *priv, int sta_id, int tid)
memcpy(&sta_cmd, &priv->stations[sta_id].sta, sizeof(struct iwl_addsta_cmd)); memcpy(&sta_cmd, &priv->stations[sta_id].sta, sizeof(struct iwl_addsta_cmd));
spin_unlock_bh(&priv->sta_lock); spin_unlock_bh(&priv->sta_lock);
return iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC); return iwl_send_add_sta(priv, &sta_cmd, 0);
} }
int iwl_sta_rx_agg_start(struct iwl_priv *priv, struct ieee80211_sta *sta, int iwl_sta_rx_agg_start(struct iwl_priv *priv, struct ieee80211_sta *sta,
...@@ -1433,7 +1430,7 @@ int iwl_sta_rx_agg_start(struct iwl_priv *priv, struct ieee80211_sta *sta, ...@@ -1433,7 +1430,7 @@ int iwl_sta_rx_agg_start(struct iwl_priv *priv, struct ieee80211_sta *sta,
memcpy(&sta_cmd, &priv->stations[sta_id].sta, sizeof(struct iwl_addsta_cmd)); memcpy(&sta_cmd, &priv->stations[sta_id].sta, sizeof(struct iwl_addsta_cmd));
spin_unlock_bh(&priv->sta_lock); spin_unlock_bh(&priv->sta_lock);
return iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC); return iwl_send_add_sta(priv, &sta_cmd, 0);
} }
int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta, int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta,
...@@ -1458,7 +1455,7 @@ int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta, ...@@ -1458,7 +1455,7 @@ int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta,
memcpy(&sta_cmd, &priv->stations[sta_id].sta, sizeof(struct iwl_addsta_cmd)); memcpy(&sta_cmd, &priv->stations[sta_id].sta, sizeof(struct iwl_addsta_cmd));
spin_unlock_bh(&priv->sta_lock); spin_unlock_bh(&priv->sta_lock);
return iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC); return iwl_send_add_sta(priv, &sta_cmd, 0);
} }
......
...@@ -236,7 +236,7 @@ static void iwl_prepare_ct_kill_task(struct iwl_priv *priv) ...@@ -236,7 +236,7 @@ static void iwl_prepare_ct_kill_task(struct iwl_priv *priv)
{ {
IWL_DEBUG_TEMP(priv, "Prepare to enter IWL_TI_CT_KILL\n"); IWL_DEBUG_TEMP(priv, "Prepare to enter IWL_TI_CT_KILL\n");
/* make request to retrieve statistics information */ /* make request to retrieve statistics information */
iwl_send_statistics_request(priv, CMD_SYNC, false); iwl_send_statistics_request(priv, 0, false);
/* Reschedule the ct_kill wait timer */ /* Reschedule the ct_kill wait timer */
mod_timer(&priv->thermal_throttle.ct_kill_waiting_tm, mod_timer(&priv->thermal_throttle.ct_kill_waiting_tm,
jiffies + msecs_to_jiffies(CT_KILL_WAITING_DURATION)); jiffies + msecs_to_jiffies(CT_KILL_WAITING_DURATION));
......
...@@ -172,7 +172,7 @@ static int iwl_send_wimax_coex(struct iwl_priv *priv) ...@@ -172,7 +172,7 @@ static int iwl_send_wimax_coex(struct iwl_priv *priv)
memset(&coex_cmd, 0, sizeof(coex_cmd)); memset(&coex_cmd, 0, sizeof(coex_cmd));
return iwl_dvm_send_cmd_pdu(priv, return iwl_dvm_send_cmd_pdu(priv,
COEX_PRIORITY_TABLE_CMD, CMD_SYNC, COEX_PRIORITY_TABLE_CMD, 0,
sizeof(coex_cmd), &coex_cmd); sizeof(coex_cmd), &coex_cmd);
} }
...@@ -205,7 +205,7 @@ void iwl_send_prio_tbl(struct iwl_priv *priv) ...@@ -205,7 +205,7 @@ void iwl_send_prio_tbl(struct iwl_priv *priv)
memcpy(prio_tbl_cmd.prio_tbl, iwl_bt_prio_tbl, memcpy(prio_tbl_cmd.prio_tbl, iwl_bt_prio_tbl,
sizeof(iwl_bt_prio_tbl)); sizeof(iwl_bt_prio_tbl));
if (iwl_dvm_send_cmd_pdu(priv, if (iwl_dvm_send_cmd_pdu(priv,
REPLY_BT_COEX_PRIO_TABLE, CMD_SYNC, REPLY_BT_COEX_PRIO_TABLE, 0,
sizeof(prio_tbl_cmd), &prio_tbl_cmd)) sizeof(prio_tbl_cmd), &prio_tbl_cmd))
IWL_ERR(priv, "failed to send BT prio tbl command\n"); IWL_ERR(priv, "failed to send BT prio tbl command\n");
} }
...@@ -218,7 +218,7 @@ int iwl_send_bt_env(struct iwl_priv *priv, u8 action, u8 type) ...@@ -218,7 +218,7 @@ int iwl_send_bt_env(struct iwl_priv *priv, u8 action, u8 type)
env_cmd.action = action; env_cmd.action = action;
env_cmd.type = type; env_cmd.type = type;
ret = iwl_dvm_send_cmd_pdu(priv, ret = iwl_dvm_send_cmd_pdu(priv,
REPLY_BT_COEX_PROT_ENV, CMD_SYNC, REPLY_BT_COEX_PROT_ENV, 0,
sizeof(env_cmd), &env_cmd); sizeof(env_cmd), &env_cmd);
if (ret) if (ret)
IWL_ERR(priv, "failed to send BT env command\n"); IWL_ERR(priv, "failed to send BT env command\n");
......
...@@ -345,7 +345,6 @@ static int iwl_send_phy_db_cmd(struct iwl_phy_db *phy_db, u16 type, ...@@ -345,7 +345,6 @@ static int iwl_send_phy_db_cmd(struct iwl_phy_db *phy_db, u16 type,
struct iwl_phy_db_cmd phy_db_cmd; struct iwl_phy_db_cmd phy_db_cmd;
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = PHY_DB_CMD, .id = PHY_DB_CMD,
.flags = CMD_SYNC,
}; };
IWL_DEBUG_INFO(phy_db->trans, IWL_DEBUG_INFO(phy_db->trans,
......
...@@ -189,10 +189,9 @@ static inline u32 iwl_rx_packet_payload_len(const struct iwl_rx_packet *pkt) ...@@ -189,10 +189,9 @@ static inline u32 iwl_rx_packet_payload_len(const struct iwl_rx_packet *pkt)
/** /**
* enum CMD_MODE - how to send the host commands ? * enum CMD_MODE - how to send the host commands ?
* *
* @CMD_SYNC: The caller will be stalled until the fw responds to the command
* @CMD_ASYNC: Return right away and don't wait for the response * @CMD_ASYNC: Return right away and don't wait for the response
* @CMD_WANT_SKB: valid only with CMD_SYNC. The caller needs the buffer of the * @CMD_WANT_SKB: Not valid with CMD_ASYNC. The caller needs the buffer of
* response. The caller needs to call iwl_free_resp when done. * the response. The caller needs to call iwl_free_resp when done.
* @CMD_HIGH_PRIO: The command is high priority - it goes to the front of the * @CMD_HIGH_PRIO: The command is high priority - it goes to the front of the
* command queue, but after other high priority commands. valid only * command queue, but after other high priority commands. valid only
* with CMD_ASYNC. * with CMD_ASYNC.
...@@ -202,7 +201,6 @@ static inline u32 iwl_rx_packet_payload_len(const struct iwl_rx_packet *pkt) ...@@ -202,7 +201,6 @@ static inline u32 iwl_rx_packet_payload_len(const struct iwl_rx_packet *pkt)
* (i.e. mark it as non-idle). * (i.e. mark it as non-idle).
*/ */
enum CMD_MODE { enum CMD_MODE {
CMD_SYNC = 0,
CMD_ASYNC = BIT(0), CMD_ASYNC = BIT(0),
CMD_WANT_SKB = BIT(1), CMD_WANT_SKB = BIT(1),
CMD_SEND_IN_RFKILL = BIT(2), CMD_SEND_IN_RFKILL = BIT(2),
...@@ -427,7 +425,7 @@ struct iwl_trans; ...@@ -427,7 +425,7 @@ struct iwl_trans;
* @send_cmd:send a host command. Must return -ERFKILL if RFkill is asserted. * @send_cmd:send a host command. Must return -ERFKILL if RFkill is asserted.
* If RFkill is asserted in the middle of a SYNC host command, it must * If RFkill is asserted in the middle of a SYNC host command, it must
* return -ERFKILL straight away. * return -ERFKILL straight away.
* May sleep only if CMD_SYNC is set * May sleep only if CMD_ASYNC is not set
* @tx: send an skb * @tx: send an skb
* Must be atomic * Must be atomic
* @reclaim: free packet until ssn. Returns a list of freed packets. * @reclaim: free packet until ssn. Returns a list of freed packets.
......
...@@ -106,7 +106,7 @@ static const u8 iwl_bt_prio_tbl[BT_COEX_PRIO_TBL_EVT_MAX] = { ...@@ -106,7 +106,7 @@ static const u8 iwl_bt_prio_tbl[BT_COEX_PRIO_TBL_EVT_MAX] = {
static int iwl_send_bt_prio_tbl(struct iwl_mvm *mvm) static int iwl_send_bt_prio_tbl(struct iwl_mvm *mvm)
{ {
return iwl_mvm_send_cmd_pdu(mvm, BT_COEX_PRIO_TABLE, CMD_SYNC, return iwl_mvm_send_cmd_pdu(mvm, BT_COEX_PRIO_TABLE, 0,
sizeof(struct iwl_bt_coex_prio_tbl_cmd), sizeof(struct iwl_bt_coex_prio_tbl_cmd),
&iwl_bt_prio_tbl); &iwl_bt_prio_tbl);
} }
...@@ -565,7 +565,6 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm) ...@@ -565,7 +565,6 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm)
.id = BT_CONFIG, .id = BT_CONFIG,
.len = { sizeof(*bt_cmd), }, .len = { sizeof(*bt_cmd), },
.dataflags = { IWL_HCMD_DFL_NOCOPY, }, .dataflags = { IWL_HCMD_DFL_NOCOPY, },
.flags = CMD_SYNC,
}; };
int ret; int ret;
u32 flags; u32 flags;
...@@ -663,7 +662,6 @@ static int iwl_mvm_bt_udpate_ctrl_kill_msk(struct iwl_mvm *mvm, ...@@ -663,7 +662,6 @@ static int iwl_mvm_bt_udpate_ctrl_kill_msk(struct iwl_mvm *mvm,
.data[0] = &bt_cmd, .data[0] = &bt_cmd,
.len = { sizeof(*bt_cmd), }, .len = { sizeof(*bt_cmd), },
.dataflags = { IWL_HCMD_DFL_NOCOPY, }, .dataflags = { IWL_HCMD_DFL_NOCOPY, },
.flags = CMD_SYNC,
}; };
int ret = 0; int ret = 0;
...@@ -1022,7 +1020,7 @@ static void iwl_mvm_bt_coex_notif_handle(struct iwl_mvm *mvm) ...@@ -1022,7 +1020,7 @@ static void iwl_mvm_bt_coex_notif_handle(struct iwl_mvm *mvm)
/* Don't spam the fw with the same command over and over */ /* Don't spam the fw with the same command over and over */
if (memcmp(&cmd, &mvm->last_bt_ci_cmd, sizeof(cmd))) { if (memcmp(&cmd, &mvm->last_bt_ci_cmd, sizeof(cmd))) {
if (iwl_mvm_send_cmd_pdu(mvm, BT_COEX_CI, CMD_SYNC, if (iwl_mvm_send_cmd_pdu(mvm, BT_COEX_CI, 0,
sizeof(cmd), &cmd)) sizeof(cmd), &cmd))
IWL_ERR(mvm, "Failed to send BT_CI cmd\n"); IWL_ERR(mvm, "Failed to send BT_CI cmd\n");
memcpy(&mvm->last_bt_ci_cmd, &cmd, sizeof(cmd)); memcpy(&mvm->last_bt_ci_cmd, &cmd, sizeof(cmd));
...@@ -1278,7 +1276,6 @@ int iwl_mvm_rx_ant_coupling_notif(struct iwl_mvm *mvm, ...@@ -1278,7 +1276,6 @@ int iwl_mvm_rx_ant_coupling_notif(struct iwl_mvm *mvm,
.id = BT_CONFIG, .id = BT_CONFIG,
.len = { sizeof(*bt_cmd), }, .len = { sizeof(*bt_cmd), },
.dataflags = { IWL_HCMD_DFL_NOCOPY, }, .dataflags = { IWL_HCMD_DFL_NOCOPY, },
.flags = CMD_SYNC,
}; };
if (!IWL_MVM_BT_COEX_CORUNNING) if (!IWL_MVM_BT_COEX_CORUNNING)
......
...@@ -193,8 +193,7 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw, ...@@ -193,8 +193,7 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
wkc.wep_key.key_offset = data->wep_key_idx; wkc.wep_key.key_offset = data->wep_key_idx;
} }
ret = iwl_mvm_send_cmd_pdu(mvm, WEP_KEY, CMD_SYNC, ret = iwl_mvm_send_cmd_pdu(mvm, WEP_KEY, 0, sizeof(wkc), &wkc);
sizeof(wkc), &wkc);
data->error = ret != 0; data->error = ret != 0;
mvm->ptk_ivlen = key->iv_len; mvm->ptk_ivlen = key->iv_len;
...@@ -341,7 +340,6 @@ static int iwl_mvm_send_patterns(struct iwl_mvm *mvm, ...@@ -341,7 +340,6 @@ static int iwl_mvm_send_patterns(struct iwl_mvm *mvm,
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = WOWLAN_PATTERNS, .id = WOWLAN_PATTERNS,
.dataflags[0] = IWL_HCMD_DFL_NOCOPY, .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
.flags = CMD_SYNC,
}; };
int i, err; int i, err;
...@@ -518,7 +516,6 @@ static int iwl_mvm_send_remote_wake_cfg(struct iwl_mvm *mvm, ...@@ -518,7 +516,6 @@ static int iwl_mvm_send_remote_wake_cfg(struct iwl_mvm *mvm,
.id = REMOTE_WAKE_CONFIG_CMD, .id = REMOTE_WAKE_CONFIG_CMD,
.len = { sizeof(*cfg), }, .len = { sizeof(*cfg), },
.dataflags = { IWL_HCMD_DFL_NOCOPY, }, .dataflags = { IWL_HCMD_DFL_NOCOPY, },
.flags = CMD_SYNC,
}; };
int ret; int ret;
...@@ -719,7 +716,7 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif, ...@@ -719,7 +716,7 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
for (i = 1; i < MAX_BINDINGS; i++) for (i = 1; i < MAX_BINDINGS; i++)
quota_cmd.quotas[i].id_and_color = cpu_to_le32(FW_CTXT_INVALID); quota_cmd.quotas[i].id_and_color = cpu_to_le32(FW_CTXT_INVALID);
ret = iwl_mvm_send_cmd_pdu(mvm, TIME_QUOTA_CMD, CMD_SYNC, ret = iwl_mvm_send_cmd_pdu(mvm, TIME_QUOTA_CMD, 0,
sizeof(quota_cmd), &quota_cmd); sizeof(quota_cmd), &quota_cmd);
if (ret) if (ret)
IWL_ERR(mvm, "Failed to send quota: %d\n", ret); IWL_ERR(mvm, "Failed to send quota: %d\n", ret);
...@@ -739,7 +736,7 @@ static int iwl_mvm_get_last_nonqos_seq(struct iwl_mvm *mvm, ...@@ -739,7 +736,7 @@ static int iwl_mvm_get_last_nonqos_seq(struct iwl_mvm *mvm,
}; };
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = NON_QOS_TX_COUNTER_CMD, .id = NON_QOS_TX_COUNTER_CMD,
.flags = CMD_SYNC | CMD_WANT_SKB, .flags = CMD_WANT_SKB,
}; };
int err; int err;
u32 size; u32 size;
...@@ -781,7 +778,7 @@ void iwl_mvm_set_last_nonqos_seq(struct iwl_mvm *mvm, struct ieee80211_vif *vif) ...@@ -781,7 +778,7 @@ void iwl_mvm_set_last_nonqos_seq(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
mvmvif->seqno_valid = false; mvmvif->seqno_valid = false;
if (iwl_mvm_send_cmd_pdu(mvm, NON_QOS_TX_COUNTER_CMD, CMD_SYNC, if (iwl_mvm_send_cmd_pdu(mvm, NON_QOS_TX_COUNTER_CMD, 0,
sizeof(query_cmd), &query_cmd)) sizeof(query_cmd), &query_cmd))
IWL_ERR(mvm, "failed to set non-QoS seqno\n"); IWL_ERR(mvm, "failed to set non-QoS seqno\n");
} }
...@@ -796,7 +793,7 @@ iwl_mvm_send_wowlan_config_cmd(struct iwl_mvm *mvm, ...@@ -796,7 +793,7 @@ iwl_mvm_send_wowlan_config_cmd(struct iwl_mvm *mvm,
if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID) if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID)
cmd_len = sizeof(*cmd); cmd_len = sizeof(*cmd);
return iwl_mvm_send_cmd_pdu(mvm, WOWLAN_CONFIGURATION, CMD_SYNC, return iwl_mvm_send_cmd_pdu(mvm, WOWLAN_CONFIGURATION, 0,
cmd_len, cmd); cmd_len, cmd);
} }
...@@ -825,7 +822,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, ...@@ -825,7 +822,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
}; };
struct iwl_host_cmd d3_cfg_cmd = { struct iwl_host_cmd d3_cfg_cmd = {
.id = D3_CONFIG_CMD, .id = D3_CONFIG_CMD,
.flags = CMD_SYNC | CMD_WANT_SKB, .flags = CMD_WANT_SKB,
.data[0] = &d3_cfg_cmd_data, .data[0] = &d3_cfg_cmd_data,
.len[0] = sizeof(d3_cfg_cmd_data), .len[0] = sizeof(d3_cfg_cmd_data),
}; };
...@@ -975,7 +972,6 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, ...@@ -975,7 +972,6 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
if (key_data.use_rsc_tsc) { if (key_data.use_rsc_tsc) {
struct iwl_host_cmd rsc_tsc_cmd = { struct iwl_host_cmd rsc_tsc_cmd = {
.id = WOWLAN_TSC_RSC_PARAM, .id = WOWLAN_TSC_RSC_PARAM,
.flags = CMD_SYNC,
.data[0] = key_data.rsc_tsc, .data[0] = key_data.rsc_tsc,
.dataflags[0] = IWL_HCMD_DFL_NOCOPY, .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
.len[0] = sizeof(*key_data.rsc_tsc), .len[0] = sizeof(*key_data.rsc_tsc),
...@@ -989,7 +985,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, ...@@ -989,7 +985,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
if (key_data.use_tkip) { if (key_data.use_tkip) {
ret = iwl_mvm_send_cmd_pdu(mvm, ret = iwl_mvm_send_cmd_pdu(mvm,
WOWLAN_TKIP_PARAM, WOWLAN_TKIP_PARAM,
CMD_SYNC, sizeof(tkip_cmd), 0, sizeof(tkip_cmd),
&tkip_cmd); &tkip_cmd);
if (ret) if (ret)
goto out; goto out;
...@@ -1006,8 +1002,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, ...@@ -1006,8 +1002,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
kek_kck_cmd.replay_ctr = mvmvif->rekey_data.replay_ctr; kek_kck_cmd.replay_ctr = mvmvif->rekey_data.replay_ctr;
ret = iwl_mvm_send_cmd_pdu(mvm, ret = iwl_mvm_send_cmd_pdu(mvm,
WOWLAN_KEK_KCK_MATERIAL, WOWLAN_KEK_KCK_MATERIAL, 0,
CMD_SYNC,
sizeof(kek_kck_cmd), sizeof(kek_kck_cmd),
&kek_kck_cmd); &kek_kck_cmd);
if (ret) if (ret)
...@@ -1023,7 +1018,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, ...@@ -1023,7 +1018,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
if (ret) if (ret)
goto out; goto out;
ret = iwl_mvm_send_proto_offload(mvm, vif, false, CMD_SYNC); ret = iwl_mvm_send_proto_offload(mvm, vif, false, 0);
if (ret) if (ret)
goto out; goto out;
...@@ -1466,7 +1461,7 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm, ...@@ -1466,7 +1461,7 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm,
} err_info; } err_info;
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = WOWLAN_GET_STATUSES, .id = WOWLAN_GET_STATUSES,
.flags = CMD_SYNC | CMD_WANT_SKB, .flags = CMD_WANT_SKB,
}; };
struct iwl_wowlan_status_data status; struct iwl_wowlan_status_data status;
struct iwl_wowlan_status *fw_status; struct iwl_wowlan_status *fw_status;
...@@ -1492,7 +1487,7 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm, ...@@ -1492,7 +1487,7 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm,
} }
/* only for tracing for now */ /* only for tracing for now */
ret = iwl_mvm_send_cmd_pdu(mvm, OFFLOADS_QUERY_CMD, CMD_SYNC, 0, NULL); ret = iwl_mvm_send_cmd_pdu(mvm, OFFLOADS_QUERY_CMD, 0, 0, NULL);
if (ret) if (ret)
IWL_ERR(mvm, "failed to query offload statistics (%d)\n", ret); IWL_ERR(mvm, "failed to query offload statistics (%d)\n", ret);
......
...@@ -452,9 +452,9 @@ static ssize_t iwl_dbgfs_bf_params_write(struct ieee80211_vif *vif, char *buf, ...@@ -452,9 +452,9 @@ static ssize_t iwl_dbgfs_bf_params_write(struct ieee80211_vif *vif, char *buf,
mutex_lock(&mvm->mutex); mutex_lock(&mvm->mutex);
iwl_dbgfs_update_bf(vif, param, value); iwl_dbgfs_update_bf(vif, param, value);
if (param == MVM_DEBUGFS_BF_ENABLE_BEACON_FILTER && !value) if (param == MVM_DEBUGFS_BF_ENABLE_BEACON_FILTER && !value)
ret = iwl_mvm_disable_beacon_filter(mvm, vif, CMD_SYNC); ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0);
else else
ret = iwl_mvm_enable_beacon_filter(mvm, vif, CMD_SYNC); ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0);
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
return ret ?: count; return ret ?: count;
......
...@@ -681,7 +681,7 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct iwl_mvm *mvm, char *buf, ...@@ -681,7 +681,7 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct iwl_mvm *mvm, char *buf,
mvm->restart_fw++; mvm->restart_fw++;
/* take the return value to make compiler happy - it will fail anyway */ /* take the return value to make compiler happy - it will fail anyway */
ret = iwl_mvm_send_cmd_pdu(mvm, REPLY_ERROR, CMD_SYNC, 0, NULL); ret = iwl_mvm_send_cmd_pdu(mvm, REPLY_ERROR, 0, 0, NULL);
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
...@@ -838,7 +838,7 @@ static ssize_t iwl_dbgfs_bcast_filters_write(struct iwl_mvm *mvm, char *buf, ...@@ -838,7 +838,7 @@ static ssize_t iwl_dbgfs_bcast_filters_write(struct iwl_mvm *mvm, char *buf,
/* send updated bcast filtering configuration */ /* send updated bcast filtering configuration */
if (mvm->dbgfs_bcast_filtering.override && if (mvm->dbgfs_bcast_filtering.override &&
iwl_mvm_bcast_filter_build_cmd(mvm, &cmd)) iwl_mvm_bcast_filter_build_cmd(mvm, &cmd))
err = iwl_mvm_send_cmd_pdu(mvm, BCAST_FILTER_CMD, CMD_SYNC, err = iwl_mvm_send_cmd_pdu(mvm, BCAST_FILTER_CMD, 0,
sizeof(cmd), &cmd); sizeof(cmd), &cmd);
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
...@@ -910,7 +910,7 @@ static ssize_t iwl_dbgfs_bcast_filters_macs_write(struct iwl_mvm *mvm, ...@@ -910,7 +910,7 @@ static ssize_t iwl_dbgfs_bcast_filters_macs_write(struct iwl_mvm *mvm,
/* send updated bcast filtering configuration */ /* send updated bcast filtering configuration */
if (mvm->dbgfs_bcast_filtering.override && if (mvm->dbgfs_bcast_filtering.override &&
iwl_mvm_bcast_filter_build_cmd(mvm, &cmd)) iwl_mvm_bcast_filter_build_cmd(mvm, &cmd))
err = iwl_mvm_send_cmd_pdu(mvm, BCAST_FILTER_CMD, CMD_SYNC, err = iwl_mvm_send_cmd_pdu(mvm, BCAST_FILTER_CMD, 0,
sizeof(cmd), &cmd); sizeof(cmd), &cmd);
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
......
...@@ -99,7 +99,7 @@ static int iwl_send_tx_ant_cfg(struct iwl_mvm *mvm, u8 valid_tx_ant) ...@@ -99,7 +99,7 @@ static int iwl_send_tx_ant_cfg(struct iwl_mvm *mvm, u8 valid_tx_ant)
}; };
IWL_DEBUG_FW(mvm, "select valid tx ant: %u\n", valid_tx_ant); IWL_DEBUG_FW(mvm, "select valid tx ant: %u\n", valid_tx_ant);
return iwl_mvm_send_cmd_pdu(mvm, TX_ANT_CONFIGURATION_CMD, CMD_SYNC, return iwl_mvm_send_cmd_pdu(mvm, TX_ANT_CONFIGURATION_CMD, 0,
sizeof(tx_ant_cmd), &tx_ant_cmd); sizeof(tx_ant_cmd), &tx_ant_cmd);
} }
...@@ -256,7 +256,7 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm) ...@@ -256,7 +256,7 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm)
IWL_DEBUG_INFO(mvm, "Sending Phy CFG command: 0x%x\n", IWL_DEBUG_INFO(mvm, "Sending Phy CFG command: 0x%x\n",
phy_cfg_cmd.phy_cfg); phy_cfg_cmd.phy_cfg);
return iwl_mvm_send_cmd_pdu(mvm, PHY_CONFIGURATION_CMD, CMD_SYNC, return iwl_mvm_send_cmd_pdu(mvm, PHY_CONFIGURATION_CMD, 0,
sizeof(phy_cfg_cmd), &phy_cfg_cmd); sizeof(phy_cfg_cmd), &phy_cfg_cmd);
} }
......
...@@ -685,7 +685,7 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm, ...@@ -685,7 +685,7 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
static int iwl_mvm_mac_ctxt_send_cmd(struct iwl_mvm *mvm, static int iwl_mvm_mac_ctxt_send_cmd(struct iwl_mvm *mvm,
struct iwl_mac_ctx_cmd *cmd) struct iwl_mac_ctx_cmd *cmd)
{ {
int ret = iwl_mvm_send_cmd_pdu(mvm, MAC_CONTEXT_CMD, CMD_SYNC, int ret = iwl_mvm_send_cmd_pdu(mvm, MAC_CONTEXT_CMD, 0,
sizeof(*cmd), cmd); sizeof(*cmd), cmd);
if (ret) if (ret)
IWL_ERR(mvm, "Failed to send MAC context (action:%d): %d\n", IWL_ERR(mvm, "Failed to send MAC context (action:%d): %d\n",
...@@ -1211,7 +1211,7 @@ int iwl_mvm_mac_ctxt_remove(struct iwl_mvm *mvm, struct ieee80211_vif *vif) ...@@ -1211,7 +1211,7 @@ int iwl_mvm_mac_ctxt_remove(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
mvmvif->color)); mvmvif->color));
cmd.action = cpu_to_le32(FW_CTXT_ACTION_REMOVE); cmd.action = cpu_to_le32(FW_CTXT_ACTION_REMOVE);
ret = iwl_mvm_send_cmd_pdu(mvm, MAC_CONTEXT_CMD, CMD_SYNC, ret = iwl_mvm_send_cmd_pdu(mvm, MAC_CONTEXT_CMD, 0,
sizeof(cmd), &cmd); sizeof(cmd), &cmd);
if (ret) { if (ret) {
IWL_ERR(mvm, "Failed to remove MAC context: %d\n", ret); IWL_ERR(mvm, "Failed to remove MAC context: %d\n", ret);
......
...@@ -772,7 +772,7 @@ static int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif, ...@@ -772,7 +772,7 @@ static int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
.pwr_restriction = cpu_to_le16(tx_power), .pwr_restriction = cpu_to_le16(tx_power),
}; };
return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, CMD_SYNC, return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, 0,
sizeof(reduce_txpwr_cmd), sizeof(reduce_txpwr_cmd),
&reduce_txpwr_cmd); &reduce_txpwr_cmd);
} }
...@@ -836,7 +836,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, ...@@ -836,7 +836,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
goto out_release; goto out_release;
/* beacon filtering */ /* beacon filtering */
ret = iwl_mvm_disable_beacon_filter(mvm, vif, CMD_SYNC); ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0);
if (ret) if (ret)
goto out_remove_mac; goto out_remove_mac;
...@@ -1243,7 +1243,7 @@ static int iwl_mvm_configure_bcast_filter(struct iwl_mvm *mvm, ...@@ -1243,7 +1243,7 @@ static int iwl_mvm_configure_bcast_filter(struct iwl_mvm *mvm,
if (!iwl_mvm_bcast_filter_build_cmd(mvm, &cmd)) if (!iwl_mvm_bcast_filter_build_cmd(mvm, &cmd))
return 0; return 0;
return iwl_mvm_send_cmd_pdu(mvm, BCAST_FILTER_CMD, CMD_SYNC, return iwl_mvm_send_cmd_pdu(mvm, BCAST_FILTER_CMD, 0,
sizeof(cmd), &cmd); sizeof(cmd), &cmd);
} }
#else #else
...@@ -1350,7 +1350,7 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm, ...@@ -1350,7 +1350,7 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
iwl_mvm_remove_time_event(mvm, mvmvif, iwl_mvm_remove_time_event(mvm, mvmvif,
&mvmvif->time_event_data); &mvmvif->time_event_data);
iwl_mvm_sf_update(mvm, vif, false); iwl_mvm_sf_update(mvm, vif, false);
WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, CMD_SYNC)); WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0));
} else if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS | } else if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS |
BSS_CHANGED_QOS)) { BSS_CHANGED_QOS)) {
ret = iwl_mvm_power_update_mac(mvm, vif); ret = iwl_mvm_power_update_mac(mvm, vif);
...@@ -1367,7 +1367,7 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm, ...@@ -1367,7 +1367,7 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
IWL_DEBUG_MAC80211(mvm, "cqm info_changed\n"); IWL_DEBUG_MAC80211(mvm, "cqm info_changed\n");
/* reset cqm events tracking */ /* reset cqm events tracking */
mvmvif->bf_data.last_cqm_event = 0; mvmvif->bf_data.last_cqm_event = 0;
ret = iwl_mvm_update_beacon_filter(mvm, vif, false, CMD_SYNC); ret = iwl_mvm_update_beacon_filter(mvm, vif, false, 0);
if (ret) if (ret)
IWL_ERR(mvm, "failed to update CQM thresholds\n"); IWL_ERR(mvm, "failed to update CQM thresholds\n");
} }
...@@ -1734,13 +1734,12 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw, ...@@ -1734,13 +1734,12 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
new_state == IEEE80211_STA_AUTHORIZED) { new_state == IEEE80211_STA_AUTHORIZED) {
/* enable beacon filtering */ /* enable beacon filtering */
if (vif->bss_conf.dtim_period) if (vif->bss_conf.dtim_period)
WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0));
CMD_SYNC));
ret = 0; ret = 0;
} else if (old_state == IEEE80211_STA_AUTHORIZED && } else if (old_state == IEEE80211_STA_AUTHORIZED &&
new_state == IEEE80211_STA_ASSOC) { new_state == IEEE80211_STA_ASSOC) {
/* disable beacon filtering */ /* disable beacon filtering */
WARN_ON(iwl_mvm_disable_beacon_filter(mvm, vif, CMD_SYNC)); WARN_ON(iwl_mvm_disable_beacon_filter(mvm, vif, 0));
ret = 0; ret = 0;
} else if (old_state == IEEE80211_STA_ASSOC && } else if (old_state == IEEE80211_STA_ASSOC &&
new_state == IEEE80211_STA_AUTH) { new_state == IEEE80211_STA_AUTH) {
...@@ -2366,9 +2365,8 @@ static int __iwl_mvm_mac_testmode_cmd(struct iwl_mvm *mvm, ...@@ -2366,9 +2365,8 @@ static int __iwl_mvm_mac_testmode_cmd(struct iwl_mvm *mvm,
return -EINVAL; return -EINVAL;
if (nla_get_u32(tb[IWL_MVM_TM_ATTR_BEACON_FILTER_STATE])) if (nla_get_u32(tb[IWL_MVM_TM_ATTR_BEACON_FILTER_STATE]))
return iwl_mvm_enable_beacon_filter(mvm, vif, return iwl_mvm_enable_beacon_filter(mvm, vif, 0);
CMD_SYNC); return iwl_mvm_disable_beacon_filter(mvm, vif, 0);
return iwl_mvm_disable_beacon_filter(mvm, vif, CMD_SYNC);
} }
return -EOPNOTSUPP; return -EOPNOTSUPP;
......
...@@ -90,7 +90,7 @@ static int iwl_nvm_write_chunk(struct iwl_mvm *mvm, u16 section, ...@@ -90,7 +90,7 @@ static int iwl_nvm_write_chunk(struct iwl_mvm *mvm, u16 section,
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = NVM_ACCESS_CMD, .id = NVM_ACCESS_CMD,
.len = { sizeof(struct iwl_nvm_access_cmd), length }, .len = { sizeof(struct iwl_nvm_access_cmd), length },
.flags = CMD_SYNC | CMD_SEND_IN_RFKILL, .flags = CMD_SEND_IN_RFKILL,
.data = { &nvm_access_cmd, data }, .data = { &nvm_access_cmd, data },
/* data may come from vmalloc, so use _DUP */ /* data may come from vmalloc, so use _DUP */
.dataflags = { 0, IWL_HCMD_DFL_DUP }, .dataflags = { 0, IWL_HCMD_DFL_DUP },
...@@ -112,7 +112,7 @@ static int iwl_nvm_read_chunk(struct iwl_mvm *mvm, u16 section, ...@@ -112,7 +112,7 @@ static int iwl_nvm_read_chunk(struct iwl_mvm *mvm, u16 section,
struct iwl_rx_packet *pkt; struct iwl_rx_packet *pkt;
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = NVM_ACCESS_CMD, .id = NVM_ACCESS_CMD,
.flags = CMD_SYNC | CMD_WANT_SKB | CMD_SEND_IN_RFKILL, .flags = CMD_WANT_SKB | CMD_SEND_IN_RFKILL,
.data = { &nvm_access_cmd, }, .data = { &nvm_access_cmd, },
}; };
int ret, bytes_read, offset_read; int ret, bytes_read, offset_read;
......
...@@ -1168,7 +1168,7 @@ static void iwl_mvm_d0i3_exit_work(struct work_struct *wk) ...@@ -1168,7 +1168,7 @@ static void iwl_mvm_d0i3_exit_work(struct work_struct *wk)
struct iwl_mvm *mvm = container_of(wk, struct iwl_mvm, d0i3_exit_work); struct iwl_mvm *mvm = container_of(wk, struct iwl_mvm, d0i3_exit_work);
struct iwl_host_cmd get_status_cmd = { struct iwl_host_cmd get_status_cmd = {
.id = WOWLAN_GET_STATUSES, .id = WOWLAN_GET_STATUSES,
.flags = CMD_SYNC | CMD_HIGH_PRIO | CMD_WANT_SKB, .flags = CMD_HIGH_PRIO | CMD_WANT_SKB,
}; };
struct iwl_wowlan_status *status; struct iwl_wowlan_status *status;
int ret; int ret;
......
...@@ -187,7 +187,7 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, ...@@ -187,7 +187,7 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm,
iwl_mvm_phy_ctxt_cmd_data(mvm, &cmd, chandef, iwl_mvm_phy_ctxt_cmd_data(mvm, &cmd, chandef,
chains_static, chains_dynamic); chains_static, chains_dynamic);
ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD, CMD_SYNC, ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD, 0,
sizeof(struct iwl_phy_context_cmd), sizeof(struct iwl_phy_context_cmd),
&cmd); &cmd);
if (ret) if (ret)
......
...@@ -142,7 +142,7 @@ int iwl_mvm_update_beacon_abort(struct iwl_mvm *mvm, ...@@ -142,7 +142,7 @@ int iwl_mvm_update_beacon_abort(struct iwl_mvm *mvm,
mvmvif->bf_data.ba_enabled = enable; mvmvif->bf_data.ba_enabled = enable;
iwl_mvm_beacon_filter_set_cqm_params(mvm, vif, &cmd); iwl_mvm_beacon_filter_set_cqm_params(mvm, vif, &cmd);
iwl_mvm_beacon_filter_debugfs_parameters(vif, &cmd); iwl_mvm_beacon_filter_debugfs_parameters(vif, &cmd);
return iwl_mvm_beacon_filter_send_cmd(mvm, &cmd, CMD_SYNC); return iwl_mvm_beacon_filter_send_cmd(mvm, &cmd, 0);
} }
static void iwl_mvm_power_log(struct iwl_mvm *mvm, static void iwl_mvm_power_log(struct iwl_mvm *mvm,
...@@ -456,7 +456,7 @@ static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm, ...@@ -456,7 +456,7 @@ static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm,
memcpy(&iwl_mvm_vif_from_mac80211(vif)->mac_pwr_cmd, &cmd, sizeof(cmd)); memcpy(&iwl_mvm_vif_from_mac80211(vif)->mac_pwr_cmd, &cmd, sizeof(cmd));
#endif #endif
return iwl_mvm_send_cmd_pdu(mvm, MAC_PM_POWER_TABLE, CMD_SYNC, return iwl_mvm_send_cmd_pdu(mvm, MAC_PM_POWER_TABLE, 0,
sizeof(cmd), &cmd); sizeof(cmd), &cmd);
} }
...@@ -482,7 +482,7 @@ int iwl_mvm_power_update_device(struct iwl_mvm *mvm) ...@@ -482,7 +482,7 @@ int iwl_mvm_power_update_device(struct iwl_mvm *mvm)
"Sending device power command with flags = 0x%X\n", "Sending device power command with flags = 0x%X\n",
cmd.flags); cmd.flags);
return iwl_mvm_send_cmd_pdu(mvm, POWER_TABLE_CMD, CMD_SYNC, sizeof(cmd), return iwl_mvm_send_cmd_pdu(mvm, POWER_TABLE_CMD, 0, sizeof(cmd),
&cmd); &cmd);
} }
......
...@@ -285,7 +285,7 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm, struct ieee80211_vif *newvif) ...@@ -285,7 +285,7 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm, struct ieee80211_vif *newvif)
iwl_mvm_adjust_quota_for_noa(mvm, &cmd); iwl_mvm_adjust_quota_for_noa(mvm, &cmd);
ret = iwl_mvm_send_cmd_pdu(mvm, TIME_QUOTA_CMD, CMD_SYNC, ret = iwl_mvm_send_cmd_pdu(mvm, TIME_QUOTA_CMD, 0,
sizeof(cmd), &cmd); sizeof(cmd), &cmd);
if (ret) if (ret)
IWL_ERR(mvm, "Failed to send quota: %d\n", ret); IWL_ERR(mvm, "Failed to send quota: %d\n", ret);
......
...@@ -306,7 +306,6 @@ int iwl_mvm_scan_request(struct iwl_mvm *mvm, ...@@ -306,7 +306,6 @@ int iwl_mvm_scan_request(struct iwl_mvm *mvm,
.id = SCAN_REQUEST_CMD, .id = SCAN_REQUEST_CMD,
.len = { 0, }, .len = { 0, },
.data = { mvm->scan_cmd, }, .data = { mvm->scan_cmd, },
.flags = CMD_SYNC,
.dataflags = { IWL_HCMD_DFL_NOCOPY, }, .dataflags = { IWL_HCMD_DFL_NOCOPY, },
}; };
struct iwl_scan_cmd *cmd = mvm->scan_cmd; struct iwl_scan_cmd *cmd = mvm->scan_cmd;
...@@ -517,7 +516,7 @@ int iwl_mvm_cancel_scan(struct iwl_mvm *mvm) ...@@ -517,7 +516,7 @@ int iwl_mvm_cancel_scan(struct iwl_mvm *mvm)
ARRAY_SIZE(scan_abort_notif), ARRAY_SIZE(scan_abort_notif),
iwl_mvm_scan_abort_notif, NULL); iwl_mvm_scan_abort_notif, NULL);
ret = iwl_mvm_send_cmd_pdu(mvm, SCAN_ABORT_CMD, CMD_SYNC, 0, NULL); ret = iwl_mvm_send_cmd_pdu(mvm, SCAN_ABORT_CMD, 0, 0, NULL);
if (ret) { if (ret) {
IWL_ERR(mvm, "Couldn't send SCAN_ABORT_CMD: %d\n", ret); IWL_ERR(mvm, "Couldn't send SCAN_ABORT_CMD: %d\n", ret);
/* mac80211's state will be cleaned in the nic_restart flow */ /* mac80211's state will be cleaned in the nic_restart flow */
...@@ -749,7 +748,6 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm, ...@@ -749,7 +748,6 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
struct iwl_scan_offload_cfg *scan_cfg; struct iwl_scan_offload_cfg *scan_cfg;
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = SCAN_OFFLOAD_CONFIG_CMD, .id = SCAN_OFFLOAD_CONFIG_CMD,
.flags = CMD_SYNC,
}; };
struct iwl_mvm_scan_params params = {}; struct iwl_mvm_scan_params params = {};
...@@ -807,7 +805,6 @@ int iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm, ...@@ -807,7 +805,6 @@ int iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm,
struct iwl_scan_offload_blacklist *blacklist; struct iwl_scan_offload_blacklist *blacklist;
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = SCAN_OFFLOAD_UPDATE_PROFILES_CMD, .id = SCAN_OFFLOAD_UPDATE_PROFILES_CMD,
.flags = CMD_SYNC,
.len[1] = sizeof(*profile_cfg), .len[1] = sizeof(*profile_cfg),
.dataflags[0] = IWL_HCMD_DFL_NOCOPY, .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
.dataflags[1] = IWL_HCMD_DFL_NOCOPY, .dataflags[1] = IWL_HCMD_DFL_NOCOPY,
...@@ -898,7 +895,7 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm, ...@@ -898,7 +895,7 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
scan_req.flags |= scan_req.flags |=
cpu_to_le16(IWL_SCAN_OFFLOAD_FLAG_EBS_ACCURATE_MODE); cpu_to_le16(IWL_SCAN_OFFLOAD_FLAG_EBS_ACCURATE_MODE);
return iwl_mvm_send_cmd_pdu(mvm, SCAN_OFFLOAD_REQUEST_CMD, CMD_SYNC, return iwl_mvm_send_cmd_pdu(mvm, SCAN_OFFLOAD_REQUEST_CMD, 0,
sizeof(scan_req), &scan_req); sizeof(scan_req), &scan_req);
} }
...@@ -907,7 +904,6 @@ static int iwl_mvm_send_sched_scan_abort(struct iwl_mvm *mvm) ...@@ -907,7 +904,6 @@ static int iwl_mvm_send_sched_scan_abort(struct iwl_mvm *mvm)
int ret; int ret;
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = SCAN_OFFLOAD_ABORT_CMD, .id = SCAN_OFFLOAD_ABORT_CMD,
.flags = CMD_SYNC,
}; };
u32 status; u32 status;
......
...@@ -327,7 +327,7 @@ static int iwl_mvm_rm_sta_common(struct iwl_mvm *mvm, u8 sta_id) ...@@ -327,7 +327,7 @@ static int iwl_mvm_rm_sta_common(struct iwl_mvm *mvm, u8 sta_id)
return -EINVAL; return -EINVAL;
} }
ret = iwl_mvm_send_cmd_pdu(mvm, REMOVE_STA, CMD_SYNC, ret = iwl_mvm_send_cmd_pdu(mvm, REMOVE_STA, 0,
sizeof(rm_sta_cmd), &rm_sta_cmd); sizeof(rm_sta_cmd), &rm_sta_cmd);
if (ret) { if (ret) {
IWL_ERR(mvm, "Failed to remove station. Id=%d\n", sta_id); IWL_ERR(mvm, "Failed to remove station. Id=%d\n", sta_id);
...@@ -1053,12 +1053,12 @@ static int iwl_mvm_send_sta_key(struct iwl_mvm *mvm, ...@@ -1053,12 +1053,12 @@ static int iwl_mvm_send_sta_key(struct iwl_mvm *mvm,
cmd.sta_id = sta_id; cmd.sta_id = sta_id;
status = ADD_STA_SUCCESS; status = ADD_STA_SUCCESS;
if (cmd_flags == CMD_SYNC) if (cmd_flags & CMD_ASYNC)
ret = iwl_mvm_send_cmd_pdu_status(mvm, ADD_STA_KEY, sizeof(cmd),
&cmd, &status);
else
ret = iwl_mvm_send_cmd_pdu(mvm, ADD_STA_KEY, CMD_ASYNC, ret = iwl_mvm_send_cmd_pdu(mvm, ADD_STA_KEY, CMD_ASYNC,
sizeof(cmd), &cmd); sizeof(cmd), &cmd);
else
ret = iwl_mvm_send_cmd_pdu_status(mvm, ADD_STA_KEY, sizeof(cmd),
&cmd, &status);
switch (status) { switch (status) {
case ADD_STA_SUCCESS: case ADD_STA_SUCCESS:
...@@ -1111,7 +1111,7 @@ static int iwl_mvm_send_sta_igtk(struct iwl_mvm *mvm, ...@@ -1111,7 +1111,7 @@ static int iwl_mvm_send_sta_igtk(struct iwl_mvm *mvm,
remove_key ? "removing" : "installing", remove_key ? "removing" : "installing",
igtk_cmd.sta_id); igtk_cmd.sta_id);
return iwl_mvm_send_cmd_pdu(mvm, MGMT_MCAST_KEY, CMD_SYNC, return iwl_mvm_send_cmd_pdu(mvm, MGMT_MCAST_KEY, 0,
sizeof(igtk_cmd), &igtk_cmd); sizeof(igtk_cmd), &igtk_cmd);
} }
...@@ -1198,15 +1198,15 @@ int iwl_mvm_set_sta_key(struct iwl_mvm *mvm, ...@@ -1198,15 +1198,15 @@ int iwl_mvm_set_sta_key(struct iwl_mvm *mvm,
ieee80211_get_key_rx_seq(keyconf, 0, &seq); ieee80211_get_key_rx_seq(keyconf, 0, &seq);
ieee80211_get_tkip_rx_p1k(keyconf, addr, seq.tkip.iv32, p1k); ieee80211_get_tkip_rx_p1k(keyconf, addr, seq.tkip.iv32, p1k);
ret = iwl_mvm_send_sta_key(mvm, mvm_sta, keyconf, sta_id, ret = iwl_mvm_send_sta_key(mvm, mvm_sta, keyconf, sta_id,
seq.tkip.iv32, p1k, CMD_SYNC); seq.tkip.iv32, p1k, 0);
break; break;
case WLAN_CIPHER_SUITE_CCMP: case WLAN_CIPHER_SUITE_CCMP:
ret = iwl_mvm_send_sta_key(mvm, mvm_sta, keyconf, sta_id, ret = iwl_mvm_send_sta_key(mvm, mvm_sta, keyconf, sta_id,
0, NULL, CMD_SYNC); 0, NULL, 0);
break; break;
default: default:
ret = iwl_mvm_send_sta_key(mvm, mvm_sta, keyconf, ret = iwl_mvm_send_sta_key(mvm, mvm_sta, keyconf,
sta_id, 0, NULL, CMD_SYNC); sta_id, 0, NULL, 0);
} }
if (ret) if (ret)
......
...@@ -312,7 +312,7 @@ static int iwl_mvm_time_event_send_add(struct iwl_mvm *mvm, ...@@ -312,7 +312,7 @@ static int iwl_mvm_time_event_send_add(struct iwl_mvm *mvm,
ARRAY_SIZE(time_event_response), ARRAY_SIZE(time_event_response),
iwl_mvm_time_event_response, te_data); iwl_mvm_time_event_response, te_data);
ret = iwl_mvm_send_cmd_pdu(mvm, TIME_EVENT_CMD, CMD_SYNC, ret = iwl_mvm_send_cmd_pdu(mvm, TIME_EVENT_CMD, 0,
sizeof(*te_cmd), te_cmd); sizeof(*te_cmd), te_cmd);
if (ret) { if (ret) {
IWL_ERR(mvm, "Couldn't send TIME_EVENT_CMD: %d\n", ret); IWL_ERR(mvm, "Couldn't send TIME_EVENT_CMD: %d\n", ret);
...@@ -434,7 +434,7 @@ void iwl_mvm_remove_time_event(struct iwl_mvm *mvm, ...@@ -434,7 +434,7 @@ void iwl_mvm_remove_time_event(struct iwl_mvm *mvm,
cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, mvmvif->color)); cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, mvmvif->color));
IWL_DEBUG_TE(mvm, "Removing TE 0x%x\n", le32_to_cpu(time_cmd.id)); IWL_DEBUG_TE(mvm, "Removing TE 0x%x\n", le32_to_cpu(time_cmd.id));
ret = iwl_mvm_send_cmd_pdu(mvm, TIME_EVENT_CMD, CMD_SYNC, ret = iwl_mvm_send_cmd_pdu(mvm, TIME_EVENT_CMD, 0,
sizeof(time_cmd), &time_cmd); sizeof(time_cmd), &time_cmd);
if (WARN_ON(ret)) if (WARN_ON(ret))
return; return;
......
...@@ -409,7 +409,6 @@ void iwl_mvm_tt_tx_backoff(struct iwl_mvm *mvm, u32 backoff) ...@@ -409,7 +409,6 @@ void iwl_mvm_tt_tx_backoff(struct iwl_mvm *mvm, u32 backoff)
.id = REPLY_THERMAL_MNG_BACKOFF, .id = REPLY_THERMAL_MNG_BACKOFF,
.len = { sizeof(u32), }, .len = { sizeof(u32), },
.data = { &backoff, }, .data = { &backoff, },
.flags = CMD_SYNC,
}; };
backoff = max(backoff, mvm->thermal_throttle.min_backoff); backoff = max(backoff, mvm->thermal_throttle.min_backoff);
......
...@@ -958,7 +958,7 @@ int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, bool sync) ...@@ -958,7 +958,7 @@ int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, bool sync)
.flush_ctl = cpu_to_le16(DUMP_TX_FIFO_FLUSH), .flush_ctl = cpu_to_le16(DUMP_TX_FIFO_FLUSH),
}; };
u32 flags = sync ? CMD_SYNC : CMD_ASYNC; u32 flags = sync ? 0 : CMD_ASYNC;
ret = iwl_mvm_send_cmd_pdu(mvm, TXPATH_FLUSH, flags, ret = iwl_mvm_send_cmd_pdu(mvm, TXPATH_FLUSH, flags,
sizeof(flush_cmd), &flush_cmd); sizeof(flush_cmd), &flush_cmd);
......
...@@ -144,7 +144,7 @@ int iwl_mvm_send_cmd_status(struct iwl_mvm *mvm, struct iwl_host_cmd *cmd, ...@@ -144,7 +144,7 @@ int iwl_mvm_send_cmd_status(struct iwl_mvm *mvm, struct iwl_host_cmd *cmd,
"cmd flags %x", cmd->flags)) "cmd flags %x", cmd->flags))
return -EINVAL; return -EINVAL;
cmd->flags |= CMD_SYNC | CMD_WANT_SKB; cmd->flags |= CMD_WANT_SKB;
ret = iwl_trans_send_cmd(mvm->trans, cmd); ret = iwl_trans_send_cmd(mvm->trans, cmd);
if (ret == -ERFKILL) { if (ret == -ERFKILL) {
...@@ -599,7 +599,7 @@ int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq, bool init) ...@@ -599,7 +599,7 @@ int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq, bool init)
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = LQ_CMD, .id = LQ_CMD,
.len = { sizeof(struct iwl_lq_cmd), }, .len = { sizeof(struct iwl_lq_cmd), },
.flags = init ? CMD_SYNC : CMD_ASYNC, .flags = init ? 0 : CMD_ASYNC,
.data = { lq, }, .data = { lq, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment