aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorSamuel Ortiz <samuel.ortiz@intel.com>2008-12-21 22:31:18 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:25 -0500
commitc496294efe6ebc9bd5dd1e0d3cce5d1ad6a1ea2c (patch)
tree2a995ef432bd0bf9e871ae46865d99015160b4b2 /drivers/net/wireless/iwlwifi
parent188cf6c73a72be1d8c118580a40d70cd76415eec (diff)
iwl3945: switch to the iwl-core send_card_state routine
Switch iwl3945 to use iwl-core:send_card_state routine. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c34
3 files changed, 6 insertions, 34 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index cde233d1574..76315c30e6f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1368,7 +1368,7 @@ EXPORT_SYMBOL(iwl_rf_kill_ct_config);
1368 * When in the 'halt' state, the card is shut down and must be fully 1368 * When in the 'halt' state, the card is shut down and must be fully
1369 * restarted to come back on. 1369 * restarted to come back on.
1370 */ 1370 */
1371static int iwl_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag) 1371int iwl_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag)
1372{ 1372{
1373 struct iwl_host_cmd cmd = { 1373 struct iwl_host_cmd cmd = {
1374 .id = REPLY_CARD_STATE_CMD, 1374 .id = REPLY_CARD_STATE_CMD,
@@ -1379,6 +1379,7 @@ static int iwl_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag)
1379 1379
1380 return iwl_send_cmd(priv, &cmd); 1380 return iwl_send_cmd(priv, &cmd);
1381} 1381}
1382EXPORT_SYMBOL(iwl_send_card_state);
1382 1383
1383void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv) 1384void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv)
1384{ 1385{
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 7c3a20a986b..2abda89daaf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -342,6 +342,9 @@ int iwl_send_cmd_pdu_async(struct iwl_priv *priv, u8 id, u16 len,
342 342
343int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd); 343int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd);
344 344
345int iwl_send_card_state(struct iwl_priv *priv, u32 flags,
346 u8 meta_flag);
347
345/***************************************************** 348/*****************************************************
346 * PCI * 349 * PCI *
347 *****************************************************/ 350 *****************************************************/
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 53e274a5f4f..afde87bc499 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1076,38 +1076,6 @@ static int iwl3945_send_scan_abort(struct iwl_priv *priv)
1076 return rc; 1076 return rc;
1077} 1077}
1078 1078
1079static int iwl3945_card_state_sync_callback(struct iwl_priv *priv,
1080 struct iwl_cmd *cmd,
1081 struct sk_buff *skb)
1082{
1083 return 1;
1084}
1085
1086/*
1087 * CARD_STATE_CMD
1088 *
1089 * Use: Sets the device's internal card state to enable, disable, or halt
1090 *
1091 * When in the 'enable' state the card operates as normal.
1092 * When in the 'disable' state, the card enters into a low power mode.
1093 * When in the 'halt' state, the card is shut down and must be fully
1094 * restarted to come back on.
1095 */
1096static int iwl3945_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag)
1097{
1098 struct iwl_host_cmd cmd = {
1099 .id = REPLY_CARD_STATE_CMD,
1100 .len = sizeof(u32),
1101 .data = &flags,
1102 .meta.flags = meta_flag,
1103 };
1104
1105 if (meta_flag & CMD_ASYNC)
1106 cmd.meta.u.callback = iwl3945_card_state_sync_callback;
1107
1108 return iwl3945_send_cmd(priv, &cmd);
1109}
1110
1111static int iwl3945_add_sta_sync_callback(struct iwl_priv *priv, 1079static int iwl3945_add_sta_sync_callback(struct iwl_priv *priv,
1112 struct iwl_cmd *cmd, struct sk_buff *skb) 1080 struct iwl_cmd *cmd, struct sk_buff *skb)
1113{ 1081{
@@ -2545,7 +2513,7 @@ static void iwl3945_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
2545 iwl_write32(priv, CSR_UCODE_DRV_GP1_SET, 2513 iwl_write32(priv, CSR_UCODE_DRV_GP1_SET,
2546 CSR_UCODE_SW_BIT_RFKILL); 2514 CSR_UCODE_SW_BIT_RFKILL);
2547 spin_unlock_irqrestore(&priv->lock, flags); 2515 spin_unlock_irqrestore(&priv->lock, flags);
2548 iwl3945_send_card_state(priv, CARD_STATE_CMD_DISABLE, 0); 2516 iwl_send_card_state(priv, CARD_STATE_CMD_DISABLE, 0);
2549 set_bit(STATUS_RF_KILL_SW, &priv->status); 2517 set_bit(STATUS_RF_KILL_SW, &priv->status);
2550 } 2518 }
2551 return; 2519 return;