diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-07-08 11:46:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-11 15:02:03 -0400 |
commit | e419d62d72b23392e7f9a5da047fb17d70edc54a (patch) | |
tree | 6b6608a26d9cb88f176b530e85d3e8b607927856 /drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |
parent | 06f491ef4b659fa6f6850f31d05a4a03db0d9d96 (diff) |
iwlagn: consolidate the API that sends host commands and move to transport
Now, there are only two functions to send a host command:
* send_cmd that receives a iwl_host_cmd
* send_cmd_pdu that builds the iwl_host_cmd itself and received flags
The flags CMD_ASYNC / CMD_SYNC / CMD_WANT_SKB are not changed by the API
functions.
Kill the unused flags CMD_SIZE_NORMAL / CMD_NO_SKB on the way.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@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/iwlwifi/iwl-agn-lib.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index a926142f470f..39664c9bbff7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -540,8 +540,8 @@ int iwlagn_send_tx_power(struct iwl_priv *priv) | |||
540 | else | 540 | else |
541 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD; | 541 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD; |
542 | 542 | ||
543 | return iwl_send_cmd_pdu(priv, tx_ant_cfg_cmd, sizeof(tx_power_cmd), | 543 | return priv->trans.ops->send_cmd_pdu(priv, tx_ant_cfg_cmd, CMD_SYNC, |
544 | &tx_power_cmd); | 544 | sizeof(tx_power_cmd), &tx_power_cmd); |
545 | } | 545 | } |
546 | 546 | ||
547 | void iwlagn_temperature(struct iwl_priv *priv) | 547 | void iwlagn_temperature(struct iwl_priv *priv) |
@@ -1063,6 +1063,7 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1063 | struct iwl_host_cmd cmd = { | 1063 | struct iwl_host_cmd cmd = { |
1064 | .id = REPLY_SCAN_CMD, | 1064 | .id = REPLY_SCAN_CMD, |
1065 | .len = { sizeof(struct iwl_scan_cmd), }, | 1065 | .len = { sizeof(struct iwl_scan_cmd), }, |
1066 | .flags = CMD_SYNC, | ||
1066 | }; | 1067 | }; |
1067 | struct iwl_scan_cmd *scan; | 1068 | struct iwl_scan_cmd *scan; |
1068 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; | 1069 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; |
@@ -1359,7 +1360,7 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1359 | if (ret) | 1360 | if (ret) |
1360 | return ret; | 1361 | return ret; |
1361 | 1362 | ||
1362 | ret = iwl_send_cmd_sync(priv, &cmd); | 1363 | ret = priv->trans.ops->send_cmd(priv, &cmd); |
1363 | if (ret) { | 1364 | if (ret) { |
1364 | clear_bit(STATUS_SCAN_HW, &priv->status); | 1365 | clear_bit(STATUS_SCAN_HW, &priv->status); |
1365 | iwlagn_set_pan_params(priv); | 1366 | iwlagn_set_pan_params(priv); |
@@ -1465,7 +1466,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | |||
1465 | flush_cmd.fifo_control); | 1466 | flush_cmd.fifo_control); |
1466 | flush_cmd.flush_control = cpu_to_le16(flush_control); | 1467 | flush_cmd.flush_control = cpu_to_le16(flush_control); |
1467 | 1468 | ||
1468 | return iwl_send_cmd(priv, &cmd); | 1469 | return priv->trans.ops->send_cmd(priv, &cmd); |
1469 | } | 1470 | } |
1470 | 1471 | ||
1471 | void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | 1472 | void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control) |
@@ -1657,13 +1658,13 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv) | |||
1657 | if (priv->cfg->bt_params->bt_session_2) { | 1658 | if (priv->cfg->bt_params->bt_session_2) { |
1658 | memcpy(&bt_cmd_2000.basic, &basic, | 1659 | memcpy(&bt_cmd_2000.basic, &basic, |
1659 | sizeof(basic)); | 1660 | sizeof(basic)); |
1660 | ret = iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, | 1661 | ret = priv->trans.ops->send_cmd_pdu(priv, REPLY_BT_CONFIG, |
1661 | sizeof(bt_cmd_2000), &bt_cmd_2000); | 1662 | CMD_SYNC, sizeof(bt_cmd_2000), &bt_cmd_2000); |
1662 | } else { | 1663 | } else { |
1663 | memcpy(&bt_cmd_6000.basic, &basic, | 1664 | memcpy(&bt_cmd_6000.basic, &basic, |
1664 | sizeof(basic)); | 1665 | sizeof(basic)); |
1665 | ret = iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, | 1666 | ret = priv->trans.ops->send_cmd_pdu(priv, REPLY_BT_CONFIG, |
1666 | sizeof(bt_cmd_6000), &bt_cmd_6000); | 1667 | CMD_SYNC, sizeof(bt_cmd_6000), &bt_cmd_6000); |
1667 | } | 1668 | } |
1668 | if (ret) | 1669 | if (ret) |
1669 | IWL_ERR(priv, "failed to send BT Coex Config\n"); | 1670 | IWL_ERR(priv, "failed to send BT Coex Config\n"); |