diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-06 16:30:39 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-07 13:51:48 -0500 |
commit | e10a0533a9172471b52bd9512838d766420a3baf (patch) | |
tree | 872217005f1eb2e223fc1fc5b6799785e5a90691 /drivers/net/wireless | |
parent | 965974a631756ab2729469b9ecadfe61ee44dfc5 (diff) |
iwlwifi: add wrappers for command sending
Add wrappers to send commands from the DVM
op-mode (which essentially consists of the
current driver). This will allow us to move
specific sanity checks there.
Also, this removes iwl_trans_send_cmd_pdu()
since that can now be taken care of in the
DVM-specific wrapper.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/Makefile | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 38 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-led.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-power.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-testmode.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.c | 77 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-ucode.c | 8 |
17 files changed, 70 insertions, 128 deletions
diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile index afa0bb8f3245..f2a903d01aa9 100644 --- a/drivers/net/wireless/iwlwifi/Makefile +++ b/drivers/net/wireless/iwlwifi/Makefile | |||
@@ -14,7 +14,6 @@ iwlwifi-objs += iwl-1000.o | |||
14 | iwlwifi-objs += iwl-2000.o | 14 | iwlwifi-objs += iwl-2000.o |
15 | iwlwifi-objs += iwl-pci.o | 15 | iwlwifi-objs += iwl-pci.o |
16 | iwlwifi-objs += iwl-drv.o | 16 | iwlwifi-objs += iwl-drv.o |
17 | iwlwifi-objs += iwl-trans.o | ||
18 | iwlwifi-objs += iwl-trans-pcie.o iwl-trans-pcie-rx.o iwl-trans-pcie-tx.o | 17 | iwlwifi-objs += iwl-trans-pcie.o iwl-trans-pcie-rx.o iwl-trans-pcie-tx.o |
19 | 18 | ||
20 | iwlwifi-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o | 19 | iwlwifi-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index dff75a09eb48..aebdfd7e01a5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -281,7 +281,7 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, | |||
281 | return -EFAULT; | 281 | return -EFAULT; |
282 | } | 282 | } |
283 | 283 | ||
284 | return iwl_trans_send_cmd(trans(priv), &hcmd); | 284 | return iwl_dvm_send_cmd(priv, &hcmd); |
285 | } | 285 | } |
286 | 286 | ||
287 | static struct iwl_lib_ops iwl5000_lib = { | 287 | static struct iwl_lib_ops iwl5000_lib = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index ef896630625d..150bef078609 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -232,7 +232,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | |||
232 | return -EFAULT; | 232 | return -EFAULT; |
233 | } | 233 | } |
234 | 234 | ||
235 | return iwl_trans_send_cmd(trans(priv), &hcmd); | 235 | return iwl_dvm_send_cmd(priv, &hcmd); |
236 | } | 236 | } |
237 | 237 | ||
238 | static struct iwl_lib_ops iwl6000_lib = { | 238 | static struct iwl_lib_ops iwl6000_lib = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c index 588d107b82f4..579679edd5f1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c | |||
@@ -104,7 +104,7 @@ int iwl_send_calib_results(struct iwl_priv *priv) | |||
104 | hcmd.len[0] = res->cmd_len; | 104 | hcmd.len[0] = res->cmd_len; |
105 | hcmd.data[0] = &res->hdr; | 105 | hcmd.data[0] = &res->hdr; |
106 | hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY; | 106 | hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY; |
107 | ret = iwl_trans_send_cmd(trans(priv), &hcmd); | 107 | ret = iwl_dvm_send_cmd(priv, &hcmd); |
108 | if (ret) { | 108 | if (ret) { |
109 | IWL_ERR(priv, "Error %d on calib cmd %d\n", | 109 | IWL_ERR(priv, "Error %d on calib cmd %d\n", |
110 | ret, res->hdr.op_code); | 110 | ret, res->hdr.op_code); |
@@ -500,7 +500,7 @@ static int iwl_sensitivity_write(struct iwl_priv *priv) | |||
500 | memcpy(&(priv->sensitivity_tbl[0]), &(cmd.table[0]), | 500 | memcpy(&(priv->sensitivity_tbl[0]), &(cmd.table[0]), |
501 | sizeof(u16)*HD_TABLE_SIZE); | 501 | sizeof(u16)*HD_TABLE_SIZE); |
502 | 502 | ||
503 | return iwl_trans_send_cmd(trans(priv), &cmd_out); | 503 | return iwl_dvm_send_cmd(priv, &cmd_out); |
504 | } | 504 | } |
505 | 505 | ||
506 | /* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */ | 506 | /* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */ |
@@ -589,7 +589,7 @@ static int iwl_enhance_sensitivity_write(struct iwl_priv *priv) | |||
589 | &(cmd.enhance_table[HD_INA_NON_SQUARE_DET_OFDM_INDEX]), | 589 | &(cmd.enhance_table[HD_INA_NON_SQUARE_DET_OFDM_INDEX]), |
590 | sizeof(u16)*ENHANCE_HD_TABLE_ENTRIES); | 590 | sizeof(u16)*ENHANCE_HD_TABLE_ENTRIES); |
591 | 591 | ||
592 | return iwl_trans_send_cmd(trans(priv), &cmd_out); | 592 | return iwl_dvm_send_cmd(priv, &cmd_out); |
593 | } | 593 | } |
594 | 594 | ||
595 | void iwl_init_sensitivity(struct iwl_priv *priv) | 595 | void iwl_init_sensitivity(struct iwl_priv *priv) |
@@ -930,7 +930,7 @@ static void iwlagn_gain_computation(struct iwl_priv *priv, | |||
930 | priv->phy_calib_chain_noise_gain_cmd); | 930 | priv->phy_calib_chain_noise_gain_cmd); |
931 | cmd.delta_gain_1 = data->delta_gain_code[1]; | 931 | cmd.delta_gain_1 = data->delta_gain_code[1]; |
932 | cmd.delta_gain_2 = data->delta_gain_code[2]; | 932 | cmd.delta_gain_2 = data->delta_gain_code[2]; |
933 | iwl_trans_send_cmd_pdu(trans(priv), REPLY_PHY_CALIBRATION_CMD, | 933 | iwl_dvm_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD, |
934 | CMD_ASYNC, sizeof(cmd), &cmd); | 934 | CMD_ASYNC, sizeof(cmd), &cmd); |
935 | 935 | ||
936 | data->radio_write = 1; | 936 | data->radio_write = 1; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index b06283282283..4c777dfc0db0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -81,7 +81,7 @@ int iwlagn_send_tx_power(struct iwl_priv *priv) | |||
81 | else | 81 | else |
82 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD; | 82 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD; |
83 | 83 | ||
84 | return iwl_trans_send_cmd_pdu(trans(priv), tx_ant_cfg_cmd, CMD_SYNC, | 84 | return iwl_dvm_send_cmd_pdu(priv, tx_ant_cfg_cmd, CMD_SYNC, |
85 | sizeof(tx_power_cmd), &tx_power_cmd); | 85 | sizeof(tx_power_cmd), &tx_power_cmd); |
86 | } | 86 | } |
87 | 87 | ||
@@ -241,7 +241,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | |||
241 | flush_cmd.fifo_control); | 241 | flush_cmd.fifo_control); |
242 | flush_cmd.flush_control = cpu_to_le16(flush_control); | 242 | flush_cmd.flush_control = cpu_to_le16(flush_control); |
243 | 243 | ||
244 | return iwl_trans_send_cmd(trans(priv), &cmd); | 244 | return iwl_dvm_send_cmd(priv, &cmd); |
245 | } | 245 | } |
246 | 246 | ||
247 | void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | 247 | void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control) |
@@ -435,12 +435,12 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv) | |||
435 | if (cfg(priv)->bt_params->bt_session_2) { | 435 | if (cfg(priv)->bt_params->bt_session_2) { |
436 | memcpy(&bt_cmd_2000.basic, &basic, | 436 | memcpy(&bt_cmd_2000.basic, &basic, |
437 | sizeof(basic)); | 437 | sizeof(basic)); |
438 | ret = iwl_trans_send_cmd_pdu(trans(priv), REPLY_BT_CONFIG, | 438 | ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG, |
439 | CMD_SYNC, sizeof(bt_cmd_2000), &bt_cmd_2000); | 439 | CMD_SYNC, sizeof(bt_cmd_2000), &bt_cmd_2000); |
440 | } else { | 440 | } else { |
441 | memcpy(&bt_cmd_6000.basic, &basic, | 441 | memcpy(&bt_cmd_6000.basic, &basic, |
442 | sizeof(basic)); | 442 | sizeof(basic)); |
443 | ret = iwl_trans_send_cmd_pdu(trans(priv), REPLY_BT_CONFIG, | 443 | ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG, |
444 | CMD_SYNC, sizeof(bt_cmd_6000), &bt_cmd_6000); | 444 | CMD_SYNC, sizeof(bt_cmd_6000), &bt_cmd_6000); |
445 | } | 445 | } |
446 | if (ret) | 446 | if (ret) |
@@ -1115,7 +1115,7 @@ int iwlagn_send_patterns(struct iwl_priv *priv, | |||
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | cmd.data[0] = pattern_cmd; | 1117 | cmd.data[0] = pattern_cmd; |
1118 | err = iwl_trans_send_cmd(trans(priv), &cmd); | 1118 | err = iwl_dvm_send_cmd(priv, &cmd); |
1119 | kfree(pattern_cmd); | 1119 | kfree(pattern_cmd); |
1120 | return err; | 1120 | return err; |
1121 | } | 1121 | } |
@@ -1241,13 +1241,13 @@ int iwlagn_suspend(struct iwl_priv *priv, | |||
1241 | .len[0] = sizeof(key_data.rsc_tsc), | 1241 | .len[0] = sizeof(key_data.rsc_tsc), |
1242 | }; | 1242 | }; |
1243 | 1243 | ||
1244 | ret = iwl_trans_send_cmd(trans(priv), &rsc_tsc_cmd); | 1244 | ret = iwl_dvm_send_cmd(priv, &rsc_tsc_cmd); |
1245 | if (ret) | 1245 | if (ret) |
1246 | goto out; | 1246 | goto out; |
1247 | } | 1247 | } |
1248 | 1248 | ||
1249 | if (key_data.use_tkip) { | 1249 | if (key_data.use_tkip) { |
1250 | ret = iwl_trans_send_cmd_pdu(trans(priv), | 1250 | ret = iwl_dvm_send_cmd_pdu(priv, |
1251 | REPLY_WOWLAN_TKIP_PARAMS, | 1251 | REPLY_WOWLAN_TKIP_PARAMS, |
1252 | CMD_SYNC, sizeof(tkip_cmd), | 1252 | CMD_SYNC, sizeof(tkip_cmd), |
1253 | &tkip_cmd); | 1253 | &tkip_cmd); |
@@ -1263,7 +1263,7 @@ int iwlagn_suspend(struct iwl_priv *priv, | |||
1263 | kek_kck_cmd.kek_len = cpu_to_le16(NL80211_KEK_LEN); | 1263 | kek_kck_cmd.kek_len = cpu_to_le16(NL80211_KEK_LEN); |
1264 | kek_kck_cmd.replay_ctr = priv->replay_ctr; | 1264 | kek_kck_cmd.replay_ctr = priv->replay_ctr; |
1265 | 1265 | ||
1266 | ret = iwl_trans_send_cmd_pdu(trans(priv), | 1266 | ret = iwl_dvm_send_cmd_pdu(priv, |
1267 | REPLY_WOWLAN_KEK_KCK_MATERIAL, | 1267 | REPLY_WOWLAN_KEK_KCK_MATERIAL, |
1268 | CMD_SYNC, sizeof(kek_kck_cmd), | 1268 | CMD_SYNC, sizeof(kek_kck_cmd), |
1269 | &kek_kck_cmd); | 1269 | &kek_kck_cmd); |
@@ -1272,12 +1272,12 @@ int iwlagn_suspend(struct iwl_priv *priv, | |||
1272 | } | 1272 | } |
1273 | } | 1273 | } |
1274 | 1274 | ||
1275 | ret = iwl_trans_send_cmd_pdu(trans(priv), REPLY_D3_CONFIG, CMD_SYNC, | 1275 | ret = iwl_dvm_send_cmd_pdu(priv, REPLY_D3_CONFIG, CMD_SYNC, |
1276 | sizeof(d3_cfg_cmd), &d3_cfg_cmd); | 1276 | sizeof(d3_cfg_cmd), &d3_cfg_cmd); |
1277 | if (ret) | 1277 | if (ret) |
1278 | goto out; | 1278 | goto out; |
1279 | 1279 | ||
1280 | ret = iwl_trans_send_cmd_pdu(trans(priv), REPLY_WOWLAN_WAKEUP_FILTER, | 1280 | ret = iwl_dvm_send_cmd_pdu(priv, REPLY_WOWLAN_WAKEUP_FILTER, |
1281 | CMD_SYNC, sizeof(wakeup_filter_cmd), | 1281 | CMD_SYNC, sizeof(wakeup_filter_cmd), |
1282 | &wakeup_filter_cmd); | 1282 | &wakeup_filter_cmd); |
1283 | if (ret) | 1283 | if (ret) |
@@ -1289,3 +1289,21 @@ int iwlagn_suspend(struct iwl_priv *priv, | |||
1289 | return ret; | 1289 | return ret; |
1290 | } | 1290 | } |
1291 | #endif | 1291 | #endif |
1292 | |||
1293 | int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | ||
1294 | { | ||
1295 | return iwl_trans_send_cmd(trans(priv), cmd); | ||
1296 | } | ||
1297 | |||
1298 | int iwl_dvm_send_cmd_pdu(struct iwl_priv *priv, u8 id, | ||
1299 | u32 flags, u16 len, const void *data) | ||
1300 | { | ||
1301 | struct iwl_host_cmd cmd = { | ||
1302 | .id = id, | ||
1303 | .len = { len, }, | ||
1304 | .data = { data, }, | ||
1305 | .flags = flags, | ||
1306 | }; | ||
1307 | |||
1308 | return iwl_dvm_send_cmd(priv, &cmd); | ||
1309 | } | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index e806ad82e7e3..53114db9c9c3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -39,7 +39,7 @@ static int iwlagn_disable_bss(struct iwl_priv *priv, | |||
39 | int ret; | 39 | int ret; |
40 | 40 | ||
41 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 41 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
42 | ret = iwl_trans_send_cmd_pdu(trans(priv), ctx->rxon_cmd, | 42 | ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, |
43 | CMD_SYNC, sizeof(*send), send); | 43 | CMD_SYNC, sizeof(*send), send); |
44 | 44 | ||
45 | send->filter_flags = old_filter; | 45 | send->filter_flags = old_filter; |
@@ -66,7 +66,7 @@ static int iwlagn_disable_pan(struct iwl_priv *priv, | |||
66 | 66 | ||
67 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 67 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
68 | send->dev_type = RXON_DEV_TYPE_P2P; | 68 | send->dev_type = RXON_DEV_TYPE_P2P; |
69 | ret = iwl_trans_send_cmd_pdu(trans(priv), ctx->rxon_cmd, | 69 | ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, |
70 | CMD_SYNC, sizeof(*send), send); | 70 | CMD_SYNC, sizeof(*send), send); |
71 | 71 | ||
72 | send->filter_flags = old_filter; | 72 | send->filter_flags = old_filter; |
@@ -92,7 +92,7 @@ static int iwlagn_disconn_pan(struct iwl_priv *priv, | |||
92 | int ret; | 92 | int ret; |
93 | 93 | ||
94 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 94 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
95 | ret = iwl_trans_send_cmd_pdu(trans(priv), ctx->rxon_cmd, CMD_SYNC, | 95 | ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, CMD_SYNC, |
96 | sizeof(*send), send); | 96 | sizeof(*send), send); |
97 | 97 | ||
98 | send->filter_flags = old_filter; | 98 | send->filter_flags = old_filter; |
@@ -121,7 +121,7 @@ static void iwlagn_update_qos(struct iwl_priv *priv, | |||
121 | ctx->qos_data.qos_active, | 121 | ctx->qos_data.qos_active, |
122 | ctx->qos_data.def_qos_parm.qos_flags); | 122 | ctx->qos_data.def_qos_parm.qos_flags); |
123 | 123 | ||
124 | ret = iwl_trans_send_cmd_pdu(trans(priv), ctx->qos_cmd, CMD_SYNC, | 124 | ret = iwl_dvm_send_cmd_pdu(priv, ctx->qos_cmd, CMD_SYNC, |
125 | sizeof(struct iwl_qosparam_cmd), | 125 | sizeof(struct iwl_qosparam_cmd), |
126 | &ctx->qos_data.def_qos_parm); | 126 | &ctx->qos_data.def_qos_parm); |
127 | if (ret) | 127 | if (ret) |
@@ -180,7 +180,7 @@ static int iwlagn_send_rxon_assoc(struct iwl_priv *priv, | |||
180 | ctx->staging.ofdm_ht_triple_stream_basic_rates; | 180 | ctx->staging.ofdm_ht_triple_stream_basic_rates; |
181 | rxon_assoc.acquisition_data = ctx->staging.acquisition_data; | 181 | rxon_assoc.acquisition_data = ctx->staging.acquisition_data; |
182 | 182 | ||
183 | ret = iwl_trans_send_cmd_pdu(trans(priv), ctx->rxon_assoc_cmd, | 183 | ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_assoc_cmd, |
184 | CMD_ASYNC, sizeof(rxon_assoc), &rxon_assoc); | 184 | CMD_ASYNC, sizeof(rxon_assoc), &rxon_assoc); |
185 | return ret; | 185 | return ret; |
186 | } | 186 | } |
@@ -266,7 +266,7 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv, | |||
266 | * Associated RXON doesn't clear the station table in uCode, | 266 | * Associated RXON doesn't clear the station table in uCode, |
267 | * so we don't need to restore stations etc. after this. | 267 | * so we don't need to restore stations etc. after this. |
268 | */ | 268 | */ |
269 | ret = iwl_trans_send_cmd_pdu(trans(priv), ctx->rxon_cmd, CMD_SYNC, | 269 | ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, CMD_SYNC, |
270 | sizeof(struct iwl_rxon_cmd), &ctx->staging); | 270 | sizeof(struct iwl_rxon_cmd), &ctx->staging); |
271 | if (ret) { | 271 | if (ret) { |
272 | IWL_ERR(priv, "Error setting new RXON (%d)\n", ret); | 272 | IWL_ERR(priv, "Error setting new RXON (%d)\n", ret); |
@@ -385,7 +385,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv) | |||
385 | cmd.slots[0].width = cpu_to_le16(slot0); | 385 | cmd.slots[0].width = cpu_to_le16(slot0); |
386 | cmd.slots[1].width = cpu_to_le16(slot1); | 386 | cmd.slots[1].width = cpu_to_le16(slot1); |
387 | 387 | ||
388 | ret = iwl_trans_send_cmd_pdu(trans(priv), REPLY_WIPAN_PARAMS, CMD_SYNC, | 388 | ret = iwl_dvm_send_cmd_pdu(priv, REPLY_WIPAN_PARAMS, CMD_SYNC, |
389 | sizeof(cmd), &cmd); | 389 | sizeof(cmd), &cmd); |
390 | if (ret) | 390 | if (ret) |
391 | IWL_ERR(priv, "Error setting PAN parameters (%d)\n", ret); | 391 | IWL_ERR(priv, "Error setting PAN parameters (%d)\n", ret); |
@@ -771,7 +771,7 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv) | |||
771 | memset(&cmd, 0, sizeof(cmd)); | 771 | memset(&cmd, 0, sizeof(cmd)); |
772 | iwl_set_calib_hdr(&cmd.hdr, | 772 | iwl_set_calib_hdr(&cmd.hdr, |
773 | priv->phy_calib_chain_noise_reset_cmd); | 773 | priv->phy_calib_chain_noise_reset_cmd); |
774 | ret = iwl_trans_send_cmd_pdu(trans(priv), | 774 | ret = iwl_dvm_send_cmd_pdu(priv, |
775 | REPLY_PHY_CALIBRATION_CMD, | 775 | REPLY_PHY_CALIBRATION_CMD, |
776 | CMD_SYNC, sizeof(cmd), &cmd); | 776 | CMD_SYNC, sizeof(cmd), &cmd); |
777 | if (ret) | 777 | if (ret) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c index ca080265a829..73a25f48cd53 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c | |||
@@ -153,7 +153,7 @@ int iwl_send_add_sta(struct iwl_priv *priv, | |||
153 | might_sleep(); | 153 | might_sleep(); |
154 | } | 154 | } |
155 | 155 | ||
156 | ret = iwl_trans_send_cmd(trans(priv), &cmd); | 156 | ret = iwl_dvm_send_cmd(priv, &cmd); |
157 | 157 | ||
158 | if (ret || (flags & CMD_ASYNC)) | 158 | if (ret || (flags & CMD_ASYNC)) |
159 | return ret; | 159 | return ret; |
@@ -447,7 +447,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, | |||
447 | 447 | ||
448 | cmd.flags |= CMD_WANT_SKB; | 448 | cmd.flags |= CMD_WANT_SKB; |
449 | 449 | ||
450 | ret = iwl_trans_send_cmd(trans(priv), &cmd); | 450 | ret = iwl_dvm_send_cmd(priv, &cmd); |
451 | 451 | ||
452 | if (ret) | 452 | if (ret) |
453 | return ret; | 453 | return ret; |
@@ -785,7 +785,7 @@ int iwl_send_lq_cmd(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | |||
785 | return -EINVAL; | 785 | return -EINVAL; |
786 | 786 | ||
787 | if (is_lq_table_valid(priv, ctx, lq)) | 787 | if (is_lq_table_valid(priv, ctx, lq)) |
788 | ret = iwl_trans_send_cmd(trans(priv), &cmd); | 788 | ret = iwl_dvm_send_cmd(priv, &cmd); |
789 | else | 789 | else |
790 | ret = -EINVAL; | 790 | ret = -EINVAL; |
791 | 791 | ||
@@ -970,7 +970,7 @@ static int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, | |||
970 | cmd.len[0] = cmd_size; | 970 | cmd.len[0] = cmd_size; |
971 | 971 | ||
972 | if (not_empty || send_if_empty) | 972 | if (not_empty || send_if_empty) |
973 | return iwl_trans_send_cmd(trans(priv), &cmd); | 973 | return iwl_dvm_send_cmd(priv, &cmd); |
974 | else | 974 | else |
975 | return 0; | 975 | return 0; |
976 | } | 976 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index cdfe76151072..3f59a773b3e0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -197,7 +197,7 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv) | |||
197 | cmd.data[1] = priv->beacon_skb->data; | 197 | cmd.data[1] = priv->beacon_skb->data; |
198 | cmd.dataflags[1] = IWL_HCMD_DFL_NOCOPY; | 198 | cmd.dataflags[1] = IWL_HCMD_DFL_NOCOPY; |
199 | 199 | ||
200 | return iwl_trans_send_cmd(trans(priv), &cmd); | 200 | return iwl_dvm_send_cmd(priv, &cmd); |
201 | } | 201 | } |
202 | 202 | ||
203 | static void iwl_bg_beacon_update(struct work_struct *work) | 203 | static void iwl_bg_beacon_update(struct work_struct *work) |
@@ -563,7 +563,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv) | |||
563 | adv_cmd.critical_temperature_exit = | 563 | adv_cmd.critical_temperature_exit = |
564 | cpu_to_le32(hw_params(priv).ct_kill_exit_threshold); | 564 | cpu_to_le32(hw_params(priv).ct_kill_exit_threshold); |
565 | 565 | ||
566 | ret = iwl_trans_send_cmd_pdu(trans(priv), | 566 | ret = iwl_dvm_send_cmd_pdu(priv, |
567 | REPLY_CT_KILL_CONFIG_CMD, | 567 | REPLY_CT_KILL_CONFIG_CMD, |
568 | CMD_SYNC, sizeof(adv_cmd), &adv_cmd); | 568 | CMD_SYNC, sizeof(adv_cmd), &adv_cmd); |
569 | if (ret) | 569 | if (ret) |
@@ -578,7 +578,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv) | |||
578 | cmd.critical_temperature_R = | 578 | cmd.critical_temperature_R = |
579 | cpu_to_le32(hw_params(priv).ct_kill_threshold); | 579 | cpu_to_le32(hw_params(priv).ct_kill_threshold); |
580 | 580 | ||
581 | ret = iwl_trans_send_cmd_pdu(trans(priv), | 581 | ret = iwl_dvm_send_cmd_pdu(priv, |
582 | REPLY_CT_KILL_CONFIG_CMD, | 582 | REPLY_CT_KILL_CONFIG_CMD, |
583 | CMD_SYNC, sizeof(cmd), &cmd); | 583 | CMD_SYNC, sizeof(cmd), &cmd); |
584 | if (ret) | 584 | if (ret) |
@@ -604,7 +604,7 @@ static int iwlagn_send_calib_cfg_rt(struct iwl_priv *priv, u32 cfg) | |||
604 | calib_cfg_cmd.ucd_calib_cfg.once.is_enable = IWL_CALIB_RT_CFG_ALL; | 604 | calib_cfg_cmd.ucd_calib_cfg.once.is_enable = IWL_CALIB_RT_CFG_ALL; |
605 | calib_cfg_cmd.ucd_calib_cfg.once.start = cpu_to_le32(cfg); | 605 | calib_cfg_cmd.ucd_calib_cfg.once.start = cpu_to_le32(cfg); |
606 | 606 | ||
607 | return iwl_trans_send_cmd(trans(priv), &cmd); | 607 | return iwl_dvm_send_cmd(priv, &cmd); |
608 | } | 608 | } |
609 | 609 | ||
610 | 610 | ||
@@ -616,7 +616,7 @@ static int iwlagn_send_tx_ant_config(struct iwl_priv *priv, u8 valid_tx_ant) | |||
616 | 616 | ||
617 | if (IWL_UCODE_API(priv->fw->ucode_ver) > 1) { | 617 | if (IWL_UCODE_API(priv->fw->ucode_ver) > 1) { |
618 | IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant); | 618 | IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant); |
619 | return iwl_trans_send_cmd_pdu(trans(priv), | 619 | return iwl_dvm_send_cmd_pdu(priv, |
620 | TX_ANT_CONFIGURATION_CMD, | 620 | TX_ANT_CONFIGURATION_CMD, |
621 | CMD_SYNC, | 621 | CMD_SYNC, |
622 | sizeof(struct iwl_tx_ant_config_cmd), | 622 | sizeof(struct iwl_tx_ant_config_cmd), |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index f55243828698..dfd86f288dee 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -96,6 +96,11 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
96 | const struct iwl_ucode_capabilities *capa); | 96 | const struct iwl_ucode_capabilities *capa); |
97 | void iwlagn_mac_unregister(struct iwl_priv *priv); | 97 | void iwlagn_mac_unregister(struct iwl_priv *priv); |
98 | 98 | ||
99 | /* commands */ | ||
100 | int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd); | ||
101 | int iwl_dvm_send_cmd_pdu(struct iwl_priv *priv, u8 id, | ||
102 | u32 flags, u16 len, const void *data); | ||
103 | |||
99 | /* RXON */ | 104 | /* RXON */ |
100 | int iwlagn_set_pan_params(struct iwl_priv *priv); | 105 | int iwlagn_set_pan_params(struct iwl_priv *priv); |
101 | int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx); | 106 | int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 9ae17c3bb885..aaea51ee4185 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -369,7 +369,7 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
369 | le32_to_cpu(ctx->timing.beacon_init_val), | 369 | le32_to_cpu(ctx->timing.beacon_init_val), |
370 | le16_to_cpu(ctx->timing.atim_window)); | 370 | le16_to_cpu(ctx->timing.atim_window)); |
371 | 371 | ||
372 | return iwl_trans_send_cmd_pdu(trans(priv), ctx->rxon_timing_cmd, | 372 | return iwl_dvm_send_cmd_pdu(priv, ctx->rxon_timing_cmd, |
373 | CMD_SYNC, sizeof(ctx->timing), &ctx->timing); | 373 | CMD_SYNC, sizeof(ctx->timing), &ctx->timing); |
374 | } | 374 | } |
375 | 375 | ||
@@ -958,7 +958,7 @@ void iwl_send_bt_config(struct iwl_priv *priv) | |||
958 | IWL_DEBUG_INFO(priv, "BT coex %s\n", | 958 | IWL_DEBUG_INFO(priv, "BT coex %s\n", |
959 | (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); | 959 | (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); |
960 | 960 | ||
961 | if (iwl_trans_send_cmd_pdu(trans(priv), REPLY_BT_CONFIG, | 961 | if (iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG, |
962 | CMD_SYNC, sizeof(struct iwl_bt_cmd), &bt_cmd)) | 962 | CMD_SYNC, sizeof(struct iwl_bt_cmd), &bt_cmd)) |
963 | IWL_ERR(priv, "failed to send BT Coex Config\n"); | 963 | IWL_ERR(priv, "failed to send BT Coex Config\n"); |
964 | } | 964 | } |
@@ -971,12 +971,12 @@ int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear) | |||
971 | }; | 971 | }; |
972 | 972 | ||
973 | if (flags & CMD_ASYNC) | 973 | if (flags & CMD_ASYNC) |
974 | return iwl_trans_send_cmd_pdu(trans(priv), REPLY_STATISTICS_CMD, | 974 | return iwl_dvm_send_cmd_pdu(priv, REPLY_STATISTICS_CMD, |
975 | CMD_ASYNC, | 975 | CMD_ASYNC, |
976 | sizeof(struct iwl_statistics_cmd), | 976 | sizeof(struct iwl_statistics_cmd), |
977 | &statistics_cmd); | 977 | &statistics_cmd); |
978 | else | 978 | else |
979 | return iwl_trans_send_cmd_pdu(trans(priv), REPLY_STATISTICS_CMD, | 979 | return iwl_dvm_send_cmd_pdu(priv, REPLY_STATISTICS_CMD, |
980 | CMD_SYNC, | 980 | CMD_SYNC, |
981 | sizeof(struct iwl_statistics_cmd), | 981 | sizeof(struct iwl_statistics_cmd), |
982 | &statistics_cmd); | 982 | &statistics_cmd); |
@@ -1300,7 +1300,7 @@ int iwl_cmd_echo_test(struct iwl_priv *priv) | |||
1300 | .flags = CMD_SYNC, | 1300 | .flags = CMD_SYNC, |
1301 | }; | 1301 | }; |
1302 | 1302 | ||
1303 | ret = iwl_trans_send_cmd(trans(priv), &cmd); | 1303 | ret = iwl_dvm_send_cmd(priv, &cmd); |
1304 | if (ret) | 1304 | if (ret) |
1305 | IWL_ERR(priv, "echo testing fail: 0X%x\n", ret); | 1305 | IWL_ERR(priv, "echo testing fail: 0X%x\n", ret); |
1306 | else | 1306 | else |
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index 5c7741f07aa0..f2f706f084a5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-led.c | |||
@@ -112,7 +112,7 @@ static int iwl_send_led_cmd(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd) | |||
112 | iwl_write32(trans(priv), CSR_LED_REG, | 112 | iwl_write32(trans(priv), CSR_LED_REG, |
113 | reg & CSR_LED_BSM_CTRL_MSK); | 113 | reg & CSR_LED_BSM_CTRL_MSK); |
114 | 114 | ||
115 | return iwl_trans_send_cmd(trans(priv), &cmd); | 115 | return iwl_dvm_send_cmd(priv, &cmd); |
116 | } | 116 | } |
117 | 117 | ||
118 | /* Set led pattern command */ | 118 | /* Set led pattern command */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 1ef3c4da1605..46ca82062c2e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -336,7 +336,7 @@ static int iwl_set_power(struct iwl_priv *priv, struct iwl_powertable_cmd *cmd) | |||
336 | le32_to_cpu(cmd->sleep_interval[3]), | 336 | le32_to_cpu(cmd->sleep_interval[3]), |
337 | le32_to_cpu(cmd->sleep_interval[4])); | 337 | le32_to_cpu(cmd->sleep_interval[4])); |
338 | 338 | ||
339 | return iwl_trans_send_cmd_pdu(trans(priv), POWER_TABLE_CMD, CMD_SYNC, | 339 | return iwl_dvm_send_cmd_pdu(priv, POWER_TABLE_CMD, CMD_SYNC, |
340 | sizeof(struct iwl_powertable_cmd), cmd); | 340 | sizeof(struct iwl_powertable_cmd), cmd); |
341 | } | 341 | } |
342 | 342 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 28899dabe6fb..dcba74883307 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -72,7 +72,7 @@ static int iwl_send_scan_abort(struct iwl_priv *priv) | |||
72 | test_bit(STATUS_FW_ERROR, &priv->shrd->status)) | 72 | test_bit(STATUS_FW_ERROR, &priv->shrd->status)) |
73 | return -EIO; | 73 | return -EIO; |
74 | 74 | ||
75 | ret = iwl_trans_send_cmd(trans(priv), &cmd); | 75 | ret = iwl_dvm_send_cmd(priv, &cmd); |
76 | if (ret) | 76 | if (ret) |
77 | return ret; | 77 | return ret; |
78 | 78 | ||
@@ -887,7 +887,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
887 | if (ret) | 887 | if (ret) |
888 | return ret; | 888 | return ret; |
889 | 889 | ||
890 | ret = iwl_trans_send_cmd(trans(priv), &cmd); | 890 | ret = iwl_dvm_send_cmd(priv, &cmd); |
891 | if (ret) { | 891 | if (ret) { |
892 | clear_bit(STATUS_SCAN_HW, &priv->shrd->status); | 892 | clear_bit(STATUS_SCAN_HW, &priv->shrd->status); |
893 | iwlagn_set_pan_params(priv); | 893 | iwlagn_set_pan_params(priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-testmode.c b/drivers/net/wireless/iwlwifi/iwl-testmode.c index c1ecf0fba372..f26765b3a661 100644 --- a/drivers/net/wireless/iwlwifi/iwl-testmode.c +++ b/drivers/net/wireless/iwlwifi/iwl-testmode.c | |||
@@ -282,7 +282,7 @@ static int iwl_testmode_ucode(struct ieee80211_hw *hw, struct nlattr **tb) | |||
282 | IWL_DEBUG_INFO(priv, "testmode ucode command ID 0x%x, flags 0x%x," | 282 | IWL_DEBUG_INFO(priv, "testmode ucode command ID 0x%x, flags 0x%x," |
283 | " len %d\n", cmd.id, cmd.flags, cmd.len[0]); | 283 | " len %d\n", cmd.id, cmd.flags, cmd.len[0]); |
284 | 284 | ||
285 | ret = iwl_trans_send_cmd(trans(priv), &cmd); | 285 | ret = iwl_dvm_send_cmd(priv, &cmd); |
286 | if (ret) { | 286 | if (ret) { |
287 | IWL_ERR(priv, "Failed to send hcmd\n"); | 287 | IWL_ERR(priv, "Failed to send hcmd\n"); |
288 | return ret; | 288 | return ret; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.c b/drivers/net/wireless/iwlwifi/iwl-trans.c deleted file mode 100644 index 506c062343b2..000000000000 --- a/drivers/net/wireless/iwlwifi/iwl-trans.c +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * This file is provided under a dual BSD/GPLv2 license. When using or | ||
4 | * redistributing this file, you may do so under either license. | ||
5 | * | ||
6 | * GPL LICENSE SUMMARY | ||
7 | * | ||
8 | * Copyright(c) 2007 - 2012 Intel Corporation. All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of version 2 of the GNU General Public License as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, | ||
22 | * USA | ||
23 | * | ||
24 | * The full GNU General Public License is included in this distribution | ||
25 | * in the file called LICENSE.GPL. | ||
26 | * | ||
27 | * Contact Information: | ||
28 | * Intel Linux Wireless <ilw@linux.intel.com> | ||
29 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
30 | * | ||
31 | * BSD LICENSE | ||
32 | * | ||
33 | * Copyright(c) 2005 - 2012 Intel Corporation. All rights reserved. | ||
34 | * All rights reserved. | ||
35 | * | ||
36 | * Redistribution and use in source and binary forms, with or without | ||
37 | * modification, are permitted provided that the following conditions | ||
38 | * are met: | ||
39 | * | ||
40 | * * Redistributions of source code must retain the above copyright | ||
41 | * notice, this list of conditions and the following disclaimer. | ||
42 | * * Redistributions in binary form must reproduce the above copyright | ||
43 | * notice, this list of conditions and the following disclaimer in | ||
44 | * the documentation and/or other materials provided with the | ||
45 | * distribution. | ||
46 | * * Neither the name Intel Corporation nor the names of its | ||
47 | * contributors may be used to endorse or promote products derived | ||
48 | * from this software without specific prior written permission. | ||
49 | * | ||
50 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
51 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
52 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
53 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
54 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
56 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
57 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
58 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
59 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
61 | * | ||
62 | *****************************************************************************/ | ||
63 | |||
64 | #include "iwl-trans.h" | ||
65 | |||
66 | int iwl_trans_send_cmd_pdu(struct iwl_trans *trans, u8 id, | ||
67 | u32 flags, u16 len, const void *data) | ||
68 | { | ||
69 | struct iwl_host_cmd cmd = { | ||
70 | .id = id, | ||
71 | .len = { len, }, | ||
72 | .data = { data, }, | ||
73 | .flags = flags, | ||
74 | }; | ||
75 | |||
76 | return iwl_trans_send_cmd(trans, &cmd); | ||
77 | } | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index ec5249c8a7f4..a8d476a44c58 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h | |||
@@ -443,9 +443,6 @@ static inline int iwl_trans_send_cmd(struct iwl_trans *trans, | |||
443 | return trans->ops->send_cmd(trans, cmd); | 443 | return trans->ops->send_cmd(trans, cmd); |
444 | } | 444 | } |
445 | 445 | ||
446 | int iwl_trans_send_cmd_pdu(struct iwl_trans *trans, u8 id, | ||
447 | u32 flags, u16 len, const void *data); | ||
448 | |||
449 | static inline int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb, | 446 | static inline int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb, |
450 | struct iwl_device_cmd *dev_cmd, enum iwl_rxon_context_id ctx, | 447 | struct iwl_device_cmd *dev_cmd, enum iwl_rxon_context_id ctx, |
451 | u8 sta_id, u8 tid) | 448 | u8 sta_id, u8 tid) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c index 3747edb7c292..1cbe8e9926f1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c | |||
@@ -179,7 +179,7 @@ static int iwl_send_calib_cfg(struct iwl_priv *priv) | |||
179 | calib_cfg_cmd.ucd_calib_cfg.flags = | 179 | calib_cfg_cmd.ucd_calib_cfg.flags = |
180 | IWL_CALIB_CFG_FLAG_SEND_COMPLETE_NTFY_MSK; | 180 | IWL_CALIB_CFG_FLAG_SEND_COMPLETE_NTFY_MSK; |
181 | 181 | ||
182 | return iwl_trans_send_cmd(trans(priv), &cmd); | 182 | return iwl_dvm_send_cmd(priv, &cmd); |
183 | } | 183 | } |
184 | 184 | ||
185 | int iwlagn_rx_calib_result(struct iwl_priv *priv, | 185 | int iwlagn_rx_calib_result(struct iwl_priv *priv, |
@@ -260,7 +260,7 @@ static int iwl_send_wimax_coex(struct iwl_priv *priv) | |||
260 | /* coexistence is disabled */ | 260 | /* coexistence is disabled */ |
261 | memset(&coex_cmd, 0, sizeof(coex_cmd)); | 261 | memset(&coex_cmd, 0, sizeof(coex_cmd)); |
262 | } | 262 | } |
263 | return iwl_trans_send_cmd_pdu(trans(priv), | 263 | return iwl_dvm_send_cmd_pdu(priv, |
264 | COEX_PRIORITY_TABLE_CMD, CMD_SYNC, | 264 | COEX_PRIORITY_TABLE_CMD, CMD_SYNC, |
265 | sizeof(coex_cmd), &coex_cmd); | 265 | sizeof(coex_cmd), &coex_cmd); |
266 | } | 266 | } |
@@ -293,7 +293,7 @@ void iwl_send_prio_tbl(struct iwl_priv *priv) | |||
293 | 293 | ||
294 | memcpy(prio_tbl_cmd.prio_tbl, iwl_bt_prio_tbl, | 294 | memcpy(prio_tbl_cmd.prio_tbl, iwl_bt_prio_tbl, |
295 | sizeof(iwl_bt_prio_tbl)); | 295 | sizeof(iwl_bt_prio_tbl)); |
296 | if (iwl_trans_send_cmd_pdu(trans(priv), | 296 | if (iwl_dvm_send_cmd_pdu(priv, |
297 | REPLY_BT_COEX_PRIO_TABLE, CMD_SYNC, | 297 | REPLY_BT_COEX_PRIO_TABLE, CMD_SYNC, |
298 | sizeof(prio_tbl_cmd), &prio_tbl_cmd)) | 298 | sizeof(prio_tbl_cmd), &prio_tbl_cmd)) |
299 | IWL_ERR(priv, "failed to send BT prio tbl command\n"); | 299 | IWL_ERR(priv, "failed to send BT prio tbl command\n"); |
@@ -306,7 +306,7 @@ int iwl_send_bt_env(struct iwl_priv *priv, u8 action, u8 type) | |||
306 | 306 | ||
307 | env_cmd.action = action; | 307 | env_cmd.action = action; |
308 | env_cmd.type = type; | 308 | env_cmd.type = type; |
309 | ret = iwl_trans_send_cmd_pdu(trans(priv), | 309 | ret = iwl_dvm_send_cmd_pdu(priv, |
310 | REPLY_BT_COEX_PROT_ENV, CMD_SYNC, | 310 | REPLY_BT_COEX_PROT_ENV, CMD_SYNC, |
311 | sizeof(env_cmd), &env_cmd); | 311 | sizeof(env_cmd), &env_cmd); |
312 | if (ret) | 312 | if (ret) |